diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2015-10-19 22:50:52 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2015-10-19 22:50:52 +0800 |
commit | 6a98fceb0a6004a4c5a1fd86d54347f6a29f74c4 (patch) | |
tree | 72fd93ae39b43490b34dc8479465e07b453d126e /databases | |
parent | e18413661fadcae47bb20ec0de548623410227ad (diff) | |
download | freebsd-ports-gnome-6a98fceb0a6004a4c5a1fd86d54347f6a29f74c4.tar.gz freebsd-ports-gnome-6a98fceb0a6004a4c5a1fd86d54347f6a29f74c4.tar.zst freebsd-ports-gnome-6a98fceb0a6004a4c5a1fd86d54347f6a29f74c4.zip |
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
Diffstat (limited to 'databases')
-rw-r--r-- | databases/luadbi/Makefile | 3 | ||||
-rw-r--r-- | databases/nagios-check_mongodb/Makefile | 1 | ||||
-rw-r--r-- | databases/pgtune/Makefile | 10 | ||||
-rw-r--r-- | databases/postgresql_autodoc/Makefile | 1 | ||||
-rw-r--r-- | databases/skytools/Makefile | 2 |
5 files changed, 2 insertions, 15 deletions
diff --git a/databases/luadbi/Makefile b/databases/luadbi/Makefile index 1d6e788d754e..e6ff4522f8b5 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 74c42e0b823c..5a0bb6bad4c9 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 8d978fa1780b..1884eb9b49ae 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 c3130d135a15..9cff9b7c53f4 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 29b8c08b4e6f..7c16c09f0140 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 \ |