Changes between Initial Version and Version 1 of eborisch/man_portfile


Ignore:
Timestamp:
Nov 1, 2011, 2:13:54 PM (13 years ago)
Author:
eborisch (Eric A. Borisch)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • eborisch/man_portfile

    v1 v1  
     1Output of {{{man portfile}}}; Here so Google can digest it.
     2----
     3{{{
     4#!html
     5<pre> PORTFILE(7)          BSD Miscellaneous Information Manual          PORTFILE(7)
     6
     7<b>NAME</b>
     8     <font color=blue>Portfile</font> -- MacPorts description file reference
     9
     10<b>DESCRIPTION</b>
     11     A complete reference of all available <font color=blue>Portfile</font> variables and example syn-
     12     tax.  <font color=blue>Portfiles</font> consist of valid TCL, allowing for simple key/value pair
     13     syntax as well as utilization of TCL's extensive functionality.
     14     <font color=blue>Portfiles</font> are encoded in UTF-8.
     15
     16     The <font color=blue>MacPorts</font> <font color=blue>System</font> uses a target dependency system based on a
     17     depends/provides model, allowing for targets to be registered and exe-
     18     cuted in the correct order based on their individual requirements.
     19
     20     A <font color=blue>Portfile</font> author needs to be aware of the various standard targets, the
     21     options that they require and the variables that both the targets and the
     22     port system provide.
     23
     24<b>PORTSYSTEM</b>
     25     Portfiles must begin with a PortSystem line that defines which version of
     26     the Portfile interpreter should be used.
     27     <font color=blue>Synopsis:</font>
     28           PortSystem 1.0
     29
     30<b>MAIN VARIABLES</b>
     31     All ports are required to set certain variables.
     32
     33     <font color=blue>name</font>
     34         Full name of port.
     35         <font color=blue>Type:</font> <u>required</u>
     36         <font color=blue>Example:</font>
     37               name XFree86
     38
     39     <font color=blue>version</font>
     40         Upstream version of software.
     41         <font color=blue>Type:</font> <u>required</u>
     42         <font color=blue>Example:</font>
     43               version 4.2.1
     44
     45     <font color=blue>epoch</font>
     46         If a port's version numbering changes such that a newer version looks
     47         older than the previous version, the <font color=blue>epoch</font> should be increased. Often
     48         the <font color=blue>epoch</font> is formatted like a date.
     49         <font color=blue>Type:</font> <u>optional</u>
     50         <font color=blue>Default:</font> <u>0</u>
     51         <font color=blue>Example:</font>
     52               epoch 20041231
     53
     54     <font color=blue>description</font>
     55         One line description of the software and what it does.  To appear in
     56         the description, brackets and semi-colons need to be escaped with a
     57         backslash (i.e.  they must be written as "\[", "\]" and "\;").  The
     58         escape sequences listed in re_syntax(n) may also be used, with the
     59         exception of \n, \r and \f.
     60         <font color=blue>Type:</font> <u>required</u>
     61         <font color=blue>Example:</font>
     62               description Dictionary Server Protocol (RFC2229) client
     63
     64     <font color=blue>long_description</font>
     65         A verbose description of the software and what it does.  To appear in
     66         the description, brackets and semi-colons need to be escaped with a
     67         backslash (i.e.  they must be written as "\[", "\]" and "\;").  The
     68         escape sequences listed in re_syntax(n) may also be used, with the
     69         exception of \n, \r and \f.
     70         <font color=blue>Type:</font> <u>required</u>
     71         <font color=blue>Example:</font>
     72               long_description The GNU Image Manipulation Program \
     73                   (GIMP) is a powerful tool for the preparation and \
     74                   manipulation of digital images. The GIMP provides \
     75                   the user with a wide variety of image manipulation, \
     76                   painting, processing, and rendering tools.
     77
     78     <font color=blue>notes</font>
     79         Notes for setup and use of the port.  This is shown after the port is
     80         activated and anytime the <font color=blue>notes</font> command is used; for example:
     81
     82               port notes python26
     83
     84         The advantage to using <font color=blue>notes</font> instead of <font color=blue>ui_msg</font> is that it can be
     85         queried after a port is installed but <font color=blue>ui_msg</font> is only printed during
     86         an install.  Therefore <font color=blue>notes</font> is good for any information which may be
     87         needed anytime after an install.
     88         <font color=blue>Type:</font> <u>optional</u>
     89         <font color=blue>Example:</font>
     90               notes To fully complete your installation and make python \
     91                  ${branch} the default, please run: \
     92                  sudo port install python_select \
     93                  sudo python_select ${name}
     94
     95     <font color=blue>revision</font>
     96         Local revision number of <font color=blue>Portfile</font>.  Increment for port revisions
     97         which would change its installation in any way.
     98         <font color=blue>Type:</font> <u>optional</u>
     99         <font color=blue>Default:</font> <u>0</u>
     100         <font color=blue>Example:</font>
     101               revision 1
     102
     103     <font color=blue>categories</font>
     104         Categories to which this port belongs.
     105         <font color=blue>Type:</font> <u>required</u>
     106         <font color=blue>Example:</font>
     107               categories spelling textproc
     108
     109     <font color=blue>maintainers</font>
     110         E-mail address(es) of port maintainer(s).
     111         <font color=blue>Type:</font> <u>required</u>
     112         <font color=blue>Example:</font>
     113               maintainers landonf@macports.org
     114
     115     <font color=blue>platforms</font>
     116         Declares which platforms are supported by the port.
     117         <font color=blue>Type:</font> <u>required</u>
     118         <font color=blue>Values:</font> <u>darwin</u> <u>freebsd</u>
     119         <font color=blue>Example:</font>
     120               platforms darwin
     121
     122     <font color=blue>homepage</font>
     123         Project homepage for the port.
     124         <font color=blue>Type:</font> <u>required</u>
     125         <font color=blue>Example:</font>
     126               http://wireshark.org
     127
     128     <font color=blue>master_sites</font>
     129         List of sites to fetch <font color=blue>distfiles</font> from or a predefined mirror site
     130         list. If set to a predefined mirror site, without a subdirectory
     131         being defined, the portname is used as the name of the subdirectory.
     132         <font color=blue>Type:</font> <u>required</u>
     133         <font color=blue>Example:</font>
     134               master_sites ftp://ftp.cdrom.com/pub/magic \
     135                   sourceforge
     136
     137     <font color=blue>worksrcdir</font>
     138         Path to source directory relative to <font color=blue>workpath</font>.
     139         <font color=blue>Type:</font> <u>optional</u>
     140         <font color=blue>Default:</font> <u>${distname}</u>
     141         <font color=blue>Example:</font>
     142               worksrcdir ${distname}-src-${version}
     143
     144     <font color=blue>distname</font>
     145         Name of distribution file, without the <font color=blue>extract.suffix</font>.
     146         <font color=blue>Type:</font> <u>optional</u>
     147         <font color=blue>Default:</font> <u>${name}-${version}</u>
     148         <font color=blue>Example:</font>
     149               distname ${name}-${version}-src
     150
     151     <font color=blue>checksums</font> <u>filename</u> <u>type</u> <u>checksum</u> [<u>filename</u> <u>type</u> <u>checksum</u> <u>...</u>]
     152         List of checksums for the <font color=blue>distfiles</font>.  The checksum <u>type</u> can currently
     153         be md5, rmd160 or sha1. The <u>filename</u> can be omitted if there is only
     154         one distfile.
     155         <font color=blue>Type:</font> <u>required</u>
     156         <font color=blue>Example:</font>
     157               checksums dictd-1.7.1.tar.gz md5 81317b86ea0a5df0163900ad2e6bb12c \
     158                       magic-words-1.7.1.tar.gz md5 897a005182928613eadd30c267ce9c5b
     159         <font color=blue>Example</font> <font color=blue>(ledit</font> <font color=blue>1.11):</font>
     160               checksums md5 a2d38ba641682509c1e964ad699a9dd2 \
     161                       sha1 1fb6443b5fdf3c83787953f06282d256477c1288
     162         <font color=blue>Example</font> <font color=blue>(ssldump</font> <font color=blue>0.9b3):</font>
     163               checksums md5 ac8c28fe87508d6bfb06344ec496b1dd \
     164                       sha1 a633a9a811a138eac5ed440d583473b644135ef5 \
     165                       rmd160 941cf8f2ef8459ec4f9ce65772e134505d46566
     166
     167     <font color=blue>macosx_deployment_target</font>
     168         Value for MACOSX_DEPLOYMENT_TARGET environment variable when invoking
     169         the configure script.
     170         <font color=blue>Type:</font> <u>optional</u>
     171         <font color=blue>Default:</font> <u>(current</u> <u>OS</u> <u>version)</u>
     172         <font color=blue>Example:</font>
     173               macosx_deployment_target 10.4
     174
     175     <font color=blue>use_parallel_build</font>
     176         If set to yes (and the user has enabled buildmakejobs in
     177         <u>macports.conf</u> ), the port can be built using more than one job.
     178         <font color=blue>Type:</font> <u>optional</u>
     179         <font color=blue>Default:</font> <u>no</u>
     180         <font color=blue>Example:</font>
     181               use_parallel_build yes
     182
     183     <font color=blue>use_automake</font>
     184         If set to yes, run the <font color=blue>automake</font> target to build any <u>Makefile.in</u> files
     185         for use by <u>configure</u>.
     186         <font color=blue>Type:</font> <u>optional</u>
     187         <font color=blue>Default:</font> <u>no</u>
     188         <font color=blue>Example:</font>
     189               use_automake yes
     190
     191     <font color=blue>use_autoconf</font>
     192         If set to yes, run the <font color=blue>autoconf</font> target to build any <u>configure</u> script
     193         required.
     194         <font color=blue>Type:</font> <u>optional</u>
     195         <font color=blue>Default:</font> <u>no</u>
     196         <font color=blue>Example:</font>
     197               use_autoconf yes
     198
     199     <font color=blue>use_configure</font>
     200         If set to yes, run the <font color=blue>configure</font> target to configure the build.
     201         <font color=blue>Type:</font> <u>optional</u>
     202         <font color=blue>Default:</font> <u>yes</u>
     203         <font color=blue>Example:</font>
     204               use_configure no
     205
     206     <font color=blue>copy_log_files</font> <u>path/to/logfile1</u> <u>path/to/logfile2</u> <u>...</u>
     207         Copy specific log files from the workdir to the main macports log dir
     208         <font color=blue>Type:</font> <u>optional</u>
     209         <font color=blue>Example:</font>
     210               copy_log_files config.log
     211
     212     <font color=blue>conflicts</font>
     213         Used to list ports which conflict with the one containing the
     214         <font color=blue>conflicts</font> declaration.
     215         <font color=blue>Type:</font> <u>optional</u>
     216         <font color=blue>Default:</font> <u>none</u> <u>(empty)</u>
     217         <font color=blue>Example:</font>
     218               conflicts cdrtools
     219
     220     <font color=blue>replaced_by</font>
     221         When a particular port is deprecated in favor of another, use
     222         <font color=blue>replaced_by</font> in the deprecated port and list the new one to be used.
     223         <font color=blue>Type:</font> <u>optional</u>
     224         <font color=blue>Default:</font> <u>none</u> <u>(empty)</u>
     225         <font color=blue>Example:</font>
     226               replaced_by xorg-renderproto
     227
     228     <font color=blue>add_users</font>
     229         Consists of a list of usernames and settings. At appropriate times
     230         during the port installation process, a user will be created for each
     231         username with the corresponding settings. Settings are of the form
     232         name=value. A setting applies to the username that appeared most
     233         recently before it in the list.
     234
     235         Applicable options are: group, gid (may be used instead of group),
     236         passwd, realname, home, and shell.
     237
     238         <font color=blue>Type:</font> <u>optional</u>
     239         <font color=blue>Default:</font> <u>none</u> <u>(empty)</u>
     240         <font color=blue>Example:</font>
     241               add_users squid group=squid realname=Squid\ Proxy
     242               home=${prefix}/var/squid
     243
     244               add_users user1 group=mygroup user2 group=mygroup
     245
     246     <font color=blue>installs_libs</font>
     247         By default, it is assumed that ports may install libraries or headers
     248         that can be incorporated into their dependents. If this is not the
     249         case, set <font color=blue>installs_libs</font> to <u>no</u>.  This means that this port's depen-
     250         dents need not check that it is installed for the same architectures
     251         as them; that it is permissible to distribute binaries of the depen-
     252         dents even if their licenses conflict with the license of this port;
     253         and that updates to this port can never result in broken dynamic
     254         linking in its dependents.
     255         <font color=blue>Type:</font> <u>optional</u>
     256         <font color=blue>Default:</font> <u>none</u>
     257         <font color=blue>Example:</font>
     258               installs_libs no
     259
     260<b>TARGET HOOKS</b>
     261     A number of hooks are available for customizing many of the standard tar-
     262     gets that port(1) executes. The targets supporting these hooks are <font color=blue>fetch</font>,
     263     <font color=blue>automake</font>, <font color=blue>autoconf</font>, <font color=blue>configure</font>, <font color=blue>build</font>, <font color=blue>destroot</font>, and <font color=blue>test</font>.  The hooks are:
     264
     265     <u>target</u><font color=blue>.asroot</font>
     266         Run the <u>target</u> with root privileges.
     267         <font color=blue>Example:</font>
     268               install.asroot yes
     269
     270     <u>target</u><font color=blue>.dir</font>
     271         Directory in which to run the <u>target</u>.
     272         <font color=blue>Example:</font>
     273               automake.dir src
     274
     275     <u>target</u><font color=blue>.env</font>
     276         Change the environment the <u>target</u> is run in. This is often overridden
     277         on a per <font color=blue>Portfile</font> basis.
     278         <font color=blue>Example:</font>
     279               configure.env CPP=/usr/bin/cpp-4.0
     280
     281     <u>target</u><font color=blue>.pre_args</font>
     282         Additional arguments passed before the main arguments.
     283         <font color=blue>Example:</font>
     284               extract.pre_args -cd
     285
     286     <u>target</u><font color=blue>.args</font>
     287         Main arguments to pass to the <u>target</u>.  This is often overridden on a
     288         per <font color=blue>Portfile</font> basis.
     289         <font color=blue>Example:</font>
     290               configure.args --enable-fooble
     291
     292     <u>target</u><font color=blue>.post_args</font>
     293         Additional arguments passed after the main arguments.
     294         <font color=blue>Example:</font>
     295               extract.post_args | tar xf -
     296
     297<b>RUNTIME VARIABLES</b>
     298     Read-only access to the MacPorts configuration is provided.
     299
     300     <font color=blue>prefix</font>
     301         Install prefix
     302         <font color=blue>Type:</font> <u>optional</u>
     303         <font color=blue>Default:</font> <u>/opt/local</u>
     304
     305     <font color=blue>libpath</font>
     306         Location of ports-specific TCL libraries.
     307         <font color=blue>Type:</font> <u>read-only</u>
     308
     309     <font color=blue>portpath</font>
     310         Full path to the Portfile location.
     311         <font color=blue>Type:</font> <u>read-only</u>
     312         <font color=blue>Default:</font> <u>work</u>
     313
     314     <font color=blue>workpath</font>
     315         Full path to work directory.
     316         <font color=blue>Type:</font> <u>read-only</u>
     317         <font color=blue>Default:</font> <u>${portbuildpath}/work</u>
     318
     319     <font color=blue>worksrcpath</font>
     320         Full path to working sources (where port has unpacked itself).
     321         <font color=blue>Type:</font> <u>read-only</u>
     322         <font color=blue>Default:</font> <u>${workpath}/${worksrcdir}</u>
     323
     324     <font color=blue>filesdir</font>
     325         Path to port files relative to <font color=blue>portpath</font>.
     326         <font color=blue>Type:</font> <u>read-only</u>
     327         <font color=blue>Default:</font> <u>files</u>
     328
     329     <font color=blue>filespath</font>
     330         Full path to the port files location.
     331         <font color=blue>Type:</font> <u>read-only</u>
     332         <font color=blue>Default:</font> <u>${portpath}/${filesdir}</u>
     333
     334     <font color=blue>distpath</font>
     335         Location to store downloaded distfiles.
     336         <font color=blue>Type:</font> <u>read-only</u>
     337         <font color=blue>Default:</font> <u>${sysportpath}/distfiles/${dist_</u><font color=blue></font><u>subdir}/</u>
     338
     339     <font color=blue>os.arch</font>
     340         Identifies hardware type (e.g. "powerpc").
     341         <font color=blue>Type:</font> <u>read-only</u>
     342
     343     <font color=blue>os.version</font>
     344         Version number of operating system (e.g. "7.0").
     345         <font color=blue>Type:</font> <u>read-only</u>
     346
     347     <font color=blue>os.major</font>
     348         Major version number of operating system (e.g. "7").
     349         <font color=blue>Type:</font> <u>read-only</u>
     350
     351     <font color=blue>os.endian</font>
     352         Endianness of the processor (e.g. "big").
     353         <font color=blue>Type:</font> <u>read-only</u>
     354
     355     <font color=blue>os.platform</font>
     356         Operating system name (e.g. "darwin").
     357         <font color=blue>Type:</font> <u>read-only</u>
     358
     359     <font color=blue>os.subplatform</font>
     360         Name of specific operating system variant (e.g. "macosx").
     361         <font color=blue>Type:</font> <u>read-only</u>
     362
     363     <font color=blue>install.user</font>
     364         User for MacPorts installation (e.g.  <u>root</u>)
     365         <font color=blue>Type:</font> <u>read-only</u>
     366
     367     <font color=blue>install.group</font>
     368         Group for MacPorts installation (e.g.  <u>wheel</u>)
     369         <font color=blue>Type:</font> <u>read-only</u>
     370
     371     <font color=blue>applications_dir</font>
     372         Absolute path to the final location to install Mac OS X application
     373         bundles (.app directories).
     374         <font color=blue>Type:</font> <u>read-only</u>
     375         <font color=blue>Default:</font> <u>/Applications/Macports</u>
     376
     377     <font color=blue>frameworks_dir</font>
     378         Absolute path to the final location to install Mac OS X framework
     379         bundles (.framework directories).
     380         <font color=blue>Type:</font> <u>read-only</u>
     381         <font color=blue>Default:</font> <u>${prefix}/Library/Frameworks</u>
     382
     383<b>DEPENDENCY OPTIONS</b>
     384     Port dependencies should refer to other MacPort ports whenever possible,
     385     therefore each dependency should be expressed in the format:
     386
     387     port:&lt;port&gt;
     388
     389     Where &lt;port&gt; represents the name of an existing MacPorts <font color=blue>port</font>.  If satis-
     390     fying a dependency with a MacPorts port is not practical and it is likely
     391     that a dependency must be met by an Apple optional install, then the
     392     alternative dependency format:
     393
     394     <u>type</u>:&lt;filename&gt;:&lt;port&gt;
     395
     396     may be used. Where <u>type</u> is "bin" if &lt;filename&gt; is a program, "lib" if it
     397     is a library, or "path" if it is a path to an installed file.
     398     <font color=blue>Example:</font>
     399           lib:libX11.6:XFree86
     400
     401     <font color=blue>depends_fetch</font>
     402         List of dependencies to check before <font color=blue>fetch</font>, <font color=blue>checksum</font>, <font color=blue>extract</font>, <font color=blue>patch</font>,
     403         <font color=blue>configure</font>, <font color=blue>build</font>, <font color=blue>destroot</font>, <font color=blue>install</font>, and <font color=blue>package</font> targets.
     404         <font color=blue>Type:</font> <u>optional</u>
     405         <font color=blue>Example:</font>
     406               depends_fetch port:mercurial
     407
     408     <font color=blue>depends_extract</font>
     409         List of dependencies to check before <font color=blue>extract</font>, <font color=blue>patch</font>, <font color=blue>configure</font>,
     410         <font color=blue>build</font>, <font color=blue>destroot</font>, <font color=blue>install</font>, and <font color=blue>package</font> targets.
     411         <font color=blue>Type:</font> <u>optional</u>
     412         <font color=blue>Example:</font>
     413               depends_extract port:xz-devel
     414
     415     <font color=blue>depends_build</font>
     416         List of dependencies to check before <font color=blue>configure</font>, <font color=blue>build</font>, <font color=blue>destroot</font>,
     417         <font color=blue>install</font>, and <font color=blue>package</font> targets.
     418         <font color=blue>Type:</font> <u>optional</u>
     419         <font color=blue>Example:</font>
     420               depends_build port:autoconf
     421
     422     <font color=blue>depends_run</font>
     423         List of dependencies to check before <font color=blue>destroot</font>, <font color=blue>install</font> and <font color=blue>package</font>
     424         targets. Will be recorded in the registry as being required by the
     425         dependent port when it is installed.
     426         <font color=blue>Type:</font> <u>optional</u>
     427         <font color=blue>Example:</font>
     428               depends_run port:bash
     429
     430     <font color=blue>depends_lib</font>
     431         List of dependencies to check before <font color=blue>configure</font>, <font color=blue>build</font>, <font color=blue>destroot</font>,
     432         <font color=blue>install</font>, and <font color=blue>package</font> targets. Will be recorded in the registry as
     433         being required by the dependent port when it is installed.
     434         <font color=blue>Type:</font> <u>optional</u>
     435         <font color=blue>Example:</font>
     436               depends_lib port:libfetch
     437
     438<b>FETCH OPTIONS</b>
     439     Fetch all distribution files and patches.
     440
     441     <font color=blue>master_sites.mirror_subdir</font>
     442         Subdirectory to append to all mirror sites for any list specified in
     443         master_sites.
     444         <font color=blue>Type:</font> <u>optional</u>
     445         <font color=blue>Default:</font> <u>${name}</u>
     446         <font color=blue>Example:</font>
     447               master_sites.mirror_subdir magic
     448
     449     <font color=blue>patch_sites</font>
     450         List of sites to fetch <font color=blue>patchfiles</font> from or a predefined mirror site
     451         list.
     452         <font color=blue>Type:</font> <u>optional</u>
     453         <font color=blue>Default:</font> <u>${master_</u><font color=blue></font><u>sites}</u>
     454         <font color=blue>Example:</font>
     455               patch_sites ftp://ftp.patchcityrepo.com/pub/magic/patches
     456
     457     <font color=blue>patch_sites.mirror_subdir</font>
     458         Subdirectory to append to all mirror sites for any list specified in
     459         <font color=blue>patch_sites</font>.
     460         <font color=blue>Type:</font> <u>optional</u>
     461         <font color=blue>Default:</font> <u>${name}</u>
     462         <font color=blue>Example:</font>
     463               patch_sites.mirror_subdir magic
     464
     465     <font color=blue>extract.suffix</font>
     466         Suffix to append to <font color=blue>distname</font>.
     467         <font color=blue>Type:</font> <u>optional</u>
     468         <font color=blue>Default:</font> <u>.tar.gz</u>
     469         <font color=blue>Example:</font>
     470               extract.suffix .tgz
     471
     472     <font color=blue>distfiles</font>
     473         List of distribution files to fetch from <font color=blue>master_sites</font>.
     474         <font color=blue>Type:</font> <u>optional</u>
     475         <font color=blue>Default:</font> <u>[suffix</u> <u>${distname}]</u>
     476         <font color=blue>Example:</font>
     477               distfiles magicsource.tar.gz cluebat.tar.bz2
     478
     479     <font color=blue>patchfiles</font>
     480         List of patches to fetch and apply.
     481         <font color=blue>Type:</font> <u>optional</u>
     482         <font color=blue>Example:</font>
     483               patchfiles japanese-widechar-fix.diff
     484               japanese-localization.diff
     485
     486     <font color=blue>use_zip</font>
     487         Use zip.
     488         Sets extract.suffix to: .zip
     489         Sets extract.cmd to: unzip
     490         Sets extract.pre_args to: -q
     491         Sets extract.post_args to: "-d ${workpath}"
     492         <font color=blue>Type:</font> <u>optional</u>
     493         <font color=blue>Example:</font>
     494               use_zip yes
     495
     496     <font color=blue>use_bzip2</font>
     497         Use bzip2.
     498         Sets extract.suffix to: .bz2
     499         Sets extract.cmd to: bzip2
     500         <font color=blue>Type:</font> <u>optional</u>
     501         <font color=blue>Example:</font>
     502               use_bzip2 yes
     503
     504     <font color=blue>use_lzma</font>
     505         Use lzma.
     506         Sets extract.suffix to: .lzma
     507         Sets extract.cmd to: lzma
     508         <font color=blue>Type:</font> <u>optional</u>
     509         <font color=blue>Example:</font>
     510               use_lzma yes
     511
     512     <font color=blue>use_xz</font>
     513         Use xz.
     514         Sets extract.suffix to: .xz
     515         Sets extract.cmd to: xz
     516         <font color=blue>Type:</font> <u>optional</u>
     517         <font color=blue>Example:</font>
     518               use_xz yes
     519
     520     <font color=blue>use_7z</font>
     521         Use 7z (7zip).
     522         Sets extract.suffix to: .7z
     523         Sets extract.cmd to: 7za
     524         <font color=blue>Type:</font> <u>optional</u>
     525         <font color=blue>Example:</font>
     526               use_7z yes
     527
     528     <font color=blue>dist_subdir</font>
     529         Create a sub-directory in <font color=blue>distpath</font> to store all fetched files.
     530         <font color=blue>Type:</font> <u>optional</u>
     531         <font color=blue>Default:</font> <u>${name}</u>
     532         <font color=blue>Example:</font>
     533               dist_subdir vim${version}
     534
     535   <font color=blue>ADVANCED</font> <font color=blue>FETCH</font> <font color=blue>OPTIONS</font>
     536     Some mirrors require special options for a resource to be properly
     537     fetched.
     538
     539     <font color=blue>fetch.user</font>
     540         HTTP or FTP user to fetch the resource.
     541         <font color=blue>Type:</font> <u>optional</u>
     542
     543     <font color=blue>fetch.password</font>
     544         HTTP or FTP password to fetch the resource.
     545         <font color=blue>Type:</font> <u>optional</u>
     546
     547     <font color=blue>fetch.use_epsv</font>
     548         Whether to use EPSV command for FTP transfers.
     549         <font color=blue>Type:</font> <u>optional</u>
     550         <font color=blue>Default:</font> <u>yes</u>
     551
     552     <font color=blue>fetch.ignore_sslcert</font>
     553         Whether to ignore the host SSL certificate (for HTTPS).
     554         <font color=blue>Type:</font> <u>optional</u>
     555         <font color=blue>Default:</font> <u>no</u>
     556
     557   <font color=blue>FETCHING</font> <font color=blue>FROM</font> <font color=blue>CVS</font>
     558     As an alternative to fetching distribution files, pulling the sources
     559     from a CVS repository is supported. Use of CVS can give rise to non-
     560     reproducible builds, so it is strongly discouraged.
     561
     562     <font color=blue>cvs.root</font>
     563         Specify the address to a CVS repository from which to checkout files.
     564         <font color=blue>Type:</font> <u>optional</u>
     565         <font color=blue>Default:</font> <u>none</u>
     566         <font color=blue>Example:</font>
     567               cvs.root :pserver:anonymous@cvs.sv.gnu.org:/sources/emacs
     568
     569     <font color=blue>cvs.tag</font>
     570         Specify a CVS tag identifying the code to checkout.
     571         <font color=blue>Type:</font> <u>optional</u>
     572         <font color=blue>Default</font> <u>none</u>
     573         <font color=blue>Example:</font>
     574               cvs.tag HEAD
     575
     576     <font color=blue>cvs.date</font>
     577         A date that identifies the CVS code set to checkout.
     578         <font color=blue>Type:</font> <u>optional</u>
     579         <font color=blue>Default</font> <u>none</u>
     580         <font color=blue>Example:</font>
     581               cvs.date "12-April-2005"
     582
     583     <font color=blue>cvs.module</font>
     584         A CVS module from which to check out the code.
     585         <font color=blue>Type:</font> <u>optional</u>
     586         <font color=blue>Default</font> <u>none</u>
     587         <font color=blue>Example:</font>
     588               cvs.module Sources
     589
     590   <font color=blue>FETCHING</font> <font color=blue>FROM</font> <font color=blue>SUBVERSION</font>
     591     As an alternative to fetching distribution files, pulling the sources
     592     from a subversion repository is supported. Use of subversion can give
     593     rise to non-reproducible builds, so it is strongly discouraged.
     594
     595     <font color=blue>svn.url</font>
     596         Specify the url from which to fetch files.
     597         <font color=blue>Type:</font> <u>required</u>
     598         <font color=blue>Default:</font> <u>none</u>
     599         <font color=blue>Example:</font>
     600               svn.url http://www.domain.com/svn-repo/mydirectory
     601               svn.url svn://www.domain.com/svn-repo/mydirectory
     602
     603     <font color=blue>svn.tag</font>
     604         Specify a tag from which svn should fetch files. This corresponds to
     605         the -r option to the svn cli.  Note that you will need to use back-
     606         slashes to escape characters that have meaning to the Tcl inter-
     607         preter, such as braces and double quotes.
     608         <font color=blue>Type:</font> <u>optional</u>
     609         <font color=blue>Default:</font> <u>none</u>
     610         <font color=blue>Example:</font>
     611               svn.tag 37192
     612               svn.tag \{\"2006-02-17 15:30 +0230\"\}
     613
     614   <font color=blue>FETCHING</font> <font color=blue>FROM</font> <font color=blue>GIT</font>
     615     As an alternative to fetching distribution files, pulling the sources
     616     from a git repository is supported. Use of git can give rise to non-
     617     reproducible builds, so it is strongly discouraged.
     618
     619     <font color=blue>git.url</font>
     620         Specify the url from which to fetch files
     621         <font color=blue>Type:</font> <u>required</u>
     622         <font color=blue>Default:</font> <u>none</u>
     623         <font color=blue>Example:</font>
     624               git.url git://git.kernel.org/pub/scm/git/git.git
     625               git.url http://www.kernel.org/pub/scm/git/git.git
     626
     627     <font color=blue>git.branch</font>
     628         Specify a branch (or other commit-ish) that git should checkout.
     629         Note that any branch besides HEAD should be prefixed by origin/.
     630         <font color=blue>Type:</font> <u>optional</u>
     631         <font color=blue>Default:</font> <u>none</u>
     632         <font color=blue>Example:</font>
     633               git.branch 72bf1c8
     634               git.branch origin/next
     635
     636<b>EXTRACT OPTIONS</b>
     637     Extract all compressed/archived files.
     638
     639     <font color=blue>extract.only</font>
     640         List of files to extract into <font color=blue>workpath</font>.
     641         <font color=blue>Type:</font> <u>optional</u>
     642         <font color=blue>Default:</font> <u>${distfiles}</u>
     643         <font color=blue>Example:</font>
     644               extract.only worksrc-1.4.4.tar.gz
     645
     646     <font color=blue>extract.cmd</font>
     647         Command to perform the extraction.
     648         <font color=blue>Type:</font> <u>optional</u>
     649         <font color=blue>Default:</font> <u>gzip</u>
     650         <font color=blue>Example:</font>
     651               extract.cmd bzip2
     652
     653     <font color=blue>extract.mkdir</font>
     654         Create the <font color=blue>worksrcdir</font> prior to extraction; useful for ports which
     655         extract directly into the current working directory instead of a sub-
     656         directory.
     657         <font color=blue>Type:</font> <u>optional</u>
     658         <font color=blue>Default:</font> <u>no</u>
     659         <font color=blue>Example:</font>
     660               extract.mkdir yes
     661
     662<b>CONFIGURE OPTIONS</b>
     663     MacPorts provide special support for configure flags (CFLAGS, LDFLAGS,
     664     CPPFLAGS, CXXFLAGS, CC, CXX, CPP, FC, F77, F90). Please note that the
     665     previous way to alter these flags (using configure.env) may become depre-
     666     cated at some point. The following options are defined:
     667
     668     <font color=blue>configure.optflags</font>
     669         Flags to use for optimization.
     670         <font color=blue>Type:</font> <u>optional</u>
     671         <font color=blue>Default:</font> <u>-O2</u>
     672         <font color=blue>Example:</font>
     673               configure.optflags -O3
     674
     675     <font color=blue>configure.cflags</font>
     676         Flags to put in the CFLAGS environment variable when invoking the
     677         configure script.
     678         <font color=blue>Type:</font> <u>optional</u>
     679         <font color=blue>Default:</font> <u>${configure.optflags}</u>
     680         <font color=blue>Example:</font>
     681               configure.cflags-append -DHAS_LRINTF
     682
     683     <font color=blue>configure.cppflags</font>
     684         Flags to put in the CPPFLAGS environment variable when invoking the
     685         configure script.
     686         <font color=blue>Type:</font> <u>optional</u>
     687         <font color=blue>Default:</font> <u>-I${prefix}/include</u>
     688
     689     <font color=blue>configure.cxxflags</font>
     690         Flags to put in the CXXFLAGS environment variable when invoking the
     691         configure script.
     692         <font color=blue>Type:</font> <u>optional</u>
     693         <font color=blue>Default:</font> <u>${configure.optflags}</u>
     694
     695     <font color=blue>configure.objcflags</font>
     696         Flags to put in the OBJCFLAGS environment variable when invoking the
     697         configure script.
     698         <font color=blue>Type:</font> <u>optional</u>
     699         <font color=blue>Default:</font> <u>${configure.optflags}</u>
     700
     701     <font color=blue>configure.ldflags</font>
     702         Flags to put in the LDFLAGS environment variable when invoking the
     703         configure script.
     704         <font color=blue>Type:</font> <u>optional</u>
     705         <font color=blue>Default:</font> <u>-L${prefix}/lib</u>
     706
     707     <font color=blue>configure.fflags</font>
     708         Flags to put in the FFLAGS environment variable when invoking the
     709         configure script.
     710         <font color=blue>Type:</font> <u>optional</u>
     711         <font color=blue>Default:</font> <u>${configure.optflags}</u>
     712
     713     <font color=blue>configure.f90flags</font>
     714         Flags to put in the F90FLAGS environment variable when invoking the
     715         configure script.
     716         <font color=blue>Type:</font> <u>optional</u>
     717         <font color=blue>Default:</font> <u>${configure.optflags}</u>
     718
     719     <font color=blue>configure.fcflags</font>
     720         Flags to put in the FCFLAGS environment variable when invoking the
     721         configure script.
     722         <font color=blue>Type:</font> <u>optional</u>
     723         <font color=blue>Default:</font> <u>${configure.optflags}</u>
     724
     725     <font color=blue>configure.classpath</font>
     726         Flags to put in the CLASSPATH environment variable when invoking the
     727         configure script.
     728         <font color=blue>Type:</font> <u>optional</u>
     729
     730     <font color=blue>configure.cc</font>
     731         C-compiler to put in the CC environment variable when invoking the
     732         configure script.
     733         <font color=blue>Type:</font> <u>optional</u>
     734         <font color=blue>Example:</font>
     735               configure.cc /usr/bin/gcc
     736
     737     <font color=blue>configure.cpp</font>
     738         C-preprocessor to put in the CPP environment variable when invoking
     739         the configure script.
     740         <font color=blue>Type:</font> <u>optional</u>
     741
     742     <font color=blue>configure.cxx</font>
     743         C++-compiler to put in the CXX environment variable when invoking the
     744         configure script.
     745         <font color=blue>Type:</font> <u>optional</u>
     746
     747     <font color=blue>configure.objc</font>
     748         Objective-C-compiler to put in the OBJC environment variable when
     749         invoking the configure script.
     750         <font color=blue>Type:</font> <u>optional</u>
     751         <font color=blue>Example:</font>
     752               configure.objc ${prefix}/bin/gcc-mp-4.1
     753
     754     <font color=blue>configure.fc</font>
     755         Fortran-compiler to put in the FC environment variable when invoking
     756         the configure script.
     757         <font color=blue>Type:</font> <u>optional</u>
     758
     759     <font color=blue>configure.f77</font>
     760         Fortran-77-compiler to put in the F77 environment variable when
     761         invoking the configure script.
     762         <font color=blue>Type:</font> <u>optional</u>
     763
     764     <font color=blue>configure.f90</font>
     765         Fortran-90-compiler to put in the F90 environment variable when
     766         invoking the configure script.
     767         <font color=blue>Type:</font> <u>optional</u>
     768
     769     <font color=blue>configure.javac</font>
     770         Java compiler to put in the JAVAC environment variable when invoking
     771         the configure script.
     772         <font color=blue>Type:</font> <u>optional</u>
     773
     774     <font color=blue>configure.compiler</font>
     775         Selects a complete compiler suite to use. This option will override
     776         the compiler environment variable for all compilers the named suite
     777         features. Please note that this option will intentionally not set any
     778         dependencies on the selected compiler suite!  <u>gcc-3.3</u> <u>gcc-4.0</u> <u>gcc-4.2</u>
     779         use the standard system compiler suites, <u>llvm-gcc-4.2</u> <u>clang</u> use the
     780         newer, non-default compilers installed by Xcode, <u>apple-gcc-3.3</u>
     781         <u>apple-gcc-4.0</u> <u>apple-gcc-4.2</u> use Apple's gcc suite installed via Mac-
     782         Ports, <u>macports-gcc-3.3</u> <u>macports-gcc-3.4</u> <u>macports-gcc-4.0</u>
     783         <u>macports-gcc-4.1</u> <u>macports-gcc-4.2</u> <u>macports-gcc-4.3</u> <u>macports-gcc-4.4</u>
     784         <u>macports-gcc-4.5</u> use the vanilla gcc installed via MacPorts.
     785         <font color=blue>Type:</font> <u>optional</u>
     786         <font color=blue>Values:</font> <u>gcc-3.3</u> <u>gcc-4.0</u> <u>gcc-4.2</u> <u>llvm-gcc-4.2</u> <u>clang</u> <u>apple-gcc-3.3</u>
     787         <u>apple-gcc-4.0</u> <u>apple-gcc-4.2</u> <u>macports-gcc-3.3</u> <u>macports-gcc-3.4</u>
     788         <u>macports-gcc-4.0</u> <u>macports-gcc-4.1</u> <u>macports-gcc-4.2</u> <u>macports-gcc-4.3</u>
     789         <u>macports-gcc-4.4</u> <u>macports-gcc-4.5</u>
     790         <font color=blue>Example:</font>
     791               configure.compiler gcc-4.0
     792
     793   <font color=blue>UNIVERSAL</font> <font color=blue>TARGET</font> <font color=blue>HOOKS</font>
     794     For universal builds of configure-based ports, we also define specific
     795     target hooks. These can be overridden for specific ports. Please note
     796     that these hooks are used by the default universal variant and redefining
     797     the variant will make them useless.
     798
     799     <font color=blue>configure.universal_args</font>
     800         Arguments appended to the configure script to build the port univer-
     801         sal.
     802         <font color=blue>Type:</font> <u>optional</u>
     803         <font color=blue>Default:</font> <u>--disable-dependency-tracking</u>
     804
     805     <font color=blue>configure.universal_cflags</font>
     806         Additional flags to put in the CFLAGS environment variable when
     807         invoking the configure script.
     808         <font color=blue>Type:</font> <u>optional</u>
     809         <font color=blue>Default:</font> <u>-isysroot</u> <u>/Developer/SDKs/MacOSX10.4u.sdk</u> <u>-arch</u> <u>i386</u> <u>-arch</u>
     810         <u>ppc</u>
     811
     812     <font color=blue>configure.universal_cppflags</font>
     813         Additional flags to put in the CPPFLAGS environment variable when
     814         invoking the configure script.
     815         <font color=blue>Type:</font> <u>optional</u>
     816
     817     <font color=blue>configure.universal_cxxflags</font>
     818         Additional flags to put in the CXXFLAGS environment variable when
     819         invoking the configure script.
     820         <font color=blue>Type:</font> <u>optional</u>
     821         <font color=blue>Default:</font> <u>-isysroot</u> <u>/Developer/SDKs/MacOSX10.4u.sdk</u> <u>-arch</u> <u>i386</u> <u>-arch</u>
     822         <u>ppc</u>
     823
     824     <font color=blue>configure.universal_ldflags</font>
     825         Additional flags to put in the LDFLAGS environment variable when
     826         invoking the configure script.
     827         <font color=blue>Type:</font> <u>optional</u>
     828         <font color=blue>Default:</font> <u>-arch</u> <u>i386</u> <u>-arch</u> <u>ppc</u>
     829
     830<b>BUILD OPTIONS</b>
     831     Execute necessary build commands.
     832
     833     <font color=blue>build.cmd</font>
     834         Make command to run relative to <font color=blue>worksrcdir</font>.
     835         <font color=blue>Type:</font> <u>optional</u>
     836         <font color=blue>Default:</font> <u>make</u>
     837         <font color=blue>Example:</font>
     838               build.cmd scons
     839
     840     <font color=blue>build.type</font>
     841         Defines which 'make' is required, either 'gnu' or 'bsd'. Can also
     842         choose 'xcode' (or the deprecated synonym 'pbx'), however you should
     843         generally use the xcode PortGroup rather than setting this directly.
     844         Sets <font color=blue>build.cmd</font> to either <u>gnumake,</u> <u>bsdmake</u> or <u>xcodebuild</u> accordingly.
     845         <font color=blue>Type:</font> <u>optional</u>
     846         <font color=blue>Default:</font> <u>gnu</u>
     847         <font color=blue>Example:</font>
     848               build.type bsd
     849
     850     <font color=blue>build.target</font>
     851         Target passed to <font color=blue>build.cmd</font>.
     852         <font color=blue>Type:</font> <u>optional</u>
     853         <font color=blue>Default:</font> <u>all</u>
     854         <font color=blue>Example:</font>
     855               build.target all-src
     856
     857<b>DESTROOT OPTIONS</b>
     858     Execute necessary commands to install into a temporary destination root
     859     ("destroot") staging area.
     860
     861     <font color=blue>destroot.cmd</font>
     862         Install command to run relative to <font color=blue>worksrcdir</font>.
     863         <font color=blue>Type:</font> <u>optional</u>
     864         <font color=blue>Default:</font> <u>${build.cmd}</u>
     865         <font color=blue>Example:</font>
     866               destroot.cmd scons
     867
     868     <font color=blue>destroot.destdir</font>
     869         Arguments passed to <font color=blue>destroot.cmd</font> in order to install correctly into
     870         the destroot.
     871         <font color=blue>Type:</font> <u>optional</u>
     872         <font color=blue>Default:</font> <u>DESTDIR=${destroot}</u>
     873         <font color=blue>Example:</font>
     874               destroot.destdir prefix=${destroot}${prefix}
     875
     876     <font color=blue>destroot.target</font>
     877         Install target to pass to <font color=blue>destroot.cmd</font>.
     878         <font color=blue>Type:</font> <u>optional</u>
     879         <font color=blue>Default:</font> <u>install</u>
     880         <font color=blue>Example:</font>
     881               destroot.target install-src
     882
     883     <font color=blue>destroot.umask</font>
     884         Umask to use during destroot.
     885         <font color=blue>Type:</font> <u>optional</u>
     886         <font color=blue>Default:</font> <u>022</u>
     887         <font color=blue>Example:</font>
     888               destroot.umask 002
     889
     890     <font color=blue>destroot.keepdirs</font>
     891         List of directories that should not be pruned if empty upon <font color=blue>destroot</font>
     892         completion.
     893         <font color=blue>Type:</font> <u>optional</u>
     894         <font color=blue>Example:</font>
     895               destroot.keepdirs ${destroot}${prefix}/var/log/mysql
     896
     897     <font color=blue>destroot.violate_mtree</font>
     898         Indicates if a port will violate the common directory structure.
     899         Enables or disables tests for violations of mtree (e. g. non-standard
     900         directories in ${prefix}). The standard mtree can be found in
     901         porthier(7).
     902         <font color=blue>Type:</font> <u>optional</u>
     903         <font color=blue>Values:</font> <u>yes</u> <u>no</u>
     904         <font color=blue>Default:</font> <u>no</u>
     905
     906<b>TEST OPTIONS</b>
     907     Execute commands to run test suites bundled with a port.
     908
     909     <font color=blue>test.run</font>
     910         Enable running test suites bundled with a port.
     911         <font color=blue>Type:</font> <u>optional</u>
     912         <font color=blue>Example:</font>
     913               test.run yes
     914
     915     <font color=blue>test.cmd</font>
     916         Test command to run relative to <font color=blue>worksrcdir</font>.
     917         <font color=blue>Type:</font> <u>optional</u>
     918         <font color=blue>Default:</font> <u>${build.cmd}</u>
     919         <font color=blue>Example:</font>
     920               test.cmd checks.sh
     921
     922     <font color=blue>test.target</font>
     923         Test target to pass to <font color=blue>test.cmd</font>.
     924         <font color=blue>Type:</font> <u>optional</u>
     925         <font color=blue>Default:</font> <u>test</u>
     926         <font color=blue>Example:</font>
     927               test.target checks
     928
     929<b>STARTUPITEM OPTIONS</b>
     930     If a port needs to run on system startup, it can use MacPorts startupitem
     931     keywords to install native OS X startup scripts.  Startup scripts require
     932     user interaction after port installation to activate them and instruc-
     933     tions are given during port installs.
     934
     935     <font color=blue>startupitem.create</font>
     936         Choose whether or not to generate a startup item.
     937         <font color=blue>Type:</font> <u>optional</u>
     938         <font color=blue>Default:</font> <u>no</u>
     939         <font color=blue>Values:</font> <u>yes</u> <u>no</u>
     940         <font color=blue>Example:</font>
     941               startupitem.create yes
     942
     943     <font color=blue>startupitem.type</font>
     944         Select the type of startupitem to generate. By default, a startupitem
     945         will be generated that is of the appropriate type for the OS. For
     946         instance, launchd is used on system 10.4, while SystemStarter is used
     947         on prior Mac OS X systems. A global default may be specified with the
     948         startupitem_type preference in ports.conf.
     949         <font color=blue>Type:</font> <u>optional</u>
     950         <font color=blue>Default:</font> <u>default</u>
     951         <font color=blue>Values:</font> <u>SystemStarter</u> <u>launchd</u> <u>default</u> <u>rcNG</u>
     952         <font color=blue>Example</font>
     953               startupitem.type launchd
     954
     955     <font color=blue>startupitem.name</font>
     956         Displayed name of the startup item.
     957         <font color=blue>Type:</font> <u>required</u>
     958         <font color=blue>Example:</font>
     959               startupitem.name OpenSSH
     960
     961     <font color=blue>startupitem.executable</font>
     962         The name of the daemon to be run in the background. This is the pre-
     963         ferred type of startup item rather than any of startupitem.init,
     964         startupitem.start, startupitem.stop, or startupitem.restart, and may
     965         not be used together with any of these options.  This option may con-
     966         tain multiple arguments, but they must be appropriate for a call to
     967         exec; they may not contain arbitrary shell code.
     968         <font color=blue>Type:</font> <u>optional</u>
     969         <font color=blue>Values:</font> <u>/path/to/executable</u> <u>&lt;args&gt;</u>
     970         <font color=blue>Example:</font>
     971               startupitem.executable ${prefix}/bin/wonka
     972
     973     <font color=blue>startupitem.init</font>
     974         Shell code that will be executed prior to any of the options star-
     975         tupitem.start, startupitem.stop and startupitem.restart.
     976         <font color=blue>Type:</font> <u>optional</u>
     977         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
     978         <font color=blue>Example:</font>
     979               startupitem.init FOO=start
     980
     981     <font color=blue>startupitem.start</font>
     982         Shell code executed to start the daemon.
     983         <font color=blue>Type:</font> <u>optional</u>
     984         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
     985         <font color=blue>Example:</font>
     986               startupitem.start ${prefix}/share/mysql/mysql.server start
     987
     988     <font color=blue>startupitem.stop</font>
     989         Shell code executed to stop the daemon.
     990         <font color=blue>Type:</font> <u>optional</u>
     991         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
     992         <font color=blue>Example:</font>
     993               startupitem.stop ${prefix}/share/mysql/mysql.server stop
     994
     995     <font color=blue>startupitem.restart</font>
     996         Shell code executed to restart the daemon. In the absence of this
     997         key, the daemon will be restarted by taking the stop action, followed
     998         by taking the start action.
     999         <font color=blue>Type:</font> <u>optional</u>
     1000         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
     1001         <font color=blue>Example:</font>
     1002               startupitem.restart ${prefix}/share/mysql/mysql.server restart
     1003
     1004     <font color=blue>startupitem.pidfile</font>
     1005         Specification for pidfile handling. This is particularly useful in
     1006         conjunction with the startupitem.executable key, because it is impor-
     1007         tant that the startupitem know how to track the executable.  This
     1008         specifies whether the daemon generates its own pidfile (auto),
     1009         whether it generates its own but forgets to delete it, so that the
     1010         startupitem should delete it (clean), or whether it never generates
     1011         one, in which case the startupitem should manage the pidfile on its
     1012         own (manual), or whether no pidfile should be used at all (none).
     1013         <font color=blue>Type:</font> <u>optional</u>
     1014         <font color=blue>Default:</font> <u>none</u> <u>${prefix}/var/run/${name}.pid</u>
     1015         <font color=blue>Values:</font> <u>none|auto|manual|clean</u> <u>[/path/to/pidfile]</u>
     1016         <font color=blue>Example:</font>
     1017               startupitem.pidfile auto ${prefix}/var/run/${name}.pidfile
     1018
     1019     <font color=blue>startupitem.logfile</font>
     1020         Path to a logfile for logging events about the lifetime of the star-
     1021         tupitem. Depending on the type of startupitem, and the manner in
     1022         which it is started, standard output from the daemon may also be
     1023         directed to the logfile.
     1024         <font color=blue>Type:</font> <u>optional</u>
     1025         <font color=blue>Default:</font> <u>/dev/null</u>
     1026         <font color=blue>Values:</font> <u>path</u>
     1027         <font color=blue>Example:</font>
     1028               startupitem.logfile ${prefix}/var/log/mydaemon.log
     1029
     1030     <font color=blue>startupitem.logevents</font>
     1031         Control whether or not to log events to the log file. If logevents is
     1032         set, events with timestamps are logged to the logfile.
     1033         <font color=blue>Type:</font> <u>optional</u>
     1034         <font color=blue>Default:</font> <u>no</u>
     1035         <font color=blue>Values:</font> <u>yes|no</u>
     1036         <font color=blue>Example:</font>
     1037               startupitem.logevents yes
     1038
     1039     <font color=blue>startupitem.netchange</font>
     1040         Control whether the startupitem should be restarted when a change in
     1041         the machine's network state is detected.
     1042         <font color=blue>Type:</font> <u>optional</u>
     1043         <font color=blue>Default:</font> <u>no</u>
     1044         <font color=blue>Values:</font> <u>yes|no</u>
     1045         <font color=blue>Example:</font>
     1046               startupitem.netchange yes
     1047
     1048<b>DISTCHECK AND LIVECHECK OPTIONS</b>
     1049     MacPorts can automatically check if the software has been updated since
     1050     the Portfile was modified and if some external changes require an update
     1051     to the Portfile. This helps maintainers have up-to-date and working Port-
     1052     files.
     1053     Two checks are available. With distcheck, MacPorts can check that the
     1054     distfile(s) are still downloadable and did not change since the portfile
     1055     was modified.  With livecheck, MacPorts can query a resource to determine
     1056     if a newer version of the software is available.
     1057
     1058     <font color=blue>distcheck.check</font>
     1059         This option can be used to disable distcheck. It specifies what kind
     1060         of check should be performed on distfiles: <u>moddate</u> (check if the
     1061         Portfile is older than the distfile) or <u>none</u> (no check).
     1062         <font color=blue>Type:</font> <u>optional</u>
     1063         <font color=blue>Default:</font> <u>moddate</u>
     1064         <font color=blue>Values:</font> <u>moddate</u> <u>none</u>
     1065
     1066     <font color=blue>livecheck.type</font>
     1067         What kind of check to perform to figure out if the software has been
     1068         updated.  Can be <u>freshmeat</u> (uses the date_updated tag of the fresh-
     1069         meat XML file), <u>sourceforge</u> (uses the version of the latest file
     1070         release of the project), <u>googlecode</u> (uses the version of the latest
     1071         file release of the project), <u>moddate</u> (uses the modification date of
     1072         some URL resource), <u>regex</u> (retrieve the version by applying a regex
     1073         to some URL resource), <u>regexm</u> (retrieve the version by applying a
     1074         multi-line regex to some URL resource), <u>md5</u> (compares the md5 sum of
     1075         some URL resource) or <u>none</u> (no check).
     1076         <font color=blue>Type:</font> <u>optional</u>
     1077         <font color=blue>Default:</font> <u>sourceforge</u> or <u>googlecode</u> if the master_sites is one of
     1078         these, else <u>freshmeat</u>
     1079         <font color=blue>Values:</font> <u>freshmeat</u> <u>sourceforge</u> <u>googlecode</u> <u>moddate</u> <u>regex</u> <u>regexm</u> <u>md5</u>
     1080         <u>none</u>
     1081
     1082     <font color=blue>livecheck.name</font>
     1083         Name of the project for live checks (used for freshmeat, sourceforge,
     1084         and googlecode checks).
     1085         <font color=blue>Type:</font> <u>optional</u>
     1086         <font color=blue>Default:</font> <u>${name}</u> or the sourceforge/freshmeat/googlecode project name
     1087         if it can be guessed by looking at the master_sites.
     1088
     1089     <font color=blue>livecheck.distname</font>
     1090         Name of the file release (used for sourceforge and googlecode
     1091         checks).  For sourceforge releases use the name of the package
     1092         release.  For googlecode releases use the name of the file download,
     1093         including extension.  Replace the version part of the name with
     1094         "(.*)".
     1095         <font color=blue>Type:</font> <u>optional</u>
     1096         <font color=blue>Default:</font> <u>${livecheck.name}</u> for sourceforge projects or the first
     1097         entry in <u>${distfiles}</u> for googlecode projects
     1098
     1099     <font color=blue>livecheck.version</font>
     1100         Version of the project for live checks (used for regex-based checks).
     1101         <font color=blue>Type:</font> <u>optional</u>
     1102         <font color=blue>Default:</font> <u>${version}</u>
     1103
     1104     <font color=blue>livecheck.url</font>
     1105         URL to query for the check.
     1106         <font color=blue>Type:</font> <u>optional</u>
     1107         <font color=blue>Default:</font> <u>${homepage}</u> or
     1108         <u>http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml</u>
     1109         or
     1110         <u>http://sourceforge.net/export/rss2_</u><font color=blue></font><u>projfiles.php?project=${livecheck.name}</u>
     1111         or <u>http://code.google.com/p/${livecheck.name}/downloads/list</u>
     1112
     1113     <font color=blue>livecheck.regex</font>
     1114         Regular expression to parse the resource for regex checks.  Be sure
     1115         to use a regular expression grouping around the version component.
     1116         <font color=blue>Type:</font> <u>optional</u>
     1117
     1118     <font color=blue>livecheck.md5</font>
     1119         md5 sum to use for md5 comparison.
     1120         <font color=blue>Type:</font> <u>optional</u>
     1121
     1122<b>VARIANT OPTIONS</b>
     1123     MacPorts allows for conditional modification to be specified in a
     1124     <font color=blue>Portfile</font>, allowing for user-customization of a software's build-time set-
     1125     tings.
     1126
     1127     <font color=blue>variant</font> [<font color=blue>requires</font> <u>variant</u>] [<font color=blue>conflicts</font> <u>variant</u>] [<font color=blue>description</font> <u>description</u>]
     1128         The value is usually a TCL script which modifies one or more <font color=blue>Portfile</font>
     1129         variables. Dependencies and conflicts with other variants in the same
     1130         port can be expressed with <font color=blue>requires</font> and <font color=blue>conflicts</font>.  <font color=blue>description</font> pro-
     1131         vides a means to supply a description of the variant for the user.
     1132         <font color=blue>Type:</font> <u>optional</u>
     1133         <font color=blue>Example:</font> Add a "gnome" variant to a port.
     1134               variant gnome requires glib { configure.args-append --with-gnome \
     1135                   depends_lib-append lib:gnome-session:gnome-session }
     1136
     1137     <font color=blue>default_variants</font>
     1138         If variants are defined, then the <font color=blue>default_variants</font> value lists which
     1139         variants are enabled by default.
     1140         <font color=blue>Type:</font> <u>optional</u>
     1141         <font color=blue>Example:</font>
     1142               default_variants +ssl +tcpd
     1143
     1144     <font color=blue>universal_variant</font>
     1145         When using MacPorts on Mac OS X, a universal variant is defined and
     1146         the default behavior is to configure ports with universal flags (see
     1147         the <font color=blue>UNIVERSAL</font> <font color=blue>TARGET</font> <font color=blue>HOOKS</font> section above). The variant can be over-
     1148         ridden if the default code does not work. It can also be suppressed
     1149         if having a universal variant for the port does not make sense. To
     1150         suppress it, use the <font color=blue>universal_variant</font> option.
     1151         <font color=blue>Type:</font> <u>optional</u>
     1152         <font color=blue>Default:</font> <u>yes</u>
     1153         <font color=blue>Example:</font>
     1154               universal_variant no
     1155
     1156<b>PLATFORM OPTIONS</b>
     1157     MacPorts allows for platform-specific conditional code to be specified in
     1158     a <font color=blue>Portfile</font>, for handling differences between platforms and versions of
     1159     the same platform.
     1160
     1161     <font color=blue>platform</font> <u>platform</u> [<u>version</u>] [<u>arch</u>] <u>body</u>
     1162         The body is executed if the given platform/version/arch combination
     1163         matches os.platform or os.subplatform and/or os.major and/or os.arch.
     1164         The following examples are from the databases/db4 and devel/libidl1
     1165         <font color=blue>Portfiles</font> respectively.
     1166         <font color=blue>Type:</font> <u>optional</u>
     1167         <font color=blue>Example:</font>
     1168               platform darwin 6 { configure.args-append   --enable-tcl \
     1169                       --with-tcl=/System/Library/Tcl/8.3 }
     1170         <font color=blue>Example:</font>
     1171               platform darwin powerpc { configure.args-append \
     1172                       --host=${os.arch}-apple-rhapsody${os.version} }
     1173               platform darwin i386 { configure.args-append \
     1174                       --host=i386-gnu-rhapsody${os.version} }
     1175
     1176<b>PORTGROUP</b>
     1177     To factorize the work with similar ports, MacPorts provides the notion of
     1178     <font color=blue>PortGroup</font> that can be used to load definitions for a given class or group
     1179     of ports. See portgroup(7) for more details on the various PortGroup
     1180     classes.
     1181
     1182<b>TCL EXTENSIONS</b>
     1183     A number of TCL extensions are available for use in <font color=blue>Portfiles</font>.
     1184
     1185     <font color=blue>xinstall</font> [<font color=blue>-c</font>] [<font color=blue>-B</font> <u>suffix</u>] [<font color=blue>-b</font>] [<font color=blue>-C</font>] [<font color=blue>-f</font> <u>flags</u>] [<font color=blue>-g</font> <u>group</u>] [<font color=blue>-M</font>] [<font color=blue>-m</font> <u>mode</u>]
     1186         [<font color=blue>-o</font> <u>owner</u>] [<font color=blue>-p</font>] [<font color=blue>-S</font>] [<font color=blue>-s</font>] [<font color=blue>-W</font> <u>dir</u>] [<u>file</u> <u>...</u>] <u>destination</u>
     1187     <font color=blue>xinstall</font> <font color=blue>-d</font> [<font color=blue>-B</font> <u>suffix</u>] [<font color=blue>-b</font>] [<font color=blue>-C</font>] [<font color=blue>-f</font> <u>flags</u>] [<font color=blue>-g</font> <u>group</u>] [<font color=blue>-M</font>] [<font color=blue>-m</font> <u>mode</u>]
     1188         [<font color=blue>-o</font> <u>owner</u>] [<font color=blue>-p</font>] [<font color=blue>-S</font>] [<font color=blue>-s</font>] [<font color=blue>-W</font> <u>dir</u>] <u>directory</u>
     1189         Install file(s) to a target file or directory. The options are
     1190         intended to be compatible with install(1):
     1191
     1192         <font color=blue>-b</font>      Backup any existing files with an <u>.old</u> extension.
     1193
     1194         <font color=blue>-B</font>      Specify a different backup suffix for the <font color=blue>-b</font> flag.
     1195
     1196         <font color=blue>-c</font>      Install files (this is the default).
     1197
     1198         <font color=blue>-C</font>      Only copy a file if it is different.
     1199
     1200         <font color=blue>-d</font>      Create directories, including (if necessary) parent directo-
     1201                 ries.
     1202
     1203         <font color=blue>-f</font>      Specify target flags, see chflags(1) for details.
     1204
     1205         <font color=blue>-g</font>      Specify the group.
     1206
     1207         <font color=blue>-M</font>      Disable use of mmap(2).
     1208
     1209         <font color=blue>-m</font>      Specify an alternate mode. The default is 0755. See chmod(1)
     1210                 for defails.
     1211
     1212         <font color=blue>-p</font>      Preserve the modification time.
     1213
     1214         <font color=blue>-S</font>      Copy safely, using a temporary file.
     1215
     1216         <font color=blue>-s</font>      Strip binaries using strip(1).
     1217
     1218         <font color=blue>-W</font>      Change to <u>dir</u> before working.
     1219
     1220     <font color=blue>fs-traverse</font> [<font color=blue>-depth</font>] [<font color=blue>-ignoreErrors</font>] <u>varname</u> <u>target-list</u> <u>body</u>
     1221         Traverse the filesystem hierarchy rooted in each element of
     1222         <u>target-list</u> and execute <u>body</u> for each found file/directory.  <u>varname</u>
     1223         is set to the path of the file/directory. If <font color=blue>break</font> is called during
     1224         execution, the filesystem traversal is stopped. If <font color=blue>continue</font> is called
     1225         during execution, the current file and any children are skipped and
     1226         traversal continues with the next file/directory.
     1227
     1228         <font color=blue>-depth</font>  Equivalent to the <font color=blue>-d</font> switch to find(1).  Please note that
     1229                 using <font color=blue>-depth</font> means you cannot prune a directory with <font color=blue>continue</font>
     1230                 as it will be processed after its children.
     1231
     1232         <font color=blue>-ignoreErrors</font>
     1233                 Causes <font color=blue>fs-traverse</font> to ignore any permissions/read errors
     1234                 encountered during processing.
     1235
     1236         If <font color=blue>fs-traverse</font> is called directly on a symbolic link, the link will
     1237         be followed. All other links encountered during traversal will not be
     1238         followed.
     1239
     1240         <font color=blue>fs-traverse</font> will not descend into directories that have a different
     1241         device number than the root of the descent.
     1242
     1243         If you remove the current directory during traversal, be aware that
     1244         you must call <font color=blue>continue</font> to inform <font color=blue>fs-traverse</font> that the directory
     1245         should not be descended into.
     1246
     1247     <font color=blue>curl</font> <font color=blue>fetch</font> <u>url</u> <u>file</u>
     1248         Fetch a resource at <u>url</u> and save it to <u>file</u>.
     1249
     1250     <font color=blue>curl</font> <font color=blue>isnewer</font> <u>url</u> <u>date</u>
     1251         Determine if resource at <u>url</u> is newer than <u>date</u> (expressed in seconds
     1252         since epoch).
     1253
     1254     <font color=blue>adduser</font> <u>username</u> [<font color=blue>uid</font>=uid] [<font color=blue>gid</font>=gid] [<font color=blue>passwd</font>=passwd] [<font color=blue>realname</font>=realname]
     1255         [<font color=blue>home</font>=home] [<font color=blue>shell</font>=shell]
     1256         Add a new local user to the system with the specified uid, gid, pass-
     1257         word, real name, home directory and login shell. Note that it is usu-
     1258         ally preferable to set the add_users option rather than call adduser
     1259         directly, since it may need to be called in multiple places to handle
     1260         all cases (e.g.  installing from a binary archive).
     1261
     1262     <font color=blue>existsuser</font> <u>username</u>
     1263         Check if a local user exists.
     1264
     1265     <font color=blue>nextuid</font>
     1266         Returns the highest used uid plus one.
     1267
     1268     <font color=blue>addgroup</font> <u>group</u> [<font color=blue>gid</font>=gid] [<font color=blue>passwd</font>=passwd] [<font color=blue>realname</font>=realname]
     1269         [<font color=blue>users</font>=users]
     1270         Add a new local group to the system, with the specified gid, pass-
     1271         word, real name, and with a list users as members.
     1272
     1273     <font color=blue>existsgroup</font> <u>group</u>
     1274         Check if a local group exists and return the corresponding gid. This
     1275         can be used with adduser:
     1276               addgroup foo
     1277               adduser foo gid=[existsgroup foo]
     1278
     1279     <font color=blue>nextgid</font>
     1280         Returns the highest used gid plus one.
     1281
     1282     <font color=blue>reinplace</font> [<font color=blue>-E</font>] <u>regex</u> <u>file</u> <u>...</u>
     1283         Provide in-place sed(1) like editing of a file.  The -E flag does the
     1284         same thing as in sed(1)
     1285         <font color=blue>Example:</font>
     1286               reinplace "s|/usr/local|${prefix}|g" doc/manpage.1
     1287
     1288     <font color=blue>file</font>
     1289         Standard TCL command to manipulate file names and attributes, recom-
     1290         mended if you wish to preserve Mac OS resource forks when destrooting
     1291         ports on Mac OS X 10.3.x and Mac OS X 10.4.x . Use <font color=blue>xinstall</font> to also
     1292         preserve Extended Attributes (i.e. Access Control Lists). See file(n)
     1293         for more information on this command.
     1294
     1295     <font color=blue>copy</font>
     1296         Built-in shorthand alternative to "file copy".
     1297
     1298     <font color=blue>move</font>
     1299         Built-in shorthand alternative to "file rename".
     1300
     1301     <font color=blue>delete</font> <u>file</u> <u>...</u>
     1302         Deletes each of the given files/directories. Behaves similarly to
     1303         <font color=blue>file</font> <font color=blue>delete</font> <font color=blue>-force</font> except that <font color=blue>file</font> <font color=blue>delete</font> <font color=blue>-force</font> will fail to delete
     1304         directories properly on 10.3 systems.
     1305
     1306     <font color=blue>touch</font>
     1307         Built-in command mimicking the BSD touch command.
     1308
     1309     <font color=blue>ln</font>
     1310         Built-in command mimicking the BSD ln command.
     1311
     1312     <font color=blue>system</font> <u>commandline</u>
     1313         Execute a program. See system(3).  For calls to install(1) please use
     1314         <font color=blue>xinstall</font>.  For calls to mv(1), cp(1), rm(1) or similar, please use
     1315         the built-in commands or <font color=blue>file</font> if they don't meet your requirements.
     1316
     1317     <font color=blue>variant_isset</font> <u>variant</u>
     1318         Checks if the given <u>variant</u> is being built.
     1319
     1320     <font color=blue>variant_set</font> <u>variant</u>
     1321         Set the given <u>variant</u>.
     1322
     1323     <u>variable</u>-<font color=blue>append</font> <u>item</u>
     1324         Append <u>item</u> to the <u>variable</u>.
     1325         <font color=blue>Example:</font>
     1326               configure.args-append --with-gnomedb
     1327
     1328     <u>variable</u>-<font color=blue>delete</font> <u>item</u>
     1329         Delete <u>item</u> from the <u>variable</u>.
     1330         <font color=blue>Example:</font>
     1331               configure.args-delete --with-gnomedb
     1332
     1333     <font color=blue>readdir</font> <u>directory</u>
     1334         Return the list of elements in a <u>directory</u>, excluding <u>.</u> and <u>..</u>.
     1335
     1336     <font color=blue>strsed</font> <u>string</u> <u>pattern</u>
     1337         Perform ed(1)/tr(1)-like search, replace, and transliteration on a
     1338         string.
     1339
     1340     <font color=blue>mktemp</font> <u>template</u>
     1341         Create a temporary file using a <u>template</u>.  See mktemp(3).
     1342
     1343     <font color=blue>mkstemp</font> <u>template</u>
     1344         Create a temporary file securely using a <u>template</u>.  See mkstemp(3).
     1345
     1346     <font color=blue>mkdtemp</font> <u>template</u>
     1347         Create a temporary directory using a <u>template</u>.  See mkdtemp(3).
     1348
     1349     <font color=blue>md5</font> <u>file</u> <u>...</u>
     1350         Compute the MD5 hashes of the file(s).
     1351
     1352     <font color=blue>rpm-vercomp</font> <u>versionA</u> <u>versionB</u>
     1353         Compare two RPM-format versions for equality.  The return value is
     1354         like strcmp(), returning -1, 0, or 1 when versionA is earlier, equal
     1355         to, or later than versionB, respectively.  Note that some compari-
     1356         sions featuring floating-point notation may compare incorrectly, e.g.
     1357         2.101 is considered later than 2.2 (101 is larger than 2) which may
     1358         be incorrect per some projects versioning methods (see ticket
     1359         #11873).
     1360
     1361     <font color=blue>lpush</font> <u>varName</u> [<u>value</u> <u>...</u>]
     1362         Treats the variable given by <u>varName</u> as a list and appends each of
     1363         the <u>value</u> arguments to that list as a separate element. If <u>varName</u>
     1364         doesn't exist, it is created as a list with elements given by the
     1365         <u>value</u> arguments.  Really just an alias for lappend(n).
     1366
     1367     <font color=blue>lpop</font> <u>varName</u>
     1368         Removes the last element from the list given by <u>varName</u> and returns
     1369         it. If there are no elements in the list, the empty string is
     1370         returned. If <u>varName</u> doesn't exist, an exception is raised.
     1371
     1372     <font color=blue>lunshift</font> <u>varName</u> [<u>value</u> <u>...</u>]
     1373         Treats the variable given by <u>varName</u> as a list and prepends each of
     1374         the <u>value</u> arguments to that list as a separate element. If <u>varName</u>
     1375         doesn't exist, it is created as a list with elements given by the
     1376         <u>value</u> arguments.
     1377
     1378     <font color=blue>lshift</font> <u>varName</u>
     1379         Removes the first element from the list given by <u>varName</u> and returns
     1380         it. If there are no elements in the list, the empty string is
     1381         returned. If <u>varName</u> doesn't exist, an exception is raised.
     1382
     1383     <font color=blue>ldindex</font> <u>varName</u> [<u>index</u> <u>...</u>]
     1384         Treats the variable given by <u>varName</u> as a list and removes the ele-
     1385         ment pointed to by the sequence of <u>index</u> arguments and returns it. If
     1386         no <u>index</u> arguments are provided, <u>varName</u> is set to the empty string
     1387         and the entire former value is returned.  Has the same usage seman-
     1388         tics as lindex(n).
     1389
     1390     <font color=blue>try</font> <u>body</u> [<font color=blue>catch</font> <font color=blue>{</font> <u>type-list</u> [<u>ecvar</u>] [<u>msgvar</u>] [<u>infovar</u>] <font color=blue>}</font> <u>body</u> <u>...</u>]
     1391         [<font color=blue>finally</font> <u>body</u>]
     1392         Implements a try-catch-finally block as defined in TIP #89.
     1393         <font color=blue>Example:</font> Basic try-finally construct.
     1394               try {
     1395                   set fd [open $file r]
     1396                   # do stuff here
     1397               } finally {
     1398                   close $fd
     1399               }
     1400         <font color=blue>Example:</font> Basic try-catch construct
     1401               try {
     1402                   set result [expr $num / $div]
     1403               } catch {{ARITH DIVZERO}} {
     1404                   set result -1
     1405               }
     1406         <font color=blue>Example:</font> Basic try with multiple catches construct
     1407               try {
     1408                   set fd [open $file r]
     1409                   # do stuff here
     1410               } catch {{POSIX ENOENT} {} msgvar} {
     1411                   puts stderr $msgvar
     1412               } catch {*} {
     1413                   puts stderr "An error occurred while processing the file"
     1414                   close $fd
     1415                   throw
     1416               }
     1417
     1418     <font color=blue>throw</font> [<u>type</u>] [<u>message</u>] [<u>info</u>]
     1419         Throws an exception. If given arguments, works just like <font color=blue>error</font>
     1420         <u>message</u> <u>info</u> <u>type</u>.  If called with no arguments from within a <font color=blue>catch</font>
     1421         block, re-throws the caught exception.
     1422
     1423     <font color=blue>ui_debug</font> <u>message</u>
     1424     <font color=blue>ui_error</font> <u>message</u>
     1425     <font color=blue>ui_info</font> <u>message</u>
     1426     <font color=blue>ui_msg</font> <u>message</u>
     1427     <font color=blue>ui_warn</font> <u>message</u>
     1428         Display a <u>message</u> to the user, at various different levels.
     1429         <font color=blue>Example:</font>
     1430               ui_msg "Add each user to the system using the clamav command"
     1431
     1432<b>SEE ALSO</b>
     1433     port(1), macports.conf(5), portgroup(7), portstyle(7), porthier(7),
     1434     file(n)
     1435
     1436<b>AUTHORS</b>
     1437     Landon Fuller landonf@macports.org
     1438     Juan Manuel Palacios jmpp@macports.org
     1439     Mark Duling markd@macports.org
     1440     Kevin Van Vechten kevin@opendarwin.org
     1441     Jordan K. Hubbard jkh@macports.org
     1442     Chris Ridd cjr@opendarwin.org
     1443     Kevin Ballard eridius@macports.org
     1444     Markus W. Weissmann mww@macports.org
     1445
     1446Darwin                         February 13, 2007                        Darwin
     1447</pre>
     1448}}}