port - build darwin ports
- port [-vdqfonausbck] [-D portdir] target [portname] [options ...]
- [variants ...]
port provides file
port is designed to read and execute the build instructions of a darwin port. If no portdir or portname is specified, the current working direc- tory is assumed. If no target is specified, the usage is displayed. Port options are specified as key=value pairs and take precedence over individual port options and system-wide settings.
Port variants are specified as +name, which indicates the variant is desired, and -name, which indicates the variant is not desired. In case of ambiguities, a port can be fully specified with the format version_revision+variants
Installed ports can be activated or deactivated without being unin- stalled. A port can be installed if another version/variant is installed but deactivated.
The provides command determines which port owns a given file.
-v verbose mode (generate verbose messages) -d debug mode (generate debugging messages, implies -v) -q quiet mode (suppress messages) -c autoclean mode (execute clean after install) -k keep mode (don’t autoclean after install) -n dont follow dependencies in upgrade (only for upgrading) -a upgrade all installed ports (only for upgrading) -u uninstall non-active ports when upgrading and uninstalling -D specify portdir -f force mode (ignore state file) -o honor state files older than Portfile -s source-only mode (only build and install from source, ignores all binary archives, does not create/recreate binary archives) (only applies when archive mode is enabled) -b binary-only mode (only build and install from binary archives, ignores source, fails when no archive present, and does not create/recreate binary archives from source) (only applies when archive mode is enabled)
port knows several targets. the ones commonly used by users of darwin- ports are:
deactivate and uninstall portname. to uninstall all installed but inactive ports, specify -u. for example:
port uninstall vim
port -u uninstall
upgrade the installed portname. to upgrade all ports, specify -a. for example:
port upgrade vim
port -a upgrade
to upgrade portname wihtout following its dependencies, specify -n. for example:
port -n upgrade ethereal
updates the darwinports system, both the dports tree and if needed the base tools, installing the newest infrastructure if available. to update you would typically do:
sudo port -d selfupdate
performs a sync operation only on the dports tree of a darwinports installation, pulling in the latest revision available of the portfiles. to update you would do:
sudo port -d sync
clean the files used for building portname. to just remove the work files, specify –work. to remove the distribution files (tarballs, etc), specify –dist. to remove the archive(s) for the current version of a port, specify –archive. to remove the work files, distribution files and archives, specify –all. for example:
port clean --dist vim
port clean --archive vim
to remove only certain version(s) of a port’s archives ( version is any valid unix glob pattern), you can use:
port clean --archive vim 6.2.114
or:
port clean --archive vim '6.*'
search for an available port whose name matches a regular expression.
port search vim
The targets that are often used by Port developers are intended to provide access to the different phases of a Port’s build process:
There are also targets for producing installable packages of ports:
The following demonstrates invoking port with the “extract” target on portdir “textproc/figlet” and extract.suffix set to ”.tgz”:
port extract -D textproc/figlet extract.suffix=.tgz
The port utility exits 0 on success, and >0 if an error occurs.
Landon Fuller <landonf@opendarwin.org> Kevin Van Vechten <kevin@opendarwin.org> Jordan K. Hubbard <jkh@opendarwin.org> Ole Guldberg Jensen <olegb@opendarwin.org> Robert Shaw <rshaw@opendarwin.org> Chris Ridd <cjr@opendarwin.org>
BSD August 24, 2002