Turning off default variants
ryandesign at macports.org
Sat May 16 21:06:01 PDT 2009
On May 16, 2009, at 19:04, Mike Alexander wrote:
> I installed swig with:
> port install swig +guile+perl+python+ruby-php5
> since I don't need php5 in swig and don't want to install apache2
> just to get it.
Note that you don't need apache2 to get php5. php5 will depend on
apache2 by default, but you can install php5 with the +no_web variant.
sudo port install php5 +no_web
Then it will not require apache2.
> However when I enter "port installed swig" I get
> The following ports are currently installed:
> swig @1.3.39_0+guile+perl+python+ruby (active)
> What happened to the "-php5"? This is relevant since later when I
> upgrade swig it will get the +php5 variant again (since it is the
> default) and try to install apache2.
MacPorts does not store in the registry the fact that you requested -
php5. You must specify -php5 every time you upgrade in order to
retain that selection. Hopefully this deficiency will be remedied by
registry 2.0, but I don't know of a timeline for getting that done.
It was started a few years ago but the code may have rotted since then.
Until this is fixed in base, port maintainers should use default
variants extremely sparingly. It is usually better to enable a
functionality by default and then offer a +no_whatever variant to
turn it off.
More information about the macports-users