Changeset View
Changeset View
Standalone View
Standalone View
share/man/man7/ports.7
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
.Pp | .Pp | ||||
The ports tree, typically located at | The ports tree, typically located at | ||||
.Pa /usr/ports , | .Pa /usr/ports , | ||||
consists of subdirectories, one for each category; those in turn contain | consists of subdirectories, one for each category; those in turn contain | ||||
individual ports. | individual ports. | ||||
Each port is a directory with metadata and patches necessary to make | Each port is a directory with metadata and patches necessary to make | ||||
the original application source code compile and run on | the original application source code compile and run on | ||||
.Fx . | .Fx . | ||||
Compiling an | Compiling an application is as simple as typing | ||||
application is as simple as typing | .Dq Li "make build" | ||||
.Nm make Cm build | |||||
in the port directory. | in the port directory. | ||||
The | The | ||||
.Pa Makefile | .Pa Makefile | ||||
automatically fetches the | automatically fetches the | ||||
application source code, either from a local disk or the network, unpacks it, | application source code, either from a local disk or the network, unpacks it, | ||||
applies the patches, and compiles it. | applies the patches, and compiles it. | ||||
It also recursively handles dependencies \(em other pieces of software | It also recursively handles dependencies \(em other pieces of software | ||||
the port depends on in order to build and work. | the port depends on in order to build and work. | ||||
Afterwards, | Afterwards, | ||||
.Nm make Cm install | .Dq Li "make install" | ||||
installs the application. | installs the application. | ||||
.Pp | .Pp | ||||
For more information about using ports, see the | For more information about using ports, see the | ||||
.Dq "Packages and Ports" section | .Dq "Packages and Ports" section | ||||
in | in | ||||
.%B "The FreeBSD Handbook": | .Sm off | ||||
.%B "The FreeBSD Handbook" | |||||
.No \&: | |||||
.Sm on | |||||
.Pp | .Pp | ||||
.Lk https://www.FreeBSD.org/doc/en/books/handbook/ports.html | .Lk https://www.FreeBSD.org/doc/en/books/handbook/ports.html | ||||
.Pp | .Pp | ||||
For information about creating new ports, see | For information about creating new ports, see | ||||
.%B "The Porter's Handbook": | .Sm off | ||||
.%B "The Porter's Handbook" | |||||
.No \&: | |||||
.Sm on | |||||
.Pp | .Pp | ||||
.Lk https://www.FreeBSD.org/doc/en/books/porters-handbook/ | .Lk https://www.FreeBSD.org/doc/en/books/porters-handbook/ | ||||
.Sh TARGETS | .Sh TARGETS | ||||
Some of the | Some of the | ||||
.Xr make 1 | .Xr make 1 | ||||
targets work recursively through subdirectories. | targets work recursively through subdirectories. | ||||
This lets you, for example, install all of the | This lets you, for example, install all of the | ||||
.Dq Li biology | .Dq Li biology | ||||
ports. | ports with one command. | ||||
The targets that do this are | The targets that do this are | ||||
.Cm build , checksum , clean , configure , | .Cm build , checksum , clean , configure , | ||||
.Cm depends , extract , fetch , install , | .Cm depends , extract , fetch , install , | ||||
and | and | ||||
.Cm package . | .Cm package . | ||||
.Pp | .Pp | ||||
The following targets will be run automatically by each proceeding | The following targets will be run automatically by each proceeding | ||||
target in order. | target in order. | ||||
That is, | That is, | ||||
.Cm build | .Cm build | ||||
will be run | will be run (if necessary) by | ||||
(if necessary) | |||||
by | |||||
.Cm install , | .Cm install , | ||||
and so on all the way to | and so on all the way to | ||||
.Cm fetch . | .Cm fetch . | ||||
Usually, you will only use the | Usually, you will only use the | ||||
.Cm install | .Cm install | ||||
target. | target. | ||||
.Bl -tag -width ".Cm configure" | .Bl -tag -width ".Cm configure" | ||||
.It Cm config | .It Cm config | ||||
▲ Show 20 Lines • Show All 336 Lines • ▼ Show 20 Lines | |||||
.Pa https://www.FreeBSD.org/ports/ . | .Pa https://www.FreeBSD.org/ports/ . | ||||
.It Va FETCHINDEX | .It Va FETCHINDEX | ||||
Command to get | Command to get | ||||
.Pa INDEX | .Pa INDEX | ||||
(for | (for | ||||
.Cm fetchindex | .Cm fetchindex | ||||
target). | target). | ||||
Defaults to | Defaults to | ||||
.Dq Nm fetch Fl am . | .Dq Li "fetch -am" . | ||||
.It Va NOCLEANDEPENDS | .It Va NOCLEANDEPENDS | ||||
If defined, do not let | If defined, do not let | ||||
.Cm clean | .Cm clean | ||||
recurse to dependencies. | recurse to dependencies. | ||||
.It Va FETCH_CMD | .It Va FETCH_CMD | ||||
Command to use to fetch files. | Command to use to fetch files. | ||||
Normally | Normally | ||||
.Xr fetch 1 . | .Xr fetch 1 . | ||||
.It Va FORCE_PKG_REGISTER | .It Va FORCE_PKG_REGISTER | ||||
If set, overwrite any existing package registration on the system. | If set, overwrite any existing package registration on the system. | ||||
.It Va MOTIFLIB | .It Va MOTIFLIB | ||||
Location of | Location of | ||||
.Pa libXm. Ns Brq Pa a , Ns Pa so . | .Pa "libXm\&." Ns Brq Pa a , Ns Pa so . | ||||
.It Va INTERACTIVE | .It Va INTERACTIVE | ||||
If defined, only operate on a port if it requires interaction. | If defined, only operate on a port if it requires interaction. | ||||
.It Va BATCH | .It Va BATCH | ||||
If defined, only operate on a port if it can be installed 100% automatically. | If defined, only operate on a port if it can be installed 100% automatically. | ||||
.It Va DISABLE_VULNERABILITIES | .It Va DISABLE_VULNERABILITIES | ||||
If defined, disable check for security vulnerabilities using | If defined, disable check for security vulnerabilities using | ||||
.Xr pkg-audit 8 | .Xr pkg-audit 8 | ||||
when installing new ports. | when installing new ports. | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
.It Va WITH_GHOSTSCRIPT_VER | .It Va WITH_GHOSTSCRIPT_VER | ||||
If set, the version of ghostscript to be used by ports. | If set, the version of ghostscript to be used by ports. | ||||
.It Va WITH_CCACHE_BUILD | .It Va WITH_CCACHE_BUILD | ||||
.Pq Vt bool | .Pq Vt bool | ||||
If set, enables the use of | If set, enables the use of | ||||
.Xr ccache 1 | .Xr ccache 1 | ||||
for building ports. | for building ports. | ||||
.It Va CCACHE_DIR | .It Va CCACHE_DIR | ||||
Which directory to use for the ccache data. | Which directory to use for the | ||||
.Xr ccache 1 | |||||
data. | |||||
.El | .El | ||||
.Sh FILES | .Sh FILES | ||||
.Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact | .Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact | ||||
.It Pa /usr/ports | .It Pa /usr/ports | ||||
The default ports directory | The default ports directory. | ||||
.It Pa /usr/ports/Mk/bsd.port.mk | .It Pa /usr/ports/Mk/bsd.port.mk | ||||
The big Kahuna. | The big Kahuna. | ||||
.El | .El | ||||
.Sh EXAMPLES | .Sh EXAMPLES | ||||
Build and install Emacs: | Build and install Emacs: | ||||
.Bd -literal -offset indent | .Bd -literal -offset indent | ||||
cd /usr/ports/editors/emacs | cd /usr/ports/editors/emacs | ||||
make install | make install | ||||
.Ed | .Ed | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr make 1 , | .Xr make 1 , | ||||
.Xr make.conf 5 , | .Xr make.conf 5 , | ||||
.Xr pkg 8 , | .Xr pkg 7 , | ||||
.Xr portsnap 8 | .Xr portsnap 8 | ||||
.Pp | .Pp | ||||
The following are part of the ports collection: | Additional developer documentation: | ||||
.Pp | .Bl -dash -width "" -offset indent | ||||
.Xr pkg 7 , | .It | ||||
.Xr portlint 1 | .Xr portlint 1 | ||||
.Rs | .It | ||||
.%B "The FreeBSD Handbook" | .Pa /usr/ports/Mk/bsd.port.mk | ||||
.Re | .El | ||||
.Pp | .Pp | ||||
.Pa https://www.FreeBSD.org/ports | Additional user documentation: | ||||
(searchable index of all ports) | .Bl -dash -width "" -offset indent | ||||
.It | |||||
.Xr pkg 8 | |||||
.It | |||||
.Lk "https://www.FreeBSD.org/ports" "Searchable index of all ports" | |||||
.El | |||||
.Sh HISTORY | .Sh HISTORY | ||||
The Ports Collection | The Ports Collection | ||||
appeared in | appeared in | ||||
.Fx 1.0 . | .Fx 1.0 . | ||||
It has since spread to | It has since spread to | ||||
.Nx | .Nx | ||||
and | and | ||||
.Ox . | .Ox . | ||||
Show All 14 Lines |