Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2013 15:09:33 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        "Hans F. Nordhaug" <Hans.F.Nordhaug@hiMolde.no>
Cc:        ports@FreeBSD.org
Subject:   Re: [BRAINSTORM] shebang fixing framework
Message-ID:  <20130430130932.GM3577@ithaqua.etoilebsd.net>
In-Reply-To: <20130430105947.GA31555@hiMolde.no>
References:  <20130430103821.GJ3577@ithaqua.etoilebsd.net> <20130430105947.GA31555@hiMolde.no>

next in thread | previous in thread | raw e-mail | index | archive | help

--hnsKUeImFCk/igEn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 30, 2013 at 12:59:47PM +0200, Hans F. Nordhaug wrote:
> * Baptiste Daroussin <bapt@FreeBSD.org> [2013-04-30]:
> > Hi all,
> >=20
> > For a while now: http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/511=
52 we are
> > looking for a framework/helpers to help patching scripts shebang so tha=
t they
> > fit where the interpreters is on FreeBSD.
> >=20
> > We also want to get rid of /usr/bin/perl
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/170219 and such help=
ers would
> > help
> >=20
> > here is what I do propose: http://people.freebsd.org/~bapt/shebangfix.m=
k.txt
> > How the above works:
> >=20
> > USES=3D	shebangfix
> > SHEBANG_LANG=3D	perl
> > perl_FILES=3D	*.pl
> >=20
> > you want to create a custom one for the joescript?
> >=20
> > USES=3D	shebangfix
> > SHEBANG_LANG=3D	joescript
> > joescript_FILES=3D	*.joe
> > joescript_OLD_CMD=3D	/usr/bin/joe
> > joescript_CMD=3D		${LOCALBASE}/bin/joe
> >=20
> > How to fix both python and perl scripts:
> > USES=3D	shebangfix
> > SHEBANG_LANG=3D	perl python
> > perl_FILES=3D	*.pl
> > python_FILES=3D	bin/*.py myscript/script.py
> >=20
> >=20
> > the _FILES should be relative to ${WRKSRC} it can be globbing
> >=20
> > So far what has been proposed already is:
> > - replace ${lang}_FILES by FIX_${lang}
> > - nuke SHEBANG_LANG in favor of USES=3D shebangfix:perl:python
> > - nuke SHEBANG_LANG in favor of USES=3D shebangfix:"perl python"
> > - nuke SHEBANG_LANG in favor of USES=3D shebangfix:perl+python
> >=20
> > What do you guys think about it, what do you propose.
> > What majority prefers will be implemented and committed during BSDCan!
>=20
> 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
>=20
> I don't have strong opinions regarding USES and SHEBANG_LANG, but if we
> nuke SHEBANG_LANG I prefer one statement for each language:
>=20
> USES=3D shebangfix:perl
> USES+=3D shebangfix:python
>=20
> instead of=20
>=20
> USES=3D shebangfix:perl:python
>=20
> Regards,
> Hans Nordhaug
> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"

--hnsKUeImFCk/igEn
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlF/wowACgkQ8kTtMUmk6EyS8wCeMMohs0DkHm1TtiGtcwIRSYvP
SpUAn2n4yFIhD3TXnFv3XHv4yAwdC+MG
=bGPp
-----END PGP SIGNATURE-----

--hnsKUeImFCk/igEn--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130430130932.GM3577>