Changeset 30832 for trunk/doc-new


Ignore:
Timestamp:
Nov 8, 2007, 8:00:47 AM (12 years ago)
Author:
markd@…
Message:

Remove sections that are now xincluded from the new man page sources: dependencies,
startupitems, variables, keywords, and Tcl extensions; xinclude the new portgroup.7.

File:
1 edited

Legend:

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

    r30695 r30832  
    1313
    1414    <xi:include href="../../man/xml/portfile.7.xml"
    15       xmlns:xi="http://www.w3.org/2001/XInclude" />
     15                xmlns:xi="http://www.w3.org/2001/XInclude" />
    1616  </section>
    1717
     
    2020
    2121    <xi:include href="../../man/xml/portfile-global.7.xml"
    22         xmlns:xi="http://www.w3.org/2001/XInclude" />
     22                xmlns:xi="http://www.w3.org/2001/XInclude" />
    2323  </section>
    2424
     
    2727
    2828    <xi:include href="../../man/xml/portfile-phase.7.xml"
    29       xmlns:xi="http://www.w3.org/2001/XInclude" />
     29                xmlns:xi="http://www.w3.org/2001/XInclude" />
    3030  </section>
    3131
    3232  <section id="reference.startupitem">
    3333    <title>Portfile Startupitem</title>
    34    
     34
    3535    <xi:include href="../../man/xml/portfile-startupitem.7.xml"
    36       xmlns:xi="http://www.w3.org/2001/XInclude" />
     36                xmlns:xi="http://www.w3.org/2001/XInclude" />
    3737  </section>
    3838
     
    4141
    4242    <xi:include href="../../man/xml/portfile-tcl.7.xml"
    43     xmlns:xi="http://www.w3.org/2001/XInclude" />
    44   </section>
    45 
     43                xmlns:xi="http://www.w3.org/2001/XInclude" />
     44  </section>
     45
     46  section id="reference.portgroup">
     47    <title>PortGroup</title>
     48
     49    <xi:include href="../../man/xml/portgroup.7.xml"
     50                xmlns:xi="http://www.w3.org/2001/XInclude" />
     51
     52    </section>
    4653
    4754  <section id="reference.phases">
     
    178185  </section>
    179186
    180   <section id="reference.dependencies">
    181     <title>Dependencies</title>
    182 
    183     <para>Free and open source software is highly modular, and MacPorts ports
    184     often require modules not provided in a port's distribution to be
    185     installed before a port may be installed, compiled, or run. These support
    186     modules are generally other MacPorts ports, and the ports required to
    187     satisfy prerequistes for a given port are called a port's
    188     "dependencies".</para>
    189 
    190     <para>There are three types of dependencies in MacPorts: library, build,
    191     and run dependencies. The dependency type is important for proper port
    192     upgrade and uninstall behavior. For example, you may not uninstall a port
    193     that is a library dependency for another port, though you may remove one
    194     with a build dependency; likewise, upgrading a port will upgrade its
    195     library and build dependencies also, but not its run dependencies.</para>
    196 
    197     <section id="reference.dependencies.dependslib">
    198       <title>depends_lib</title>
    199 
    200       <para>The list of dependencies to check before phases
    201       <option>configure</option>, <option>build</option>,
    202       <option>destroot</option>, <option>install</option>, and
    203       <option>package</option>. Library dependencies are needed both at build
    204       time (for headers and libraries to link against) and at run time.</para>
    205 
    206       <programlisting>depends_lib         port:rrdtool</programlisting>
    207     </section>
    208 
    209     <section id="reference.dependencies.dependsbuild">
    210       <title>depends_build</title>
    211 
    212       <para>The list of dependencies to check before phases
    213       <option>build</option>, <option>destroot</option>,
    214       <option>install</option>, and <option>package</option>. Build
    215       dependencies are needed when software is compiled, but not needed at all
    216       once the software is compiled and installed.</para>
    217 
    218       <programlisting>depends_build       port:gcc42</programlisting>
    219     </section>
    220 
    221     <section id="reference.dependencies.dependsrun">
    222       <title>depends_run</title>
    223 
    224       <para>The list of dependencies to check before phases
    225       <option>destroot</option>, <option>install</option>, and
    226       <option>package</option>. Run dependencies are needed when the software
    227       is run, but not to compile it.</para>
    228 
    229       <programlisting>depends_run         port:apache2</programlisting>
    230     </section>
    231 
    232     <section id="reference.dependencies.nonport">
    233       <title>Non-Port Dependencies</title>
    234 
    235       <para>Port dependencies should refer to other MacPorts ports whenever
    236       possible. However, if satisfying a dependency with a port is not
    237       practical or desirable for a special reason, you may specify
    238       dependencies by having MacPorts test for an individual file by replacing
    239       <literal>port:</literal> with one of the options <literal>lib: bin: or
    240       path:</literal>.</para>
    241 
    242       <para>In this lib style dependency, if the file
    243       <filename>libX11.6.x.dylib</filename> is not found in the library path
    244       the XFree86 port will be installed to satisfy it.</para>
    245 
    246       <programlisting>depends_lib         lib:libX11.6:XFree86</programlisting>
    247 
    248       <para>In this bin style dependency, if the <filename>python</filename>
    249       binary is not found in the shell's binary path the port python24 will be
    250       installed.</para>
    251 
    252       <programlisting>depends_build       bin:python:python24</programlisting>
    253 
    254       <para>In this path style dependency, if the file
    255       <filename>/usr/bin/nano</filename> is not found the nano port will be
    256       installed.</para>
    257 
    258       <programlisting>depends_run         path:/usr/bin/nano:nano</programlisting>
    259     </section>
    260   </section>
    261 
    262   <section id="reference.startupitems">
    263     <title>StartupItems</title>
    264 
    265     <para>StartupItems are keywords that create Mac OS X startup scripts for
    266     <ulink
    267     url="http://developer.apple.com/macosx/launchd.html">launchd</ulink>, the
    268     facility intoduced by Apple beginning with OS X 10.4, that starts, stops,
    269     and manages daemons, programs and scripts. Port authors use StartupItem
    270     keywords within Portfiles to instruct MacPorts to generate and install
    271     <command>launchd</command> scripts for daemons during port installation.
    272     To support launchd, a wrapper program named <command>daemondo</command> is
    273     provided by MacPorts base that serves as an adapter between OS X's
    274     <command>launchd</command> and daemons that are normally started via
    275     traditional rc.d style scripts.</para>
    276 
    277     <para>There are three categories of StartupItem keywords. Those that
    278     trigger StartupItem creation and setup logging, those that specify
    279     attributes of <quote>executable</quote> StartupItems, and those that
    280     specify attributes of <quote>script</quote> StartupItems.</para>
    281 
    282     <section id="reference.startupitems.creation">
    283       <title>StartupItem Creation &amp; Logging</title>
    284 
    285       <para>The keywords in this section may be used with either
    286       <quote>executable</quote> or <quote>script</quote> StartupItems (see
    287       below).</para>
    288 
    289       <variablelist>
    290         <varlistentry>
    291           <term>startupitem.create</term>
    292 
    293           <listitem>
    294             <para>Trigger the creation of a StartupItem.</para>
    295 
    296             <simplelist>
    297               <member>Type: optional</member>
    298 
    299               <member>Default: <option>no</option></member>
    300 
    301               <member>Values: <option>yes no</option></member>
    302 
    303               <member>Example:</member>
    304             </simplelist>
    305 
    306             <programlisting>startupitem.create  yes</programlisting>
    307           </listitem>
    308         </varlistentry>
    309 
    310         <varlistentry>
    311           <term>startupitem.name</term>
    312 
    313           <listitem>
    314             <para>Sets the name for the StartupItem.</para>
    315 
    316             <simplelist>
    317               <member>Type: required</member>
    318 
    319               <member>Default: none</member>
    320 
    321               <member>Values: <replaceable>any name</replaceable></member>
    322 
    323               <member>Example:</member>
    324             </simplelist>
    325 
    326             <programlisting>startupitem.name  OpenSSH</programlisting>
    327           </listitem>
    328         </varlistentry>
    329 
    330         <varlistentry>
    331           <term>startupitem.logfile</term>
    332 
    333           <listitem>
    334             <para>Path to a logfile for logging events about the lifetime of
    335             the StartupItem. Depending on the type of StartupItem, and the
    336             manner in which it is started, standard output from the daemon may
    337             also be directed to the logfile.</para>
    338 
    339             <simplelist>
    340               <member>Type: optional</member>
    341 
    342               <member>Default: <option>/dev/null</option></member>
    343 
    344               <member>Values: <replaceable>/file/path/</replaceable></member>
    345 
    346               <member>Example:</member>
    347             </simplelist>
    348 
    349             <programlisting>startupitem.logfile  ${prefix}/var/log/mydaemon.log</programlisting>
    350           </listitem>
    351         </varlistentry>
    352 
    353         <varlistentry>
    354           <term>startupitem.logevents</term>
    355 
    356           <listitem>
    357             <para>Control whether or not to log events to the log file. If
    358             logevents is set, events with timestamps are logged to the
    359             logfile.</para>
    360 
    361             <simplelist>
    362               <member>Type: optional</member>
    363 
    364               <member>Default: <option>no</option></member>
    365 
    366               <member>Values: <option>yes no</option></member>
    367 
    368               <member>Example:</member>
    369             </simplelist>
    370 
    371             <programlisting>startupitem.logevents   yes</programlisting>
    372           </listitem>
    373         </varlistentry>
    374       </variablelist>
    375     </section>
    376 
    377     <section id="reference.startupitems.executable">
    378       <title>Executable StartupItems</title>
    379 
    380       <para><quote>Executable</quote> StartupItems are slightly preferred over
    381       <quote>script</quote> StartupItems because <command>daemondo</command>
    382       launches the daemon directly, rather than indirectly via a startup
    383       script, and therefore it automatically knows how to monitor the daemon
    384       to restart it if it dies. The <quote>executable</quote> StartupItem
    385       specifies the path and name of the daemon to be run in the
    386       background.</para>
    387 
    388       <note>
    389         <para>For a given port, the <quote>executable</quote> StartupItem
    390         keyword may not be used with any keywords in the <quote>script</quote>
    391         StartupItem category.</para>
    392       </note>
    393 
    394       <variablelist>
    395         <varlistentry>
    396           <term>startupitem.executable</term>
    397 
    398           <listitem>
    399             <para>Specifies the name of the daemon to be run in the
    400             background. It may have multiple arguments, but they must be
    401             appropriate for a call to exec; arbitrary shell code may not be
    402             used.</para>
    403 
    404             <simplelist>
    405               <member>Type: optional</member>
    406 
    407               <member>Default: <option>no</option></member>
    408 
    409               <member>Values:
    410               <replaceable>/path/to/executable</replaceable></member>
    411 
    412               <member>Example:</member>
    413             </simplelist>
    414 
    415             <programlisting>startupitem.executable  "${prefix}/bin/nmicmpd"</programlisting>
    416           </listitem>
    417         </varlistentry>
    418       </variablelist>
    419     </section>
    420 
    421     <section id="reference.startupitems.script">
    422       <title>Script StartupItems</title>
    423 
    424       <para>StartupItems of type <quote>script</quote> use
    425       <command>daemondo</command> to launch a daemon via a startup script
    426       provided in port distributions containing daemons. When using this type
    427       of StartupItem, the <code>startupitem.pidfile</code> keyword may be used
    428       so <command>daemondo</command> can monitor the daemon's PID and restart
    429       it if it dies.</para>
    430 
    431       <note>
    432         <para>For a given port, StartupItem keywords in category
    433         <quote>script</quote> may not be used with an
    434         <quote>executable</quote> StartupItem keyword.</para>
    435       </note>
    436 
    437       <variablelist>
    438         <varlistentry>
    439           <term>startupitem.start</term>
    440 
    441           <listitem>
    442             <para>Specify a shell script to start the daemon.</para>
    443 
    444             <simplelist>
    445               <member>Type: optional</member>
    446 
    447               <member>Default: none</member>
    448 
    449               <member>Values: <literal>shell_script</literal></member>
    450 
    451               <member>Example:</member>
    452             </simplelist>
    453 
    454             <programlisting>startupitem.start ${prefix}/share/mysql/mysql.server start</programlisting>
    455           </listitem>
    456         </varlistentry>
    457 
    458         <varlistentry>
    459           <term>startupitem.stop</term>
    460 
    461           <listitem>
    462             <para>Specify a shell script to stop the daemon.</para>
    463 
    464             <simplelist>
    465               <member>Type: optional</member>
    466 
    467               <member>Default: none</member>
    468 
    469               <member>Values: <literal>shell_script</literal></member>
    470 
    471               <member>Example:</member>
    472             </simplelist>
    473 
    474             <programlisting>startupitem.start ${prefix}/share/mysql/mysql.server stop</programlisting>
    475           </listitem>
    476         </varlistentry>
    477 
    478         <varlistentry>
    479           <term>startupitem.restart</term>
    480 
    481           <listitem>
    482             <para>Specify a shell script to restart the daemon. In the absence
    483             of this key, the daemon will be restarted by taking the stop
    484             action, followed by taking the start action.</para>
    485 
    486             <simplelist>
    487               <member>Type: optional</member>
    488 
    489               <member>Default: none</member>
    490 
    491               <member>Values: <literal>shell_script</literal></member>
    492 
    493               <member>Example:</member>
    494             </simplelist>
    495 
    496             <programlisting>startupitem.start  ${prefix}/share/mysql/mysql.server restart</programlisting>
    497           </listitem>
    498         </varlistentry>
    499 
    500         <varlistentry>
    501           <term>startupitem.pidfile</term>
    502 
    503           <listitem>
    504             <para>This keyword must be defined properly for
    505             <command>daemondo</command> to be able to monitor daemons launched
    506             via <quote>script</quote> StartupItems and restart them if they
    507             die. It specifies two things: a process id (PID) file handling
    508             method, and a pidfile name and path.</para>
    509 
    510             <simplelist>
    511               <member>Type: optional</member>
    512 
    513               <member>Default: <option>[none]</option> |
    514               <filename>[${prefix}/var/run/${name}.pid]</filename></member>
    515 
    516               <member>Values: <option>[none auto manual clean]</option>
    517               [<replaceable>/path/to/pidfile</replaceable>]</member>
    518 
    519               <member>Example:</member>
    520             </simplelist>
    521 
    522             <programlisting>startupitem.pidfile auto ${prefix}/var/run/${name}.pidfile</programlisting>
    523 
    524             <para>Pidfile handling options:</para>
    525 
    526             <simplelist>
    527               <member><option>none</option> - The daemon is not to use a
    528               pidfile.</member>
    529 
    530               <member><option>auto</option> - The daemon generates its own
    531               pidfile.</member>
    532 
    533               <member><option>manual</option> - The daemon never generates a
    534               pidfile; the StartupItem must manage the pidfile on its
    535               own.</member>
    536 
    537               <member><option>clean</option> - The daemon generates its own
    538               but will not delete it; the StartupItem must delete it.</member>
    539             </simplelist>
    540           </listitem>
    541         </varlistentry>
    542 
    543         <varlistentry>
    544           <term>startupitem.init</term>
    545 
    546           <listitem>
    547             <para>Shell code that will be executed prior to any of the options
    548             <code>startupitem.start</code>, <code>startupitem.stop</code> and
    549             <code>startupitem.restart</code>.</para>
    550 
    551             <simplelist>
    552               <member>Type: optional</member>
    553 
    554               <member>Default: <option>no</option></member>
    555 
    556               <member>Values: <literal>shell_script</literal></member>
    557 
    558               <member>Example:</member>
    559             </simplelist>
    560 
    561             <programlisting>startupitem.init  "PID=/var/run/dhcpd.pid"</programlisting>
    562           </listitem>
    563         </varlistentry>
    564       </variablelist>
    565     </section>
    566   </section>
    567 
    568   <section id="reference.variables">
    569     <title>Variables</title>
    570 
    571     <para>This section describes the MacPorts preset variables that may be
    572     used within Portfiles.</para>
    573 
    574     <section id="reference.variables.general">
    575       <title>General</title>
    576 
    577       <para>These are the variables available to any
    578       <filename>Portfile</filename>.</para>
    579 
    580       <para><variablelist>
    581           <varlistentry>
    582             <term>prefix</term>
    583 
    584             <listitem>
    585               <para>Installation prefix, set in the system-wide configuration
    586               file <filename>${prefix}/etc/macports/macports.conf</filename>
    587               —may be overridden on a per port basis. For example, aqua
    588               applications are installed in
    589               <filename>/Applications/MacPorts</filename>.</para>
    590             </listitem>
    591           </varlistentry>
    592 
    593           <varlistentry>
    594             <term>binpath</term>
    595 
    596             <listitem>
    597               <para>Default PATH to use in finding executables. Read
    598               only.</para>
    599             </listitem>
    600           </varlistentry>
    601 
    602           <varlistentry>
    603             <term>libpath</term>
    604 
    605             <listitem>
    606               <para>Path to the MacPorts TCL libraries. Read only.</para>
    607             </listitem>
    608           </varlistentry>
    609 
    610           <varlistentry>
    611             <term>portpath</term>
    612 
    613             <listitem>
    614               <para>Path to the directory containing the downloaded Read
    615               only.</para>
    616             </listitem>
    617           </varlistentry>
    618 
    619           <varlistentry>
    620             <term>filesdir</term>
    621 
    622             <listitem>
    623               <para>Path to port files relative to
    624               <varname>${portpath}</varname>. Read only.</para>
    625             </listitem>
    626           </varlistentry>
    627 
    628           <varlistentry>
    629             <term>workpath</term>
    630 
    631             <listitem>
    632               <para>Full path to work directory. Read only.</para>
    633             </listitem>
    634           </varlistentry>
    635 
    636           <varlistentry>
    637             <term>worksrcpath</term>
    638 
    639             <listitem>
    640               <para>Full path to extracted source code. Equivalent to
    641               <varname>${workpath}/${worksrcdir}</varname>.</para>
    642             </listitem>
    643           </varlistentry>
    644 
    645           <varlistentry>
    646             <term>destroot</term>
    647 
    648             <listitem>
    649               <para>Full path into which software will be destrooted.
    650               Equivalent to <filename>${workpath}/destroot</filename>. Read
    651               only.</para>
    652             </listitem>
    653           </varlistentry>
    654 
    655           <varlistentry>
    656             <term>distpath</term>
    657 
    658             <listitem>
    659               <para>Location to store downloaded distfiles. Read only.</para>
    660             </listitem>
    661           </varlistentry>
    662 
    663           <varlistentry>
    664             <term>install.user</term>
    665 
    666             <listitem>
    667               <para>The Unix user at the time of port installation.</para>
    668             </listitem>
    669           </varlistentry>
    670 
    671           <varlistentry>
    672             <term>install.group</term>
    673 
    674             <listitem>
    675               <para>The Unix group at the time of port installation.</para>
    676             </listitem>
    677           </varlistentry>
    678 
    679           <varlistentry>
    680             <term>os.platform</term>
    681 
    682             <listitem>
    683               <para>Identifies platform type (ie, "darwin", "freebsd", etc).
    684               Read only.</para>
    685             </listitem>
    686           </varlistentry>
    687 
    688           <varlistentry>
    689             <term>os.arch</term>
    690 
    691             <listitem>
    692               <para>Identifies hardware type (ie, "powerpc", "intel"). Read
    693               only.</para>
    694             </listitem>
    695           </varlistentry>
    696 
    697           <varlistentry>
    698             <term>os.version</term>
    699 
    700             <listitem>
    701               <para>The version number of the host operating system (ie "8.0"
    702               for Darwin 8.0). Read only.</para>
    703             </listitem>
    704           </varlistentry>
    705 
    706           <varlistentry>
    707             <term>os.major</term>
    708 
    709             <listitem>
    710               <para>The major version number of the host operating system (ie
    711               "8" for Darwin 8.0). Read only.</para>
    712             </listitem>
    713           </varlistentry>
    714         </variablelist></para>
    715     </section>
    716 
    717     <section id="reference.variables.portgroup">
    718       <title>PortGroup Variables</title>
    719 
    720       <para>In addition to the general <filename>Portfile</filename> type for
    721       standard Unix applications and libraries, there are six optional
    722       PortGroup types that provide special <filename>Portfile</filename>
    723       handling to make creating <filename>a Portfile</filename> easier.</para>
    724 
    725       <itemizedlist>
    726         <listitem>
    727           <para>perl5</para>
    728         </listitem>
    729 
    730         <listitem>
    731           <para>python24 and python25</para>
    732         </listitem>
    733 
    734         <listitem>
    735           <para>ruby</para>
    736         </listitem>
    737 
    738         <listitem>
    739           <para>xcode</para>
    740         </listitem>
    741 
    742         <listitem>
    743           <para>gnustep</para>
    744         </listitem>
    745 
    746         <listitem>
    747           <para>zope</para>
    748         </listitem>
    749       </itemizedlist>
    750 
    751       <para>Some PortGroups provide additional variables when they are
    752       declared within a Portfile. The additional variables provided by
    753       PortGroups perl5, python, and ruby are listed below. You may view the
    754       port Tcl code for each group in the directory<filename>
    755       ${prefix}/share/macports/resources/port1.0/group</filename>.</para>
    756 
    757       <variablelist>
    758         <varlistentry>
    759           <term>PortGroup perl5</term>
    760 
    761           <listitem>
    762             <para>Description: The variables available to a
    763             <filename>Portfile</filename> when the <literal>PortGroup
    764             perl5</literal> keyword is declared.</para>
    765 
    766             <variablelist>
    767               <varlistentry>
    768                 <term>perl5.version</term>
    769 
    770                 <listitem>
    771                   <para>The MacPorts Perl version.</para>
    772                 </listitem>
    773               </varlistentry>
    774             </variablelist>
    775 
    776             <variablelist>
    777               <varlistentry>
    778                 <term>perl5.bin</term>
    779 
    780                 <listitem>
    781                   <para>The Perl binary path (ie,
    782                   <filename>${prefix}/bin/perl</filename>).</para>
    783                 </listitem>
    784               </varlistentry>
    785             </variablelist>
    786 
    787             <variablelist>
    788               <varlistentry>
    789                 <term>perl5.lib</term>
    790 
    791                 <listitem>
    792                   <para>Path to the Perl vendor directory.</para>
    793                 </listitem>
    794               </varlistentry>
    795             </variablelist>
    796 
    797             <variablelist>
    798               <varlistentry>
    799                 <term>perl5.archlib</term>
    800 
    801                 <listitem>
    802                   <para>Path to the Perl architecture-dependent modules
    803                   directory.</para>
    804                 </listitem>
    805               </varlistentry>
    806             </variablelist>
    807           </listitem>
    808         </varlistentry>
    809       </variablelist>
    810 
    811       <variablelist>
    812         <varlistentry>
    813           <term>PortGroup python2x</term>
    814 
    815           <listitem>
    816             <para>Description: The variables available to a
    817             <filename>Portfile</filename> when the <literal>PortGroup
    818             python2x</literal> keyword is declared.</para>
    819 
    820             <variablelist>
    821               <varlistentry>
    822                 <term>python.bin</term>
    823 
    824                 <listitem>
    825                   <para>The MacPorts Python binary location.</para>
    826                 </listitem>
    827               </varlistentry>
    828             </variablelist>
    829 
    830             <variablelist>
    831               <varlistentry>
    832                 <term>python.lib</term>
    833 
    834                 <listitem>
    835                   <para>The Python dynamic library and path (ie,
    836                   <filename>${prefix}/lib/libpython2.x.dylib</filename>).</para>
    837                 </listitem>
    838               </varlistentry>
    839             </variablelist>
    840 
    841             <variablelist>
    842               <varlistentry>
    843                 <term>python.include</term>
    844 
    845                 <listitem>
    846                   <para>Path to the Python include directory.</para>
    847                 </listitem>
    848               </varlistentry>
    849             </variablelist>
    850 
    851             <variablelist>
    852               <varlistentry>
    853                 <term>python.pkgd</term>
    854 
    855                 <listitem>
    856                   <para>Path to the Python site-packages directory. (ie,
    857                   <filename>${prefix}/lib/python2.4/site-packages</filename>).</para>
    858                 </listitem>
    859               </varlistentry>
    860             </variablelist>
    861           </listitem>
    862         </varlistentry>
    863       </variablelist>
    864 
    865       <variablelist>
    866         <varlistentry>
    867           <term>PortGroup ruby</term>
    868 
    869           <listitem>
    870             <para>Description: The variables available to a
    871             <filename>Portfile</filename> when the <literal>PortGroup
    872             ruby</literal> keyword is declared.</para>
    873 
    874             <variablelist>
    875               <varlistentry>
    876                 <term>ruby.version</term>
    877 
    878                 <listitem>
    879                   <para>The MacPorts Ruby version.</para>
    880                 </listitem>
    881               </varlistentry>
    882             </variablelist>
    883 
    884             <variablelist>
    885               <varlistentry>
    886                 <term>ruby.bin</term>
    887 
    888                 <listitem>
    889                   <para>The Ruby binary location.</para>
    890                 </listitem>
    891               </varlistentry>
    892             </variablelist>
    893 
    894             <variablelist>
    895               <varlistentry>
    896                 <term>ruby.lib</term>
    897 
    898                 <listitem>
    899                   <para>Path to the Ruby vendorlibdir directory (ie,
    900                   <filename>${prefix}/lib/ruby/vendor_ruby/${ruby.version}</filename>)</para>
    901                 </listitem>
    902               </varlistentry>
    903 
    904               <varlistentry>
    905                 <term>ruby.arch</term>
    906 
    907                 <listitem>
    908                   <para>The name for the Ruby architecture-dependent directory
    909                   name (ie, <literal>i686-darwin8.10.1</literal>).</para>
    910                 </listitem>
    911               </varlistentry>
    912             </variablelist>
    913 
    914             <variablelist>
    915               <varlistentry>
    916                 <term>ruby.archlib</term>
    917 
    918                 <listitem>
    919                   <para>Path to the Ruby vendor archdir (ie,
    920                   <filename>${ruby.lib}/${ruby.arch}</filename>).</para>
    921                 </listitem>
    922               </varlistentry>
    923             </variablelist>
    924           </listitem>
    925         </varlistentry>
    926       </variablelist>
    927     </section>
    928   </section>
    929 
    930   <section id="reference.keywords">
    931     <title>Keywords</title>
    932 
    933     <para>MacPorts keywords are used to specify required or optional items
    934     within a <filename>Portfile</filename>, or to override default options
    935     used by MacPorts base for individual ports when necessary. Keywords are to
    936     be used within the "global" and "variant" sections of Portfiles, and not
    937     within optional port phase declarations. In other words, port phase
    938     keywords are not located within port phase declarations, but rather they
    939     <emphasis>refer</emphasis> to port phases and set options for those
    940     phases, and they take affect whether or not phase declarations have been
    941     explicitly defined by a port author.</para>
    942 
    943     <para>The keywords listed below in category "global" specify information
    944     for ports as a whole, whereas the keywords listed under a port phase
    945     specify information to be used during a particular installation
    946     phase.</para>
    947 
    948     <section id="reference.keywords.append-delete">
    949       <title>Using -append and -delete Keywords</title>
    950 
    951       <para>It is often necessary to add to a list of keyword values
    952       previously set by MacPorts base or set by a prior Portfile keyword. In
    953       these cases we generally don't want to replace the current list, but
    954       rather to add or delete values from the list. For this purpose there are
    955       "-append" and "-delete" keywords; they are listed below according to
    956       keyword category. The three most common uses for these keywords are
    957       given below.</para>
    958 
    959       <itemizedlist>
    960         <listitem>
    961           <para>Preserve default configure arguments.</para>
    962 
    963           <para>MacPorts base sets the gcc compiler flags CFLAGS and LDFLAGS
    964           for all ports using <literal>configure.cflags</literal> and
    965           <literal>configure.ldflags</literal>, therefore to keep from
    966           overwriting the default compiler flags use:</para>
    967 
    968           <itemizedlist>
    969             <listitem>
    970               <para><literal>configure.cflags-append</literal></para>
    971             </listitem>
    972 
    973             <listitem>
    974               <para><literal>configure.ldflags-append</literal></para>
    975             </listitem>
    976           </itemizedlist>
    977         </listitem>
    978 
    979         <listitem>
    980           <para>Preserve default dependencies within a PortGroup.</para>
    981 
    982           <para>Ports in a PortGroup have default library dependencies set by
    983           MacPorts base. Therefore, never use <literal>depends_lib</literal>
    984           in ports belonging to a PortGroup or it will overwrite the default
    985           library dependencies. Instead, use:</para>
    986 
    987           <itemizedlist>
    988             <listitem>
    989               <para><literal>depends_lib-append</literal></para>
    990             </listitem>
    991           </itemizedlist>
    992         </listitem>
    993 
    994         <listitem>
    995           <para>Add or delete port dependencies, distfiles, patchfiles, etc.
    996           for port variants.</para>
    997 
    998           <para>When a variant requires more or fewer dependencies, distfiles,
    999           or patchfiles, you want to add or remove items to the list of
    1000           dependency keyword values that were set in the global section of the
    1001           Portfile. Use the appropriate keywords, for example:</para>
    1002 
    1003           <itemizedlist>
    1004             <listitem>
    1005               <para><literal>depends_lib-append</literal> or
    1006               <literal>depends_lib-delete</literal></para>
    1007             </listitem>
    1008 
    1009             <listitem>
    1010               <para><literal>distfiles-append</literal> or
    1011               <literal>distfiles-delete</literal></para>
    1012             </listitem>
    1013 
    1014             <listitem>
    1015               <para><literal>patchfiles-append</literal> or
    1016               <literal>patchfiles-delete</literal></para>
    1017             </listitem>
    1018           </itemizedlist>
    1019         </listitem>
    1020       </itemizedlist>
    1021     </section>
    1022 
    1023     <section id="reference.keywords.global">
    1024       <title>Global Keywords</title>
    1025 
    1026       <para>The list of global keywords.</para>
    1027 
    1028       <variablelist>
    1029         <varlistentry>
    1030           <term>PortSystem</term>
    1031 
    1032           <listitem>
    1033             <para>The top line of every Portfile; it must be followed by a
    1034             blank line. It defines which version of the Portfile interpreter
    1035             will be used.</para>
    1036 
    1037             <programlisting>PortSystem   1.0
    1038 
    1039 </programlisting>
    1040           </listitem>
    1041         </varlistentry>
    1042 
    1043         <varlistentry>
    1044           <term>name</term>
    1045 
    1046           <listitem>
    1047             <para>The name of the Port; it should be lowercase.</para>
    1048 
    1049             <simplelist>
    1050               <member>Type: required</member>
    1051 
    1052               <member>Default: none</member>
    1053             </simplelist>
    1054 
    1055             <programlisting>name         foo</programlisting>
    1056           </listitem>
    1057         </varlistentry>
    1058 
    1059         <varlistentry>
    1060           <term>version</term>
    1061 
    1062           <listitem>
    1063             <para>The version of the ported software.</para>
    1064 
    1065             <programlisting>version      1.23.45</programlisting>
    1066           </listitem>
    1067         </varlistentry>
    1068 
    1069         <varlistentry>
    1070           <term>revision</term>
    1071 
    1072           <listitem>
    1073             <para>Optional keyword (default is 0) that is used to track port
    1074             revisions. It should not be incremented for port revisions unless
    1075             it would benefit users to upgrade an installed port, and cleared
    1076             when the port is updated to a newer version.</para>
    1077 
    1078             <programlisting>revision     1</programlisting>
    1079           </listitem>
    1080         </varlistentry>
    1081 
    1082         <varlistentry>
    1083           <term>categories</term>
    1084 
    1085           <listitem>
    1086             <para>The category under which the ported software falls. The
    1087             first category should be the same as the directory within which
    1088             the Portfile is stored; secondary and tertiary categories may be
    1089             selected.</para>
    1090 
    1091             <programlisting>categories     net security</programlisting>
    1092           </listitem>
    1093         </varlistentry>
    1094 
    1095         <varlistentry>
    1096           <term>maintainers</term>
    1097 
    1098           <listitem>
    1099             <para>A port's maintainer is a person or persons who take
    1100             responsibility for keeping the port up-to-date, and the maintainer
    1101             keyword lists maintainer email addresses(s). However, many
    1102             maintainers wish to hide these addresses from spambots; to do so
    1103             follow these conventions:</para>
    1104 
    1105             <itemizedlist>
    1106               <listitem>
    1107                 <para>For addresses in domain @macports.org, simply omit the
    1108                 domain name.</para>
    1109               </listitem>
    1110 
    1111               <listitem>
    1112                 <para>For addresses in other domains, say
    1113                 <email>account@example.org</email>, use the convention
    1114                 example.org:account to specify the address.</para>
    1115               </listitem>
    1116             </itemizedlist>
    1117 
    1118             <para>In the example below, the maintainer email addresses
    1119             <email>jdoe@macports.org</email> and
    1120             <email>julesverne@example.org</email> are hidden using these
    1121             conventions.</para>
    1122 
    1123             <programlisting>maintainers       jdoe \
    1124                   example.org:julesverne</programlisting>
    1125           </listitem>
    1126         </varlistentry>
    1127 
    1128         <varlistentry>
    1129           <term>description</term>
    1130 
    1131           <listitem>
    1132             <para>A one-sentence description of the ported software.</para>
    1133 
    1134             <programlisting>description    A clasic shooter arcade game.</programlisting>
    1135           </listitem>
    1136         </varlistentry>
    1137 
    1138         <varlistentry>
    1139           <term>long_description</term>
    1140 
    1141           <listitem>
    1142             <para>A long description of the ported software. Break long lines
    1143             with escaped newlines.</para>
    1144 
    1145             <programlisting>description    A classic shooter arcade game derived from \
    1146                the game alien-munchers.  Not suitable for \
    1147                children under two years old.      </programlisting>
    1148           </listitem>
    1149         </varlistentry>
    1150 
    1151         <varlistentry>
    1152           <term>homepage</term>
    1153 
    1154           <listitem>
    1155             <para>Port application's homepage.</para>
    1156 
    1157             <programlisting>homepage       http://www.somesite.org/apps</programlisting>
    1158           </listitem>
    1159         </varlistentry>
    1160 
    1161         <varlistentry>
    1162           <term>platforms</term>
    1163 
    1164           <listitem>
    1165             <para>The platforms on which the port has been tested.</para>
    1166 
    1167             <programlisting>platforms      darwin freebsd</programlisting>
    1168           </listitem>
    1169         </varlistentry>
    1170 
    1171         <varlistentry>
    1172           <term>depends_lib</term>
    1173 
    1174           <listitem>
    1175             <para>Library dependencies are needed both at build time (for
    1176             headers and libraries to link against) and at run time.</para>
    1177 
    1178             <programlisting>depends_lib     port:rrdtool</programlisting>
    1179 
    1180             <simplelist>
    1181               <member>depends_lib-append</member>
    1182 
    1183               <member>depends_lib-delete</member>
    1184             </simplelist>
    1185           </listitem>
    1186         </varlistentry>
    1187 
    1188         <varlistentry>
    1189           <term>depends_build</term>
    1190 
    1191           <listitem>
    1192             <para>Build dependencies are needed when software is compiled, but
    1193             not needed at all once the software is compiled and
    1194             installed.</para>
    1195 
    1196             <programlisting>depends_build    port:gcc42</programlisting>
    1197 
    1198             <simplelist>
    1199               <member>depends_build-append</member>
    1200 
    1201               <member>depends_build-delete</member>
    1202             </simplelist>
    1203           </listitem>
    1204         </varlistentry>
    1205 
    1206         <varlistentry>
    1207           <term>depends_run</term>
    1208 
    1209           <listitem>
    1210             <para>Run dependencies are needed when the software is run, but
    1211             not to compile it.</para>
    1212 
    1213             <programlisting>depends_run      port:apache2</programlisting>
    1214 
    1215             <simplelist>
    1216               <member>depends_run-append</member>
    1217 
    1218               <member>depends_run-delete</member>
    1219             </simplelist>
    1220           </listitem>
    1221         </varlistentry>
    1222       </variablelist>
    1223     </section>
    1224 
    1225     <section id="reference.keywords.fetch">
    1226       <title>Fetch</title>
    1227 
    1228       <para>The list of keywords related to the fetch phase.</para>
    1229 
    1230       <variablelist>
    1231         <varlistentry>
    1232           <term>master_sites</term>
    1233 
    1234           <listitem>
    1235             <para>A list of urls from which a port's download file(s) may be
    1236             retrieved.</para>
    1237 
    1238             <para>For ports that require only one download file, the list is
    1239             searched in order until a file matching
    1240             ${distname}${extract.suffix} is found.</para>
    1241 
    1242             <programlisting>master_sites   http://www.somesite.org/files/ \
    1243                http://www.somemirror.org/somesite_org/files/</programlisting>
    1244 
    1245             <para>You may also use mirror sites predefined by MacPorts. Here
    1246             the sourceforge and gnu mirrors are used.</para>
    1247 
    1248             <programlisting>master_sites   sourceforge gnu</programlisting>
    1249 
    1250             <para>When using mirror master_sites, the subdirectory
    1251             <varname>${name}</varname> is checked on every mirror. If the
    1252             mirror subdirectory does not match ${name}, then you may specify
    1253             it using after the mirror separated by a colon.</para>
    1254 
    1255             <programlisting>master_sites   sourceforge:widget \
    1256                gnu:widget</programlisting>
    1257 
    1258             <para>For ports that must fetch multiple download files from
    1259             different locations, you may label the files with tags and match
    1260             the tags in a distfiles statement. The format is
    1261             <literal>mirror:subdirectory:tag</literal>.</para>
    1262 
    1263             <para>In the example below, file_one.tar.gz is fetched from
    1264             sourceforge mirrors in subdirectory <varname>${name}</varname>;
    1265             file tagtwo.tar.gz is fetched from the gnu mirrors in subdirectory
    1266             sources.</para>
    1267 
    1268             <programlisting>distfiles       file_one.tar.gz:tagone \
    1269                 file_two.tar.gz:tagtwo \
    1270                 file_three.tar.gz
    1271 
    1272 master_sites    sourceforge::tagone \
    1273                 gnu:sources:tagtwo</programlisting>
    1274           </listitem>
    1275         </varlistentry>
    1276 
    1277         <varlistentry>
    1278           <term>patch_sites</term>
    1279 
    1280           <listitem>
    1281             <para>A list of sites from which a port's patchfiles may be
    1282             downloaded, where applicable.</para>
    1283 
    1284             <programlisting>patch_sites    ftp://ftp.patchcityrepo.com/pub/magic/patches</programlisting>
    1285           </listitem>
    1286         </varlistentry>
    1287 
    1288         <varlistentry>
    1289           <term>distname</term>
    1290 
    1291           <listitem>
    1292             <para>The default distname is
    1293             <varname>${name}-${version}</varname>. This keyword is used to
    1294             specify download files that do not meet this standard (excluding
    1295             the extract.suffix).</para>
    1296 
    1297             <programlisting>distname     ${name}</programlisting>
    1298           </listitem>
    1299         </varlistentry>
    1300 
    1301         <varlistentry>
    1302           <term>distfiles</term>
    1303 
    1304           <listitem>
    1305             <para>The default distfile name is
    1306             <varname>${distname}${extract.suffix}</varname>. This keyword is
    1307             used when a download file for a port is not
    1308             <varname>${distname}${extract.suffix}</varname> or to used to
    1309             specify multiple download files.</para>
    1310 
    1311             <programlisting>distfiles    ${name}-dev_src.tgz</programlisting>
    1312           </listitem>
    1313         </varlistentry>
    1314 
    1315         <varlistentry>
    1316           <term>extract.suffix</term>
    1317 
    1318           <listitem>
    1319             <para>The default value is .tar.gz, so is normally used to specify
    1320             file suffixes other than .tar.gz.</para>
    1321 
    1322             <programlisting>extract.suffix   .tar.gz</programlisting>
    1323           </listitem>
    1324         </varlistentry>
    1325 
    1326         <varlistentry>
    1327           <term>use_bzip2</term>
    1328 
    1329           <listitem>
    1330             <para>This keyword is for downloads that are tarred and bzipped.
    1331             It automatically sets these variables:</para>
    1332 
    1333             <simplelist>
    1334               <member>extract_suffix = .tar.bz2</member>
    1335 
    1336               <member>extract.cmd = bzip</member>
    1337             </simplelist>
    1338 
    1339             <programlisting>use_bzip2     yes</programlisting>
    1340           </listitem>
    1341         </varlistentry>
    1342 
    1343         <varlistentry>
    1344           <term>use_zip</term>
    1345 
    1346           <listitem>
    1347             <para>This keyword is for downloads are zipped. It automatically
    1348             sets these variables:</para>
    1349 
    1350             <simplelist>
    1351               <member>extract.suffix = .zip</member>
    1352 
    1353               <member>extract.cmd = unzip</member>
    1354 
    1355               <member>extract.pre_args = -q</member>
    1356 
    1357               <member>extract.post_args = "-d $portpath/$workdir"</member>
    1358             </simplelist>
    1359 
    1360             <programlisting>use_zip       yes</programlisting>
    1361           </listitem>
    1362         </varlistentry>
    1363       </variablelist>
    1364     </section>
    1365 
    1366     <section id="reference.keywords.checksum">
    1367       <title>Checksum</title>
    1368 
    1369       <para>The list of keywords related to the checksum phase.</para>
    1370 
    1371       <variablelist>
    1372         <varlistentry>
    1373           <term>checksums</term>
    1374 
    1375           <listitem>
    1376             <para>Checksum(s) of the distribution files.</para>
    1377 
    1378             <programlisting>checksums     md5 65b89365a65dcad71d4402b48</programlisting>
    1379 
    1380             <para>To download multiple files for a port, you must associate
    1381             the files with their checksums by including the filename.</para>
    1382 
    1383             <programlisting>checksums     ${distname}${extract.suffix} md5 65b89365a65dcad71d4402b44 \
    1384               hobbit.tar.gz md5 65b89365a65dcad71d4402b48</programlisting>
    1385           </listitem>
    1386         </varlistentry>
    1387       </variablelist>
    1388     </section>
    1389 
    1390     <section id="reference.keywords.extract">
    1391       <title>Extract</title>
    1392 
    1393       <para>The list of keywords related to the extract phase.</para>
    1394 
    1395       <variablelist>
    1396         <varlistentry>
    1397           <term>extract.only</term>
    1398 
    1399           <listitem>
    1400             <para>List of files to extract into
    1401             <varname>${worksrcpath}</varname>; the default is
    1402             <varname>${distfiles}</varname>. Only use if default extract
    1403             behavior is not correct for your port.</para>
    1404 
    1405             <programlisting>extract.only     foo.tar.gz bar.tar.gz</programlisting>
    1406 
    1407             <simplelist>
    1408               <member>extract.only-append</member>
    1409 
    1410               <member>extract.only-delete</member>
    1411             </simplelist>
    1412           </listitem>
    1413         </varlistentry>
    1414 
    1415         <varlistentry>
    1416           <term>extract.cmd</term>
    1417 
    1418           <listitem>
    1419             <para>Command to perform extraction; the default is "gzip".</para>
    1420 
    1421             <programlisting>extract.cmd     gunzip</programlisting>
    1422           </listitem>
    1423         </varlistentry>
    1424 
    1425         <varlistentry>
    1426           <term>extract.pre_args</term>
    1427 
    1428           <listitem>
    1429             <para>Arguments added to extract.cmd before a file name; the
    1430             default is "-dc".</para>
    1431 
    1432             <programlisting>extract.pre_args    -cd</programlisting>
    1433 
    1434             <simplelist>
    1435               <member>extract.pre_args-append</member>
    1436 
    1437               <member>extract.pre_args-delete</member>
    1438             </simplelist>
    1439           </listitem>
    1440         </varlistentry>
    1441 
    1442         <varlistentry>
    1443           <term>extract.args</term>
    1444 
    1445           <listitem>
    1446             <para>Arguments to extract.cmd; the default is
    1447             <varname>${distpath}/${distfile}</varname>.</para>
    1448 
    1449             <programlisting>extract.args      </programlisting>
    1450 
    1451             <simplelist>
    1452               <member>extract.args-append</member>
    1453 
    1454               <member>extract.args-delete</member>
    1455             </simplelist>
    1456           </listitem>
    1457         </varlistentry>
    1458 
    1459         <varlistentry>
    1460           <term>extract.post_args</term>
    1461 
    1462           <listitem>
    1463             <para>Arguments added to extract.cmd after a file name; the
    1464             default is "| tar -xf".</para>
    1465 
    1466             <programlisting>extract.post_args     "| tar -xf - --exclude 'CVS'"</programlisting>
    1467 
    1468             <simplelist>
    1469               <member>extract.post_args-append</member>
    1470 
    1471               <member>extract.post_args-delete</member>
    1472             </simplelist>
    1473           </listitem>
    1474         </varlistentry>
    1475       </variablelist>
    1476     </section>
    1477 
    1478     <section id="reference.keywords.patch">
    1479       <title>Patch</title>
    1480 
    1481       <para>The list of keywords related to the patch phase.</para>
    1482 
    1483       <variablelist>
    1484         <varlistentry>
    1485           <term>patchfiles</term>
    1486 
    1487           <listitem>
    1488             <para>Specify patch files to be applied for a port.</para>
    1489 
    1490             <programlisting>patchfiles     patch-Makefile.in patch-source.c</programlisting>
    1491 
    1492             <simplelist>
    1493               <member>patchfiles-append</member>
    1494 
    1495               <member>patchfiles-delete</member>
    1496             </simplelist>
    1497           </listitem>
    1498         </varlistentry>
    1499       </variablelist>
    1500     </section>
    1501 
    1502     <section id="reference.keywords.configure">
    1503       <title>Configure</title>
    1504 
    1505       <para>The list of keywords related to the configure phase.</para>
    1506 
    1507       <para>MacPorts base sets some important default configure options, so
    1508       should use the -append version of most configure keywords so you don't
    1509       overwrite them. For example, MacPorts base sets default
    1510       <literal>configure.ldflags</literal> so you should always use
    1511       <literal>configure.cflags-append</literal> to set additional CFLAGS in
    1512       Portfiles.</para>
    1513 
    1514       <variablelist>
    1515         <varlistentry>
    1516           <term>configure.env</term>
    1517 
    1518           <listitem>
    1519             <para>Set environment variables for configure.</para>
    1520 
    1521             <programlisting>configure.env     CFLAGS=-I${prefix}/include</programlisting>
    1522 
    1523             <simplelist>
    1524               <member>configure.env-append</member>
    1525 
    1526               <member>configure.env-delete</member>
    1527             </simplelist>
    1528           </listitem>
    1529         </varlistentry>
    1530 
    1531         <varlistentry>
    1532           <term>configure.pre_args</term>
    1533 
    1534           <listitem>
    1535             <para>Arguments added to configure.cmd before
    1536             <varname>${configure.args}</varname>; the default is
    1537             --prefix=${prefix}.</para>
    1538 
    1539             <programlisting>configure.pre_args     --prefix=${prefix}/apache2</programlisting>
    1540 
    1541             <simplelist>
    1542               <member>configure.pre_args-append</member>
    1543 
    1544               <member>configure.pre_args-delete</member>
    1545             </simplelist>
    1546           </listitem>
    1547         </varlistentry>
    1548 
    1549         <varlistentry>
    1550           <term>configure.args</term>
    1551 
    1552           <listitem>
    1553             <para>Arguments to pass to configure.</para>
    1554 
    1555             <programlisting>configure.args         --etcdir=${prefix}/etc</programlisting>
    1556 
    1557             <simplelist>
    1558               <member>configure.args-append</member>
    1559 
    1560               <member>configure.args-delete</member>
    1561             </simplelist>
    1562           </listitem>
    1563         </varlistentry>
    1564 
    1565         <varlistentry>
    1566           <term>configure.cflags</term>
    1567 
    1568           <listitem>
    1569             <para>Set CFLAGS compiler flags.</para>
    1570 
    1571             <programlisting>configure.cflags      -I/usr/X11R6/include</programlisting>
    1572 
    1573             <simplelist>
    1574               <member>configure.cflags-append</member>
    1575 
    1576               <member>configure.cflags-delete</member>
    1577             </simplelist>
    1578           </listitem>
    1579         </varlistentry>
    1580 
    1581         <varlistentry>
    1582           <term>configure.ldflags</term>
    1583 
    1584           <listitem>
    1585             <para>Set LDFLAGS for the linker.</para>
    1586 
    1587             <programlisting>configure.ldflags     -L${prefix}/lib/db44</programlisting>
    1588 
    1589             <simplelist>
    1590               <member>configure.ldflags-append</member>
    1591 
    1592               <member>configure.ldflags-delete</member>
    1593             </simplelist>
    1594           </listitem>
    1595         </varlistentry>
    1596 
    1597         <varlistentry>
    1598           <term>configure.cppflags</term>
    1599 
    1600           <listitem>
    1601             <para>Set CPPFLAGS for passing to the C processor.</para>
    1602 
    1603             <programlisting>configure.cppflags    -I${prefix}/include/db4</programlisting>
    1604 
    1605             <simplelist>
    1606               <member>configure.cppflags-append</member>
    1607 
    1608               <member>configure.cppflags-delete</member>
    1609             </simplelist>
    1610           </listitem>
    1611         </varlistentry>
    1612       </variablelist>
    1613 
    1614       <section id="reference.keywords.configure.automake-autoconf">
    1615         <title>Automake and Autoconf</title>
    1616 
    1617         <para>The list of configure keywords available for ports that need
    1618         automake and/or autoconf.</para>
    1619 
    1620         <para><variablelist>
    1621             <varlistentry>
    1622               <term>use_automake</term>
    1623 
    1624               <listitem>
    1625                 <para>Whether or not to use automake; the default is
    1626                 "no".</para>
    1627 
    1628                 <programlisting>use_automake      yes</programlisting>
    1629               </listitem>
    1630             </varlistentry>
    1631 
    1632             <varlistentry>
    1633               <term>automake.env</term>
    1634 
    1635               <listitem>
    1636                 <para>Environment variables to pass to automake.</para>
    1637 
    1638                 <programlisting>automake.env      CFLAGS=-I${prefix}/include</programlisting>
    1639               </listitem>
    1640             </varlistentry>
    1641 
    1642             <varlistentry>
    1643               <term>automake.args</term>
    1644 
    1645               <listitem>
    1646                 <para>Arguments to pass to automake.</para>
    1647 
    1648                 <programlisting>automake.args     --foreign</programlisting>
    1649               </listitem>
    1650             </varlistentry>
    1651 
    1652             <varlistentry>
    1653               <term>automake.dir</term>
    1654 
    1655               <listitem>
    1656                 <para>Directory in which to run
    1657                 <varname>${automake.cmd}</varname>; the default is
    1658                 <varname>${worksrcpath}</varname>.</para>
    1659 
    1660                 <programlisting>automake.dir      ./src</programlisting>
    1661               </listitem>
    1662             </varlistentry>
    1663 
    1664             <varlistentry>
    1665               <term>use_autoconf</term>
    1666 
    1667               <listitem>
    1668                 <para>Whether or not to use autoconf; the default is
    1669                 "no".</para>
    1670 
    1671                 <programlisting>use_autoconf      yes</programlisting>
    1672               </listitem>
    1673             </varlistentry>
    1674 
    1675             <varlistentry>
    1676               <term>autoconf.env</term>
    1677 
    1678               <listitem>
    1679                 <para>Environmental variables to pass to autoconf.</para>
    1680 
    1681                 <programlisting>autoconf.env      CFLAGS=-I${prefix}/include/gtk12</programlisting>
    1682               </listitem>
    1683             </varlistentry>
    1684 
    1685             <varlistentry>
    1686               <term>autoconf.args</term>
    1687 
    1688               <listitem>
    1689                 <para>Arguments to pass to autoconf.</para>
    1690 
    1691                 <programlisting>autoconf.args     -l src/aclocaldir</programlisting>
    1692               </listitem>
    1693             </varlistentry>
    1694 
    1695             <varlistentry>
    1696               <term>autoconf.dir</term>
    1697 
    1698               <listitem>
    1699                 <para>Directory in which to run
    1700                 <varname>${autoconf.cmd}</varname>; the default is
    1701                 <varname>${worksrcpath}</varname>.</para>
    1702 
    1703                 <programlisting>autoconf.dir      src</programlisting>
    1704               </listitem>
    1705             </varlistentry>
    1706           </variablelist></para>
    1707       </section>
    1708     </section>
    1709 
    1710     <section id="reference.keywords.build">
    1711       <title>Build</title>
    1712 
    1713       <para>The list of keywords related to the build phase.</para>
    1714 
    1715       <variablelist>
    1716         <varlistentry>
    1717           <term>build.cmd</term>
    1718 
    1719           <listitem>
    1720             <para>Make command to run in <varname>${worksrcdir}</varname>; the
    1721             default is "make".</para>
    1722 
    1723             <programlisting>build.cmd      pbxbuild</programlisting>
    1724           </listitem>
    1725         </varlistentry>
    1726 
    1727         <varlistentry>
    1728           <term>build.type</term>
    1729 
    1730           <listitem>
    1731             <para>Defines which "make" is required: "gnu" or "bsd". Sets
    1732             build.cmd to either "gnumake" or "bsdmake" accordingly.</para>
    1733 
    1734             <programlisting>build.type     gnu</programlisting>
    1735           </listitem>
    1736         </varlistentry>
    1737 
    1738         <varlistentry>
    1739           <term>build.pre_args</term>
    1740 
    1741           <listitem>
    1742             <para>Arguments to pass to <varname>${build.cmd}</varname> before
    1743             <varname>${build.args}</varname>; the default is
    1744             <varname>${build.target.current}</varname>.</para>
    1745 
    1746             <programlisting>build.pre_args      -project AudioSlicer.xcode</programlisting>
    1747 
    1748             <simplelist>
    1749               <member>build.pre_args-append</member>
    1750 
    1751               <member>build.pre_args-delete</member>
    1752             </simplelist>
    1753           </listitem>
    1754         </varlistentry>
    1755 
    1756         <varlistentry>
    1757           <term>build.args</term>
    1758 
    1759           <listitem>
    1760             <para>Arguments to pass to <varname>${build.cmd}</varname>.</para>
    1761 
    1762             <programlisting>build.args          -DNOWARN</programlisting>
    1763           </listitem>
    1764         </varlistentry>
    1765 
    1766         <varlistentry>
    1767           <term>build.target</term>
    1768 
    1769           <listitem>
    1770             <para>Target to pass to make for building everything; default is
    1771             "all".</para>
    1772 
    1773             <programlisting>build.target.all    all-src</programlisting>
    1774           </listitem>
    1775         </varlistentry>
    1776       </variablelist>
    1777     </section>
    1778 
    1779     <section id="reference.keywords.destroot">
    1780       <title>Destroot</title>
    1781 
    1782       <para>The list of keywords related to the destroot phase.</para>
    1783 
    1784       <variablelist>
    1785         <varlistentry>
    1786           <term>destroot.cmd</term>
    1787 
    1788           <listitem>
    1789             <para>Install command to run relative to
    1790             <varname>${worksrcdir}</varname>; defaults is
    1791             <varname>${build.cmd}</varname>.</para>
    1792 
    1793             <programlisting>destroot.cmd         pbxbuild</programlisting>
    1794           </listitem>
    1795         </varlistentry>
    1796 
    1797         <varlistentry>
    1798           <term>destroot.type</term>
    1799 
    1800           <listitem>
    1801             <para>Defines which "make" is required: either "gnu" or "bsd".
    1802             Sets install.cmd to either "gnumake" or "bsdmake"
    1803             accordingly.</para>
    1804 
    1805             <programlisting>destroot.type        gnu</programlisting>
    1806           </listitem>
    1807         </varlistentry>
    1808 
    1809         <varlistentry>
    1810           <term>destroot.pre_args</term>
    1811 
    1812           <listitem>
    1813             <para>Arguments to pass to <varname>${destroot.cmd}</varname>
    1814             before <varname>${destroot.args}</varname>; default is
    1815             ${destroot.target}.</para>
    1816 
    1817             <programlisting>destroot.pre_args    -project AudioSlicer.xcode</programlisting>
    1818 
    1819             <simplelist>
    1820               <member>destroot.pre_args-append</member>
    1821 
    1822               <member>destroot.pre_args-delete</member>
    1823             </simplelist>
    1824           </listitem>
    1825         </varlistentry>
    1826 
    1827         <varlistentry>
    1828           <term>destroot.target</term>
    1829 
    1830           <listitem>
    1831             <para>Install target to pass to
    1832             <varname>${destroot.cmd}</varname>.</para>
    1833 
    1834             <programlisting>destroot.target     install-src</programlisting>
    1835 
    1836             <simplelist>
    1837               <member>destroot.target-append</member>
    1838 
    1839               <member>destroot.target-delete</member>
    1840             </simplelist>
    1841           </listitem>
    1842         </varlistentry>
    1843 
    1844         <varlistentry>
    1845           <term>destroot.destdir</term>
    1846 
    1847           <listitem>
    1848             <para>Arguments passed to ${destroot.cmd} to install correctly
    1849             into the destroot.</para>
    1850 
    1851             <programlisting>destroot.destdir     prefix=${destroot}${prefix}</programlisting>
    1852 
    1853             <note>
    1854               <para>If an application's Makefile properly supports the DESTDIR
    1855               variable, MacPorts will automatically destroot the port
    1856               properly. A port must destroot properly or the port will not
    1857               install correctly, upgrade, or uninstall. If not, you may need
    1858               to set this variable, or even patch the application's
    1859               Makefile.</para>
    1860             </note>
    1861           </listitem>
    1862         </varlistentry>
    1863 
    1864         <varlistentry>
    1865           <term>destroot.keepdirs</term>
    1866 
    1867           <listitem>
    1868             <para>A list of directories that should not be removed if empty
    1869             upon destroot completion.</para>
    1870 
    1871             <programlisting>destroot.keepdirs \
    1872                 ${destroot}${prefix}/var/run \
    1873                 ${destroot}${prefix}/var/log \
    1874                 ${destroot}${prefix}/var/cache/mrtg</programlisting>
    1875           </listitem>
    1876         </varlistentry>
    1877 
    1878         <varlistentry>
    1879           <term>destroot.violate_mtree</term>
    1880 
    1881           <listitem>
    1882             <para>MacPorts tests for compliance to the common directory
    1883             structure in ${prefix}; the default is "no". If a port is not
    1884             compliant with the standard, set it to "yes".</para>
    1885 
    1886             <programlisting>destroot.violate_mtree    yes</programlisting>
    1887           </listitem>
    1888         </varlistentry>
    1889       </variablelist>
    1890     </section>
    1891   </section>
    1892 
    1893187  <section id="reference.tcl-extensions">
    1894188    <title>Tcl Extensions</title>
Note: See TracChangeset for help on using the changeset viewer.