-no_X11 and dmg size for tuxmath

Ryan Schmidt ryandesign at macports.org
Thu May 5 21:26:01 PDT 2011

On May 5, 2011, at 12:39, David Bruce wrote:

> I've submitted an updated portfile for tuxmath as well as a portfile
> for t4k_common, our internal library.
> One of my objectives with macports was to hopefully come up with an
> easy way to build a tuxmath dmg to distribute from our website.  I
> have a macports installation under /opt/local/tux4kids for this
> purpose.  Happily, "sudo port dmg tuxmath" now succeeds (it didn't a
> couple of years ago), but it creates a really big file (~120MB).  Is
> it possible to reduce this in some way?  In particular, I wonder if I
> can get rid of all the X-related libs by specifying the "-no_X11"
> variant, perhaps with a third macports under something like
> /opt/local/t4k_no_X11.

You specify that you want a variant turned on by typing "+" and its name, e.g. "+no_x11"; you specify that you want a variant turned off by typing "-" and its name, e.g. "-x11".

The flat registry that MacPorts used to use could not remember variants you turned off (i.e. those specified with "-") which led to a convention of using variants with "no_" in their name, leading to constructs like "+no_x11" ("turn on the no_x11 variant"). Now that MacPorts has the sqlite registry which does remember turned-off variants, we prefer positively-named variants, specified as default variants where applicable, that the user can turn off if desired (e.g. "-x11": "turn off the x11 variant").


There has not yet been a concerted effort to fix the "no_*" variants that exist, so some ports still have "no_x11" variants that you have to enable, whereas others have "x11" default variants that you have to disable. So if you want to disable X11 in all ports that have such an option, you should specify both -x11 and +no_x11, perhaps in your variants.conf.

More information about the macports-dev mailing list