// vim: set et sw=4 ts=8 ft=asciidoc tw=80:
port-variants(1)
================

NAME
----
port-variants - Print a list of variants with descriptions provided by a port

SYNOPSIS
--------
[cmdsynopsis]
*port* [*-qvd*] [*-D* 'portdir'] *variants* [--index]
     [['portname' | 'pseudo-portname' | 'port-expressions' | 'port-url']]
     [+/-variant ...]

DESCRIPTION
-----------
*port variants* prints a list of variants provided by the port(s) given on the
command line. Variants allow users to select certain features when installing
a certain port. For example, the +gtk3+ port provides two conflicting variants
'+quartz' and '+x11' that select whether Gtk uses the X11 backend (which
requires an X server) or the macOS-native Quartz backend (which attempts to
provide a more native macOS look and feel). In addition, many ports feature an
'+universal' variant that enables building of universal (i.e. multi-arch)
binaries.

*port variants* lists all variants by name and (if available) description. If
variants depend on or conflict with other variants, this information is printed
as a bulleted list for each variant.

The output of *port variants* contains '[\+]' before a variant name, if the port
declares this variant as default. '(\+)' or '(-)' in the same spot mark variants
enabled or disabled by your man:variants.conf[5]. Last, a single '+' or '-'
marks variants explicitly enabled or disabled on the command line by appending
'+variantname' or '-variantname'.

OPTIONS
-------
*--index*::
    Do not read the 'Portfile', but rely solely on the port index information.
    Note that this will limit the output to the variant names only. No
    descriptions, dependencies or conflicts between variants will be reported.

include::global-flags.txt[]

*-q*::
    Do not print the header line.

EXAMPLES
--------
The output of *port variants* provides all available information on a port's
variants. The +gtk3+ port can serve as a good example:
----
$> port variants gtk3 -universal
gtk3 has the variants:
(+)quartz: Enable native macOS graphics support
     * conflicts with x11
  -universal: Build for multiple architectures
[+]x11: Enable X11 support
     * conflicts with quartz
----
In this case, '(\+)' means that we have chosen '\+quartz' as a default variant in
our man:variants.conf[5]. Additionally, we have explicitly disabled the
universal variant on the command line, as indicated by its leading '-' symbol.
Finally, the port maintainer has chosen '\+x11' as the default, indicated by
'[+]'. Furthermore, the 'quartz' and 'x11' variants conflict with each other.

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

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