2 .\" Copyright (c) 1997 David E. O'Brien
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 .\" $FreeBSD: src/share/man/man7/ports.7,v 1.49 2005/01/21 08:36:40 ru Exp $
27 .\" $DragonFly: src/share/man/man7/Attic/ports.7,v 1.5 2005/01/27 19:17:13 swildner Exp $
34 .Nd contributed applications
39 offers a simple way for users and
40 administrators to install applications.
43 contains any patches necessary to make the original
44 application source code compile and run on
47 application is as simple as typing
49 in the port directory!
52 automatically fetches the
53 application source code, either from a local disk or via FTP, unpacks it
54 on your system, applies the patches, and compiles it.
58 to install the application.
60 It is possible to download and use ports from the
63 that are newer than the installed system; however it is important to
64 install the appropriate
67 .Pa http://www.FreeBSD.org/ports/
71 script (also a port, of course!) will help to download new ports.
73 For more information about using ports, see
74 .Dq "Packages and Ports"
76 .%B "The FreeBSD Handbook" ,
77 .Pa ( file:/usr/share/doc/en_US.ISO8859-1/books/handbook/ports.html
79 .Pa http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/ports.html ) .
80 For information about creating new ports, see
81 .%B "The Porter's Handbook"
82 .Pa ( file:/usr/share/doc/en_US.ISO8859-1/books/porters-handbook/index.html
84 .Pa http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/porters-handbook/ ) .
86 Some of the targets work recursively through subdirectories.
87 This lets you, for example, install all of the
90 The targets that do this are
91 .Cm build , checksum , clean , configure ,
92 .Cm depends , extract , fetch , install ,
96 The following targets will be run automatically by each proceeding
104 and so on all the way to
106 Usually, you will only use the
109 .Bl -tag -width ".Cm configure"
116 Fetch all of the files needed to build this port from the sites
122 .Va FETCH_CMD , MASTER_SITE_OVERRIDE
124 .Va MASTER_SITE_BACKUP .
126 Verify that the fetched distfile's checksum matches the one the port was
133 (or compile if only compilation is necessary)
134 any dependencies of the current port.
139 targets, this is run in piecemeal as
140 .Cm fetch-depends , build-depends ,
146 Expand the distfile into a work directory.
148 Apply any patches that are necessary for the port.
151 Some ports will ask you questions during this stage.
158 This is the same as calling the
162 Install the port and register it with the package system.
163 This is all you really need to do.
166 The following targets are not run during the normal install process.
167 .Bl -tag -width ".Cm fetch-recursive"
171 config for this port.
175 config for this port.
177 Show list of files to be fetched in order to build the port.
178 .It Cm fetch-recursive
179 Fetch the distfiles of the port and all its dependencies.
180 .It Cm fetch-recursive-list
181 Show list of files that would be retrieved by
182 .Cm fetch-recursive .
183 .It Cm pretty-print-run-depends-list , pretty-print-build-depends-list
184 Print a list of all the compile and run dependencies, and dependencies
185 of those dependencies.
187 Remove the expanded source code.
188 This recurses to dependencies unless
192 Remove the port's distfiles and perform the
197 portion recurses to dependencies unless
201 portion never recurses
202 (this is perhaps a bug).
204 Use this to restore a port after using
206 when you should have used
209 Remove an installed port from the system, similar to
212 Remove all installed ports with the same
216 Make a binary package for the port.
217 The port will be installed if it has not already been.
220 file that you can use to
221 install the port on other machines with
223 If the directory specified by
225 does not exist, the package will be put into the current directory.
230 .It Cm package-recursive
233 but makes a package for each depending port as well.
237 This can be used from
239 to create a browsable web of all ports on your system!
243 file for the pattern specified by the
245 (searches the port name, comment, and dependencies),
247 (searches the port name only),
249 (searches the port path),
251 (searches the port info),
253 (searches the port maintainer),
255 (searches the port category),
257 (searches the port build-time dependency),
259 (searches the port run-time dependency)
261 variables, and their exclusion counterparts:
264 For example, one would type:
266 .Dl "cd /usr/ports && make search name=query"
268 to find all ports whose
271 Results include the matching ports' path, comment, maintainer,
272 build dependencies, and run dependencies.
273 .Bd -literal -offset indent
274 cd /usr/ports && make search name=pear- \e
278 To find all ports whose
281 and which do not have apache
282 listed in build-time dependencies.
283 .Bd -literal -offset indent
284 cd /usr/ports && make search name=pear- \e
288 To find all ports whose names contain
294 .Bd -literal -offset indent
295 make search key=apache display=name,path,info keylim=1
298 To find ports that contain
300 in either of the name, path, info
301 fields, ignore the rest of the record.
303 Generate a one-line description of each port for use in the
308 .Pa /usr/ports/INDEX ,
316 target will ensure your
318 file is up to date with your ports tree.
327 You can change all of these.
328 .Bl -tag -width ".Va MASTER_SITES"
330 Location of the ports tree.
343 Where to create any temporary files.
346 is read-only (perhaps mounted from a CD-ROM).
348 Where to find/put distfiles, normally
355 target; the base directory for the packages tree, normally
359 If this directory exists, the package tree will be (partially) constructed.
360 This directory does not have to exist; if it does not, packages will be
361 placed into the current directory, or you can define one of
362 .Bl -tag -width ".Va PKGREPOSITORY"
364 Directory to put the package in.
366 The full path to the package.
369 Where to install things in general
375 Primary sites for distribution files if not found locally.
377 Primary locations for distribution patch files if not found
379 .It Va MASTER_SITE_FREEBSD
380 If set, go to the master
383 .It Va MASTER_SITE_OVERRIDE
384 Try going to these sites for all files and patches, first.
385 .It Va MASTER_SITE_BACKUP
386 Try going to these sites for all files and patches, last.
387 .It Va MASTER_SITE_INDEX
396 .Pa http://www.FreeBSD.org/ports/ .
405 .It Va NOCLEANDEPENDS
406 If defined, do not let
408 recurse to dependencies.
410 Command to use to fetch files.
413 .It Va FORCE_PKG_REGISTER
414 If set, overwrite any existing package registration on the system.
417 .Pa libXm. Ns Brq Pa a , Ns Pa so .
419 If defined, only operate on a port if it requires interaction.
421 If defined, only operate on a port if it can be installed 100% automatically.
423 If defined, list of what
425 options this port accepts.
429 actually work, it is necessary to include
431 before starting to test the
434 .It Va DISABLE_VULNERABILITIES
435 If defined, disable check for security vulnerabilities using
437 when installing new ports.
440 .Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact
442 The default ports directory
448 The default ports directory
451 DragonFly override ports.
452 .It Pa /usr/ports/Mk/bsd.port.mk
463 The following are part of the ports collection:
469 .%B "The FreeBSD Handbook"
472 .Pa http://www.FreeBSD.org/ports
473 (searchable index of all ports)
478 It has since spread to
484 This manual page was originated by
487 Ports documentation is split over four places \(em
488 .Pa /usr/ports/Mk/bsd.port.mk ,
489 .%B "The Porter's Handbook" ,
491 .Dq "Packages and Ports"
493 .%B "The FreeBSD Handbook" ,