// vim: set et sw=4 ts=8 ft=asciidoc tw=80:
variants.conf(5)
================

NAME
----
variants.conf - Global variant configuration file of the MacPorts system

DESCRIPTION
-----------
*variants.conf* is the configuration file used to globally select or deselect
certain variants on all ports installed by MacPorts. Changes in this file will
affect all ports that are installed after the file was changed.

For a description of what variants are and how they work, see
man:port-variants[1].

*variants.conf* is read by the *port* command. In the file, lines beginning with
'#' are comments, empty lines are ignored. Each line in the file is a space- or
tab-delimited list of zero or more variants, where each variant is either
explicitly enabled or disabled using a leading '+' or '-'. In EBNF:
----
line    = variant, { space, variant } ;
space   = ' ' | '\t' ;
variant = ( '+' | '-' ), name ;
----
where 'name' is the name of the variant. Variants that are not provided by
a port (or no port at all) are silently ignored.

FILES
-----
The path of the 'variants.conf' file is specified in the *variants_conf* option
of man:macports.conf[5]. It defaults to
'$\{prefix\}/etc/macports/variants.conf'. There is no user-specific
'variants.conf' file, but support for this can be emulated by setting
'variants.conf' in the user-specific man:macports.conf[5] file.

EXAMPLES
--------
To prefer the '+quartz' variant over '+x11', you can add the following line to
your variants.conf:
----
-x11 +quartz
----
This will disable all x11 variants and enable the quartz variant, when it
exists.

Similarly, if you want all your ports to support multiple architectures, you can
enable the universal variant by default:
----
+universal
----

SEE ALSO
--------
man:port[1], man:port-variants[1]

AUTHORS
-------
  (C) 2015 The MacPorts Project
  Clemens Lang <cal@macports.org>
