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.binpathThe 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.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 Mac OS X, "freebsd", etc.).os.archThe hardware architecture -- either "powerpc" or "i386".os.versionThe version number of the host operating system (i.e. "8.11.0" for
Darwin 8.11.0 a.k.a. Mac OS X 10.4.11).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. "8"
for Darwin 8.x).