default variants and quartz v x11

Ryan Schmidt ryandesign at macports.org
Mon Dec 25 20:57:04 UTC 2017


On Dec 25, 2017, at 13:38, Jeremy Lavergne wrote:

> I have a weird situation where default_variants appear to be ignored.
> 
> Hoping for some insight on what I can change without getting into broken
> builds from +x11 poisoning, or some more clarity on the +quartz/+x11
> debacle.
> 
> 
> 
> https://trac.macports.org/ticket/55563
> 
> 
> 
> PSPP uses the standard "if no variants, use a default". It also has a
> second "if dependencies were built with a specific variant, enable it
> here as well."
> 
> Both parts seem to not work.
> 
> 
> 
>> if {![variant_isset x11] && ![variant_isset quartz]} {
>>    default_variants +x11
>> }
>> 
>> # check for x11-poisoned dependencies
>> set x11 no
>> set depspecs {gtk3}
>> foreach depspec depspecs {
>>    if {![catch {set result [active_variants $depspec x11]}]} {
>>        if {$result} {
>>            $x11 yes
>>            break
>>         }
>>    }
>> }
>> 
>> # if x11 poison, depend on x11
>> if {[string is true -strict $x11]} {
>>    default_variants +x11
>> }
> 
> 
> From the log, the user has a build where gtk3 (an immediate dependency
> of +x11) and gtksourceview3 (immediate dependency of +quartz) are both
> missing.
> 
> I would expect +x11 to be enabled since no requested variants were
> provided--causing gtk3 to be installed, but it cannot be found.
> 
> I also noticed something in the log which makes me wonder if the
> active_variant checks no longer function:
> 
>> :debug:configure Ignoring active_variants requirement for gtk3
>> because source-type install only considers depends_fetch
>> depends_extract depends_lib depends_build depends_run and those
>> do not contain gtk3

This message is correct. In the port's x11 variant you've written "require_active_variants gtk3 x11" and in the quartz variant you've written "require_active_variants gtk3 quartz" but nowhere have you written "depends_lib-append port:gtk3".

Similarly in the quartz variant you wrote "require_active_variants gtksourceview3 quartz" but you only do "depends_lib-append ... port:gtksourceview3" in the gui variant.

If you need to use require_active_variants, you must be sure the port you specify is one that you've already declared a dependency on.


> What can be done to improve the situation?

I don't know why it fails to build. The log attached to the ticket shows gtk3 and gtksourceview3 are installed.



More information about the macports-dev mailing list