Port PhasesIntroductionThe MacPorts port installation process has a number of distinct
phases that are described in detail in this section. The default scripts
coded into MacPorts base performs the standard
configure, make, and make
install steps. For applications that do not conform to this
standard, installation phases may be declared in a Portfile to augment or override the default
behavior as described in the Portfile
Development chapter.fetchFetch the ${distfiles} from
${master_sites} and place it in
${prefix}/var/macports/distfiles/${name}.checksumCompare ${checksums} specified in a
Portfile to the checksums of the fetched
${distfiles}.extractUnzip and untar the ${distfiles} into the
path ${prefix}/var/macports/build/..../workpatchApply optional patch files
specified in ${patchfiles} to modify a port's
source code file(s).configureExecute ${configure.cmd} in
${worksrcpath}.buildExecute ${build.cmd} in
${worksrcpath}.testExecute commands to run test suites bundled with a
port.destrootExecute the command make installDESTDIR=${destroot}in
${worksrcpath}.Using a DESTDIR
variable is a part of standard GNU coding practices, and
this variable must be supported in an application's install
routines for MacPorts' destroot phase to work without manual
Portfile scripting or source patching. Urge developers to fully
support DESTDIR in their applications.Understanding the destroot phase is critical to understanding
MacPorts, because, unlike some package management 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.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.installArchive a port's destrooted files into
${prefix}/var/macports/software. See Port Images in the MacPorts Internals chapter for
details.activateExtract the port's files from the archive in
${prefix}/var/macports/software to
their final installed locations, usually inside
${prefix}.Installation Phase KeywordsMacPorts 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 effect whether or
not phase declarations have been explicitly defined in a Portfile.Keyword List Modifiers (-append, -delete, -replace, -strsed)Keyword list modifiers are keywords that end in -append, -delete or
-replace. Keywords that support list modifiers are identified under
appropriate reference sections below.-append adds a value to the keyword, -delete removes a previously
added item. -replace takes two arguments and replaces the first value
from the keyword with the second value. -strsed treats the keyword value
as a string and filters it through
strsed using the
given pattern. There is also a deprecated syntax for -replace which takes
only one argument and behaves the same as -strsed.Keyword list modifiers are most frequently used for these three
purposes:Preserve configure defaults set by a previously executed
Portfile keyword or by MacPorts baseMacPorts 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-appendconfigure.ldflags-appendPreserve PortGroup DependenciesPorts 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 VariantsWhen 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-deletedepends_lib-replacedistfiles-append or
distfiles-deletedistfiles-replacepatchfiles-append or
patchfiles-deletepatchfiles-replaceKeyword Argument Modifiers (.pre_args / .post_args)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.Fetch Phase KeywordsThe list of keywords related to the fetch phase.master_sitesA list of URLs from which a port's
${distfiles} may be retrieved.Keyword values for master_sites may include
predefined site lists known as mirrors, such as
sourceforge, gnu, etc. If the file(s) declared in
${distfiles} are not successfully fetched after
trying the master_sites values, the MacPorts Project
svn server is always tried last before giving up.For a complete list of mirrors and their list of sites, see
the file mirror_sites.tcl located in
_resources/port1.0/fetch/ in the ports tree.If a master_sites keyword has multiple values,
after any mirrors are expanded the list of sites is sorted by ping
response times. The sites are then tried in sorted order until
matching ${distfiles} are found.Default: none (but the macports_distfiles
mirror is always implicitly appended)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, gnu, and freebsd mirrors are
used.master_sites sourceforge gnu freebsd
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 to a distfiles keyword. 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:tagtwomaster_sites.mirror_subdirSubdirectory to append to all mirror sites for any list
specified in ${master_sites}.Default: ${name}Example:master_sites.mirror_subdir magicpatch_sitesA 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/patchespatch_sites.mirror_subdirSubdirectory to append to all mirror sites for any list
specified in ${patch_sites}.Default: ${name}Example:patch_sites.mirror_subdir magicdistnameThe name of the distribution filename, not including the
extract suffix (see below).Default: ${name}-${version}Example:distname ${name}distfilesThe 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:tagtwodist_subdirCreate a sub-directory in distpath to store all fetched
files.Default: ${name}Example:dist_subdir vim${version}worksrcdirSets the path to source directory relative to workpath. It can
be used if the extracted source directory has a different name then
the distfile. Also used if the source to be built is in a
subdirectory.Default: ${distname}Examples:worksrcdir ${name}-src-${version}worksrcdir ${distname}/srcAdvanced Fetch OptionsSome mirrors require special options for a resource to be properly
fetched.fetch.typeChange the fetch type. This is only necessary if a bzr, cvs, git, hg, or svn checkout is be used.
is used for a normal http or ftp fetch
using ${distfiles} and is used as
default.Default: Values:
Example:fetch.type svn
svn.url svn://example.org
svn.revision 2100fetch.userHTTP or FTP user to fetch the resource.Default: noneExample:TODO: add examplefetch.passwordHTTP or FTP password to fetch the resource.Default: noneExample:TODO: add examplefetch.use_epsvWhether to use EPSV command for FTP transfers.Default: Example:fetch.use_epsv nofetch.ignore_sslcertWhether to ignore the host SSL certificate (for
HTTPS).Default: Example:fetch.ignore_sslcert yesFetch from BZRBzr may be used as
an alternative method of fetching distribution files using the keywords
in this section. However, fetching via bzr may cause non-reproducible
builds, so it is strongly discouraged.The fetch.type
is used to fetch source code from a bzr repository.bzr.urlThis specifies the url from which to fetch files.Default: noneExamples:bzr.url lp:inkscapebzr.url lp:~callelejdfors/pycg/trunkbzr.revisionOptional tag for fetching with bzr, this specifies
the revision to checkoutDefault: -1 (the last committed revision)Example:bzr.revision 2209Fetch from CVSCVS 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.The fetch.type
is used to fetch source code from a CVS repository.cvs.rootSpecify the url from which to fetch files.Default: noneExample:cvs.root :pserver:anonymous@cvs.sv.gnu.org:/sources/emacscvs.passwordPassword to login to the CVS server.Default: noneExample:cvs.password nice-passwordcvs.tagOptional for fetching with CVS, this specifies the code
revision to checkout.Default: noneExample:cvs.tag HEADcvs.dateA date that identifies the CVS code set to checkout.Default: noneExample:cvs.date "12-April-2007"cvs.moduleA CVS module from which to check out the code.Default: noneExample:cvs.module SourcesFetch from GitGit may be used as an
alternative method of fetching distribution files using the keywords in
this section. However, fetching via Git may cause non-reproducible
builds, so it is strongly discouraged.The fetch.type
is used to fetch source code from a git repository.git.urlThis specifies the url from which to fetch files.Default: noneExamples:git.url git://git.kernel.org/pub/scm/git/git.gitgit.url http://www.kernel.org/pub/scm/git/git.gitgit.branchOptional tag for fetching with git, this specifies the tag
or other commit-ish that git should checkout. Note that any tag on
a branch besides HEAD should be prefixed by origin/.Default: noneExample:git.branch 72bf1c8git.branch origin/nextFetch from MercurialMercurial may be
used as an alternative method of fetching distribution files using the
keywords in this section. However, fetching via Mercurial may cause
non-reproducible builds, so it is strongly discouraged.The fetch.type
is used to fetch source code from a Mercurial repository.hg.urlThis specifies the url from which to fetch files.Default: noneExamples:hg.url http://www.kernel.org/hg/index.cgi/linux-2.6/hg.url http://hg.intevation.org/mercurialhg.tagOptional tag which should be fetched. Can be a Mercurial tag
or a revision. To prevent non-reproducible builds use of tip as
revision is discouraged.Default: tipExample:hg.tag v1.3hg.tag ceb884843737Fetch from SubversionSubversion 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.The fetch.type
is used to fetch source code from an svn repository.svn.urlThis specifies the url from which to fetch files.Default: noneExamples:svn.url http://www.example.com/svn-repo/mydirectorysvn.url svn://svn.example.com/svn-repo/mydirectorysvn.revisionOptional tag for fetching with Subversion, this specifies
the peg revision to checkout; it corresponds to the @REV syntax of
the svn cli.Default: noneExample:svn.revision 37192svn.methodOptional tag for fetching with Subversion, this specifies
whether to check out the code into a working copy, or just export
it without the working copy metadata. An export is preferable
because it takes half the disk space, but some software expects
to be built in a working copy (for example because it wants to
record the revision number into itself somewhere).Default: exportExample:svn.method checkoutChecksum Phase KeywordsThe list of keywords related to the checksum phase.checksumsChecksum(s) of the distribution files. For ports with multiple
distribution files, filenames must be included to associate files
with their checksums.At least two checksum types (typically rmd160 and sha256) should be used to
ensure the integrity of the distfiles.Default: noneExamples:checksums rmd160 0c1147242adf476f5e93f4d59b553ee3ea378b23 \
sha256 baf8a29ff721178317aac7b864c2d392b1accc02de8677dd24c18fd5717bf26echecksums ${distname}${extract.suffix} \
rmd160 0c1147242adf476f5e93f4d59b553ee3ea378b23 \
sha256 883715307c31ae2c145db15d2404d89a837f4d03d7e6932aed21d1d1f21dad89 \
hobbit.tar.gz \
rmd160 82b9991f3bf0ceedbf74c188c5fa44b98b5e40c9 \
sha256 2c3afd16915e9f8eac2351673f8b599f5fd2ff9064d4dfe61f750d72bab740b3Extract Phase KeywordsThe list of keywords related to the extract phase.extract.asrootThis keyword is used to specify that the extract
phase should be done as the root user.Default: Example:extract.asroot noextract.suffixThis keyword is used to specify the extract suffix
type.Default: .tar.gzExample:extract.suffix .tgzuse_7zThis keyword is for downloads that are compressed using the
7z algorithm. When invoked, it automatically sets:extract.suffix = .7z
extract.cmd = 7za
Default: Example:use_7z yesuse_bzip2This keyword is for downloads that are tarred and bzipped.
When invoked, it automatically sets:extract.suffix = .tar.bz2
extract.cmd = bzip
Default: Example:use_bzip2 yesuse_lzmaThis keyword is for downloads that are compressed using the
lzma algorithm. When invoked, it automatically sets:extract.suffix = .lzma
extract.cmd = lzma
Default: Example:use_lzma yesuse_zipThis keyword is for downloads that are zipped. When invoked,
it automatically sets:extract.suffix = .zip
extract.cmd = unzip
extract.pre_args = -q
extract.post_args = "-d ${extract.dir}"
Default: Example:use_zip yesuse_xzThis keyword is for downloads that are compressed using the xz tool.
When invoked, it automatically sets:extract.suffix = .tar.xz
extract.cmd = xz
Default: Example:use_xz yesextract.mkdirThis 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: Example:extract.mkdir yesextract.onlyextract.only-appendextract.only-deleteList 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.gzextract.only-append bar.tar.gz
extract.only-delete foo.tar.gzextract.cmdCommand to perform extraction.Default: gzipExample:extract.cmd gunzipextract.argsextract.pre_argsextract.post_argsMain 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:
-dcextract.post_args, defaults to:
"| tar -xf -"Examples:extract.pre_args xf
extract.post_args "| gnutar -x"Patch Phase KeywordsThe list of keywords related to the patch phase.patch.dirSpecify the base path for patch files.Default: ${worksrcpath}Example:patch.dir ${worksrcpath}/utilpatch.cmdSpecify the command to be used for patching files.Default: patchExample:patch.cmd catpatchfilespatchfiles-appendpatchfiles-deleteSpecify patch files to be applied for a port; list modifiers
specify patchfiles to be added or removed from a previous patchfile
declaration.Default: noneExample:patchfiles patch-Makefile.in \
patch-source.cpatchfiles-append patch-configure
patchfiles-delete patch-src-Makefile.inpatch.argspatch.pre_argspatch.post_argsMain arguments to patch.cmd; optional
argument modifiers pass arguments before and after the main
arguments.Default: noneExample:patch.args ???
The following argument modifiers are available:patch.pre_args, defaults to:
-p0patch.post_args, defaults to:
noneExamples:patch.pre_args -p1
patch.post_args ???Configure Phase KeywordsThe 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.use_configureSets if the configure phase should be run. Can be used if the
port has no ./configure script.Default: Example:use_configure noconfigure.cmdconfigure.cmd-appendconfigure.cmd-deleteSelects the command to be run in the default configure phase.Default: ./configureExample:configure.cmd ./config.shconfigure.envconfigure.env-appendconfigure.env-deleteSet 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}/libExample:configure.env QTDIR=${prefix}/lib/qt3configure.env-append ABI=32
configure.env-delete TCLROOT=${prefix}configure.optflagsconfigure.optflags-appendconfigure.optflags-deleteSet optimization compiler flags; list modifiers add or delete items
from a previous Portfile configure.optflags keyword or the default set
by MacPorts base.Default: -O2Example:configure.optflags -Osconfigure.optflags-append -finline-functions
configure.optflags-delete -O2configure.cflagsconfigure.cflags-appendconfigure.cflags-deleteSet CFLAGS compiler flags; list modifiers add or delete items
from a previous Portfile configure.cflags keyword or the default set
by MacPorts base.Default: ${configure.optflags}Example:configure.cflags -Os -flat_namespaceconfigure.cflags-append "-undefined suppress"
configure.cflags-delete -O2configure.ldflagsconfigure.ldflags-appendconfigure.ldflags-deleteSet 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}/libExample:configure.ldflags "-L${worksrcpath}/zlib -lz"configure.ldflags-append "-L/usr/X11R6/lib -L${worksrcpath}/lib"
configure.ldflags-delete -L${prefix}/lib/db44configure.cppflagsconfigure.cppflags-appendconfigure.cppflags-deleteSet 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}/includeExample:configure.cppflags -I${worksrcpath}/includeconfigure.cppflags-append "-I/usr/X11R6/lib -I${worksrcpath}/lib -DHAVE_RRD_12X"
configure.cppflags-delete -I${prefix}/lib/db44configure.cxxflagsconfigure.cxxflags-appendconfigure.cxxflags-deleteSet 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: ${configure.optflags}Example:TODO: add exampleconfigure.objcflagsconfigure.objcflags-appendconfigure.objcflags-deleteTODO: add descriptionDefault: ${configure.optflags}Example:TODO: add exampleconfigure.classpathconfigure.classpath-appendconfigure.classpath-deleteTODO: add descriptionDefault: ???Example:TODO: add exampleconfigure.macosx_deployment_targetconfigure.macosx_deployment_target-appendconfigure.macosx_deployment_target-deleteTODO: add descriptionDefault: ???Example:TODO: add exampleconfigure.fflagsconfigure.fflags-appendconfigure.fflags-deleteSet 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: ${configure.optflags}Example:configure.fflags -Osconfigure.fcflagsconfigure.fcflags-appendconfigure.fcflags-deleteSet 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: ${configure.optflags}Example:configure.fcflags -Osconfigure.f90flagsconfigure.f90flags-appendconfigure.f90flags-deleteSet 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: ${configure.optflags}Example:configure.f90flags -Osconfigure.ccSet CC compiler flags for selecting a C compiler.Default: ???Example:configure.cc ${prefix}/bin/gcc-mp-4.2configure.cppSet CPP compiler flags for selecting a C preprocessor.Default: ???Example:configure.cpp /usr/bin/cpp-3.3configure.cxxSet CXX compiler flags for selecting a C++ compiler.Default: ???Example:configure.cxx /usr/bin/g++-4.0configure.objcSet OBJC compiler flags for selecting an Objective-C
compiler.Default: ???Example:configure.objc /usr/bin/gcc-4.0configure.fcSet FC compiler flags for selecting a Fortran compiler.Default: ???Example:configure.fc ${prefix}/bin/gfortran-mp-4.2configure.f77Set F77 compiler flags for selecting a Fortran 77
compiler.Default: ???Example:configure.f77 ${prefix}/bin/gfortran-mp-4.2configure.f90Set F90 compiler flags for selecting a Fortran 90
compiler.Default: ???Example:configure.f90 ${prefix}/bin/gfortran-mp-4.2configure.javacSet JAVAC compiler flags for selecting a Java compiler.Default: ???Example:configure.javac ${prefix}/bin/jikesconfigure.compilerSelect 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: is available on Mac OS X 10.3 and
10.4 PowerPC, is available on 10.4+,
and are
available on 10.5 and 10.6, and clang is available on 10.6.Only use it if a port really needs a different
compiler.Default: on Mac OS X 10.4 and
10.5Default: with Xcode 3.2 on Mac OS X 10.6Default: with Xcode 4.0 and 4.1 on Mac OS X 10.6 and 10.7Default: with Xcode 4.2 and up on Mac OS X 10.6 and upValues:
Example:configure.compiler macports-gcc-4.5configure.perlSet PERL flag for selecting a Perl interpreter.Default: ???Example:configure.perl ${prefix}/bin/perl5.12configure.pythonSet PYTHON flag for selecting a Python interpreter.Default: ???Example:configure.python ${prefix}/bin/python2.7configure.rubySet RUBY flag for selecting a Ruby interpreter.Default: ???Example:configure.ruby ${prefix}/bin/rubyconfigure.installSet INSTALL flag for selecting an install
tool; used for copying files and creating directories.Default: /usr/bin/installExample:configure.install ${prefix}/bin/ginstallconfigure.awkSet AWK flag for selecting an awk executable.Default: ???Example:configure.awk ${prefix}/bin/gawkconfigure.bisonSet BISON flag for selecting a bison executable, a parser
generator.Default: ???Example:configure.bison /usr/bin/bisonconfigure.pkg_configSet PKG_CONFIG flag for helping find pkg_config, a tool for
retrieving information about installed libraries.Default: ???Example:configure.pkg_config ${prefix}/bin/pkg-configconfigure.pkg_config_pathSet PKG_CONFIG_PATH flag for telling pkg_config where to
search for information about installed libraries.Default: ${prefix}/lib/pkgconfig:${prefix}/share/pkgconfigExample:configure.pkg_config_path ${python.prefix}/lib/pkgconfigconfigure.argsconfigure.pre_argsconfigure.post_argsMain arguments to configure.cmd; optional
argument modifiers pass arguments before and after the main
arguments.Default: noneExample:configure.args --bindir=${prefix}/bin
The following argument modifiers are available:configure.pre_args, defaults to:
--prefix=${prefix}configure.post_args, defaults to:
noneExamples:configure.pre_args --prefix=${prefix}/share/bro
configure.post_args OPT="-D__DARWIN_UNIX03"Configure UniversalUniversal keywords are used to make a port compile on OS X for
multiple architectures.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.configure.universal_argsArguments used in the configure script to build the port
universal.Default:
--disable-dependency-trackingExample:TODO: add exampleconfigure.universal_cflagsAdditional flags to put in the CFLAGS environment variable
when invoking the configure script. Default value is based on
${configure.universal_archs}.Default: (PowerPC Tiger) -isysroot ${developer_dir}/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc(Intel Tiger / Leopard) -arch i386 -arch ppc(Snow Leopard and later) -arch x86_64 -arch i386Example:TODO: add exampleconfigure.universal_cppflagsAdditional flags to put in the CPPFLAGS environment variable
when invoking the configure script.Default: (PowerPC Tiger) -isysroot ${developer_dir}/SDKs/MacOSX10.4u.sdk(others) noneExample:TODO: add exampleconfigure.universal_cxxflagsAdditional flags to put in the CXXFLAGS environment variable
when invoking the configure script. Default value is based on
${configure.universal_archs}.Default: (PowerPC Tiger) -isysroot ${developer_dir}/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc(Intel Tiger / Leopard) -arch i386 -arch ppc(Snow Leopard and later) -arch x86_64 -arch i386Example:TODO: add exampleconfigure.universal_ldflagsAdditional flags to put in the LDFLAGS environment variable
when invoking the configure script.Default: (PowerPC Tiger) -Wl,-syslibroot,${developer_dir}/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc(Intel Tiger / Leopard) -arch i386 -arch ppc(Snow Leopard and later) -arch x86_64 -arch i386Example:TODO: add exampleAutomake, Autoconf, and AutoreconfThe list of configure keywords available for ports that need
automake and/or autoconf.use_autoreconfWhether or not to use autoreconfDefault: Example:use_autoreconf yesuse_automakeWhether or not to use automake.Default: Example:use_automake yesautomake.envEnvironment variables to pass to automake.Default: ???Example:automake.env CFLAGS=-I${prefix}/includeautomake.argsArguments to pass to automake.Default: ???Example:automake.args --foreignautomake.dirDirectory in which to run
${automake.cmd}.Default: ${worksrcpath}Example:automake.dir ./srcuse_autoconfWhether or not to use autoconf.Default: Example:use_autoconf yesautoconf.envEnvironmental variables to pass to autoconf.Default: ???Example:autoconf.env CFLAGS=-I${prefix}/include/gtk12autoconf.argsArguments to pass to autoconf.Default: ???Example:autoconf.args "-l src/aclocaldir"autoconf.dirDirectory in which to run
${autoconf.cmd}.Default: ${worksrcpath}Example:autoconf.dir srcBuild Phase KeywordsThe list of keywords related to the build phase.build.cmdMake command to run in ${worksrcdir}. Only
use it if you can't use build.type.Default: makeExample:build.cmd sconsbuild.type
Defines which build software is required and sets
${build.cmd} accordingly. The available
options are BSD Make, GNU Make, and Xcode.
Default: (the default Make on
the current platform)
Values:
Example:build.type bsdbuild.argsbuild.pre_argsbuild.post_argsMain arguments to ${build.cmd}; optional
argument modifiers pass arguments before and after the main
arguments.Default: noneExample:build.args -DNOWARN
The following argument modifiers are available:build.pre_args, defaults to:
${build.target}build.post_args, defaults to:
noneExamples:build.pre_args -project AudioSlicer.xcode
build.post_args CFLAGS_SYS="-DUSE_FREETYPE -DPREFER_FREETYPE"build.targetbuild.target-appendbuild.target-deleteBuild 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: allExample:build.target all-srcbuild.target-append doc extra
build.target-delete compatbuild.envbuild.env-appendbuild.env-deleteSet environment variables for build; list modifiers add
and delete items from a previous Portfile build.env keyword, or
a default set by MacPorts base.Default: noneuse_parallel_buildThis 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 not set to
no in a given port, the option
is passed to ${build.cmd} (if
${build.cmd} is make or
scons).Default: Example:use_parallel_build nobuild.jobsThe number of simultaneous jobs to run when parallel build is
enabled. The default value is based on the variable
buildmakejobs in
macports.conf.Default: If buildmakejobs is 0, the
number of CPU cores in the machine, or the number of GB of
physical memory plus one, whichever is less. Otherwise,
the actual value of ${buildmakejobs}.Test Phase KeywordsThe list of keywords related to the test phase.test.runEnable running test suites bundled with a port.Default: Example:test.run yestest.cmdTest command to run relative to
${worksrcdir}.Default: ${build.cmd}Example:test.cmd checks.shtest.targetTest target to pass to ${test.cmd}.Default: testExample:test.target checkstest.argstest.pre_argstest.post_argsMain arguments to test.cmd; optional
argument modifiers pass arguments before and after the main
arguments.Default: noneExample:test.args -f Makefile.testThe following argument modifiers are available:test.pre_args, defaults to:
${test.target}test.post_args, defaults to:
nonetest.envtest.env-appendtest.env-deleteSet environment variables for test; list modifiers add
and delete items from a previous Portfile test.env keyword, or
a default set by MacPorts base.Often DYLD_LIBRARY_PATH is set here to
support testing dynamically linked libraries.Default: noneExample:test.env DYLD_LIBRARY_PATH=${worksrcpath}/src/.libsDestroot Phase KeywordsThe list of keywords related to the destroot phase.destroot.cmdInstall command to run relative to
${worksrcdir}.Default: ${build.cmd}Example:destroot.cmd sconsdestroot.argsdestroot.pre_argsdestroot.post_argsMain arguments to ${destroot.cmd}; optional
argument modifiers pass arguments before and after the main
arguments.Default: noneExample:destroot.args BINDIR=${prefix}/bin
The following argument modifiers are available:destroot.pre_args, defaults to:
${destroot.target}destroot.post_args, defaults to:
${destroot.destdir}Examples:destroot.pre_args -project AudioSlicer.xcode
destroot.post_args INSTDIR=${destroot}${prefix}destroot.targetdestroot.target-appenddestroot.target-deleteInstall 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: installExample:destroot.target install install-config install-commandmodedestroot.target-append install-plugins
destroot.target-delete install-commandmodedestroot.destdirArguments passed to ${destroot.cmd} via
${destroot.post_args} 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.destroot.umaskUmask to use during destroot.Default: 022Example:destroot.umask 002destroot.keepdirsA 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/mrtgdestroot.violate_mtreeMacPorts tests for compliance to the common directory
structure in ${prefix}. If a port is not
compliant with the standard, set it to .You can find the macports standard in MacPorts File Hierarchy or in
the porthier(7) man page.If destroot.violate_mtree is set to
, 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
portname to see the location
for all files that were installed by a given port.Default: Example:destroot.violate_mtree yes