From owner-freebsd-ports@FreeBSD.ORG Sun Feb 12 21:39:31 2006 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9431716A420 for ; Sun, 12 Feb 2006 21:39:31 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from host-212-68-242-42.brutele.be (host-212-68-242-42.brutele.be [212.68.242.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB4D443D49 for ; Sun, 12 Feb 2006 21:39:30 +0000 (GMT) (envelope-from jylefort@FreeBSD.org) Received: from jsite.lefort.net (jsite.lefort.net [192.168.1.2]) by gateway.lefort.net (Postfix) with ESMTP id 60D3854D5; Sun, 12 Feb 2006 22:39:29 +0100 (CET) Received: from jsite.lefort.net (localhost [127.0.0.1]) by jsite.lefort.net (Postfix) with SMTP id 179D0C10F; Sun, 12 Feb 2006 22:39:29 +0100 (CET) Date: Sun, 12 Feb 2006 22:39:28 +0100 From: Jean-Yves Lefort To: freebsd-ports@FreeBSD.org Message-Id: <20060212223928.688aa5b0.jylefort@FreeBSD.org> In-Reply-To: <20060212213101.GE11732@it.ca> References: <200602110718.k1B7IAtY060011@freefall.freebsd.org> <20060211151306.GG11351@it.ca> <20060211195818.0ebaa31c.jylefort@FreeBSD.org> <20060211201722.GK11351@it.ca> <20060211214724.27c5457f.jylefort@FreeBSD.org> <20060212032944.GL11351@it.ca> <20060212201227.505c3101.jylefort@FreeBSD.org> <20060212203054.GC11732@it.ca> <20060212220241.4ea652aa.jylefort@FreeBSD.org> <20060212213101.GE11732@it.ca> X-Mailer: Sylpheed running on FreeBSD Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Sun__12_Feb_2006_22_39_28_+0100_lK98gL.nZPrSJm7U" Cc: paul+fbsd@it.ca Subject: Re: ports/92946: New port: print/xmlprpr - XML Pretty Printer X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2006 21:39:31 -0000 --Signature=_Sun__12_Feb_2006_22_39_28_+0100_lK98gL.nZPrSJm7U Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 12 Feb 2006 16:31:02 -0500 Paul Chvostek wrote: > On Sun, Feb 12, 2006 at 10:02:41PM +0100, Jean-Yves Lefort wrote: > > >=20 > > > # cd /usr/ports > > > # grep -lr '\${PERL' . | grep -c '/Makefile$' > > > 1933 > > > # grep -lr '/usr/bin/perl' . | while read file; do grep -q '\${PERL' = $file || echo $file; done | grep -c '/Makefile$' > > > 3 > > >=20 > > > Of these three hits, only one appears to assume that the perl binary > > > lives in /usr/bin/perl. (That would be sysutils/reoback.) > >=20 > > # grep '#!/usr/bin/perl' /usr/bin/* /usr/local/bin/* /usr/X11R6/bin/* > ... > > Of course, I only have 500 ports installed. >=20 > Sure, but this only demonstrates that *your* PERL variable points at > /usr/bin/perl, not what those ports could potentially use. I think > you'll find that all the Perl scripts you've installed in /usr/local/bin > and /usr/X11R6/bin have shell magic controlled by the PERL variable, and > not by a static string. Unless one of them is reoback. :) No. I'm running FreeBSD 6.0 with the perl5.8 port, and so my ${PERL} variable points at /usr/local/bin/perl. This demonstrates that #!/usr/bin/perl is usually left untouched. > > It'll not break if you hardcode /usr/bin/perl. >=20 > It will if you're installing on a machine that has /usr/local/bin/perl. > On an older (4.9) machine I manage at work: >=20 > # grep -c '/usr/local/bin/perl' /usr/local/bin/* | awk -F: '{a+=3D$2}END{= print a}' > 85 > # grep '/usr/local/bin/perl' /usr/local/bin/* | head -10 > Binary file /usr/local/bin/a2p matches > /usr/local/bin/c2ph:#!/usr/local/bin/perl > /usr/local/bin/c2ph: eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' > /usr/local/bin/c2ph: #!/usr/local/bin/perl > /usr/local/bin/cpan:#!/usr/local/bin/perl > /usr/local/bin/cpan: eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}' > /usr/local/bin/crc32:#!/usr/local/bin/perl -w > /usr/local/bin/crc32:eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}' > /usr/local/bin/decode-base64:#!/usr/local/bin/perl > /usr/local/bin/decode-base64:eval 'exec /usr/local/bin/perl -S $0 ${1+"$= @"}' >=20 > So who knows -- it may not even be only shell magic that needs ${PERL}. These scripts should break if you remove your Perl port. --=20 Jean-Yves Lefort jylefort@FreeBSD.org http://lefort.be.eu.org/ --Signature=_Sun__12_Feb_2006_22_39_28_+0100_lK98gL.nZPrSJm7U Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD76sQyzD7UaO4AGoRAv7AAJ9nH5RKpsgk3yg2g5WfBpRffWFLZgCfaIlJ bNa3SYTviXtrFDdHauWZYAw= =2SDp -----END PGP SIGNATURE----- --Signature=_Sun__12_Feb_2006_22_39_28_+0100_lK98gL.nZPrSJm7U--