Per package default variants

Ryan Schmidt ryandesign at
Sun Sep 25 22:50:54 PDT 2011

On Sep 25, 2011, at 03:08, Alexander Skwar wrote:

> Is there a way to pre-define variants, a certain package should or
> should not use?
> Eg.
> Let's say I'd want to build curl without ssl and with sftp_scp. All
> other packages should, by default, be built with ssl (if they support
> it).
> When "manually" installing the package, I'd run
> sudo port install curl -ssl +sftp_scp
> If I'd want to have all packages without ssl, I'd add
> -ssl
> to ~/.macports/variants.conf
> But that would effect all packages.
> Well, how to go about it?

This has been suggested before:

I still don't see the benefit of it. If you can explain, please do. But I don't see why you don't want to just run:

sudo port install curl -ssl +sftp_scp

In other words, the install command right there is how you specify that you want specific variants for a specific port. MacPorts will remember those selections across port upgrades. So the only time MacPorts would "forget" your selected variants is if you deliberately uninstall the port, but if you do that, doesn't that mean you're no longer interested in the port?

More information about the macports-users mailing list