Date: Thu, 19 Jun 2014 23:55:57 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: Melvyn Sopacua <melvyn@magemana.nl> Cc: FreeBSD Ports <ports@freebsd.org> Subject: Re: How can I override global OPTIONS_UNSET for specific port in make.conf? www/xcache Message-ID: <53A35C6D.2060702@quip.cz> In-Reply-To: <alpine.BSF.2.00.1406192325040.2848@fire.magemana.nl> References: <53A33F83.7050807@quip.cz> <alpine.BSF.2.00.1406192325040.2848@fire.magemana.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
Melvyn Sopacua wrote: > Hi, > > On Thu, 19 Jun 2014, Miroslav Lachman wrote: > >> I don't need DOCS, EXAMPLES etc. for each port as I normaly do not use >> them on servers. >> I have this line in make.conf >> >> OPTIONS_UNSET= X11 GUI CUPS DOCS EXAMPLES NLS > >> So how can I have globally disabled EXAMPLES and enable it only for >> one specific port? > > I don't know if there's a simpler way, but this will work: > > OPTIONS_UNSET= X11 GUI CUPS DOCS NLS > .if empty(.CURDIR:M*/www/xcache) > OPTIONS_UNSET+= EXAMPLES > .endif > > Of course, this gets more complex the more exceptions you want, > ultimately arriving at something like this > > PORTS_WITH_EXAMPLES= www/xcache misc/foo > _WANT_EXAMPLES=0 > OPTIONS_UNSET= X11 GUI CUPS DOCS NLS > .for port in ${PORTS_WITH_EXAMPLES} > .if !empty(.CURDIR:M*${port}) # not sure about this var expansion > _WANT_EXAMPLES=1 > .endif > .if ${_WANT_EXAMPLES} == 0 > OPTIONS_UNSET+= EXAMPLES > .endif I consider it as a workaround. There should be some better way instead of manipulating with global OPTIONS_SET or OPTIONS_UNSET. Thank you for your suggestions! Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53A35C6D.2060702>