[MacPorts] eborisch/man_portfile added

MacPorts noreply at macports.org
Tue Nov 1 07:13:55 PDT 2011


Added page "eborisch/man_portfile" by eborisch at macports.org from 129.176.197.27*
Page URL: <https://trac.macports.org/wiki/eborisch/man_portfile>
Content:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Output of {{{man portfile}}}; Here so Google can digest it.
----
{{{
#!html
<pre> PORTFILE(7)          BSD Miscellaneous Information Manual          PORTFILE(7)

<b>NAME</b>
     <font color=blue>Portfile</font> -- MacPorts description file reference

<b>DESCRIPTION</b>
     A complete reference of all available <font color=blue>Portfile</font> variables and example syn-
     tax.  <font color=blue>Portfiles</font> consist of valid TCL, allowing for simple key/value pair
     syntax as well as utilization of TCL's extensive functionality.
     <font color=blue>Portfiles</font> are encoded in UTF-8.

     The <font color=blue>MacPorts</font> <font color=blue>System</font> uses a target dependency system based on a
     depends/provides model, allowing for targets to be registered and exe-
     cuted in the correct order based on their individual requirements.

     A <font color=blue>Portfile</font> author needs to be aware of the various standard targets, the
     options that they require and the variables that both the targets and the
     port system provide.

<b>PORTSYSTEM</b>
     Portfiles must begin with a PortSystem line that defines which version of
     the Portfile interpreter should be used.
     <font color=blue>Synopsis:</font>
           PortSystem 1.0

<b>MAIN VARIABLES</b>
     All ports are required to set certain variables.

     <font color=blue>name</font>
         Full name of port.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               name XFree86

     <font color=blue>version</font>
         Upstream version of software.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               version 4.2.1

     <font color=blue>epoch</font>
         If a port's version numbering changes such that a newer version looks
         older than the previous version, the <font color=blue>epoch</font> should be increased. Often
         the <font color=blue>epoch</font> is formatted like a date.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>0</u>
         <font color=blue>Example:</font>
               epoch 20041231

     <font color=blue>description</font>
         One line description of the software and what it does.  To appear in
         the description, brackets and semi-colons need to be escaped with a
         backslash (i.e.  they must be written as "\[", "\]" and "\;").  The
         escape sequences listed in re_syntax(n) may also be used, with the
         exception of \n, \r and \f.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               description Dictionary Server Protocol (RFC2229) client

     <font color=blue>long_description</font>
         A verbose description of the software and what it does.  To appear in
         the description, brackets and semi-colons need to be escaped with a
         backslash (i.e.  they must be written as "\[", "\]" and "\;").  The
         escape sequences listed in re_syntax(n) may also be used, with the
         exception of \n, \r and \f.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               long_description The GNU Image Manipulation Program \
                   (GIMP) is a powerful tool for the preparation and \
                   manipulation of digital images. The GIMP provides \
                   the user with a wide variety of image manipulation, \
                   painting, processing, and rendering tools.

     <font color=blue>notes</font>
         Notes for setup and use of the port.  This is shown after the port is
         activated and anytime the <font color=blue>notes</font> command is used; for example:

               port notes python26

         The advantage to using <font color=blue>notes</font> instead of <font color=blue>ui_msg</font> is that it can be
         queried after a port is installed but <font color=blue>ui_msg</font> is only printed during
         an install.  Therefore <font color=blue>notes</font> is good for any information which may be
         needed anytime after an install.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               notes To fully complete your installation and make python \
                  ${branch} the default, please run: \
                  sudo port install python_select \
                  sudo python_select ${name}

     <font color=blue>revision</font>
         Local revision number of <font color=blue>Portfile</font>.  Increment for port revisions
         which would change its installation in any way.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>0</u>
         <font color=blue>Example:</font>
               revision 1

     <font color=blue>categories</font>
         Categories to which this port belongs.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               categories spelling textproc

     <font color=blue>maintainers</font>
         E-mail address(es) of port maintainer(s).
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               maintainers landonf at macports.org

     <font color=blue>platforms</font>
         Declares which platforms are supported by the port.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Values:</font> <u>darwin</u> <u>freebsd</u>
         <font color=blue>Example:</font>
               platforms darwin

     <font color=blue>homepage</font>
         Project homepage for the port.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               http://wireshark.org

     <font color=blue>master_sites</font>
         List of sites to fetch <font color=blue>distfiles</font> from or a predefined mirror site
         list. If set to a predefined mirror site, without a subdirectory
         being defined, the portname is used as the name of the subdirectory.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               master_sites ftp://ftp.cdrom.com/pub/magic \
                   sourceforge

     <font color=blue>worksrcdir</font>
         Path to source directory relative to <font color=blue>workpath</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${distname}</u>
         <font color=blue>Example:</font>
               worksrcdir ${distname}-src-${version}

     <font color=blue>distname</font>
         Name of distribution file, without the <font color=blue>extract.suffix</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${name}-${version}</u>
         <font color=blue>Example:</font>
               distname ${name}-${version}-src

     <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>]
         List of checksums for the <font color=blue>distfiles</font>.  The checksum <u>type</u> can currently
         be md5, rmd160 or sha1. The <u>filename</u> can be omitted if there is only
         one distfile.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               checksums dictd-1.7.1.tar.gz md5 81317b86ea0a5df0163900ad2e6bb12c \
                       magic-words-1.7.1.tar.gz md5 897a005182928613eadd30c267ce9c5b
         <font color=blue>Example</font> <font color=blue>(ledit</font> <font color=blue>1.11):</font>
               checksums md5 a2d38ba641682509c1e964ad699a9dd2 \
                       sha1 1fb6443b5fdf3c83787953f06282d256477c1288
         <font color=blue>Example</font> <font color=blue>(ssldump</font> <font color=blue>0.9b3):</font>
               checksums md5 ac8c28fe87508d6bfb06344ec496b1dd \
                       sha1 a633a9a811a138eac5ed440d583473b644135ef5 \
                       rmd160 941cf8f2ef8459ec4f9ce65772e134505d46566

     <font color=blue>macosx_deployment_target</font>
         Value for MACOSX_DEPLOYMENT_TARGET environment variable when invoking
         the configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>(current</u> <u>OS</u> <u>version)</u>
         <font color=blue>Example:</font>
               macosx_deployment_target 10.4

     <font color=blue>use_parallel_build</font>
         If set to yes (and the user has enabled buildmakejobs in
         <u>macports.conf</u> ), the port can be built using more than one job.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>
         <font color=blue>Example:</font>
               use_parallel_build yes

     <font color=blue>use_automake</font>
         If set to yes, run the <font color=blue>automake</font> target to build any <u>Makefile.in</u> files
         for use by <u>configure</u>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>
         <font color=blue>Example:</font>
               use_automake yes

     <font color=blue>use_autoconf</font>
         If set to yes, run the <font color=blue>autoconf</font> target to build any <u>configure</u> script
         required.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>
         <font color=blue>Example:</font>
               use_autoconf yes

     <font color=blue>use_configure</font>
         If set to yes, run the <font color=blue>configure</font> target to configure the build.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>yes</u>
         <font color=blue>Example:</font>
               use_configure no

     <font color=blue>copy_log_files</font> <u>path/to/logfile1</u> <u>path/to/logfile2</u> <u>...</u>
         Copy specific log files from the workdir to the main macports log dir
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               copy_log_files config.log

     <font color=blue>conflicts</font>
         Used to list ports which conflict with the one containing the
         <font color=blue>conflicts</font> declaration.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u> <u>(empty)</u>
         <font color=blue>Example:</font>
               conflicts cdrtools

     <font color=blue>replaced_by</font>
         When a particular port is deprecated in favor of another, use
         <font color=blue>replaced_by</font> in the deprecated port and list the new one to be used.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u> <u>(empty)</u>
         <font color=blue>Example:</font>
               replaced_by xorg-renderproto

     <font color=blue>add_users</font>
         Consists of a list of usernames and settings. At appropriate times
         during the port installation process, a user will be created for each
         username with the corresponding settings. Settings are of the form
         name=value. A setting applies to the username that appeared most
         recently before it in the list.

         Applicable options are: group, gid (may be used instead of group),
         passwd, realname, home, and shell.

         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u> <u>(empty)</u>
         <font color=blue>Example:</font>
               add_users squid group=squid realname=Squid\ Proxy
               home=${prefix}/var/squid

               add_users user1 group=mygroup user2 group=mygroup

     <font color=blue>installs_libs</font>
         By default, it is assumed that ports may install libraries or headers
         that can be incorporated into their dependents. If this is not the
         case, set <font color=blue>installs_libs</font> to <u>no</u>.  This means that this port's depen-
         dents need not check that it is installed for the same architectures
         as them; that it is permissible to distribute binaries of the depen-
         dents even if their licenses conflict with the license of this port;
         and that updates to this port can never result in broken dynamic
         linking in its dependents.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u>
         <font color=blue>Example:</font>
               installs_libs no

<b>TARGET HOOKS</b>
     A number of hooks are available for customizing many of the standard tar-
     gets that port(1) executes. The targets supporting these hooks are <font color=blue>fetch</font>,
     <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:

     <u>target</u><font color=blue>.asroot</font>
         Run the <u>target</u> with root privileges.
         <font color=blue>Example:</font>
               install.asroot yes

     <u>target</u><font color=blue>.dir</font>
         Directory in which to run the <u>target</u>.
         <font color=blue>Example:</font>
               automake.dir src

     <u>target</u><font color=blue>.env</font>
         Change the environment the <u>target</u> is run in. This is often overridden
         on a per <font color=blue>Portfile</font> basis.
         <font color=blue>Example:</font>
               configure.env CPP=/usr/bin/cpp-4.0

     <u>target</u><font color=blue>.pre_args</font>
         Additional arguments passed before the main arguments.
         <font color=blue>Example:</font>
               extract.pre_args -cd

     <u>target</u><font color=blue>.args</font>
         Main arguments to pass to the <u>target</u>.  This is often overridden on a
         per <font color=blue>Portfile</font> basis.
         <font color=blue>Example:</font>
               configure.args --enable-fooble

     <u>target</u><font color=blue>.post_args</font>
         Additional arguments passed after the main arguments.
         <font color=blue>Example:</font>
               extract.post_args | tar xf -

<b>RUNTIME VARIABLES</b>
     Read-only access to the MacPorts configuration is provided.

     <font color=blue>prefix</font>
         Install prefix
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>/opt/local</u>

     <font color=blue>libpath</font>
         Location of ports-specific TCL libraries.
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>portpath</font>
         Full path to the Portfile location.
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>work</u>

     <font color=blue>workpath</font>
         Full path to work directory.
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>${portbuildpath}/work</u>

     <font color=blue>worksrcpath</font>
         Full path to working sources (where port has unpacked itself).
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>${workpath}/${worksrcdir}</u>

     <font color=blue>filesdir</font>
         Path to port files relative to <font color=blue>portpath</font>.
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>files</u>

     <font color=blue>filespath</font>
         Full path to the port files location.
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>${portpath}/${filesdir}</u>

     <font color=blue>distpath</font>
         Location to store downloaded distfiles.
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>${sysportpath}/distfiles/${dist_</u><font color=blue></font><u>subdir}/</u>

     <font color=blue>os.arch</font>
         Identifies hardware type (e.g. "powerpc").
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>os.version</font>
         Version number of operating system (e.g. "7.0").
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>os.major</font>
         Major version number of operating system (e.g. "7").
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>os.endian</font>
         Endianness of the processor (e.g. "big").
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>os.platform</font>
         Operating system name (e.g. "darwin").
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>os.subplatform</font>
         Name of specific operating system variant (e.g. "macosx").
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>install.user</font>
         User for MacPorts installation (e.g.  <u>root</u>)
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>install.group</font>
         Group for MacPorts installation (e.g.  <u>wheel</u>)
         <font color=blue>Type:</font> <u>read-only</u>

     <font color=blue>applications_dir</font>
         Absolute path to the final location to install Mac OS X application
         bundles (.app directories).
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>/Applications/Macports</u>

     <font color=blue>frameworks_dir</font>
         Absolute path to the final location to install Mac OS X framework
         bundles (.framework directories).
         <font color=blue>Type:</font> <u>read-only</u>
         <font color=blue>Default:</font> <u>${prefix}/Library/Frameworks</u>

<b>DEPENDENCY OPTIONS</b>
     Port dependencies should refer to other MacPort ports whenever possible,
     therefore each dependency should be expressed in the format:

     port:<port>

     Where <port> represents the name of an existing MacPorts <font color=blue>port</font>.  If satis-
     fying a dependency with a MacPorts port is not practical and it is likely
     that a dependency must be met by an Apple optional install, then the
     alternative dependency format:

     <u>type</u>:<filename>:<port>

     may be used. Where <u>type</u> is "bin" if <filename> is a program, "lib" if it
     is a library, or "path" if it is a path to an installed file.
     <font color=blue>Example:</font>
           lib:libX11.6:XFree86

     <font color=blue>depends_fetch</font>
         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>,
         <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.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               depends_fetch port:mercurial

     <font color=blue>depends_extract</font>
         List of dependencies to check before <font color=blue>extract</font>, <font color=blue>patch</font>, <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.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               depends_extract port:xz-devel

     <font color=blue>depends_build</font>
         List of dependencies to check before <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.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               depends_build port:autoconf

     <font color=blue>depends_run</font>
         List of dependencies to check before <font color=blue>destroot</font>, <font color=blue>install</font> and <font color=blue>package</font>
         targets. Will be recorded in the registry as being required by the
         dependent port when it is installed.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               depends_run port:bash

     <font color=blue>depends_lib</font>
         List of dependencies to check before <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. Will be recorded in the registry as
         being required by the dependent port when it is installed.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               depends_lib port:libfetch

<b>FETCH OPTIONS</b>
     Fetch all distribution files and patches.

     <font color=blue>master_sites.mirror_subdir</font>
         Subdirectory to append to all mirror sites for any list specified in
         master_sites.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${name}</u>
         <font color=blue>Example:</font>
               master_sites.mirror_subdir magic

     <font color=blue>patch_sites</font>
         List of sites to fetch <font color=blue>patchfiles</font> from or a predefined mirror site
         list.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${master_</u><font color=blue></font><u>sites}</u>
         <font color=blue>Example:</font>
               patch_sites ftp://ftp.patchcityrepo.com/pub/magic/patches

     <font color=blue>patch_sites.mirror_subdir</font>
         Subdirectory to append to all mirror sites for any list specified in
         <font color=blue>patch_sites</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${name}</u>
         <font color=blue>Example:</font>
               patch_sites.mirror_subdir magic

     <font color=blue>extract.suffix</font>
         Suffix to append to <font color=blue>distname</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>.tar.gz</u>
         <font color=blue>Example:</font>
               extract.suffix .tgz

     <font color=blue>distfiles</font>
         List of distribution files to fetch from <font color=blue>master_sites</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>[suffix</u> <u>${distname}]</u>
         <font color=blue>Example:</font>
               distfiles magicsource.tar.gz cluebat.tar.bz2

     <font color=blue>patchfiles</font>
         List of patches to fetch and apply.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               patchfiles japanese-widechar-fix.diff
               japanese-localization.diff

     <font color=blue>use_zip</font>
         Use zip.
         Sets extract.suffix to: .zip
         Sets extract.cmd to: unzip
         Sets extract.pre_args to: -q
         Sets extract.post_args to: "-d ${workpath}"
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               use_zip yes

     <font color=blue>use_bzip2</font>
         Use bzip2.
         Sets extract.suffix to: .bz2
         Sets extract.cmd to: bzip2
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               use_bzip2 yes

     <font color=blue>use_lzma</font>
         Use lzma.
         Sets extract.suffix to: .lzma
         Sets extract.cmd to: lzma
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               use_lzma yes

     <font color=blue>use_xz</font>
         Use xz.
         Sets extract.suffix to: .xz
         Sets extract.cmd to: xz
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               use_xz yes

     <font color=blue>use_7z</font>
         Use 7z (7zip).
         Sets extract.suffix to: .7z
         Sets extract.cmd to: 7za
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               use_7z yes

     <font color=blue>dist_subdir</font>
         Create a sub-directory in <font color=blue>distpath</font> to store all fetched files.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${name}</u>
         <font color=blue>Example:</font>
               dist_subdir vim${version}

   <font color=blue>ADVANCED</font> <font color=blue>FETCH</font> <font color=blue>OPTIONS</font>
     Some mirrors require special options for a resource to be properly
     fetched.

     <font color=blue>fetch.user</font>
         HTTP or FTP user to fetch the resource.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>fetch.password</font>
         HTTP or FTP password to fetch the resource.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>fetch.use_epsv</font>
         Whether to use EPSV command for FTP transfers.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>yes</u>

     <font color=blue>fetch.ignore_sslcert</font>
         Whether to ignore the host SSL certificate (for HTTPS).
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>

   <font color=blue>FETCHING</font> <font color=blue>FROM</font> <font color=blue>CVS</font>
     As an alternative to fetching distribution files, pulling the sources
     from a CVS repository is supported. Use of CVS can give rise to non-
     reproducible builds, so it is strongly discouraged.

     <font color=blue>cvs.root</font>
         Specify the address to a CVS repository from which to checkout files.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u>
         <font color=blue>Example:</font>
               cvs.root :pserver:anonymous at cvs.sv.gnu.org:/sources/emacs

     <font color=blue>cvs.tag</font>
         Specify a CVS tag identifying the code to checkout.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default</font> <u>none</u>
         <font color=blue>Example:</font>
               cvs.tag HEAD

     <font color=blue>cvs.date</font>
         A date that identifies the CVS code set to checkout.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default</font> <u>none</u>
         <font color=blue>Example:</font>
               cvs.date "12-April-2005"

     <font color=blue>cvs.module</font>
         A CVS module from which to check out the code.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default</font> <u>none</u>
         <font color=blue>Example:</font>
               cvs.module Sources

   <font color=blue>FETCHING</font> <font color=blue>FROM</font> <font color=blue>SUBVERSION</font>
     As an alternative to fetching distribution files, pulling the sources
     from a subversion repository is supported. Use of subversion can give
     rise to non-reproducible builds, so it is strongly discouraged.

     <font color=blue>svn.url</font>
         Specify the url from which to fetch files.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Default:</font> <u>none</u>
         <font color=blue>Example:</font>
               svn.url http://www.domain.com/svn-repo/mydirectory
               svn.url svn://www.domain.com/svn-repo/mydirectory

     <font color=blue>svn.tag</font>
         Specify a tag from which svn should fetch files. This corresponds to
         the -r option to the svn cli.  Note that you will need to use back-
         slashes to escape characters that have meaning to the Tcl inter-
         preter, such as braces and double quotes.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u>
         <font color=blue>Example:</font>
               svn.tag 37192
               svn.tag \{\"2006-02-17 15:30 +0230\"\}

   <font color=blue>FETCHING</font> <font color=blue>FROM</font> <font color=blue>GIT</font>
     As an alternative to fetching distribution files, pulling the sources
     from a git repository is supported. Use of git can give rise to non-
     reproducible builds, so it is strongly discouraged.

     <font color=blue>git.url</font>
         Specify the url from which to fetch files
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Default:</font> <u>none</u>
         <font color=blue>Example:</font>
               git.url git://git.kernel.org/pub/scm/git/git.git
               git.url http://www.kernel.org/pub/scm/git/git.git

     <font color=blue>git.branch</font>
         Specify a branch (or other commit-ish) that git should checkout.
         Note that any branch besides HEAD should be prefixed by origin/.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u>
         <font color=blue>Example:</font>
               git.branch 72bf1c8
               git.branch origin/next

<b>EXTRACT OPTIONS</b>
     Extract all compressed/archived files.

     <font color=blue>extract.only</font>
         List of files to extract into <font color=blue>workpath</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${distfiles}</u>
         <font color=blue>Example:</font>
               extract.only worksrc-1.4.4.tar.gz

     <font color=blue>extract.cmd</font>
         Command to perform the extraction.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>gzip</u>
         <font color=blue>Example:</font>
               extract.cmd bzip2

     <font color=blue>extract.mkdir</font>
         Create the <font color=blue>worksrcdir</font> prior to extraction; useful for ports which
         extract directly into the current working directory instead of a sub-
         directory.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>
         <font color=blue>Example:</font>
               extract.mkdir yes

<b>CONFIGURE OPTIONS</b>
     MacPorts provide special support for configure flags (CFLAGS, LDFLAGS,
     CPPFLAGS, CXXFLAGS, CC, CXX, CPP, FC, F77, F90). Please note that the
     previous way to alter these flags (using configure.env) may become depre-
     cated at some point. The following options are defined:

     <font color=blue>configure.optflags</font>
         Flags to use for optimization.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>-O2</u>
         <font color=blue>Example:</font>
               configure.optflags -O3

     <font color=blue>configure.cflags</font>
         Flags to put in the CFLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${configure.optflags}</u>
         <font color=blue>Example:</font>
               configure.cflags-append -DHAS_LRINTF

     <font color=blue>configure.cppflags</font>
         Flags to put in the CPPFLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>-I${prefix}/include</u>

     <font color=blue>configure.cxxflags</font>
         Flags to put in the CXXFLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${configure.optflags}</u>

     <font color=blue>configure.objcflags</font>
         Flags to put in the OBJCFLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${configure.optflags}</u>

     <font color=blue>configure.ldflags</font>
         Flags to put in the LDFLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>-L${prefix}/lib</u>

     <font color=blue>configure.fflags</font>
         Flags to put in the FFLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${configure.optflags}</u>

     <font color=blue>configure.f90flags</font>
         Flags to put in the F90FLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${configure.optflags}</u>

     <font color=blue>configure.fcflags</font>
         Flags to put in the FCFLAGS environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${configure.optflags}</u>

     <font color=blue>configure.classpath</font>
         Flags to put in the CLASSPATH environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.cc</font>
         C-compiler to put in the CC environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               configure.cc /usr/bin/gcc

     <font color=blue>configure.cpp</font>
         C-preprocessor to put in the CPP environment variable when invoking
         the configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.cxx</font>
         C++-compiler to put in the CXX environment variable when invoking the
         configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.objc</font>
         Objective-C-compiler to put in the OBJC environment variable when
         invoking the configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               configure.objc ${prefix}/bin/gcc-mp-4.1

     <font color=blue>configure.fc</font>
         Fortran-compiler to put in the FC environment variable when invoking
         the configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.f77</font>
         Fortran-77-compiler to put in the F77 environment variable when
         invoking the configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.f90</font>
         Fortran-90-compiler to put in the F90 environment variable when
         invoking the configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.javac</font>
         Java compiler to put in the JAVAC environment variable when invoking
         the configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.compiler</font>
         Selects a complete compiler suite to use. This option will override
         the compiler environment variable for all compilers the named suite
         features. Please note that this option will intentionally not set any
         dependencies on the selected compiler suite!  <u>gcc-3.3</u> <u>gcc-4.0</u> <u>gcc-4.2</u>
         use the standard system compiler suites, <u>llvm-gcc-4.2</u> <u>clang</u> use the
         newer, non-default compilers installed by Xcode, <u>apple-gcc-3.3</u>
         <u>apple-gcc-4.0</u> <u>apple-gcc-4.2</u> use Apple's gcc suite installed via Mac-
         Ports, <u>macports-gcc-3.3</u> <u>macports-gcc-3.4</u> <u>macports-gcc-4.0</u>
         <u>macports-gcc-4.1</u> <u>macports-gcc-4.2</u> <u>macports-gcc-4.3</u> <u>macports-gcc-4.4</u>
         <u>macports-gcc-4.5</u> use the vanilla gcc installed via MacPorts.
         <font color=blue>Type:</font> <u>optional</u>
         <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>
         <u>apple-gcc-4.0</u> <u>apple-gcc-4.2</u> <u>macports-gcc-3.3</u> <u>macports-gcc-3.4</u>
         <u>macports-gcc-4.0</u> <u>macports-gcc-4.1</u> <u>macports-gcc-4.2</u> <u>macports-gcc-4.3</u>
         <u>macports-gcc-4.4</u> <u>macports-gcc-4.5</u>
         <font color=blue>Example:</font>
               configure.compiler gcc-4.0

   <font color=blue>UNIVERSAL</font> <font color=blue>TARGET</font> <font color=blue>HOOKS</font>
     For universal builds of configure-based ports, we also define specific
     target hooks. These can be overridden for specific ports. Please note
     that these hooks are used by the default universal variant and redefining
     the variant will make them useless.

     <font color=blue>configure.universal_args</font>
         Arguments appended to the configure script to build the port univer-
         sal.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>--disable-dependency-tracking</u>

     <font color=blue>configure.universal_cflags</font>
         Additional flags to put in the CFLAGS environment variable when
         invoking the configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>-isysroot</u> <u>/Developer/SDKs/MacOSX10.4u.sdk</u> <u>-arch</u> <u>i386</u> <u>-arch</u>
         <u>ppc</u>

     <font color=blue>configure.universal_cppflags</font>
         Additional flags to put in the CPPFLAGS environment variable when
         invoking the configure script.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>configure.universal_cxxflags</font>
         Additional flags to put in the CXXFLAGS environment variable when
         invoking the configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>-isysroot</u> <u>/Developer/SDKs/MacOSX10.4u.sdk</u> <u>-arch</u> <u>i386</u> <u>-arch</u>
         <u>ppc</u>

     <font color=blue>configure.universal_ldflags</font>
         Additional flags to put in the LDFLAGS environment variable when
         invoking the configure script.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>-arch</u> <u>i386</u> <u>-arch</u> <u>ppc</u>

<b>BUILD OPTIONS</b>
     Execute necessary build commands.

     <font color=blue>build.cmd</font>
         Make command to run relative to <font color=blue>worksrcdir</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>make</u>
         <font color=blue>Example:</font>
               build.cmd scons

     <font color=blue>build.type</font>
         Defines which 'make' is required, either 'gnu' or 'bsd'. Can also
         choose 'xcode' (or the deprecated synonym 'pbx'), however you should
         generally use the xcode PortGroup rather than setting this directly.
         Sets <font color=blue>build.cmd</font> to either <u>gnumake,</u> <u>bsdmake</u> or <u>xcodebuild</u> accordingly.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>gnu</u>
         <font color=blue>Example:</font>
               build.type bsd

     <font color=blue>build.target</font>
         Target passed to <font color=blue>build.cmd</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>all</u>
         <font color=blue>Example:</font>
               build.target all-src

<b>DESTROOT OPTIONS</b>
     Execute necessary commands to install into a temporary destination root
     ("destroot") staging area.

     <font color=blue>destroot.cmd</font>
         Install command to run relative to <font color=blue>worksrcdir</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${build.cmd}</u>
         <font color=blue>Example:</font>
               destroot.cmd scons

     <font color=blue>destroot.destdir</font>
         Arguments passed to <font color=blue>destroot.cmd</font> in order to install correctly into
         the destroot.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>DESTDIR=${destroot}</u>
         <font color=blue>Example:</font>
               destroot.destdir prefix=${destroot}${prefix}

     <font color=blue>destroot.target</font>
         Install target to pass to <font color=blue>destroot.cmd</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>install</u>
         <font color=blue>Example:</font>
               destroot.target install-src

     <font color=blue>destroot.umask</font>
         Umask to use during destroot.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>022</u>
         <font color=blue>Example:</font>
               destroot.umask 002

     <font color=blue>destroot.keepdirs</font>
         List of directories that should not be pruned if empty upon <font color=blue>destroot</font>
         completion.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               destroot.keepdirs ${destroot}${prefix}/var/log/mysql

     <font color=blue>destroot.violate_mtree</font>
         Indicates if a port will violate the common directory structure.
         Enables or disables tests for violations of mtree (e. g. non-standard
         directories in ${prefix}). The standard mtree can be found in
         porthier(7).
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Values:</font> <u>yes</u> <u>no</u>
         <font color=blue>Default:</font> <u>no</u>

<b>TEST OPTIONS</b>
     Execute commands to run test suites bundled with a port.

     <font color=blue>test.run</font>
         Enable running test suites bundled with a port.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               test.run yes

     <font color=blue>test.cmd</font>
         Test command to run relative to <font color=blue>worksrcdir</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${build.cmd}</u>
         <font color=blue>Example:</font>
               test.cmd checks.sh

     <font color=blue>test.target</font>
         Test target to pass to <font color=blue>test.cmd</font>.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>test</u>
         <font color=blue>Example:</font>
               test.target checks

<b>STARTUPITEM OPTIONS</b>
     If a port needs to run on system startup, it can use MacPorts startupitem
     keywords to install native OS X startup scripts.  Startup scripts require
     user interaction after port installation to activate them and instruc-
     tions are given during port installs.

     <font color=blue>startupitem.create</font>
         Choose whether or not to generate a startup item.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>
         <font color=blue>Values:</font> <u>yes</u> <u>no</u>
         <font color=blue>Example:</font>
               startupitem.create yes

     <font color=blue>startupitem.type</font>
         Select the type of startupitem to generate. By default, a startupitem
         will be generated that is of the appropriate type for the OS. For
         instance, launchd is used on system 10.4, while SystemStarter is used
         on prior Mac OS X systems. A global default may be specified with the
         startupitem_type preference in ports.conf.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>default</u>
         <font color=blue>Values:</font> <u>SystemStarter</u> <u>launchd</u> <u>default</u> <u>rcNG</u>
         <font color=blue>Example</font>
               startupitem.type launchd

     <font color=blue>startupitem.name</font>
         Displayed name of the startup item.
         <font color=blue>Type:</font> <u>required</u>
         <font color=blue>Example:</font>
               startupitem.name OpenSSH

     <font color=blue>startupitem.executable</font>
         The name of the daemon to be run in the background. This is the pre-
         ferred type of startup item rather than any of startupitem.init,
         startupitem.start, startupitem.stop, or startupitem.restart, and may
         not be used together with any of these options.  This option may con-
         tain multiple arguments, but they must be appropriate for a call to
         exec; they may not contain arbitrary shell code.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Values:</font> <u>/path/to/executable</u> <u><args></u>
         <font color=blue>Example:</font>
               startupitem.executable ${prefix}/bin/wonka

     <font color=blue>startupitem.init</font>
         Shell code that will be executed prior to any of the options star-
         tupitem.start, startupitem.stop and startupitem.restart.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
         <font color=blue>Example:</font>
               startupitem.init FOO=start

     <font color=blue>startupitem.start</font>
         Shell code executed to start the daemon.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
         <font color=blue>Example:</font>
               startupitem.start ${prefix}/share/mysql/mysql.server start

     <font color=blue>startupitem.stop</font>
         Shell code executed to stop the daemon.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
         <font color=blue>Example:</font>
               startupitem.stop ${prefix}/share/mysql/mysql.server stop

     <font color=blue>startupitem.restart</font>
         Shell code executed to restart the daemon. In the absence of this
         key, the daemon will be restarted by taking the stop action, followed
         by taking the start action.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Values:</font> <u>sh</u> <u>code</u>
         <font color=blue>Example:</font>
               startupitem.restart ${prefix}/share/mysql/mysql.server restart

     <font color=blue>startupitem.pidfile</font>
         Specification for pidfile handling. This is particularly useful in
         conjunction with the startupitem.executable key, because it is impor-
         tant that the startupitem know how to track the executable.  This
         specifies whether the daemon generates its own pidfile (auto),
         whether it generates its own but forgets to delete it, so that the
         startupitem should delete it (clean), or whether it never generates
         one, in which case the startupitem should manage the pidfile on its
         own (manual), or whether no pidfile should be used at all (none).
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>none</u> <u>${prefix}/var/run/${name}.pid</u>
         <font color=blue>Values:</font> <u>none|auto|manual|clean</u> <u>[/path/to/pidfile]</u>
         <font color=blue>Example:</font>
               startupitem.pidfile auto ${prefix}/var/run/${name}.pidfile

     <font color=blue>startupitem.logfile</font>
         Path to a logfile for logging events about the lifetime of the star-
         tupitem. Depending on the type of startupitem, and the manner in
         which it is started, standard output from the daemon may also be
         directed to the logfile.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>/dev/null</u>
         <font color=blue>Values:</font> <u>path</u>
         <font color=blue>Example:</font>
               startupitem.logfile ${prefix}/var/log/mydaemon.log

     <font color=blue>startupitem.logevents</font>
         Control whether or not to log events to the log file. If logevents is
         set, events with timestamps are logged to the logfile.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>
         <font color=blue>Values:</font> <u>yes|no</u>
         <font color=blue>Example:</font>
               startupitem.logevents yes

     <font color=blue>startupitem.netchange</font>
         Control whether the startupitem should be restarted when a change in
         the machine's network state is detected.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>no</u>
         <font color=blue>Values:</font> <u>yes|no</u>
         <font color=blue>Example:</font>
               startupitem.netchange yes

<b>DISTCHECK AND LIVECHECK OPTIONS</b>
     MacPorts can automatically check if the software has been updated since
     the Portfile was modified and if some external changes require an update
     to the Portfile. This helps maintainers have up-to-date and working Port-
     files.
     Two checks are available. With distcheck, MacPorts can check that the
     distfile(s) are still downloadable and did not change since the portfile
     was modified.  With livecheck, MacPorts can query a resource to determine
     if a newer version of the software is available.

     <font color=blue>distcheck.check</font>
         This option can be used to disable distcheck. It specifies what kind
         of check should be performed on distfiles: <u>moddate</u> (check if the
         Portfile is older than the distfile) or <u>none</u> (no check).
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>moddate</u>
         <font color=blue>Values:</font> <u>moddate</u> <u>none</u>

     <font color=blue>livecheck.type</font>
         What kind of check to perform to figure out if the software has been
         updated.  Can be <u>freshmeat</u> (uses the date_updated tag of the fresh-
         meat XML file), <u>sourceforge</u> (uses the version of the latest file
         release of the project), <u>googlecode</u> (uses the version of the latest
         file release of the project), <u>moddate</u> (uses the modification date of
         some URL resource), <u>regex</u> (retrieve the version by applying a regex
         to some URL resource), <u>regexm</u> (retrieve the version by applying a
         multi-line regex to some URL resource), <u>md5</u> (compares the md5 sum of
         some URL resource) or <u>none</u> (no check).
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>sourceforge</u> or <u>googlecode</u> if the master_sites is one of
         these, else <u>freshmeat</u>
         <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>
         <u>none</u>

     <font color=blue>livecheck.name</font>
         Name of the project for live checks (used for freshmeat, sourceforge,
         and googlecode checks).
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${name}</u> or the sourceforge/freshmeat/googlecode project name
         if it can be guessed by looking at the master_sites.

     <font color=blue>livecheck.distname</font>
         Name of the file release (used for sourceforge and googlecode
         checks).  For sourceforge releases use the name of the package
         release.  For googlecode releases use the name of the file download,
         including extension.  Replace the version part of the name with
         "(.*)".
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${livecheck.name}</u> for sourceforge projects or the first
         entry in <u>${distfiles}</u> for googlecode projects

     <font color=blue>livecheck.version</font>
         Version of the project for live checks (used for regex-based checks).
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${version}</u>

     <font color=blue>livecheck.url</font>
         URL to query for the check.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>${homepage}</u> or
         <u>http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml</u>
         or
         <u>http://sourceforge.net/export/rss2_</u><font color=blue></font><u>projfiles.php?project=${livecheck.name}</u>
         or <u>http://code.google.com/p/${livecheck.name}/downloads/list</u>

     <font color=blue>livecheck.regex</font>
         Regular expression to parse the resource for regex checks.  Be sure
         to use a regular expression grouping around the version component.
         <font color=blue>Type:</font> <u>optional</u>

     <font color=blue>livecheck.md5</font>
         md5 sum to use for md5 comparison.
         <font color=blue>Type:</font> <u>optional</u>

<b>VARIANT OPTIONS</b>
     MacPorts allows for conditional modification to be specified in a
     <font color=blue>Portfile</font>, allowing for user-customization of a software's build-time set-
     tings.

     <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>]
         The value is usually a TCL script which modifies one or more <font color=blue>Portfile</font>
         variables. Dependencies and conflicts with other variants in the same
         port can be expressed with <font color=blue>requires</font> and <font color=blue>conflicts</font>.  <font color=blue>description</font> pro-
         vides a means to supply a description of the variant for the user.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font> Add a "gnome" variant to a port.
               variant gnome requires glib { configure.args-append --with-gnome \
                   depends_lib-append lib:gnome-session:gnome-session }

     <font color=blue>default_variants</font>
         If variants are defined, then the <font color=blue>default_variants</font> value lists which
         variants are enabled by default.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               default_variants +ssl +tcpd

     <font color=blue>universal_variant</font>
         When using MacPorts on Mac OS X, a universal variant is defined and
         the default behavior is to configure ports with universal flags (see
         the <font color=blue>UNIVERSAL</font> <font color=blue>TARGET</font> <font color=blue>HOOKS</font> section above). The variant can be over-
         ridden if the default code does not work. It can also be suppressed
         if having a universal variant for the port does not make sense. To
         suppress it, use the <font color=blue>universal_variant</font> option.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Default:</font> <u>yes</u>
         <font color=blue>Example:</font>
               universal_variant no

<b>PLATFORM OPTIONS</b>
     MacPorts allows for platform-specific conditional code to be specified in
     a <font color=blue>Portfile</font>, for handling differences between platforms and versions of
     the same platform.

     <font color=blue>platform</font> <u>platform</u> [<u>version</u>] [<u>arch</u>] <u>body</u>
         The body is executed if the given platform/version/arch combination
         matches os.platform or os.subplatform and/or os.major and/or os.arch.
         The following examples are from the databases/db4 and devel/libidl1
         <font color=blue>Portfiles</font> respectively.
         <font color=blue>Type:</font> <u>optional</u>
         <font color=blue>Example:</font>
               platform darwin 6 { configure.args-append   --enable-tcl \
                       --with-tcl=/System/Library/Tcl/8.3 }
         <font color=blue>Example:</font>
               platform darwin powerpc { configure.args-append \
                       --host=${os.arch}-apple-rhapsody${os.version} }
               platform darwin i386 { configure.args-append \
                       --host=i386-gnu-rhapsody${os.version} }

<b>PORTGROUP</b>
     To factorize the work with similar ports, MacPorts provides the notion of
     <font color=blue>PortGroup</font> that can be used to load definitions for a given class or group
     of ports. See portgroup(7) for more details on the various PortGroup
     classes.

<b>TCL EXTENSIONS</b>
     A number of TCL extensions are available for use in <font color=blue>Portfiles</font>.

     <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>]
         [<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>
     <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>]
         [<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>
         Install file(s) to a target file or directory. The options are
         intended to be compatible with install(1):

         <font color=blue>-b</font>      Backup any existing files with an <u>.old</u> extension.

         <font color=blue>-B</font>      Specify a different backup suffix for the <font color=blue>-b</font> flag.

         <font color=blue>-c</font>      Install files (this is the default).

         <font color=blue>-C</font>      Only copy a file if it is different.

         <font color=blue>-d</font>      Create directories, including (if necessary) parent directo-
                 ries.

         <font color=blue>-f</font>      Specify target flags, see chflags(1) for details.

         <font color=blue>-g</font>      Specify the group.

         <font color=blue>-M</font>      Disable use of mmap(2).

         <font color=blue>-m</font>      Specify an alternate mode. The default is 0755. See chmod(1)
                 for defails.

         <font color=blue>-p</font>      Preserve the modification time.

         <font color=blue>-S</font>      Copy safely, using a temporary file.

         <font color=blue>-s</font>      Strip binaries using strip(1).

         <font color=blue>-W</font>      Change to <u>dir</u> before working.

     <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>
         Traverse the filesystem hierarchy rooted in each element of
         <u>target-list</u> and execute <u>body</u> for each found file/directory.  <u>varname</u>
         is set to the path of the file/directory. If <font color=blue>break</font> is called during
         execution, the filesystem traversal is stopped. If <font color=blue>continue</font> is called
         during execution, the current file and any children are skipped and
         traversal continues with the next file/directory.

         <font color=blue>-depth</font>  Equivalent to the <font color=blue>-d</font> switch to find(1).  Please note that
                 using <font color=blue>-depth</font> means you cannot prune a directory with <font color=blue>continue</font>
                 as it will be processed after its children.

         <font color=blue>-ignoreErrors</font>
                 Causes <font color=blue>fs-traverse</font> to ignore any permissions/read errors
                 encountered during processing.

         If <font color=blue>fs-traverse</font> is called directly on a symbolic link, the link will
         be followed. All other links encountered during traversal will not be
         followed.

         <font color=blue>fs-traverse</font> will not descend into directories that have a different
         device number than the root of the descent.

         If you remove the current directory during traversal, be aware that
         you must call <font color=blue>continue</font> to inform <font color=blue>fs-traverse</font> that the directory
         should not be descended into.

     <font color=blue>curl</font> <font color=blue>fetch</font> <u>url</u> <u>file</u>
         Fetch a resource at <u>url</u> and save it to <u>file</u>.

     <font color=blue>curl</font> <font color=blue>isnewer</font> <u>url</u> <u>date</u>
         Determine if resource at <u>url</u> is newer than <u>date</u> (expressed in seconds
         since epoch).

     <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]
         [<font color=blue>home</font>=home] [<font color=blue>shell</font>=shell]
         Add a new local user to the system with the specified uid, gid, pass-
         word, real name, home directory and login shell. Note that it is usu-
         ally preferable to set the add_users option rather than call adduser
         directly, since it may need to be called in multiple places to handle
         all cases (e.g.  installing from a binary archive).

     <font color=blue>existsuser</font> <u>username</u>
         Check if a local user exists.

     <font color=blue>nextuid</font>
         Returns the highest used uid plus one.

     <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]
         [<font color=blue>users</font>=users]
         Add a new local group to the system, with the specified gid, pass-
         word, real name, and with a list users as members.

     <font color=blue>existsgroup</font> <u>group</u>
         Check if a local group exists and return the corresponding gid. This
         can be used with adduser:
               addgroup foo
               adduser foo gid=[existsgroup foo]

     <font color=blue>nextgid</font>
         Returns the highest used gid plus one.

     <font color=blue>reinplace</font> [<font color=blue>-E</font>] <u>regex</u> <u>file</u> <u>...</u>
         Provide in-place sed(1) like editing of a file.  The -E flag does the
         same thing as in sed(1)
         <font color=blue>Example:</font>
               reinplace "s|/usr/local|${prefix}|g" doc/manpage.1

     <font color=blue>file</font>
         Standard TCL command to manipulate file names and attributes, recom-
         mended if you wish to preserve Mac OS resource forks when destrooting
         ports on Mac OS X 10.3.x and Mac OS X 10.4.x . Use <font color=blue>xinstall</font> to also
         preserve Extended Attributes (i.e. Access Control Lists). See file(n)
         for more information on this command.

     <font color=blue>copy</font>
         Built-in shorthand alternative to "file copy".

     <font color=blue>move</font>
         Built-in shorthand alternative to "file rename".

     <font color=blue>delete</font> <u>file</u> <u>...</u>
         Deletes each of the given files/directories. Behaves similarly to
         <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
         directories properly on 10.3 systems.

     <font color=blue>touch</font>
         Built-in command mimicking the BSD touch command.

     <font color=blue>ln</font>
         Built-in command mimicking the BSD ln command.

     <font color=blue>system</font> <u>commandline</u>
         Execute a program. See system(3).  For calls to install(1) please use
         <font color=blue>xinstall</font>.  For calls to mv(1), cp(1), rm(1) or similar, please use
         the built-in commands or <font color=blue>file</font> if they don't meet your requirements.

     <font color=blue>variant_isset</font> <u>variant</u>
         Checks if the given <u>variant</u> is being built.

     <font color=blue>variant_set</font> <u>variant</u>
         Set the given <u>variant</u>.

     <u>variable</u>-<font color=blue>append</font> <u>item</u>
         Append <u>item</u> to the <u>variable</u>.
         <font color=blue>Example:</font>
               configure.args-append --with-gnomedb

     <u>variable</u>-<font color=blue>delete</font> <u>item</u>
         Delete <u>item</u> from the <u>variable</u>.
         <font color=blue>Example:</font>
               configure.args-delete --with-gnomedb

     <font color=blue>readdir</font> <u>directory</u>
         Return the list of elements in a <u>directory</u>, excluding <u>.</u> and <u>..</u>.

     <font color=blue>strsed</font> <u>string</u> <u>pattern</u>
         Perform ed(1)/tr(1)-like search, replace, and transliteration on a
         string.

     <font color=blue>mktemp</font> <u>template</u>
         Create a temporary file using a <u>template</u>.  See mktemp(3).

     <font color=blue>mkstemp</font> <u>template</u>
         Create a temporary file securely using a <u>template</u>.  See mkstemp(3).

     <font color=blue>mkdtemp</font> <u>template</u>
         Create a temporary directory using a <u>template</u>.  See mkdtemp(3).

     <font color=blue>md5</font> <u>file</u> <u>...</u>
         Compute the MD5 hashes of the file(s).

     <font color=blue>rpm-vercomp</font> <u>versionA</u> <u>versionB</u>
         Compare two RPM-format versions for equality.  The return value is
         like strcmp(), returning -1, 0, or 1 when versionA is earlier, equal
         to, or later than versionB, respectively.  Note that some compari-
         sions featuring floating-point notation may compare incorrectly, e.g.
         2.101 is considered later than 2.2 (101 is larger than 2) which may
         be incorrect per some projects versioning methods (see ticket
         #11873).

     <font color=blue>lpush</font> <u>varName</u> [<u>value</u> <u>...</u>]
         Treats the variable given by <u>varName</u> as a list and appends each of
         the <u>value</u> arguments to that list as a separate element. If <u>varName</u>
         doesn't exist, it is created as a list with elements given by the
         <u>value</u> arguments.  Really just an alias for lappend(n).

     <font color=blue>lpop</font> <u>varName</u>
         Removes the last element from the list given by <u>varName</u> and returns
         it. If there are no elements in the list, the empty string is
         returned. If <u>varName</u> doesn't exist, an exception is raised.

     <font color=blue>lunshift</font> <u>varName</u> [<u>value</u> <u>...</u>]
         Treats the variable given by <u>varName</u> as a list and prepends each of
         the <u>value</u> arguments to that list as a separate element. If <u>varName</u>
         doesn't exist, it is created as a list with elements given by the
         <u>value</u> arguments.

     <font color=blue>lshift</font> <u>varName</u>
         Removes the first element from the list given by <u>varName</u> and returns
         it. If there are no elements in the list, the empty string is
         returned. If <u>varName</u> doesn't exist, an exception is raised.

     <font color=blue>ldindex</font> <u>varName</u> [<u>index</u> <u>...</u>]
         Treats the variable given by <u>varName</u> as a list and removes the ele-
         ment pointed to by the sequence of <u>index</u> arguments and returns it. If
         no <u>index</u> arguments are provided, <u>varName</u> is set to the empty string
         and the entire former value is returned.  Has the same usage seman-
         tics as lindex(n).

     <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>]
         [<font color=blue>finally</font> <u>body</u>]
         Implements a try-catch-finally block as defined in TIP #89.
         <font color=blue>Example:</font> Basic try-finally construct.
               try {
                   set fd [open $file r]
                   # do stuff here
               } finally {
                   close $fd
               }
         <font color=blue>Example:</font> Basic try-catch construct
               try {
                   set result [expr $num / $div]
               } catch {{ARITH DIVZERO}} {
                   set result -1
               }
         <font color=blue>Example:</font> Basic try with multiple catches construct
               try {
                   set fd [open $file r]
                   # do stuff here
               } catch {{POSIX ENOENT} {} msgvar} {
                   puts stderr $msgvar
               } catch {*} {
                   puts stderr "An error occurred while processing the file"
                   close $fd
                   throw
               }

     <font color=blue>throw</font> [<u>type</u>] [<u>message</u>] [<u>info</u>]
         Throws an exception. If given arguments, works just like <font color=blue>error</font>
         <u>message</u> <u>info</u> <u>type</u>.  If called with no arguments from within a <font color=blue>catch</font>
         block, re-throws the caught exception.

     <font color=blue>ui_debug</font> <u>message</u>
     <font color=blue>ui_error</font> <u>message</u>
     <font color=blue>ui_info</font> <u>message</u>
     <font color=blue>ui_msg</font> <u>message</u>
     <font color=blue>ui_warn</font> <u>message</u>
         Display a <u>message</u> to the user, at various different levels.
         <font color=blue>Example:</font>
               ui_msg "Add each user to the system using the clamav command"

<b>SEE ALSO</b>
     port(1), macports.conf(5), portgroup(7), portstyle(7), porthier(7),
     file(n)

<b>AUTHORS</b>
     Landon Fuller landonf at macports.org
     Juan Manuel Palacios jmpp at macports.org
     Mark Duling markd at macports.org
     Kevin Van Vechten kevin at opendarwin.org
     Jordan K. Hubbard jkh at macports.org
     Chris Ridd cjr at opendarwin.org
     Kevin Ballard eridius at macports.org
     Markus W. Weissmann mww at macports.org

Darwin                         February 13, 2007                        Darwin
</pre>
}}}
-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on eborisch/man_portfile. If it was not you, please
report to .


More information about the macports-changes mailing list