summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2015-10-19 14:50:52 +0000
committeramdmi3 <amdmi3@FreeBSD.org>2015-10-19 14:50:52 +0000
commitfb7285c9f7f53e80d3d4906842772c150e204247 (patch)
tree72fd93ae39b43490b34dc8479465e07b453d126e
parent9e79385be587d0f1151390db9e8b9f9a8e952684 (diff)
downloadFreeBSD-ports-fb7285c9f7f53e80d3d4906842772c150e204247.zip
FreeBSD-ports-fb7285c9f7f53e80d3d4906842772c150e204247.tar.gz
Improve shebangfix framework
- Support multiple values in *_OLD_CMD, i.e. we can now fix both "/usr/bin/python" and "/usr/bin/env python" at the same time - Default *_OLD_CMD values are now always appended, so you don't need to specify them in individual ports - Add lua support (depends on USES=lua) - Add more default values, such as "/usr/bin/env foo" for python, perl, bash, ruby and lua - Shebangfix now matches whole words, e.g. we will no longer (erroneously) replace "/usr/bin/perl5.005" with "${perl_CMD}5.005" (but "/usr/bin/perl -tt" is still (correctly) replaced with "${perl_CMD} -tt") Note that *_OLD_CMD items containing spaces must now be quoted (e.g. perl_OLD_CMD=/bin/perl /usr/bin/perl "/usr/bin/env perl") Update shebangfix usage according to new rules in many ports: - Remove *_OLD_CMD for patterns now replaced by default - Quote custom *_OLD_CMD which contain spaces Fix shebangfix usage in many ports (irrelevant to infrastructure change): - Remove redundant SHEBANG_LANG (no need to duplicate default langs) - Remove redundant *_CMD (such as python_CMD=${LOCALBASE}/bin/python${PYTHON_VER} when USES=python is present) - Never use *_OLD_CMD in REINPLACE_CMD matchers, these should always look for exact string Approved by: portmgr (bapt) Differential Revision: D3756
-rw-r--r--Mk/Uses/shebangfix.mk45
-rw-r--r--astro/weather/Makefile1
-rw-r--r--audio/lollypop/Makefile1
-rw-r--r--audio/mma/Makefile2
-rw-r--r--audio/pulseaudio/Makefile1
-rw-r--r--audio/py-tagpy/Makefile1
-rw-r--r--audio/ripit/Makefile1
-rw-r--r--audio/sphinx/Makefile2
-rw-r--r--chinese/pyzy/Makefile1
-rw-r--r--chinese/ydict/Makefile1
-rw-r--r--databases/luadbi/Makefile3
-rw-r--r--databases/nagios-check_mongodb/Makefile1
-rw-r--r--databases/pgtune/Makefile10
-rw-r--r--databases/postgresql_autodoc/Makefile1
-rw-r--r--databases/skytools/Makefile2
-rw-r--r--deskutils/tel/Makefile1
-rw-r--r--deskutils/tnote/Makefile2
-rw-r--r--deskutils/virt-manager/Makefile2
-rw-r--r--devel/cvs2svn/Makefile3
-rw-r--r--devel/doxygen/Makefile2
-rw-r--r--devel/libnxt/Makefile1
-rw-r--r--devel/lua-alien/Makefile3
-rw-r--r--devel/py-gflags/Makefile1
-rw-r--r--devel/py-ice/Makefile2
-rw-r--r--devel/py-ioflo/Makefile1
-rw-r--r--devel/py-pip/Makefile1
-rw-r--r--devel/py-pymtbl/Makefile1
-rw-r--r--devel/renpy/Makefile1
-rw-r--r--emulators/pipelight/Makefile1
-rw-r--r--games/childsplay/Makefile2
-rw-r--r--games/linux-enemyterritory-jaymod-21/Makefile2
-rw-r--r--games/linux-enemyterritory-jaymod/Makefile2
-rw-r--r--games/lostfeathers/Makefile1
-rw-r--r--games/oneisenough/Makefile1
-rw-r--r--games/schwarzweiss/Makefile1
-rw-r--r--games/starfighter/Makefile1
-rw-r--r--games/super_mario_bros_python/Makefile1
-rw-r--r--graphics/imgv/Makefile1
-rw-r--r--graphics/inkscape/Makefile1
-rw-r--r--graphics/py-cairo/Makefile4
-rw-r--r--graphics/py-gdal/Makefile1
-rw-r--r--graphics/py3-cairo/Makefile4
-rw-r--r--japanese/kcode/Makefile1
-rw-r--r--japanese/man/Makefile3
-rw-r--r--lang/cjs/Makefile1
-rw-r--r--lang/go/Makefile2
-rw-r--r--lang/go14/Makefile2
-rw-r--r--lang/python-tools/Makefile5
-rw-r--r--lang/v8/Makefile1
-rw-r--r--mail/bsfilter/Makefile1
-rw-r--r--mail/fetchmail/Makefile1
-rw-r--r--mail/postfix-current/Makefile1
-rw-r--r--mail/postfix-policyd-weight/Makefile3
-rw-r--r--mail/postfix-postfwd/Makefile1
-rw-r--r--mail/postfix/Makefile1
-rw-r--r--mail/tumgreyspf/Makefile1
-rw-r--r--math/mosesdecoder/Makefile2
-rw-r--r--misc/gimp-help-en/Makefile1
-rw-r--r--multimedia/lives/Makefile2
-rw-r--r--multimedia/pymp/Makefile1
-rw-r--r--net-im/prosody/Makefile2
-rw-r--r--net-mgmt/netams/Makefile1
-rw-r--r--net/cloud-init/Makefile1
-rw-r--r--net/get_iplayer/Makefile1
-rw-r--r--net/polyorb/Makefile2
-rw-r--r--net/py-pynmsg/Makefile1
-rw-r--r--net/py-pysphere/Makefile10
-rw-r--r--net/samba4/Makefile1
-rw-r--r--net/samba41/Makefile1
-rw-r--r--net/samba42/Makefile1
-rw-r--r--news/nzbget/Makefile1
-rw-r--r--news/xpn/Makefile3
-rw-r--r--print/texlive-texmf/Makefile4
-rw-r--r--security/cops/Makefile2
-rw-r--r--sysutils/racktables/Makefile7
-rw-r--r--sysutils/sd-agent/Makefile1
-rw-r--r--sysutils/tdir/Makefile2
-rw-r--r--sysutils/zfs-stats/Makefile2
-rw-r--r--textproc/asciidoc/Makefile1
-rw-r--r--textproc/google-ctemplate/Makefile1
-rw-r--r--textproc/py2html/Makefile1
-rw-r--r--textproc/sigil/Makefile1
-rw-r--r--www/calendarserver/Makefile1
-rw-r--r--www/joomla25/Makefile11
-rw-r--r--www/joomla31/Makefile13
-rw-r--r--www/libhpack/Makefile1
-rw-r--r--www/py-GinGin/Makefile2
-rw-r--r--www/py-djblets/Makefile1
-rw-r--r--www/varnish4/Makefile1
-rw-r--r--x11-wm/ede/Makefile1
-rw-r--r--x11/eaglemode/Makefile2
-rw-r--r--x11/scripts/Makefile2
-rw-r--r--x11/wbarconf/Makefile3
93 files changed, 70 insertions, 162 deletions
diff --git a/Mk/Uses/shebangfix.mk b/Mk/Uses/shebangfix.mk
index df3634b..cc68c7e 100644
--- a/Mk/Uses/shebangfix.mk
+++ b/Mk/Uses/shebangfix.mk
@@ -29,39 +29,56 @@
.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
+.if ${USES:Mlua*}
+lua_OLD_CMD+= /usr/bin/lua
+lua_OLD_CMD+= "/usr/bin/env lua"
+lua_CMD?= ${LOCALBASE}/bin/${LUA_CMD}
+.endif
+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
+.if ${USES:Mlua*}
+SHEBANG_LANG+= lua
+.endif
+
.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
diff --git a/astro/weather/Makefile b/astro/weather/Makefile
index 27d895e..3d5f79e 100644
--- a/astro/weather/Makefile
+++ b/astro/weather/Makefile
@@ -25,7 +25,6 @@ PLIST_FILES= bin/${PORTNAME} \
PORTDATA= airports places stations zctas zones
SHEBANG_FILES= ${PORTNAME}
-python_OLD_CMD= /usr/bin/env python
.include <bsd.port.pre.mk>
diff --git a/audio/lollypop/Makefile b/audio/lollypop/Makefile
index c68fe70..fa54e1a 100644
--- a/audio/lollypop/Makefile
+++ b/audio/lollypop/Makefile
@@ -27,7 +27,6 @@ USE_PYTHON= py3kplist
INSTALLS_ICONS= yes
SHEBANG_FILES= src/*.py
-SHEBANG_LANG= python
GLIB_SCHEMAS= org.gnome.Lollypop.gschema.xml
diff --git a/audio/mma/Makefile b/audio/mma/Makefile
index 2871aa7..a523659 100644
--- a/audio/mma/Makefile
+++ b/audio/mma/Makefile
@@ -31,8 +31,6 @@ USES= python shebangfix
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
post-patch:
diff --git a/audio/pulseaudio/Makefile b/audio/pulseaudio/Makefile
index fadd818..fbe843e 100644
--- a/audio/pulseaudio/Makefile
+++ b/audio/pulseaudio/Makefile
@@ -42,7 +42,6 @@ LDFLAGS+= -L${LOCALBASE}/lib
INSTALL_TARGET= install-strip
SHEBANG_FILES= shell-completion/bash/pulseaudio
-SHEBANG_LANG= bash
bash_CMD= ${SETENV} bash
SUB_FILES= pkg-message
diff --git a/audio/py-tagpy/Makefile b/audio/py-tagpy/Makefile
index 2988f8a..0d466ef 100644
--- a/audio/py-tagpy/Makefile
+++ b/audio/py-tagpy/Makefile
@@ -24,7 +24,6 @@ CONFIGURE_ARGS= --taglib-inc-dir="${LOCALBASE}/include/taglib" \
--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
diff --git a/audio/ripit/Makefile b/audio/ripit/Makefile
index b33f591..923d16e 100644
--- a/audio/ripit/Makefile
+++ b/audio/ripit/Makefile
@@ -24,7 +24,6 @@ USES= perl5 shebangfix tar:bzip2
NO_BUILD= yes
USE_PERL5= run
SHEBANG_FILES= ripit.pl
-perl_OLD_CMD= /usr/bin/env perl
OPTIONS_DEFINE= EXAMPLES
diff --git a/audio/sphinx/Makefile b/audio/sphinx/Makefile
index 4e1ba8b..4247c73 100644
--- a/audio/sphinx/Makefile
+++ b/audio/sphinx/Makefile
@@ -16,7 +16,7 @@ USE_LDCONFIG= yes
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
diff --git a/chinese/pyzy/Makefile b/chinese/pyzy/Makefile
index 5a309a1..bfb5a72 100644
--- a/chinese/pyzy/Makefile
+++ b/chinese/pyzy/Makefile
@@ -18,7 +18,6 @@ LIB_DEPENDS= libsqlite3.so:${PORTSDIR}/databases/sqlite3
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
diff --git a/chinese/ydict/Makefile b/chinese/ydict/Makefile
index 60b18d2..1561d24 100644
--- a/chinese/ydict/Makefile
+++ b/chinese/ydict/Makefile
@@ -18,7 +18,6 @@ NO_WRKSUBDIR= yes
PLIST_FILES= bin/ydict
SHEBANG_FILES= ${WRKSRC}/ydict
-python_OLD_CMD= /usr/bin/env python
python_CMD= /usr/bin/env python2
do-install:
diff --git a/databases/luadbi/Makefile b/databases/luadbi/Makefile
index 1d6e788..e6ff452 100644
--- a/databases/luadbi/Makefile
+++ b/databases/luadbi/Makefile
@@ -17,9 +17,6 @@ NO_WRKSUBDIR= yes
USES= gmake lua:51 shebangfix
SHEBANG_FILES= DBI.lua
-SHEBANG_LANG= lua
-lua_OLD_CMD= /usr/bin/lua
-lua_CMD= ${LOCALBASE}/bin/${LUA_CMD}
CFLAGS+= -fpic -I${LOCALBASE}/include -I${LUA_INCDIR} -I. \
-I${LOCALBASE}/include/postgresql/server
diff --git a/databases/nagios-check_mongodb/Makefile b/databases/nagios-check_mongodb/Makefile
index 74c42e0..5a0bb6b 100644
--- a/databases/nagios-check_mongodb/Makefile
+++ b/databases/nagios-check_mongodb/Makefile
@@ -17,7 +17,6 @@ GH_PROJECT= nagios-plugin-mongodb
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
diff --git a/databases/pgtune/Makefile b/databases/pgtune/Makefile
index 8d978fa..1884eb9 100644
--- a/databases/pgtune/Makefile
+++ b/databases/pgtune/Makefile
@@ -12,17 +12,11 @@ MAINTAINER= gjb@FreeBSD.org
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
diff --git a/databases/postgresql_autodoc/Makefile b/databases/postgresql_autodoc/Makefile
index c3130d1..9cff9b7 100644
--- a/databases/postgresql_autodoc/Makefile
+++ b/databases/postgresql_autodoc/Makefile
@@ -15,7 +15,6 @@ RUN_DEPENDS= p5-HTML-Template>=0:${PORTSDIR}/www/p5-HTML-Template \
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}
diff --git a/databases/skytools/Makefile b/databases/skytools/Makefile
index 29b8c08..7c16c09 100644
--- a/databases/skytools/Makefile
+++ b/databases/skytools/Makefile
@@ -12,8 +12,6 @@ COMMENT= PostgreSQL tools from Skype: walshipping, queueing, replication
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 \
diff --git a/deskutils/tel/Makefile b/deskutils/tel/Makefile
index 8526320..209d0f6 100644
--- a/deskutils/tel/Makefile
+++ b/deskutils/tel/Makefile
@@ -16,7 +16,6 @@ NO_ARCH= yes
USES= gettext python shebangfix tar:bzip2
SHEBANG_FILES= src/tel.py
-python_OLD_CMD= /usr/bin/env python
USE_PYTHON= distutils
post-patch:
diff --git a/deskutils/tnote/Makefile b/deskutils/tnote/Makefile
index d648477..b79f605 100644
--- a/deskutils/tnote/Makefile
+++ b/deskutils/tnote/Makefile
@@ -16,8 +16,6 @@ USES= python:2 shebangfix
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= *
diff --git a/deskutils/virt-manager/Makefile b/deskutils/virt-manager/Makefile
index 25c1e63..db9205c 100644
--- a/deskutils/virt-manager/Makefile
+++ b/deskutils/virt-manager/Makefile
@@ -35,7 +35,7 @@ USE_GNOME= introspection:run intltool librsvg2 pygobject3
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 \
diff --git a/devel/cvs2svn/Makefile b/devel/cvs2svn/Makefile
index 55c6b7f..18cf604 100644
--- a/devel/cvs2svn/Makefile
+++ b/devel/cvs2svn/Makefile
@@ -23,9 +23,6 @@ PATCHREV= 5433
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_FILES= cvs2svn cvs2git cvs2bzr *.py \
contrib/* cvs2svn_lib/*.py \
svntest/* cvs2svn_rcsparse/*.py
diff --git a/devel/doxygen/Makefile b/devel/doxygen/Makefile
index 08872f2..7bbf0f3 100644
--- a/devel/doxygen/Makefile
+++ b/devel/doxygen/Makefile
@@ -60,7 +60,7 @@ CMAKE_ARGS+= -DFLEX_EXECUTABLE=${LOCALBASE}/bin/flex
.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 <bsd.port.post.mk>
diff --git a/devel/libnxt/Makefile b/devel/libnxt/Makefile
index de5c25f..72015a6 100644
--- a/devel/libnxt/Makefile
+++ b/devel/libnxt/Makefile
@@ -15,7 +15,6 @@ BUILD_DEPENDS= scons:${PORTSDIR}/devel/scons
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:
diff --git a/devel/lua-alien/Makefile b/devel/lua-alien/Makefile
index 19b1a46..dd077ffc 100644
--- a/devel/lua-alien/Makefile
+++ b/devel/lua-alien/Makefile
@@ -21,9 +21,6 @@ GH_ACCOUNT= mascarenhas
USES= libtool lua shebangfix zip
SHEBANG_FILES= src/constants
-SHEBANG_LANG= lua
-lua_OLD_CMD= /usr/bin/env lua
-lua_CMD= ${LOCALBASE}/bin/${LUA_CMD}
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-silent-rules \
--libdir=${LUA_MODLIBDIR} \
diff --git a/devel/py-gflags/Makefile b/devel/py-gflags/Makefile
index 310564e..d13f77d 100644
--- a/devel/py-gflags/Makefile
+++ b/devel/py-gflags/Makefile
@@ -18,7 +18,6 @@ USES= python:2 shebangfix
USE_PYTHON= autoplist distutils
SHEBANG_FILES= gflags2man.py
-python_OLD_CMD= /usr/bin/env python
PROJECTHOST= python-gflags
diff --git a/devel/py-ice/Makefile b/devel/py-ice/Makefile
index 83a816c..28a8238 100644
--- a/devel/py-ice/Makefile
+++ b/devel/py-ice/Makefile
@@ -20,8 +20,6 @@ PLIST= ${.CURDIR}/pkg-plist
BUILD_WRKSRC= ${WRKSRC}/python
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}
diff --git a/devel/py-ioflo/Makefile b/devel/py-ioflo/Makefile
index c8dbd1d..892386a 100644
--- a/devel/py-ioflo/Makefile
+++ b/devel/py-ioflo/Makefile
@@ -17,6 +17,5 @@ USE_PYTHON= distutils
NO_ARCH= yes
SHEBANG_FILES= scripts/ioflo
-python_OLD_CMD= /usr/bin/env python
.include <bsd.port.mk>
diff --git a/devel/py-pip/Makefile b/devel/py-pip/Makefile
index f121c3e..05e5832 100644
--- a/devel/py-pip/Makefile
+++ b/devel/py-pip/Makefile
@@ -34,7 +34,6 @@ USE_GITHUB= yes
USE_PYTHON= autoplist concurrent distutils
SHEBANG_FILES= pip/__init__.py
-python_OLD_CMD= /usr/bin/env python
GH_ACCOUNT= pypa
diff --git a/devel/py-pymtbl/Makefile b/devel/py-pymtbl/Makefile
index 34c4ca7..349d0fd 100644
--- a/devel/py-pymtbl/Makefile
+++ b/devel/py-pymtbl/Makefile
@@ -17,7 +17,6 @@ LIB_DEPENDS= libmtbl.so:${PORTSDIR}/devel/mtbl
USE_PYTHON= autoplist distutils
USES= pkgconfig python shebangfix uniquefiles:dirs
-python_OLD_CMD= /usr/bin/env python
SHEBANG_FILES= examples/*.py examples/*/*.py
PORTEXAMPLES= *
diff --git a/devel/renpy/Makefile b/devel/renpy/Makefile
index 7e6ad85..ac46aeb 100644
--- a/devel/renpy/Makefile
+++ b/devel/renpy/Makefile
@@ -33,7 +33,6 @@ USE_SDL= sdl2
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}"
diff --git a/emulators/pipelight/Makefile b/emulators/pipelight/Makefile
index a7bcc11..0d7b352 100644
--- a/emulators/pipelight/Makefile
+++ b/emulators/pipelight/Makefile
@@ -40,7 +40,6 @@ CONFIGURE_ARGS+=--verbose --wine-path=${LOCALBASE}/bin/wine --win32-prebuilt \
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
diff --git a/games/childsplay/Makefile b/games/childsplay/Makefile
index a54caba..3e7dcee 100644
--- a/games/childsplay/Makefile
+++ b/games/childsplay/Makefile
@@ -21,8 +21,6 @@ NO_BUILD= yes
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
diff --git a/games/linux-enemyterritory-jaymod-21/Makefile b/games/linux-enemyterritory-jaymod-21/Makefile
index 7ea6ffe..3ed2139 100644
--- a/games/linux-enemyterritory-jaymod-21/Makefile
+++ b/games/linux-enemyterritory-jaymod-21/Makefile
@@ -22,7 +22,7 @@ PLIST_SUB= VERSTR="${VERSTR}"
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
diff --git a/games/linux-enemyterritory-jaymod/Makefile b/games/linux-enemyterritory-jaymod/Makefile
index 31c9341..59e5640 100644
--- a/games/linux-enemyterritory-jaymod/Makefile
+++ b/games/linux-enemyterritory-jaymod/Makefile
@@ -16,7 +16,7 @@ RUN_DEPENDS= et:${PORTSDIR}/games/linux-enemyterritory
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
diff --git a/games/lostfeathers/Makefile b/games/lostfeathers/Makefile
index 75af257..7fbc767 100644
--- a/games/lostfeathers/Makefile
+++ b/games/lostfeathers/Makefile
@@ -20,7 +20,6 @@ RUN_DEPENDS= avbin>=0:${PORTSDIR}/multimedia/avbin
USES= python shebangfix zip
SHEBANG_FILES= run_game.py
-python_OLD_CMD= /usr/bin/env python
USE_GNOME= pygtk2 librsvg2
PORTDOCS= README.txt
diff --git a/games/oneisenough/Makefile b/games/oneisenough/Makefile
index 5f33ae6..6f04452 100644
--- a/games/oneisenough/Makefile
+++ b/games/oneisenough/Makefile
@@ -24,7 +24,6 @@ USES= dos2unix python:2 shebangfix zip
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
diff --git a/games/schwarzweiss/Makefile b/games/schwarzweiss/Makefile
index a34e3f1..2490021 100644
--- a/games/schwarzweiss/Makefile
+++ b/games/schwarzweiss/Makefile
@@ -25,7 +25,6 @@ GH_TAGNAME= d95263f
USES= python:2 shebangfix
SHEBANG_FILES= schwarzweiss_start.py data/*.py
-python_OLD_CMD= /usr/bin/env python
PORTDOCS= readme.txt
OPTIONS_DEFINE= DOCS
diff --git a/games/starfighter/Makefile b/games/starfighter/Makefile
index b3fc1c0..d8efbf4 100644
--- a/games/starfighter/Makefile
+++ b/games/starfighter/Makefile
@@ -24,7 +24,6 @@ WITH_ZLIB= yes
MAKEFILE= makefile
SHEBANG_FILES= pack.py unpack.py
-python_OLD_CMD= /usr/bin/env python
INSTALLS_ICONS= yes
diff --git a/games/super_mario_bros_python/Makefile b/games/super_mario_bros_python/Makefile
index 250f205..d2e1496 100644
--- a/games/super_mario_bros_python/Makefile
+++ b/games/super_mario_bros_python/Makefile
@@ -24,7 +24,6 @@ WRKSRC= ${WRKDIR}/Super-Mario-Bros-Python-v${DISTVERSION}release
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
diff --git a/graphics/imgv/Makefile b/graphics/imgv/Makefile
index d2bc2a6..f4ef715 100644
--- a/graphics/imgv/Makefile
+++ b/graphics/imgv/Makefile
@@ -23,7 +23,6 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USES= python:run shebangfix
SHEBANG_FILES= imgv.py
-python_OLD_CMD= /usr/bin/env python
post-patch:
@${REINPLACE_CMD} -e \
diff --git a/graphics/inkscape/Makefile b/graphics/inkscape/Makefile
index deb9629..f312612 100644
--- a/graphics/inkscape/Makefile
+++ b/graphics/inkscape/Makefile
@@ -30,7 +30,6 @@ CPPFLAGS+= -I${LOCALBASE}/include
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
diff --git a/graphics/py-cairo/Makefile b/graphics/py-cairo/Makefile
index 73f3c8e..ddcb501 100644
--- a/graphics/py-cairo/Makefile
+++ b/graphics/py-cairo/Makefile
@@ -20,9 +20,7 @@ LDFLAGS+= -L${LOCALBASE}/lib
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 \
diff --git a/graphics/py-gdal/Makefile b/graphics/py-gdal/Makefile
index 64e7687..8a1c55bc 100644
--- a/graphics/py-gdal/Makefile
+++ b/graphics/py-gdal/Makefile
@@ -26,7 +26,6 @@ USES= python shebangfix tar:xz
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
diff --git a/graphics/py3-cairo/Makefile b/graphics/py3-cairo/Makefile
index 28c1e83..34c4b3e 100644
--- a/graphics/py3-cairo/Makefile
+++ b/graphics/py3-cairo/Makefile
@@ -18,9 +18,7 @@ USE_GNOME= cairo
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/.//}
diff --git a/japanese/kcode/Makefile b/japanese/kcode/Makefile
index a9c13ee..4aecb42 100644
--- a/japanese/kcode/Makefile
+++ b/japanese/kcode/Makefile
@@ -15,7 +15,6 @@ USE_PERL5= extract run
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
diff --git a/japanese/man/Makefile b/japanese/man/Makefile
index 6506d1b..16e208e 100644
--- a/japanese/man/Makefile
+++ b/japanese/man/Makefile
@@ -22,9 +22,8 @@ RUN_DEPENDS= ${LOCALBASE}/bin/groff:${PORTSDIR}/japanese/groff \
jless:${PORTSDIR}/japanese/less
MAKE_ENV= GZCAT=${GZCAT} GZIP_CMD="${GZIP_CMD}"
-USES+= shebangfix
+USES= shebangfix
SHEBANG_FILES= catman/catman.perl makewhatis/makewhatis.perl
-SHEBANG_LANG= perl
post-patch:
.for file in apropos/apropos.sh catman/catman.perl \
diff --git a/lang/cjs/Makefile b/lang/cjs/Makefile
index 122cb5a..136471f 100644
--- a/lang/cjs/Makefile
+++ b/lang/cjs/Makefile
@@ -29,6 +29,5 @@ LDFLAGS+= -L${LOCALBASE}/lib
INSTALL_TARGET= install-strip
CONFIGURE_ARGS+=--enable-compile-warnings=no
-python_OLD_CMD= /usr/bin/env python
.include <bsd.port.mk>
diff --git a/lang/go/Makefile b/lang/go/Makefile
index 56a3430..4d951cc 100644
--- a/lang/go/Makefile
+++ b/lang/go/Makefile
@@ -21,7 +21,7 @@ SHEBANG_FILES= ${WRKSRC}/src/*.bash \
${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
diff --git a/lang/go14/Makefile b/lang/go14/Makefile
index 6508b9f..9017782 100644
--- a/lang/go14/Makefile
+++ b/lang/go14/Makefile
@@ -18,7 +18,7 @@ SHEBANG_FILES= ${WRKSRC}/src/*.bash \
${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
diff --git a/lang/python-tools/Makefile b/lang/python-tools/Makefile
index 7949030..027af28 100644
--- a/lang/python-tools/Makefile
+++ b/lang/python-tools/Makefile
@@ -26,7 +26,6 @@ SCRIPT_FILES= byteyears checkpyc copytime crlf dutree \
PYLIB_FILES= tabnanny timeit
PLIST_FILES= ${SCRIPT_FILES:C/^.*/bin\/&/g} ${PYLIB_FILES:C/^.*/bin\/&/g}
-SHEBANG_LANG= python
SHEBANG_FILES= ${SCRIPT_FILES:C/^.*/&\.py/g} \
../../Lib/tabnanny.py ../../Lib/timeit.py
@@ -38,10 +37,6 @@ UNIQUE_SUFFIX_FILES= ${SCRIPT_FILES:C/^.*/bin\/&/g} \
.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}
diff --git a/lang/v8/Makefile b/lang/v8/Makefile
index 7362c21..f5c782d 100644
--- a/lang/v8/Makefile
+++ b/lang/v8/Makefile
@@ -27,7 +27,6 @@ USES= alias compiler cpe execinfo gmake python:2 shebangfix tar:xz
CPE_VENDOR= google
SHEBANG_FILES= build/gyp/gyp
-python_OLD_CMD= /usr/bin/env python
.include <bsd.port.pre.mk>
diff --git a/mail/bsfilter/Makefile b/mail/bsfilter/Makefile
index 387c657..bc8b9e7 100644
--- a/mail/bsfilter/Makefile
+++ b/mail/bsfilter/Makefile
@@ -18,7 +18,6 @@ NO_BUILD= yes
USE_RUBY= yes
USES= shebangfix tar:tgz
SHEBANG_FILES= bsfilter/bsfilter
-ruby_OLD_CMD= /usr/bin/env ruby
OPTIONS_DEFINE= EXAMPLES MECAB
diff --git a/mail/fetchmail/Makefile b/mail/fetchmail/Makefile
index fa2b025..de6e2c8 100644
--- a/mail/fetchmail/Makefile
+++ b/mail/fetchmail/Makefile
@@ -22,7 +22,6 @@ GROUPS= ${USERS}
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
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
index 035ccc0..2702135 100644
--- a/mail/postfix-current/Makefile
+++ b/mail/postfix-current/Makefile
@@ -33,7 +33,6 @@ CONFLICTS_INSTALL?= courier-0.* opensmtpd-[0-9]* \
USERS= postfix
GROUPS= mail maildrop postfix
USES= perl5 shebangfix cpe
-SHEBANG_LANG= perl
SHEBANG_FILES= auxiliary/qshape/qshape.pl
USE_RC_SUBR= postfix
diff --git a/mail/postfix-policyd-weight/Makefile b/mail/postfix-policyd-weight/Makefile
index 549d5c0..256d48d 100644
--- a/mail/postfix-policyd-weight/Makefile
+++ b/mail/postfix-policyd-weight/Makefile
@@ -33,9 +33,6 @@ USE_PERL5= run
NO_BUILD= yes
NO_ARCH= yes
-SHEBANG_LANG= perl
-perl_OLD_CMD= ${SETENV} perl
-perl_CMD= ${PERL}
SHEBANG_FILES= ${WRKSRC}/policyd-weight
do-install:
diff --git a/mail/postfix-postfwd/Makefile b/mail/postfix-postfwd/Makefile
index 62e7770..9dab498 100644
--- a/mail/postfix-postfwd/Makefile
+++ b/mail/postfix-postfwd/Makefile
@@ -22,7 +22,6 @@ SUB_FILES= pkg-message
USE_RC_SUBR= ${PORTNAME}
USES= perl5 shebangfix
-SHEBANG_LANG= perl
SHEBANG_FILES= sbin/* tools/*.pl tools/hapolicy/*
USE_PERL5= run
NO_BUILD= yes
diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile
index 23d5b35..8f15e98 100644
--- a/mail/postfix/Makefile
+++ b/mail/postfix/Makefile
@@ -33,7 +33,6 @@ CONFLICTS_INSTALL?= courier-0.* opensmtpd-[0-9]* \
USERS= postfix
GROUPS= mail maildrop postfix
USES= perl5 shebangfix cpe
-SHEBANG_LANG= perl
SHEBANG_FILES= auxiliary/qshape/qshape.pl
USE_RC_SUBR= postfix
diff --git a/mail/tumgreyspf/Makefile b/mail/tumgreyspf/Makefile
index 855a869..5f4716c 100644
--- a/mail/tumgreyspf/Makefile
+++ b/mail/tumgreyspf/Makefile
@@ -31,7 +31,6 @@ SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \
TUMGREYSPF_USER=${TUMGREYSPF_USER}
SHEBANG_FILES= *
-python_OLD_CMD= /usr/bin/env python
TUMGREYSPF_DIR?= /var/db/${PORTNAME}
TUMGREYSPF_USER?= nobody
diff --git a/math/mosesdecoder/Makefile b/math/mosesdecoder/Makefile
index aefbaaa..09b36c2 100644
--- a/math/mosesdecoder/Makefile
+++ b/math/mosesdecoder/Makefile
@@ -31,7 +31,7 @@ MAKE_ENV+= BOOST_BUILD_PATH=${WRKSRC}/jam-files/boost-build
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}
diff --git a/misc/gimp-help-en/Makefile b/misc/gimp-help-en/Makefile
index 03fe58a..5ded602 100644
--- a/misc/gimp-help-en/Makefile
+++ b/misc/gimp-help-en/Makefile
@@ -34,7 +34,6 @@ PORTDATA= *
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
diff --git a/multimedia/lives/Makefile b/multimedia/lives/Makefile
index c138f2a..d168f2c 100644
--- a/multimedia/lives/Makefile
+++ b/multimedia/lives/Makefile
@@ -79,7 +79,7 @@ NLS_USES= gettext
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
diff --git a/multimedia/pymp/Makefile b/multimedia/pymp/Makefile
index 4b9c120..67463ee 100644
--- a/multimedia/pymp/Makefile
+++ b/multimedia/pymp/Makefile
@@ -20,7 +20,6 @@ GH_TAGNAME= bea99d9
USES= shebangfix python tar:bzip2
SHEBANG_FILES= *.py
-python_OLD_CMD= /usr/bin/env python
USE_GNOME= pygtk2
PORTDOCS= CHANGELOG README.md
diff --git a/net-im/prosody/Makefile b/net-im/prosody/Makefile
index e5103ff..d29fa95 100644
--- a/net-im/prosody/Makefile
+++ b/net-im/prosody/Makefile
@@ -32,9 +32,7 @@ LUAJIT_LIB_DEPENDS= libluajit-5.1.so:${PORTSDIR}/lang/luajit
.include <bsd.port.options.mk>
USES= cpe gmake lua:51 shebangfix
-SHEBANG_LANG= lua
SHEBANG_FILES= prosody prosodyctl
-lua_OLD_CMD= ${SETENV} lua
.if ${PORT_OPTIONS:MLUAJIT}
lua_CMD= ${LOCALBASE}/bin/luajit
.else
diff --git a/net-mgmt/netams/Makefile b/net-mgmt/netams/Makefile
index 337a3de..d3593b0 100644
--- a/net-mgmt/netams/Makefile
+++ b/net-mgmt/netams/Makefile
@@ -19,7 +19,6 @@ USE_SUBMAKE= yes
SUB_FILES= pkg-message
USE_RC_SUBR= netams
USES= shebangfix
-SHEBANG_LANG= perl
SHEBANG_FILES= cgi-bin/*.cgi cgi-bin/*.pl \
cgi-bin/admin/*.cgi addon/*.pl
diff --git a/net/cloud-init/Makefile b/net/cloud-init/Makefile
index e2dc5f1..2f18b81 100644
--- a/net/cloud-init/Makefile
+++ b/net/cloud-init/Makefile
@@ -33,7 +33,6 @@ ETCDIR= ${PREFIX}/etc/cloud
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"
diff --git a/net/get_iplayer/Makefile b/net/get_iplayer/Makefile
index 66c8f05..3a5a6f4 100644
--- a/net/get_iplayer/Makefile
+++ b/net/get_iplayer/Makefile
@@ -22,7 +22,6 @@ RUN_DEPENDS= p5-HTML-Parser>=0:${PORTSDIR}/www/p5-HTML-Parser \
USES= perl5 shebangfix
USE_PERL5= run
-perl_OLD_CMD= ${SETENV} perl
SHEBANG_FILES= ${PORTNAME} ${PORTNAME}.cgi
NO_BUILD= yes
NO_ARCH= yes
diff --git a/net/polyorb/Makefile b/net/polyorb/Makefile
index b47ff62..25ed925 100644
--- a/net/polyorb/Makefile
+++ b/net/polyorb/Makefile
@@ -32,8 +32,6 @@ PORTDOCS= html \
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"
diff --git a/net/py-pynmsg/Makefile b/net/py-pynmsg/Makefile
index 894dad2..6258c94 100644
--- a/net/py-pynmsg/Makefile
+++ b/net/py-pynmsg/Makefile
@@ -18,7 +18,6 @@ LIB_DEPENDS= libnmsg.so:${PORTSDIR}/net/nmsg
USE_PYTHON= distutils autoplist
USES= python shebangfix uniquefiles:dirs
-python_OLD_CMD= /usr/bin/env python
SHEBANG_FILES= examples/*.py
PORTEXAMPLES= *
diff --git a/net/py-pysphere/Makefile b/net/py-pysphere/Makefile
index 4acef04..616082a 100644
--- a/net/py-pysphere/Makefile
+++ b/net/py-pysphere/Makefile
@@ -16,11 +16,9 @@ LICENSE= BSD3CLAUSE
USES= dos2unix zip shebangfix python:2.7
USE_PYTHON= distutils autoplist
-SHEBANG_LANG= python
-python_OLD_CMD= /usr/bin/env python
-SHEBANG_FILES= *.py \
- pysphere/ZSI/*.py \
- pysphere/ZSI/generate/*.py \
- pysphere/ZSI/wstools/*.py
+SHEBANG_FILES= *.py \
+ pysphere/ZSI/*.py \
+ pysphere/ZSI/generate/*.py \
+ pysphere/ZSI/wstools/*.py
.include <bsd.port.mk>
diff --git a/net/samba4/Makefile b/net/samba4/Makefile
index 5826741..4b912a2 100644
--- a/net/samba4/Makefile
+++ b/net/samba4/Makefile
@@ -405,7 +405,6 @@ USE_RC_SUBR= samba_server
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"
diff --git a/net/samba41/Makefile b/net/samba41/Makefile
index 1cb652a..80a4332 100644
--- a/net/samba41/Makefile
+++ b/net/samba41/Makefile
@@ -400,7 +400,6 @@ USE_RC_SUBR= samba_server
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"
diff --git a/net/samba42/Makefile b/net/samba42/Makefile
index 3c3d8a5..104fe12 100644
--- a/net/samba42/Makefile
+++ b/net/samba42/Makefile
@@ -403,7 +403,6 @@ USE_RC_SUBR= samba_server
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"
diff --git a/news/nzbget/Makefile b/news/nzbget/Makefile
index a5a6704..cb7d445 100644
--- a/news/nzbget/Makefile
+++ b/news/nzbget/Makefile
@@ -25,7 +25,6 @@ LDFLAGS+= -lpthread
BINMODE= 0755
SHEBANG_FILES= scripts/*.py
-python_OLD_CMD= /usr/bin/env python
OPTIONS_DEFINE= 7Z PYTHON RAR DOCS
OPTIONS_SINGLE= TLSLIB
diff --git a/news/xpn/Makefile b/news/xpn/Makefile
index 2623e05..a1f8d52 100644
--- a/news/xpn/Makefile
+++ b/news/xpn/Makefile
@@ -17,9 +17,6 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gtk2>=2.24.0:${PORTSDIR}/x11-toolkits/py-gtk
NO_BUILD= yes
-# we want a versioned python command
-python_OLD_CMD= /usr/bin/env python
-
SHEBANG_FILES= ${XPN}
SUB_FILES= ${PORTNAME}
SUB_LIST= PYTHON_CMD=${PYTHON_CMD} XPN=${XPN}
diff --git a/print/texlive-texmf/Makefile b/print/texlive-texmf/Makefile
index 339447b..afa7b8d 100644
--- a/print/texlive-texmf/Makefile
+++ b/print/texlive-texmf/Makefile
@@ -273,11 +273,11 @@ do-install:
${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 <bsd.port.mk>
diff --git a/security/cops/Makefile b/security/cops/Makefile
index 2dfc5de..ebfed09 100644
--- a/security/cops/Makefile
+++ b/security/cops/Makefile
@@ -28,7 +28,7 @@ C_SRC= home.chk.c user.chk.c is_able.c is_something.c \
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:
diff --git a/sysutils/racktables/Makefile b/sysutils/racktables/Makefile
index 1f92173..80e1c02 100644
--- a/sysutils/racktables/Makefile
+++ b/sysutils/racktables/Makefile
@@ -3,7 +3,7 @@
PORTNAME= racktables
DISTVERSION= 0.20.10
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES?= sysutils www
MASTER_SITES= SF/${PORTNAME}/
DISTNAME= RackTables-${DISTVERSION}
@@ -18,10 +18,9 @@ RACKHOME?= www/racktables
PORTEXAMPLES= init-sample-racks.sql syncdomain.php
-USES= shebangfix
+USES= shebangfix perl5 python:run
+USE_PERL5= run
SHEBANG_FILES= gateways/*
-python_OLD_CMD= ${SETENV} python
-python_CMD= ${LOCALBASE}/bin/python2.7
WANT_PHP_WEB= yes
USE_PHP= bcmath gd json mbstring mysql pdo_mysql session
diff --git a/sysutils/sd-agent/Makefile b/sysutils/sd-agent/Makefile
index 3c66d17..fd75fe6 100644
--- a/sysutils/sd-agent/Makefile
+++ b/sysutils/sd-agent/Makefile
@@ -19,7 +19,6 @@ GH_ACCOUNT= serverdensity
USES= python shebangfix
SHEBANG_FILES= agent.py
-python_OLD_CMD= /usr/bin/env python
USE_RC_SUBR= $(PORTNAME)
SUB_LIST+= RCNAME=$(PORTNAME:S/-/_/g)
diff --git a/sysutils/tdir/Makefile b/sysutils/tdir/Makefile
index 1f1f532..d3cd85d 100644
--- a/sysutils/tdir/Makefile
+++ b/sysutils/tdir/Makefile
@@ -12,7 +12,7 @@ COMMENT= Advanced file directory display utility
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}
diff --git a/sysutils/zfs-stats/Makefile b/sysutils/zfs-stats/Makefile
index 0abcb8b..1dc29e0 100644
--- a/sysutils/zfs-stats/Makefile
+++ b/sysutils/zfs-stats/Makefile
@@ -18,7 +18,7 @@ GH_ACCOUNT= mmatuska
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
diff --git a/textproc/asciidoc/Makefile b/textproc/asciidoc/Makefile
index e3f3713..5db08f6 100644
--- a/textproc/asciidoc/Makefile
+++ b/textproc/asciidoc/Makefile
@@ -34,7 +34,6 @@ SHEBANG_FILES= a2x.py \
filters/graphviz/graphviz2png.py \
filters/latex/latex2png.py \
filters/music/music2png.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
diff --git a/textproc/google-ctemplate/Makefile b/textproc/google-ctemplate/Makefile
index f74813e..3a613f4 100644
--- a/textproc/google-ctemplate/Makefile
+++ b/textproc/google-ctemplate/Makefile
@@ -22,7 +22,6 @@ USE_LDCONFIG= yes
USE_GITHUB= yes
GH_ACCOUNT= OlafvdSpek
GH_TAGNAME= 359a9f0
-python_OLD_CMD= /usr/bin/env python
INSTALL_target= install-strip
post-patch:
diff --git a/textproc/py2html/Makefile b/textproc/py2html/Makefile
index 63958d2..e652e77 100644
--- a/textproc/py2html/Makefile
+++ b/textproc/py2html/Makefile
@@ -13,7 +13,6 @@ COMMENT= Python Highlighter for HTML
USES= python:2 shebangfix
USE_PYTHON= distutils autoplist
-python_OLD_CMD= /usr/bin/env python
SHEBANG_FILES= py2html
.include <bsd.port.mk>
diff --git a/textproc/sigil/Makefile b/textproc/sigil/Makefile
index f4118f6..2c4062c 100644
--- a/textproc/sigil/Makefile
+++ b/textproc/sigil/Makefile
@@ -30,7 +30,6 @@ EXCLUDE= BoostParts Xerces hunspell minizip pcre utf8-cpp zlib
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
diff --git a/www/calendarserver/Makefile b/www/calendarserver/Makefile
index 24c0c06..2607e5d 100644
--- a/www/calendarserver/Makefile
+++ b/www/calendarserver/Makefile
@@ -41,7 +41,6 @@ USE_PYTHON= autoplist distutils
SUB_FILES= pkg-message
SUB_LIST+= USER=${USERS}
-python_OLD_CMD= /usr/bin/env python
SHEBANG_FILES= bin/calendarserver_* \
bin/icalendar_split \
diff --git a/www/joomla25/Makefile b/www/joomla25/Makefile
index 4585b18..dd8c189 100644
--- a/www/joomla25/Makefile
+++ b/www/joomla25/Makefile
@@ -16,10 +16,10 @@ GH_PROJECT= ${PORTNAME}-cms
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_MYSQL= yes
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}
diff --git a/www/joomla31/Makefile b/www/joomla31/Makefile
index c42c254..179fe7c 100644
--- a/www/joomla31/Makefile
+++ b/www/joomla31/Makefile
@@ -16,11 +16,11 @@ GH_PROJECT= ${PORTNAME}-cms
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_MYSQL= yes
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}
diff --git a/www/libhpack/Makefile b/www/libhpack/Makefile
index f55378b..345ed40 100644
--- a/www/libhpack/Makefile
+++ b/www/libhpack/Makefile
@@ -21,7 +21,6 @@ USE_LDCONFIG= yes
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
diff --git a/www/py-GinGin/Makefile b/www/py-GinGin/Makefile
index 07ef5df..42d7d53 100644
--- a/www/py-GinGin/Makefile
+++ b/www/py-GinGin/Makefile
@@ -18,7 +18,7 @@ RUN_DEPENDS:= ${BUILD_DEPENDS} \
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 <bsd.port.mk>
diff --git a/www/py-djblets/Makefile b/www/py-djblets/Makefile
index c6c5c49..77dedf8 100644
--- a/www/py-djblets/Makefile
+++ b/www/py-djblets/Makefile
@@ -25,7 +25,6 @@ USES= python:2 shebangfix
USE_PYTHON= distutils
PYDISTUTILS_PKGNAME= Djblets
-python_OLD_CMD= /usr/bin/env python
SHEBANG_FILES= contrib/internal/build-media.py
.include <bsd.port.mk>
diff --git a/www/varnish4/Makefile b/www/varnish4/Makefile
index 2b5ed42..a6a4122 100644
--- a/www/varnish4/Makefile
+++ b/www/varnish4/Makefile
@@ -19,7 +19,6 @@ CONFLICTS= varnish-2.* varnish-3.*
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
diff --git a/x11-wm/ede/Makefile b/x11-wm/ede/Makefile
index 5f97b86..cdd3145 100644
--- a/x11-wm/ede/Makefile
+++ b/x11-wm/ede/Makefile
@@ -26,7 +26,6 @@ LIB_DEPENDS= libdbus-1.so:${PORTSDIR}/devel/dbus \
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
diff --git a/x11/eaglemode/Makefile b/x11/eaglemode/Makefile
index 3bbf096..51b1810 100644
--- a/x11/eaglemode/Makefile
+++ b/x11/eaglemode/Makefile
@@ -59,7 +59,7 @@ post-patch:
@${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
diff --git a/x11/scripts/Makefile b/x11/scripts/Makefile
index 96d6dcb..8a140fc 100644
--- a/x11/scripts/Makefile
+++ b/x11/scripts/Makefile
@@ -15,6 +15,6 @@ USE_XORG= x11
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 <bsd.port.mk>
diff --git a/x11/wbarconf/Makefile b/x11/wbarconf/Makefile
index f5651a0..bc6d528 100644
--- a/x11/wbarconf/Makefile
+++ b/x11/wbarconf/Makefile
@@ -16,9 +16,8 @@ RUN_DEPENDS= wbar:${PORTSDIR}/x11/wbar
USE_GNOME= pygobject pygtk2 gtk20
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
OpenPOWER on IntegriCloud