From owner-freebsd-current@FreeBSD.ORG Sat Jun 9 19:02: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 285D41065677; Sat, 9 Jun 2012 19:02:14 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id C7ADF8FC1A; Sat, 9 Jun 2012 19:02:13 +0000 (UTC) Received: by obcni5 with SMTP id ni5so5469454obc.13 for ; Sat, 09 Jun 2012 12:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ivUqc/14ESnL4Q6T6m+z6oXFV6tnv1iFuAgfsZaVqOA=; b=G2t+olDpLLojocn9ui3NtwHPIe7Pxmo5bDxBqc23LcUlJY3sldjPgIy/1Op3e2fXFQ CwUA5Q0K0yD7o2udPnhcv0IyfglHRuSTDcQJYufAAa1469+pDcc90ZJaz12D1BwA20tc VWL50ftGMTv5r2eYZ7VlKHkD2D1YZLAn9PzbNhdNBL17PfKbQpDLqavMXb1hdBDX5yDp OOm1GyH2j5k4yp9uIZ5EnsN9dhjhHiKoy2cRoC5V79uuRQ8eHIflAEKbA8PnM9qwBlRg J7I2aUOPT7TphmF3TIaB+TtUrfW0oZC1y/r85d5AgXnHwXogTqgk9sNJ9YKiGUMrkeYy reAg== MIME-Version: 1.0 Received: by 10.182.51.100 with SMTP id j4mr11485303obo.78.1339268532269; Sat, 09 Jun 2012 12:02:12 -0700 (PDT) Received: by 10.76.98.77 with HTTP; Sat, 9 Jun 2012 12:02:12 -0700 (PDT) In-Reply-To: <4FD39099.3000208@FreeBSD.org> References: <4FD384B5.3050709@FreeBSD.org> <4FD38A71.8070601@infracaninophile.co.uk> <4FD39099.3000208@FreeBSD.org> Date: Sat, 9 Jun 2012 12:02:12 -0700 Message-ID: From: Garrett Cooper To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Cc: Chris Rees , Matthew Seaman , 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 19:02:14 -0000 On Sat, Jun 9, 2012 at 11:06 AM, Doug Barton wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: RIPEMD160 > > On 06/09/2012 10:40, Matthew Seaman wrote: >> 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. >>> >>> 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? > > Both good points. New and improved attached. Looks like my patch, only with LOCALBASE being tunable and with with ${LOCALBASE}/sbin (in short I found a few different bugs from you a few months ago): http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/161452 . Thanks! -Garrett