Date: Thu, 7 Aug 2008 20:54:29 +0200 From: Martin Tournoij <carpetsmoker@rwxrwxrwx.net> To: freebsd-questions@freebsd.org Cc: mk@adminlife.net Subject: Re: Add CONFIGURE_ARGS option for port in make.conf Message-ID: <20080807185429.GA27898@rwxrwxrwx.net> In-Reply-To: <489AAC87.8040200@adminlife.net> References: <489AAC87.8040200@adminlife.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 07, 2008 at 10:04:23AM +0200, Matthias Kellermann wrote: > Hi list, > > I want to compile a port with an option that is not controllable through > the FreeBSD Makefile or with make config. > > The specific port is lang/php4 and the option I want to add is > --with-mime-magic (I know, php4 is old and not supported after 8.8.08 > and --with-mime-magic is deprecated, but thats another story...). > > So I added an option to make.conf(5): > > .if ${.CURDIR:M*/lang/php4} > CONFIGURE_ARGS+=--with-mime-magic > .endif > > Unfortonately, this does not work. > > When I add this option in the Makefile it works. The relevant part looks > like this: > > CONFIGURE_ARGS= --enable-versioning \ > --with-mime-magic \ > --enable-memory-limit \ > --with-layout=GNU \ > --with-config-file-scan-dir=${PREFIX}/etc/php \ > --disable-all \ > --program-prefix="" > > Any ideas whats wrong here? > > Regards, > Matthias /etc/make.conf is read first, from make(1): First of all, the initial list of specifications will be read from the system makefile, sys.mk, unless inhibited with the -r option. The standard sys.mk as shipped with FreeBSD also handles make.conf(5) So if the port uses VAR= instead of VAR+= (Or VAR?=) then settings in /etc/make.conf will have no effect. AFAIK there is no pretty workaround, you will need to edit the Makefile. For a more structual solution, ports should use CONFIGURE_ARGS+= instead of CONFIGURE_ARGS, or a a new variable can be added, where the user can set custom configure arguments (i.e. LOCAL_CONFIGURE_ARGS). -- Martin Tournoij carpetsmoker@rwxrwxrwx.net http://www.daemonforums.org QOTD: Do not overtax your powers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080807185429.GA27898>