1997-11-09 06:05:45 +00:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 1997 David E. O'Brien
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``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 DEVELOPERS 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.
|
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1997-11-09 06:05:45 +00:00
|
|
|
.\"
|
2021-07-22 08:49:45 +00:00
|
|
|
.Dd July 22, 2021
|
1997-11-09 06:05:45 +00:00
|
|
|
.Dt PORTS 7
|
2001-07-10 15:31:11 +00:00
|
|
|
.Os
|
1997-11-09 06:05:45 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ports
|
|
|
|
.Nd contributed applications
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2000-11-14 11:20:58 +00:00
|
|
|
.Fx
|
2002-03-18 10:07:22 +00:00
|
|
|
Ports Collection
|
2018-07-11 13:53:44 +00:00
|
|
|
offers a simple way to compile and install third party applications.
|
|
|
|
It is also used to build packages, to be installed using
|
2018-06-13 18:50:51 +00:00
|
|
|
.Xr pkg 8 .
|
2018-07-11 13:53:44 +00:00
|
|
|
.Pp
|
|
|
|
The ports tree, typically located at
|
|
|
|
.Pa /usr/ports ,
|
|
|
|
consists of subdirectories, one for each category; those in turn contain
|
|
|
|
individual ports.
|
|
|
|
Each port is a directory with metadata and patches necessary to make
|
|
|
|
the original application source code compile and run on
|
2012-11-18 16:34:09 +00:00
|
|
|
.Fx .
|
2018-08-16 13:29:23 +00:00
|
|
|
Compiling an application is as simple as typing
|
|
|
|
.Dq Li "make build"
|
2018-07-11 13:53:44 +00:00
|
|
|
in the port directory.
|
2002-03-18 10:07:22 +00:00
|
|
|
The
|
|
|
|
.Pa Makefile
|
1998-01-28 01:09:46 +00:00
|
|
|
automatically fetches the
|
2018-07-11 13:53:44 +00:00
|
|
|
application source code, either from a local disk or the network, unpacks it,
|
|
|
|
applies the patches, and compiles it.
|
|
|
|
It also recursively handles dependencies \(em other pieces of software
|
|
|
|
the port depends on in order to build and work.
|
|
|
|
Afterwards,
|
2018-08-16 13:29:23 +00:00
|
|
|
.Dq Li "make install"
|
2018-07-11 13:53:44 +00:00
|
|
|
installs the application.
|
1997-11-09 06:05:45 +00:00
|
|
|
.Pp
|
2019-02-11 20:46:32 +00:00
|
|
|
The
|
|
|
|
.Fx
|
|
|
|
Ports Collection is maintained in several branches, which differ mostly
|
|
|
|
by versions of software provided: the
|
2021-04-06 20:24:12 +00:00
|
|
|
.Em main
|
|
|
|
branch contains all the latest changes and corresponds to the
|
|
|
|
.Em latest
|
|
|
|
package set, while the
|
2019-02-11 20:46:32 +00:00
|
|
|
.Em quarterly
|
|
|
|
branches only provide critical fixes.
|
|
|
|
The
|
2021-04-06 20:24:12 +00:00
|
|
|
.Em main
|
|
|
|
branch can be cloned and updated from the Git repository located at:
|
2019-02-11 20:46:32 +00:00
|
|
|
.Pp
|
2021-04-06 20:24:12 +00:00
|
|
|
.Lk https://git.FreeBSD.org/ports.git
|
|
|
|
.Pp
|
|
|
|
so eg:
|
|
|
|
.Pp
|
|
|
|
.Cm git clone https://git.FreeBSD.org/ports.git
|
2019-02-11 20:46:32 +00:00
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Em quarterly
|
2021-04-06 20:24:12 +00:00
|
|
|
branches can be found in Git as branches like
|
|
|
|
.Pa yyyyQn
|
|
|
|
, where
|
|
|
|
.Em yyyy
|
|
|
|
indicates the year and
|
|
|
|
.Em n
|
|
|
|
indicates the quarter
|
|
|
|
.Po 1 to 4
|
|
|
|
.Pc , eg:
|
2019-02-11 20:46:32 +00:00
|
|
|
.Pp
|
2021-04-06 20:24:12 +00:00
|
|
|
.Cm git clone -b 2021Q2 https://git.FreeBSD.org/ports.git
|
2019-02-11 20:46:32 +00:00
|
|
|
.Pp
|
|
|
|
It is generally a good idea to use the
|
|
|
|
.Nm
|
|
|
|
branch that matches the
|
|
|
|
.Xr pkg 8
|
|
|
|
repository being used.
|
|
|
|
By default, for
|
|
|
|
.Fx CURRENT
|
|
|
|
the
|
|
|
|
.Xr pkg 8
|
|
|
|
is configured to install packages built from the
|
2021-04-06 20:24:12 +00:00
|
|
|
.Em main
|
2019-02-11 20:46:32 +00:00
|
|
|
branch, while for
|
|
|
|
.Fx STABLE
|
|
|
|
or RELEASE versions it is configured to install packages built from
|
|
|
|
the latest
|
|
|
|
.Em quarterly
|
|
|
|
branch.
|
|
|
|
Currently configured
|
|
|
|
.Xr pkg 8
|
|
|
|
repository can be verified by looking at the
|
|
|
|
.Em url
|
|
|
|
field in
|
|
|
|
.Cm pkg -vv
|
|
|
|
output.
|
|
|
|
.Pp
|
2018-06-13 18:34:49 +00:00
|
|
|
For more information about using ports, see the
|
|
|
|
.Dq "Packages and Ports" section
|
2002-03-12 09:45:29 +00:00
|
|
|
in
|
2018-08-16 13:29:23 +00:00
|
|
|
.Sm off
|
|
|
|
.%B "The FreeBSD Handbook"
|
|
|
|
.No \&:
|
|
|
|
.Sm on
|
2018-06-13 18:34:49 +00:00
|
|
|
.Pp
|
2021-07-04 14:07:23 +00:00
|
|
|
.Lk https://docs.FreeBSD.org/en/books/handbook/ports/
|
2018-06-13 18:34:49 +00:00
|
|
|
.Pp
|
2018-07-11 13:53:44 +00:00
|
|
|
For information about creating new ports, see
|
2018-08-16 13:29:23 +00:00
|
|
|
.Sm off
|
|
|
|
.%B "The Porter's Handbook"
|
|
|
|
.No \&:
|
|
|
|
.Sm on
|
2018-06-13 18:34:49 +00:00
|
|
|
.Pp
|
2021-07-04 14:07:23 +00:00
|
|
|
.Lk https://docs.FreeBSD.org/en/books/porters-handbook/
|
1998-01-28 01:09:46 +00:00
|
|
|
.Sh TARGETS
|
2018-07-11 13:53:44 +00:00
|
|
|
Some of the
|
|
|
|
.Xr make 1
|
|
|
|
targets work recursively through subdirectories.
|
2002-03-18 10:07:22 +00:00
|
|
|
This lets you, for example, install all of the
|
|
|
|
.Dq Li biology
|
2018-08-16 13:29:23 +00:00
|
|
|
ports with one command.
|
2002-03-18 10:07:22 +00:00
|
|
|
The targets that do this are
|
|
|
|
.Cm build , checksum , clean , configure ,
|
|
|
|
.Cm depends , extract , fetch , install ,
|
1998-01-31 02:55:58 +00:00
|
|
|
and
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm package .
|
1998-01-31 02:55:58 +00:00
|
|
|
.Pp
|
|
|
|
The following targets will be run automatically by each proceeding
|
2002-03-18 10:07:22 +00:00
|
|
|
target in order.
|
|
|
|
That is,
|
|
|
|
.Cm build
|
2018-08-16 13:29:23 +00:00
|
|
|
will be run (if necessary) by
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm install ,
|
1998-01-31 02:55:58 +00:00
|
|
|
and so on all the way to
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm fetch .
|
2001-04-22 00:28:40 +00:00
|
|
|
Usually, you will only use the
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm install
|
2001-04-22 00:28:40 +00:00
|
|
|
target.
|
2002-03-18 10:07:22 +00:00
|
|
|
.Bl -tag -width ".Cm configure"
|
2004-06-02 14:15:35 +00:00
|
|
|
.It Cm config
|
|
|
|
Configure
|
|
|
|
.Va OPTIONS
|
|
|
|
for this port using
|
2013-06-20 21:16:46 +00:00
|
|
|
.Xr dialog4ports 1 .
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm fetch
|
|
|
|
Fetch all of the files needed to build this port from the sites
|
|
|
|
listed in
|
|
|
|
.Va MASTER_SITES
|
1998-01-31 02:55:58 +00:00
|
|
|
and
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va PATCH_SITES .
|
|
|
|
See
|
2004-12-17 13:39:55 +00:00
|
|
|
.Va FETCH_CMD , MASTER_SITE_OVERRIDE
|
2002-03-18 10:07:22 +00:00
|
|
|
and
|
2004-12-17 13:39:55 +00:00
|
|
|
.Va MASTER_SITE_BACKUP .
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm checksum
|
2001-04-22 00:28:40 +00:00
|
|
|
Verify that the fetched distfile's checksum matches the one the port was
|
|
|
|
tested against.
|
2011-05-25 08:42:01 +00:00
|
|
|
If the distfile's checksum does not match, it also fetches the distfiles
|
|
|
|
which are missing or failed the checksum calculation.
|
1998-01-31 02:55:58 +00:00
|
|
|
Defining
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va NO_CHECKSUM
|
1998-01-31 02:55:58 +00:00
|
|
|
will skip this step.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm depends
|
1998-01-31 02:55:58 +00:00
|
|
|
Install
|
2001-08-07 15:48:51 +00:00
|
|
|
(or compile if only compilation is necessary)
|
2002-03-18 10:07:22 +00:00
|
|
|
any dependencies of the current port.
|
|
|
|
When called by the
|
|
|
|
.Cm extract
|
1998-01-31 02:55:58 +00:00
|
|
|
or
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm fetch
|
1998-01-31 02:55:58 +00:00
|
|
|
targets, this is run in piecemeal as
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm fetch-depends , build-depends ,
|
|
|
|
etc.
|
|
|
|
Defining
|
|
|
|
.Va NO_DEPENDS
|
1998-01-31 02:55:58 +00:00
|
|
|
will skip this step.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm extract
|
1998-01-31 02:55:58 +00:00
|
|
|
Expand the distfile into a work directory.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm patch
|
1998-01-31 02:55:58 +00:00
|
|
|
Apply any patches that are necessary for the port.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm configure
|
|
|
|
Configure the port.
|
|
|
|
Some ports will ask you questions during this stage.
|
|
|
|
See
|
|
|
|
.Va INTERACTIVE
|
1998-01-31 02:55:58 +00:00
|
|
|
and
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va BATCH .
|
|
|
|
.It Cm build
|
|
|
|
Build the port.
|
|
|
|
This is the same as calling the
|
|
|
|
.Cm all
|
1998-01-31 02:55:58 +00:00
|
|
|
target.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm install
|
|
|
|
Install the port and register it with the package system.
|
|
|
|
This is all you really need to do.
|
2021-04-30 10:39:04 +00:00
|
|
|
.It Cm install-missing-packages
|
|
|
|
Install missing dependencies from packages instead of building them.
|
1998-01-31 02:55:58 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The following targets are not run during the normal install process.
|
2002-10-22 23:11:38 +00:00
|
|
|
.Bl -tag -width ".Cm fetch-recursive"
|
2004-06-02 14:15:35 +00:00
|
|
|
.It Cm showconfig
|
|
|
|
Display
|
|
|
|
.Va OPTIONS
|
|
|
|
config for this port.
|
2005-02-07 23:04:33 +00:00
|
|
|
.It Cm showconfig-recursive
|
|
|
|
Display
|
|
|
|
.Va OPTIONS
|
|
|
|
config for this port and all its dependencies.
|
2004-06-02 14:15:35 +00:00
|
|
|
.It Cm rmconfig
|
|
|
|
Remove
|
|
|
|
.Va OPTIONS
|
|
|
|
config for this port.
|
2005-02-07 23:04:33 +00:00
|
|
|
.It Cm rmconfig-recursive
|
|
|
|
Remove
|
|
|
|
.Va OPTIONS
|
|
|
|
config for this port and all its dependencies.
|
|
|
|
.It Cm config-conditional
|
|
|
|
Skip the ports which have already had their
|
|
|
|
.Va OPTIONS
|
|
|
|
configured.
|
2008-01-22 12:23:30 +00:00
|
|
|
.It Cm config-recursive
|
|
|
|
Configure
|
|
|
|
.Va OPTIONS
|
|
|
|
for this port and all its dependencies using
|
2013-06-20 21:16:46 +00:00
|
|
|
.Xr dialog4ports 1 .
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm fetch-list
|
2004-06-02 14:15:35 +00:00
|
|
|
Show list of files to be fetched in order to build the port.
|
2002-10-22 23:11:38 +00:00
|
|
|
.It Cm fetch-recursive
|
|
|
|
Fetch the distfiles of the port and all its dependencies.
|
2003-11-12 08:06:35 +00:00
|
|
|
.It Cm fetch-recursive-list
|
|
|
|
Show list of files that would be retrieved by
|
|
|
|
.Cm fetch-recursive .
|
2009-01-21 21:29:00 +00:00
|
|
|
.It Cm run-depends-list , build-depends-list
|
|
|
|
Print a list of all the compile and run dependencies, and dependencies
|
|
|
|
of those dependencies, by port directory.
|
2008-01-22 12:23:30 +00:00
|
|
|
.It Cm all-depends-list
|
|
|
|
Print a list of all dependencies for the port.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm pretty-print-run-depends-list , pretty-print-build-depends-list
|
1998-01-31 02:55:58 +00:00
|
|
|
Print a list of all the compile and run dependencies, and dependencies
|
2009-01-21 21:29:00 +00:00
|
|
|
of those dependencies, by port name and version.
|
2006-07-05 20:07:59 +00:00
|
|
|
.It Cm missing
|
|
|
|
Print a list of missing dependencies to be installed for the port.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm clean
|
|
|
|
Remove the expanded source code.
|
|
|
|
This recurses to dependencies unless
|
|
|
|
.Va NOCLEANDEPENDS
|
1998-01-31 02:55:58 +00:00
|
|
|
is defined.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm distclean
|
|
|
|
Remove the port's distfiles and perform the
|
|
|
|
.Cm clean
|
2001-04-22 00:28:40 +00:00
|
|
|
target.
|
|
|
|
The
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm clean
|
1998-01-31 02:55:58 +00:00
|
|
|
portion recurses to dependencies unless
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va NOCLEANDEPENDS
|
1998-01-31 02:55:58 +00:00
|
|
|
is defined, but the
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm distclean
|
1998-01-31 02:55:58 +00:00
|
|
|
portion never recurses
|
2001-08-07 15:48:51 +00:00
|
|
|
(this is perhaps a bug).
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm reinstall
|
1998-01-31 02:55:58 +00:00
|
|
|
Use this to restore a port after using
|
2016-03-28 16:48:28 +00:00
|
|
|
.Xr pkg-delete 8
|
1998-01-31 02:55:58 +00:00
|
|
|
when you should have used
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm deinstall .
|
|
|
|
.It Cm deinstall
|
1998-01-31 02:55:58 +00:00
|
|
|
Remove an installed port from the system, similar to
|
2016-03-28 16:48:28 +00:00
|
|
|
.Xr pkg-delete 8 .
|
2003-11-12 08:06:35 +00:00
|
|
|
.It Cm deinstall-all
|
|
|
|
Remove all installed ports with the same
|
|
|
|
.Va PKGORIGIN
|
|
|
|
from the system.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm package
|
|
|
|
Make a binary package for the port.
|
|
|
|
The port will be installed if it has not already been.
|
|
|
|
The package is a
|
2021-07-22 08:49:45 +00:00
|
|
|
.Pa .pkg
|
2002-03-18 10:07:22 +00:00
|
|
|
file that you can use to
|
1998-01-31 02:55:58 +00:00
|
|
|
install the port on other machines with
|
2016-03-28 16:48:28 +00:00
|
|
|
.Xr pkg-add 8 .
|
1998-01-31 02:55:58 +00:00
|
|
|
If the directory specified by
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va PACKAGES
|
2021-02-18 21:50:54 +00:00
|
|
|
does not exist, the package will be put in
|
|
|
|
.Pa /usr/ports/category/port/work/pkg .
|
1998-02-07 21:07:51 +00:00
|
|
|
See
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va PKGREPOSITORY
|
1998-02-07 21:07:51 +00:00
|
|
|
and
|
2021-02-18 21:50:54 +00:00
|
|
|
.Va PKGFILE
|
|
|
|
for more information.
|
2003-11-09 09:30:39 +00:00
|
|
|
.It Cm package-recursive
|
|
|
|
Like
|
|
|
|
.Cm package ,
|
|
|
|
but makes a package for each depending port as well.
|
2009-01-21 21:29:00 +00:00
|
|
|
.It Cm package-name
|
|
|
|
Prints the name with version of the port.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm readmes
|
1998-02-07 21:07:51 +00:00
|
|
|
Create a port's
|
|
|
|
.Pa README.html .
|
1999-07-12 02:33:47 +00:00
|
|
|
This can be used from
|
|
|
|
.Pa /usr/ports
|
|
|
|
to create a browsable web of all ports on your system!
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm search
|
2001-04-22 00:28:40 +00:00
|
|
|
Search the
|
|
|
|
.Pa INDEX
|
2004-06-16 07:29:21 +00:00
|
|
|
file for the pattern specified by the
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va key
|
2004-06-16 07:29:21 +00:00
|
|
|
(searches the port name, comment, and dependencies),
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va name
|
2004-06-16 07:29:21 +00:00
|
|
|
(searches the port name only),
|
|
|
|
.Va path
|
|
|
|
(searches the port path),
|
|
|
|
.Va info
|
|
|
|
(searches the port info),
|
|
|
|
.Va maint
|
|
|
|
(searches the port maintainer),
|
|
|
|
.Va cat
|
|
|
|
(searches the port category),
|
|
|
|
.Va bdeps
|
|
|
|
(searches the port build-time dependency),
|
|
|
|
.Va rdeps
|
2007-12-21 21:32:12 +00:00
|
|
|
(searches the port run-time dependency),
|
|
|
|
.Va www
|
|
|
|
(searches the port web site)
|
2002-03-18 10:07:22 +00:00
|
|
|
.Xr make 1
|
2004-06-16 07:29:21 +00:00
|
|
|
variables, and their exclusion counterparts:
|
|
|
|
.Va xname , xkey
|
|
|
|
etc.
|
2001-04-22 00:28:40 +00:00
|
|
|
For example, one would type:
|
|
|
|
.Pp
|
2002-03-18 10:07:22 +00:00
|
|
|
.Dl "cd /usr/ports && make search name=query"
|
2001-04-22 00:28:40 +00:00
|
|
|
.Pp
|
|
|
|
to find all ports whose
|
|
|
|
name matches
|
2002-03-18 10:07:22 +00:00
|
|
|
.Dq Li query .
|
2001-04-22 00:28:40 +00:00
|
|
|
Results include the matching ports' path, comment, maintainer,
|
|
|
|
build dependencies, and run dependencies.
|
2004-06-16 07:29:21 +00:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /usr/ports && make search name=pear- \e
|
|
|
|
xbdeps=apache
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
To find all ports whose
|
|
|
|
names contain
|
|
|
|
.Dq Li pear-
|
|
|
|
and which do not have apache
|
|
|
|
listed in build-time dependencies.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
cd /usr/ports && make search name=pear- \e
|
|
|
|
xname='ht(tp|ml)'
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
To find all ports whose names contain
|
|
|
|
.Dq Li pear- ,
|
|
|
|
but not
|
|
|
|
.Dq Li html
|
|
|
|
or
|
|
|
|
.Dq Li http .
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
make search key=apache display=name,path,info keylim=1
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
To find ports that contain
|
|
|
|
.Dq Li apache
|
|
|
|
in either of the name, path, info
|
|
|
|
fields, ignore the rest of the record.
|
2007-12-21 21:32:12 +00:00
|
|
|
.Pp
|
2008-12-05 22:04:52 +00:00
|
|
|
By default the search is not case-sensitive.
|
2007-12-21 21:32:12 +00:00
|
|
|
In order to make it case-sensitive you can use the
|
|
|
|
.Va icase
|
|
|
|
variable:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
make search name=p5-R icase=0
|
|
|
|
.Ed
|
2006-09-18 11:49:17 +00:00
|
|
|
.It Cm quicksearch
|
|
|
|
Reduced
|
|
|
|
.Cm search
|
|
|
|
output.
|
|
|
|
Only display name, path and info.
|
2004-06-02 14:15:35 +00:00
|
|
|
.It Cm describe
|
|
|
|
Generate a one-line description of each port for use in the
|
|
|
|
.Pa INDEX
|
|
|
|
file.
|
2008-01-21 19:52:15 +00:00
|
|
|
.It Cm maintainer
|
|
|
|
Display the port maintainer's email address.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Cm index
|
2001-04-22 00:28:40 +00:00
|
|
|
Create
|
|
|
|
.Pa /usr/ports/INDEX ,
|
|
|
|
which is used by the
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm pretty-print-*
|
2001-04-22 00:28:40 +00:00
|
|
|
and
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm search
|
2001-04-22 00:28:40 +00:00
|
|
|
targets.
|
2004-06-02 20:15:34 +00:00
|
|
|
Running the
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm index
|
|
|
|
target will ensure your
|
|
|
|
.Pa INDEX
|
|
|
|
file is up to date with your ports tree.
|
2004-06-02 20:15:34 +00:00
|
|
|
.It Cm fetchindex
|
|
|
|
Fetch the
|
|
|
|
.Pa INDEX
|
|
|
|
file from the
|
|
|
|
.Fx
|
|
|
|
cluster.
|
2000-12-29 09:18:45 +00:00
|
|
|
.El
|
1999-08-15 10:48:36 +00:00
|
|
|
.Sh ENVIRONMENT
|
1998-01-31 02:55:58 +00:00
|
|
|
You can change all of these.
|
2002-03-18 10:07:22 +00:00
|
|
|
.Bl -tag -width ".Va MASTER_SITES"
|
|
|
|
.It Va PORTSDIR
|
|
|
|
Location of the ports tree.
|
|
|
|
This is
|
1998-01-31 02:55:58 +00:00
|
|
|
.Pa /usr/ports
|
2020-11-01 20:54:02 +00:00
|
|
|
by default.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va WRKDIRPREFIX
|
|
|
|
Where to create any temporary files.
|
|
|
|
Useful if
|
|
|
|
.Va PORTSDIR
|
|
|
|
is read-only (perhaps mounted from a CD-ROM).
|
|
|
|
.It Va DISTDIR
|
1998-01-31 02:55:58 +00:00
|
|
|
Where to find/put distfiles, normally
|
|
|
|
.Pa distfiles/
|
|
|
|
in
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va PORTSDIR .
|
2020-07-17 06:33:20 +00:00
|
|
|
.It Va SU_CMD
|
|
|
|
Command used to elevate privilege to configure and install a port.
|
|
|
|
The unprivileged user must have write access to
|
|
|
|
.Va WRKDIRPREFIX
|
|
|
|
and
|
|
|
|
.Va DISTDIR .
|
|
|
|
The default is
|
2020-11-01 17:27:48 +00:00
|
|
|
.Ql /usr/bin/su root -c .
|
|
|
|
Many users set it to
|
|
|
|
.Ql /usr/local/bin/sudo -E sh -c
|
|
|
|
for convenience.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va PACKAGES
|
1998-01-31 02:55:58 +00:00
|
|
|
Used only for the
|
2002-03-18 10:07:22 +00:00
|
|
|
.Cm package
|
1998-01-31 02:55:58 +00:00
|
|
|
target; the base directory for the packages tree, normally
|
|
|
|
.Pa packages/
|
|
|
|
in
|
2002-03-18 10:07:22 +00:00
|
|
|
.Va PORTSDIR .
|
1998-01-31 02:55:58 +00:00
|
|
|
If this directory exists, the package tree will be (partially) constructed.
|
2002-03-18 10:07:22 +00:00
|
|
|
This directory does not have to exist; if it does not, packages will be
|
1998-02-07 21:07:51 +00:00
|
|
|
placed into the current directory, or you can define one of
|
2002-03-18 10:07:22 +00:00
|
|
|
.Bl -tag -width ".Va PKGREPOSITORY"
|
|
|
|
.It Va PKGREPOSITORY
|
1998-02-07 21:07:51 +00:00
|
|
|
Directory to put the package in.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va PKGFILE
|
1998-01-31 02:55:58 +00:00
|
|
|
The full path to the package.
|
|
|
|
.El
|
2012-02-07 04:00:57 +00:00
|
|
|
.It Va LOCALBASE
|
|
|
|
Where existing things are installed and where to search for files when
|
|
|
|
resolving dependencies (usually
|
2007-07-24 06:41:07 +00:00
|
|
|
.Pa /usr/local ) .
|
2012-02-07 04:00:57 +00:00
|
|
|
.It Va PREFIX
|
|
|
|
Where to install this port (usually set to the same as
|
|
|
|
.Va LOCALBASE ) .
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va MASTER_SITES
|
1998-01-28 01:09:46 +00:00
|
|
|
Primary sites for distribution files if not found locally.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va PATCH_SITES
|
|
|
|
Primary locations for distribution patch files if not found
|
1998-01-28 01:09:46 +00:00
|
|
|
locally.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va MASTER_SITE_FREEBSD
|
2000-11-14 11:20:58 +00:00
|
|
|
If set, go to the master
|
|
|
|
.Fx
|
|
|
|
site for all files.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va MASTER_SITE_OVERRIDE
|
2003-06-23 20:01:58 +00:00
|
|
|
Try going to these sites for all files and patches, first.
|
2004-12-17 13:39:55 +00:00
|
|
|
.It Va MASTER_SITE_BACKUP
|
|
|
|
Try going to these sites for all files and patches, last.
|
2006-07-05 20:38:54 +00:00
|
|
|
.It Va RANDOMIZE_MASTER_SITES
|
|
|
|
Try the download locations in a random order.
|
|
|
|
.It Va MASTER_SORT
|
|
|
|
Sort the download locations according to user supplied pattern.
|
|
|
|
Example:
|
|
|
|
.Dl .dk .sunet.se .se dk.php.net .no .de heanet.dl.sourceforge.net
|
2004-12-17 13:39:55 +00:00
|
|
|
.It Va MASTER_SITE_INDEX
|
|
|
|
Where to get
|
|
|
|
.Pa INDEX
|
|
|
|
source built on
|
|
|
|
.Fx
|
|
|
|
cluster (for
|
|
|
|
.Cm fetchindex
|
|
|
|
target).
|
|
|
|
Defaults to
|
2017-10-29 08:17:03 +00:00
|
|
|
.Pa https://www.FreeBSD.org/ports/ .
|
2004-12-17 13:39:55 +00:00
|
|
|
.It Va FETCHINDEX
|
|
|
|
Command to get
|
|
|
|
.Pa INDEX
|
|
|
|
(for
|
|
|
|
.Cm fetchindex
|
|
|
|
target).
|
|
|
|
Defaults to
|
2018-08-16 13:29:23 +00:00
|
|
|
.Dq Li "fetch -am" .
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va NOCLEANDEPENDS
|
|
|
|
If defined, do not let
|
|
|
|
.Cm clean
|
1998-01-31 02:55:58 +00:00
|
|
|
recurse to dependencies.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va FETCH_CMD
|
|
|
|
Command to use to fetch files.
|
|
|
|
Normally
|
1998-01-31 02:55:58 +00:00
|
|
|
.Xr fetch 1 .
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va FORCE_PKG_REGISTER
|
1998-01-31 02:55:58 +00:00
|
|
|
If set, overwrite any existing package registration on the system.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va INTERACTIVE
|
1998-01-31 02:55:58 +00:00
|
|
|
If defined, only operate on a port if it requires interaction.
|
2002-03-18 10:07:22 +00:00
|
|
|
.It Va BATCH
|
1998-01-31 02:55:58 +00:00
|
|
|
If defined, only operate on a port if it can be installed 100% automatically.
|
2004-11-18 19:40:00 +00:00
|
|
|
.It Va DISABLE_VULNERABILITIES
|
|
|
|
If defined, disable check for security vulnerabilities using
|
2014-06-06 13:36:52 +00:00
|
|
|
.Xr pkg-audit 8
|
2004-11-18 19:40:00 +00:00
|
|
|
when installing new ports.
|
2006-10-24 12:30:28 +00:00
|
|
|
.It Va NO_IGNORE
|
|
|
|
If defined, allow installation of ports marked as
|
|
|
|
.Aq Va FORBIDDEN .
|
|
|
|
The default behavior of the Ports framework is to abort when the
|
|
|
|
installation of a forbidden port is attempted.
|
|
|
|
Of course, these ports may not work as expected, but if you really know
|
|
|
|
what you are doing and are sure about installing a forbidden port, then
|
|
|
|
.Va NO_IGNORE
|
|
|
|
lets you do it.
|
2011-05-30 10:23:59 +00:00
|
|
|
.It Va NO_CHECKSUM
|
|
|
|
If defined, skip verifying the port's checksum.
|
2011-02-15 07:16:27 +00:00
|
|
|
.It Va TRYBROKEN
|
|
|
|
If defined, attempt to build a port even if it is marked as
|
|
|
|
.Aq Va BROKEN .
|
2007-12-21 21:44:33 +00:00
|
|
|
.It Va PORT_DBDIR
|
|
|
|
Directory where the results of configuring
|
|
|
|
.Va OPTIONS
|
|
|
|
are stored.
|
|
|
|
Defaults to
|
|
|
|
.Pa /var/db/ports .
|
|
|
|
Each port where
|
|
|
|
.Va OPTIONS
|
|
|
|
have been configured will have a uniquely named sub-directory, containing a
|
|
|
|
single file
|
|
|
|
.Pa options .
|
1998-01-31 02:55:58 +00:00
|
|
|
.El
|
2014-05-18 21:05:54 +00:00
|
|
|
.Sh MAKE VARIABLES
|
|
|
|
The following list provides a name and short description for many of the
|
|
|
|
variables that are used when building ports.
|
|
|
|
More information on these and other related variables may be found in
|
|
|
|
.Pa ${PORTSDIR}/Mk/*
|
|
|
|
and the
|
|
|
|
.Fx
|
|
|
|
Porter's Handbook.
|
2019-01-08 09:41:52 +00:00
|
|
|
.Bl -tag -width "WITH_CCACHE_BUILD"
|
2014-05-18 21:05:54 +00:00
|
|
|
.It Va WITH_DEBUG
|
|
|
|
.Pq Vt bool
|
|
|
|
If set, debugging symbols are installed for ports binaries.
|
|
|
|
.It Va WITH_DEBUG_PORTS
|
|
|
|
A list of origins for which to set
|
2020-11-03 18:02:02 +00:00
|
|
|
.Va WITH_DEBUG .
|
2021-04-17 20:51:54 +00:00
|
|
|
.It Va DEBUG_FLAGS
|
|
|
|
.Pq Default: Ql -g
|
|
|
|
Additional
|
|
|
|
.Va CFLAGS
|
|
|
|
to set when
|
|
|
|
.Va WITH_DEBUG
|
|
|
|
is set.
|
2014-05-18 21:05:54 +00:00
|
|
|
.It Va WITH_CCACHE_BUILD
|
|
|
|
.Pq Vt bool
|
|
|
|
If set, enables the use of
|
|
|
|
.Xr ccache 1
|
|
|
|
for building ports.
|
|
|
|
.It Va CCACHE_DIR
|
2018-08-16 13:29:23 +00:00
|
|
|
Which directory to use for the
|
|
|
|
.Xr ccache 1
|
|
|
|
data.
|
2014-05-18 21:05:54 +00:00
|
|
|
.El
|
1997-11-09 06:05:45 +00:00
|
|
|
.Sh FILES
|
2002-03-18 10:07:22 +00:00
|
|
|
.Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact
|
1997-11-09 06:05:45 +00:00
|
|
|
.It Pa /usr/ports
|
2018-08-16 13:29:23 +00:00
|
|
|
The default ports directory.
|
1999-05-02 05:04:26 +00:00
|
|
|
.It Pa /usr/ports/Mk/bsd.port.mk
|
1998-01-31 02:55:58 +00:00
|
|
|
The big Kahuna.
|
2000-12-29 09:18:45 +00:00
|
|
|
.El
|
2018-07-05 11:03:11 +00:00
|
|
|
.Sh EXAMPLES
|
2018-12-30 00:27:28 +00:00
|
|
|
.Bl -tag -width 0n
|
|
|
|
.It Sy Example 1\&: No Building and Installing a Port
|
|
|
|
.Pp
|
|
|
|
The following command builds and installs Emacs.
|
|
|
|
.Bd -literal -offset 2n
|
|
|
|
.Li # Ic cd /usr/ports/editors/emacs
|
|
|
|
.Li # Ic make install
|
|
|
|
.Ed
|
|
|
|
.It Sy Example 2\&: No Installing Dependencies with Xr pkg 8
|
|
|
|
.Pp
|
2019-03-12 09:27:37 +00:00
|
|
|
The following example shows how to build and install a port without having to
|
2018-12-30 00:27:28 +00:00
|
|
|
build its dependencies.
|
|
|
|
Instead, the dependencies are downloaded via
|
|
|
|
.Xr pkg 8 .
|
|
|
|
.Bd -literal -offset 2n
|
2020-02-03 23:40:27 +00:00
|
|
|
.Li # Ic make install-missing-packages
|
2018-12-30 00:27:28 +00:00
|
|
|
.Li # Ic make install
|
2018-07-05 11:03:11 +00:00
|
|
|
.Ed
|
2018-12-30 00:27:28 +00:00
|
|
|
.Pp
|
|
|
|
It is especially useful, when the dependencies are costly
|
|
|
|
in time and resources to build
|
|
|
|
.Pq like Pa lang/rust .
|
|
|
|
The drawback is that
|
|
|
|
.Xr pkg 8
|
|
|
|
offers only packages built with the default set of
|
|
|
|
.Va OPTIONS .
|
2019-03-12 09:27:37 +00:00
|
|
|
.It Sy Example 3\&: No Building a Non-Default Flavor of a Port
|
|
|
|
.Pp
|
|
|
|
The following command builds a non-default flavor of a port.
|
|
|
|
(In this case
|
|
|
|
.Pa devel/py-pip
|
|
|
|
is going to be built with Python 3.7 support.)
|
|
|
|
.Bd -literal -offset 2n
|
|
|
|
.Li # Ic cd /usr/ports/devel/py-pip
|
|
|
|
.Li # Ic env FLAVOR=py37 make build
|
|
|
|
.Ed
|
2020-11-03 13:26:00 +00:00
|
|
|
.It Sy Example 4\&: No Setting Ports Options via Xr make.conf 5
|
|
|
|
.Pp
|
|
|
|
The following lines present various ways of configuring ports options via
|
|
|
|
.Xr make.conf 5
|
|
|
|
(as an alternative to, e.g., running
|
|
|
|
.Dq Li make config ) :
|
|
|
|
.Bd -literal -offset 2n
|
|
|
|
# Enable NLS for all ports unless configured otherwise
|
|
|
|
# using the options dialog.
|
|
|
|
OPTIONS_SET= NLS
|
|
|
|
# Disable DOCS for all ports overriding the options set
|
|
|
|
# via the options dialog.
|
|
|
|
OPTIONS_UNSET_FORCE= DOCS
|
|
|
|
# Disable DOCS and EXAMPLES for the shells/zsh port.
|
|
|
|
shells_zsh_UNSET= DOCS EXAMPLES
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
These and other options-related variables are documented in
|
|
|
|
.Pa /usr/ports/Mk/bsd.options.mk .
|
2021-01-16 23:10:44 +00:00
|
|
|
.It Sy Example 5\&: No Setting Xr make 1 Variables for Specific Ports via Xr make.conf 5
|
|
|
|
.Pp
|
|
|
|
The following example shows how to set arbitrary
|
|
|
|
.Xr make 1
|
|
|
|
variables only specific ports:
|
|
|
|
.Bd -literal -offset 2n
|
|
|
|
# Set DISABLE_MAKE_JOBS for the lang/rust port:
|
|
|
|
\&.if ${.CURDIR:M*/lang/rust}
|
|
|
|
DISABLE_MAKE_JOBS= yes
|
|
|
|
TRYBROKEN= yes
|
|
|
|
\&.endif
|
|
|
|
.Ed
|
2021-04-17 20:51:54 +00:00
|
|
|
.It Sy Example 6\&: No Debugging Ports
|
|
|
|
By default ports are built and packaged without debugging support (e.g.,
|
|
|
|
debugging symbols are stripped from binaries, optimization flags are used for
|
|
|
|
compiling, verbose logging is disabled).
|
|
|
|
Whether ports are built with debugging symbols can be controlled by the
|
|
|
|
settings in
|
|
|
|
.Xr make.conf 5 ,
|
|
|
|
e.g.,
|
|
|
|
.Bd -literal -offset 2n
|
|
|
|
# Enable debugging for all ports.
|
|
|
|
WITH_DEBUG= yes
|
|
|
|
# Enable debugging for selected ports.
|
|
|
|
WITH_DEBUG_PORTS= mail/dovecot security/krb5
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
It is also possible to use the debug variables on the command line:
|
|
|
|
.Bd -literal -offset 2n
|
|
|
|
.Li # Ic make -DWITH_DEBUG DEBUG_FLAGS="-g -O0" build
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
See the
|
|
|
|
.Sx MAKE VARIABLES
|
|
|
|
section to learn more about the debug variables.
|
|
|
|
.Pp
|
|
|
|
To understand the details of what happens when the debug variables are set it
|
|
|
|
is best to consult the files located at
|
|
|
|
.Pa ${PORTSDIR}/Mk/*
|
|
|
|
.Po Pa bsd.port.mk
|
|
|
|
in particular
|
|
|
|
.Pc .
|
|
|
|
.Pp
|
|
|
|
If debugging is enabled for a specific port, the ports framework will:
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
|
|
|
Add
|
|
|
|
.Va DEBUG_FLAGS
|
|
|
|
(defaults to
|
|
|
|
.Ql -g )
|
|
|
|
to
|
|
|
|
.Va CFLAGS .
|
|
|
|
.It
|
|
|
|
Try to prevent the binaries from being stripped (including checking the install
|
|
|
|
target to replace
|
|
|
|
.Ql install-strip
|
|
|
|
with
|
|
|
|
.Ql install ) .
|
|
|
|
Whether a binary has been stripped can be checked with
|
|
|
|
.Xr file 1 .
|
|
|
|
.It
|
|
|
|
Try to enable other debugging features like debug build type or verbose logging.
|
|
|
|
However, this is port-specific and the ports framework might not be aware of
|
|
|
|
each supported debugging feature a given piece of software has to offer).
|
2018-12-30 00:27:28 +00:00
|
|
|
.El
|
2022-02-25 16:39:09 +00:00
|
|
|
.El
|
1997-11-09 06:05:45 +00:00
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr make 1 ,
|
2014-05-18 21:05:54 +00:00
|
|
|
.Xr make.conf 5 ,
|
2019-08-26 10:16:46 +00:00
|
|
|
.Xr development 7 ,
|
2020-08-03 13:12:07 +00:00
|
|
|
.Xr pkg 7
|
1999-08-15 10:48:36 +00:00
|
|
|
.Pp
|
2018-08-16 13:29:23 +00:00
|
|
|
Additional developer documentation:
|
|
|
|
.Bl -dash -width "" -offset indent
|
|
|
|
.It
|
1999-07-12 07:49:28 +00:00
|
|
|
.Xr portlint 1
|
2018-08-16 13:29:23 +00:00
|
|
|
.It
|
|
|
|
.Pa /usr/ports/Mk/bsd.port.mk
|
|
|
|
.El
|
1998-01-31 02:55:58 +00:00
|
|
|
.Pp
|
2018-08-16 13:29:23 +00:00
|
|
|
Additional user documentation:
|
|
|
|
.Bl -dash -width "" -offset indent
|
|
|
|
.It
|
|
|
|
.Xr pkg 8
|
|
|
|
.It
|
|
|
|
.Lk "https://www.FreeBSD.org/ports" "Searchable index of all ports"
|
|
|
|
.El
|
1997-11-09 06:05:45 +00:00
|
|
|
.Sh HISTORY
|
2002-03-18 10:07:22 +00:00
|
|
|
The Ports Collection
|
1997-11-09 06:05:45 +00:00
|
|
|
appeared in
|
|
|
|
.Fx 1.0 .
|
1999-07-12 02:33:47 +00:00
|
|
|
It has since spread to
|
|
|
|
.Nx
|
|
|
|
and
|
|
|
|
.Ox .
|
2005-01-21 08:36:40 +00:00
|
|
|
.Sh AUTHORS
|
|
|
|
.An -nosplit
|
|
|
|
This manual page was originated by
|
|
|
|
.An David O'Brien .
|
1998-01-31 02:55:58 +00:00
|
|
|
.Sh BUGS
|
2002-03-18 10:07:22 +00:00
|
|
|
Ports documentation is split over four places \(em
|
1999-04-29 21:41:11 +00:00
|
|
|
.Pa /usr/ports/Mk/bsd.port.mk ,
|
2002-03-18 10:07:22 +00:00
|
|
|
.%B "The Porter's Handbook" ,
|
1998-01-31 02:55:58 +00:00
|
|
|
the
|
2002-03-18 10:07:22 +00:00
|
|
|
.Dq "Packages and Ports"
|
2002-03-12 09:45:29 +00:00
|
|
|
chapter of
|
2002-03-18 10:07:22 +00:00
|
|
|
.%B "The FreeBSD Handbook" ,
|
2002-03-12 09:45:29 +00:00
|
|
|
and
|
2004-11-18 19:40:00 +00:00
|
|
|
this manual page.
|