default variants and quartz v x11

Jeremy Lavergne jeremy at lavergne.me
Mon Dec 25 19:38:04 UTC 2017


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


What can be done to improve the situation?


More information about the macports-dev mailing list