source: trunk/doc/guide/new/xml/portfileref.xml @ 27639

Last change on this file since 27639 was 27639, checked in by markd@…, 12 years ago

Changes mostly to structure and organization of keyword reference section.

File size: 39.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4<chapter>
5  <title>Portfile Reference</title>
6
7  <para>This chapter serves as a reference for the major elements of a
8  <filename>Portfile</filename>: port phases, variants, StartupItems,
9  variables, keywords, and Tcl primitives.</para>
10
11  <section>
12    <title>Port Phases</title>
13
14    <para>A MacPorts port has ten distinct phases. The MacPorts base is set to
15    perform default steps for applications that use the standard
16    <command>configure</command>, <command>make</command>, and <command>make
17    install</command> steps, but for applications that do not conform to this
18    behavior, installation phases may be declared in a Portfile to override or
19    eliminate the default behavior, or augment it using pre- and/or post-
20    phases as shown in the section "Portfile Development".</para>
21
22    <section>
23      <title>Fetch</title>
24
25      <para>Overview: Fetch the <varname>${distfiles}</varname> from
26      <varname>${master_sites}</varname> and place it in
27      <filename>${prefix}/var/macports/distfiles</filename>.</para>
28    </section>
29
30    <section>
31      <title>Checksum</title>
32
33      <para>Overview: Compare <varname>${checksums}</varname> specified in a
34      <filename>Portfile</filename> to the checksums of the fetched
35      ${distfiles}.</para>
36    </section>
37
38    <section>
39      <title>Extract</title>
40
41      <para>Overview: Unzip and untar the <varname>${distfiles}</varname> into
42      the path ${prefix}/var/macports/build/..../work</para>
43    </section>
44
45    <section>
46      <title>Patch</title>
47
48      <para>Overview: Apply optional <ulink
49      url="http://en.wikipedia.org/wiki/Patch_(Unix)">patch</ulink> files
50      specified in <varname>${patchfiles}</varname> to modify a port's source
51      code file(s).</para>
52
53      <para>Details: Patch files are made using the <ulink
54      url="http://en.wikipedia.org/wiki/Diff">diff</ulink> command, and
55      MacPorts patches should be created as <ulink
56      url="http://en.wikipedia.org/wiki/Diff#Unified_format">unified
57      diffs</ulink>.</para>
58    </section>
59
60    <section>
61      <title>Configure</title>
62
63      <para>Overview: Execute the command "configure" in
64      <varname>${workpath}</varname>.</para>
65    </section>
66
67    <section>
68      <title>Build</title>
69
70      <para>Overview: Execute the command "make" in
71      <varname>${workpath}</varname>.</para>
72    </section>
73
74    <section>
75      <title>Destroot</title>
76
77      <para>Overview: Execute the command <command>make install
78      DESTDIR=${destroot}</command> in <varname>${workpath}</varname>.</para>
79
80      <para>Details: Understanding the destroot phase is critical to
81      understanding MacPorts, because, unlike some port systems, MacPorts
82      "stages" an installation into an intermediate location —not the final
83      file destination. There are two main advantages to this method.</para>
84
85      <orderedlist>
86        <listitem>
87          <para>A port's files may be cleanly uninstalled because all files
88          and locations are tracked.</para>
89        </listitem>
90
91        <listitem>
92          <para>Since a port's files are not installed into MacPorts directory
93          structure until an activation phase, a port may be deactivated
94          through MacPorts to allow activation of a different version of the
95          same port, thus allowing two versions of a port to be present,
96          though not both active, on a given host.</para>
97        </listitem>
98      </orderedlist>
99
100      <note>
101        <para>The <varname>$(DESTDIR)</varname> variable must be supported in
102        an application's Makefile for the MacPorts destroot phase to work
103        properly. Urge developers to fully support
104        <varname>$(DESTDIR)</varname> in their Makefiles.</para>
105      </note>
106    </section>
107
108    <section>
109      <title>Archive</title>
110
111      <para>Overview: Use tar to create a tarball of a port's destrooted files
112      and copy it to
113      <filename>${prefix}/var/macports/packages/</filename>.</para>
114    </section>
115
116    <section>
117      <title>Install</title>
118
119      <para>Overview: Copy a port's destrooted files into
120      <filename>${prefix}/var/macports/software</filename>. See "Port Images"
121      in section "MacPorts Internals" for details.</para>
122    </section>
123
124    <section>
125      <title>Activate</title>
126
127      <para>Overview: Set <ulink
128      url="http://en.wikipedia.org/wiki/Hard_link">hardlinks</ulink> pointing
129      to ${prefix}/var/macports/software to point to ${prefix}.</para>
130    </section>
131  </section>
132
133  <section>
134    <title>Dependencies</title>
135
136    <para>Free and open source software is highly modular, and MacPorts ports
137    often require modules not provided in a port's distribution to be
138    installed before a port may be installed, compiled, or run. These support
139    modules are generally other MacPorts ports, and the ports required to
140    satisfy prerequistes for a given port are called a port's
141    "dependencies".</para>
142
143    <para>There are three types of dependencies in MacPorts: library, build,
144    and run dependencies. The dependency type is important for proper port
145    upgrade and uninstall behavior. For example, you may not uninstall a port
146    that is a library dependency for another port, though you may remove one
147    with a build dependency; likewise, upgrading a port will upgrade its
148    library and build dependencies also, but not its run dependencies.</para>
149
150    <section>
151      <title>depends_lib</title>
152
153      <para>Library dependencies are needed both at build time (for headers
154      and libraries to link against) and at run time (to provide necessary
155      code).</para>
156
157      <programlisting>depends_lib         port:rrdtool</programlisting>
158    </section>
159
160    <section>
161      <title>depends_build</title>
162
163      <para>Build dependencies are only needed when software is compiled. They
164      are not needed at all once the software is compiled and
165      installed.</para>
166
167      <programlisting>depends_build       port:gcc42</programlisting>
168    </section>
169
170    <section>
171      <title>depends_run</title>
172
173      <para>Run dependencies are needed when the software is run, but not to
174      compile the software.</para>
175
176      <programlisting>depends_run         port:apache2</programlisting>
177    </section>
178
179    <section>
180      <title>Non-Port Dependencies</title>
181
182      <para>Port dependencies should refer to other MacPorts ports whenever
183      possible. However, if satisfying a dependency with a port is not
184      practical or desirable for a special reason, you may specify
185      dependencies by having MacPorts test for an individual file by replacing
186      <literal>port:</literal> with one of the options <literal>lib: bin: or
187      path:</literal>.</para>
188
189      <para>In this lib style dependency, if the file
190      <filename>libX11.6.x.dylib</filename> is not found in the library path
191      the XFree86 port will be installed to satisfy it.</para>
192
193      <programlisting>depends_lib         lib:libX11.6:XFree86</programlisting>
194
195      <para>In this bin style dependency, if the <filename>python</filename>
196      binary is not found in the shell's binary path the port python24 will be
197      installed.</para>
198
199      <programlisting>depends_build       bin:python:python24</programlisting>
200
201      <para>In this path style dependency, if the file
202      <filename>/usr/bin/nano</filename> is not found the nano port will be
203      installed.</para>
204
205      <programlisting>depends_run         path:/usr/bin/nano:nano</programlisting>
206    </section>
207  </section>
208
209  <section>
210    <title>StartupItems</title>
211
212    <para>StartupItems are keywords that create Mac OS X LaunchDaemon startup
213    scripts. To create these startup scripts for a port, choose from the
214    following keywords.</para>
215
216    <para><variablelist>
217        <varlistentry>
218          <term>startupitem.create</term>
219
220          <listitem>
221            <para>This triggers the creation of a StartupItem, defaults to
222            "no".</para>
223          </listitem>
224        </varlistentry>
225      </variablelist><variablelist>
226        <varlistentry>
227          <term>startupitem.name</term>
228
229          <listitem>
230            <para>Sets the name for the StartupItem, defaults to
231            ${portname}.</para>
232          </listitem>
233        </varlistentry>
234      </variablelist><variablelist>
235        <varlistentry>
236          <term>startupitem.executable</term>
237
238          <listitem>
239            <para>The name of the daemon to be run in the background. This is
240            the preferred type of startup item and may not be used together
241            with any other startupitem. This option may contain multiple
242            arguments, but they must be appropriate for a call to exec; they
243            may not contain arbitrary shell code.</para>
244          </listitem>
245        </varlistentry>
246      </variablelist><variablelist>
247        <varlistentry>
248          <term>startupitem.init</term>
249
250          <listitem>
251            <para>Shell code that will be executed prior to any of the options
252            startupitem.start, startupitem.stop and startupitem.restart.
253            Typically a startup script is specified.</para>
254          </listitem>
255        </varlistentry>
256      </variablelist><variablelist>
257        <varlistentry>
258          <term>startupitem.start</term>
259
260          <listitem>
261            <para>Shell code executed to start the daemon.</para>
262          </listitem>
263        </varlistentry>
264      </variablelist><variablelist>
265        <varlistentry>
266          <term>startupitem.stop</term>
267
268          <listitem>
269            <para>Shell code executed to stop the daemon.</para>
270          </listitem>
271        </varlistentry>
272      </variablelist><variablelist>
273        <varlistentry>
274          <term>startupitem.restart</term>
275
276          <listitem>
277            <para>Shell code executed to restart the daemon. In the absence of
278            this key, the daemon will be restarted by taking the stop action,
279            followed by taking the start action.</para>
280          </listitem>
281        </varlistentry>
282      </variablelist><variablelist>
283        <varlistentry>
284          <term>startupitem.pidfile</term>
285
286          <listitem>
287            <para>Specification for pidfile handling. It is useful in
288            conjunction with the startupitem.executable key, because it is
289            important that the startupitem know how to track the executable.
290            This keyword specifies whether the daemon generates its own
291            pidfile (auto), whether it generates its own but forgets to delete
292            it, so that the startupitem should delete it (clean), or whether
293            it never generates one, in which case the startupitem should
294            manage the pidfile on its own (manual), or whether no pidfile
295            should be used at all (none).</para>
296          </listitem>
297        </varlistentry>
298      </variablelist><variablelist>
299        <varlistentry>
300          <term>startupitem.logfile</term>
301
302          <listitem>
303            <para>Path to a logfile for logging events about the lifetime of
304            the startupitem. Depending on the type of startupitem, and the
305            manner in which it is started, standard output from the daemon may
306            also be directed to the logfile.</para>
307          </listitem>
308        </varlistentry>
309      </variablelist><variablelist>
310        <varlistentry>
311          <term>startupitem.logevents</term>
312
313          <listitem>
314            <para>Control whether or not to log events to the log file. If
315            logevents is set, events with timestamps are logged to the
316            logfile.</para>
317          </listitem>
318        </varlistentry>
319      </variablelist></para>
320  </section>
321
322  <section>
323    <title>Variables</title>
324
325    <para>This section describes the MacPorts preset variables that may be
326    used within Portfiles.</para>
327
328    <section>
329      <title>General</title>
330
331      <para>These are the variables available to any
332      <filename>Portfile</filename>.</para>
333
334      <para><variablelist>
335          <varlistentry>
336            <term>prefix</term>
337
338            <listitem>
339              <para>Installation prefix, set in the system-wide configuration
340              file <filename>${prefix}/etc/macports/macports.conf</filename>
341              —may be overridden on a per port basis. For example, aqua
342              applications are installed in
343              <filename>/Applications/MacPorts</filename>.</para>
344            </listitem>
345          </varlistentry>
346        </variablelist><variablelist>
347          <varlistentry>
348            <term>binpath</term>
349
350            <listitem>
351              <para>Default PATH to use in finding executables. Read
352              only.</para>
353            </listitem>
354          </varlistentry>
355        </variablelist><variablelist>
356          <varlistentry>
357            <term>libpath</term>
358
359            <listitem>
360              <para>Path to the MacPorts TCL libraries. Read only.</para>
361            </listitem>
362          </varlistentry>
363        </variablelist><variablelist>
364          <varlistentry>
365            <term>portpath</term>
366
367            <listitem>
368              <para>Path to the directory containing the downloaded
369              <filename>Portfile</filename>s. Read only.</para>
370            </listitem>
371          </varlistentry>
372        </variablelist><variablelist>
373          <varlistentry>
374            <term>filesdir</term>
375
376            <listitem>
377              <para>Path to port files relative to
378              <varname>${portpath}</varname>. Read only.</para>
379            </listitem>
380          </varlistentry>
381        </variablelist><variablelist>
382          <varlistentry>
383            <term>workpath</term>
384
385            <listitem>
386              <para>Full path to work directory. Read only.</para>
387            </listitem>
388          </varlistentry>
389        </variablelist><variablelist>
390          <varlistentry>
391            <term>worksrcpath</term>
392
393            <listitem>
394              <para>Full path to extracted source code. Equivalent to
395              <varname>${workpath}/${worksrcdir}</varname>.</para>
396            </listitem>
397          </varlistentry>
398        </variablelist><variablelist>
399          <varlistentry>
400            <term>destroot</term>
401
402            <listitem>
403              <para>Full path into which software will be destrooted.
404              Equivalent to <filename>${workpath}/destroot</filename>. Read
405              only.</para>
406            </listitem>
407          </varlistentry>
408        </variablelist><variablelist>
409          <varlistentry>
410            <term>distpath</term>
411
412            <listitem>
413              <para>Location to store downloaded distfiles. Read only.</para>
414            </listitem>
415          </varlistentry>
416        </variablelist><variablelist>
417          <varlistentry>
418            <term>os.platform</term>
419
420            <listitem>
421              <para>Identifies platform type (ie, "darwin", "freebsd", etc).
422              Read only.</para>
423            </listitem>
424          </varlistentry>
425        </variablelist><variablelist>
426          <varlistentry>
427            <term>os.arch</term>
428
429            <listitem>
430              <para>Identifies hardware type (ie, "powerpc", "intel"). Read
431              only.</para>
432            </listitem>
433          </varlistentry>
434        </variablelist><variablelist>
435          <varlistentry>
436            <term>os.version</term>
437
438            <listitem>
439              <para>The version number of the host operating system (ie "8.0"
440              for Darwin 8.0). Read only.</para>
441            </listitem>
442          </varlistentry>
443        </variablelist><variablelist>
444          <varlistentry>
445            <term>os.major</term>
446
447            <listitem>
448              <para>The major version number of the host operating system (ie
449              "8" for Darwin 8.0). Read only.</para>
450            </listitem>
451          </varlistentry>
452        </variablelist></para>
453    </section>
454
455    <section>
456      <title>PortGroup Variables</title>
457
458      <para>In addition to the general <filename>Portfile</filename> type for
459      standard Unix applications and libraries, there are six optional
460      PortGroup types that provide special <filename>Portfile</filename>
461      handling to make creating <filename>a Portfile</filename> easier.</para>
462
463      <itemizedlist>
464        <listitem>
465          <para>perl5</para>
466        </listitem>
467
468        <listitem>
469          <para>python24 and python25</para>
470        </listitem>
471
472        <listitem>
473          <para>ruby</para>
474        </listitem>
475
476        <listitem>
477          <para>xcode</para>
478        </listitem>
479
480        <listitem>
481          <para>gnustep</para>
482        </listitem>
483
484        <listitem>
485          <para>zope</para>
486        </listitem>
487      </itemizedlist>
488
489      <para>Some PortGroups provide additional variables when they are
490      declared within a Portfile. The additional variables provided by
491      PortGroups perl5, python, and ruby are listed below. You may view the
492      port Tcl code for each group in the directory<filename>
493      ${prefix}/share/macports/resources/port1.0/group</filename>.</para>
494
495      <variablelist>
496        <varlistentry>
497          <term>PortGroup perl5</term>
498
499          <listitem>
500            <para>Description: The variables available to a
501            <filename>Portfile</filename> when the <literal>PortGroup
502            perl5</literal> keyword is declared.</para>
503
504            <variablelist>
505              <varlistentry>
506                <term>perl5.version</term>
507
508                <listitem>
509                  <para>The MacPorts Perl version.</para>
510                </listitem>
511              </varlistentry>
512            </variablelist>
513
514            <variablelist>
515              <varlistentry>
516                <term>perl5.bin</term>
517
518                <listitem>
519                  <para>The Perl binary path (ie,
520                  <filename>${prefix}/bin/perl</filename>).</para>
521                </listitem>
522              </varlistentry>
523            </variablelist>
524
525            <variablelist>
526              <varlistentry>
527                <term>perl5.lib</term>
528
529                <listitem>
530                  <para>Path to the Perl vendor directory.</para>
531                </listitem>
532              </varlistentry>
533            </variablelist>
534
535            <variablelist>
536              <varlistentry>
537                <term>perl5.archlib</term>
538
539                <listitem>
540                  <para>Path to the Perl architecture-dependent modules
541                  directory.</para>
542                </listitem>
543              </varlistentry>
544            </variablelist>
545          </listitem>
546        </varlistentry>
547      </variablelist>
548
549      <variablelist>
550        <varlistentry>
551          <term>PortGroup python2x</term>
552
553          <listitem>
554            <para>Description: The variables available to a
555            <filename>Portfile</filename> when the <literal>PortGroup
556            python2x</literal> keyword is declared.</para>
557
558            <variablelist>
559              <varlistentry>
560                <term>python.bin</term>
561
562                <listitem>
563                  <para>The MacPorts Python binary location.</para>
564                </listitem>
565              </varlistentry>
566            </variablelist>
567
568            <variablelist>
569              <varlistentry>
570                <term>python.lib</term>
571
572                <listitem>
573                  <para>The Python dynamic library and path (ie,
574                  <filename>${prefix}/lib/libpython2.x.dylib</filename>).</para>
575                </listitem>
576              </varlistentry>
577            </variablelist>
578
579            <variablelist>
580              <varlistentry>
581                <term>python.include</term>
582
583                <listitem>
584                  <para>Path to the Python include directory.</para>
585                </listitem>
586              </varlistentry>
587            </variablelist>
588
589            <variablelist>
590              <varlistentry>
591                <term>python.pkgd</term>
592
593                <listitem>
594                  <para>Path to the Python site-packages directory. (ie,
595                  <filename>${prefix}/lib/python2.4/site-packages</filename>).</para>
596                </listitem>
597              </varlistentry>
598            </variablelist>
599          </listitem>
600        </varlistentry>
601      </variablelist>
602
603      <variablelist>
604        <varlistentry>
605          <term>PortGroup ruby</term>
606
607          <listitem>
608            <para>Description: The variables available to a
609            <filename>Portfile</filename> when the <literal>PortGroup
610            ruby</literal> keyword is declared.</para>
611
612            <variablelist>
613              <varlistentry>
614                <term>ruby.version</term>
615
616                <listitem>
617                  <para>The MacPorts Ruby version.</para>
618                </listitem>
619              </varlistentry>
620            </variablelist>
621
622            <variablelist>
623              <varlistentry>
624                <term>ruby.bin</term>
625
626                <listitem>
627                  <para>The Ruby binary location.</para>
628                </listitem>
629              </varlistentry>
630            </variablelist>
631
632            <variablelist>
633              <varlistentry>
634                <term>ruby.lib</term>
635
636                <listitem>
637                  <para>Path to the Ruby vendorlibdir directory (ie,
638                  <filename>${prefix}/lib/ruby/vendor_ruby/${ruby.version}</filename>)</para>
639                </listitem>
640              </varlistentry>
641            </variablelist>
642
643            <variablelist>
644              <varlistentry>
645                <term>ruby.archlib</term>
646
647                <listitem>
648                  <para>Path to the Ruby vendor archdir (ie,
649                  <filename>${ruby.lib}/${ruby.arch}</filename>).</para>
650                </listitem>
651              </varlistentry>
652            </variablelist>
653          </listitem>
654        </varlistentry>
655      </variablelist>
656    </section>
657  </section>
658
659  <section>
660    <title>Keyword Reference</title>
661
662    <para>MacPorts keywords are used to specify required or optional items
663    within a <filename>Portfile</filename> to override default options for
664    ports when necessary. Keywords are to be used within the "global" and
665    "variant" sections of Portfiles, and not within optional port phase
666    declarations. In other words, port phase keywords are not located within
667    port phase declaration; they <emphasis>refer</emphasis> to port phases and
668    set options for those phases, and they take affect whether or not phase
669    declarations have been explicitly defined by a port author.</para>
670
671    <para>The keywords listed below in category "global" specify information
672    for ports as a whole, whereas the keywords listed under a port phase
673    specify information to be used during a particular installation
674    phase.</para>
675
676    <section>
677      <title>Keywords using -append and -delete</title>
678
679      <para>These keywords are used to append or delete individual options
680      from a matching list of options without replacing it, whether the
681      options were defaults supplied by MacPorts base or options set with a
682      matching keyword set beforehand during execution of the Portfile.</para>
683    </section>
684
685    <section>
686      <title>Global Keywords</title>
687
688      <para>Global keywords.</para>
689
690      <variablelist>
691        <varlistentry>
692          <term>name</term>
693
694          <listitem>
695            <para>Port name.</para>
696          </listitem>
697        </varlistentry>
698      </variablelist>
699
700      <variablelist>
701        <varlistentry>
702          <term>version</term>
703
704          <listitem>
705            <para>Port version.</para>
706          </listitem>
707        </varlistentry>
708      </variablelist>
709
710      <variablelist>
711        <varlistentry>
712          <term>categories</term>
713
714          <listitem>
715            <para>Port category(s).</para>
716          </listitem>
717        </varlistentry>
718      </variablelist>
719
720      <variablelist>
721        <varlistentry>
722          <term>maintainers</term>
723
724          <listitem>
725            <para>Port maintainer(s).</para>
726          </listitem>
727        </varlistentry>
728      </variablelist>
729
730      <variablelist>
731        <varlistentry>
732          <term>description</term>
733
734          <listitem>
735            <para>Short description.</para>
736          </listitem>
737        </varlistentry>
738      </variablelist>
739
740      <variablelist>
741        <varlistentry>
742          <term>long_description</term>
743
744          <listitem>
745            <para>Long description.</para>
746          </listitem>
747        </varlistentry>
748      </variablelist>
749
750      <variablelist>
751        <varlistentry>
752          <term>homepage</term>
753
754          <listitem>
755            <para>Port application's homepage.</para>
756          </listitem>
757        </varlistentry>
758      </variablelist>
759
760      <variablelist>
761        <varlistentry>
762          <term>platforms</term>
763
764          <listitem>
765            <para>Platform(s) supported.</para>
766          </listitem>
767        </varlistentry>
768      </variablelist>
769
770      <variablelist>
771        <varlistentry>
772          <term>master_sites</term>
773
774          <listitem>
775            <para>Download site(s) for the distribution files.</para>
776          </listitem>
777        </varlistentry>
778      </variablelist>
779
780      <variablelist>
781        <varlistentry>
782          <term>checksums</term>
783
784          <listitem>
785            <para>Checksum(s) of the distribution files.</para>
786          </listitem>
787        </varlistentry>
788      </variablelist>
789
790      <variablelist>
791        <varlistentry>
792          <term>depends_lib</term>
793
794          <listitem>
795            <para></para>
796
797            <variablelist>
798              <varlistentry>
799                <term>depends_lib-append</term>
800
801                <listitem>
802                  <para></para>
803                </listitem>
804              </varlistentry>
805            </variablelist>
806
807            <variablelist>
808              <varlistentry>
809                <term>depends_lib-delete</term>
810
811                <listitem>
812                  <para></para>
813                </listitem>
814              </varlistentry>
815            </variablelist>
816          </listitem>
817        </varlistentry>
818      </variablelist>
819
820      <variablelist>
821        <varlistentry>
822          <term>depends_build</term>
823
824          <listitem>
825            <para></para>
826
827            <variablelist>
828              <varlistentry>
829                <term>depends_build-append</term>
830
831                <listitem>
832                  <para></para>
833                </listitem>
834              </varlistentry>
835            </variablelist>
836
837            <variablelist>
838              <varlistentry>
839                <term>depends_build-delete</term>
840
841                <listitem>
842                  <para></para>
843                </listitem>
844              </varlistentry>
845            </variablelist>
846          </listitem>
847        </varlistentry>
848      </variablelist>
849
850      <variablelist>
851        <varlistentry>
852          <term>depends_run</term>
853
854          <listitem>
855            <para></para>
856
857            <variablelist>
858              <varlistentry>
859                <term>depends_run-append</term>
860
861                <listitem>
862                  <para></para>
863                </listitem>
864              </varlistentry>
865            </variablelist>
866
867            <variablelist>
868              <varlistentry>
869                <term>depends_run-delete</term>
870
871                <listitem>
872                  <para></para>
873                </listitem>
874              </varlistentry>
875            </variablelist>
876          </listitem>
877        </varlistentry>
878      </variablelist>
879    </section>
880
881    <section>
882      <title>Port Phase Keywords</title>
883
884      <para>MacPorts has ten distinct port installation phases. As previosly
885      stated, port phase keywords are not located within port phase
886      declarations; they <emphasis>refer</emphasis> to port phases and set
887      options for them.</para>
888
889      <para>The fetch phase ...</para>
890
891      <variablelist>
892        <varlistentry>
893          <term></term>
894
895          <listitem>
896            <para></para>
897          </listitem>
898        </varlistentry>
899      </variablelist>
900
901      <variablelist>
902        <varlistentry>
903          <term></term>
904
905          <listitem>
906            <para></para>
907          </listitem>
908        </varlistentry>
909      </variablelist>
910
911      <variablelist>
912        <varlistentry>
913          <term></term>
914
915          <listitem>
916            <para></para>
917          </listitem>
918        </varlistentry>
919      </variablelist>
920
921      <variablelist>
922        <varlistentry>
923          <term></term>
924
925          <listitem>
926            <para></para>
927          </listitem>
928        </varlistentry>
929      </variablelist>
930
931      <variablelist>
932        <varlistentry>
933          <term></term>
934
935          <listitem>
936            <para></para>
937          </listitem>
938        </varlistentry>
939      </variablelist>
940
941      <variablelist>
942        <varlistentry>
943          <term></term>
944
945          <listitem>
946            <para></para>
947          </listitem>
948        </varlistentry>
949      </variablelist>
950
951      <variablelist>
952        <varlistentry>
953          <term></term>
954
955          <listitem>
956            <para></para>
957          </listitem>
958        </varlistentry>
959      </variablelist>
960
961      <para>The checksum phase ...</para>
962
963      <variablelist>
964        <varlistentry>
965          <term></term>
966
967          <listitem>
968            <para></para>
969          </listitem>
970        </varlistentry>
971      </variablelist>
972
973      <variablelist>
974        <varlistentry>
975          <term></term>
976
977          <listitem>
978            <para></para>
979          </listitem>
980        </varlistentry>
981      </variablelist>
982
983      <variablelist>
984        <varlistentry>
985          <term></term>
986
987          <listitem>
988            <para></para>
989          </listitem>
990        </varlistentry>
991      </variablelist>
992
993      <variablelist>
994        <varlistentry>
995          <term></term>
996
997          <listitem>
998            <para></para>
999          </listitem>
1000        </varlistentry>
1001      </variablelist>
1002
1003      <variablelist>
1004        <varlistentry>
1005          <term></term>
1006
1007          <listitem>
1008            <para></para>
1009          </listitem>
1010        </varlistentry>
1011      </variablelist>
1012
1013      <para>The extract phase ...</para>
1014
1015      <variablelist>
1016        <varlistentry>
1017          <term></term>
1018
1019          <listitem>
1020            <para></para>
1021          </listitem>
1022        </varlistentry>
1023      </variablelist>
1024
1025      <variablelist>
1026        <varlistentry>
1027          <term></term>
1028
1029          <listitem>
1030            <para></para>
1031          </listitem>
1032        </varlistentry>
1033      </variablelist>
1034
1035      <variablelist>
1036        <varlistentry>
1037          <term></term>
1038
1039          <listitem>
1040            <para></para>
1041          </listitem>
1042        </varlistentry>
1043      </variablelist>
1044
1045      <variablelist>
1046        <varlistentry>
1047          <term></term>
1048
1049          <listitem>
1050            <para></para>
1051          </listitem>
1052        </varlistentry>
1053      </variablelist>
1054
1055      <variablelist>
1056        <varlistentry>
1057          <term></term>
1058
1059          <listitem>
1060            <para></para>
1061          </listitem>
1062        </varlistentry>
1063      </variablelist>
1064
1065      <variablelist>
1066        <varlistentry>
1067          <term></term>
1068
1069          <listitem>
1070            <para></para>
1071          </listitem>
1072        </varlistentry>
1073      </variablelist>
1074
1075      <para>The patch phase ...</para>
1076
1077      <variablelist>
1078        <varlistentry>
1079          <term></term>
1080
1081          <listitem>
1082            <para></para>
1083          </listitem>
1084        </varlistentry>
1085      </variablelist>
1086
1087      <variablelist>
1088        <varlistentry>
1089          <term></term>
1090
1091          <listitem>
1092            <para></para>
1093          </listitem>
1094        </varlistentry>
1095      </variablelist>
1096
1097      <variablelist>
1098        <varlistentry>
1099          <term></term>
1100
1101          <listitem>
1102            <para></para>
1103          </listitem>
1104        </varlistentry>
1105      </variablelist>
1106
1107      <variablelist>
1108        <varlistentry>
1109          <term></term>
1110
1111          <listitem>
1112            <para></para>
1113          </listitem>
1114        </varlistentry>
1115      </variablelist>
1116
1117      <variablelist>
1118        <varlistentry>
1119          <term></term>
1120
1121          <listitem>
1122            <para></para>
1123          </listitem>
1124        </varlistentry>
1125      </variablelist>
1126
1127      <variablelist>
1128        <varlistentry>
1129          <term></term>
1130
1131          <listitem>
1132            <para></para>
1133          </listitem>
1134        </varlistentry>
1135      </variablelist>
1136
1137      <para>The configuration phase ...</para>
1138
1139      <para>MacPorts base sets some important default configure options, so
1140      you must be careful not to overwrite them with your Portfile keywords;
1141      for this reason you should use the -append version of configure
1142      keywords. For example, MacPorts base sets default
1143      <literal>configure.ldflags</literal> so you should always use
1144      <literal>configure.cflags-append</literal> to set additional CFLAGS in
1145      Portfiles.</para>
1146
1147      <variablelist>
1148        <varlistentry>
1149          <term>configure.args</term>
1150
1151          <listitem>
1152            <para></para>
1153
1154            <variablelist>
1155              <varlistentry>
1156                <term>configure.args-append</term>
1157
1158                <listitem>
1159                  <para></para>
1160                </listitem>
1161              </varlistentry>
1162            </variablelist>
1163
1164            <variablelist>
1165              <varlistentry>
1166                <term>configure.args-delete</term>
1167
1168                <listitem>
1169                  <para></para>
1170                </listitem>
1171              </varlistentry>
1172            </variablelist>
1173          </listitem>
1174        </varlistentry>
1175      </variablelist>
1176
1177      <variablelist>
1178        <varlistentry>
1179          <term>configure.cflags</term>
1180
1181          <listitem>
1182            <para></para>
1183
1184            <variablelist>
1185              <varlistentry>
1186                <term>configure.cflags-append</term>
1187
1188                <listitem>
1189                  <para></para>
1190                </listitem>
1191              </varlistentry>
1192            </variablelist>
1193
1194            <variablelist>
1195              <varlistentry>
1196                <term>configure.cflags-delete</term>
1197
1198                <listitem>
1199                  <para></para>
1200                </listitem>
1201              </varlistentry>
1202            </variablelist>
1203          </listitem>
1204        </varlistentry>
1205      </variablelist>
1206
1207      <variablelist>
1208        <varlistentry>
1209          <term>configure.ldflags</term>
1210
1211          <listitem>
1212            <para></para>
1213
1214            <variablelist>
1215              <varlistentry>
1216                <term>configure.ldflags-append</term>
1217
1218                <listitem>
1219                  <para></para>
1220                </listitem>
1221              </varlistentry>
1222            </variablelist>
1223
1224            <variablelist>
1225              <varlistentry>
1226                <term>configure.ldflags-delete</term>
1227
1228                <listitem>
1229                  <para></para>
1230                </listitem>
1231              </varlistentry>
1232            </variablelist>
1233          </listitem>
1234        </varlistentry>
1235      </variablelist>
1236
1237      <variablelist>
1238        <varlistentry>
1239          <term></term>
1240
1241          <listitem>
1242            <para></para>
1243          </listitem>
1244        </varlistentry>
1245      </variablelist>
1246
1247      <variablelist>
1248        <varlistentry>
1249          <term></term>
1250
1251          <listitem>
1252            <para></para>
1253          </listitem>
1254        </varlistentry>
1255      </variablelist>
1256
1257      <para>The build phase ...</para>
1258
1259      <variablelist>
1260        <varlistentry>
1261          <term></term>
1262
1263          <listitem>
1264            <para></para>
1265          </listitem>
1266        </varlistentry>
1267      </variablelist>
1268
1269      <variablelist>
1270        <varlistentry>
1271          <term></term>
1272
1273          <listitem>
1274            <para></para>
1275          </listitem>
1276        </varlistentry>
1277      </variablelist>
1278
1279      <variablelist>
1280        <varlistentry>
1281          <term></term>
1282
1283          <listitem>
1284            <para></para>
1285          </listitem>
1286        </varlistentry>
1287      </variablelist>
1288
1289      <variablelist>
1290        <varlistentry>
1291          <term></term>
1292
1293          <listitem>
1294            <para></para>
1295          </listitem>
1296        </varlistentry>
1297      </variablelist>
1298
1299      <variablelist>
1300        <varlistentry>
1301          <term></term>
1302
1303          <listitem>
1304            <para></para>
1305          </listitem>
1306        </varlistentry>
1307      </variablelist>
1308
1309      <para>The destroot phase ...</para>
1310
1311      <variablelist>
1312        <varlistentry>
1313          <term></term>
1314
1315          <listitem>
1316            <para></para>
1317          </listitem>
1318        </varlistentry>
1319      </variablelist>
1320
1321      <variablelist>
1322        <varlistentry>
1323          <term></term>
1324
1325          <listitem>
1326            <para></para>
1327          </listitem>
1328        </varlistentry>
1329      </variablelist>
1330
1331      <variablelist>
1332        <varlistentry>
1333          <term></term>
1334
1335          <listitem>
1336            <para></para>
1337          </listitem>
1338        </varlistentry>
1339      </variablelist>
1340
1341      <variablelist>
1342        <varlistentry>
1343          <term></term>
1344
1345          <listitem>
1346            <para></para>
1347          </listitem>
1348        </varlistentry>
1349      </variablelist>
1350
1351      <variablelist>
1352        <varlistentry>
1353          <term></term>
1354
1355          <listitem>
1356            <para></para>
1357          </listitem>
1358        </varlistentry>
1359      </variablelist>
1360
1361      <para>The install phase ...</para>
1362
1363      <para>The activate phase ...</para>
1364
1365      <para></para>
1366
1367      <para></para>
1368    </section>
1369  </section>
1370
1371  <section>
1372    <title>Tcl Primitives</title>
1373
1374    <para>A MacPorts <filename>Portfile</filename> is a Tcl script, so it may
1375    contain Tcl code anywhere within it, whether in the global section or a
1376    phase. The Tcl primitives listed below are defined within the MacPorts
1377    base code for use in Portfiles.</para>
1378
1379    <variablelist>
1380      <varlistentry>
1381        <term>reinplace</term>
1382
1383        <listitem>
1384          <para>Description reinplace.</para>
1385        </listitem>
1386      </varlistentry>
1387    </variablelist>
1388
1389    <variablelist>
1390      <varlistentry>
1391        <term>xinstall</term>
1392
1393        <listitem>
1394          <para>Description xinstall.</para>
1395        </listitem>
1396      </varlistentry>
1397    </variablelist>
1398
1399    <variablelist>
1400      <varlistentry>
1401        <term>file copy</term>
1402
1403        <listitem>
1404          <para>Description file copy.</para>
1405        </listitem>
1406      </varlistentry>
1407    </variablelist>
1408
1409    <variablelist>
1410      <varlistentry>
1411        <term>file delete</term>
1412
1413        <listitem>
1414          <para>Description file delete.</para>
1415        </listitem>
1416      </varlistentry>
1417    </variablelist>
1418
1419    <variablelist>
1420      <varlistentry>
1421        <term></term>
1422
1423        <listitem>
1424          <para></para>
1425        </listitem>
1426      </varlistentry>
1427    </variablelist>
1428
1429    <variablelist>
1430      <varlistentry>
1431        <term></term>
1432
1433        <listitem>
1434          <para></para>
1435        </listitem>
1436      </varlistentry>
1437    </variablelist>
1438
1439    <variablelist>
1440      <varlistentry>
1441        <term></term>
1442
1443        <listitem>
1444          <para></para>
1445        </listitem>
1446      </varlistentry>
1447    </variablelist>
1448
1449    <variablelist>
1450      <varlistentry>
1451        <term></term>
1452
1453        <listitem>
1454          <para></para>
1455        </listitem>
1456      </varlistentry>
1457    </variablelist>
1458
1459    <variablelist>
1460      <varlistentry>
1461        <term></term>
1462
1463        <listitem>
1464          <para></para>
1465        </listitem>
1466      </varlistentry>
1467    </variablelist>
1468
1469    <variablelist>
1470      <varlistentry>
1471        <term></term>
1472
1473        <listitem>
1474          <para></para>
1475        </listitem>
1476      </varlistentry>
1477    </variablelist>
1478
1479    <variablelist>
1480      <varlistentry>
1481        <term></term>
1482
1483        <listitem>
1484          <para></para>
1485        </listitem>
1486      </varlistentry>
1487    </variablelist>
1488  </section>
1489</chapter>
Note: See TracBrowser for help on using the repository browser.