Re: PORTS_MODULES fix

看板FB_current作者時間13年前 (2012/06/10 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/5 (看更多)
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig00FE7E813D944A054B030817 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 09/06/2012 18:26, Chris Rees wrote: > On 9 June 2012 18:15, Doug Barton <dougb@freebsd.org> wrote: >> I have recently tried the PORTS_MODULES knob, and found a problem. The= >> ports tree searches for some dependencies by finding a binary in PATH,= >> and that fails since by default /usr/local/ isn't there. The attached >> patch fixes that problem. >> >> It would be more robust to use PREFIX there instead of /usr/local >> explicitly, but I'm not sure how to unravel the mk maze to get that >> value. If anyone has a suggestion for that, I'd be happy to include it= =2E >=20 > As you mention, PREFIX is only defined in ports/Mk, and it'd > definitely be undesirable to be including any of those files :) >=20 > The most robust (but unpleasant) solution would be one of the following= : >=20 > PREFIX?=3D/usr/local > PORTSMODULESENV=3DSYSDIR=3D${SYSDIR} PATH=3D${PATH}:${PREFIX}/bin:${PRE= FIX}/sbin >=20 > or the equivalent (and perhaps cleaner, not leaving PREFIX defined) >=20 > .if !defined(PREFIX) > PORTSMODULESENV=3DSYSDIR=3D${SYSDIR} PATH=3D${PATH}:/usr/local/bin:/usr= /local/sbin > .else > PORTSMODULESENV=3DSYSDIR=3D${SYSDIR} PATH=3D${PATH}:${PREFIX}/bin:${PRE= FIX}/sbin > .endif >=20 > Both of these will respect make.conf's setting of PREFIX. >=20 Shouldn't you be looking for LOCALBASE rather than PREFIX in this context= ? Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enig00FE7E813D944A054B030817 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/TinkACgkQ8Mjk52CukIwH4QCfZL9CHp51h8VekeIakzOj2Lu5 SSgAn3eQkQmTmXN7QvtXxWmepjQIbMFp =DVN+ -----END PGP SIGNATURE----- --------------enig00FE7E813D944A054B030817--
文章代碼(AID): #1FquzW0w (FB_current)
文章代碼(AID): #1FquzW0w (FB_current)