PORTS_MODULES fix

Matthew Seaman m.seaman at infracaninophile.co.uk
Sat Jun 9 17:40:14 UTC 2012


On 09/06/2012 18:26, Chris Rees wrote:
> On 9 June 2012 18:15, Doug Barton <dougb at 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.
> 
> As you mention, PREFIX is only defined in ports/Mk, and it'd
> definitely be undesirable to be including any of those files :)
> 
> The most robust (but unpleasant) solution would be one of the following:
> 
> PREFIX?=/usr/local
> PORTSMODULESENV=SYSDIR=${SYSDIR} PATH=${PATH}:${PREFIX}/bin:${PREFIX}/sbin
> 
> or the equivalent (and perhaps cleaner, not leaving PREFIX defined)
> 
> .if !defined(PREFIX)
> PORTSMODULESENV=SYSDIR=${SYSDIR} PATH=${PATH}:/usr/local/bin:/usr/local/sbin
> .else
> PORTSMODULESENV=SYSDIR=${SYSDIR} PATH=${PATH}:${PREFIX}/bin:${PREFIX}/sbin
> .endif
> 
> Both of these will respect make.conf's setting of PREFIX.
> 

Shouldn't you be looking for LOCALBASE rather than PREFIX in this context?

	Cheers,

	Matthew


-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew at infracaninophile.co.uk               Kent, CT11 9PW



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20120609/c49948b5/signature.pgp


More information about the freebsd-current mailing list