From owner-freebsd-ports@freebsd.org Sat Nov 21 03:05:24 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CF9AA347D2 for ; Sat, 21 Nov 2015 03:05:24 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pa0-x230.google.com (mail-pa0-x230.google.com [IPv6:2607:f8b0:400e:c03::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C53514BA; Sat, 21 Nov 2015 03:05:24 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by padhx2 with SMTP id hx2so134208483pad.1; Fri, 20 Nov 2015 19:05:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=l9qor9ONKK0QwgCiH4R+zcZAbdSPGf42Whu9wctDWkA=; b=uIfcwn52t+J1RZVs9R7gP7avRwQNAq+Si8L1Xlr3j129QtF405VESsr6H1K5AIj7Ji rahkQgNzyYZydcs8WXdZN8wq4xIgWaFpDQzJ27/1VcXKVEgKCGd6EDIiarx5WFASPE7c suH5svY07Yei/8k+24Dfct2oWQp74j51n3A1wtxi5ZyjJefUz4tzD7cz+QMcz32fgqhi +duHBWr8A+EcGSfnLuEBXkNYXHTtY3TC8PnglG0N4t7rxNnEUcfzN+j7iuT8mvAFWztf 17FBcPRZPPl4J8HzpcFeIipVgnaqmaGjJv2GGVJ0kLI1ccNkWvQli6tC8tM23+pqlQwD cd8g== X-Received: by 10.66.164.234 with SMTP id yt10mr488519pab.11.1448075123730; Fri, 20 Nov 2015 19:05:23 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:99ca:e835:e6d:60e2? (2001-44b8-31ae-7b01-99ca-e835-0e6d-60e2.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:99ca:e835:e6d:60e2]) by smtp.gmail.com with ESMTPSA id f13sm991878pfj.35.2015.11.20.19.05.21 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Nov 2015 19:05:23 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: ${PYTHON_CMD}/${PERL} in _CONFIGURE_WITH not working References: <20151120030756.GA28016@Silverstone.nc-us.unovitch.com> To: Jan Beich , Jason Unovitch Cc: freebsd-ports@freebsd.org From: Kubilay Kocak Message-ID: <564FDF6A.70405@FreeBSD.org> Date: Sat, 21 Nov 2015 14:05:14 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Thunderbird/42.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Nov 2015 03:05:24 -0000 On 20/11/2015 4:02 PM, Jan Beich wrote: > Jason Unovitch writes: > >> PERL_USES= perl5 >> PERL_CONFIGURE_ENABLE= perl >> PERL_CONFIGURE_WITH= perl=${PERL} perl-bindings >> PYTHON_USES= python:2 >> PYTHON_CONFIGURE_ENABLE= python >> PYTHON_CONFIGURE_WITH= python=${PYTHON_CMD} > [...] >> % make -VCONFIGURE_ARGS >> "--enable-python --with-python= " >> "--enable-perl --with-perl= --with-perl-bindings" > > It appears bsd.option.mk expands _WITH and _ENABLE twice unlike _ON/_OFF: > once in .for loop and once (lazily) when CONFIGURE_ARGS is referenced. > Try using $${PERL} and $${PYTHON_CMD} or the following patch: > > # XXX incomplete as there're more cases with premature expansion > Index: Mk/bsd.options.mk > =================================================================== > --- Mk/bsd.options.mk (revision 401846) > +++ Mk/bsd.options.mk (working copy) > @@ -491,16 +491,8 @@ ${_u:tu}= ${${opt}_VARS:M${var}=*:C/[^=]*=//:C/^" > . endif > . endfor > . endif > -. if defined(${opt}_CONFIGURE_ENABLE) > -. for iopt in ${${opt}_CONFIGURE_ENABLE} > -CONFIGURE_ARGS+= --enable-${iopt} > -. endfor > -. endif > -. if defined(${opt}_CONFIGURE_WITH) > -. for iopt in ${${opt}_CONFIGURE_WITH} > -CONFIGURE_ARGS+= --with-${iopt} > -. endfor > -. endif > +CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:C/.+/--enable-&/} > +CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:C/.+/--with-&/} > . for configure in CONFIGURE CMAKE QMAKE > . if defined(${opt}_${configure}_ON) > ${configure}_ARGS+= ${${opt}_${configure}_ON} > @@ -539,16 +531,8 @@ ${_u:tu}= ${${opt}_VARS_OFF:M${var}=*:C/[^=]*=//: > . endif > . endfor > . endif > -. if defined(${opt}_CONFIGURE_ENABLE) > -. for iopt in ${${opt}_CONFIGURE_ENABLE} > -CONFIGURE_ARGS+= --disable-${iopt:C/=.*//} > -. endfor > -. endif > -. if defined(${opt}_CONFIGURE_WITH) > -. for iopt in ${${opt}_CONFIGURE_WITH} > -CONFIGURE_ARGS+= --without-${iopt:C/=.*//} > -. endfor > -. endif > +CONFIGURE_ARGS+= ${${opt}_CONFIGURE_ENABLE:C/=.*//:C/.+/--disable-&/} > +CONFIGURE_ARGS+= ${${opt}_CONFIGURE_WITH:C/=.*//:C/.+/--without-&/} > . for configure in CONFIGURE CMAKE QMAKE > . if defined(${opt}_${configure}_OFF) > ${configure}_ARGS+= ${${opt}_${configure}_OFF} > Can you create an issue to fix this + MFH please? ./koobs