Global VariablesGlobal 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!prefixInstallation 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/locallibpathPath to the MacPorts TCL libraries.portpathFull 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/release/ports/<category>/<portname>/filesdirPath to files directory relative to
${portpath}.Value: filesfilespathFull path to files directory.Value: ${portpath}/${filesdir}workpathFull path to work directory.Value: ${portbuildpath}/workworksrcpathFull path to extracted source code.Value: ${workpath}/${worksrcdir}destrootFull path into which software will be destrooted.Value: ${workpath}/destrootdistpathLocation to store downloaded distfiles.Value:
${sysportpath}/distfiles/${dist_subdir}/install.userThe Unix user at the time of port installation.install.groupThe Unix group at the time of port installation.os.platformThe underlying operating system platform (i.e.
darwin on OS X, freebsd,
etc.).os.archThe hardware architecture -- either powerpc or
i386.os.versionThe version number of the host operating system (i.e.
12.3.0 for Darwin 12.3.0 a.k.a. OS X 10.8.3).os.endianEndianness of the processor -- either big (on
PowerPC systems) or little (on Intel systems).os.majorThe major version number of the host operating system (i.e.
12 for Darwin 12.x).