switching between x11 and quartz

Langer, Stephen A. (Fed) stephen.langer at nist.gov
Thu Oct 26 15:59:23 UTC 2017


Hi --

Is there an easy way to switch back and forth between x11 and quartz variants?   I have a bunch of ports installed that have one or the other or both variants.   The code I'm developing relies on many ports and used to require x11, but now I'm debugging a quartz version.   I tried installing both variants of the dependencies and activating only the ones I need with a shell script like this:

VAR="+quartz -x11"
port activate glib2 $VAR gnome-themes-standard $VAR gtk2 $VAR gtk3 $VAR libglade2 $VAR libgnomecanvas $VAR librsvg $VAR py27-pygtk $VAR

where the listed ports are ones that I know I need to switch.  The problem is that this script still asks me to choose variants:

>> sudo ~/bin/use-quartz-ports
The following versions of glib2 are currently installed:
 1) glib2 @2.54.1_0+quartz
 2) glib2 @2.54.1_0+x11 (active)
Enter a number to select an option: 1
--->  Deactivating glib2 @2.54.1_0+x11
--->  Cleaning glib2
--->  Activating glib2 @2.54.1_0+quartz
The following versions of gnome-themes-standard are currently installed:
 1) gnome-themes-standard @3.22.3_0+quartz
 2) gnome-themes-standard @3.22.3_0+x11 (active)
[etc]

And even after I've chosen the variants not all of the dependencies are activated correctly.

Is it asking me to choose a variant because I haven't specified the version number along with the "+quartz" in the "port activate" command?  Doing that would be a pain…

Is there a better way?

Does the fact that some of the ports don't have an explicit +x11 variant matter?  They apparently use x11 as long as +quartz isn't provided.   Do those ports have to be treated differently from the ones that do have an explicit +x11 variant?

Thanks.
 
-- Steve




More information about the macports-users mailing list