From owner-freebsd-current@FreeBSD.ORG Sat Jun 9 17:40:14 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3E40106566B; Sat, 9 Jun 2012 17:40:14 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 391DE8FC15; Sat, 9 Jun 2012 17:40:14 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.187.76.163]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q59HeANd086358 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 9 Jun 2012 18:40:10 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q59HeANd086358 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1339263610; bh=0lwtKSASVs/jZBwLLQl+aRmcTDc6qoGifVrIYUuCmQo=; h=Date:From:To:CC:Subject:References:In-Reply-To:Content-Type: Message-ID:Mime-Version; b=Uk0XgA8iMdwZFqUlwBfDt52wSc3I8+PuhHRm/4JDy0Wty3zjREFEJ7qVFFxdstpxg wttpf6xAX4aYFHq6hdmQFRGKSbLfUPBh3oOAFZF5Cgkt/XjA6tyaxVier3xW9XXEZR naygFNkI+bxaOYp3AJLieQYDIjZ6trl9h+wV+sQc= Message-ID: <4FD38A71.8070601@infracaninophile.co.uk> Date: Sat, 09 Jun 2012 18:40:01 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120601 Thunderbird/13.0 MIME-Version: 1.0 To: Chris Rees References: <4FD384B5.3050709@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.4.2 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig00FE7E813D944A054B030817" X-Virus-Scanned: clamav-milter 0.97.4 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_ADSP_ALL,DKIM_SIGNED,T_DKIM_INVALID autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: Doug Barton , freebsd-current Subject: Re: PORTS_MODULES fix X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jun 2012 17:40:14 -0000 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 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--