PORT-DIR(1)

NAME
port-dir, port-url, port-file, port-location, port-work - Print paths for certain properties of a port

SYNOPSIS

port [-D portdir] dir
     [[portname | pseudo-portname | port-expressions | port-url]]

port [-D portdir] url
     [[portname | pseudo-portname | port-expressions | port-url]]

port [-D portdir] file
     [[portname | pseudo-portname | port-expressions | port-url]]

port [-q] [-D portdir] location
     [[portname | pseudo-portname | port-expressions | port-url]]

port [-D portdir] work
     [[portname | pseudo-portname | port-expressions | port-url]]

DESCRIPTION

These commands print a path for each given port. The meaning of the path differs by the command given:

port dir prints the directory that contains the Portfile for the given port expression. This can be quite handy in your shell, if you want to locate a Portfile:

    cd $(port dir <portname>)

port url prints a unique URL for the given port expression. This command mostly exists for historical reasons and isn’t of much use nowadays.

port file prints the path of the Portfile for the given port expression. This can be useful to locate a port’s definition. Note that you can always get this by using port dir and appending Portfile. You could use port file in a shell to edit a Portfile, but note that you can also use port-edit(1) to achieve the same.

port location only works for installed ports and prints the location of the archive MacPorts internally uses to be able to deactivate and activate a port. See port-activate(1) for more details on that. This command might be useful for you if you want to setup a local binary mirror of MacPorts packages that are not available from our official infrastructure due to licensing reasons.

port work prints the path to the so-called work directory, i.e., the directory used by MacPorts to build a port. No output is generated if no build directory exists, e.g., because there is no unfinished build in progress for the given port. Work directories are deleted after successful installation or using port-clean(1).

GLOBAL OPTIONS

Please see the section GLOBAL OPTIONS in the port(1) man page for a description of global port options.

SEE ALSO

port(1), port-edit(1), port-activate(1), port-clean(1)

AUTHORS

    (C) 2014 The MacPorts Project
    Clemens Lang <cal@macports.org>