Date: Fri, 20 Nov 2015 06:02:41 +0100 From: Jan Beich <jbeich@vfemail.net> To: Jason Unovitch <junovitch@FreeBSD.org> Cc: freebsd-ports@freebsd.org Subject: Re: ${PYTHON_CMD}/${PERL} in _CONFIGURE_WITH not working Message-ID: <vb8x-ntzi-wny@vfemail.net> In-Reply-To: <20151120030756.GA28016@Silverstone.nc-us.unovitch.com> (Jason Unovitch's message of "Thu, 19 Nov 2015 22:07:56 -0500") References: <20151120030756.GA28016@Silverstone.nc-us.unovitch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-= Content-Type: text/plain Jason Unovitch <junovitch@FreeBSD.org> 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} --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQF8BAEBCgBmBQJWTqlxXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXREQjQ0MzY3NEM3RDIzNTc4NkUxNDkyQ0VF NEM3Nzg4MzQ3OURCRERCAAoJEOTHeINHnb3bwPwH/RHvEZq+IHkpDiDl58cHyFSh brL8Zm294oGLbFdSDAxvMKAzUrteVaj1NiEMe+y0weMhLrgzxQ4Qx4O/wW9nYKH2 vuDwU+pnwljsoVYyN5r9QnZAVRavRMbJQ7GiyS+0C7+nureiY/w//vb0Yps729Vq 9dwbC5p9XHrzrDLkDcbE4Rx0HuhUzr95N2mQ8JkiCur8zRs5lK2LBtQciQinDpkR aVhQGB4uO9Tj045/D4/ebOF4EjjEXUE5sK2Fj/1Wm9KxzlckMlMFvg4p3C+3rqDG tI7yXVNMaGYdk/GVG4PxseaqZgDxYEGKAkI/FHmxc3sq2Wp5jQIKuF9uvgwjKGU= =Nngc -----END PGP SIGNATURE----- --=-=-=--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vb8x-ntzi-wny>