variant handling ...

Lawrence Velázquez larryv at macports.org
Thu Oct 3 14:22:18 PDT 2013


On Oct 3, 2013, at 2:52 PM, Peter Danecek <Peter.Danecek at bo.ingv.it> wrote:

> On Oct 3, 2013, at 20:40 , Joshua Root <jmr at macports.org> wrote:
> 
>> On 2013-10-4 04:07 , Peter Danecek wrote:
>>> 
>>> Hi all,
>>> 
>>> one more question (at least) related to subports. 
>>> 
>>> In my Portfile w/ subports I use variants, which allow to switch features. These would apply to basically to all subports so I put them global. But there would be one exception, these variants make no sense for documentations, so ideally I would cancel the for the document subport. However, I see no obvious way to do so. 
>> 
>> if {$subport ne "document"} {
>> 	variant foo ...
>> }
>> 
>> - Josh
> 
> 
> I thought actually along this line, but did not realise it would not change the structure of the Portfile that much.

It's not really all that big of a change. Just keep the relevant variants together and enclose them all in the "if" block.

vq


More information about the macports-dev mailing list