[82194] trunk/dports/graphics/openvrml

Raphael Straub raphael at macports.org
Wed Aug 10 07:56:08 PDT 2011


Ryan Schmidt wrote:
> On Aug 10, 2011, at 05:13, raphael at macports.org wrote:
>> +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.

Yes, you are right. I committed your suggestion in r82212.

Regards,
	Raphael



More information about the macports-dev mailing list