Date: Sun, 19 Mar 2006 23:53:06 +0000 From: Shaun Amott <shaun@inerd.com> To: Alexander Zhuravlev <zaa@ulstu.ru> Cc: freebsd-ports@freebsd.org Subject: Re: conditional (FreeBSD version specific) OPTIONS definition Message-ID: <20060319235305.GA751@picobyte.net> In-Reply-To: <20060319210836.GA14373@wave.zaa.local> References: <20060319210836.GA14373@wave.zaa.local>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 20, 2006 at 12:08:36AM +0300, Alexander Zhuravlev wrote: > > Why is it declined to define OPTIONS after inclusion of the bsd.port.pre.mk > file? Is it possible to impement dynamic options definition using other means? > Unfortuately, it's a limitation of the current system. OPTIONS is processed in bsd.port.pre.mk, so you can't act on the user's choices before then. > > .if defined(WITH_ZLIB_COMPRESSION) && ${OSVERSION} < 500000 > CONFIGURE_ARGS+=--with-http-zlib-compression=/usr > .else > CONFIGURE_ARGS+=--without-http-zlib-compression > .endif > I think you'd need to at the least warn the user, or possibly use IGNORE to tell them that particular option isn't unavailable. Since it doesn't seem to add any dependencies, perhaps you could simply enable it for OSVERSION > 500000, and disable it otherwise? On supported systems, you could then allow the user to manually disable with a make command-line argument. I suppose you could also manually define OSVERSION before including bsd.port.pre.mk: OSVERSION!= /sbin/sysctl -n kern.osreldate Whether or not that would be acceptable, I don't know. -- Shaun Amott [ PGP: 0x6B387A9A ] Scientia Est Potentia.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060319235305.GA751>