[MacPorts] #39782: Add keyword to list compatible graphical environments (X11, Quartz, Wayland)?
MacPorts
noreply at macports.org
Wed Jul 17 13:48:02 PDT 2013
#39782: Add keyword to list compatible graphical environments (X11, Quartz,
Wayland)?
--------------------------+--------------------------------
Reporter: c.herbig@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: base | Version:
Resolution: | Keywords:
Port: |
--------------------------+--------------------------------
Comment (by larryv@…):
Replying to [ticket:39782 c.herbig@…]:
> Although some ports list variants like ±x11 and +quartz, some of them
> don't because the quartz compatibility is handled by a dependency.
> For example, Gnumeric is +quartz compatible because it is handled by
> the gtk+quartz dependency, yet there is no indication in the port file
> that +quartz is an option for gnumeric.
Does gnumeric actually build differently depending on whether gtk is built
+quartz or +x11? It is not acceptable for `port install FOO` to produce
different results based solely on whether a dependency BAR is installed
+baz or -quux or anything.
If this is the case, variants need to be added to gnumeric to make its
builds reproducible. Each variant would use the
[[source:trunk/dports/_resources/port1.0/group/active_variants-1.1.tcl|active_variants-1.1
PortGroup]] to ensure that gtk is built with the necessary variant. For an
example of this idiom, see the
[[source:trunk/dports/x11/pango/Portfile at 106559#L52|pango Portfile’s
+quartz variant]]. The PortGroup itself also has rudimentary documentation
on usage.
If some degree of intelligence is desired, I believe it is possible to
check whether a particular dependency is installed with a particular
variant, and set `default_variants` accordingly.
> So rather than making a variant in the portfile that does nothing
> other than to list itself in port info
The variants should not do nothing. They should check for the presence or
absence of the relevant dependencies’ variants, as I described above.
> perhaps it would be wise to make a new keyword (graphics_env ?) that
> lists the environments that the port is known to work with. If
> nothing is specified, then assume X11. It is not ok to assume that
> just because the gtk dependency has been compiled for +quartz that the
> app is though; as of the writing of this, gnome-chemistry-utils fails
> to build in a +quartz environment due to some X11 specific OpenGL
> code.
If gnome-chemistry-utils requires its dependencies to be built as -quartz,
it should use active_variants-1.1 to enforce this.
Given that one can (sort of) enforce variant selection on dependencies, I
don’t see how a new Portfile option meaningfully changes the situation
here.
--
Ticket URL: <https://trac.macports.org/ticket/39782#comment:4>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list