variant handling ...

Ryan Schmidt ryandesign at macports.org
Thu Oct 3 11:35:54 PDT 2013


On Oct 3, 2013, at 13:07, Peter Danecek wrote:

> 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. 
> 
> I did not really expect it would work, but I am looking for something like this:
> 
> subport irods-doc {
>    variant-delete unicore
> }

Variants cannot be deleted after they've been created, so create them only where they're needed, e.g.:


if {${subport} ne "irods-doc"} {
    variant unicore {
        ....
    }
}




More information about the macports-dev mailing list