aboutsummaryrefslogtreecommitdiff
path: root/Mk/Uses/shebangfix.mk
Commit message (Collapse)AuthorAgeFilesLines
* framework: cleanup conditional-indentations in Mk/Tobias C. Berner2022-04-241-23/+23
| | | | | | | | | | | Run Tools/scripts/indent_make_if.pl on all of Mk. These white space changes contribute greatly to the readability of those files. As we have a version control system, finding out the reasons for the changes prior to these white space changes is still easily possible Differential Revision: https://reviews.freebsd.org/D35024 Reviewed by: portmgr (rene, bapt)
* Mk: release portmgr maintainership of most USES filesRene Ladan2022-04-241-1/+1
| | | | | | Differential Revision: https://reviews.freebsd.org/D34936 Reviewed by: desktop (tcberner), portmgr (tcberner), ruby (yasu), tijl
* framework: Remove $FreeBSD$Mathieu Arnold2021-04-061-2/+0
| | | | Where appropriate fiddle with a few other things.
* Report (in q/a) and fix (in shebangfix) python[23] shebangsDmitry Marakasov2017-12-211-0/+7
| | | | | | | | | | | | | | | | | | Currently, only python shebangs (e.g. /bin/python, /usr/local/bin/python, /usr/bin/env python etc.) are reported by stage Q/A and fixed by USES=shebangfix. We need to do the same for python[23] as well. Before the problem was not noticeable since many ports had e.g. USES=python:2, which added a dependency on python2 metaport, however that's going to switch to USES=python:2.7, and neither it, nor more widely used USES=python adds a dependency on metaports, so there's very high probability that python[23] links are not available. Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D13571 Notes: svn path=/head/; revision=456908
* Mk/Uses/shebangfix.mk: Fix SHEBANG_FILES to use find(1)Mark Felder2017-08-081-1/+2
| | | | | | | | | | | | | | | | | Ports like net/vmware-vsphere-cli use SHEBANG_FILES with globs like so: SHEBANG_FILES= bin/* ... As of FreeBSD 11.1-RELEASE sed has changed and errors if attempted on non-file objects. In the case of the cited port there are many other files in the bin/ directory which are symlinks for compatibility with old scripts. This causes the port patching to fail. PR: 221229 Differential Revision: https://reviews.freebsd.org/D11853 Notes: svn path=/head/; revision=447527
* - shebangfix: allow to use SHEBANG_REGEX, SHEBANG_GLOB, and SHEBANG_FILES ↵Dmitry Marakasov2017-07-141-4/+6
| | | | | | | | | | | simultaneously Reported by: lev Approved by: portmgr (mat) Differential Revision: https://reviews.freebsd.org/D11572 Notes: svn path=/head/; revision=445751
* - Add /usr/local/bin/* old cmd patterns to shebangfixDmitry Marakasov2017-04-201-0/+1
| | | | | | | | Approved by: portmgr (mat, rene) Differential Revision: https://reviews.freebsd.org/D10412 Notes: svn path=/head/; revision=438940
* Add SHEBANG_REGEX and SHEBANG_GLOB, similar as the DOS2UNIX ones.Mathieu Arnold2016-10-241-0/+16
| | | | | | | Sponsored by: Absolight Notes: svn path=/head/; revision=424566
* - Add shebangfix documentation bitsDmitry Marakasov2015-10-221-2/+10
| | | | | | | | | | - Fix tcl_OLD_CMD tk_OLD_CMD Approved by: portmgr (bapt) Differential Revision: D3939 Notes: svn path=/head/; revision=399976
* Roll all of the commands into a loop and use the same patterns for every lang.Bryan Drewery2015-10-201-31/+15
| | | | | | | | | | | | | - /usr/bin/CMD - /bin/CMD - /usr/bin/env CMD With hat: portmgr Reviewed by: bapt, amdmi3 Differential Revision: https://reviews.freebsd.org/D3942 Notes: svn path=/head/; revision=399863
* Improve shebangfix frameworkDmitry Marakasov2015-10-191-14/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=399684
* Rewrite the target ordering code.Mathieu Arnold2015-08-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The targets now have priority assigned to them, and, when the dependency ordering magic is done at the end of bsd.port.mk, they are sorted according to their priority. This allows USES to add targets easily and have them run whenever they want without touching bsd.port.mk. To add a target that runs just before post-configure run, do: _USES_configure+= 695:my-post-configure my-post-configure: do something To fine tune when the target is ran, look at the values in the *_SEQ variables at the end of bsd.port.mk, and the other USES. Allow ports Makefiles to override the priority of targets with the TARGET_ORDER_OVERRIDE variable. For example, to get post-install running earlier, (its default is 700) do: TARGET_ORDER_OVERRIDE= 650:post-install While there, add options target helpers for the do-* targets when they exist. Reviewed by: antoine, bapt Exp-run by: antoine Sponsored by: Absolight Differential Revision: https://reviews.freebsd.org/D3099 Notes: svn path=/head/; revision=394503
* Switch default python_CMD used by shebangfix to ${PYTHON_CMD} for portsAntoine Brodin2015-07-291-0/+4
| | | | | | | | | | | | using python PR: 201077 Reviewed by: mat With hat: portmgr Differential Revision: https://reviews.freebsd.org/D2955 Notes: svn path=/head/; revision=393196
* Fix a typoAntoine Brodin2015-06-121-1/+1
| | | | Notes: svn path=/head/; revision=389294
* Add ksh support to USES=shebangfixAntoine Brodin2014-08-181-1/+3
| | | | | | | | | PR: ports/192781 Submitted by: timp87 With hat: portmgr Notes: svn path=/head/; revision=365345
* Move MAINTAINER lines to the end of the initial comment block andGerald Pfeifer2014-03-151-2/+1
| | | | | | | | | make things a bit more consistent. Approved by: portmgr (bapt) Notes: svn path=/head/; revision=348308
* - Add 'tcl' and 'tk' support in SHEBANG_LANGPietro Cerutti2014-02-171-3/+7
| | | | | | | | | | By default, /usr/bin/tclsh and /usr/bin/wish will be substituted with ${TCLSH} and ${WISH}, respectively. This only works when USES contains 'tcl' or 'tk'. Approved by: portmgr (bapt) Notes: svn path=/head/; revision=344793
* Add java_CMD. Although Java programs don't use shebangs, it is sometimesDag-Erling Smørgrav2014-02-151-1/+3
| | | | | | | | | useful to have a centrally located list of interpreters for other purposes. Approved by: portmgr (mat) Notes: svn path=/head/; revision=344338
* Properly add targets to the sequence they belong to, that now makes them ↵Baptiste Daroussin2014-01-041-3/+0
| | | | | | | predictable Notes: svn path=/head/; revision=338605
* Extend description of USE=shebangfix. Improve grammar and formatting.Gerald Pfeifer2013-11-281-10/+15
| | | | | | | Approved by: portmgr (bapt) Notes: svn path=/head/; revision=335130
* Mark some targets .PHONYBaptiste Daroussin2013-11-201-0/+1
| | | | Notes: svn path=/head/; revision=334392
* - Fix a documentation typoMarcus von Appen2013-08-251-1/+1
| | | | Notes: svn path=/head/; revision=325357
* Add some more comment to explain how SHEBANG_FILES worksBaptiste Daroussin2013-06-101-0/+4
| | | | | | | Requested by: kwm (gnome) Notes: svn path=/head/; revision=320453
* Do not leave .bak files after converting shebangsBaptiste Daroussin2013-05-291-1/+1
| | | | Notes: svn path=/head/; revision=319366
* Add new USES: shebangfixBaptiste Daroussin2013-05-061-0/+53
use it to fix shebang on files specified by SHEBANG_FILES macro, by default it proposes default values for bash, perl, php, python, ruby, it can be customized and extended Notes: svn path=/head/; revision=317555