.\" port.1 .\" .\" Copyright (c) 2002 Apple Computer, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of Apple Computer, Inc. nor the names of its .\" contributors may be used to endorse or promote products derived from .\" this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 24, 2002 .Dt PORT 1 "Apple Computer, Inc." .Os .Sh NAME .Nm port .Nd build darwin ports .Sh SYNOPSIS .Nm .Op Fl vdqfonausbck .Op Fl D Ar portdir .Ar target .Op Ar portname .Op Ar options ... .Op Ar variants ... .Nm .Ic provides .Ar file .Sh DESCRIPTION .Nm is designed to read and execute the build instructions of a darwin port. If no .Ar portdir or .Ar portname is specified, the current working directory is assumed. If no .Ar target is specified, the usage is displayed. Port .Ar options are specified as key=value pairs and take precedence over individual port options and system-wide settings. Port .Ar 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 .Ar version_revision+variants .Sh OPTIONS .Bl -tag -width -indent .It Fl v verbose mode (generate verbose messages) .It Fl d debug mode (generate debugging messages; implies .Fl v ) .It Fl q quiet mode (suppress messages) .It Fl c autoclean mode (execute clean after install) .It Fl k keep mode (don't autoclean after install) .It Fl n dont follow dependencies in upgrade (only for upgrading) .It Fl a upgrade all installed ports (only for upgrading) .It Fl u uninstall non-active ports when upgrading and uninstalling .It Fl D specify .Ar portdir .It Fl f force mode (ignore state file) .It Fl o honor state files older than Portfile .It Fl 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) .It Fl 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) .El .Sh TARGETS .Nm knows several targets. The most important is the "install" target, which installs the supplied port to its final destination on the system. .Pp The other targets are: .Pp .Dl uninstall .Dl deactivate .Dl activate .Dl installed .Dl outdated .Dl upgrade .Dl clean .Dl search .Dl list .Dl contents .Dl deps .Dl variants .Dl info .Pp Besides the main targets .Nm takes each single stage of the port building process as a possible target. These stages (besides "install") are: .Pp .Dl fetch .Dl extract .Dl patch .Dl configure .Dl build .Dl destroot .Dl test .Pp There are also targets for packaging ports: .Pp .Dl pkg .Dl mpkg .Dl dmg .Dl rpmpackage .Pp If enabled, binary archives can be created/used to allow installation from pre-built binaries rather than source: .Pp .Dl unarchive .Dl archive .Pp When archive mode is enabled, the .Ar unarchive command is called automatically, prior to .Ar fetch , to check for an existing binary archive to unpack. If found, it is unpacked and all stages up to .Ar install are then skipped. In addition, binary archives will be created automatically whenever an .Ar install is performed, or when the .Ar archive target is called explicitly. .Pp Additionally, the .Ic provides command determines which port owns a given file. .Sh EXAMPLES Invoking .Nm with the "install" target on the "vim" port: .Pp .Dl "port install vim .Pp To manually create a binary archive, use the "archive" target (also done automatically prior to "install"): .Pp .Dl "port archive vim" .Pp To uninstall a port, invoke .Nm with the "uninstall" target: .Pp .Dl "port uninstall vim .Pp To uninstall all ports that are not activated .Pp .Dl "port -u uninstall" .Pp To clean up working directory after the port was built: .Pp .Dl "port clean vim .Pp or: .Pp .Dl "port clean --work vim .Pp To remove a port's distfiles: .Pp .Dl "port clean --dist vim .Pp To remove a port's archives (any variant of current port version): .Pp .Dl "port clean --archive vim .Pp To remove certain version(s) of a port's archives (version is any valid UNIX glob pattern): .Pp .Dl "port clean --archive vim 6.2.114 .Pp or: .Pp .Dl "port clean --archive vim '6.*' .Pp To remove a port's distfiles, archives, and working directory: .Pp .Dl "port clean --all vim .Pp To deactivate a port (in image mode): .Pp .Dl "port deactivate vim .Pp To list out of date ports: .Pp .Dl "port outdated" .Pp To upgrade a port (deactivating the older version and activating a newer) .Pp .Dl "port upgrade vim .Pp To upgrade all installed ports .Pp .Dl "port -a upgrade .Pp To reactivate a port previously deactivated (in image mode): .Pp .Dl "port activate vim .Pp A port can be installed if another version/variant is installed but deactivated. To reactivate one of the installed version of a port previously deactivated (in image mode): .Pp .Dl "port activate vim 6.2.532_0+aqua .Pp To build and "install" vim into an intermediate destination root (or "destroot") .Pp .Dl "port destroot vim" .Pp This can be useful during development of a new port, for testing, or for creating an "installation" of a port which can be subsequently packaged or copied elsewhere without having to modify the host system. .Pp Using .Nm to list all available ports: .Pp .Dl "port search .+ .Pp or: .Pp .Dl "port list .Pp To look for a specific port, supply a search string: .Pp .Dl "port search vim .Pp To list the files (table of contents) installed by a given port (in this case apr): .Pp .Dl "port contents apr" .Pp To list a port's dependencies: .Pp .Dl "port deps exim" .Pp To list installed ports: .Pp .Dl "port installed" .Pp To list a port's variants: .Pp .Dl "port variants php" .Pp To view all of a port's metadata: .Pp .Dl "port info vim" .Pp The following demonstrates invoking .Nm with the "extract" target on portdir "textproc/figlet" and extract.suffix set to ".tgz": .Pp .Dl "port extract -d textproc/figlet extract.suffix=.tgz" .Pp To package a port as an OS X package, use the "pkg" target: .Pp .Dl "port pkg gimp" .Pp or use .Nm with the 'dmg' target to create an internet-enabled disk image containing an OS X package: .Pp .Dl "port dmg gimp" .Pp To build an RPM from a port, use the "rpmpackage" target instead: .Pp .Dl "port rpmpackage gimp" .Pp .Sh DIAGNOSTICS .Ex -std .Sh AUTHORS .An Landon Fuller Aq landonf@opendarwin.org .An Kevin Van Vechten Aq kevin@opendarwin.org .An Jordan K. Hubbard Aq jkh@opendarwin.org .An Ole Guldberg Jensen Aq olegb@opendarwin.org .An Robert Shaw Aq rshaw@opendarwin.org