Configuration FilesThe MacPorts configuration files often 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. Some automatically configured options may need to be
updated when migrating to a new CPU architecture or a new OS version.There are three MacPorts configuration files that define important
variables used by the MacPorts system: macports.conf,
sources.conf, and variants.conf.
All MacPorts configurations files are located in
${prefix}/etc/macports.MacPorts configuration file format is a simple key/value pair
separated by either a space or a tab. Lines beginning with '#' are comments,
empty lines are ignored.macports.confmacports.conf is the configuration file used to bootstrap the
MacPorts system. This file is read by the port command and determines how
it behaves.Options locating other .conf files.sources_confWhere to find the sources list.Default:
${prefix}/etc/macports/sources.confvariants_confWhere to find global variants definition file
(optional).Default:
${prefix}/etc/macports/variants.confOptions for MacPorts general operating characteristics.prefixSets the directory where ports are installed. Any path may be
used but those with spaces and/or non-ASCII characters should be
avoided because it can break some ports.Default: /opt/localportdbpathDirectory where MacPorts keeps working data as downloaded
sources, installed port receipts, and the main registry. Same path
restrictions apply as for '${prefix}'.Default: ${prefix}/var/macportsportdbformatFormerly selected the storage type to use for the MacPorts registry: flat or sqlite.
Currently, only sqlite can be used.Default: build_archThe machine architecture to build for in normal use.
Options include: ppc, i386, ppc64, x86_64Default: (Snow Leopard and later) or depending on hardware(Leopard/Tiger) or depending on hardwareapplications_dirDirectory to install MacPorts that install OS X .app
bundles.Default: /Applications/MacPortsframeworks_dirDirectory to install frameworks installed by ports.Default:
${prefix}/Library/Frameworksdeveloper_dirDirectory where Xcode is installed.Default:
/DeveloperbuildfromsourceControls whether ports are built from source or downloaded as pre-built
archives. Setting to 'always' will never use archives, 'never' will always try
to use an archive and fail if one is not available. 'ifneeded' will try to fetch
an archive and fall back to building from source if that isn't possible.Default: portarchivetypeFormat of archives in which to store port images. This controls both the
type of archive created locally after building from source, and the type to
request from remote servers. Changing this will not affect the usability of
already installed archives; they can be of any supported type. Supported types
are: tgz, tar, tbz, tbz2, tlz, txz, xar, zip, cpgz, cpioDefault: tbz2configureccacheUse ccache (C/C++ compiler cache) - see
http://ccache.samba.org/Default: configuredistccUse distcc (distributed compiler) - see
http://distcc.samba.org/Default: configurepipeUse pipes rather than intermediate files when compiling
C/C++/etcDefault: buildnicevalueLowered scheduling priority (0-20) to use for make when
building ports.Default: 0buildmakejobsNumber of simultaneous make jobs (commands) to use when
building ports. Using 0 will cause a runtime
autodetection to use all available processor cores.Default: 0portautocleanSet whether to automatically execute clean after
install of ports.Default: rsync_serverRsync server from which to fetch MacPorts sources.Default: rsync.macports.orgrsync_dirRsync directory from which to pull the base/ component
(infrastructure) of MacPorts.Default: release/tarballs/base.tarrsync_optionsRsync optionsDefault: -rtzv --delete-afterdestroot_umaskUmask value to use during the destrooting or a port.Default: 022binpathSets env(PATH), the directory search path for locating system executables
(rsync, tar, etc.) during port installation. Only applications in
these directories are available while ports are being installed even
if other paths are specified by $PATH in a user's
environment.Default:
${prefix}/bin:${prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbinThe binpath is implicitly defined, but it may be overwritten
by defining the variable in macports.conf. However, using a
non-default binpath is discouraged and should only be performed by
advanced users.host_blacklistSpace separated list of download hosts that should not be used.Default: noneThis feature is especially useful if a host turns out to be consistently
slow and therefore should be excluded for MacPorts' actions.preferred_hostsSpace separated list of download hosts that should be used preferentially.Default: nonerevupgrade_autorunControls whether the rev-upgrade action will be run automatically after
upgrading ports.Default: yesrevupgrade_modeControls the rev-upgrade functionality which checks for broken linking and
can rebuild ports to fix it. 'rebuild' means ports will automatically be rebuilt
when broken linking is detected in their files, while 'report' means broken
files will be scanned for and reported but the ports will not be rebuilt.Default: rebuildOptions for MacPorts Universal Binaries (+universal variant)universal_archsThe machine architectures to use for +universal variant
(multiple entries must be space delimited). Options include: ppc,
i386, ppc64, x86_64Default: ( for 10.5 and earlier)Options for StartupItemsstartupitem_typeOptions for generated startup items, though this may be
overridden by the startupitem.type Portfile key. Options
are default option, SystemStarter,
launchd, or none. For an empty or
default option, a startupitem type appropriate to the
platform is used; if none, no port startupitems are
installed.Default: Other optionsextra_envExtra environment variables to keep. Any variables listed here
are added to the list of variables that are not removed from the
environment used while processing ports.Default: noneplace_worksymlinkSet whether to place a symlink named work from your ports tree to
the build directory of a port, when the port is being built. This
is convenient, but may not be ideal if you care about the structure
of your ports tree. For example, some developers keep their ports
tree synchronized across multiple computers, and don't want to also
synch build directories.
Default: yessources.confThis file enables rsync synchronization of the default ports tree
with the MacPorts rsync server when either of the commands port
selfupdate or port sync are run.Default:
rsync://rsync.macports.org/release/tarballs/ports.tar [default]Optional local repositories are enabled using a file url:
file:///path/to/localportsrepositoryvariants.confThis optional file specifies any variants you'd like to be invoked
globally. If a variant specified ib this file is not supported by a given
Portfile, the variant is simply ignored.Default: none