Changeset 27221 for trunk/doc


Ignore:
Timestamp:
Jul 25, 2007, 4:37:26 AM (12 years ago)
Author:
markd@…
Message:

Add a section for default variants.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/guide/new/xml/portfileref.xml

    r27196 r27221  
    134134
    135135    <para>Variants are a way for port authors to provide options that may be
    136     invoked at install time. They are declared in a Portfile's global section
    137     using the "variant" keyword and may provide a description.</para>
     136    invoked at install time. They are declared in a
     137    <filename>Portfile</filename>'s global section using the "variant" keyword
     138    and may provide a description.</para>
    138139
    139140    <section>
     
    142143      <para>The most common use for a variant is to add or remove
    143144      dependencies, configure arguments, and build arguments from the global
    144       Portfile section. In the example below, the global configure argument
    145       --without-x11 is removed and others are appended.</para>
     145      <filename>Portfile</filename> section. In the example below, the global
     146      configure argument --without-x11 is removed and others are
     147      appended.</para>
    146148
    147149      <programlisting>variant x11 description {Builds port as an X11 program with Lucid widgets} {
     
    184186}</programlisting>
    185187    </section>
     188
     189    <section>
     190      <title>Default Variants</title>
     191
     192      <para>Variants are used to specify actions that lie outside the core
     193      functions of an application or port, but there may be some cases where
     194      you wish to specify these non-core functions by default. For this
     195      purpose you may use the keyword default_variants.</para>
     196
     197      <programlisting>default_variants +foo +bar</programlisting>
     198
     199      <note>
     200        <para>The default_variant keyword may only be used in the global
     201        <filename>Portfile</filename> section.</para>
     202      </note>
     203    </section>
    186204  </section>
    187205
Note: See TracChangeset for help on using the changeset viewer.