Changeset 27553 for trunk/doc


Ignore:
Timestamp:
Aug 8, 2007, 4:28:31 AM (12 years ago)
Author:
markd@…
Message:

More Portfile intro refinement.

File:
1 edited

Legend:

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

    r27550 r27553  
    1212    <title>Portfile Introduction</title>
    1313
    14     <para>Every MacPorts port has a corresponding
    15     <filename>Portfile</filename>, but Portfiles do not completely define a
    16     port's installation behavior because the MacPorts base code performs
    17     default installation phases for all ports. However,
    18     <filename>Portfiles</filename> may contain optional installation phase
    19     declaration(s) to augment or override the default port phase behavior
    20     performed by the MacPorts base during port installation.</para>
    21 
    22     <para>If you use phase declaration(s) in a <filename>Portfile</filename>,
    23     you should know how to identify what is called the "global" section of a
    24     <filename>Portfile</filename>. Any statements not contained within a phase
    25     declaration, no matter where they are located in a
    26     <filename>Portfile</filename>, are said to be in the global section of the
    27     <filename>Portfile</filename>, therefore the global section need not be
    28     contiguous. Likewise, for any statements to be removed from the global
    29     section they would have to be moved within a phase declaration.</para>
     14    <para>A <filename>Portfile</filename> is a TCL script that often contains
     15    only simple keyword/value combinations defined in MacPorts base, though it
     16    may also contain arbitrary TCL code. Every MacPorts port has a
     17    corresponding <filename>Portfile</filename>, but Portfiles do not
     18    completely define a port's installation behavior since the MacPorts base
     19    has default port installation characteristics coded within it that are
     20    applied to all ports. Therefore Portfiles need only specify required
     21    options and, when required, non-default characteristics for a port.</para>
     22
     23    <para>A common way for Portfiles to augment or override MacPorts base
     24    default installation phase characteristics is by using
     25    <filename>Portfile</filename> phase declaration(s). If you use
     26    <filename>Portfile</filename> phase declaration(s), you should know how to
     27    identify the "global" section of a <filename>Portfile</filename>. Any
     28    statements not contained within a phase declaration, no matter where they
     29    are located in a <filename>Portfile</filename>, are said to be in the
     30    global section of the <filename>Portfile</filename>, therefore the global
     31    section need not be contiguous. Likewise, to remove statements from the
     32    global section they must be placed within a phase declaration.</para>
    3033
    3134    <para>The main phases you need to be aware of when making a
     
    271274    <para>In this section we take a look at a complete simple Portfile, and
    272275    then pre- and post- phase definitions to augment and override the MacPorts
    273     default phases respectively.</para>
     276    default phases.</para>
    274277
    275278    <section>
Note: See TracChangeset for help on using the changeset viewer.