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.
33 .Nd contributed applications
38 offers a simple way for users and
39 administrators to install applications.
42 contains any patches necessary to make the original
43 application source code compile and run on
46 application is as simple as typing
48 in the port directory!
51 automatically fetches the
52 application source code, either from a local disk or via FTP, unpacks it
53 on your system, applies the patches, and compiles it.
57 to install the application.
59 It is possible to download and use ports from the
62 that are newer than the installed system; however it is important to
63 install the appropriate
66 .Pa http://www.FreeBSD.org/ports/
69 .Xr portcheckout 1 Pq Pa ports/ports-mgmt/portcheckout
70 script (also a port, of course!) will help to download new ports.
72 For more information about using ports, see
73 .Dq "Packages and Ports"
75 .%B "The FreeBSD Handbook" ,
76 .Pa ( file:/usr/share/doc/en_US.ISO8859-1/books/handbook/ports.html
78 .Pa http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/ports.html ) .
79 For information about creating new ports, see
80 .%B "The Porter's Handbook"
81 .Pa ( file:/usr/share/doc/en_US.ISO8859-1/books/porters-handbook/index.html
83 .Pa http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/porters-handbook/ ) .
85 Some of the targets work recursively through subdirectories.
86 This lets you, for example, install all of the
89 The targets that do this are
90 .Cm build , checksum , clean , configure ,
91 .Cm depends , extract , fetch , install ,
95 The following targets will be run automatically by each proceeding
103 and so on all the way to
105 Usually, you will only use the
108 .Bl -tag -width ".Cm configure"
115 Fetch all of the files needed to build this port from the sites
121 .Va FETCH_CMD , MASTER_SITE_OVERRIDE
123 .Va MASTER_SITE_BACKUP .
125 Verify that the fetched distfile's checksum matches the one the port was
127 If the distfile's checksum does not match, it also fetches the distfiles
128 which are missing or failed the checksum calculation.
134 (or compile if only compilation is necessary)
135 any dependencies of the current port.
140 targets, this is run in piecemeal as
141 .Cm fetch-depends , build-depends ,
147 Expand the distfile into a work directory.
149 Apply any patches that are necessary for the port.
152 Some ports will ask you questions during this stage.
159 This is the same as calling the
163 Install the port and register it with the package system.
164 This is all you really need to do.
167 The following targets are not run during the normal install process.
168 .Bl -tag -width ".Cm fetch-recursive"
172 config for this port.
173 .It Cm showconfig-recursive
176 config for this port and all its dependencies.
180 config for this port.
181 .It Cm rmconfig-recursive
184 config for this port and all its dependencies.
185 .It Cm config-conditional
186 Skip the ports which have already had their
189 .It Cm config-recursive
192 for this port and all its dependencies using
195 Show list of files to be fetched in order to build the port.
196 .It Cm fetch-recursive
197 Fetch the distfiles of the port and all its dependencies.
198 .It Cm fetch-recursive-list
199 Show list of files that would be retrieved by
200 .Cm fetch-recursive .
201 .It Cm run-depends-list , build-depends-list
202 Print a list of all the compile and run dependencies, and dependencies
203 of those dependencies, by port directory.
204 .It Cm all-depends-list
205 Print a list of all dependencies for the port.
206 .It Cm pretty-print-run-depends-list , pretty-print-build-depends-list
207 Print a list of all the compile and run dependencies, and dependencies
208 of those dependencies, by port name and version.
210 Print a list of missing dependencies to be installed for the port.
212 Remove the expanded source code.
213 This recurses to dependencies unless
217 Remove the port's distfiles and perform the
222 portion recurses to dependencies unless
226 portion never recurses
227 (this is perhaps a bug).
229 Use this to restore a port after using
231 when you should have used
234 Remove an installed port from the system, similar to
237 Remove all installed ports with the same
241 Make a binary package for the port.
242 The port will be installed if it has not already been.
245 file that you can use to
246 install the port on other machines with
248 If the directory specified by
250 does not exist, the package will be put into the current directory.
255 .It Cm package-recursive
258 but makes a package for each depending port as well.
260 Prints the name with version of the port.
264 This can be used from
266 to create a browsable web of all ports on your system!
270 file for the pattern specified by the
272 (searches the port name, comment, and dependencies),
274 (searches the port name only),
276 (searches the port path),
278 (searches the port info),
280 (searches the port maintainer),
282 (searches the port category),
284 (searches the port build-time dependency),
286 (searches the port run-time dependency),
288 (searches the port web site)
290 variables, and their exclusion counterparts:
293 For example, one would type:
295 .Dl "cd /usr/ports && make search name=query"
297 to find all ports whose
300 Results include the matching ports' path, comment, maintainer,
301 build dependencies, and run dependencies.
302 .Bd -literal -offset indent
303 cd /usr/ports && make search name=pear- \e
307 To find all ports whose
310 and which do not have apache
311 listed in build-time dependencies.
312 .Bd -literal -offset indent
313 cd /usr/ports && make search name=pear- \e
317 To find all ports whose names contain
323 .Bd -literal -offset indent
324 make search key=apache display=name,path,info keylim=1
327 To find ports that contain
329 in either of the name, path, info
330 fields, ignore the rest of the record.
332 By default the search is not case-sensitive.
333 In order to make it case-sensitive you can use the
336 .Bd -literal -offset indent
337 make search name=p5-R icase=0
343 Only display name, path and info.
345 Generate a one-line description of each port for use in the
349 Display the port maintainer's email address.
352 .Pa /usr/ports/INDEX ,
360 target will ensure your
362 file is up to date with your ports tree.
371 You can change all of these.
372 .Bl -tag -width ".Va MASTER_SITES"
374 Location of the ports tree.
386 Where to create any temporary files.
389 is read-only (perhaps mounted from a CD-ROM).
391 Where to find/put distfiles, normally
398 target; the base directory for the packages tree, normally
402 If this directory exists, the package tree will be (partially) constructed.
403 This directory does not have to exist; if it does not, packages will be
404 placed into the current directory, or you can define one of
405 .Bl -tag -width ".Va PKGREPOSITORY"
407 Directory to put the package in.
409 The full path to the package.
412 Where existing things are installed and where to search for files when
413 resolving dependencies (usually
416 Where to install this port (usually set to the same as
419 Primary sites for distribution files if not found locally.
421 Primary locations for distribution patch files if not found
423 .It Va MASTER_SITE_FREEBSD
424 If set, go to the master
427 .It Va MASTER_SITE_OVERRIDE
428 Try going to these sites for all files and patches, first.
429 .It Va MASTER_SITE_BACKUP
430 Try going to these sites for all files and patches, last.
431 .It Va RANDOMIZE_MASTER_SITES
432 Try the download locations in a random order.
434 Sort the download locations according to user supplied pattern.
436 .Dl .dk .sunet.se .se dk.php.net .no .de heanet.dl.sourceforge.net
437 .It Va MASTER_SITE_INDEX
446 .Pa http://www.FreeBSD.org/ports/ .
455 .It Va NOCLEANDEPENDS
456 If defined, do not let
458 recurse to dependencies.
460 Command to use to fetch files.
463 .It Va FORCE_PKG_REGISTER
464 If set, overwrite any existing package registration on the system.
467 .Pa libXm. Ns Brq Pa a , Ns Pa so .
469 If defined, only operate on a port if it requires interaction.
471 If defined, only operate on a port if it can be installed 100% automatically.
472 .It Va DISABLE_VULNERABILITIES
473 If defined, disable check for security vulnerabilities using
474 .Xr portaudit 1 Pq Pa ports/ports-mgmt/portaudit
475 when installing new ports.
477 If defined, allow installation of ports marked as
479 The default behavior of the Ports framework is to abort when the
480 installation of a forbidden port is attempted.
481 Of course, these ports may not work as expected, but if you really know
482 what you are doing and are sure about installing a forbidden port, then
486 If defined, skip verifying the port's checksum.
488 If defined, attempt to build a port even if it is marked as
491 Directory where the results of configuring
498 have been configured will have a uniquely named sub-directory, containing a
503 .Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact
505 The default ports directory
510 The default ports directory
512 .It Pa /usr/ports/Mk/bsd.port.mk
523 The following are part of the ports collection:
529 .%B "The FreeBSD Handbook"
532 .Pa http://www.FreeBSD.org/ports
533 (searchable index of all ports)
538 It has since spread to
544 This manual page was originated by
547 Ports documentation is split over four places \(em
548 .Pa /usr/ports/Mk/bsd.port.mk ,
549 .%B "The Porter's Handbook" ,
551 .Dq "Packages and Ports"
553 .%B "The FreeBSD Handbook" ,