From owner-freebsd-current@FreeBSD.ORG Sat Jun 9 17:27:25 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB273106566C; Sat, 9 Jun 2012 17:27:25 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 21E108FC19; Sat, 9 Jun 2012 17:27:24 +0000 (UTC) Received: by bkvi18 with SMTP id i18so3196136bkv.13 for ; Sat, 09 Jun 2012 10:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=oG62uV3r8mQog7yL5/PD3UfNJry0HgKujI/MYlyIOrE=; b=xAG7ys54jEH2yP7ufchURiCl5Ab8mqCW9TzgKTznLuvKKiXmb4NEF5vCg1jwDguDRW 0eIL480SJgJxRT/5YW40sWTidawZ1J3WyIwln2xKjFmvBbcxqyBcIq0QH6EvXTxeSFzx r9AUVT0yrVUZHrFxdSqm2KYXXMq1HYPxzx0lOWVnC9D/+BxgyuYimoGnlaKpDdDnyJVe d14MrJVE5b2M3OB4DYOTvYuV0JiDlNiVnF6IQ93YU8C83KGL4zpn0OIHXv5SgidY6I9i peGMzrMu5agNrjNCVdS5MalwxEFiqaNKCOufK/OmKtufSIbVd0DwqUjNT3p+TtAQ3067 rPnw== Received: by 10.204.156.69 with SMTP id v5mr7880231bkw.133.1339262844025; Sat, 09 Jun 2012 10:27:24 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.171.138 with HTTP; Sat, 9 Jun 2012 10:26:53 -0700 (PDT) In-Reply-To: <4FD384B5.3050709@FreeBSD.org> References: <4FD384B5.3050709@FreeBSD.org> From: Chris Rees Date: Sat, 9 Jun 2012 18:26:53 +0100 X-Google-Sender-Auth: 9Tl6VC_CSFpzdRQEbp2LdhHOngg Message-ID: To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Cc: 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:27:25 -0000 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. Chris