Changeset 32539 for trunk/doc-new


Ignore:
Timestamp:
Jan 7, 2008, 5:58:13 PM (12 years ago)
Author:
simon@…
Message:

doc-new: Added platform option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc-new/guide/xml/portfile-variants.xml

    r32063 r32539  
    106106      </listitem>
    107107    </varlistentry>
     108
     109    <varlistentry>
     110      <term>platform <replaceable>platform</replaceable>
     111      [<replaceable>version</replaceable>]
     112      [<replaceable>arch</replaceable>]</term>
     113
     114      <listitem>
     115        <para>MacPorts allows for platform-specific conditional modification
     116        to be specified in a Portfile, much like variants, for handling
     117        differences between platforms and versions of the same
     118        platform.</para>
     119
     120        <para><literal>platform darwin
     121        <replaceable>version</replaceable></literal> can be used to handle
     122        different tasks depending on the version of Mac OS X.
     123        <replaceable>version</replaceable> can be <literal>6</literal> for
     124        10.2 Jaguar, <literal>7</literal> for 10.3 Panther,
     125        <literal>8</literal> for 10.4 Tiger or <literal>9</literal> for 10.5
     126        Leopard.</para>
     127
     128        <itemizedlist>
     129          <listitem>
     130            <para>Default: ???</para>
     131          </listitem>
     132
     133          <listitem>
     134            <para>Examples:</para>
     135
     136            <programlisting>
     137platform darwin 7 {
     138    # Only used on Mac OS X 10.3.
     139    configure.args-append \
     140        --enable-tcl \
     141        --with-tcl=/System/Library/Tcl/8.3
     142}</programlisting>
     143            <programlisting>
     144platform darwin powerpc {
     145    # Only used if Mac OS X is running on a PowerPC processor.
     146    configure.args-append \
     147        --host=${os.arch}-apple-rhapsody${os.version}
     148}
     149platform darwin i386 {
     150    # Only used if Mac OS X is running on an Intel processor.
     151    configure.args-append \
     152        --host=i386-gnu-rhapsody${os.version}
     153}</programlisting>
     154          </listitem>
     155        </itemizedlist>
     156      </listitem>
     157    </varlistentry>
    108158  </variablelist>
    109159</section>
Note: See TracChangeset for help on using the changeset viewer.