Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2015 14:59:21 -0400
From:      "Naram Qashat" <cyberbotx@cyberbotx.com>
To:        "Don Lewis" <truckman@FreeBSD.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Adding options framework variables that depend on variables coming after bsd.port.pre.mk
Message-ID:  <99927a0a14c9f258b00a43bfa9155107.squirrel@www.cyberbotx.com>
In-Reply-To: <201503231803.t2NI3ceA029770@gw.catspoiler.org>
References:  <201503231803.t2NI3ceA029770@gw.catspoiler.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> On 23 Mar, Naram Qashat wrote:
>> I'm wanting to add an options framework LIB_DEPENDS that depends on
>> variables that normally come after bsd.port.pre.mk.
>>
>> In this case, I am trying to add a UTEMPTER_LIB_DEPENDS on
>> sysutils/libutempter, but I want to check OPSYS and OSVERSION
>> beforehand,
>> since base FreeBSD 9.x contains utempter while any earlier FreeBSDs as
>> well as non-FreeBSD OSes don't contain it and need the port.
>>
>> I cannot place the UTEMPTER_LIB_DEPENDS line after bsd.port.pre.mk
>> because
>> the options framework doesn't see it then, but I also cannot wrap it
>> around an if conditional using OPSYS and OSVERSION before
>> bsd.port.pre.mk
>> because those variables aren't set yet.
>>
>> I've been told that there is a workaround, but I was not told what the
>> workaround was. Does anyone know how this can be acomplished?
>
> Maybe something like:
>
> UTEMPTER_LIB_DEPENDS=${FOO}
>
> .include <bsd.port.pre.mk>
>
> .if ${OPSYS} ... && ${OSVERSION} ...
> FOO=	what you want to add to LIB_DEPENDS
> .endif

That worked perfectly, thanks!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99927a0a14c9f258b00a43bfa9155107.squirrel>