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 at compile time and displayed in
${prefix}/etc/macports/macports.conf
—- may be
overridden on a per-port basis, for example to install into a
wholly-contained subdirectory of ${prefix}, but most ports should
have no reason to do so.
Default: /opt/local
Path to the MacPorts Tcl libraries.
Full path to the Portfile of the port being executed. Portfile repositories are defined in the file sources.conf.
Default:
${prefix}/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/
<category>
/<portname>/
Path to files directory relative to
${portpath}
.
Value: files
Full path to files directory.
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:
${portdbpath}/distfiles/${dist_subdir}
The Unix user at the time of port installation.
The Unix group at the time of port installation.
The underlying operating system platform (e.g., “darwin” on macOS, “freebsd”, etc.).
The hardware architecture -- either “powerpc”, “i386”, or “arm”.
The version number of the host operating system (e.g., “12.3.0” for Darwin 12.3.0 a.k.a. OS X 10.8.3).
Endianness of the processor -- either “big” (on PowerPC systems) or “little” (on Intel and Apple Silicon systems).
The major version number of the host operating system (e.g., “12” for Darwin 12.x).
The full macOS version number of the host operating system, if applicable (e.g., “10.15.7”).
The major macOS version number of the host operating system, if applicable (e.g., “12” for Monterey or “10.15” for Catalina).
The installed version of Xcode, if any (e.g., “14.0.1”).
(Added: MacPorts 2.8) The installed version of the Command Line Tools for Xcode, if any (e.g., “14.0.0.0.1.1661618636”).
Boolean value indicating whether it is possible to build universal binaries given the configured SDK and universal_archs and the port's supported_archs.