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 For more information about using ports, see
60 .Dq "Packages and Ports"
62 .%B "The FreeBSD Handbook" ,
63 .Pa ( file:/usr/share/doc/en_US.ISO8859-1/books/handbook/ports.html
65 .Pa http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/ports.html ) .
66 For information about creating new ports, see
67 .%B "The Porter's Handbook"
68 .Pa ( file:/usr/share/doc/en_US.ISO8859-1/books/porters-handbook/index.html
70 .Pa http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/porters-handbook/ ) .
72 Some of the targets work recursively through subdirectories.
73 This lets you, for example, install all of the
76 The targets that do this are
77 .Cm build , checksum , clean , configure ,
78 .Cm depends , extract , fetch , install ,
82 The following targets will be run automatically by each proceeding
90 and so on all the way to
92 Usually, you will only use the
95 .Bl -tag -width ".Cm configure"
102 Fetch all of the files needed to build this port from the sites
108 .Va FETCH_CMD , MASTER_SITE_OVERRIDE
110 .Va MASTER_SITE_BACKUP .
112 Verify that the fetched distfile's checksum matches the one the port was
114 If the distfile's checksum does not match, it also fetches the distfiles
115 which are missing or failed the checksum calculation.
121 (or compile if only compilation is necessary)
122 any dependencies of the current port.
127 targets, this is run in piecemeal as
128 .Cm fetch-depends , build-depends ,
134 Expand the distfile into a work directory.
136 Apply any patches that are necessary for the port.
139 Some ports will ask you questions during this stage.
146 This is the same as calling the
150 Install the port and register it with the package system.
151 This is all you really need to do.
154 The following targets are not run during the normal install process.
155 .Bl -tag -width ".Cm fetch-recursive"
159 config for this port.
160 .It Cm showconfig-recursive
163 config for this port and all its dependencies.
167 config for this port.
168 .It Cm rmconfig-recursive
171 config for this port and all its dependencies.
172 .It Cm config-conditional
173 Skip the ports which have already had their
176 .It Cm config-recursive
179 for this port and all its dependencies using
182 Show list of files to be fetched in order to build the port.
183 .It Cm fetch-recursive
184 Fetch the distfiles of the port and all its dependencies.
185 .It Cm fetch-recursive-list
186 Show list of files that would be retrieved by
187 .Cm fetch-recursive .
188 .It Cm run-depends-list , build-depends-list
189 Print a list of all the compile and run dependencies, and dependencies
190 of those dependencies, by port directory.
191 .It Cm all-depends-list
192 Print a list of all dependencies for the port.
193 .It Cm pretty-print-run-depends-list , pretty-print-build-depends-list
194 Print a list of all the compile and run dependencies, and dependencies
195 of those dependencies, by port name and version.
197 Print a list of missing dependencies to be installed for the port.
199 Remove the expanded source code.
200 This recurses to dependencies unless
204 Remove the port's distfiles and perform the
209 portion recurses to dependencies unless
213 portion never recurses
214 (this is perhaps a bug).
216 Use this to restore a port after using
218 when you should have used
221 Remove an installed port from the system, similar to
224 Remove all installed ports with the same
228 Make a binary package for the port.
229 The port will be installed if it has not already been.
232 file that you can use to
233 install the port on other machines with
235 If the directory specified by
237 does not exist, the package will be put into the current directory.
242 .It Cm package-recursive
245 but makes a package for each depending port as well.
247 Prints the name with version of the port.
251 This can be used from
253 to create a browsable web of all ports on your system!
257 file for the pattern specified by the
259 (searches the port name, comment, and dependencies),
261 (searches the port name only),
263 (searches the port path),
265 (searches the port info),
267 (searches the port maintainer),
269 (searches the port category),
271 (searches the port build-time dependency),
273 (searches the port run-time dependency),
275 (searches the port web site)
277 variables, and their exclusion counterparts:
280 For example, one would type:
282 .Dl "cd /usr/ports && make search name=query"
284 to find all ports whose
287 Results include the matching ports' path, comment, maintainer,
288 build dependencies, and run dependencies.
289 .Bd -literal -offset indent
290 cd /usr/ports && make search name=pear- \e
294 To find all ports whose
297 and which do not have apache
298 listed in build-time dependencies.
299 .Bd -literal -offset indent
300 cd /usr/ports && make search name=pear- \e
304 To find all ports whose names contain
310 .Bd -literal -offset indent
311 make search key=apache display=name,path,info keylim=1
314 To find ports that contain
316 in either of the name, path, info
317 fields, ignore the rest of the record.
319 By default the search is not case-sensitive.
320 In order to make it case-sensitive you can use the
323 .Bd -literal -offset indent
324 make search name=p5-R icase=0
330 Only display name, path and info.
332 Generate a one-line description of each port for use in the
336 Display the port maintainer's email address.
339 .Pa /usr/ports/INDEX ,
347 target will ensure your
349 file is up to date with your ports tree.
358 You can change all of these.
359 .Bl -tag -width ".Va MASTER_SITES"
361 Location of the ports tree.
373 Where to create any temporary files.
376 is read-only (perhaps mounted from a CD-ROM).
378 Where to find/put distfiles, normally
385 target; the base directory for the packages tree, normally
389 If this directory exists, the package tree will be (partially) constructed.
390 This directory does not have to exist; if it does not, packages will be
391 placed into the current directory, or you can define one of
392 .Bl -tag -width ".Va PKGREPOSITORY"
394 Directory to put the package in.
396 The full path to the package.
399 Where existing things are installed and where to search for files when
400 resolving dependencies (usually
403 Where to install this port (usually set to the same as
406 Primary sites for distribution files if not found locally.
408 Primary locations for distribution patch files if not found
410 .It Va MASTER_SITE_FREEBSD
411 If set, go to the master
414 .It Va MASTER_SITE_OVERRIDE
415 Try going to these sites for all files and patches, first.
416 .It Va MASTER_SITE_BACKUP
417 Try going to these sites for all files and patches, last.
418 .It Va RANDOMIZE_MASTER_SITES
419 Try the download locations in a random order.
421 Sort the download locations according to user supplied pattern.
423 .Dl .dk .sunet.se .se dk.php.net .no .de heanet.dl.sourceforge.net
424 .It Va MASTER_SITE_INDEX
433 .Pa http://www.FreeBSD.org/ports/ .
442 .It Va NOCLEANDEPENDS
443 If defined, do not let
445 recurse to dependencies.
447 Command to use to fetch files.
450 .It Va FORCE_PKG_REGISTER
451 If set, overwrite any existing package registration on the system.
454 .Pa libXm. Ns Brq Pa a , Ns Pa so .
456 If defined, only operate on a port if it requires interaction.
458 If defined, only operate on a port if it can be installed 100% automatically.
459 .It Va DISABLE_VULNERABILITIES
460 If defined, disable check for security vulnerabilities using
461 .Xr portaudit 1 Pq Pa ports/ports-mgmt/portaudit
462 when installing new ports.
464 If defined, allow installation of ports marked as
466 The default behavior of the Ports framework is to abort when the
467 installation of a forbidden port is attempted.
468 Of course, these ports may not work as expected, but if you really know
469 what you are doing and are sure about installing a forbidden port, then
473 If defined, skip verifying the port's checksum.
475 If defined, attempt to build a port even if it is marked as
478 Directory where the results of configuring
485 have been configured will have a uniquely named sub-directory, containing a
490 .Bl -tag -width ".Pa /usr/ports/Mk/bsd.port.mk" -compact
492 The default ports directory
493 .It Pa /usr/ports/Mk/bsd.port.mk
501 The following are part of the ports collection:
506 .%B "The FreeBSD Handbook"
509 .Pa http://www.FreeBSD.org/ports
510 (searchable index of all ports)
515 It has since spread to
521 This manual page was originated by
524 Ports documentation is split over four places \(em
525 .Pa /usr/ports/Mk/bsd.port.mk ,
526 .%B "The Porter's Handbook" ,
528 .Dq "Packages and Ports"
530 .%B "The FreeBSD Handbook" ,