Variants are a way for port authors to provide options for a port that may be chosen during the port install. To display the available variants, if any, use this command:
%%port variants fetchmail
fetchmail has the variants:
universal
ssl: Support secure connections using OpenSSL
fetchmailconf: Install a graphical configurator
ntlm: Enable NTLM authenticationIn some ports, you may find variants for which descriptions have not yet been written.
A variant can only be invoked when a port is installed. After you have determined what variants a given port has, if any, you may install a port using the variant as shown.
%%sudo port install fetchmail +ssl
Port variant execution may be verified using the port command with the verbose switch.
%%sudo port -v install fetchmail +ssl
When a port is installed using a valid variant and specified correctly, the verbose output will contain:
DEBUG: Executing variant ssl provides ssl
For an explanation of default variants see Port Variants. Default variants are optional, and not all ports using variants have them. For ports with default variants, you may install a port without them by negating default variants using “-” as shown.
%%sudo port install fetchmail -ssl
To verify that you have properly negated a default variant, you may want to use verbose mode. But negated variants are simply not reported in any way by the port command, as if they did not exist. You will know you have successfully negated the default variant in the example above if you do not see this line in the verbose output.
DEBUG: Executing variant ssl provides ssl