14000f72fSDavid E. O'Brien.\" 24000f72fSDavid E. O'Brien.\" Copyright (c) 1997 David E. O'Brien 34000f72fSDavid E. O'Brien.\" 44000f72fSDavid E. O'Brien.\" All rights reserved. 54000f72fSDavid E. O'Brien.\" 64000f72fSDavid E. O'Brien.\" Redistribution and use in source and binary forms, with or without 74000f72fSDavid E. O'Brien.\" modification, are permitted provided that the following conditions 84000f72fSDavid E. O'Brien.\" are met: 94000f72fSDavid E. O'Brien.\" 1. Redistributions of source code must retain the above copyright 104000f72fSDavid E. O'Brien.\" notice, this list of conditions and the following disclaimer. 114000f72fSDavid E. O'Brien.\" 2. Redistributions in binary form must reproduce the above copyright 124000f72fSDavid E. O'Brien.\" notice, this list of conditions and the following disclaimer in the 134000f72fSDavid E. O'Brien.\" documentation and/or other materials provided with the distribution. 144000f72fSDavid E. O'Brien.\" 154000f72fSDavid E. O'Brien.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 164000f72fSDavid E. O'Brien.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 174000f72fSDavid E. O'Brien.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 184000f72fSDavid E. O'Brien.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 194000f72fSDavid E. O'Brien.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 204000f72fSDavid E. O'Brien.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 214000f72fSDavid E. O'Brien.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 224000f72fSDavid E. O'Brien.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 234000f72fSDavid E. O'Brien.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 244000f72fSDavid E. O'Brien.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 254000f72fSDavid E. O'Brien.\" 267f3dea24SPeter Wemm.\" $FreeBSD$ 274000f72fSDavid E. O'Brien.\" 28b66c141bSDavid E. O'Brien.Dd January 25, 1998 294000f72fSDavid E. O'Brien.Dt PORTS 7 304000f72fSDavid E. O'Brien.Os FreeBSD 2.2 314000f72fSDavid E. O'Brien.Sh NAME 324000f72fSDavid E. O'Brien.Nm ports 334000f72fSDavid E. O'Brien.Nd contributed applications 344000f72fSDavid E. O'Brien.Sh DESCRIPTION 354000f72fSDavid E. O'BrienThe 36b5c508fbSRuslan Ermilov.Fx 37b5c508fbSRuslan Ermilov.Nm Ports Collection 384000f72fSDavid E. O'Brienoffers a simple way for users and 394000f72fSDavid E. O'Brienadministrators to install applications. 404000f72fSDavid E. O'BrienEach 4165dfa7aaSTim Vanderhoek.Em port 4265dfa7aaSTim Vanderhoekcontains any patches necessary to make the original 4365dfa7aaSTim Vanderhoekapplication source code compile and run on BSD. Compiling an 4465dfa7aaSTim Vanderhoekapplication is as simple as typing 4565dfa7aaSTim Vanderhoek.Ic make build 4665dfa7aaSTim Vanderhoekin the port directory! The 4765dfa7aaSTim Vanderhoek.Ql Pa Makefile 48e4b22b63SDavid E. O'Brienautomatically fetches the 494000f72fSDavid E. O'Brienapplication source code, either from a local disk or via ftp, unpacks it 5065dfa7aaSTim Vanderhoekon your system, applies the patches, and compiles it. If all goes well, 514000f72fSDavid E. O'Briensimply type 5265dfa7aaSTim Vanderhoek.Ic make install 534000f72fSDavid E. O'Briento install the application. 544000f72fSDavid E. O'Brien.Pp 55b5c508fbSRuslan ErmilovIt is possible to download and use ports from the 56b5c508fbSRuslan Ermilov.Fx 57b5c508fbSRuslan Ermilovrepository 583fea87d2STim Vanderhoekthat are newer than the installed system; however it is important to 596b4c0736STim Vanderhoekinstall the appropriate "Upgrade Kit" from http://www.FreeBSD.org/ports/ 603fea87d2STim Vanderhoekfirst! The 613fea87d2STim Vanderhoek.Xr portcheckout 1 623fea87d2STim Vanderhoekscript (also a port, of course!) will help to download new ports. 633fea87d2STim Vanderhoek.Pp 644000f72fSDavid E. O'BrienFor more information about using ports, see 654000f72fSDavid E. O'Brien.Nm The Ports Collection 664000f72fSDavid E. O'Brien(file:/usr/share/doc/handbook/ports.html --or-- 676b4c0736STim Vanderhoekhttp://www.FreeBSD.org/handbook/ports.html). 684000f72fSDavid E. O'BrienFor information about creating new ports, see 694000f72fSDavid E. O'Brien.Nm Porting applications 704000f72fSDavid E. O'Brien(file:/usr/share/doc/handbook/porting.html --or-- 716b4c0736STim Vanderhoekhttp://www.FreeBSD.org/handbook/porting.html). 72b5c508fbSRuslan ErmilovBoth are part of the 73b5c508fbSRuslan Ermilov.Fx 74b5c508fbSRuslan ErmilovHandbook. 754000f72fSDavid E. O'Brien.Pp 76e4b22b63SDavid E. O'Brien.Sh TARGETS 7765dfa7aaSTim Vanderhoek.Pp 7865dfa7aaSTim VanderhoekSome of the targets work recursively through subdirectories. 7965dfa7aaSTim VanderhoekThis lets you, for example, install all of the biology 8065dfa7aaSTim Vanderhoekports. The targets that do this are 813fea87d2STim Vanderhoek.Ar build , checksum , clean , configure , 823fea87d2STim Vanderhoek.Ar depends , extract , fetch , install , 8365dfa7aaSTim Vanderhoekand 8465dfa7aaSTim Vanderhoek.Ar package . 8565dfa7aaSTim Vanderhoek.Pp 8665dfa7aaSTim VanderhoekThe following targets will be run automatically by each proceeding 8765dfa7aaSTim Vanderhoektarget in order. That is, 8865dfa7aaSTim Vanderhoek.Ar build 8965dfa7aaSTim Vanderhoekwill be run 9065dfa7aaSTim Vanderhoek.Pq if necessary 9165dfa7aaSTim Vanderhoekby 9265dfa7aaSTim Vanderhoek.Ar install , 9365dfa7aaSTim Vanderhoekand so on all the way to 9465dfa7aaSTim Vanderhoek.Ar fetch . 9565dfa7aaSTim VanderhoekYou will usually only target 9665dfa7aaSTim Vanderhoek.Ar install . 9765dfa7aaSTim Vanderhoek.Bl -tag -width configure 9865dfa7aaSTim Vanderhoek.It Ar fetch 99e4b22b63SDavid E. O'BrienFetch all of the files needed to build this port from the site(s) 10065dfa7aaSTim Vanderhoeklisted in MASTER_SITES and PATCH_SITES. See 10165dfa7aaSTim Vanderhoek.Ev FETCH_CMD 10265dfa7aaSTim Vanderhoekand 10365dfa7aaSTim Vanderhoek.Ev MASTER_SITE_OVERRIDE . 10465dfa7aaSTim Vanderhoek.It Ar checksum 10565dfa7aaSTim VanderhoekVerify that the fetched distfile matches the one the port was tested against. 10665dfa7aaSTim VanderhoekDefining 10765dfa7aaSTim Vanderhoek.Ev NO_CHECKSUM 10865dfa7aaSTim Vanderhoekwill skip this step. 10965dfa7aaSTim Vanderhoek.It Ar depends 11065dfa7aaSTim VanderhoekInstall 11165dfa7aaSTim Vanderhoek.Pq or compile if only compilation is necessary 11265dfa7aaSTim Vanderhoekany dependencies of the current port. When called by the 11365dfa7aaSTim Vanderhoek.Ar extract 11465dfa7aaSTim Vanderhoekor 11565dfa7aaSTim Vanderhoek.Ar fetch 11665dfa7aaSTim Vanderhoektargets, this is run in piecemeal as 11765dfa7aaSTim Vanderhoek.Ar fetch-depends , 11865dfa7aaSTim Vanderhoek.Ar build-depends , 11965dfa7aaSTim Vanderhoeketc. Defining 12065dfa7aaSTim Vanderhoek.Ev NO_DEPENDS 12165dfa7aaSTim Vanderhoekwill skip this step. 12265dfa7aaSTim Vanderhoek.It Ar extract 12365dfa7aaSTim VanderhoekExpand the distfile into a work directory. 12465dfa7aaSTim Vanderhoek.It Ar patch 12565dfa7aaSTim VanderhoekApply any patches that are necessary for the port. 12665dfa7aaSTim Vanderhoek.It Ar configure 12765dfa7aaSTim VanderhoekConfigure the port. Some ports will ask you questions during 12865dfa7aaSTim Vanderhoekthis stage. See 12965dfa7aaSTim Vanderhoek.Ev INTERACTIVE 13065dfa7aaSTim Vanderhoekand 13165dfa7aaSTim Vanderhoek.Ev BATCH . 13265dfa7aaSTim Vanderhoek.It Ar build 13365dfa7aaSTim VanderhoekBuild the the port. This is the same as calling the 13465dfa7aaSTim Vanderhoek.Ar all 13565dfa7aaSTim Vanderhoektarget. 13665dfa7aaSTim Vanderhoek.It Ar install 13765dfa7aaSTim VanderhoekInstall the the port and register it with the package system. This 13865dfa7aaSTim Vanderhoekis all you really need to do. 13965dfa7aaSTim Vanderhoek.El 14065dfa7aaSTim Vanderhoek.Pp 14165dfa7aaSTim VanderhoekThe following targets are not run during the normal install process. 14265dfa7aaSTim Vanderhoek.Bl -tag -width fetch-list 14365dfa7aaSTim Vanderhoek.It Ar fetch-list 144e4b22b63SDavid E. O'BrienShow list of files needed to be fetched in order to build the port. 145d3936aa3STim Vanderhoek.It Ar pretty-print-run-depends-list pretty-print-build-depends-list 14665dfa7aaSTim VanderhoekPrint a list of all the compile and run dependencies, and dependencies 14765dfa7aaSTim Vanderhoekof those dependencies. 14865dfa7aaSTim Vanderhoek.It Ar clean 14965dfa7aaSTim VanderhoekRemove the expanded source code. This recurses to dependencies unless 15065dfa7aaSTim Vanderhoek.Ev NOCLEANDEPENDS 15165dfa7aaSTim Vanderhoekis defined. 15265dfa7aaSTim Vanderhoek.It Ar distclean 15365dfa7aaSTim VanderhoekRemove the port's distfile(s) and perform the 15465dfa7aaSTim Vanderhoek.Ar clean 15565dfa7aaSTim Vanderhoekoperation. The 15665dfa7aaSTim Vanderhoek.Sq clean 15765dfa7aaSTim Vanderhoekportion recurses to dependencies unless 15865dfa7aaSTim Vanderhoek.Ev NOCLEANDEPENDS 15965dfa7aaSTim Vanderhoekis defined, but the 16065dfa7aaSTim Vanderhoek.Sq distclean 16165dfa7aaSTim Vanderhoekportion never recurses 16265dfa7aaSTim Vanderhoek.Pq this is perhaps a bug . 16365dfa7aaSTim Vanderhoek.It Ar reinstall 16465dfa7aaSTim VanderhoekUse this to restore a port after using 16565dfa7aaSTim Vanderhoek.Xr pkg_delete 1 16665dfa7aaSTim Vanderhoekwhen you should have used 16765dfa7aaSTim Vanderhoek.Ar deinstall . 16865dfa7aaSTim Vanderhoek.It Ar deinstall 16965dfa7aaSTim VanderhoekRemove an installed port from the system, similar to 17065dfa7aaSTim Vanderhoek.Xr pkg_delete 1 . 17165dfa7aaSTim Vanderhoek.It Ar package 17265dfa7aaSTim VanderhoekMake a binary package for the port. The port will be installed if it 17365dfa7aaSTim Vanderhoekhasn't already been. The package is a .tgz file that you can use to 17465dfa7aaSTim Vanderhoekinstall the port on other machines with 17565dfa7aaSTim Vanderhoek.Xr pkg_add 1 . 17665dfa7aaSTim VanderhoekIf the directory specified by 17765dfa7aaSTim Vanderhoek.Ev PACKAGES 17883d04c76STim Vanderhoekdoes not exist the package will be put into the current directory. 17983d04c76STim VanderhoekSee 18065dfa7aaSTim Vanderhoek.Ev PKGREPOSITORY 18183d04c76STim Vanderhoekand 18265dfa7aaSTim Vanderhoek.Ev PKGFILE . 18383d04c76STim Vanderhoek.It Ar readmes 18483d04c76STim VanderhoekCreate a port's 18583d04c76STim Vanderhoek.Pa README.html . 1866b4c0736STim VanderhoekThis can be used from 1876b4c0736STim Vanderhoek.Pa /usr/ports 1886b4c0736STim Vanderhoekto create a browsable web of all ports on your system! 189def37e7cSMike Pritchard.Sh ENVIRONMENT 19065dfa7aaSTim VanderhoekYou can change all of these. 19165dfa7aaSTim Vanderhoek.Bl -tag -width MASTER_SITES 19265dfa7aaSTim Vanderhoek.It Ev PORTSDIR 19365dfa7aaSTim VanderhoekLocation of the ports tree. This is 19465dfa7aaSTim Vanderhoek.Pa /usr/ports 19565dfa7aaSTim Vanderhoekon 196b5c508fbSRuslan Ermilov.Fx 197e4b22b63SDavid E. O'Brienand 198b5c508fbSRuslan Ermilov.Ox 19965dfa7aaSTim Vanderhoekand 20065dfa7aaSTim Vanderhoek.Pa /usr/pkgsrc 20165dfa7aaSTim Vanderhoekon 20265dfa7aaSTim Vanderhoek.Nx . 2036b4c0736STim Vanderhoek.It Ev WRKDIRPREFIX 2046b4c0736STim VanderhoekWhere to create any temporary files. Useful if 2056b4c0736STim Vanderhoek.Ev PORTSDIR 2066b4c0736STim Vanderhoekis read-only (perhaps mounted from a cdrom). 20765dfa7aaSTim Vanderhoek.It Ev DISTDIR 20865dfa7aaSTim VanderhoekWhere to find/put distfiles, normally 20965dfa7aaSTim Vanderhoek.Pa distfiles/ 21065dfa7aaSTim Vanderhoekin 21165dfa7aaSTim Vanderhoek.Ev PORTSDIR . 21265dfa7aaSTim Vanderhoek.It Ev PACKAGES 21365dfa7aaSTim VanderhoekUsed only for the 21465dfa7aaSTim Vanderhoek.Ar package 21565dfa7aaSTim Vanderhoektarget; the base directory for the packages tree, normally 21665dfa7aaSTim Vanderhoek.Pa packages/ 21765dfa7aaSTim Vanderhoekin 21865dfa7aaSTim Vanderhoek.Ev PORTSDIR . 21965dfa7aaSTim VanderhoekIf this directory exists, the package tree will be (partially) constructed. 22083d04c76STim VanderhoekThis directory does not have to exist; if it doesn't packages will be 22183d04c76STim Vanderhoekplaced into the current directory, or you can define one of 22265dfa7aaSTim Vanderhoek.Bl -tag -width PKGREPOSITORY 22365dfa7aaSTim Vanderhoek.It Ev PKGREPOSITORY 22483d04c76STim VanderhoekDirectory to put the package in. 22565dfa7aaSTim Vanderhoek.It Ev PKGFILE 22665dfa7aaSTim VanderhoekThe full path to the package. 22765dfa7aaSTim Vanderhoek.El 22865dfa7aaSTim Vanderhoek.It Ev PREFIX 22965dfa7aaSTim VanderhoekWhere to install things in general 23065dfa7aaSTim Vanderhoek.Po 23165dfa7aaSTim Vanderhoekusually 23265dfa7aaSTim Vanderhoek.Pa /usr/local 23365dfa7aaSTim Vanderhoekor 23465dfa7aaSTim Vanderhoek.Pa /usr/X11R6 23565dfa7aaSTim Vanderhoek.Pc 23665dfa7aaSTim Vanderhoek.It Ev MASTER_SITES 237e4b22b63SDavid E. O'BrienPrimary sites for distribution files if not found locally. 23865dfa7aaSTim Vanderhoek.It Ev PATCH_SITES 23965dfa7aaSTim VanderhoekPrimary location(s) for distribution patch files if not found 240e4b22b63SDavid E. O'Brienlocally. 24165dfa7aaSTim Vanderhoek.It Ev MASTER_SITE_FREEBSD 242b5c508fbSRuslan ErmilovIf set, go to the master 243b5c508fbSRuslan Ermilov.Fx 244b5c508fbSRuslan Ermilovsite for all files. 24565dfa7aaSTim Vanderhoek.It Ev MASTER_SITE_OVERRIDE 24665dfa7aaSTim VanderhoekTry going to this site for all files and patches, first. 24765dfa7aaSTim Vanderhoek.It Ev NOCLEANDEPENDS 24865dfa7aaSTim VanderhoekIf defined, don't let 24965dfa7aaSTim Vanderhoek.Sq clean 25065dfa7aaSTim Vanderhoekrecurse to dependencies. 25165dfa7aaSTim Vanderhoek.It Ev FETCH_CMD 25265dfa7aaSTim VanderhoekCommand to use to fetch files. Normally 25365dfa7aaSTim Vanderhoek.Xr fetch 1 . 25465dfa7aaSTim Vanderhoek.It Ev FORCE_PKG_REGISTER 25565dfa7aaSTim VanderhoekIf set, overwrite any existing package registration on the system. 25665dfa7aaSTim Vanderhoek.It Ev MOTIFLIB 257e4b22b63SDavid E. O'BrienLocation of libXm.{a,so}. 25865dfa7aaSTim Vanderhoek.It Ev INTERACTIVE 25965dfa7aaSTim VanderhoekIf defined, only operate on a port if it requires interaction. 26065dfa7aaSTim Vanderhoek.It Ev BATCH 26165dfa7aaSTim VanderhoekIf defined, only operate on a port if it can be installed 100% automatically. 26265dfa7aaSTim Vanderhoek.El 2634000f72fSDavid E. O'Brien.Sh FILES 2644000f72fSDavid E. O'Brien.Bl -tag -width /usr/ports/xxxx -compact 2654000f72fSDavid E. O'Brien.It Pa /usr/ports 266b5c508fbSRuslan ErmilovThe default ports directory 267b5c508fbSRuslan Ermilov.Po 268b5c508fbSRuslan Ermilov.Fx 269b5c508fbSRuslan Ermilovand 270b5c508fbSRuslan Ermilov.Ox 271b5c508fbSRuslan Ermilov.Pc . 272e4b22b63SDavid E. O'Brien.It Pa /usr/pkgsrc 2734000f72fSDavid E. O'BrienThe default ports directory (NetBSD). 274652627f0STim Vanderhoek.It Pa /usr/ports/Mk/bsd.port.mk 27565dfa7aaSTim VanderhoekThe big Kahuna. 2764000f72fSDavid E. O'Brien.Sh SEE ALSO 2774000f72fSDavid E. O'Brien.Xr make 1 , 2784000f72fSDavid E. O'Brien.Xr pkg_add 1 , 2794000f72fSDavid E. O'Brien.Xr pkg_create 1 , 2804000f72fSDavid E. O'Brien.Xr pkg_delete 1 , 2813fea87d2STim Vanderhoek.Xr pkg_info 1 , 2827ec24193STim Vanderhoek.Xr pkg_version 1 283def37e7cSMike Pritchard.Pp 284def37e7cSMike PritchardThe following are part of the ports collection: 285def37e7cSMike Pritchard.Pp 286def37e7cSMike Pritchard.Xr pib 1 , 287def37e7cSMike Pritchard.Xr portcheckout 1 , 288ac8011f8SDavid E. O'Brien.Xr portlint 1 28965dfa7aaSTim Vanderhoek.Pp 290b5c508fbSRuslan ErmilovThe 291b5c508fbSRuslan Ermilov.Fx 292b5c508fbSRuslan Ermilovhandbook 293805a2777STim Vanderhoek.Pp 2946b4c0736STim Vanderhoekhttp://www.FreeBSD.org/ports 295805a2777STim Vanderhoek.Pq searchable index of all ports 2964000f72fSDavid E. O'Brien.Sh AUTHORS 297f4d874a1SRuslan Ermilov.An -nosplit 298aaf1f16eSPhilippe CharnierThis man page was originated by 299aaf1f16eSPhilippe Charnier.An David O'Brien . 300aaf1f16eSPhilippe CharnierThe ports collection is maintained by 301aaf1f16eSPhilippe Charnier.An Satoshi Asami 302ac8011f8SDavid E. O'Brienand the Awesome Ports Team. 3034000f72fSDavid E. O'Brien.Sh HISTORY 3044000f72fSDavid E. O'Brien.Nm The Ports Collection 3054000f72fSDavid E. O'Brienappeared in 3064000f72fSDavid E. O'Brien.Fx 1.0 . 3076b4c0736STim VanderhoekIt has since spread to 3086b4c0736STim Vanderhoek.Nx 3096b4c0736STim Vanderhoekand 3106b4c0736STim Vanderhoek.Ox . 31165dfa7aaSTim Vanderhoek.Sh BUGS 31265dfa7aaSTim VanderhoekPorts documentation is split over four places --- 3132693c8b9STim Vanderhoek.Pa /usr/ports/Mk/bsd.port.mk , 31465dfa7aaSTim Vanderhoekthe 31565dfa7aaSTim Vanderhoek.Dq Ports Collection 31665dfa7aaSTim Vanderhoeksection of the handbook, the 31765dfa7aaSTim Vanderhoek.Dq Porting Existing Software 31865dfa7aaSTim Vanderhoeksection of the handbook, and 31965dfa7aaSTim Vanderhoek.Xr ports 7 . 32065dfa7aaSTim Vanderhoek.Pp 32165dfa7aaSTim VanderhoekThis man page is too long. 322