Index: Mk/Uses/shebangfix.mk =================================================================== --- Mk/Uses/shebangfix.mk +++ Mk/Uses/shebangfix.mk @@ -29,39 +29,47 @@ .if !defined(_INCLUDE_USES_SHEBANGFIX_MK) _INCLUDE_USES_SHEBANGFIX_MK= yes -bash_OLD_CMD?= /bin/bash +bash_OLD_CMD+= /bin/bash +bash_OLD_CMD+= "/usr/bin/env bash" bash_CMD?= ${LOCALBASE}/bin/bash -java_OLD_CMD?= /usr/bin/java +java_OLD_CMD+= /usr/bin/java java_CMD?= ${LOCALBASE}/bin/java -ksh_OLD_CMD?= /bin/ksh +ksh_OLD_CMD+= /bin/ksh ksh_CMD?= ${LOCALBASE}/bin/ksh -perl_OLD_CMD?= /usr/bin/perl +perl_OLD_CMD+= /usr/bin/perl +perl_OLD_CMD+= "/usr/bin/env perl" +perl_OLD_CMD+= perl perl_CMD?= ${LOCALBASE}/bin/perl -php_OLD_CMD?= /usr/bin/php +php_OLD_CMD+= /usr/bin/php php_CMD?= ${LOCALBASE}/bin/php -python_OLD_CMD?= /usr/bin/python +python_OLD_CMD+= /usr/bin/python +python_OLD_CMD+= "/usr/bin/env python" .if ${USES:Mpython*} python_CMD?= ${PYTHON_CMD} .else python_CMD?= ${LOCALBASE}/bin/python .endif -ruby_OLD_CMD?= /usr/bin/ruby +ruby_OLD_CMD+= /usr/bin/ruby +ruby_OLD_CMD+= "/usr/bin/env ruby" ruby_CMD?= ${LOCALBASE}/bin/ruby -tcl_OLD_CMD?= /usr/bin/tclsh +tcl_OLD_CMD+= /usr/bin/tclsh tcl_CMD?= ${TCLSH} -tk_OLD_CMD?= /usr/bin/wish +tk_OLD_CMD+= /usr/bin/wish tk_CMD?= ${WISH} SHEBANG_LANG+= bash java ksh perl php python ruby tcl tk .for lang in ${SHEBANG_LANG} -.if !defined(${lang}_CMD) +. if !defined(${lang}_CMD) IGNORE+= missing definition for ${lang}_CMD -.endif -.if !defined(${lang}_OLD_CMD) +. endif +. if !defined(${lang}_OLD_CMD) IGNORE+= missing definition for ${lang}_OLD_CMD -.endif -_SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${${lang}_OLD_CMD}|\#!${${lang}_CMD}|" +. endif +. for old_cmd in ${${lang}_OLD_CMD} +_SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${old_cmd:C/\"//g}\([[:space:]]\)|\#!${${lang}_CMD}\1|" +_SHEBANG_REINPLACE_ARGS+= -e "1s|^\#![[:space:]]*${old_cmd:C/\"//g}$$|\#!${${lang}_CMD}|" +. endfor .endfor _USES_patch+= 210:fix-shebang Index: astro/weather/Makefile =================================================================== --- astro/weather/Makefile +++ astro/weather/Makefile @@ -24,7 +24,6 @@ PORTDATA= airports places stations zctas zones SHEBANG_FILES= ${PORTNAME} -python_OLD_CMD= /usr/bin/env python .include Index: audio/mma/Makefile =================================================================== --- audio/mma/Makefile +++ audio/mma/Makefile @@ -31,7 +31,6 @@ WRKDOC= ${WRKDIR}/${PORTNAME}-pdf-${DISTVERSION:S,a,,} WRKSRC= ${WRKDIR}/${PORTNAME}-bin-${DISTVERSION} -python_OLD_CMD= /usr/bin/env python DOCS_DISTFILES= ${PORTNAME}-pdf-${DISTVERSION:S,a,,}.tar.gz Index: audio/py-tagpy/Makefile =================================================================== --- audio/py-tagpy/Makefile +++ audio/py-tagpy/Makefile @@ -24,7 +24,6 @@ --boost-inc-dir="${PYTHON_INCLUDEDIR},${LOCALBASE}/include" \ --boost-lib-dir="${PYTHON_LIBDIR},${LOCALBASE}/lib" \ --boost-python-libname="boost_python" -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= configure.py USE_PYTHON= distutils autoplist Index: audio/ripit/Makefile =================================================================== --- audio/ripit/Makefile +++ audio/ripit/Makefile @@ -24,7 +24,6 @@ NO_BUILD= yes USE_PERL5= run SHEBANG_FILES= ripit.pl -perl_OLD_CMD= /usr/bin/env perl OPTIONS_DEFINE= EXAMPLES Index: audio/soundconverter/Makefile =================================================================== --- audio/soundconverter/Makefile +++ audio/soundconverter/Makefile @@ -17,7 +17,7 @@ USES= gettext gmake desktop-file-utils python:2 shebangfix SHEBANG_FILES= src/soundconverter.py -python_OLD_CMD= /usr/bin/python -tt +python_OLD_CMD= "/usr/bin/python -tt" GNU_CONFIGURE= yes USE_GNOME= intltool pygtk2 pygnome2 Index: audio/sphinx/Makefile =================================================================== --- audio/sphinx/Makefile +++ audio/sphinx/Makefile @@ -16,7 +16,7 @@ PKGMESSAGE= ${WRKDIR}/pkg-message USES= gmake libtool shebangfix SHEBANG_FILES= scripts/sphinx2-demo.in -perl_OLD_CMD= @PERL@ -w +perl_OLD_CMD= "@PERL@ -w" # contains i386 sound code ONLY_FOR_ARCHS= i386 Index: chinese/pyzy/Makefile =================================================================== --- chinese/pyzy/Makefile +++ chinese/pyzy/Makefile @@ -18,7 +18,6 @@ USES= compiler:c++11-lib gmake libtool pkgconfig python:build shebangfix SHEBANG_FILES= data/db/android/create_db.py -python_OLD_CMD= /usr/bin/env python USE_GNOME= glib20 USE_LDCONFIG= yes Index: chinese/ydict/Makefile =================================================================== --- chinese/ydict/Makefile +++ chinese/ydict/Makefile @@ -18,7 +18,6 @@ PLIST_FILES= bin/ydict SHEBANG_FILES= ${WRKSRC}/ydict -python_OLD_CMD= /usr/bin/env python python_CMD= /usr/bin/env python2 do-install: Index: databases/nagios-check_mongodb/Makefile =================================================================== --- databases/nagios-check_mongodb/Makefile +++ databases/nagios-check_mongodb/Makefile @@ -17,7 +17,6 @@ GH_TAGNAME= 9d17373 USES= python shebangfix SHEBANG_FILES= ${WRKSRC}/check_mongodb.py -python_OLD_CMD= /usr/bin/env python NO_BUILD= yes PLIST_FILES= libexec/nagios/check_mongodb Index: databases/pgtune/Makefile =================================================================== --- databases/pgtune/Makefile +++ databases/pgtune/Makefile @@ -12,17 +12,11 @@ COMMENT= Postgresql.conf tuning tips based on hardware and load type USES= python shebangfix -NO_BUILD= yes - SHEBANG_FILES= ${PORTNAME} -python_OLD_CMD= ${PREFIX}/bin/python - -pre-install: - @${REINPLACE_CMD} -e 's|${python_OLD_CMD}|${PYTHON_CMD}|' \ - ${WRKSRC}/${PORTNAME} +NO_BUILD= yes do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/pgtune ${STAGEDIR}${PREFIX}/bin + ${INSTALL_SCRIPT} ${WRKSRC}/pgtune ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${PREFIX}/share/pgtune/settings ${INSTALL_DATA} ${WRKSRC}/pg_settings* \ ${STAGEDIR}${PREFIX}/share/pgtune/settings Index: databases/postgresql_autodoc/Makefile =================================================================== --- databases/postgresql_autodoc/Makefile +++ databases/postgresql_autodoc/Makefile @@ -15,7 +15,6 @@ p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg USES+= gmake perl5 shebangfix -perl_OLD_CMD= /usr/bin/env perl SHEBANG_FILES= postgresql_autodoc.pl CONFIGURE_ARGS+=--datadir=${DATADIR} Index: databases/skytools/Makefile =================================================================== --- databases/skytools/Makefile +++ databases/skytools/Makefile @@ -12,8 +12,6 @@ GNU_CONFIGURE= yes USES= gmake python:2 shebangfix pgsql -python_OLD_CMD= /usr/bin/env python -python_CMD= /usr/bin/env python2 SHEBANG_FILES= setup_pkgloader.py setup_skytools.py \ scripts/catsql.py scripts/data_maintainer.py \ scripts/find_sql_functions.py scripts/grantfu.py \ Index: deskutils/tel/Makefile =================================================================== --- deskutils/tel/Makefile +++ deskutils/tel/Makefile @@ -16,7 +16,6 @@ USES= gettext python shebangfix tar:bzip2 SHEBANG_FILES= src/tel.py -python_OLD_CMD= /usr/bin/env python USE_PYTHON= distutils post-patch: Index: deskutils/tnote/Makefile =================================================================== --- deskutils/tnote/Makefile +++ deskutils/tnote/Makefile @@ -16,8 +16,6 @@ USE_PYTHON= distutils SHEBANG_FILES= tnote -python_OLD_CMD= ${SETENV} python -python_CMD= ${SETENV} python2 PLIST_FILES= bin/tnote man/man1/tnote.1.gz PORTDOCS= * Index: deskutils/virt-manager/Makefile =================================================================== --- deskutils/virt-manager/Makefile +++ deskutils/virt-manager/Makefile @@ -35,7 +35,7 @@ INSTALLS_ICONS= yes -python_OLD_CMD= /usr/bin/python2 "-tt" +python_OLD_CMD= "/usr/bin/python2 -tt" SHEBANG_FILES= virt-manager \ virt-install \ virt-clone \ Index: devel/cvs2svn/Makefile =================================================================== --- devel/cvs2svn/Makefile +++ devel/cvs2svn/Makefile @@ -23,9 +23,7 @@ USES= shebangfix python:2.7 USE_PYTHON= distutils autoplist -SHEBANG_LANG= python python2 -python2_OLD_CMD= /usr/bin/env python -python2_CMD= ${PYTHON_CMD} +SHEBANG_LANG= python SHEBANG_FILES= cvs2svn cvs2git cvs2bzr *.py \ contrib/* cvs2svn_lib/*.py \ svntest/* cvs2svn_rcsparse/*.py Index: devel/doxygen/Makefile =================================================================== --- devel/doxygen/Makefile +++ devel/doxygen/Makefile @@ -60,7 +60,7 @@ .endif post-patch: - @${REINPLACE_CMD} -e '/PERL_PATH/ s|${perl_OLD_CMD}|${perl_CMD}|' \ + @${REINPLACE_CMD} -e '/PERL_PATH/ s|/usr/bin/perl|${perl_CMD}|' \ ${WRKSRC}/src/config.xml .include Index: devel/googlemock/Makefile =================================================================== --- devel/googlemock/Makefile +++ devel/googlemock/Makefile @@ -23,20 +23,18 @@ USE_LDCONFIG= yes INSTALL_TARGET= install-strip -CONFIGURE_ENV= ac_cv_path_PYTHON=python2 -python_OLD_CMD= /usr/bin/env python -python_CMD= /usr/bin/env python2 SHEBANG_FILES= scripts/fuse_gmock_files.py scripts/gmock_doctor.py OPTIONS_DEFINE= TEST -TEST_USES= python:2,build +#TEST_USES= python:2,build TEST_ALL_TARGET=check +TEST_CONFIGURE_ENV= ac_cv_path_PYTHON=false #${python_CMD} post-patch: - ${REINPLACE_CMD} '/acx_pthread.m4/d' ${WRKSRC}/configure.ac + @${REINPLACE_CMD} '/acx_pthread.m4/d' ${WRKSRC}/configure.ac # enable vendor make install again (revert 52277c9) - ${REINPLACE_CMD} -E 's/install-(exec|data)-local/&-dummy/' \ + @${REINPLACE_CMD} -E 's/install-(exec|data)-local/&-dummy/' \ ${WRKSRC}/Makefile.am post-install: Index: devel/googletest/Makefile =================================================================== --- devel/googletest/Makefile +++ devel/googletest/Makefile @@ -19,9 +19,6 @@ USE_LDCONFIG= yes INSTALL_TARGET= install-strip -CONFIGURE_ENV= ac_cv_path_PYTHON=python2 -python_OLD_CMD= /usr/bin/env python -python_CMD= /usr/bin/env python2 SHEBANG_FILES= scripts/fuse_gtest_files.py scripts/gen_gtest_pred_impl.py \ scripts/pump.py @@ -29,10 +26,11 @@ TEST_USES= python:2,build TEST_ALL_TARGET=check +TEST_CONFIGURE_ENV= ac_cv_path_PYTHON=${python_CMD} post-patch: # enable vendor make install again (revert 661758e) - ${REINPLACE_CMD} -E 's/install-(exec|data)-local/&-dummy/' \ + @${REINPLACE_CMD} -E 's/install-(exec|data)-local/&-dummy/' \ ${WRKSRC}/Makefile.am post-install: Index: devel/libnxt/Makefile =================================================================== --- devel/libnxt/Makefile +++ devel/libnxt/Makefile @@ -15,7 +15,6 @@ SUB_FILES= pkg-message USES= python:build shebangfix USE_LDCONFIG= yes -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= make_flash_header.py do-build: Index: devel/lua-alien/Makefile =================================================================== --- devel/lua-alien/Makefile +++ devel/lua-alien/Makefile @@ -22,7 +22,7 @@ USES= libtool lua shebangfix zip SHEBANG_FILES= src/constants SHEBANG_LANG= lua -lua_OLD_CMD= /usr/bin/env lua +lua_OLD_CMD= "/usr/bin/env lua" lua_CMD= ${LOCALBASE}/bin/${LUA_CMD} GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-silent-rules \ Index: devel/py-gflags/Makefile =================================================================== --- devel/py-gflags/Makefile +++ devel/py-gflags/Makefile @@ -18,7 +18,6 @@ USE_PYTHON= autoplist distutils SHEBANG_FILES= gflags2man.py -python_OLD_CMD= /usr/bin/env python PROJECTHOST= python-gflags Index: devel/py-ice/Makefile =================================================================== --- devel/py-ice/Makefile +++ devel/py-ice/Makefile @@ -21,7 +21,6 @@ INSTALL_WRKSRC= ${WRKSRC}/python SHEBANG_LANG= python -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= ${BUILD_WRKSRC}/config/s2py.py MAKE_ENV+= PYTHON_VERSION=${PYTHON_VERSION} Index: devel/py-ioflo/Makefile =================================================================== --- devel/py-ioflo/Makefile +++ devel/py-ioflo/Makefile @@ -17,6 +17,5 @@ NO_ARCH= yes SHEBANG_FILES= scripts/ioflo -python_OLD_CMD= /usr/bin/env python .include Index: devel/py-pip/Makefile =================================================================== --- devel/py-pip/Makefile +++ devel/py-pip/Makefile @@ -34,7 +34,6 @@ USE_PYTHON= autoplist concurrent distutils SHEBANG_FILES= pip/__init__.py -python_OLD_CMD= /usr/bin/env python GH_ACCOUNT= pypa Index: devel/py-pymtbl/Makefile =================================================================== --- devel/py-pymtbl/Makefile +++ devel/py-pymtbl/Makefile @@ -17,7 +17,6 @@ USE_PYTHON= autoplist distutils USES= pkgconfig python shebangfix uniquefiles:dirs -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= examples/*.py examples/*/*.py PORTEXAMPLES= * Index: devel/renpy/Makefile =================================================================== --- devel/renpy/Makefile +++ devel/renpy/Makefile @@ -33,7 +33,6 @@ EXCLUDE= gen 'module/*.py[co]' 'renpy/*.py[co]' EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude ,} SHEBANG_FILES= renpy.py launcher/game/tkaskdir.py -python_OLD_CMD= /usr/bin/env python BUILD_WRKSRC= ${WRKSRC}/module INSTALL_WRKSRC= ${BUILD_WRKSRC} MAKE_ENV+= RENPY_DEPS_INSTALL="${LOCALBASE}" Index: emulators/dynagen/Makefile =================================================================== --- emulators/dynagen/Makefile +++ emulators/dynagen/Makefile @@ -21,22 +21,13 @@ PORTEXAMPLES= * PORTDATA= * -USES= dos2unix python - -USES+= shebangfix -SHEBANG_FILES= *.py dynagen pemu-start.sh -SHEBANG_LANG= python_env python_bol python_cnf -python_env_OLD_CMD=/usr/bin/env[[:space:]]*python -python_env_CMD= ${PYTHON_CMD} -python_bol_OLD_CMD=the an incredible combination -python_bol_CMD=|;9s|^python|${PYTHON_CMD} -python_cnf_OLD_CMD=the an incredible combination -python_cnf_CMD=|;s|^CONFIGSPECPATH.*|CONFIGSPECPATH = ['${PREFIX}/share/dynagen'] +USES= dos2unix python shebangfix +SHEBANG_FILES= *.py dynagen USE_PYTHON= distutils autoplist ALL_TARGET= # empty +NO_ARCH= yes -.include .include post-extract: Index: emulators/pipelight/Makefile =================================================================== --- emulators/pipelight/Makefile +++ emulators/pipelight/Makefile @@ -40,7 +40,6 @@ USE_XORG= x11 USES= compiler:gcc-c++11-lib gmake shebangfix MAKE_JOBS_UNSAFE=yes -bash_OLD_CMD= /usr/bin/env bash SHEBANG_FILES= configure \ share/install-dependency Index: games/childsplay/Makefile =================================================================== --- games/childsplay/Makefile +++ games/childsplay/Makefile @@ -21,8 +21,6 @@ USES= gettext shebangfix tar:tgz python:2 USE_GNOME= pygtk2 -python_OLD_CMD= /usr/bin/env python -python_CMD= ${SETENV} python2 SHEBANG_FILES= childsplay.py .for i in buttons funcs text dialogs gtk_widgets base SHEBANG_FILES+= SPWidgets/$i.py Index: games/linux-enemyterritory-jaymod-21/Makefile =================================================================== --- games/linux-enemyterritory-jaymod-21/Makefile +++ games/linux-enemyterritory-jaymod-21/Makefile @@ -22,7 +22,7 @@ USES= shebangfix SHEBANG_FILES= linux/convert_shrub -perl_OLD_CMD= /bin/env perl +perl_OLD_CMD= "/bin/env perl" USE_LINUX= yes PORTSCOUT= limit:^2\.1\.7 Index: games/linux-enemyterritory-jaymod/Makefile =================================================================== --- games/linux-enemyterritory-jaymod/Makefile +++ games/linux-enemyterritory-jaymod/Makefile @@ -16,7 +16,7 @@ USES= shebangfix SHEBANG_FILES= linux/convert_shrub -perl_OLD_CMD= /bin/env perl +perl_OLD_CMD= "/bin/env perl" USE_LINUX= yes OPTIONS_DEFINE= DOCS OMNIBOT Index: games/lostfeathers/Makefile =================================================================== --- games/lostfeathers/Makefile +++ games/lostfeathers/Makefile @@ -20,7 +20,6 @@ USES= python shebangfix zip SHEBANG_FILES= run_game.py -python_OLD_CMD= /usr/bin/env python USE_GNOME= pygtk2 librsvg2 PORTDOCS= README.txt Index: games/oneisenough/Makefile =================================================================== --- games/oneisenough/Makefile +++ games/oneisenough/Makefile @@ -24,7 +24,6 @@ DOS2UNIX_FILES= *.txt bin/*.py DOS2UNIX_REGEX= .*.[^pt][^nt][^gf] SHEBANG_FILES= run_game.py bin/mainmenu.py -python_OLD_CMD= /usr/bin/env python PORTDOCS= README.txt OPTIONS_DEFINE= DOCS Index: games/schwarzweiss/Makefile =================================================================== --- games/schwarzweiss/Makefile +++ games/schwarzweiss/Makefile @@ -25,7 +25,6 @@ USES= python:2 shebangfix SHEBANG_FILES= schwarzweiss_start.py data/*.py -python_OLD_CMD= /usr/bin/env python PORTDOCS= readme.txt OPTIONS_DEFINE= DOCS Index: games/starfighter/Makefile =================================================================== --- games/starfighter/Makefile +++ games/starfighter/Makefile @@ -24,7 +24,6 @@ MAKEFILE= makefile SHEBANG_FILES= pack.py unpack.py -python_OLD_CMD= /usr/bin/env python INSTALLS_ICONS= yes Index: games/super_mario_bros_python/Makefile =================================================================== --- games/super_mario_bros_python/Makefile +++ games/super_mario_bros_python/Makefile @@ -24,7 +24,6 @@ USES= shebangfix python:2 zip SHEBANG_FILES= gamelib/*.py start.py -python_OLD_CMD= /usr/bin/env python PORTDOCS= changelog.txt readme.txt OPTIONS_DEFINE= DOCS Index: graphics/imgv/Makefile =================================================================== --- graphics/imgv/Makefile +++ graphics/imgv/Makefile @@ -23,7 +23,6 @@ USES= python:run shebangfix SHEBANG_FILES= imgv.py -python_OLD_CMD= /usr/bin/env python post-patch: @${REINPLACE_CMD} -e \ Index: graphics/inkscape/Makefile =================================================================== --- graphics/inkscape/Makefile +++ graphics/inkscape/Makefile @@ -30,7 +30,6 @@ LDFLAGS+= -L${LOCALBASE}/lib CONFIGURE_ARGS= --without-gnome-vfs -python_OLD_CMD?=/usr/bin/env python python_CMD?= ${LOCALBASE}/bin/python2 SHEBANG_FILES= cxxtest/cxxtestgen.pl share/extensions/*.p[lm] \ share/extensions/*.py share/extensions/genpofiles.sh Index: graphics/py-cairo/Makefile =================================================================== --- graphics/py-cairo/Makefile +++ graphics/py-cairo/Makefile @@ -20,9 +20,7 @@ CONFIGURE_ENV= PYTHON=${LOCALBASE}/bin/${PYTHON_CMD} \ PREFIX=${PREFIX} -python_OLD_CMD?= /usr/bin/env python -python_CMD?= ${LOCALBASE}/bin/python2 -SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py +SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py post-install: @cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \ Index: graphics/py-gdal/Makefile =================================================================== --- graphics/py-gdal/Makefile +++ graphics/py-gdal/Makefile @@ -26,7 +26,6 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/swig/python SHEBANG_FILES= scripts/*.py -python_OLD_CMD= /usr/bin/env python NUMPY_BUILD_DEPENDS= ${PKGNAMEPREFIX}numpy>=1.0.0:${PORTSDIR}/math/py-numpy NUMPY_RUN_DEPENDS= ${PKGNAMEPREFIX}numpy>=1.0.0:${PORTSDIR}/math/py-numpy Index: graphics/py3-cairo/Makefile =================================================================== --- graphics/py3-cairo/Makefile +++ graphics/py3-cairo/Makefile @@ -18,9 +18,7 @@ CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -python_OLD_CMD?= /usr/bin/env python -python_CMD?= ${LOCALBASE}/bin/python${PYTHON_VER} -SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py +SHEBANG_FILES= examples/*.py examples/*/*.py test/*.py PLIST_SUB+= PYTVER=${PYTHON_VER:S/.//} Index: japanese/kcode/Makefile =================================================================== --- japanese/kcode/Makefile +++ japanese/kcode/Makefile @@ -15,7 +15,6 @@ NO_WRKSUBDIR= yes NO_BUILD= yes SHEBANG_FILES= kcode -perl_OLD_CMD= /usr/bin/env perl PLIST_FILES= bin/kcode man/ja/man1/kcode.1.gz Index: lang/cjs/Makefile =================================================================== --- lang/cjs/Makefile +++ lang/cjs/Makefile @@ -29,6 +29,5 @@ INSTALL_TARGET= install-strip CONFIGURE_ARGS+=--enable-compile-warnings=no -python_OLD_CMD= /usr/bin/env python .include Index: lang/go/Makefile =================================================================== --- lang/go/Makefile +++ lang/go/Makefile @@ -21,7 +21,7 @@ ${WRKSRC}/doc/articles/wiki/*.bash \ ${WRKSRC}/test/bench/shootout/timing.sh -sh_OLD_CMD= ${SETENV} bash +sh_OLD_CMD= "/usr/bin/env bash" sh_CMD= ${SH} WRKSRC= ${WRKDIR}/go Index: lang/go14/Makefile =================================================================== --- lang/go14/Makefile +++ lang/go14/Makefile @@ -18,7 +18,7 @@ ${WRKSRC}/doc/articles/wiki/*.bash \ ${WRKSRC}/test/bench/shootout/timing.sh -sh_OLD_CMD= ${SETENV} bash +sh_OLD_CMD= "/usr/bin/env bash" sh_CMD= ${SH} WRKSRC= ${WRKDIR}/go Index: lang/python-tools/Makefile =================================================================== --- lang/python-tools/Makefile +++ lang/python-tools/Makefile @@ -38,10 +38,6 @@ .if ${PYTHON_REL} < 3200 SCRIPT_FILES+= logmerge -python_OLD_CMD= /usr/bin/env python -.else -# Python 3+ uses python3 as shebang line, python2 just python -python_OLD_CMD= /usr/bin/env python3 .endif .if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} Index: lang/v8/Makefile =================================================================== --- lang/v8/Makefile +++ lang/v8/Makefile @@ -27,7 +27,6 @@ CPE_VENDOR= google SHEBANG_FILES= build/gyp/gyp -python_OLD_CMD= /usr/bin/env python .include Index: mail/bsfilter/Makefile =================================================================== --- mail/bsfilter/Makefile +++ mail/bsfilter/Makefile @@ -18,7 +18,6 @@ USE_RUBY= yes USES= shebangfix tar:tgz SHEBANG_FILES= bsfilter/bsfilter -ruby_OLD_CMD= /usr/bin/env ruby OPTIONS_DEFINE= EXAMPLES MECAB Index: mail/fetchmail/Makefile =================================================================== --- mail/fetchmail/Makefile +++ mail/fetchmail/Makefile @@ -22,7 +22,6 @@ USES= cpe gmake shebangfix tar:xz SHEBANG_FILES= fetchmailconf.py -python_OLD_CMD= /usr/bin/env python USE_RC_SUBR= fetchmail SUB_FILES= pkg-message pkg-install pkg-deinstall Index: mail/postfix-policyd-weight/Makefile =================================================================== --- mail/postfix-policyd-weight/Makefile +++ mail/postfix-policyd-weight/Makefile @@ -33,9 +33,6 @@ NO_BUILD= yes NO_ARCH= yes -SHEBANG_LANG= perl -perl_OLD_CMD= ${SETENV} perl -perl_CMD= ${PERL} SHEBANG_FILES= ${WRKSRC}/policyd-weight do-install: Index: mail/tumgreyspf/Makefile =================================================================== --- mail/tumgreyspf/Makefile +++ mail/tumgreyspf/Makefile @@ -31,7 +31,6 @@ TUMGREYSPF_USER=${TUMGREYSPF_USER} SHEBANG_FILES= * -python_OLD_CMD= /usr/bin/env python TUMGREYSPF_DIR?= /var/db/${PORTNAME} TUMGREYSPF_USER?= nobody Index: math/mosesdecoder/Makefile =================================================================== --- math/mosesdecoder/Makefile +++ math/mosesdecoder/Makefile @@ -31,7 +31,7 @@ post-patch: @${FIND} ${WRKSRC}/scripts \( -name "*.pl" -o -name "*.perl" -o -name "*.cgi" \) -exec \ - ${REINPLACE_CMD} -i '' -e '1s|${perl_OLD_CMD}|${perl_CMD}|' {} \; + ${REINPLACE_CMD} -i '' -e '1s|/usr/bin/perl|${perl_CMD}|' {} \; do-build: cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} bjam --with-boost=${LOCALBASE} --with-irstlm=${LOCALBASE} --with-randlm=${LOCALBASE} --without-tcmalloc --notrace --toolset=${CHOSEN_COMPILER_TYPE} debug-symbols=off ${_MAKE_JOBS} Index: misc/gimp-help-en/Makefile =================================================================== --- misc/gimp-help-en/Makefile +++ misc/gimp-help-en/Makefile @@ -34,7 +34,6 @@ DATADIR= ${PREFIX}/share/gimp SHEBANG_FILES= tools/xml2po.py -python_OLD_CMD= /usr/bin/env python post-patch: # Install to the same directory as when configuring --with-gimp Index: multimedia/lives/Makefile =================================================================== --- multimedia/lives/Makefile +++ multimedia/lives/Makefile @@ -79,7 +79,7 @@ NLS_CONFIGURE_OFF= --disable-nls post-patch: - @${REINPLACE_CMD} -e 's|${perl_OLD_CMD}|${perl_CMD}|' \ + @${REINPLACE_CMD} -e 's|/usr/bin/perl|${perl_CMD}|' \ ${WRKSRC}/build-lives-rfx-plugin @${REINPLACE_CMD} -e 's| install-docDATA||g; s|-$$(VERSION)||g' \ ${WRKSRC}/Makefile.in Index: multimedia/pymp/Makefile =================================================================== --- multimedia/pymp/Makefile +++ multimedia/pymp/Makefile @@ -20,7 +20,6 @@ USES= shebangfix python tar:bzip2 SHEBANG_FILES= *.py -python_OLD_CMD= /usr/bin/env python USE_GNOME= pygtk2 PORTDOCS= CHANGELOG README.md Index: net-im/prosody/Makefile =================================================================== --- net-im/prosody/Makefile +++ net-im/prosody/Makefile @@ -34,7 +34,7 @@ USES= cpe gmake lua:51 shebangfix SHEBANG_LANG= lua SHEBANG_FILES= prosody prosodyctl -lua_OLD_CMD= ${SETENV} lua +lua_OLD_CMD= "/usr/bin/env lua" .if ${PORT_OPTIONS:MLUAJIT} lua_CMD= ${LOCALBASE}/bin/luajit .else Index: net/cloud-init/Makefile =================================================================== --- net/cloud-init/Makefile +++ net/cloud-init/Makefile @@ -33,7 +33,6 @@ USES= python:2.7 shebangfix SHEBANG_FILES= tools/validate-yaml.py tools/read-dependencies \ tools/read-version tools/hacking.py -python_OLD_CMD= /usr/bin/env python USE_PYTHON= autoplist distutils PYDISTUTILS_INSTALLARGS+= "--init-system=sysvinit_freebsd" Index: net/get_iplayer/Makefile =================================================================== --- net/get_iplayer/Makefile +++ net/get_iplayer/Makefile @@ -22,7 +22,6 @@ USES= perl5 shebangfix USE_PERL5= run -perl_OLD_CMD= ${SETENV} perl SHEBANG_FILES= ${PORTNAME} ${PORTNAME}.cgi NO_BUILD= yes NO_ARCH= yes Index: net/polyorb/Makefile =================================================================== --- net/polyorb/Makefile +++ net/polyorb/Makefile @@ -32,8 +32,6 @@ txt/polyorb_ug.txt SHEBANG_FILES= compilers/idlac/*.py testsuite/*.py testsuite/tests/*.py -python_OLD_CMD= /usr/bin/env python - CONFIGURE_ARGS= --with-appli-perso="corba dsa moma" \ --with-proto-perso="giop soap srp" \ --with-corba-services="event ir naming notification time" Index: net/py-pynmsg/Makefile =================================================================== --- net/py-pynmsg/Makefile +++ net/py-pynmsg/Makefile @@ -18,7 +18,6 @@ USE_PYTHON= distutils autoplist USES= python shebangfix uniquefiles:dirs -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= examples/*.py PORTEXAMPLES= * Index: net/py-pysphere/Makefile =================================================================== --- net/py-pysphere/Makefile +++ net/py-pysphere/Makefile @@ -17,7 +17,6 @@ USE_PYTHON= distutils autoplist SHEBANG_LANG= python -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= *.py \ pysphere/ZSI/*.py \ pysphere/ZSI/generate/*.py \ Index: net/samba4/Makefile =================================================================== --- net/samba4/Makefile +++ net/samba4/Makefile @@ -405,7 +405,6 @@ SUB_FILES= pkg-message README.FreeBSD # Make sure that the right version of Python is used by the tools # https://bugzilla.samba.org/show_bug.cgi?id=7305 -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= ${PATCH_WRKSRC}/source4/scripting/bin/* # No fancy color error messages .if ${COMPILER_TYPE} == "clang" Index: net/samba41/Makefile =================================================================== --- net/samba41/Makefile +++ net/samba41/Makefile @@ -400,7 +400,6 @@ SUB_FILES= pkg-message README.FreeBSD # Make sure that the right version of Python is used by the tools # https://bugzilla.samba.org/show_bug.cgi?id=7305 -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= ${PATCH_WRKSRC}/source4/scripting/bin/* # No fancy color error messages .if ${COMPILER_TYPE} == "clang" Index: net/samba42/Makefile =================================================================== --- net/samba42/Makefile +++ net/samba42/Makefile @@ -403,7 +403,6 @@ SUB_FILES= pkg-message README.FreeBSD # Make sure that the right version of Python is used by the tools # https://bugzilla.samba.org/show_bug.cgi?id=7305 -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= ${PATCH_WRKSRC}/source4/scripting/bin/* # No fancy color error messages .if ${COMPILER_TYPE} == "clang" Index: news/nzbget/Makefile =================================================================== --- news/nzbget/Makefile +++ news/nzbget/Makefile @@ -25,7 +25,6 @@ BINMODE= 0755 SHEBANG_FILES= scripts/*.py -python_OLD_CMD= /usr/bin/env python OPTIONS_DEFINE= 7Z PYTHON RAR DOCS OPTIONS_SINGLE= TLSLIB Index: news/xpn/Makefile =================================================================== --- news/xpn/Makefile +++ news/xpn/Makefile @@ -18,7 +18,6 @@ NO_BUILD= yes # we want a versioned python command -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= ${XPN} SUB_FILES= ${PORTNAME} Index: print/texlive-texmf/Makefile =================================================================== --- print/texlive-texmf/Makefile +++ print/texlive-texmf/Makefile @@ -273,11 +273,11 @@ ${TOUCH} ${STAGEDIR}${PREFIX}/${TEXMFDISTDIR}/source/.keep_me post-install: - @${REINPLACE_CMD} -i '' -e '1s|${bash_OLD_CMD}|${bash_CMD}|' \ + @${REINPLACE_CMD} -i '' -e '1s|/bin/bash|${bash_CMD}|' \ ${STAGEDIR}${PREFIX}/share/texmf-dist/scripts/logicpuzzle/createlpsudoku \ ${STAGEDIR}${PREFIX}/share/texmf-dist/scripts/logicpuzzle/lpsmag \ ${STAGEDIR}${PREFIX}/share/texmf-dist/scripts/shipunov/biokey2html.sh - @${REINPLACE_CMD} -i '' -e '1s|${perl_OLD_CMD}|${perl_CMD}|' \ + @${REINPLACE_CMD} -i '' -e '1s|/usr/bin/perl|${perl_CMD}|' \ ${STAGEDIR}${PREFIX}/share/texmf-dist/scripts/mycv/mycv_split_contents.pl .include Index: security/cops/Makefile =================================================================== --- security/cops/Makefile +++ security/cops/Makefile @@ -28,7 +28,7 @@ crc.c crc_check.c post-patch: - @${REINPLACE_CMD} -i '' -e 's|${perl_OLD_CMD}|${perl_CMD}|' \ + @${REINPLACE_CMD} -i '' -e 's|/usr/bin/perl|${perl_CMD}|' \ ${WRKSRC}/perl/cops pre-build: Index: sysutils/racktables/Makefile =================================================================== --- sysutils/racktables/Makefile +++ sysutils/racktables/Makefile @@ -20,7 +20,6 @@ USES= shebangfix SHEBANG_FILES= gateways/* -python_OLD_CMD= ${SETENV} python python_CMD= ${LOCALBASE}/bin/python2.7 WANT_PHP_WEB= yes Index: sysutils/sd-agent/Makefile =================================================================== --- sysutils/sd-agent/Makefile +++ sysutils/sd-agent/Makefile @@ -19,7 +19,6 @@ USES= python shebangfix SHEBANG_FILES= agent.py -python_OLD_CMD= /usr/bin/env python USE_RC_SUBR= $(PORTNAME) SUB_LIST+= RCNAME=$(PORTNAME:S/-/_/g) Index: sysutils/tdir/Makefile =================================================================== --- sysutils/tdir/Makefile +++ sysutils/tdir/Makefile @@ -12,7 +12,7 @@ USES= python shebangfix SHEBANG_FILES= tdir -python_OLD_CMD= /usr//bin/env python +python_OLD_CMD= "/usr//bin/env python" MAKE_ARGS= PREFIX=${STAGEDIR}${PREFIX} Index: sysutils/zfs-stats/Makefile =================================================================== --- sysutils/zfs-stats/Makefile +++ sysutils/zfs-stats/Makefile @@ -18,7 +18,7 @@ NO_BUILD= yes SHEBANG_FILES= zfs-* -perl_OLD_CMD= /usr/bin/env -iS perl +perl_OLD_CMD= "/usr/bin/env -iS perl" PLIST_FILES= bin/zfs-stats \ bin/zfs-mon Index: textproc/asciidoc/Makefile =================================================================== --- textproc/asciidoc/Makefile +++ textproc/asciidoc/Makefile @@ -34,7 +34,6 @@ filters/graphviz/graphviz2png.py \ filters/music/music2png.py \ filters/code/code-filter.py -python_OLD_CMD= /usr/bin/env python post-patch: @${REINPLACE_CMD} -e '/^INSTALL_PROG/ s|INSTALL_PROGRAM|INSTALL_SCRIPT|; s|\.conf|&.sample|' ${WRKSRC}/Makefile.in Index: textproc/google-ctemplate/Makefile =================================================================== --- textproc/google-ctemplate/Makefile +++ textproc/google-ctemplate/Makefile @@ -22,7 +22,6 @@ USE_GITHUB= yes GH_ACCOUNT= OlafvdSpek GH_TAGNAME= 359a9f0 -python_OLD_CMD= /usr/bin/env python INSTALL_target= install-strip post-patch: Index: textproc/py2html/Makefile =================================================================== --- textproc/py2html/Makefile +++ textproc/py2html/Makefile @@ -13,7 +13,6 @@ USES= python:2 shebangfix USE_PYTHON= distutils autoplist -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= py2html .include Index: textproc/sigil/Makefile =================================================================== --- textproc/sigil/Makefile +++ textproc/sigil/Makefile @@ -30,7 +30,6 @@ EXTRACT_AFTER_ARGS=${EXCLUDE:S,^,--exclude src/,} DOS2UNIX_FILES= src/FlightCrew/CMakeLists.txt SHEBANG_FILES= src/Sigil/Resource_Files/plugin_launchers/python/*.py -python_OLD_CMD= /usr/bin/env python OPTIONS_DEFINE= DEBUG DEBUG_CFLAGS_OFF= -DNDEBUG # tidyLib Index: www/calendarserver/Makefile =================================================================== --- www/calendarserver/Makefile +++ www/calendarserver/Makefile @@ -41,7 +41,6 @@ SUB_FILES= pkg-message SUB_LIST+= USER=${USERS} -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= bin/calendarserver_* \ bin/icalendar_split \ Index: www/joomla25/Makefile =================================================================== --- www/joomla25/Makefile +++ www/joomla25/Makefile @@ -16,10 +16,10 @@ NO_BUILD= yes PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} -php_OLD_CMD= C:\\\xampp\\\php\\\.\\\php.exe -REINPLACE_ARGS= -i '' -e 's,${php_OLD_CMD},${LOCALBASE}/bin/php,g' -REINPLACE_FILES= tests/unit/phpunit.php tests/system/phpunit.php +USES= shebangfix +php_OLD_CMD= C:\\\xampp\\\php\\\.\\\php.exe +SHEBANG_FILES= tests/unit/phpunit.php tests/system/phpunit.php SUB_FILES= pkg-message @@ -28,10 +28,7 @@ USE_PHP= gd json mbstring mysql mysqli pcre pdf session simplexml xml zip zlib WANT_PHP_WEB= yes -WWWDIR= ${PREFIX}/www/${PORTNAME}${PORTVERSION:R:R} - -pre-patch: - @(cd ${WRKSRC} && ${REINPLACE_CMD} ${REINPLACE_FILES}) +WWWDIR= ${PREFIX}/www/${PORTNAME}${PORTVERSION:R:R} do-install: @${MKDIR} ${STAGEDIR}${WWWDIR} Index: www/joomla31/Makefile =================================================================== --- www/joomla31/Makefile +++ www/joomla31/Makefile @@ -16,11 +16,11 @@ NO_BUILD= yes PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP} -php_OLD_CMD= C:\\\xampp\\\php\\\.\\\php.exe -REINPLACE_ARGS= -i '' -E -e 's,(${php_OLD_CMD})|(/usr/bin/php),${LOCALBASE}/bin/php,g' -REINPLACE_FILES= build/indexmaker.php tests/system/phpunit.php \ - tests/system/webdriver/tests/phpunit.php +USES= shebangfix +php_OLD_CMD= C:\\\xampp\\\php\\\.\\\php.exe +SHEBANG_FILES= build/indexmaker.php tests/system/phpunit.php \ + tests/system/webdriver/tests/phpunit.php SUB_FILES= pkg-message @@ -29,10 +29,7 @@ USE_PHP= gd json mbstring mysql mysqli pcre pdf session simplexml xml zip zlib WANT_PHP_WEB= yes -WWWDIR= ${PREFIX}/www/${PORTNAME}${PORTVERSION:R:R} - -pre-patch: - @(cd ${WRKSRC} && ${REINPLACE_CMD} ${REINPLACE_FILES}) +WWWDIR= ${PREFIX}/www/${PORTNAME}${PORTVERSION:R:R} do-install: @${MKDIR} ${STAGEDIR}${WWWDIR} Index: www/libhpack/Makefile =================================================================== --- www/libhpack/Makefile +++ www/libhpack/Makefile @@ -21,7 +21,6 @@ USES= cmake pkgconfig python:2,build shebangfix tar:xz SHEBANG_FILES= gen-config.py libhpack/huffman-gen.py -python_OLD_CMD= /usr/bin/env python post-patch: @${REINPLACE_CMD} -e 's|STATIC|SHARED|' ${WRKSRC}/libchula/CMakeLists.txt ${WRKSRC}/libhpack/CMakeLists.txt Index: www/py-GinGin/Makefile =================================================================== --- www/py-GinGin/Makefile +++ www/py-GinGin/Makefile @@ -18,7 +18,7 @@ USES= python:2 shebangfix SHEBANG_FILES= GinGin/data/config.py.example -python_OLD_CMD= env python +python_OLD_CMD= "env python" USE_PYTHON= autoplist distutils .include Index: www/py-djblets/Makefile =================================================================== --- www/py-djblets/Makefile +++ www/py-djblets/Makefile @@ -25,7 +25,6 @@ USE_PYTHON= distutils PYDISTUTILS_PKGNAME= Djblets -python_OLD_CMD= /usr/bin/env python SHEBANG_FILES= contrib/internal/build-media.py .include Index: www/varnish4/Makefile =================================================================== --- www/varnish4/Makefile +++ www/varnish4/Makefile @@ -19,7 +19,6 @@ USES= autoreconf cpe gmake libtool pkgconfig python:2,build readline shebangfix SHEBANG_FILES= lib/libvcc/vmodtool.py -python_OLD_CMD= /usr/bin/env python CPE_VENDOR= varnish-cache CFLAGS+= -I${LOCALBASE}/include GNU_CONFIGURE= yes Index: x11-wm/ede/Makefile =================================================================== --- x11-wm/ede/Makefile +++ x11-wm/ede/Makefile @@ -26,7 +26,6 @@ USES= fam gettext iconv:translit pathfix pkgconfig python:2 \ shared-mime-info shebangfix SHEBANG_FILES= doc/asciidoc/asciidoc.py -python_OLD_CMD= /usr/bin/env python USE_XORG= xcomposite xft xinerama xkbfile xpm xrandr USE_CSTD= gnu89 GNU_CONFIGURE= yes Index: x11/eaglemode/Makefile =================================================================== --- x11/eaglemode/Makefile +++ x11/eaglemode/Makefile @@ -59,7 +59,7 @@ @${REINPLACE_CMD} -e 's|gcc|${CC}|; s|"-O2"|"${CFLAGS}"|' \ ${WRKSRC}/makers/unicc/plugins/unicc_gnu.pm @${FIND} ${WRKSRC} -name "*.pl" | ${XARGS} \ - ${REINPLACE_CMD} -e '1s|${perl_OLD_CMD}|${perl_CMD}|' + ${REINPLACE_CMD} -e '1s|/usr/bin/perl|${perl_CMD}|' post-patch-XINE-off: @${RM} -f ${WRKSRC}/makers/emAv.maker.pm Index: x11/scripts/Makefile =================================================================== --- x11/scripts/Makefile +++ x11/scripts/Makefile @@ -15,6 +15,6 @@ USES= shebangfix post-patch: - @${REINPLACE_CMD} -e 's|XCOMM!${ksh_OLD_CMD}|XCOMM!${ksh_CMD}|' ${WRKSRC}/xauth_switch_to_sun-des-1.cpp + @${REINPLACE_CMD} -e 's|XCOMM!/bin/ksh|XCOMM!${ksh_CMD}|' ${WRKSRC}/xauth_switch_to_sun-des-1.cpp .include Index: x11/wbarconf/Makefile =================================================================== --- x11/wbarconf/Makefile +++ x11/wbarconf/Makefile @@ -18,7 +18,7 @@ USES= gettext desktop-file-utils python shebangfix SHEBANG_LANG= python SHEBANG_FILES= ${WRKSRC}/wbarconf -python_OLD_CMD= /usr/bin/env python2 +python_OLD_CMD= "/usr/bin/env python2" NO_BUILD= yes WRKSRC= ${WRKDIR}/${PORTNAME} PORTDOCS= README COPYING