[82194] trunk/dports/graphics/openvrml

Ryan Schmidt ryandesign at macports.org
Wed Aug 10 07:03:17 PDT 2011


On Aug 10, 2011, at 05:13, raphael at macports.org wrote:

> Revision: 82194
>          http://trac.macports.org/changeset/82194
> Author:   raphael at macports.org
> Date:     2011-08-10 03:13:54 -0700 (Wed, 10 Aug 2011)
> Log Message:
> -----------
> openvrml:
> 
> * fix build with boost 1.47.0 by applying upstream patch; see #30689
> * replace no_x11 and no_opengl variant
> 
> Modified Paths:
> --------------
>    trunk/dports/graphics/openvrml/Portfile


> +if {![variant_isset no_x11]} {
> +    if {![variant_isset no_opengl]} {
> +        default_variants        +x11+opengl
> +    } else {
> +        default_variants        +x11
> +    }
> +} else {
> +    if {![variant_isset no_opengl]} {
> +        default_variants        +opengl
> +    }
> +}

This doesn't need to be so complicated. Also, you should handle negative variants.


if {[variant_isset no_x11]} {
	default_variants -x11
} else {
	default_variants +x11
}

if {[variant_isset no_opengl]} {
	default_variants -opengl
} else {
	default_variants +opengl
}


You may not have realized that default_variants is additive. Subsequent calls to default_variants do not overwrite previous calls. It has a built-in "-append" feature.




More information about the macports-dev mailing list