Copyright © 2007 The MacPorts Project
Copyright © 2002, 2003, 2004 The OpenDarwin Project
MacPorts is an easy to use system for compiling, installing, and managing open source software. MacPorts may be conceptually divided into two main parts: the infrastructure, known as MacPorts base, and the set of available ports. A MacPorts port is a set of specifications contained in a Portfile that defines an application, its characteristics, and any files or special instructions required to install it. This allows you to use a single command to tell MacPorts to automatically download, compile, and install applications and libraries. But using MacPorts to manage your open source software provides several other significant advantages. For example, MacPorts:
Installs automatically any required support software, known as dependencies, for a given port.
Provides for uninstalls and upgrades for installed ports.
Confines ported software to a private “sandbox” that keeps it from intermingling with your operating system and its vendor-supplied software to prevent them from becoming corrupted.
Allows you to create pre-compiled binary installers of ported applications to quickly install software on remote computers without compiling from source code.
MacPorts is developed on Mac OS X, though it is designed to be portable so it can work on other Unix-like systems, especially those descended from the Berkeley Software Distribution (BSD).
The following notational conventions are used in the MacPorts Guide to distinguish between terminal input/output, file text, and other special text types.
Terminal I/O and file text.
%%Commands to be typed into a terminal window.
Command output to a terminal window.
File text.
Other special text types.
A hyperlink: spontaneous combustion.
A file: /var/log/system.log.
A command: ifconfig.
An option: port install
This chapter shows you how to install MacPorts and its prerequisites step-by-step. Note that section 1 and section 2 (installing X11 and Xcode Tools) are Mac OS X specific. If you wish to install MacPorts on another platform, first make sure you have X11 and gcc installed, and then begin at section 3.2 by performing a MacPorts install from source code and proceed to the end of the chapter.
It is recommended that you install the X Window System (X11) even if you don't plan to run X11 applications immediately. Apple's X11 is preferred over either of the X11 ports, XFree86 and Xorg, therefore Apple's X11 is normally used to satisfy ports that depend upon X11 (see non-port dependencies). If Apple's X11 wasn't installed when Mac OS X was installed, follow these steps.
Insert the “Mac OS X Install Disk” and run the package named “Optional Installs”.
At the software selection window expand the Applications category and click the check box beside X11 (and nothing else).
Click to install X11.
Drag the /Applications/Utilities/X11 icon
to your dock —you must open X11 before launching an X11
application.
If you're using Mac OS X 10.3 then you can download the X11 installer from the Apple download page.
X11 and the X11SDK (from Xcode Tools) are both required for X11
apps. To verify the presence of both, check for files
com.apple.pkg.X11User.bom &
com.apple.pkg.X11SDKLeo.bom in
/Library/Receipts/boms/. On Mac OS X 10.4, look for
files X11User.pkg &
X11SDK.pkg in
/Library/Receipts/.
To launch X11 applications directly from an X11 window (instead of a terminal window), you need to have the MacPorts paths imported into X11 sessions when they are opened. This is a two step process.
First, tell X11 about the ~/.profile file
that will be created after you install MacPorts. Do this by editing the
file /etc/X11/xinit/xinitrc and adding this line
near the top.
source ~/.profile
Now finish the process by making subsequent X11 sessions opened
using the menu bar respect your .profile
file.
Open X11 and select from the menu.
Double-click the menu item and change: “xterm” to “xterm -ls”
Click to save the change.
To install Xcode Tools and the X11 SDK, follow these steps.
Download and install the latest version of Xcode Tools from Apple's developer site—do not install it from a Mac OS X install disk unless you've checked for the latest version on Apple's site; older versions of Xcode Tools often cause port install failures.
Run the Xcode Tools package installer.
Click the button , expand the Applications category and click the check box beside to add it to the default items.
Click to install Xcode Tools and the X11 SDK.
Xcode Tools are not updated via Mac OS X's Software Update utility.
If you are using Mac OS X, you should install MacPorts using the Mac
OS X package installer unless you do not wish to install it to
/opt/local/, the default MacPorts location, or if you
wish to install a pre-release version of MacPorts base. However, if you
wish to install multiple copies
of MacPorts or install MacPorts on another OS platform, you must
install MacPorts from the source
code.
Though a distinction is made between pre-release and release versions of MacPorts base, the ports collection supports no such distinction or versioning. The selfupdate command installs the latest port revisions from subversion (at a slight delay), and updates MacPorts base to the latest released version.
The Mac OS X package installer automatically installs MacPorts, sets the shell environment, and runs a selfupdate operation to update the ports tree and MacPorts base with the latest release.
Download the latest MacPorts-1.x.x.dmg
disk image from the MacPorts
download directory.
Double-click the MacPorts-1.x.x.pkg
package installer on the disk image.
Perform the default “easy” install.
If you installed MacPorts using the package installer, skip this section. To install MacPorts from the source code, follow the steps below.
Download and unzip the latest MacPorts tarball from the MacPorts download directory.
Perform the commands shown in a terminal window. If you wish
to use a path other than /opt/local, use the
option --prefix and substitute a path for
NEW_PREFIX.
%%cd ~/MacPorts-1.x.x/%%./configure--prefix=NEW_PREFIX (setting prefix is optional)%%make%%sudo make install
Occasionally a MacPorts developer may wish to install more than
one MacPorts instance on the same host. Only one copy of MacPorts may
use the default Tcl library path /Library/Tcl/,
so for additional installations use the option
--with-tclpackage as shown below and substitute
NEW_TCL_PACKAGE with any empty directory, for example
/Library/Tcl/macports-new/.
The first command temporarily removes the standard MacPorts binary paths because they must not be present while installing a second instance.
%%export PATH=/bin:/sbin:/usr/bin:/usr/sbin%%cd ~/MacPorts-1.x.x/%%./configure --prefix=NEW_PREFIX --with-tclpackage=NEW_TCLPACKAGE%%make%%sudo make install
MacPorts base upgrades are performed automatically (when a newer release is available) during a selfupdate operation. To upgrade a copy of MacPorts that was installed from source to the newer release of the source code, simply repeat the source install with the newer version of the MacPorts source code.
To uninstall MacPorts from the default location
/opt/local/, perform these commands from a terminal
window.
%%sudo rm -rf /opt/local/%%sudo rm -rf /Applications/MacPorts/%%sudo rm -rf /Library/Tcl/macports1.0/%%sudo rm -rf /Library/LaunchDaemons/org.macports.*
MacPorts requires changes to the shell environment. If MacPorts was
installed using the Mac OS X package installer, a
“postflight” script was run after installation that places a
.profile file in the home directory, which contains
the environmental variables required for MacPorts. If a current
.profile file exists at installation time it is
renamed to “mpsaved_$timestamp”.
If you have either a .bash_login or a
.bash_profile file in your home directory, they may
take precedence over .profile. You may either
remove the previously used file, or add the contents of
.profile to it.
The postflight script automatically copies a
.profile containing variables according to the rules
described below. Those installing
MacPorts from source code must modify their environment manually
using the rules below as a guide.
Be sure to notice in the rules below that the variables MANPATH and DISPLAY are only needed under certain conditions.
A PATH variable is set as shown regardless of
platform or environment that appends the MacPorts file paths in front
of the default file paths so MacPorts libraries will take precedence
over vendor-supplied libraries.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
A MANPATH variable is set as shown only if a
MANPATH variable was already set in a previous
.profile that does not include the value
${prefix}/share/man, nor any empty values.
Otherwise, it is omitted.
export MANPATH=/opt/local/share/man:$MANPATH
Here are some examples of paths that contain empty values:
| /usr/share/man: |
| :/usr/share/man |
| /usr/share/man::/usr/X11R6/man |
A DISPLAY variable for X11 application
support is set as shown only for Mac OS X versions 10.4 (Tiger) and
earlier if a DISPLAY variable is not already set in
a .profile active at installation time. A
DISPLAY variable is never set for Mac OS X 10.5
(Leopard) or higher.
export DISPLAY=:0.0
Changes to ~/.profile do not take effect
until a new terminal session is opened. Type env in
the terminal to verify the current environment settings. Example output
for the env command is shown below.
MANPATH= TERM_PROGRAM=Apple_Terminal TERM=xterm-color SHELL=/bin/bash TERM_PROGRAM_VERSION=237 USER=joebob __CF_USER_TEXT_ENCODING=0x1FC:0:0 PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin PWD=/Users/joebob EDITOR=/usr/bin/pico SHLVL=1 HOME=/Users/joebob LOGNAME=joebob DISPLAY=:0.0 SECURITYSESSIONID=b0cea0 _=/usr/bin/env
This chapter describes using the port command, port variants, common tasks and port binaries.
The MacPorts port command is the main utility
used to interact with MacPorts. It is used to update
Portfiles and the MacPorts infrastructure, and
install and manage ports.
The selfupdate option should be used regularly to
sync the local ports tree with the global MacPorts
ports repository so you will have the latest port versions. It also
checks for new revisions of the MacPorts infrastructure, called MacPorts
base, and upgrades it when necessary.
Selfupdate runs only on Mac OS X. If you are running MacPorts on another platform, you must use option sync to update the ports tree; to update MacPorts base you must manually install a newer version from source.
%%sudo port selfupdate
Use the debug flag for verbose output.
%%sudo port -d selfupdate
DEBUG: Rebuilding the MacPorts base system if needed. DEBUG: Synchronizing ports tree(s) Synchronizing from rsync://rsync.macports.org/release/ports/ DEBUG: /usr/bin/rsync -rtzv --delete-after rsync://rsync.macports.org/release/ports/ receiving file list ... done [ ... trimmed ... ] The MacPorts installation is not outdated and so was not updated DEBUG: Setting ownership to root selfupdate done!
If selfupdate detects that a newer version of MacPorts base is available, it automatically updates the installed copy of MacPorts base to the latest released version. In that case, you will see the upgrade Makefile execute, and when it finishes you will see this message:
DEBUG: Updating using rsync receiving file list ... done Congratulations, you have successfully installed the MacPorts system.
The sync option performs a subset of
selfupdate actions. It synchronizes the ports tree, as
does selfupdate, but it does not check for upgrades to
MacPorts base. On Mac OS X, unless there is a special reason not to do
so, you should run selfupdate.
For platforms other than Mac OS X, sync is the
only way to get port updates because selfupdate is
supported only on Mac OS X.
The list option is used to get a list of all
available ports. The list of available ports is very long, so use search if you know a port's name or
part of it.
%%port list
The search option is very useful to find port
names by partial matches.
%%port search rrd
rrdtool net/rrdtool 1.2.23 Round Robin Database php5-rrdtool www/php5-rrdtool 1.0 PHP 5 glue for RRDtool
The info option is used to get information about
a port: description, maintainer, etc.
%%port info flowd
flowd 0.9, net/flowd (Variants: universal, darwin_8) http://www.mindrot.org/flowd.html flowd is a small, fast and secure NetFlow collector. Platforms: darwin Maintainers: nomaintainer@macports.org
The deps option shows you the dependencies of a
port; dependencies are explicitly declared in
Portfiles.
%%port deps apache2
apache2 has library dependencies on:
apr
apr-util
expat
openssl
pcreThe variants option allows you to check what
variations of a port are available before you install it. Variants are a
way for port authors to provide options that may be invoked at install
time. See Invoking Port
Variants below to install ports that have variants.
%%port variants nmap
nmap has the variants:
universal
gtk2
no_ssl
no_pcreThe option install is used to install a port. See
Invoking Port Variants
below to install ports that have variants.
%%sudo port install nmap
You may break up a port's installation into smaller steps for troubleshooting by passing port a prior installation phase such as fetch, configure, build, or destroot. See section Port Phases for a complete list of phases.
The option clean deletes all intermediate files
that MacPorts creates while building a port. A port
clean is also often necessary to remove corrupted tarballs
after a failed fetch phase.
%%port clean --all vile
You may also clean files selectively by using options
--dist, --archive, or
--work.
The uninstall option will uninstall an installed
port.
%%port uninstall vile
If a port as installed as a dependency of another port,
uninstall will not remove it unless you remove the dependent ports
first. To override this behavior, use the -f (force)
switch. But some ports need to be rebuilt if dependencies change, so
you should know what you are doing if you force uninstall
ports.
%%port -f uninstall vile
The contents option displays the files that have
been installed by a given port. Uninstalled ports will always show no
contents.
%%port contents render
Port render contains: /opt/local/include/X11/extensions/render.h /opt/local/include/X11/extensions/renderproto.h /opt/local/lib/pkgconfig/render.pc /opt/local/share/doc/render/library /opt/local/share/doc/render/protocol
The installed option displays all installed
ports.
%%port installed
The following ports are currently installed: aalib @1.4rc5_2 (active) apr @1.2.8_0 (active) apr-util @1.2.8_2 (active) atk @1.18.0_0 (active) [ ... trimmed ...] wxWidgets @2.8.4_2+darwin_8 (active) Xft2 @2.1.7_0 (active) xrender @0.9.0_0+darwin_8 (active) zlib @1.2.3_1 (active)
The outdated option checks your installed ports
against the MacPorts repository to see if updated Portfiles have been
released since your ports were installed.
%%port outdated
apr 1.2.8_0 < 1.2.9_0 autoconf 2.61_0 < 2.61_1 gimp 2.2.14_0 < 2.2.16_0 libtool 1.5.22_0 < 1.5.24_0 pkgconfig 0.21_0 < 0.22_0
The upgrade option upgrades installed ports and
their dependencies when a Portfile in the
repository has been updated after a port was installed.
%%port upgrade gnome
If you wish not to upgrade a port's dependencies, use the
-n switch.
%%port -n upgrade gnome
If you'd like to upgrade all outdated ports, use this command.
%%port upgrade outdated
The upgrade option by default does not
uninstall an upgraded port —it deactivates it. See section Port Images, and also Destroot and
Activate phases in Port
Phases. If you wish to uninstall the old version, use the
-u option.
%%port -u upgrade vile
The dependents option reports what ports depend
upon a given port, if any. MacPorts learns about dependents during port
installation, so uninstalled ports will always report that there are no
dependents.
%%port dependents openssl
neon depends on openssl gnome-vfs depends on openssl libdap depends on openssl
The livecheck option checks to see if the application corresponding to a given port has been updated at the developer's download site. It's especially useful for port maintainers, but others may also wish to see if a port has the latest available distribution source. See section Livecheck for more information.
%%port livecheck rrdtool
rrdtool seems to have been updated (port version: 1.2.23, new version: 1.3beta1)
If livecheck finds no higher version at the port's download
site, it prints nothing. The option -d (debug) may be
used for detailed livecheck processing information.
Variants are a way for port authors to provide options for a port that may be chosen during the port install. To display the available variants, if any, use this command:
%%port variants fetchmail
fetchmail has the variants:
universal
ssl: Support secure connections using OpenSSL
fetchmailconf: Install a graphical configurator
ntlm: Enable NTLM authenticationVariant descriptions are optional, so you may not see descriptions for all variants.
A variant can only be invoked when a port is installed. After you have determined what variants a given port has, if any, you may install a port using the variant as shown.
%%port install fetchmail +ssl
Port variant execution may be verified using the port command with the verbose switch.
%%port -v install fetchmail +ssl
When a port is installed using a valid variant and specified correctly, the verbose output will contain:
DEBUG: Executing variant ssl provides ssl
For an explanation of default variants see Port Variants. Default variants are optional, and not all ports using variants have them. For ports with default variants, you may install a port without them by negating default variants using "-" as shown.
%%port install fetchmail -ssl
To verify that you have properly negated a default variant, you may want to use verbose mode. But negated variants are simply not reported in any way by the port command, as if they did not exist. You will know you have successfully negated the default variant in the example above if you do not see this line in the verbose output.
DEBUG: Executing variant ssl provides ssl
This section lists common operations you may want to perform when managing a MacPorts installation.
TODO: Add content here.
MacPorts can pre-compile ports into binaries so applications need not be compiled when installing on a target system. MacPorts may create two types of binaries: archives and packages.
Binary archives can only be used on a target system running MacPorts. Binary archives allow MacPorts utilities to begin installation after the destroot phase and install and activate a port on the target system. Binary archives are created using the port command as shown.
%%port -d archive logrotate
Debug output is shown below.
---> Creating logrotate-3.7_0.i386.tgz [ ... trimmed ... ] DEBUG: ./ ./+COMMENT ./+CONTENTS ./+DESC ./+PORTFILE ./+STATE ./opt/ ./opt/local/ ./opt/local/etc/ ./opt/local/etc/logrotate.conf ./opt/local/man/ ./opt/local/man/man8/ ./opt/local/man/man8/logrotate.8 ./opt/local/sbin/ ./opt/local/sbin/logrotate ---> Archive logrotate-3.7_0.i386.tgz packaged DEBUG: Executing archive_finish ---> Archive for logrotate 3.7_0 packaged
Binary archive files are placed in
${prefix}/var/macports/packages/. The archive file
type is set in the macports.conf file. The default
format is .tgz; other options are: tar, tbz, tbz2, tlz, xar, zip, cpgz,
cpio.
Binary packages are standalone binary installers that are precompiled; they do not require MacPorts on the target system. Binary files created with MacPorts may be either .pkg (Mac OS X Installer Packages), or RPM (RPM Package Manager) format. MacPorts may also process a .pkg package into a Mac OS X .dmg disk image file. You may create binary packages with the port command as shown in these examples.
%%port pkg pstree
You may create a Mac OS X .dmg disk image file as shown.
%%port dmg pstree
You may compile a port into an RPM file as shown, in order to install it onto a target that has RPM utilities or a full package management system that can install RPMs.
%%port rpm pstree
All packages are placed in a port's work directory.
Source packages are bundles consisting of a
Portfile, patches if needed, and any other files
required to install the port. Port source packages are mainly used by
developers of package management and port submission frameworks. Port
source packages may be in either .portpkg (XAR) or .nosrc.rpm (SRPM)
format.
This chapter covers a brief introduction to Portfiles, how to create a local Portfile repository for development, and creating Portfiles.
A MacPorts Portfile is a TCL script that usually contains only the simple keyword/value combinations and Tcl extensions as described in the Portfile Reference chapter, though it may also contain arbitrary TCL code. Every port has a corresponding Portfile, but Portfiles do not completely define a port's installation behavior since MacPorts base has default port installation characteristics coded within it. Therefore Portfiles need only specify required options, though some ports may require non-default options.
A common way for Portfiles to augment or override MacPorts base
default installation phase characteristics is by using
Portfile phase declaration(s). If you use Portfile
phase declaration(s), you should know how to identify the "global" section
of a Portfile. Any statements not contained within a phase declaration, no
matter where they are located in a Portfile, are said to be in the global
section of the Portfile; therefore the global section need not be
contiguous. Likewise, to remove statements from the global section they
must be placed within a phase declaration.
The main phases you need to be aware of when making a Portfile are these:
Fetch
Extract
Patch
Configure
Build
Destroot
The default installation phase behavior performed by the MacPorts base works fine for applications that use the standard configure, make, and make install steps, which conform to phases configure, build, and destroot respectively. For applications that do not conform to this standard behavior, any installation phase may be augmented using pre- and/or post- phases, or even overridden or eliminated. See Example Portfiles below.
For a detailed description of all port phases, see the Portfile Reference chapter.
Here we list the individual Portfile components for an application that conforms to the standard configure, make, and make install steps of most open source application installs.
Subversion ID tag line
The first line of a new Portfile must be set as shown. When a port is committed to subversion, ID tags are expanded to include the last person to commit and the commit time.
# $Id$
PortSystem line
This statement is required for all ports.
PortSystem 1.0
Port name
name rrdtool
Port version
version 1.2.23
Port categories
A port may belong to more than one category, but the first (primary) category should match the directory name in the ports tree where the Portfile is to reside.
categories net
Port maintainers
A port's maintainer is a person or persons who take responsibility for keeping the port up-to-date, and the maintainer keyword lists maintainer email addresses(s). To hide these addresses from spambots, see the more full explanation of the maintainer keyword in the Global Keywords section of the Portfile Reference chapter.
maintainers julesverne@example.org
The address <nomaintainer@macports.org>, or in
hidden form <nomaintainer>, designates a port that may
be modified by any committer.
Port description
description Round Robin Database
Port long_description
long_description RRDtool is a system to store and display time-series \
dataA port's application homepage
homepage http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
Platform statement
platforms darwin
A port's download URLs
master_sites http://oss.oetiker.ch/rrdtool/pub/ \
ftp://ftp.pucpr.br/rrdtool/Port checksums
The checksums specified in a Portfile are checked with the fetched tarball for security. For the best security, use md5, sha1, and rmd160 checksum types.
checksums md5 dafa161bc9c61e57636a6085c87c1fe8 \
sha1 5da610e1c8bc01b80abc21ab9e98e004363b429c \
rmd160 0c1147242adf476f5e93f4d59b553ee3ea378b23To find the correct checksums for a port's distribution file, follow this example:
%%md5 rrdtool-1.2.23.tar.gz%%openssl sha1 rrdtool-1.2.23.tar.gz%%openssl rmd160 rrdtool-1.2.23.tar.gz
MD5 ( ... rrdtool-1.2.23.tar.gz) = dafa161bc9c61e57636a6085c87c1fe8 SHA1( ... rrdtool-1.2.23.tar.gz)= 5da610e1c8bc01b80abc21ab9e98e004363b429c RIPEMD160( ... rrdtool-1.2.23.tar.gz)= 0c1147242adf476f5e93f4d59b553ee3ea378b23
Port dependencies
A port's dependencies are ports that must be installed before another port is installed.
depends_lib port:perl5.8 \
port:tcl \
port:zlibPort configure arguments (optional)
configure.args --prefix=${prefix} \
--enable-perl-site-install \
--mandir=${prefix}/share/manIn this section we begin by taking a look at a complete simple Portfile; then we see how to augment default phases by defining pre- and post- phases, how to override default phases, and finally how to eliminate port phases.
# $Id$
PortSystem 1.0
name rrdtool
version 1.2.23
categories net
maintainers julesverne
description Round Robin Database
long_description RRDtool is a system to store and display time-series data
homepage http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
platforms darwin
master_sites http://oss.oetiker.ch/rrdtool/pub/ \
ftp://ftp.pucpr.br/rrdtool/
checksums md5 dafa161bc9c61e57636a6085c87c1fe8 \
sha1 5da610e1c8bc01b80abc21ab9e98e004363b429c \
rmd160 0c1147242adf476f5e93f4d59b553ee3ea378b23
depends_lib port:perl5.8 \
port:tcl \
port:zlib
configure.args --prefix=${prefix} \
--enable-perl-site-install \
--mandir=${prefix}/share/manTo augment a port's installation phase, and not override it, you may use pre- and post- installation phases as shown in this example.
post-destroot {
# Install example files not installed by the Makefile
file mkdir ${destroot}${prefix}/share/doc/${name}/examples
file copy ${worksrcpath}/examples/ \
${destroot}${prefix}/share/doc/${name}/examples
}To override the automatic MacPorts installation phase processing, define your own installation phases as shown in this example.
destroot {
xinstall -m 755 -d ${destroot}${prefix}/bin
xinstall -m 755 ${worksrcpath}/cdpr ${destroot}${prefix}/bin
}To eliminate a default phase, simply define a phase with no contents as shown.
build {}Because many software packages do not use
configure, a keyword is provided to eliminate the
configure phase. See the chapter Portfile Reference for full
information.
Startupitems may be placed in the global section of a Portfile.
startupitem.create yes
startupitem.name nmicmpd
startupitem.executable "${prefix}/bin/nmicmpd"Startupitems keywords may also be used within a variant definition to make their installation conditional.
variant server {
startupitem.create yes
startupitem.start "${prefix}/share/${name}/vm-pop3d.init start"
startupitem.stop "${prefix}/share/${name}/vm-pop3d.init stop"
}Variants are a way for port authors to provide options that may be invoked at install time. They are declared in the global section of a Portfile using the "variant" keyword and may provide a description.
The most common use for a variant is to add or remove dependencies, configure arguments, and build arguments from the global Portfile section. Here is an example of a port providing four variants that add additional configure arguments to a port.
variant pop { configure.args-append --enable-pop }
variant imap { configure.args-append --enable-imap }
variant ssl { configure.args-append --with-ssl }
variant debug { configure.args-append --enable-debug }Variant names may contain only the characters A-Z, a-z, and the underscore character “_”. Therefore, take care to never use hyphens in variant names.
In the example variant declaration below, the configure argument
--without-x is removed and a number of others are
appended.
variant x11 description {Builds port as an X11 program with Lucid widgets} {
configure.args-delete --without-x
configure.args-append --with-x-toolkit=lucid \
--without-carbon \
--with-xpm \
--with-jpeg \
--with-tiff \
--with-gif \
--with-png
depends_lib-append lib:libX11:XFree86 \
lib:libXpm:XFree86 \
port:jpeg \
port:tiff \
port:libungif \
port:libpng
}If a variant requires options in addition to those provided by keywords using -append and/or -delete, in other words, any actions that would normally take place within a port installation phase, do not try to do this within the variant declaration. Rather, modify the behavior of any affected phases when the variant is invoked using the variant_isset keyword.
post-destroot {
xinstall -m 755 -d ${destroot}${prefix}/etc/
xinstall ${worksrcpath}/examples/foo.conf \
${destroot}${prefix}/etc/
if {[variant_isset carbon]} {
delete ${destroot}${prefix}/bin/emacs
delete ${destroot}${prefix}/bin/emacs-${version}
}
}Variants are used to specify actions that lie outside the core functions of an application or port, but there may be some cases where you wish to specify these non-core functions by default. For this purpose you may use the keyword default_variants.
default_variants +foo +bar
The default_variant keyword may only be used in the global Portfile section.
Patch files are files created with the Unix command diff that are applied using the command patch to modify text files to fix bugs or extend functionality.
If you wish to contribute modifications or fixes to a Portfile, you should do so in the form of a patch. Follow the steps below to create Portfile patch files
Make a copy of the Portfile you wish to modify; both files must be in the same directory, though it may be any directory.
%%cp Portfile Portfile.orig
Edit the file to make it as you want it to be after it is fetched.
Now use the Unix command diff -u to create a "unified" diff patch file. Put the name of the port in the patchfile, for example, Portfile-rrdtool.diff.
%%diff -u Portfile.orig Portfile > Portfile-rrdtool.diff
A patch file that is a "unified" diff file is the easiest to interpret by humans and this type should always be used for ports. The Portfile patch below will change the version and checksums when applied.
--- Portfile.orig 2007-07-25 18:52:12.000000000 -0700
+++ Portfile 2007-07-25 18:53:35.000000000 -0700
@@ -2,7 +2,7 @@
PortSystem 1.0
name foo
-version 1.4.0
+version 1.3.0
categories net
maintainers nomaintainer@macports.org
description A network monitoring daemon.
@@ -13,9 +13,9 @@
homepage http://rsug.itd.umich.edu/software/${name}
master_sites ${homepage}/files/
-checksums md5 f0953b21cdb5eb327e40d4b215110b71
+checksums md5 01532e67a596bfff6a54aa36face26ae
extract.suffix .tgz
platforms darwin
Now you may attach the patch file to a MacPorts Trac ticket for the port author to evaluate.
Necessary or useful patches to application source code should be sent to the application developer (not the port author) so the modifications may be included in the next version; then the port patch may be removed after an updated tarball is released.
Locate the file you wish to patch in its original location within the unpacked source directory and make a duplicate of it.
%%cd foo-1.34/src%%cp Makefile.in Makefile.in.orig
Edit the file to make it as you want it to be after it is fetched.
Now use the Unix command diff -u to create a "unified" diff patch file.
%%cd foo-1.34%%diff -u Makefile.in.orig Makefile.in > patch-Makefile.in
You must execute the diff command in the top-level of the unpacked source code. Otherwise the patch command will look for the file to be patched in the wrong place and fail.
A patch file that is a "unified" diff file is the easiest to
interpret by humans and this type should always be used for ports.
See the example below where a patch adds DESTDIR
support to a Makefile.in file.
--- Makefile.in.orig 2007-06-01 16:30:47.000000000 -0700
+++ Makefile.in 2007-06-20 10:10:59.000000000 -0700
@@ -131,23 +131,23 @@
$(INSTALL_DATA)/gdata $(INSTALL_DATA)/perl
install-lib:
- -mkdir -p $(INSTALL_LIB)
+ -mkdir -p $(DESTDIR)$(INSTALL_LIB)
$(PERL) tools/install_lib -s src -l $(INSTALL_LIB) $(LIBS)
- cp $(TEXT) $(INSTALL_LIB)/
+ cp $(TEXT) $(DESTDIR)$(INSTALL_LIB)/Now you may place the patch
patch-Makefile.in in the directory
${portpath}/files (either a local repository or
after committing to the MacPorts Subversion port repository) and use
it in a port using the patchfiles keyword.
patchfiles patch-Makefile.in
You should create one patch file for each file to be
patched, though it is permissible to use existing patches you find
that patch multiple files. Patchfile filenames should generally
be of the form
patch-<directory>-<filename>,
as shown in this example:
patch-src-Makefile.in.
Though MacPorts applies patch files automatically, you may want to know how to apply patch files manually if you want to test patch files you have created or you wish to apply uncommitted Portfile patches.
Change to the directory containing the file to be patched. In this example, we'll apply a Portfile patch to the postfix port.
%%cd ${prefix}/var/macports/sources/rsync.macports.org/release/ports/mail/postfix
Now apply the patch that is on the current user's desktop. The patchfile knows the filename of the file to be patched.
%%patch -p0 < ~/Desktop/Portfile-postfix.diff
patching file Portfile
To create and test Portfiles that are not yet committed to
subversion, you may create a local Portfile repository as shown. Replace
the hypothetical user julesverne with your username
in the example below.
Open the sources.conf file in a text
editor.
%%cd ${prefix}/etc/macports/%%pico sources.conf
Insert a URL pointing to your local repository location before the rsync URL as shown.
file:///Users/julesverne/ports rsync://rsync.macports.org/release/ports
The file URL should always appear before the rsync URL so that local Portfiles can be tested that are duplicated in the MacPorts tree, because the port command will always operate on the first Portfile it encounters.
Place the Portfiles you create inside a directory whose name matches the port, which should in turn be placed inside a directory that reflect the port's primary category (the first category entry in the Portfile).
%%cd /Users/julesverne%%mkdir -p ports/games/bestevergame%%cd ports/games/bestevergame%%touch Portfile
After a Portfile is created (see below), use the MacPorts
portindex command in the local repository's
directory to install it into the
Portindex.
%%cd /Users/julesverne/ports%%portindex
Creating software index in /Users/julesverne/ports Adding port games/bestevergame Total number of ports parsed: 1 Ports successfully parsed: 1 Ports failed: 0
Once the local port is added to the Portindex,
it becomes available for searching or installation as with any other
Portfile in the MacPorts tree as shown.
%%port search bestever
bestevergame games/bestevergame 1.1 The Best Ever Game
This section contains practical guidelines for creating Portfiles that install smoothly and provide consistency between ports. The following sections are on the TODO list.
Portfiles may be thought of as a table of keys and values in two columns separated by spaces (not tabs), so you should set your editor to use soft tabs, which are tabs emulated by spaces. By default, the top line of all Portfiles should use a modeline that defines soft tabs for the vim and emacs editors as shown.
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
The left column should consist of single words, and will be separated from the more complex right side by spaces in multiples of four. Variable assignments ("set libver") and variant declarations ("variant mysql5") are exceptions, and may be considered a single word on the left side, with a single space between words.
Frequently multiple items are necessary in the second column. For example, to set multiple source download locations, multiple "master_sites" must be defined. Unless the second column items are few and short you should use multiple lines, separate lines with a backslash, and (to emphasize the unity of the block) indent the first line at a deeper level than the following lines as shown in this example.
destroot.keepdirs ${destroot}${prefix}/var/run \
${destroot}${prefix}/var/log \
${destroot}${prefix}/var/cache/mrtgTODO: Set variables so changing paths may be done in one place; use them anytime it makes updates simpler: distname ${name}-src-${version}
TODO: revisions should be increased if all users should update the port, for example if a bug was introduced which causes problems for users. It should not be increased if it only affects the installation process, for example if it failed for some users. Users which got it working by themselves need no update so the revision doesn't need to be updated.
If a new version is released then you should set the revision back to 0 or remove it completely until it's necessary again
TODO:
If a port doesn't need a configure phase, use the keyword use_configure instead of defining an empty configure phase.
use_configure no
This chapter serves as a reference for the major elements of a Portfile: port phases, dependencies, StartupItems, variables, keywords, and Tcl extensions.
MacPorts keywords are used to specify required or optional items within a Portfile, or to override default options used by MacPorts base for individual ports. Keywords are to be used within the "global" and "variant" sections of Portfiles, and not within optional port phase declarations.
The global keywords listed below specify information for ports as a whole, whereas the keywords listed under a port phase specify information to be used during a particular installation phase.
The top line of every Portfile; it must be followed by a blank line. It defines which version of the Portfile interpreter will be used.
PortSystem 1.0
The name of the Port; it should be lowercase to prevent uninstallation problems due to a macports base bug.
name foo
The version of the ported software.
version 1.23.45
Optional keyword (default is 0) that is used to track port revisions. It should not be incremented for port revisions unless it would benefit users to upgrade an installed port, and cleared when the port is updated to a newer version.
It should be used if a bug in the Portfile was found and all installations of this port have to be updated. If the change only affects new installations, there is no need to increase it.
revision 1
An optional keyword (default value is 0) that may be used when ports are updated to a version that is numerically less than the previous version. For example 1.10 -> 1.2 or 20070928 -> 1.0. An epoch ensures that port version comparisons work correctly in these cases. Often the epoch is formatted like a date, but it can simply be a number such as 1.
epoch 20080924
epoch 1
An epoch is not needed for most ports. If an epoch is used it must never be decreased or removed even when a port's version is updated; this would cause port version comparisons to be incorrect since epochs take precedence over versions once epochs have been used.
The category under which the ported software falls. The first category should be the same as the directory within which the Portfile is stored; secondary and tertiary categories may be selected.
categories net security
A port's maintainer is a person or persons who take responsibility for keeping the port up-to-date, and the maintainer keyword lists maintainer email addresses(s). However, many maintainers wish to hide these addresses from spambots; to do so follow these conventions:
For addresses in domain @macports.org, simply omit the domain name.
For addresses in other domains, say
<account@example.org>, use the convention
example.org:account to specify the address.
In the example below, the maintainer email addresses
<jdoe@macports.org> and
<julesverne@example.org> are hidden using these
conventions.
maintainers jdoe \
example.org:julesverneA one-sentence description of the ported software.
description A classic shooter arcade game.
A long description of the ported software. Break long lines with escaped newlines.
long_description A classic shooter arcade game derived from \
the game alien-munchers. Not suitable for \
children under two years old.Port application's homepage.
homepage http://www.example.org/apps
The platforms on which the port has been tested.
platforms darwin freebsd
Global variables are variables available to any Portfile. For a list of additional variables available to ports that are assigned to a MacPorts Portgroup, see portgroup(7).
All of these variables except prefix are
read-only!
Installation prefix, set in
${prefix}/etc/macports/macports.conf —may be
overridden on a per port basis. For example, aqua applications are
installed in /Applications/MacPorts.
Default: /opt/local
Default PATH to use in finding executables.
Path to the MacPorts TCL libraries.
Full path to the Portfile location.
Value: work
Path to port files relative to
${portpath}.
Value: files
Path to port files relative to
${portpath}.
Value: ${portpath}/${filesdir}
Full path to work directory.
Value: ${portbuildpath}/work
Full path to extracted source code.
Value: ${workpath}/${worksrcdir}
Full path into which software will be destrooted.
Value: ${workpath}/destroot
Location to store downloaded distfiles.
Value: ${sysportpath}/distfiles/${dist_subdir}/
The Unix user at the time of port installation.
The Unix group at the time of port installation.
Identifies platform type (ie "darwin", "freebsd", etc).
Identifies hardware type (ie "powerpc", "intel").
The version number of the host operating system (ie "8.0" for Darwin 8.0).
Endianness of the processor (ie "bigEndian").
The major version number of the host operating system (ie "8" for Darwin 8.0).
Absolute path to X11.
A MacPorts port has ten distinct phases. The MacPorts base is set to perform default steps for applications that use the standard configure, make, and make install steps, but for applications that do not conform to this behavior, installation phases may be declared in a Portfile to augment or override the default behavior as described in the Portfile Development chapter.
Fetch the ${distfiles} from
${master_sites} and place it in
${prefix}/var/macports/distfiles/${name}.
Compare ${checksums} specified in a
Portfile to the checksums of the fetched
${distfiles}.
Unzip and untar the ${distfiles} into the
path ${prefix}/var/macports/build/..../work
Apply optional patch files
specified in ${patchfiles} to modify a port's
source code file(s).
Execute the command configure in
${workpath}.
Execute the command make in
${workpath}.
Execute commands to run test suites bundled with a port.
Execute the command make install
DESTDIR=${destroot}in
${workpath}.
Understanding the destroot phase is critical to understanding MacPorts, because, unlike some port systems, MacPorts "stages" an installation into an intermediate location —not the final file destination. MacPorts uses the destroot phase to provide:
Port uninstalls - a port's files may be cleanly uninstalled because all files and directories are recorded during install.
Multiple port versions may be installed on the same host,
since a port's files are not directly inserted into
${prefix} but rather hard-linked into
${prefix} from an intermediate location
during a later activation phase.
The DESTDIR variable must be supported in
an application's Makefile for the MacPorts destroot phase to work
properly. Urge developers to fully support
DESTDIR in their Makefiles.
Any empty directories in ${destroot} upon
completion of the destroot phase are removed unless a directory name
is placed in the value field of the optional
destroot.keepdirs keyword.
Use tar to create a tarball of a port's destrooted files and
copy it to
${prefix}/var/macports/packages/.
Copy a port's destrooted files into
${prefix}/var/macports/software. See Port Images in the MacPorts Internals chapter for
details.
Set hardlinks
pointing to ${prefix}/var/macports/software to
point to ${prefix}.
MacPorts keywords are used to specify required or optional items within a Portfile, or to override default options used by MacPorts base for individual ports. Keywords are to be used within the "global" and "variant" sections of Portfiles, and not within optional port phase declarations.
In other words, port phase keywords are not located within port phase declarations, but rather they refer to port phases and set options for those phases, and they take affect whether or not phase declarations have been explicitly defined in a Portfile.
Keyword list modifiers are keywords that end in -append or -delete. Keywords that support list modifiers are identified under appropriate reference sections below. Keyword list modifiers are most frequently used for these three purposes:
Preserve configure Defaults set by a previously executed Portfile keyword or by MacPorts base
MacPorts base sets the gcc compiler flags CFLAGS and LDFLAGS
for all ports using configure.cflags and
configure.ldflags, therefore to keep from
overwriting the default compiler flags use
configure.cflags-append and
configure.ldflags-append.
configure.cflags-append
configure.ldflags-append
Preserve PortGroup Dependencies
Ports in a PortGroup have default library dependencies set by
MacPorts base. Therefore, never use depends_lib
in ports belonging to a PortGroup or it will overwrite the default
library dependencies. Instead, use
depends_lib-append.
Add or Delete Items for Variants
When a variant requires more or fewer dependencies, distfiles, or patchfiles, when the variant is invoked you want to add or remove items to the appropriate keyword values list set in the global section of the Portfile. Use the appropriate keywords, for example:
depends_lib-append or
depends_lib-delete
distfiles-append or
distfile-delete
patchfiles-append or
patchfiles-delete
Keywords that support pre_args and post_args are used to assemble
command strings together in a row, as described in the reference
sections below. But it should be noted that all keyword argument
modifiers implicitly support keyword list modifiers. For example, the
keyword configure.pre_args also supports
configure.pre_args-append and
configure.pre_args-delete.
The list of keywords related to the fetch phase.
A list of URLs from which a port's download file(s) may be
retrieved. For multiple master_sites, they are searched in order
until a file matching ${distfile} is
found.
Default: ???
Examples:
master_sites http://www.example.org/files/ \
http://www.examplemirror.org/example_org/files/
You may also use mirror site lists predefined by MacPorts. Here the sourceforge and gnu mirrors are used.
master_sites sourceforge gnu
When using mirror master_sites, the subdirectory
${name} is checked on every mirror. If the
mirror subdirectory does not match ${name}, then you may specify
it using after the mirror separated by a colon.
master_sites sourceforge:widget \
gnu:widget
For ports that must fetch multiple download files from
different locations, you must label the files with tags and
match the tags in a distfiles statement. The format is
mirror:subdirectory:tag.
In the example below, file_one.tar.gz is fetched from
sourceforge mirrors in subdirectory ${name};
file tagtwo.tar.gz is fetched from the gnu mirrors in
subdirectory sources.
master_sites sourceforge::tagone \
gnu:sources:tagtwo
distfiles file_one.tar.gz:tagone \
file_two.tar.gz:tagtwoSubdirectory to append to all mirror sites for any list
specified in ${master_sites}.
Default: ${name}
Example:
master_sites.mirror_subdir magic
A list of sites from which a port's patchfiles may be downloaded, where applicable.
Default: ${master_sites}
Example:
patch_sites ftp://ftp.patchcityrepo.com/pub/magic/patches
Subdirectory to append to all mirror sites for any list
specified in ${patch_sites}.
Default: ${name}
Example:
patch_sites.mirror_subdir magic
The name of the distribution filename, not including the extract suffix (see below).
Default: ${name}-${version}
Example:
distname ${name}The full distribution filename, including the extract suffix. Used to specify non-default distribution filenames; this keyword must be specified (and tags used) when a port has multiple download files (see master_sites).
Default:
${distname}${extract.suffix}
Examples:
distfiles ${name}-dev_src.tgzdistfiles file_one.tar.gz:tagone \
file_two.tar.gz:tagtwoCreate a sub-directory in distpath to store all fetched files.
Default: ${name}
Example:
dist_subdir vim${version}Sets the path to source directory relative to workpath. It can be used if the extracted source directory has a different name then the distfile.
Default: ${distname}
Example:
worksrcdir ${name}-src-${version}Some mirrors require special options for a resource to be properly fetched.
Change the fetch type. This is only necessary if a CVS or SVN checkout is be
used. standard is used for a normal http or ftp
fetch using ${distfiles} and is used as
default.
Default: standard
Values: standard cvs
svn
Example:
fetch.type svn svn.url svn://example.org svn.tag 2100
HTTP or FTP user to fetch the resource.
Default: none
Example:
TODO: add example
HTTP or FTP password to fetch the resource.
Default: none
Example:
TODO: add example
Whether to use EPSV command for FTP transfers.
Default: yes
Example:
fetch.use_epsv no
Whether to ignore the host SSL certificate (for HTTPS).
Default: no
Example:
fetch.ignore_sslcert yes
CVS may be used as an alternative method of fetching distribution files using the keywords in this section. However, fetching via CVS may cause non-reproducible builds, so it is strongly discouraged.
You have to set fetch.type
to cvs to fetch from CVS.
Specify the url from which to fetch files.
Default: none
Example:
cvs.root :pserver:anonymous@cvs.sv.gnu.org:/sources/emacs
Password to login to the CVS server.
Default: none
Example:
TODO: add example
Optional for fetching with CVS, this specifies the code revision to checkout.
Default: none
Example:
cvs.tag HEAD
A date that identifies the CVS code set to checkout.
Default: none
Example:
cvs.date "12-April-2007"
A CVS module from which to check out the code.
Default: none
Example:
cvs.module Sources
Subversion may be used as an alternative method of fetching distribution files using the keywords in this section. However, fetching via Subversion may cause non-reproducible builds, so it is strongly discouraged.
You have to set fetch.type
to svn to fetch from SVN.
This specifies the url from which to fetch files.
Default: none
Examples:
svn.url http://www.domain.com/svn-repo/mydirectory
svn.url svn://www.domain.com/svn-repo/mydirectory
Optional tag for fetching with Subversion, this specifies the code revision to checkout; it corresponds to the -r option in the svn cli.
Default: none
Example:
svn.tag 37192
The list of keywords related to the checksum phase.
Checksum(s) of the distribution files. For ports with multiple distribution files, filenames must be included to associate files with their checksums.
All checksum types (md5, sha1 and rdm160) should be used to ensure the integrity of the distfiles.
Default: ???
Examples:
checksums md5 dafa161bc9c61e57636a6085c87c1fe8 \
sha1 5da610e1c8bc01b80abc21ab9e98e004363b429c \
rmd160 0c1147242adf476f5e93f4d59b553ee3ea378b23checksums ${distname}${extract.suffix} \
md5 dafa161bc9c61e57636a6085c87c1fe8 \
sha1 5da610e1c8bc01b80abc21ab9e98e004363b429c \
rmd160 0c1147242adf476f5e93f4d59b553ee3ea378b23 \
hobbit.tar.gz \
md5 3b8d02c6cf6239b9bdadbc6543c5a683 \
sha1 27874638b23e66d39ed94fe716ca25c967f6e993 \
rmd160 82b9991f3bf0ceedbf74c188c5fa44b98b5e40c9The list of keywords related to the extract phase.
This keyword is used to specify the extract suffix type.
Default: .tar.gz
Example:
extract.suffix .tgz
This keyword is for downloads that are tarred and bzipped. When invoked, it automatically sets:
extract.suffix = .tar.bz
extract.cmd = bzip
Default: no
Example:
use_bzip2 yes
This keyword is for downloads which are zipped. When invoked, it automatically sets:
extract.suffix = .zip
extract.cmd = unzip
extract.pre_args = -q
extract.post_args = "-d ${portpath}/${workdir}"
Default: no
Example:
use_zip yes
This keyword is used to specify if the directory
worksrcdir is part of the distfile or if it
should be created automatically and the distfiles should be
extracted there instead. This is useful for distfiles with a flat
structure which would pollute the worksrcdir
with lots of files.
Default: no
Example:
extract.mkdir yes
List of files to extract into
${worksrcpath}. Only use if default extract
behavior is not correct for your port.
Default: ${distfiles}
Example:
extract.only foo.tar.gz
extract.only-append bar.tar.gz extract.only-delete foo.tar.gz
Command to perform extraction.
Default: gzip
Example:
extract.cmd gunzip
Main arguments to extract.cmd; additional arguments passed before and after the main arguments.
Default: ${distpath}/${distfile}
Example:
extract.args ${distpath}/${distfile}
The following argument modifiers are available:
extract.pre_args, defaults to:
-dc
extract.post_args, defaults to:
"| tar -xf"
Examples:
extract.pre_args xf extract.post_args "| gnutar –x"
The list of keywords related to the patch phase.
Specify the base path for patch files.
Default: ${worksrcpath}
Example:
patch.dir ${worksrcpath}/utilSpecify the command to be used for patching files.
Default: patch
Example:
patch.cmd cat
Specify patch files to be applied for a port; list modifiers specify patchfiles to be added or removed from a previous patchfile declaration.
Default: none
Example:
patchfiles patch-Makefile.in \
patch-source.cpatchfiles-append patch-configure patchfiles-delete patch-src-Makefile.in
Main arguments to patch.cmd; optional argument modifiers pass arguments before and after the main arguments.
Default: none
Example:
patch.args ???
The following argument modifiers are available:
patch.pre_args, defaults to:
-p0
patch.post_args, defaults to:
none
Examples:
patch.pre_args -p1 patch.post_args ???
The list of keywords related to the configure phase.
MacPorts base sets some important default configure options, so
should use the -append version of most configure keywords so you don't
overwrite them. For example, MacPorts base sets default
configure.cflags so you should always use
configure.cflags-append to set additional CFLAGS in
Portfiles.
Sets if the configure phase should be run. Can be used if the
port has no ./configure script.
Default: yes
Example:
use_configure no
Set environment variables for configure; list modifiers add and delete items from a previous Portfile configure.env keyword, or a default set by MacPorts base. If available, it is encouraged to use the predefined options (like configure.cflags) instead of modifying configure.env directly.
Default: CFLAGS=-I${prefix}/include
LDFLAGS=-L${prefix}/lib
Example:
configure.env QTDIR=${prefix}/lib/qt3configure.env-append ABI=32
configure.env-delete TCLROOT=${prefix}Set CFLAGS compiler flags; list modifiers add or delete items from a previous Portfile configure.cflags keyword or the default set by MacPorts base.
Default: -O2
Example:
configure.cflags -Os -flat_namespace
configure.cflags-append "-undefined suppress" configure.cflags-delete -O2
Set LDFLAGS compiler flags; list modifiers add or delete items from a previous Portfile configure.ldflags keyword or the default set by MacPorts base.
Default: -L${prefix}/lib
Example:
configure.ldflags "-L${worksrcpath}/zlib -lz"configure.ldflags-append "-L/usr/X11R6/lib -L${worksrcpath}/lib"
configure.ldflags-delete -L${prefix}/lib/db44Set CPPFLAGS to be passed to the C processor; list modifiers add or delete items from a previous Portfile configure.cppflags keyword or the default set by MacPorts base.
Default: -I${prefix}/include
Example:
configure.cppflags -I${worksrcpath}/includeconfigure.cppflags-append "-I/usr/X11R6/lib -I${worksrcpath}/lib -DHAVE_RRD_12X"
configure.cppflags-delete -I${prefix}/lib/db44Set CXXFLAGS to be passed to the C++ processor; list modifiers add or delete items from a previous Portfile configure.cxxflags keyword or the default set by MacPorts base.
Default: -O2
Example:
TODO: add example
TODO: add description
Default: -O2
Example:
TODO: add example
TODO: add description
Default: ???
Example:
TODO: add example
TODO: add description
Default: ???
Example:
TODO: add example
Set FFLAGS to be passed to the Fortran compiler; list modifiers add or delete items from a previous Portfile configure.fflags keyword or the default set by MacPorts base.
Default: -O2
Example:
configure.fflags -Os
Set FCFLAGS to be passed to the Fortran compiler; list modifiers add or delete items from a previous Portfile configure.fcflags keyword or the default set by MacPorts base.
Default: -O2
Example:
configure.fcflags -Os
Set F90FLAGS to be passed to the Fortran 90 compiler; list modifiers add or delete items from a previous Portfile configure.f90flags keyword or the default set by MacPorts base.
Default: -O2
Example:
configure.f90flags -Os
Set CC compiler flags for selecting a C compiler.
Default: ???
Example:
configure.cc ${prefix}/bin/gcc-mp-4.2Set CPP compiler flags for selecting a C preprocessor.
Default: ???
Example:
configure.cpp /usr/bin/cpp-3.3
Set CXX compiler flags for selecting a C++ compiler.
Default: ???
Example:
configure.cxx /usr/bin/g++-4.0
Set OBJC compiler flags for selecting an Objective-C compiler.
Default: ???
Example:
configure.objc /usr/bin/gcc-4.0
Set FC compiler flags for selecting a Fortran compiler.
Default: ???
Example:
configure.fc ${prefix}/bin/gfortran-mp-4.2Set F77 compiler flags for selecting a Fortran 77 compiler.
Default: ???
Example:
configure.f77 ${prefix}/bin/gfortran-mp-4.2Set F90 compiler flags for selecting a Fortran 90 compiler.
Default: ???
Example:
configure.f90 ${prefix}/bin/gfortran-mp-4.2Set JAVAC compiler flags for selecting a Java compiler.
Default: ???
Example:
configure.javac ${prefix}/bin/jikesSelect a compiler suite to fill the compiler environment
variables. All variables/tools a compiler suite can provide are set.
Manually set variables are not overwritten. Dependencies are not
added for you, as they may be just build- or also run-dependencies.
Keep in mind that not all compiler suites might be available on your
platform: gcc-3.3 is available on Mac OS X 10.3 and
10.4 PowerPC, gcc-4.0 is available on 10.4 and
10.5, gcc-4.2 is available as preview for
10.5.
Only use it if a port really needs a different compiler.
Default: gcc-3.3 on Mac OS X 10.3
Default: gcc-4.0 on Mac OS X 10.4 and
10.5
Values: gcc-3.3 gcc-4.0
gcc-4.2 apple-gcc-3.3
apple-gcc-4.0 macports-gcc-3.3
macports-gcc-3.4
macports-gcc-4.0
macports-gcc-4.1
macports-gcc-4.2
macports-gcc-4.3
macports-gcc-4.4
Example:
configure.compiler macports-gcc-4.2
Set PERL flag for selecting a Perl interpreter.
Default: ???
Example:
configure.perl ${prefix}/bin/perl5.8Set PYTHON flag for selecting a Python interpreter.
Default: ???
Example:
configure.python ${prefix}/bin/python3.0Set RUBY flag for selecting a Ruby interpreter.
Default: ???
Example:
configure.ruby ${prefix}/bin/rubySet INSTALL flag for selecting an install
tool; used for copying files and creating directories.
Default: /usr/bin/install
Example:
configure.install ${prefix}/bin/ginstallSet AWK flag for selecting an awk executable.
Default: ???
Example:
configure.awk ${prefix}/bin/gawkSet BISON flag for selecting a bison executable, a parser generator.
Default: ???
Example:
configure.bison /usr/bin/bison
Set PKG_CONFIG flag for helping find pkg_config, a tool for retrieving information about installed libraries.
Default: ???
Example:
configure.pkg_config ${prefix}/bin/pkg-configSet PKG_CONFIG_PATH flag for telling pkg_config where to search for information about installed libraries.
Default: ???
Example:
configure.pkg_config_path ${prefix}/lib/pkgconfig:${x11prefix}/lib/pkgconfigMain arguments to configure.cmd; optional
argument modifiers pass arguments before and after the main
arguments.
Default: none
Example:
configure.args --bindir=${prefix}/bin
The following argument modifiers are available:
configure.pre_args, defaults to:
--prefix=${prefix}
configure.post_args, defaults to:
none
Examples:
configure.pre_args --prefix=${prefix}/share/bro
configure.post_args OPT="-D__DARWIN_UNIX03"Universal keywords are used to make a port compile on the Mac OS X platform to run on both PPC and Intel processors.
There is a default universal variant made available to all ports by MacPorts base, so redefining universal keywords should only be done to make a given port compile if the default options fail to do so.
Arguments used in the configure script to build the port universal.
Default:
--disable-dependency-tracking
Example:
TODO: add example
Arguments appended to the configure script to build the port universal.
Default: -sysroot
/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch
ppc
Example:
TODO: add example
Additional flags to put in the CPPFLAGS environment variable when invoking the configure script.
Default: ???
Example:
TODO: add example
Additional flags to put in the CXXFLAGS environment variable when invoking the configure script.
Default: -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch
ppc
Example:
TODO: add example
Additional flags to put in the LDFLAGS environment variable when invoking the configure script.
Default: -arch i386 -arch ppc
Example:
TODO: add example
The list of configure keywords available for ports that need automake and/or autoconf.
Whether or not to use automake.
Default: no
Example:
use_automake yes
Environment variables to pass to automake.
Default: ???
Example:
automake.env CFLAGS=-I${prefix}/includeArguments to pass to automake.
Default: ???
Example:
automake.args --foreign
Directory in which to run
${automake.cmd}.
Default: ${worksrcpath}
Example:
automake.dir ./src
Whether or not to use autoconf.
Default: no
Example:
use_autoconf yes
Environmental variables to pass to autoconf.
Default: ???
Example:
autoconf.env CFLAGS=-I${prefix}/include/gtk12Arguments to pass to autoconf.
Default: ???
Example:
autoconf.args "-l src/aclocaldir"
Directory in which to run
${autoconf.cmd}.
Default: ${worksrcpath}
Example:
autoconf.dir src
The list of keywords related to the build phase.
Make command to run in ${worksrcdir}. Only
use it if you can't use build.type.
Default: make
Example:
build.cmd pbxbuild
Defines which "make" is required. Sets
${build.cmd} to either "gnumake" or "bsdmake"
accordingly.
Default: gnu
Values: gnu bsd
Example:
build.type bsd
Main arguments to ${build.cmd}; optional
argument modifiers pass arguments before and after the main
arguments.
Default: none
Example:
build.args -DNOWARN
The following argument modifiers are available:
build.pre_args, defaults to:
${build.target.current}
build.post_args, defaults to:
none
Examples:
build.pre_args -project AudioSlicer.xcode build.post_args CFLAGS_SYS="-DUSE_FREETYPE -DPREFER_FREETYPE"
Build target to pass to ${build.cmd}; list
modifiers add or delete items from a previous Portfile build.target
keyword or the default set by MacPorts base.
Default: all
Example:
build.target all-src
build.target-append doc extra build.target-delete compat
This keyword is for specifying whether or not it is safe for a
port to use multiple CPUs or multiple cores in parallel during its
build phase. If use_parallel_build is set to
“yes” in a given port, the option -j N
is passed to the make command where
N represents the number of parallel build threads
defined by the variable buildmakejobs in
macports.conf. The default value of
buildmakejobs is set to 1, therefore unless this
variable is increased for a given MacPorts installation, parallel
builds will not occur in any case.
Default: no
Example:
use_parallel_build yes
The list of keywords related to the test phase.
Enable running test suites bundled with a port.
Default: no
Example:
test.run yes
Test command to run relative to
${worksrcdir}.
Default: ${build.cmd}
Example:
test.cmd checks.sh
Test target to pass to ${test.cmd}.
Default: test
Example:
test.target checks
The list of keywords related to the destroot phase.
Install command to run relative to
${worksrcdir}. Only use it if you can't use
destroot.type.
Default: ${build.cmd}
Example:
destroot.cmd pbxbuild
Defines which "make" is required. Sets
${destroot.cmd} to either "gnumake" or "bsdmake"
accordingly.
Default: ${build.type}
Values: gnu bsd
Example:
destroot.type bsd
Main arguments to ${destroot.cmd}; optional
argument modifiers pass arguments before and after the main
arguments.
Default: none
Example:
destroot.args BINDIR=${prefix}/bin
The following argument modifiers are available:
destroot.pre_args, defaults to:
${destroot.target}
destroot.post_args, defaults to:
none
Examples:
destroot.pre_args -project AudioSlicer.xcode
destroot.post_args INSTDIR=${destroot}${prefix}Install target to pass to ${destroot.cmd};
list modifiers add or delete items from a previous Portfile
destroot.target keyword or the default set by MacPorts base.
Default: install
Example:
destroot.target install install-config install-commandmode
destroot.target-append install-plugins destroot.target-delete install-commandmode
Arguments passed to ${destroot.cmd} to
install correctly into the destroot.
Default: DESTDIR=${destroot}
Example:
destroot.destdir prefix=${destroot}${prefix}If an application's Makefile properly supports the DESTDIR variable, MacPorts will automatically destroot the port properly. A port must destroot properly or the port will not install correctly, upgrade, or uninstall. If not, you may need to set this variable, or even patch the application's Makefile.
Umask to use during destroot.
Default: 022
Example:
destroot.umask 002
A list of directories that should not be removed if empty upon destroot completion.
Default: ???
Example:
destroot.keepdirs ${destroot}${prefix}/var/run \
${destroot}${prefix}/var/log \
${destroot}${prefix}/var/cache/mrtgMacPorts tests for compliance to the common directory
structure in ${prefix}. If a port is not
compliant with the standard, set it to yes.
You can find the macports standard in MacPorts File Hierarchy or in the porthier(7) man page.
If destroot.violate_mtree is set to
yes, the following warning is issued during the
installation.
Warning: portname requests to install files outside the common directory structure!This means that the port installed files outside of their
normal locations in ${prefix}. These could be
files totally outside of ${prefix}, which could
cause problems on your computer, or files inside of
${prefix} that are not in a standard location.
Use port contents
to see which files
were installed.portname
Default: no
Example:
destroot.violate_mtree yes
Free and open source software is highly modular, and MacPorts ports often require that other ports be installed beforehand; these prerequisites for a given port are called a port's “dependencies”.
There are three types of MacPorts dependencies: library, build, and run dependencies. Dependency types are important for proper port upgrade and uninstall behavior. For example, you may not uninstall a port that is a library dependency for another port, though you may remove one with a build dependency; likewise, upgrading a port will upgrade its library and build dependencies also, but not its run dependencies.
The list of dependencies to check before phases
configure, build,
destroot, install, and
package. Library dependencies are needed both at
build time (for headers and libraries to link against) and at run
time.
The list of dependencies to check before phases
build, destroot,
install, and package. Build
dependencies are needed when software is compiled, but not needed at
all once the software is compiled and installed.
The list of dependencies to check before phases
destroot, install, and
package. Run dependencies are needed when the
software is run, but not to compile it.
Port dependencies should be provided by MacPorts ports whenever possible, however dependencies may be provided by vendor-supplied software when satisfying a dependency by a port is not practical or desirable for a special reason. Dependencies of this type are called non-port dependencies.
Non-port dependencies should only be used if the application or library can be installed by multiple ports (for example stable and -devel version) or if it can't be installed with MacPorts.
Port dependencies, the preferred type, are specified as shown in these examples:
depends_lib port:rrdtool port:apache2 depends_build port:libtool depends_run port:apache2 port:php5
Non-port dependencies are specified as shown in these examples:
depends_lib lib:libX11.6:xorg
depends_build bin:glibtool:libtool
depends_run path:${prefix}/lib/libltdl.a:libtoolMacPorts variants are conditional modifications of port installation behavior during port installation. There are two types of variants: user-selected variants and platform variants. User-selected variants are options selected by a user when a port is installed; platform variants are selected automatically by MacPorts base according to the OS or hardware platform (darwin, freebsd, linux, i386, ppc, etc.).
User-selected variants are those that are defined so a user can
invoke them to enable port options at install time. They also allow a port
author a level of modularity and control using the keyword
default_variants (see below).
Variant names may contain only the characters A-Z, a-z, and the underscore character “_”. Therefore, take care to never use hyphens in variant names.
name [requires
variant] [conflicts
variant] [description
description]The variant declaration may contain any keywords that can be
placed in a Portfile's global section. If you wish to execute system
(shell) calls or Tcl extensions during the execution of a port
phase, you should place those statements within a
variant_isset conditional within a phase
declaration and not within the variant declaration itself.
Dependencies and conflicts with other variants in the same port can
be expressed with “requires” and
“conflicts” options as shown below.
Default: none
Examples:
variant gnome requires glib {
configure.args-append --with-gnome
depends_lib-append port:gnome-session
}variant apache2 conflicts apache {
configure.args-append \
--with-apxs2=${prefix}/apache2/bin/apxs
}The optional default_variants keyword is
used to specify variants that a port author wishes to have enabled
by default. This allows for Portfile modularity and also allows
users to suppress default variants if they wish.
Default: none
Example:
default_variants +ssl +tcpd
Default variants may be suppressed by preceding a variant name with a "-" as shown in this example.
%%port install foo -ssl
When using MacPorts on Mac OS X, a universal variant is defined by default to configure ports with universal flags. The variant can be overridden if the default code does not work (see the Configure Universal section above), or suppressed if a universal variant does not function properly for a given port.
If a port doesn't install any compiled software it should set universal_variant no as no ...
Default: yes
Example:
universal_variant no
Platform variants are either defined by default in MacPorts base, or defined by a port author to customize a port's installation according to OS (operating system) or hardware platform.
os_platform]
[hw_platform]
[version]
[arch]MacPorts allows platform-specific port options to be specified in a Portfile for handling differences between platforms and versions of the same platform.
platform darwin
can be used to handle
different tasks depending on the version of Mac OS X.
versionversion can be 6 for
10.2 Jaguar, 7 for 10.3 Panther,
8 for 10.4 Tiger or 9 for 10.5
Leopard.
Default: ???
Examples:
platform darwin 7 {
# Only used on Mac OS X 10.3.
configure.args-append \
--enable-tcl \
--with-tcl=/System/Library/Tcl/8.3
}
platform darwin powerpc {
# Only used if Mac OS X is running on a PowerPC processor.
configure.args-append \
--host=${os.arch}-apple-rhapsody${os.version}
}
platform darwin i386 {
# Only used if Mac OS X is running on an Intel processor.
configure.args-append \
--host=i386-gnu-rhapsody${os.version}
}Though a combination of OS and hardware platform may be specified
in a single platform statement (i. e. darwin i386), it is not possible
to select a range of platforms with a single statement. For example, to
select darwin versions 7 and 8 while excluding all others, you would
need two statements: platform darwin 7 and platform
darwin 8.
A MacPorts Portfile is a Tcl script, so it may contain any arbitrary Tcl code you may learn about in a Tcl reference manual. However, few authors will use arbitrary Tcl code; the vast majority will use Tcl extensions that are coded within MacPorts for performing the most common tasks needed for Portfiles. The list below is a list of Tcl extensions provided by MacPorts base.
Description.
Description.
Shorthand alternative to "file copy".
Shorthand alternative to "file rename".
Deletes each of the given files/directories. Behaves similarly to file delete -force except that file delete -force will fail to delete directories properly on 10.3 systems.
Mimicks the BSD touch command.
Mimickes the BSD ln command.
xinstall copies files and creates directories; it is intended to be compatible with install(1).
owner] [-g
group] [-m
mode] [file1 file2
...] directoryInstall the specified file(s) to a destination directory.
owner] [-g
group] [-m
mode] [-W
dir] [file1 file2
...] directoryChange to dir and install file(s) to
a destination directory.
owner] [-g
group] [-m
mode] [glob
pattern]
directoryInstall the file(s) matching the glob pattern to a destination directory.
owner] [-g
group] [-m
mode]
directoryCreate a directory including parent directories if necessary.
Defaults:
owner -
group -
mode -
Examples:
xinstall -m 640 ${worksrcpath}/doc README \
${destroot}${prefix}/share/doc/${name}xinstall -m 640 -W ${worksrcpath}/doc README INSTALL COPY \
${destroot}${prefix}/share/doc/${name}eval xinstall -m 640 [glob ${worksrcpath}/doc/*] \
${destroot}${prefix}/share/doc/${name}xinstall -d ${destroot}${prefix}/share/doc/${name}Description.
Examples:
example 1
example 2
example 3
uid]
[gid=gid]
[passwd=passwd]
[realname=realname]
[home=home]
[shell=shell]Add a new local user to the system with the specified uid, gid, password, real name, home directory and login shell.
usernameCheck if a local user exists.
Returns the highest used uid plus one.
group
[gid=gid]
[passwd=passwd]
[realname=realname]
[users=users]Add a new local group to the system, with the specified gid, password, real name, and with a list users as members.
groupCheck if a local group exists and return the corresponding gid. This can be used with adduser:
addgroup foo adduser foo gid=[existsgroup foo]
Returns the highest used gid plus one.
Use only when ....
A StartupItem is a MacPorts facility to run "daemons," a Unix term for programs that run continuously in the background, rather than under the direct control of a user; for example, mail servers, network listeners, etc. Ports that use StartupItem keywords create Mac OS X scripts for launchd, which is the Apple facility introduced with Mac OS X 10.4 to replace xinetd for starting and managing daemons. To support launchd, a program named daemondo is provided by MacPorts base that serves as an adapter between Mac OS X's launchd and daemons (“executable” StartupItems) or traditional Unix startup scripts that start daemons (“script” StartupItems).
There are three categories of StartupItem keywords. Those that trigger StartupItem creation and logging, those that specify attributes of “executable” StartupItems, and those that specify attributes of “script” StartupItems.
The variable startupitem_type in
${prefix}/etc/macports/macports.conf may be set to
none to globally override all StartupItem keywords found
in Portfiles; this prevents StartupItems from being created.
The keywords in this section may be used with either “executable” or “script” StartupItems (see below).
Trigger the creation of a StartupItem.
Default: no
Example:
startupitem.create yes
Sets the name for the StartupItem. Defaults to the name of the port, so this keyword is usually unnecessary.
Default: ${name}
Example:
startupitem.name dhcpd
Path to a logfile for logging events about the lifetime of the StartupItem. 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.
Default: /dev/null
Example:
startupitem.logfile ${prefix}/var/log/mydaemon.logControl whether or not to log events to the log file. If logevents is set, events with timestamps are logged to the logfile.
Default: no
Example:
startupitem.logevents yes
Cause the daemon to be restarted when a change in network state is detected.
Default: no
Example:
startupitem.netchange yes
Daemons run continuously, so monitoring the health of daemon processes and restarting them if they die is an important StartupItems' feature. “Executable” StartupItems are preferred over “script” StartupItems because daemondo launches the daemon directly, rather than indirectly via a script, and therefore it automatically knows how to monitor a daemon process and restart it if it dies. Daemons used with “executable” StartupItems may be programs or scripts (shell, perl, python, etc.), but when a script is used the script itself must be the daemon, rather than merely what launches the daemon (for the latter,“script” StartupItems are to be used).
For a given port, the “executable” StartupItem keyword may not be used with any keywords in the “script” StartupItem category.
Specifies the name of the daemon to be run. It may have multiple arguments, but they must be appropriate for a call to exec; arbitrary shell code may not be used.
Some daemons "daemonize" by detaching themselves from the
controlling tty before sending themselves to the background, thus
making themselves a child of the original process. A daemon to be
started with startupitem.executable must not be
allowed to do this (daemondo will think the process has died and
start another instance); this can usually be turned off with a
switch so the daemon does not detach itself (runs as a foreground
process).
Default: none
Example:
startupitem.executable ${prefix}/sbin/vm-pop3d -d 10 -t 600Do not wrap values in quotes if passing arguments to the daemon; “executable” StartupItem elements must be tagged individually so the spaces between arguments serve as delimiters for “string” tags. For example, this startupitem key/value pair:
startupitem.executable ${prefix}/sbin/vm-pop3d -d 10 -t 600generates a .plist file with these tags:
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/daemondo</string>
<string>--label=vm-pop3d</string>
<string>--start-cmd</string>
<string>/opt/local/sbin/vm-pop3d</string>
<string>-d</string>
<string>10</string>
<string>-t</string>
<string>600</string>
<string>;</string>
</array>StartupItems of type “script” use daemondo to launch a daemon indirectly via a startup script. A typical snippet of a startup script that may be used with a “script” StartupItem is shown below. Notice that the script is not a daemon; rather the script indirectly launches the vm-pop3d daemon.
#!/bin/sh
case "$1" in
start)
echo -n "Starting vm-pop3d: "
/opt/local/sbin/vm-pop3d -d 10 -t 600
[... trimmed ...]But if a script itself is a daemon, use the
“executable” StartupItem type since that way it will be
launched directly and its health tracked automatically. When using
“script” StartupItems, the startupitem.pidfile
keyword must be used if you want daemondo to monitor a
daemon process and restart it if it dies.
For a given port, StartupItem keywords in category “script” may not be used with an “executable” StartupItem keyword.
Specify a shell script to start, stop, and restart the daemon.
In the absence of startupitem.restart, the daemon will
be restarted by taking the stop action, followed by the start
action.
Default: none
Examples:
startupitem.start "${prefix}/share/mysql/mysql.server start"
startupitem.stop "${prefix}/share/mysql/mysql.server stop"
startupitem.restart "${prefix}/share/mysql/mysql.server restart"Wrap the stop, start, and restart values in quotes so they will be placed in the wrapper tagged as a single element.
Shell code that will be executed prior to any of the options
startupitem.start, startupitem.stop and
startupitem.restart.
Default: none
Example:
startupitem.init BIN=${prefix}/sbin/bacula-fdThis keyword must be defined properly for daemondo to be able to monitor daemons launched via “script” StartupItems and restart them if they die. It specifies two things: a process id (PID) file handling method, and a pidfile name and path.
Default: none
${prefix}/var/run/${name}.pid
Default: [none] |
[${prefix}/var/run/${name}.pid]
Values [none auto manual clean]
[/path/to/pidfile]
Example:
startupitem.pidfile auto ${prefix}/var/run/${name}.pidfilePID file handling options:
none - daemondo will not create or track
a PID file, so it won't know when a daemon dies.
auto - The started process is expected to
create a PID file that contains the PID of the running daemon;
daemondo then reads the PID from the file and tracks the
process. The started process must delete the PID file if this is
necessary.
clean - The started process is expected
to create a PID file that contains the PID of the running
daemon; daemondo then reads the PID from the file and tracks the
process, and deletes the PID file if it detects the daemon has
died.
manual - This option should only be used
if an “executable” StartupItem could be used
(daemondo launches a daemon directly) and a
port author wants a PID file written for some special use. A PID
file is not needed to detect process death for daemons launched
directly by daemondo. As with executable StartupItems, daemondo
remembers the PID of the launched process and tracks it
automatically.
A port with a StartupItem places a link to a .plist file for the
port's daemon within /Library/LaunchDaemons/. A
.plist file is an XML file; MacPorts installs .plist files tagged as
“disabled” for the sake of security. You may enable a startup
script (tag the.plist file as “enabled”) and load it into
launchd with a single command as shown.
%%sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
You may stop a running startup script, disable it (tag the.plist file as “disabled”), and unload it from launchd with a single command as shown.
%%sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mysql5.plist
During port installation a MacPorts StartupItem creates a .plist
file in ${prefix}/etc/LaunchDaemons/, and places a
symbolic link to the .plist file within
/Library/LaunchDaemons/.
For example, the StartupItem for the mysql5 port is
org.macports.mysql5.plist, and it is linked as
shown.
%%ls -l /Library/LaunchDaemons
org.macports.mysql5.plist ->
/opt/local/etc/LaunchDaemons/org.macports.mysql5/org.macports.mysql5.plistFor “script” StartupItems, in addition to a .plist file, a wrapper is also created.
%%ls -l /opt/local/etc/LaunchDaemons/org.macports.mysql5/
-rwxr-xr-x 2 root wheel 475 Aug 2 14:16 mysql5.wrapper -rw-r--r-- 2 root wheel 975 Aug 2 14:16 org.macports.mysql5.plist
The wrapper manipulates the script as specified in the startupitem.start and startupitem.stop keywords. An example wrapper script snippet is shown below.
#!/bin/sh
# MacPorts generated daemondo support script
# Start
Start()
{
/opt/local/share/mysql5/mysql/mysql.server start
}
# Stop
Stop()
{
/opt/local/share/mysql5/mysql/mysql.server stop
}
[... trimmed ...]Options livecheck and distcheck are especially useful for port maintainers, but others may also find this information valuable.
Livecheck checks to see if MacPorts can query the developer's download site to determine if a newer version of the software has become available since the port was installed.
Specify what kind of update check to perform.
Open source mirror site options are to use the project's
latest file release from sourceforge or
googlecode, or the project's
date_updated XML tag for
freshmeat. These options are automatically used if
a matching ${master_sites} URL is used.
Generic download site options are to specify a
moddate (modification date of a URL resource), a
regex (retrieve the version by applying a regex to
a URL resource), regexm (retrieve the version by
applying a multi-line regex to a URL resource), md5
(compares the md5 sum of a URL resource) or none
(no check).
Default: sourceforge or
googlecode if the
${master_sites} is one of these, else
freshmeat.
Values: freshmeat
sourceforge googlecode
moddate regex
regexm md5
none
Examples:
livecheck.check regex
livecheck.url ${homepage}
livecheck.regex "Generally Available (\\d+(?:\\.\\d+)*)"Name of the project for live checks. Is only used with freshmeat, sourceforge, and googlecode livechecks.
Default: ${name} or the sourceforge,
freshmeat or googlecode project name if it can be guessed from
${master_sites}.
Example:
livecheck.name hibernate
Name of the file release 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. You may use this keyword without
livecheck.version if you replace the version part of
the name with "(.*)".
Default: sourceforge:
${livecheck.name}, googlecode: first
${distfiles} item
Example:
livecheck.distname faad2.src
Version of the project for a check; used for regex-based checks.
Default: ${version}
Example:
livecheck.version ${name}-${version}URL to query for a check.
Default:
${homepage} or the first hit among
the following sites:
http://freshmeat.net/projects-xml/${livecheck.name}/${livecheck.name}.xml
http://sourceforge.net/export/rss2_projfiles.php?project=${livecheck.name}
http://code.google.com/p/${livecheck.name}/downloads/list
Example:
livecheck.url http://ftp.gnu.org/gnu/bison/
Regular expression to parse the resource for regex checks. Be sure to use a regular expression grouping around the version component.
Default: none
Example:
livecheck.regex 4th-([a-z0-9.]+)-unix${extract.suffix}md5 checksum to use for an md5 comparison.
Default: none
Example:
livecheck.md5 37e6a5b6516a680c7178b72021d3b706
Distcheck reports whether or not the distfile(s) specified in a Portfile are still available on the developer's download site. Examples are given below.
This option can be used to disable distcheck. It specifies
what kind of check should be performed on distfiles:
moddate (check if the Portfile is older than the
distfile) or none (no check).
Default: moddate
Example:
distcheck.check none
PortGroup gnustep allows for efficient porting of GNUstep-based open source software using the GNU objective-C runtime that defines options for the configuration, build, and destroot phases, and also defines some values for GNUstep-based software. A minimum Portfile using the gnustep PortGroup class need only define the fetch and the checksum phases.
Portfiles using the gnustep PortGroup allow for port authors to set the following keywords in addition to the general Portfile keywords.
An associative array which specifies the sub-directories relative to ${worksrcpath} and the SHARED_LD_POSTFLAGS variables to be added to GNUmakefile.preamble in those sub-directories. This helps making the patching process easier on Darwin.
Type: optional
Default: none
Example:
platform darwin {
array set gnustep.post_flags {
BundleSubDir "-lfoo -lbar"
}
}Define the gcc compiler to use when compiling a port.
Type: optional
Default: gcc-mp-4.2
Example:
gnustep.cc gcc-mp-4.3
Many GNUstep packages include a Documentation sub-directory that is not built by default. Enabling this variant builds and installs the included documentation.
Type: optional
Example:
%%port install gnustep-gui +with_docs
PortGroup gnustep supports both the traditional gnustep file layout and the new fhs file layout. However, a given ported application does not necessarily support both. The Portfiles have access to many procedures to handle these two layouts:
Sets GNUSTEP_MAKEFILES according to the FilesystemLayout
Sets DYLD_LIBRARY_PATH and PATH for the gnustep FilesystemLayout
Returns true (1) if current file layout is gnustep
Sets GNUSTEP_SYSTEM_LIBRARY according to the FilesystemLayout
Sets GNUSTEP_LOCAL_LIBRARY according to the FilesystemLayout
Portfiles using PortGroup gnustep do not need to define the following variables:
Default: gnustep
Default: http://www.gnustep.org/
Default: gnustep:core
Default: gnustep-core
Default: no
Default: DYLD_LIBRARY_PATH PATH
Default: CC=gcc-mp-4.2 GNUSTEP_MAKEFILES
Default: gnu
Default: DYLD_LIBRARY_PATH PATH
Default: messages=yes
Default: DYLD_LIBRARY_PATH PATH
Default: messages=yes
PortGroup perl5 allows for efficient porting of perl modules and other perl open source software.
Portfiles using the perl5 PortGroup allow for port authors to set the following keywords in addition to the general Portfile keywords.
This keyword sets the ${distfile} and ${version}.
Type: required
Example:
perl5.setup Net-Telnet 3.03
Portfiles using PortGroup perl5 do not need to define the following variables:
Default: perl
Default: http://search.cpan.org/dist/${distname}
Default: perl5.8
Default: no
When the perl5 PortGroup is declared within a Portfile, the following variables are provided during port install.
The MacPorts Perl version.
The Perl binary path (ie,
${prefix}/bin/perl).
Path to the Perl vendor directory.
Path to the Perl architecture-dependent modules directory.
PortGroup python allows for efficient porting of python-based open source software.
When the python PortGroup is declared within a Portfile, the following variables are provided during port install.
The MacPorts Python binary location.
The Python dynamic library and path (ie,
${prefix}/lib/libpython2.x.dylib).
Path to the Python include directory.
Path to the Python site-packages directory. (ie,
${prefix}/lib/python2.4/site-packages).
PortGroup ruby allows for efficient porting of ruby-based open source software.
When the ruby PortGroup is declared within a Portfile, the following variables are provided during port install.
The MacPorts Ruby version.
The Ruby binary location.
Path to the Ruby vendorlibdir directory (ie,
${prefix}/lib/ruby/vendor_ruby/${ruby.version})
The name for the Ruby architecture-dependent directory name
(ie, i686-darwin8.10.1).
Path to the Ruby vendor archdir (ie,
${ruby.lib}/${ruby.arch}).
PortGroup xcode allows for efficient porting of Xcode-based opensource software. It handles configuration, build, and destroot phases. It also defines some values for Xcode-based software. A minimum Portfile using the xcode PortGroup class only defines the fetch and the checksum phases.
Using PortGroup xcode is a way to make your port able to tolerate Xcode version updates because the PortGroup is tested against all supported Mac OS X and Xcode versions.
Portfiles using the xcode PortGroup allow for port authors to set the following keywords in addition to the general Portfile keywords.
The path relative to ${build.dir} and ${destroot.dir} of the Xcode project. If unset, let xcode tool figure it out. It usually succeeds if there is a single project in the directory.
Type: optional
Example:
xcode.project ${name}.xcodeProject configuration/buildstyle to use.
Type: optional
Default: Deployment
Example:
xcode.configuration Main
If present, it overrides build.target and destroot.target.
Type: optional
Example:
xcode.target ${name}Additional settings passed to the xcode build tool during the build phase. These settings should be in the X=Y form.
Type: optional
Example:
xcode.build.settings FRAMEWORK_SEARCH_PATHS=${prefix}/Library/FrameworksType of project that will be installed. This tells the xcode PortGroup how to destroot the project. Correct values are application and framework.
Type: optional
Default: application
Example:
xcode.destroot.type framework
Where to install the build product.
Type: optional
Default: /Library/Frameworks or
/Applications/MacPorts depending on
xcode.destroot.type.
Additional settings passed to the xcode build tool during the destroot phase. These settings should be in the X=Y form.
Type: optional
Example:
xcode.destroot.settings SKIP_INSTALL=NO
Portfiles using the xcode PortGroup do not need to define the following variables:
Default: aqua
Default: macosx
Default: no
The following Portfile phase keywords affect the xcode PortGroup in a unique way. In most cases, you will not need to set any of these keywords in the Portfile. See portfile-phase(7)
Default: ${xcodebuildcmd}.
Default: ""
This variable will be ignored if xcode.target is set.
Default: build
Default: ${xcodebuildcmd}
Default: ""
This variable will be ignored if xcode.target is set.
This chapter contains information to help gain a better understanding of MacPorts or learn how to configure it for non-default operation.
porthier — layout of the ports filesystems
A map of the filesystem hierarchy used by MacPorts and the ports it installs. Much of it is based on hier(7).
${prefix}The base of the MacPorts filesystem hierarchy.
Default: /opt/local/
bin/Common utilities, programming tools, and applications.
etc/System configuration files and scripts.
include/Standard C include files.
lib/Archive libraries.
libexec/System daemons and system utilities (executed by other programs).
sbin/System programs and administration utilities.
share/Architecture-independent files.
doc/Miscellaneous documentation.
examples/Examples for users and programmers.
info/GNU Info hypertext system.
locale/Localization files.
man/Manual pages.
misc/Miscellaneous system-wide ASCII text files.
src/Source code.
var/Multi-purpose log, temporary, transient and spool files.
db/Miscellaneous automatically generated system-specific database files.
macports/MacPorts package building topdir.
build/Where ports are built and destrooted.
distfiles/Storage location for the distfiles of fetched ports.
packages/Contains archives (packages) of installed ports.
receipts/Contains the registry information and receipts for installed ports.
software/In image-mode (the default), the installed files are stored here and linked to ${prefix}
sources/Holds the sources for the ports tree (the Portfiles) and also MacPorts base.
spool/Directory containing output spool files.
log/Miscellaneous system log files.
run/System information files describing various information about the system since it was booted.
www/Files to be served by an http server.
cgi-bin/Directory for cgi executables.
/Applications/MacPorts/Native Mac OS X applications.
/Library/Frameworks/Native Mac OS X Library Frameworks.
The MacPorts configuration files do not need to be modified for the
general end user. They contain options that may be of use to advanced
users and port developers. All the MacPorts configuration files are
located in ${prefix}/etc/macports.
sources.conf is where the location(s) are set
to scan for MacPorts Portfiles. This file is commonly modified to add a
local Portfile repository.
macports.conf contains advanced MacPorts
configuration options. See the file comments for instructions.
variants.conf is used to specify variants to
be used for all ports where they exist.
MacPorts has a unique ability to allow for multiple versions, revisions, and variants of the same port installed at the same time, so you may test new port versions without uninstalling a previous working version.
This capability derives from the fact that a MacPorts port by
default is not installed into its final or "activated" location, but
rather to an intermediate location that is only made available to other
ports and end-users after an activation phase that makes hard links of all
its files in ${prefix} that point to the port's files
in the image repository. Therefore deactivating a port image to install a
different version only removes the hard links in
${prefix} pointing to the previous port version's image
—the deactivated port's image is not disturbed.
MacPorts image mode may be turned off in favor of direct mode by
setting the portinstalltype variable in the
macports.conf file "direct". But unless you know
what you're doing, don't change it.
The MacPorts system is composed of three Tcl libraries:
MacPorts API - MacPorts public API for handling Portfiles, dependencies, and registry
Ports API - API for Portfile parsing and execution
pextlib - C extensions to Tcl
The code for the Port API is located in
base/src/port1.0. The Port API provides all the
primitives required for a Portfile to be parsed, queried, and executed.
It also provides a single procedure call that the MacPorts API uses to
kick off execution: "eval_targets". The port Tcl library supplies these
procedures, all of which are generated at run-time using the
options procedure in portutil.tcl.
The macports Tcl library loads the Portfile into a sub-interpreter, within which all port-specific code is run. This process ensures that there will never be pollution of the Tcl space of other ports, nor the MacPorts libraries, nor the calling application.
Portfiles are executed in a Tcl interpreter as Tcl code (and not truly parsed strictly speaking), so every Portfile option must be a TCL procedure.
The Ports API performs the following functions:
Manages target registrations. All targets register themselves with the Port API. Accordingly, the Port API creates pre-/post-/main overrides for each of the targets.
Option/Default handling. All Portfile options (name, version, revision ...) are registered by targets. The Port API creates procedures for these options, and sets up the complex variable traces necessary to support option defaults.
Executes target procedures, including the pre/post/main routines.
Manages a state file containing information about what variants were specified and what targets have run successfully.
Provides essential Portfile Tcl extensions (reinplace, xinstall, etc).
Provides simple access to the ui_event mechanism by providing the various ui_ procedures (i.e., ui_msg, ui_error).
The code for the MacPorts API is located in
base/src/macports1.0. The MacPorts API provides a
public API into the MacPorts system by providing simple primitives for
handling Portfiles, dependencies, and registry operations, and exports
the MacPorts API for the port command line utility,
or any other. The API has very little information about the contents
Portfiles; instead, it relies entirely upon the port
Tcl library. By keeping the high level API simple and generic, revisions
to the underlying ports system will not necessarily require a revision
of the high level MacPorts API.
The MacPorts API is also responsible for loading user specified
options into a sub-interpreter to be evaluated by the ports API. In that
case it sets the variable name in the sub-interpreter and adds the
option to the sub-interpreter's global array user_options(). User
options are passed as part of the call to mportopen.
The MacPorts API performs the following functions:
Dependency support.
This is implemented in a highly generic fashion, and is used throughout the system. The dependency functions are exported to the Port API, and the Port API uses them to execute targets in the correct order.
Dependency processing.
Software dependencies are handled at this layer using the dependency support layer.
UI abstractions.
UI Abstractions are handled at this layer. Each port action is provided a context, and a mechanism for posting user interface events is exported to the Port API (ui_event).
Registry management routines.
Manages the rudimentary port registry in
${prefix}/var/mports/receipts/.
mportregistry::new: create a new port
registry entry.
mportregistry::exists: check if a port
registry entry exists (either versioned or not).
mportregistry::delete: delete an existing
registry entry.
mportregistry::close: closes a new registry
entry.
Exports the MacPorts API for use by client applications.
The following routines are defined.
mportinit: Initializes the MacPorts system.
Should be called before trying to use any other
procedure.
mportsearch: Given a regexp, searches the
PortIndex for ports with matching
names.
mportopen: Given a URI to a port, opens a
Portfile and returns an opaque handle to it.
portclose: Given a port handle, closes a
Portfile.
mportexec: Given a port handle, executes a
target (i.e. install).
mportinfo: Given a port handle, this returns
the PortInfo array (as a flat list of array elements). This is a
little tricky and unstable and only used by the
portindex command.
mportdepends: Given a port handle, returns a
list of ports upon which the specified port depends.
For an example of the MacPorts API, when one executes port search cm3, the port utility:
Calls the mportsearch function to find all ports
containing "cm3".
Returns Tcl array(s) containing data from the
PortIndex: port name, version, revision,
variants, etc.
Formats the list of arrays in the standard viewing format.
For another MacPorts API example, when one executes port install cm3, the port utility:
Calls the mportsearch function to find the first
port that matches the name "cm3".
Calls the mportopen function to open the
port.
Calls the mportexec function to execute the
install target in the port.
Calls the mportclose function to close the
port.
The pextlib TCL library provides a variety of C extensions to add capabilities to TCL procedures; for example, an interface to flock(2) and mkstemp(3).
This chapter provides an overview of the MacPorts registry and its API. The registry is queried by MacPorts utilities for information about installed ports related to dependencies, port images, and simple user information about what is installed. It provides abstraction over a modular receipt storage layer; this allows for flat file receipts as well as receipts stored in a SQLite database.
The registry allows MacPorts utilities to:
Modify receipts to reflect changes made to installed ports being maintained by MacPorts.
Query the global file and dependency databases for file conflicts between a port being installed and a port already installed.
Maintain dependency trees of installed ports.
The flat file registry (MacPorts default registry) files are
contained in ${portdbpath}/receipts, which by
default is location
${prefix}/var/macports/receipts. File mappings and
dependency mappings are tracked in the flat file registry by two
files:
file_map.db
dep_map.bz2
The MacPorts registry provides a public API in the registry1.0 Tcl
package. Using this API listed below you can access the MacPorts
Registry using the default receipt storage mechanism chosen in
macports.conf.
registry::new_entry {name version {revision 0}
{variants ""}}Begin the creation of a new registry entry for the given port. Returns a reference ID to the registry entry created.
registry::open_entry {name {version 0}
{revision 0} {variants ""}}Opens an existing registry entry. Returns a reference ID to the registry entry that was opened.
registry::entry_exists {name version {revision
0} {variants ""}}Checks to see if a port exists in the registry. Returns 1 if the entry exists, 0 if not.
registry::write_entry
{ref}Writes the receipt associated with the given reference.
registry::delete_entry
{ref}Deletes the receipt associated with the given reference.
registry::property_store {ref property
value}Store the given value with the property name in the receipt associated with the given reference.
registry::property_retrieve {ref
property}Retrieve the property name from the receipt associated with the given reference. Returns the value of the property, if the property exists.
registry::installed {{name ""} {version
""}}Get all installed ports, optionally all installed ports matching the given name, or the given name and version. Returns a list of the installed ports.
registry::location {portname
portversion}Returns the physical location the port is installed in on the disk. This is primarily useful for finding out where a port image is installed.
registry::open_file_map
{args}Opens the file map that contains file-port relationships.
registry::file_registered
{file}Returns the name of the port that owns the given file, if the file is registered as installed, and 0 otherwise.
registry::port_registered
{name}Returns a list of all files associated with the given port if that port is installed, and 0 otherwise.
registry::register_file {file
port}Registers the given file in the file map as belonging to the given port.
registry::unregister_file
{file}Removes the file from the file map.
registry::write_file_map
{args}Write the changes to the file map.
registry::open_dep_map
{args}Opens the dependency map that contains port dependency relationships.
registry::fileinfo_for_file
{fname}Returns a list for the given file name representing all data currently known about the file. This is a 6-tuple in the form of:
file path
uid
gid
mode
size
md5 checksum
registry::fileinfo_for_index
{flist}Returns a list of information concerning each file in the given file list, if that file exists in the registry. The information if obtained through registry::fileinfo_for_file
registry::list_depends
{name}Returns a list of all the ports that given port name depends on.
registry::list_dependents
{name}Returns a list of all the ports that depend on the given port name.
registry::register_dep {dep type
port}Registers the given dependency as the given type of dependency with the given port.
registry::unregister_dep {dep type
port}Unregister the given dependency of the given type as a dependency of the given port.
registry::write_dep_map
{args}Write changes to the dependency map.
The MacPorts Project uses a system called Trac to file tickets to report bugs and enhancement requests. Trac also provides an interface to browse the MacPorts Subversion repository. Though anyone may search Trac for tickets, you must register for a Trac account to create tickets.
Once you are logged into Trac, you may click View Tickets -> New Ticket and you will be presented with a new ticket window shown in the graphic below. Follow the Trac ticket guidelines below to fill out the form.

There are certain conventions used to ensure that Trac tickets convey as much accurate information as possible so problems and contributions may be acted upon efficiently.
Short Summary:
[port]
[version] [concise
description]
Example: "rrdtool-1.2.23 Configure error - build failure"
Type: There are two main types of tickets.
- The default; any port/MacPorts build/runtime failures and/or documentation corrections.
- Tickets, with or without patches, created to enhance something that isn't failing its intended purpose.
Full Description: All details that might
be relevant to someone reading the ticket. Wiki
formatting or attached log files should be used for large
text blocks. If you want to post a build log make sure you use
{{{ around the
log or it could break the page layout. Example:...}}}
{{{
your build log here
}}}
Submitters are advised to trim pastes and logs of any kind to what's really relevant to the report, as otherwise overly large submissions that might contain redundant and/or unnecessary information might become unmanageable.
Priority: Assign a priority level to the ticket.
- Reserved for the use of MacPorts team members, as they are the best fit to determine which reports warrant a higher priority over others.
- The default. For normal port failures, non-critical enhancement requests, non-critical port failures.
- For mostly cosmetic improvements, documentation corrections/improvements, etc.
- Anything that doesn't fit the categories high, normal, or low.
Component: Set what part of the MacPorts Project the ticket is to be filed against.
- Tickets related to MacPorts base code.
- Documentation enhancements and error corrections, or patches to the MacPorts Guide.
- Tickets related to ports.
- For MacPorts hosting & server-side issues, reserved for MacPorts PortMgr team members.
- MacPorts website enhancements and error corrections.
- MacPorts Wiki enhancements and error corrections.
Keywords: Type any keywords that might help when searching for tickets (portname, type of problem, etc).
Cc: Anyone else besides the ticket
reporter and assignee who would like to be kept involved in the
development of the ticket, and/or the port maintainer in case
his/her address does not appear in the
drop down menu. Multiple emails should be separated with a comma
(i.e. you@example.org, maintainer@macports.org).
To get the maintainer email address use port info
<portname>.
Milestone: This is a ticket category that allows for search and sorting tickets efficiently.
- for tickets requesting or providing improvements to the functionality of the MacPorts system.
- for tickets reporting or fixing bugs in the MacPorts system.
- for tickets reporting or fixing bugs in ports provided by MacPorts.
- for submissions providing enhancements to ports provided by MacPorts.
- for requests for ports to be added to MacPorts.
- for submissions that add a port to MacPorts.
- for submissions that update a port provided by MacPorts.
- for tickets relating to the documentation for MacPorts, including the MacPorts guide, Wiki, man pages and the website.
Blank - For unclassified tickets that don't fit into any of the provided milestones.
Version: Select the MacPorts version you are using when it is applicable.
Assign To: For tickets on ports, select
the port maintainer's email address (use port info
<portname>). If the maintainer's email address is
<nomaintainer@macports.org>, select
<macports-tickets@lists.macosforge.org>.
Attachments: Files may be attached to a ticket when it is being created if the checkbox that reads “I have files to attach to this ticket” is selected, or after it has been submitted by using the file attachment button.
You may contribute new ports and enhancements of any kind to already existing ports using Trac tickets.
Ports are contributed by following these steps. See Ticket Submission Guidelines above for a description of all fields.
Create a Trac ticket.
Set the type to enhancement.
Set the milestone to Port Submissions.
Attach the Portfile and any required
patchfiles to the ticket.
Enhancements to existing ports may comprise new functionality for
a given port, bug fixes or even simple version updates. They should
always be contributed as Portfile patches. See
Ticket Submission Guidelines above for a description of all
fields.
Create a Portfile patch with your changes
as described in Portfile Development.
Create a Trac ticket.
Set the type to enhancement for miscellaneous enhancements or to defect for bug fixes.
Set the milestone to Port Enhancements, Port Updates or Port Bugs depending on the case.
Attach your Portfile patch file and any new or changed patch files (don't patch patches) to the ticket.
Port maintainers normally are given commit privileges to the Subversion repository so they can make updates to their own ports. However, The MacPorts Project does not restrict commit privileges for maintainers, so before a person other than a port's maintainer updates a port it is a good practice to inform a port's maintainer. See details below.
If you have a port update or bugfix for a port you do not maintain, to respect the rights of the port maintainer you should follow the following guidelines:
If a port's maintainer is
<nomaintainer@macports.org>, you may feel free to make
updates and/or take maintainership of the port.
If a port's maintainer contains the address
<openmaintainer@macports.org>, this means that the
author allows minor updates to the port without contacting him
first. But permission should still be sought for major
changes.
Create patch file(s) as necessary, attach them to a Trac ticket, and assign the ticket to the maintainer and Cc him or her.
Wait for a response from the maintainer. The maintainer should apply the patches and close the ticket within 72 hours.
However, for maintained ports without
<openmaintainer@macports.org>, there are some conditions
under which maintainer permission may be waived:
If the maintainer does not respond within 72 hours, you or
another committer may review the patches and update the port. If you
are not a committer, you may email
<macports-dev@lists.macosforge.org> and request the
updates be committed.
A port is abandoned by it's current maintainer. A port against which a Port Abandoned ticket has been filed (see below) can be updated without contacting the maintainer.
A critical port is broken that affects many users.
A port may be considered abandoned if a bug has not been acknowledged for more than three weeks after a ticket is filed. If this time period has passed and you wish to initiate the Port Abandonment protocol and volunteer as the new maintainer:
File a new Trac ticket with the summary line [Port Abandoned].
Refer to the original unacknowledged ticket in the Port Abandoned ticket.
The Port Abandoned ticket may be closed when the new maintainer is assigned, and the original ticket with the updates may be resolved when the updates attached to the original ticket are committed.
A requirement for a person to become a MacPorts committer is to first become involved and contribute to the project. This may be done by having a record of contribution to the project in several of the following ways:
Contributing new ports.
Fixing bugs in existing ports.
Volunteering as a maintainer of non-maintained ports.
Involvement on MacPorts support lists.
Contributing with documentation
To apply for MacPorts commit rights, send a brief email to the
PortMgr team at <macports-mgr@lists.macosforge.org> entitled
“Request for commit rights” with the following contents:
a description of your application and why you think you deserve commit rights (including evidence of contributions to MacPorts as described above).
the identity you'd like to use as a member of the project, A.K.A. the
“handle”, as part of your
alias.handle@macports.org
a real e-mail address to which you'd like your MacPorts alias to forward.
The PortMgr team will consider all applications and provide an appropriate response in a timely manner.
The MacPorts PortMgr team is the steering group for The MacPorts Project. Its membership was determined by public elections among project members in March of 2005, resulting in the appointing of James D. Berry, Juan Manuel Palacios and Markus W. Weissman. They are responsible for matters such as:
approving new project members (i.e. granting commit rights);
setting general guidelines for the project;
dispute resolution;
managing the projects infrastructure; and
engineering releases.
A system for compiling, installing, and managing free and open source software comprised of an infrastructure called MacPorts base and a collection of ports. MacPorts current port collection defines the software may be installed.