[BRAINSTORM] shebang fixing framework

Baptiste Daroussin bapt at FreeBSD.org
Tue Apr 30 13:09:37 UTC 2013


On Tue, Apr 30, 2013 at 12:59:47PM +0200, Hans F. Nordhaug wrote:
> * Baptiste Daroussin <bapt at FreeBSD.org> [2013-04-30]:
> > Hi all,
> > 
> > For a while now: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/51152 we are
> > looking for a framework/helpers to help patching scripts shebang so that they
> > fit where the interpreters is on FreeBSD.
> > 
> > We also want to get rid of /usr/bin/perl
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/170219 and such helpers would
> > help
> > 
> > here is what I do propose: http://people.freebsd.org/~bapt/shebangfix.mk.txt
> > How the above works:
> > 
> > USES=	shebangfix
> > SHEBANG_LANG=	perl
> > perl_FILES=	*.pl
> > 
> > you want to create a custom one for the joescript?
> > 
> > USES=	shebangfix
> > SHEBANG_LANG=	joescript
> > joescript_FILES=	*.joe
> > joescript_OLD_CMD=	/usr/bin/joe
> > joescript_CMD=		${LOCALBASE}/bin/joe
> > 
> > How to fix both python and perl scripts:
> > USES=	shebangfix
> > SHEBANG_LANG=	perl python
> > perl_FILES=	*.pl
> > python_FILES=	bin/*.py myscript/script.py
> > 
> > 
> > the _FILES should be relative to ${WRKSRC} it can be globbing
> > 
> > So far what has been proposed already is:
> > - replace ${lang}_FILES by FIX_${lang}
> > - nuke SHEBANG_LANG in favor of USES= shebangfix:perl:python
> > - nuke SHEBANG_LANG in favor of USES= shebangfix:"perl python"
> > - nuke SHEBANG_LANG in favor of USES= shebangfix:perl+python
> > 
> > What do you guys think about it, what do you propose.
> > What majority prefers will be implemented and committed during BSDCan!
> 
> Working with some ports that include PHP shell scripts, I think
> this would be a great improvement. However, it seems PHP isn't part of
> the default languages in shebangfix.mk.txt. Any specific reason for
> that?

Absolutly not, we can add/will add it
> 
> I don't have strong opinions regarding USES and SHEBANG_LANG, but if we
> nuke SHEBANG_LANG I prefer one statement for each language:
> 
> USES= shebangfix:perl
> USES+= shebangfix:python
> 
> instead of 
> 
> USES= shebangfix:perl:python
> 
> Regards,
> Hans Nordhaug
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130430/f002147f/attachment.sig>


More information about the freebsd-ports mailing list