From 67971bd0fb8a440f973d12606b0f496ba216d7df Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 19 Oct 2015 14:50:52 +0000 Subject: 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 --- net/cloud-init/Makefile | 1 - net/get_iplayer/Makefile | 1 - net/polyorb/Makefile | 2 -- net/py-pynmsg/Makefile | 1 - net/py-pysphere/Makefile | 10 ++++------ net/samba4/Makefile | 1 - net/samba41/Makefile | 1 - net/samba42/Makefile | 1 - 8 files changed, 4 insertions(+), 14 deletions(-) (limited to 'net') diff --git a/net/cloud-init/Makefile b/net/cloud-init/Makefile index e2dc5f1c243d..2f18b81f43d2 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 66c8f053bffc..3a5a6f4a8394 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 b47ff62386c2..25ed925e6c60 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 894dad2dd21c..6258c94d6e75 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 4acef049bbab..616082a61a8a 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 diff --git a/net/samba4/Makefile b/net/samba4/Makefile index 5826741fdb57..4b912a219da8 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 1cb652a499cf..80a433271905 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 3c3d8a545e0e..104fe126016c 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" -- cgit v1.2.3