Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2014 23:32:24 +0200 (CEST)
From:      Melvyn Sopacua <melvyn@magemana.nl>
To:        Miroslav Lachman <000.fbsd@quip.cz>
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:  <alpine.BSF.2.00.1406192325040.2848@fire.magemana.nl>
In-Reply-To: <53A33F83.7050807@quip.cz>
References:  <53A33F83.7050807@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
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

(untested)

--
Melvyn



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1406192325040.2848>