1.\" $OpenBSD: bsd.port.mk.5,v 1.344 2012/07/07 15:37:35 espie Exp $ 2.\" 3.\" Copyright (c) 2000-2008 Marc Espie 4.\" 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR 17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, 20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26.\" 27.Dd $Mdocdate: July 7 2012 $ 28.Dt BSD.PORT.MK 5 29.Os 30.Sh NAME 31.Nm bsd.port.mk 32.Nd ports tree master Makefile fragment 33.Sh SYNOPSIS 34.Fd .include <bsd.port.mk> 35.Sh DESCRIPTION 36.Nm 37holds all the standard routines used by the ports tree. 38Some variables and targets are for its internal use only. 39The rest is documented here. 40.Pp 41.Nm 42also uses quite a few helper scripts. 43Those live under 44.Pa ${PORTSDIR}/infrastructure/bin , 45and they do have manpages under 46.Pa ${PORTSDIR}/infrastructure/man , 47which is not currently part of the default manpath. 48.Pp 49Other BSD variants, as well as older versions of 50.Nm bsd.port.mk , 51include other targets and variables. 52Conversion methods are outlined here. 53.Pp 54Most variables and targets are documented, with very few exceptions. 55.Pp 56This documentation covers the current targets, variables and paths used by 57.Nm bsd.port.mk . 58There is a separate section covering the fake framework, a section 59explaining flavors and multi-packages, and a section covering 60the generation of package information. 61.Pp 62It ends with sections on obsolete constructs that a porter may need 63when converting from other ports systems. 64.Pp 65Binary package details are mostly covered in 66.Xr pkg_create 1 67for the packing-list details, 68and in 69.Xr pkg_add 1 70for the installation semantics. 71.Pp 72Selected common user activity such as the building of every package in 73the system is covered by 74.Xr ports 7 75instead. 76.Xr packages 7 77provides an overview of the result. 78.Sh TARGETS 79.Bl -tag -width do-configure 80.It Ar {build,run,all,regress}-dir-depends 81Print all dependencies for a port in order to build it, run it, build and 82run it, or to run regression tests. 83The output is formatted as package specification pairs, in a form suitable 84for 85.Xr tsort 1 . 86.It Ar full-{build,run,all}-depends 87Print all dependencies a package depends upon for building, running, 88or both, as a list of package names. 89.It Ar {build,lib,regress,run}-depends-list 90Print a list of first level package specifications a port depends as 91build dependencies, library dependencies, regress dependencies or 92run dependencies. 93.It Ar print-{build,run}-depends 94User convenience target that displays the result of 95.Ar full-{build,run}-depends 96in a more readable way. 97.It Ar {pre,do,post}-* 98Most standard targets can be specialized according to a given port's needs. 99If defined, 100the 101.Ar pre-* 102hook will be invoked before running the normal action; 103the 104.Ar do-* 105hook will be invoked instead of the normal action; 106the 107.Ar post-* 108hook will be invoked after the normal action. 109Specialization hooks exist for 110.Ar build , 111.Ar configure , 112.Ar distpatch , 113.Ar extract , 114.Ar fake , 115.Ar install , 116.Ar patch , 117.Ar regress . 118See individual targets for exceptions. 119.It Ar addsum 120Complete the ${CHECKSUM_FILE} record of checksums with files that have been 121added since 122.Ar makesum . 123Complain if anything does not match. 124.It Ar all-lib-depends 125Process the full 126.Ev LIB_DEPENDS 127list into a form suitable for 128.Xr pkg_create 1 , 129see 130.Ar print-package-args . 131.It Ar build , Ar all 132Default target. 133Build the port. 134Essentially invoke 135.Bd -literal 136env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \e 137 -f ${MAKE_FILE} ${ALL_TARGET} 138.Ed 139.It Ar build-depends 140Verify the ports mentioned in 141.Ev BUILD_DEPENDS , 142by checking the corresponding packages are actually installed, 143and install the missing ports by recursing through the ports tree. 144Deprecated, see 145.Ar prepare . 146.It Ar check-register 147Introspection target. 148Verify from the ports tree, without building anything, that the current 149subpackage will register okay 150.Po 151see 152.Ev PLIST_DB 153.Pc . 154.It Ar check-register-all 155Apply 156.Ar check-register 157to all subpackages of the current port. 158.It Ar checkpatch 159Debugging version of the 160.Ar patch 161target that simulates invoking 162.Xr patch 1 . 163.It Ar checksum 164Check distribution archives and distribution patches control sum against 165the results recorded in ${CHECKSUM_FILE}, 166using the cryptographic signature utilities listed in ${PREFERRED_CIPHERS}. 167All the files needed to recreate a port should be in ${CHECKSUMFILES} and 168checksummed. 169Invoking 170.Ar checksum 171with 172.Ev REFETCH Ns = Ns Cm true 173will try to fetch a version with the correct checksum from the 174.Ox 175main archive site in the case of a checksum mismatch. 176.Ev NO_CHECKSUM 177can be used to avoid all checksumming steps. 178.It Ar clean 179Clean ports contents. 180By default, it will clean the work directory. 181It can be invoked as 182make clean='[depends build bulk work fake flavors dist install sub package 183packages plist]'. 184.Bl -tag -width packages 185.It Va work 186Clean work directory. 187.It Va bulk 188Clean bulk cookie. 189.It Va build 190Clean the 191.Va WRKBUILD 192directory (only useful if 193.Va SEPARATE_BUILD 194is set). 195.It Va depends 196Recurse into dependencies. 197.It Va dist 198Clean distribution files. 199.It Va fake 200Clean fake installation directory. 201.It Va flavors 202Clean all work directories. 203.It Va install 204Uninstall package. 205.It Va package 206Remove all copies of package file. 207.It Va plist 208Remove registered packing lists of all subpackages. 209.It Va sub 210With 211.Va install 212or 213.Va package , 214clean subpackages as well. 215.It Va packages 216Shorthand for `sub package'. 217.It Va all 218Shorthand for `work flavors packages plist'. 219.El 220.It Ar clean-depends 221Short hand for make clean=depends. 222.It Ar configure 223Configure the port. 224Might be a void operation. 225Unless overridden, configure creates the ${WRKBUILD} 226directory (see SEPARATE_BUILD), 227and runs whatever configuration methods are recorded in 228.Ev CONFIGURE_STYLE . 229.It Ar depends 230Check all the port's dependencies, that is: 231.Ar build-depends , 232.Ar lib-depends , 233.Ar run-depends , 234.Ar regress-depends . 235.It Ar describe 236Prints a one-line index entry of the port, suitable for 237.Pa ${PORTSDIR}/INDEX . 238.It Ar distclean 239Short-hand for make clean=dist. 240.It Ar distpatch 241Apply distribution patches only. 242See 243.Ar patch 244and 245.Ev PATCH_CASES 246for details. 247.It Ar dump-vars 248Dump the values of all relevant variables in a port, prepended with the 249port's FULLPKGPATH. 250.It Ar extract 251Extract the distribution files under 252.Pa ${WRKDIR} 253(but see 254.Ev EXTRACT_ONLY ) . 255Refer to 256.Ev EXTRACT_CASES 257for a complete description. 258Do not use 259.Ar pre-extract 260and 261.Ar do-extract 262hooks. 263.It Ar fake 264Do a fake port installation, that is, simulate the port installation under 265${WRKINST}. 266There is no 267.Ar do-fake 268and 269.Ar post-fake 270hooks. 271.Ar fake 272actually uses 273.Ar pre-fake , 274.Ar pre-install , 275.Ar do-install 276and 277.Ar post-install . 278Override 279.Ar pre-install , 280.Ar do-install , 281or 282.Ar post-install 283to change behavior. 284Do not touch 285.Ar pre-fake 286unless you really know what you are doing. 287Described in a separate section below 288.Po 289.Qq THE FAKE FRAMEWORK 290.Pc . 291.It Ar fake-wantlib-args 292Check 293.Ev WANTLIB 294against the list of installed packages and libraries in the ports tree. 295See 296.Ar print-package-args . 297.It Ar fetch 298Fetch the distribution files and patchfiles, using ${FETCH_CMD}. 299Each file of the 300.Ev DISTFILES 301and 302.Ev PATCHFILES 303lists is retrieved, if necessary, from the list of sites in 304.Ev MASTER_SITES . 305If a filename ends with a 306.Sq :0 307to 308.Sq :9 309extension, it will be retrieved from 310.Ev MASTER_SITES0 311to 312.Ev MASTER_SITES9 313instead. 314The ports framework uses 315.Pa ${DISTDIR}/${DIST_SUBDIR} 316(aliased to 317.Pa ${FULLDISTDIR} ) 318to cache the ports distribution files and patch files. 319Note that this framework is also used by mirroring scripts, 320which will also retrieve 321.Ev SUPDISTFILES , 322to fill with supplementary distribution files which are not needed for 323every configuration. 324Use of 325.Ar {pre,do,post}-fetch 326hooks is forbidden, as this would make mirroring of distfiles very complicated. 327See 328.Ev CHECKSUMFILES , 329.Ev CDROM_SITE , 330.Ev DISTDIR , 331.Ev DISTFILES , 332.Ev DIST_SUBDIR , 333.Ev FETCH_CMD , 334.Ev FETCH_MANUALLY , 335.Ev FETCH_SYMLINK_DISTFILES , 336.Ev FULLDISTDIR , 337.Ev MAKESUMFILES , 338.Ev MASTER_SITES , 339.Ev MASTER_SITES0 , ... , 340.Ev MASTER_SITES9 , 341.Ev PATCHFILES , 342.Ev SUPDISTFILES , 343.Ev REFETCH . 344.It Ar index 345Top-level target, see 346.Xr ports 7 . 347.It Ar install 348Install the package after building. 349See the description of THE FAKE FRAMEWORK 350for the non-intuitive details of the way 351.Ar {pre,do,post}-install 352hooks are actually used by the ports tree. 353.It Ar install-all 354Install all packages in a multi-packages port. 355.It Ar lib-depends 356Verify that the library dependencies a port needs are actually there, 357by checking the library specifications. 358.It Ar lib-depends-args 359Filter 360.Ev LIB_DEPENDS 361to keep only entries required by 362.Ev WANTLIB , 363and output a list of dependencies suitable for 364.Xr pkg_create 1 , 365see 366.Ar print-package-args . 367.It Ar lib-depends-check 368Verify that the 369.Ev LIB_DEPENDS 370and 371.Ev WANTLIB 372are accurate for the port. 373See 374.Ar port-lib-depends-check , 375which is quicker. 376.It Ar license-check 377Check that 378.Ev PERMIT_PACKAGE_* 379settings match: 380if any dependency has a more restrictive setting, warn about it. 381This warning is advisory, because the automated license checking cannot 382figure out which ports were used only for building and did not taint 383the current port. 384.It Ar link-categories 385Create symbolic links in other directories that correspond to the port's 386.Ev CATEGORIES . 387Note that this does not affect bulk package building, since those links 388don't appear in the upper-level Makefiles. 389See also 390.Ar unlink-categories . 391.It Ar lock 392Manually obtain a lock on a given directory. 393Output must be used to update environment variables. 394The lock can be released with 395.Ar unlock . 396Seldom used, see 397.Xr ports 7 398for details. 399.It Ar makesum 400Create the ${CHECKSUM_FILE} list of recorded checksums by running the 401cryptographic fingerprints sha256, sha1, md5 and rmd160 on ${MAKESUMFILES}. 402.Ev NO_CHECKSUM 403can be used to avoid all checksumming steps. 404.It Ar manpages-check 405Verify that 406.Xr makewhatis 8 407can do a correct job with the port's manpages. 408.It Ar mirror-maker 409Top-level target, see 410.Xr mirroring-ports 7 . 411.It Ar mirror-maker-fetch 412Debug target: generate the 413.Ar mirror-maker 414makefile fragment and use it 415to fetch files, see 416.Xr mirroring-ports 7 . 417.It Ar no-lib-depends-args 418Degenerate form of 419.Ar lib-depends-args 420that does not do anthing. 421See 422.Ar print-package-args . 423.It Ar no-wantlib-args 424Degenerate form of 425.Ar wantlib-args 426that does not do anything. 427See 428.Ar print-package-args . 429.It Ar package 430Build a port package (or packages in a 431.Ev MULTI_PACKAGES 432case) from the fake installation. 433Involves creating packaging information from templates 434(see 435.Ev COMMENT , 436.Ev SUBST_VARS 437among others) and invoking 438.Xr pkg_create 1 439for each package in the 440.Ev MULTI_PACKAGES 441list. 442If the repository already contains up-to-date packages, they are not rebuilt. 443If PLIST_DB is set, the resulting packaging information is compared 444with existing stuff, and saved if new, with loud complaints if it changed 445without a REVISION bump. 446Arch-independent packages are created in ${PACKAGE_REPOSITORY}/no-arch, 447and copied into ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all as needed. 448If ${PERMIT_PACKAGE_FTP} is set to 449.Sq Yes , 450copies built packages into ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/ftp, using 451hard links if possible. 452If ${PERMIT_PACKAGE_CDROM} is set to 453.Sq Yes , 454copies built packages into ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cdrom, using 455hard links if possible. 456.It Ar patch 457Apply distribution and 458.Ox 459specific patches. 460Because of historical accident, 461.Ar patch 462does not follow the exact same scheme other standard targets do. 463Namely, 464.Ar patch 465invokes 466.Ar pre-patch 467(if defined), 468.Ar do-patch , 469and 470.Ar post-patch , 471but the default 472.Ar do-patch 473target invokes 474.Ar distpatch 475directly. 476So, if the 477.Ar do-patch 478target is overridden, it should still begin by calling 479make distpatch, before applying 480.Ox 481specific patches. 482Accordingly, the exact sequence of hooks is: 483.Ar pre-patch , 484.Ar do-distpatch , 485.Ar post-distpatch , 486.Ar do-patch , 487.Ar post-patch . 488If 489.Pa ${PATCHDIR} 490exists, the files described under 491.Ev PATCH_LIST 492will be applied under 493.Ev WRKDIST . 494See also 495.Ev REORDER_DEPENDENCIES 496for possible 497.Ar post-patch 498clean-up. 499.It Ar peek-ftp 500Connect to the first site in 501.Ev MASTER_SITES , 502in the right directory, and leaves user at 503.Xr ftp 1 Ns 's 504prompt. 505.It Ar pkglocatedb 506Top-level target, see 507.Xr ports 7 . 508.It Ar port-lib-depends-check 509Verify that the 510.Ev LIB_DEPENDS 511and 512.Ev WANTLIB 513hold all shared libraries used for every package in the port. 514See 515.Xr library-specs 7 . 516This makes use of 517.Ar print-plist-with-depends 518to avoid actually building the packages, it only needs the 519completion of the 520.Ar fake 521stage, and thus is quicker than 522.Ar lib-depends-check , 523unless you already have all binary packages. 524.It Ar port-wantlib-args 525Resolve 526.Ev WANTLIB 527against the ports tree itself and system libraries, without looking at built 528or installed packages, and writes a list of options suitable for 529.Xr pkg-create 1 . 530See 531.Ar print-package-args . 532.It Ar prepare 533Prepare a port for building, by checking and installing all required 534dependencies, constructed from 535.Ev LIB_DEPENDS 536and 537.Ev BUILD_DEPENDS . 538In 539.Ev MULTI_PACKAGES 540setups, 541see 542.Qq Flavors and multi-packages . 543.It Ar print-package-args 544Print all dependency-related information that will be passed as parameters 545to 546.Xr pkg_create 1 , 547\&.e.g., 548.Fl W Ar wantlib 549and 550.Fl P Ar depends 551lines. 552.Pp 553Those parameters are generated by 554.Ar run-depends-args 555for 556.Ev RUN_DEPENDENCIES 557handling, a form of 558.Ar lib-depends-args 559for 560.Ev LIB_DEPENDS 561and 562.Ev WANTLIB 563interaction, 564and a form of 565.Ar wantlib-args 566for 567.Ev WANTLIB 568resolution. 569.Pp 570Variables 571.Ev lib_depends_args 572and 573.Ev wantlib_args 574control the exact behavior: 575.Ev lib_depends_args 576is normally set to 577.Ar lib-depends-args , 578but will be set to 579.Ar all-lib-depends-args 580by 581.Ar port-lib-depends-check , 582in order to have access to the full list of LIB_DEPENDS for figuring 583out missing WANTLIB. 584.Ev wantlib_args 585is normally set to 586.Ar wantlib-args 587but it may be set to 588.Ar port-wantlib-args 589for introspection purposes, 590to 591.Ar fake-wantlib-args 592to avoid some checks, or to 593.Ar no-wantlib-args 594to avoid expensive WANTLIB checks entirely. 595.It Ar print-package-signature 596Print the package signature, as computed using information from the ports tree, 597in the same format used for 598.Xr pkg_info 1 599.Fl S . 600.It Ar print-plist 601Generate and print a package packing-list from the static information 602present in the port. 603.It Ar print-plist-all 604Iterate over 605.Ar print-plist 606for all subpackages in a given port. 607.It Ar print-plist-all-with-depends 608Iterate over 609.Ar print-plist-with-depends 610for all subpackages in a given port. 611.It Ar print-plist-contents 612Generate and print package contents from the static information 613present in the port. 614In contrast with 615.Ar print-plist , 616the package contents only consists of files, all tagged with category 617markers such as @file. 618See 619.Xr pkg_create 1 . 620.It Ar print-plist-libs 621Generate and print the list of static and dynamic libraries present in the port. 622See 623.Xr pkg_create 1 . 624.It Ar print-plist-libs-with-depends 625Like 626.Ar print-plist-libs , 627but slower. 628It also handles 629.Ev LIB_DEPENDS , 630.Ev RUN_DEPENDS , 631and 632.Ev WANTLIB , 633so that the packing-list has complete dependency information. 634.It Ar print-plist-with-depends 635Like 636.Ar print-plist , 637but slower. 638It also handles 639.Ev LIB_DEPENDS , 640.Ev RUN_DEPENDS , 641and 642.Ev WANTLIB , 643so that the packing-list is complete. 644.It Ar rebuild 645Force rebuild of the port. 646.It Ar regress 647Run regression tests for the port. 648Essentially depend on a correct build and invoke 649.Bd -literal 650env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${ALL_REGRESS_FLAGS} \e 651 -f ${MAKE_FILE} ${REGRESS_TARGET} ${REGRESS_LOG} 652.Ed 653.Pp 654If a port needs some other ports installed to run regression tests, 655use 656.Ev REGRESS_DEPENDS . 657If a port needs special configuration or build options to enable regression 658testing, define a 659.Sq regress 660.Ev FLAVOR . 661.It Ar regress-depends 662Verify packages needed for regression tests, using the same scheme as 663.Ar build-depends . 664Only invoked when regression tests are run, or explicitly through 665.Ar depends . 666.It Ar reinstall 667Force reinstallation of a port, by first cleaning the old installation. 668Seldom needed, as 669.Ar update 670will often do the right thing. 671.It Ar repackage 672Rebuild the packages of a port after removing existing packages. 673.It Ar run-depends 674Verify the ports mentioned in 675.Ev RUN_DEPENDS , 676by checking the corresponding packages are actually installed, 677and install the missing ports by recursing through the ports tree. 678Invoked right before installing the package. 679.It Ar run-depends-args 680Process 681.Ev RUN_DEPENDS 682and outputs a list of dependencies suitable for 683.Xr pkg_create 1 , 684see 685.Ar print-package-args . 686.It Ar show 687Invoked as make show=name, show the contents of ${name}. 688Invoked as make show="name1 name2 ...", 689show the contents of ${name1} ${name2} ..., 690one variable value per line. 691Mostly used from recursive makes, or to know the contents of another 692port's variables without guessing wrongly. 693.It Ar show-fake-size 694Print the size of ${WRKINST}. 695Used by some options of 696.Xr dpb 1 , 697suitable for 698.Ev BULK_TARGETS . 699.It Ar show-prepare-results 700Print the list of actual installed packages found out by 701.Ar prepare . 702.It Ar show-required-by 703Print the list of 704.Xr pkgpath 7 705for all ports that will be affected by the 706current port changing. 707Works by walking the list of dependencies, in reverse. 708.It Ar show-run-depends 709Print all running dependencies for a port, one per-line, without duplicates. 710.It Ar subpackage 711Build a port package. 712Exactly like 713.Ar package , 714but affects only one single subpackage in multi-packages ports. 715.It Ar show-size 716Prints the size of the work directory. 717Used by some options of 718.Xr dpb 1 , 719suitable for 720.Ev BULK_TARGETS . 721.It Ar subupdate 722Update an existing installation to a newer package, exactly 723like 724.Ar update , 725but affects only one single subpackage in multi-packages ports. 726.It Ar unlink-categories 727Remove symbolic links in other directories that correspond to the port's 728.Ev CATEGORIES . 729See also 730.Ar link-categories . 731.It Ar unlock 732Manually release a lock on a given directory. 733See 734.Ar lock . 735.It Ar update-patches 736Create or update patches for a port, using 737.Xr diff 1 738between 739.Pa file 740and 741.Pa file.orig , 742based on 743.Pa file.orig 744existence. 745In order to generate a patch, the original file needs to be named 746.Pa file.orig 747and 748.Pa file 749edited. 750After the target is invoked, the patches are placed under the 751patches/ directory. 752It moves existing patches from 753.Pa patch-file 754to 755.Pa patch-file.orig 756.It Ar update 757Update an existing installation to a newer package: 758scan the installation for a package with the same 759.Ev FULLPKGPATH , 760and update it using 761.Sq pkg_add -r 762if a newer package is available. 763In multi-packages ports, all relevant packages are updated. 764See 765.Ev UPDATE_COOKIES_DIR 766and 767.Ev FORCE_UPDATE 768as well. 769.It Ar update-or-install 770Update an installed package or perform a fresh installation, 771by using 772.Sq pkg_add -r . 773Handles one single package in multi-packages ports. 774See 775.Ev UPDATE_COOKIES_DIR 776and 777.Ev FORCE_UPDATE 778as well. 779.It Ar update-or-install-all 780Update installed packages or perform a fresh installation, 781by using 782.Sq pkg_add -r . 783Handles all packages in multi-packages ports. 784See 785.Ev UPDATE_COOKIES_DIR 786and 787.Ev FORCE_UPDATE 788as well. 789.It Ar update-plist 790Update the packing lists for a port, using the fake installation and the 791existing packing lists. 792.Ar update-plist 793should produce mostly correct 794.Pa PLIST , 795.Pa PFRAG.shared 796and 797.Pa PFRAG.no-shared 798files, handling shared libraries, GNU 799.Xr info 1 800files, setuid files, and empty directories. 801It moves existing files to 802.Pa PLIST.orig , 803.Pa PFRAG.shared.orig 804and 805.Pa PFRAG.no-shared.orig . 806If the generated lists include files and directories that shouldn't be 807included, comment these like this: 808.Bd -literal 809@comment unwanted-file 810@comment unwanted-dir/ 811.Ed 812.Pp 813Subsequent calls to 814.Ar update-plist 815will automatically recognize and handle such lines correctly. 816.Pp 817.Ar update-plist 818may not handle flavor and multi-packages situations correctly yet, so beware. 819.It Ar verbose-show 820Similar to 821.Ar show , 822except that it prefixes each value with the variable name, e.g. 823.Li VAR=value . 824Also note that it does not show undefined variables, contrary to 825.Ar show 826which outputs blank lines for these. 827.It Ar wantlib-args 828Call 829.Ar port-wantlib-args 830and 831.Ar fake-wantlib-args 832and compare the results, errors out in case of discrepancies. 833See 834.Ar print-package-args . 835.El 836.Sh VARIABLES 837Note that some variables are marked as 838.Sq User-settings , 839which means that individual ports should not modify them, 840and that some variables are marked as 841.Sq read-only , 842which means that they shouldn't ever be changed. 843In a 844.Ev MULTI_PACKAGES 845setup, some variables have settings specific to a given subpackage. 846See 847.Qq Flavors and multi-packages . 848.Bl -tag -width MASTER_SITES 849.It Ev show 850Invoked as make show=name, show the contents of ${name}. 851Invoked as make show="name1 name2 ...", show the contents of 852${name1} ${name2} ..., 853one variable value per line. 854.It Ev ALL_FAKE_FLAGS 855Flags passed to ${MAKE} invocations during the fake process. 856Equals 857.Li ${MAKE_FLAGS} ${DESTDIRNAME}=${WRKINST} ${FAKE_FLAGS} . 858Read-only. 859.It Ev ALL_REGRESS_FLAGS 860Flags passed to ${MAKE} invocations during regress. 861Equals 862.Li ${MAKE_FLAGS} ${REGRESS_FLAGS} . 863Read-only. 864.It Ev ALL_TARGET 865Target used to build software. 866Default is 867.Sq all . 868Can be set to empty, to yield a package's default target. 869.It Ev APM_ARCHS 870Set to the list of 871.Xr apm 4 872architectures. 873Read-only. 874Use with 875.Ev ONLY_FOR_ARCHS . 876.It Ev ARCH 877Current machine architecture. 878Read-only. 879.It Ev AUTOCONF 880Location of the autoconf binary if needed. 881Defaults to autoconf (though autoreconf might be more appropriate). 882.It Ev AUTOCONF_DIR 883Where to invoke autoconf if ${CONFIGURE_STYLE} includes autoconf. 884Defaults to ${WRKSRC}. 885.\" AUTOCONF_DIR should probably be a list, and be renamed to AUTOCONF_DIRS ? 886.It Ev AUTOCONF_VERSION 887Starting with 888.Ox 3.3 , 889several versions of autoconf may coexist peacefully. 890The main autoconf script is a shell wrapper in the 891.Pa devel/metaauto 892package, and similarly for automake. 893Setting 894.Ev AUTOCONF_VERSION 895along with 896.Ev CONFIGURE_STYLE 897set to autoconf is the correct way to specify which one to use. 898.Ev AUTOCONF_VERSION 899defaults to 2.13. 900If autoconf must be run manually, 901.Ev MODGNU_AUTOCONF_DEPENDS 902can be used to specify what packages to depend upon. 903.It Ev AUTOHEADER 904Location of the autoheader binary. 905Defaults to autoheader. 906.It Ev AUTOMAKE_VERSION 907Several versions of automake may coexist peacefully. 908.Ev AUTOMAKE_VERSION 909must be set before trying to run automake. 910Defaults to 1.4. 911Note that even if 912.Ev CONFIGURE_STYLE 913includes automake, 914automake should still be run manually during the right 915.Ar configure 916stage. 917.It Ev AUTOUPDATE 918Location of the autoupdate binary. 919Defaults to autoupdate. 920.It Ev BASE_PKGPATH 921Full 922.Xr pkgpath 7 923to the current port, taking flavors into account. 924See also 925.Ev BUILD_PKGPATH , 926which also includes pseudo-flavors. 927Read-only. 928.It Ev BASELOCALSTATEDIR 929User settings. 930Base location for system-wide state directory. 931Defaults to 932.Pa /var . 933See 934.Ev LOCALSTATEDIR . 935.It Ev BASESYSCONFDIR 936User settings. 937Base location for system-wide configuration files. 938Defaults to 939.Pa /etc . 940See 941.Ev SYSCONFDIR . 942.It Ev BATCH 943User-settings. 944Set to 945.Sq Yes 946to avoid ports that require user-interaction. 947Use in conjunction with 948.Ev INTERACTIVE 949to simplify bulk-package builds. 950.Pq See IGNORE . 951.It Ev BE_ARCHS 952Set to the list of big-endian architectures. 953Read-only. 954Use with 955.Ev NOT_FOR_ARCHS 956and 957.Ev ONLY_FOR_ARCHS . 958.It Ev BUILD_PACKAGES 959The actual list of packages that will be built, once architecture problems 960and pseudo-flavors have been taken into account. 961See 962.Qq Flavors and multi-packages . 963.It Ev BROKEN 964Define only for broken ports, set to reason the port is broken. 965See also 966.Ev NO_IGNORE , 967.Ev TRY_BROKEN . 968.It Ev BROKEN-<arch> 969Define only for ports broken on a given architecture. 970Distinct from 971.Ev ONLY_FOR_ARCHS 972and 973.Ev NOT_FOR_ARCHS , 974which are used to mark ports for which support for some architectures 975does not exist at all, or is completely obsolete. 976.It Ev BSD_INSTALL_{PROGRAM,SCRIPT,DATA,MAN}[_DIR] 977Macros passed to make and configure invocations. 978Set based on corresponding INSTALL_* variables. 979.It Ev BUILD_DEPENDS 980List of other ports the current port needs to build correctly. 981Each item has the form 982.Sq [pkgspec:]pkgpath[:target] . 983.Sq target 984defaults to 985.Sq install 986if it is not specified. 987The package installed must conform to the 988.Sq pkgspec , 989which is by default obtained from the dependent 990.Sq pkgpath 991.Po 992see 993.Ev PKGSPEC 994.Pc . 995If no installation is involved, the infrastructure will still check 996that the directory would provide a package conforming to the 997.Sq pkgspec . 998.Sq pkgpath 999is set relative to ${PORTSDIR}, 1000see 1001.Xr pkgpath 7 1002for details. 1003Build dependencies are checked before the 1004.Ar extract 1005stage during 1006.Ar prepare . 1007.Pp 1008Build dependencies with a 1009.Ar patch , 1010.Ar configure 1011or 1012.Ar build 1013target will be processed in a subdirectory of the working directory, 1014specifically, in ${WRKDIR}/some/directory, 1015with 1016.Pa some/directory 1017the directory part of the 1018.Sq pkgpath . 1019.It Ev BUILD_PKGPATH 1020Full 1021.Xr pkgpath 7 1022to the current port, taking flavors and pseudo-flavors 1023into account. 1024See also 1025.Ev BASE_PKGPATH , 1026which doesn't include pseudo-flavors. 1027Mostly useful to write dependencies for subpackages like this: 1028.Li "LIB_DEPENDS-foo=${BUILD_PKGPATH}" 1029and avoid starting to build a package with some other flavor combination. 1030See 1031.Xr pkgpath 7 1032on the subject of 1033.Sq pkgpath normalisation . 1034Read-only. 1035.It Ev BULK 1036User settings. 1037If set to 1038.Sq Yes , 1039successful package builds and installations will clean 1040their working directories, after invoking 1041any targets mentioned in BULK_TARGETS, 1042and commands mentioned in BULK_DO. 1043Can be set on a per-${PKGPATH} basis. 1044For instance, setting BULK_misc/screen=No 1045will override any BULK=Yes passed on the command line. 1046See 1047.Ev BULK_COOKIES_DIR , 1048.Ev TRUST_PACKAGES . 1049.It Ev BULK_COOKIES_DIR 1050User settings. 1051Used to store cookies for successful bulk-package builds, defaults to 1052.Pa ${PORTSDIR}/bulk/${MACHINE_ARCH} . 1053.It Ev BULK_DO 1054Commands to run after each bulk package build before cleaning up the 1055working directory. 1056Empty defaults. 1057Can be set on a per-${PKGPATH} basis, e.g., 1058BULK_DO_${PKGPATH}=... 1059.It Ev BULK_FLAGS 1060Flags to pass to build each target in 1061.Ev BULK_TARGETS . 1062.It Ev BULK_TARGETS 1063Targets to run after each bulk package build before cleaning up the 1064working directory. 1065Empty defaults. 1066Can be set on a per-${PKGPATH} basis, e.g., 1067BULK_TARGETS_${PKGPATH}=... 1068.It Ev BZIP2 1069Name of the bzip2 binary. 1070.It Ev CATEGORIES 1071List of descriptive categories into which this port falls. 1072Mandatory. 1073One entry must match the current pkgpath: 1074.Pa devel/gmake 1075must belong to the 1076.Sq devel 1077category. 1078See 1079.Ar link-categories , 1080.Ar unlink-categories . 1081.It Ev CDIAGFLAGS 1082Flags appended to 1083.Ev CFLAGS 1084if 1085.Ev WARNINGS 1086is set. 1087.It Ev CCACHE_DIR 1088Sets the cache directory used when 1089.Ev USE_CCACHE 1090is set to yes. 1091Defaults to ${WRKOBJDIR}/.ccache. 1092Can be set on a per-${PKGPATH} basis. 1093For instance, setting CCACHE_DIR_www/mozilla=/tmp/ccache 1094will affect only the mozilla port. 1095.It Ev CCACHE_ENV 1096Sets additional environment variables when 1097.Ev USE_CCACHE 1098is set to yes. 1099For instance, to enable verbose logging, set 1100CCACHE_ENV="CCACHE_LOGFILE=/tmp/ccache.log" 1101.It Ev CDROM_SITE 1102Path to a local source that holds distribution files (usually a CD-ROM 1103or other similar media), used to retrieve distribution files before going 1104to the network. 1105Defaults to empty, set to 1106.Pa /cdrom/distfiles/${DIST_SUBDIR} 1107to check that path. 1108Distribution files are still copied or linked (see 1109.Ev FETCH_SYMLINK_DISFILES ) 1110into 1111.Ev DISTDIR 1112if they are found under CDROM_SITE. 1113.It Ev CFLAGS 1114Default flags passed to the compiler for building. 1115Many ports ignore it. 1116See also 1117.Ev COPTS , 1118.Ev CDIAGFLAGS . 1119.It Ev CHECK_LIB_DEPENDS 1120User settings. 1121If set to 1122.Sq Yes , 1123every package build will verify that shared libraries are correctly 1124registered. 1125This is essentially the same as running 1126.Nm make Ar lib-depends-check 1127after each package build. 1128Defaults to 1129.Sq \&No , 1130as this can be a big performance hit. 1131.It Ev CHECKSUMFILES 1132List of all files that need to be retrieved by 1133.Ar fetch , 1134with 1135.Ev DIST_SUBDIR 1136prepended and with the master site selection extension removed. 1137Read-only. 1138See also 1139.Ev MAKESUMFILES . 1140.It Ev CHECKSUM_FILE 1141Location for this port's checksums, used by 1142.Ar addsum , 1143.Ar checksum , 1144and 1145.Ar makesum . 1146Defaults to 1147.Pa distinfo . 1148.It Ev CHECKSUM_PACKAGES 1149User settings. 1150Choose whether or not to checksum packages while building. 1151Deposits result in 1152.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cksums/${FULLPKGNAME}.sha256 . 1153Can be set to 1154.Sq Yes 1155to compute a checksum for all packages, 1156.Sq cdrom 1157to compute it only for 1158.Ev PERMIT_PACKAGE_CDROM 1159packages 1160or to 1161.Sq ftp 1162to compute it only for 1163.Ev PERMIT_PACKAGE_FTP 1164packages. 1165Defaults to 1166.Sq no , 1167which does not compute a checksum at all. 1168.It Ev CLEANDEPENDS 1169If set to 1170.Sq Yes , 1171.Sq make clean 1172will also clean dependencies. 1173Can be overridden on a per-${PKGPATH} basis, 1174by setting CLEANDEPENDS_${PKGPATH}. 1175.It Ev COMMENT 1176Short, one line description of the port, used for the package, and in the 1177INDEX. 1178.It Ev COMMENT-foo 1179Same as COMMENT but used for sub package -foo in a multi-package setup. 1180.It Ev COMMENT-vanilla 1181Same as COMMENT but used for a flavored package, if the non-flavored comment 1182is inappropriate. 1183.It Ev COMMENT-foo-vanilla 1184Same as COMMENT but used for a sub-, flavored package. 1185.It Ev COMES_WITH 1186The first release where the port was made part of the standard 1187distribution. 1188If the current 1189.Ox 1190version is >= this version then a notice 1191will be displayed instead of the port being built. 1192.It Ev CONFIG_SITE_LIST 1193Used when 1194.Li CONFIGURE_STYLE=gnu , 1195or with 1196.Li MODULES += gnu . 1197List of 1198.Pa config.site 1199fragments that will speed up gnu-configure, and prevent it from 1200preferring various gnu programs, unless 1201.Ev BUILD_DEPENDS 1202explicitly ask for them. 1203Read-only, available for debugging purposes. 1204.It Ev CONFIGURE_ARGS 1205Arguments to pass to configure script. 1206Defaults are empty, except for 1207GNU-style configure, where prefix and sysconfdir are set. 1208.It Ev CONFIGURE_ENV 1209Basic environment passed to configure script (path and libtool setup). 1210GNU-style configure adds a lot more variables. 1211.It Ev CONFIGURE_SCRIPT 1212Set to name of script invoked by 1213.Ar configure 1214target, if appropriate. 1215Should be either an absolute path, or relative to ${WRKSRC}. 1216.It Ev CONFIGURE_SHARED 1217Set by default to --enable-shared or --disable-shared, depending on whether 1218the architecture supports shared libraries. 1219Should be appended to CONFIGURE_ARGS, for ports that build dynamic libraries 1220and whose configure script supports these options. 1221.It Ev CONFIGURE_STYLE 1222Set to style of configuration that needs to happen. 1223.Pp 1224If 1225.Sq perl , 1226assume 1227.Xr perl 1 1228.Xr ExtUtils::MakeMaker 3p 1229style. 1230Add 1231.Sq modbuild , 1232to enable 1233.Xr perl 1 1234.Xr Module::Build 3p 1235or 1236.Sq modinst 1237for 1238.Xr Module::Install 3p 1239style. 1240.Pp 1241If 1242.Sq gnu , 1243assume 1244GNU configure style. 1245Add 1246.Sq dest 1247if port does not handle DESTDIR correctly, and needs to be configured to 1248add DESTDIR to prefixes 1249.Po 1250see also 1251.Ev DESTDIRNAME 1252.Pc . 1253Add 1254.Sq old 1255if port is an older autoconf port that does not recognize --sysconfdir. 1256Add 1257.Sq autoconf 1258if autoconf needs to be rerun first, 1259but set 1260.Sq no-autoheader 1261to prevent autoheader from running. 1262Add 1263.Sq automake 1264if automake may need to be rerun. 1265Otherwise, automake will be explicitly disabled. 1266Note that automake is never run automatically. 1267In order to use it, 1268.Ev CONFIGURE_STYLE 1269should include 1270.Sq automake 1271and there should be a 1272.Ar {pre,do}-configure 1273target running automake. 1274.Pp 1275If 1276.Sq imake , 1277assume port configures using X11 ports Imakefile framework. 1278Add 1279.Sq noman 1280if port has no man pages the Imakefile should try installing. 1281.Pp 1282If 1283.Sq simple , 1284there is a configure script, but it does not fit the normal GNU configure 1285conventions. 1286.Pp 1287Extensions may be defined by specific MODULES. 1288See 1289.Xr port-modules 5 1290for details. 1291.It Ev COPTS 1292User settings. 1293Supplementary options appended to ${CFLAGS} for building. 1294Since most ports ignore the COPTS convention, they are actually told to use 1295${CFLAGS} ${COPTS} as CFLAGS. 1296.It Ev CXXDIAGFLAGS 1297Flags appended to 1298.Ev CXXFLAGS 1299if 1300.Ev WARNINGS 1301is set. 1302.It Ev CXXFLAGS 1303Default flags passed to the C++ compiler for building. 1304Many ports ignore it. 1305.It Ev CXXOPTS 1306User settings. 1307Supplementary options appended to ${CXXFLAGS} for building. 1308.It Ev DESTDIR 1309See 1310.Ev DESTDIRNAME . 1311.It Ev DESTDIRNAME 1312Name of variable to set to ${WRKINST} while faking. 1313Usually DESTDIR. 1314To be used in the rare cases where a port heeds DESTDIR in a few 1315directories and needs to be configured with 1316.Sq gnu dest , 1317so that those few directories do not get in the way. 1318.It Ev DISTDIR 1319User settings. 1320Directory where all ports distribution files and patchfiles are stashed. 1321Defaults to 1322.Pa ${PORTSDIR}/distfiles . 1323Override if distribution files are stored elsewhere. 1324Always use 1325.Ev FULLDISTDIR 1326to refer to ports' distribution files location, as it takes an eventual 1327.Ev DIST_SUBDIR 1328into account. 1329.It Ev DISTFILES 1330The main port's distribution files (the actual software source, except 1331for binary-only ports). 1332Will be retrieved from the MASTER_SITES (see 1333.Ar fetch ) , 1334checksummed and extracted (see 1335.Ar checksum , 1336.Ar extract ) . 1337.Ev DISTFILES 1338normally holds a list of files, possibly with 1339.Sq :0 1340to 1341.Sq :9 1342appended to select a different 1343.Ev MASTER_SITES . 1344See also 1345.Ev SUPDISTFILES . 1346.It Ev DISTNAME 1347Name used to identify the port. 1348See 1349.Ev DISTFILES 1350and 1351.Ev PKGNAME . 1352.It Ev DISTORIG 1353Suffix used by 1354.Ar distpatch 1355to rename original files. 1356Defaults to 1357.Pa .bak.orig . 1358Distinct from 1359.Pa .orig 1360to avoid confusing 1361.Ar update-patches . 1362.It Ev DIST_SUBDIR 1363Optional subdirectory of ${DISTDIR} where the current port's distribution 1364files and patchfiles will be located. 1365See target 1366.Ar fetch . 1367.It Ev DPB 1368Set by the distributed ports builder to only get the information it needs 1369from 1370.Ar dump-vars . 1371.It Ev ECHO_MSG 1372User settings. 1373Used to display 1374.Sq ===> Configuring for foo 1375and similar informative messages. 1376Override to turn off, for instance. 1377.It Ev ECHO_REORDER 1378User settings. 1379Set it to 1380.Sq echo 1381to see 1382.Ev REORDER_DEPENDENCIES 1383actions. 1384Silent by default. 1385.It Ev EPOCH 1386Epoch number of the current package. 1387Defaults to empty (no need for numbering changes), then 1388numbering starts at 0. 1389Gets automatically incorporated into 1390.Ev FULLPKGNAME 1391as 1392.Sq v${EPOCH} 1393to form a full package-name conforming to 1394.Xr packages-specs 7 . 1395.It Ev ERRORS 1396List of errors found while parsing the port's Makefile. 1397Display the errors before making any target, and if any error starts with 1398.Qq Fatal: , 1399do not make anything. 1400For instance: 1401.Bd -literal -offset indent 1402\&.if !defined(COMMENT) 1403ERRORS+="Fatal: Missing comment" 1404\&.endif 1405.Ed 1406Porter can add to 1407.Ev ERRORS , 1408for instance to flag erroneous combinations of 1409.Ev FLAVORS 1410(but see 1411.Ev ONLY_FOR_ARCHS 1412.Ev NOT_FOR_ARCHS 1413and 1414.Ev BROKEN 1415for other common issues). 1416.It Ev EXTRACT_CASES 1417In the normal extraction stage (when 1418.Ev EXTRACT_ONLY 1419is not empty), this is the contents of a case statement, used to extract files. 1420Fragments are automatically appended to extract tar, xz and zip 1421archives, so that the default case is more or less equivalent to the 1422following shell fragment: 1423.Bd -literal 1424set -e 1425cd ${WRKDIR} 1426for archive in ${EXTRACT_ONLY} 1427do 1428 case $$archive in 1429 *.tar.xz) 1430 xzcat ${FULLDISTDIR}/$$archive| tar xf -;; 1431 *.zip) 1432 unzip -q ${FULLDISTDIR}/$$archive -d ${WRKDIR};; 1433 *.tar.bz2) 1434 bzip2 -dc ${FULLDISTDIR}/$$archive| tar xf -;; 1435 *.shar.gz|*.shar.Z|*.sh.Z|*.sh.gz) 1436 gzcat ${FULLDISTDIR}/$$archive | /bin/sh;; 1437 *.shar|*.sh) 1438 /bin/sh ${FULLDISTDIR}/$$archive;; 1439 *.tar) 1440 tar xf ${FULLDISTDIR}/$$archive;; 1441 *) 1442 gzip -dc ${FULLDISTDIR}/$$archive | tar xf -;; 1443 esac 1444done 1445.Ed 1446The use of xz archives is discouraged, as it makes things impossible to 1447build on vax. 1448.It Ev EXTRACT_ONLY 1449Set to the list of distfiles to actually extract if some distfiles 1450should not be extracted during the 1451.Ar do-extract 1452stage. 1453Defaults to all distfiles, can even be set to empty. 1454.It Ev EXTRACT_SUFX 1455Used to set DISTFILES default value to ${DISTNAME}${EXTRACT_SUFX}. 1456Default value is .tar.gz. 1457.It Ev FAKE_FLAGS 1458Extra flags passed to ${MAKE_PROGRAM} during the 1459fake invocation. 1460Empty by default. 1461Also see 1462.Ev ALL_FAKE_FLAGS . 1463.It Ev FAKE_TARGET 1464Target built by ${MAKE_PROGRAM} on fake invocation. 1465Defaults to ${INSTALL_TARGET}. 1466.It Ev FAKEOBJDIR 1467User settings. 1468If non empty, used as a base for the fake area. 1469The real fake directory ${WRKINST} is created there. 1470Can be set on a per-${PKGPATH} basis. 1471For instance, setting FAKEOBJDIR_www/mozilla=/tmp/obj 1472will affect only the mozilla port. 1473.It Ev FETCH_CMD 1474User settings. 1475Command used to fetch distribution files for this port. 1476Defaults to 1477.Xr ftp 1 . 1478Can be used to go through excessively paranoid firewalls. 1479.It Ev FETCH_MANUALLY 1480Some ports' distfiles cannot be fetched automatically for licensing reasons. 1481In this case, set 1482.Ev FETCH_MANUALLY 1483to a list of strings that will be displayed, one per line, e.g., 1484.Bd -literal 1485FETCH_MANUALLY= "You must fetch foo-1.0.tgz" 1486FETCH_MANUALLY+="from http://www.fubar.com/ manually," 1487FETCH_MANUALLY+="after reading and agreeing to the license." 1488.Ed 1489Behaves like 1490.Ev IS_INTERACTIVE 1491if some distribution files are missing. 1492.It Ev FETCH_PACKAGES 1493User settings. 1494If set to 1495.Sq Yes , 1496the 1497.Ar package 1498target will download packages missing from the repository from locations in 1499${PKG_PATH} and place them into 1500.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cache/ . 1501It will only build them if no suitable packages are found. 1502.It Ev FETCH_SYMLINK_DISTFILES 1503User settings. 1504Set to 1505.Sq Yes 1506to link distribution files off 1507.Ev CDROM_SITE 1508instead of copying them. 1509.It Ev FILESDIR 1510Location of other files related to the current ports. 1511Default: files. 1512.It Ev FLAVOR 1513The port's current options. 1514Set by the user, and tested by the port to activate wanted functionalities. 1515.It Ev FLAVORS 1516List of all flavors keywords a port may match. 1517Used to sort FLAVOR into a canonical order to build the package name, 1518or to select the packing-list, and as a quick validity check. 1519See also 1520.Ev PSEUDO_FLAVORS . 1521.It Ev FLAVOR_EXT 1522Canonical list of flavors being set for the current build, dash-separated. 1523See 1524.Ev FULLPKGNAME . 1525.It Ev FORCE_UPDATE 1526User settings. 1527If set to 1528.Sq Yes , 1529the 1530.Ar update 1531target will always update an installed package, 1532as soon as its signature differs, 1533and all dependencies that install packages will 1534also force an update. 1535If set to 1536.Sq hard , 1537the 1538.Ar update 1539target will also update installed packages even when the signature 1540did not change. 1541.It Ev FULLDISTDIR 1542Complete path to directory where ${DISTFILES} and ${PATCHFILES} will be 1543located, to be used in hand-crafted extraction targets. 1544Read-only. 1545.It Ev FULLPKGNAME 1546Full name of the created package, taking flavors into account. 1547Defaults to ${PKGNAME}${FLAVOR_EXT}. 1548See also 1549.Ev EPOCH 1550and 1551.Ev REVISION . 1552.It Ev FULLPKGPATH 1553Path to the current port's directory, relative to ${PORTSDIR}, 1554including flavors and subpackages. 1555See 1556.Xr pkgpath 7 . 1557.It Ev GCC2_ARCHS , GCC3_ARCHS , GCC4_ARCHS 1558List of architectures using gcc 2.95.3, gcc 3.3.5, or gcc 4.2.1. 1559Read-only. 1560Use with 1561.Ev NOT_FOR_ARCHS 1562or 1563.Ev ONLY_FOR_ARCHS 1564to limit ports to architectures where they compile. 1565.It Ev GMAKE 1566Location of the GNU make binary, if needed. 1567Defaults to gmake. 1568.It Ev HOMEPAGE 1569URL to the homepage of the software, if applicable. 1570.It Ev IGNORE 1571For ignored ports, set to the reasons for which the port is ignored. 1572If non-empty, most common targets that do something (e.g., 1573.Ar fetch , 1574.Ar build , 1575.Ar install ...) 1576will be ignored. 1577See also 1578.Ev BATCH , 1579.Ev BROKEN , 1580.Ev FETCH_MANUALLY , 1581.Ev IGNORE_IS_FATAL , 1582.Ev IGNORE_SILENT , 1583.Ev INTERACTIVE , 1584.Ev IS_INTERACTIVE , 1585.Ev NOT_FOR_ARCHS , 1586.Ev NO_IGNORE , 1587.Ev ONLY_FOR_ARCHS . 1588.It Ev IGNORE_IS_FATAL 1589If set to 1590.Sq Yes , 1591ignored ports will become fatal errors. 1592.It Ev IGNORE_SILENT 1593If set to 1594.Sq Yes , 1595do not print anything when ignoring a port. 1596.It Ev INSTALL_{PROGRAM,SCRIPT,DATA,MAN}[_DIR] 1597Macros to use to install a program, a script, data, or a man page (or the 1598corresponding directory), respectively. 1599.It Ev INSTALL_TARGET 1600Target invoked to install the software, during fake installation. 1601Default is 1602.Sq install . 1603.It Ev INTERACTIVE 1604User settings. 1605Set to 1606.Sq Yes 1607to skip all non-interactive ports. 1608Used in conjunction with 1609.Ev BATCH 1610to simplify bulk-package builds. 1611.It Ev IS_INTERACTIVE 1612Set to 1613.Sq Yes 1614if port needs human interaction to build. 1615Porters should strive to minimize 1616.Ev IS_INTERACTIVE 1617ports, by using 1618.Ev FLAVORS 1619for multiple choice ports, and by postponing human intervention 1620to package installation time. 1621.It Ev LE_ARCHS 1622Set to the list of little-endian architectures. 1623Read-only. 1624Use with 1625.Ev NOT_FOR_ARCHS 1626and 1627.Ev ONLY_FOR_ARCHS . 1628.It Ev LIB_DEPENDS 1629Libraries this port depends upon. 1630Each item has the form 1631.Sq [pkgspec:]pkgpath . 1632Similar to 1633.Ev BUILD_DEPENDS 1634and 1635.Ev RUN_DEPENDS , 1636but with specific rules: 1637.Ev LIB_DEPENDS 1638always turn into 1639.Ev BUILD_DEPENDS . 1640.Pp 1641On architectures that use dynamic libraries, 1642.Ev LIB_DEPENDS 1643is also used as a run-time dependency, and recorded in the package as 1644such, if any of the libraries mentioned in 1645.Ev WANTLIB 1646is a shared library that originates within the dependent port. 1647.Pp 1648See 1649.Xr library-specs 7 1650for more details. 1651.Pp 1652.It Ev lib_depends_args 1653Controls the behavior of 1654.Xr pkg_create 1 1655related targets, see 1656.Ar print-package-args 1657for details. 1658.It Ev LIBTOOL 1659Location of the libtool binary for ports that set 1660.Ev USE_LIBTOOL 1661Default: 1662.Pa ${LOCALBASE}/bin/libtool . 1663.It Ev LIBTOOL_FLAGS 1664Arguments to pass to libtool. 1665If USE_LIBTOOL is set, the environment variable LIBTOOL is set 1666to ${LIBTOOL} ${LIBTOOL_FLAGS}. 1667.It Ev LOCALBASE 1668where other ports have already been installed. 1669Default: 1670.Pa /usr/local . 1671.It Ev LOCALSTATEDIR 1672Location for this port's state directory, should always be derived 1673from 1674.Ev BASELOCALSTATEDIR , 1675which defaults to 1676.Pa /var . 1677Passed to gnu configure scripts. 1678.It Ev LOCKDIR 1679User settings. 1680Defaults to 1681.Pa /tmp/portslocks . 1682If set, points to a directory common for all instances of concurrent ports 1683builds. 1684.It Ev LOCK_CMD 1685Expands to a command that will acquire a lock, namely 1686.Xr dolock 1 . 1687See also 1688.Xr ports 7 . 1689.It Ev LOCK_VERBOSE 1690User settings. 1691Defaults to 1692.Sq \&No 1693Set to 1694.Sq Yes 1695to show every acquire/release lock operation. 1696.It Ev LP64_ARCHS 1697Set to the list of 64-bit architectures. 1698Read-only. 1699Use with 1700.Ev NOT_FOR_ARCHS . 1701.It Ev MAINTAINER 1702E-mail address with full name of the port's maintainer. 1703Defaults to ports@openbsd.org. 1704.It Ev MAKE_ENV 1705Environment variables passed to make invocations. 1706Sets at least PATH, PREFIX, LOCALBASE, X11BASE, CFLAGS, TRUEPREFIX, DESTDIR, 1707and the BSD_INSTALL_* macros. 1708.It Ev MAKE_FLAGS 1709Flags used for all make invocations, except for the 1710.Ar fake 1711stage, which adds 1712.Ev FAKE_FLAGS 1713(see 1714.Ev ALL_FAKE_FLAGS ) 1715and for the regress stage, which adds 1716.Ev REGRESS_FLAGS 1717(see 1718.Ev ALL_REGRESS_FLAGS ) . 1719.It Ev MAKE_FILE 1720Name of the Makefile used for ports building. 1721Defaults to Makefile. 1722Used after changing directory to ${WRKBUILD}. 1723.It Ev MAKE_PROGRAM 1724The make program that is used for building the port. 1725Set to ${MAKE} or ${GMAKE} depending on USE_GMAKE. 1726Read-only. 1727.It Ev MAKESUMFILES 1728List of all files that need to be retrieved by 1729.Ar fetch-all , 1730with 1731.Ev DIST_SUBDIR 1732prepended and with master site selection extension removed. 1733Read-only. 1734See also 1735.Ev CHECKSUMFILES . 1736.It Ev MASTER_SITE_BACKUP 1737User settings. 1738List of sites to try after normal master sites, or before if 1739.Ev MASTER_SITE_OVERRIDE 1740is set to 1741.Sq Yes . 1742Normally includes ${MASTER_SITE_OPENBSD} and ${MASTER_SITE_FREEBSD}. 1743.It Ev MASTER_SITE_* 1744Lists of standard sites to retrieve files from, refer to 1745.Pa ${PORTSDIR}/infrastructure/templates/network.conf.template . 1746.It Ev MASTER_SITE_OVERRIDE 1747User settings. 1748Set to 1749.Sq Yes 1750to retrieve distfiles and patchfiles preferentially from the 1751${MASTER_SITE_BACKUP} sites. 1752Defaults to 1753.Sq \&No . 1754.It Ev MASTER_SITES 1755List of primary locations from which distribution files and patchfiles are 1756retrieved. 1757See the 1758.Ar fetch 1759target for details. 1760See 1761.Xr ports 7 1762for user configuration. 1763.It Ev MASTER_SITES0 , ... , MASTER_SITES9 1764Supplementary locations from which distribution files and patchfiles are 1765retrieved. 1766.It Ev MESSAGE 1767File recorded in the package and displayed during installation. 1768Defaults to ${PKGDIR}/MESSAGE if this file exists. 1769Leave empty if no message is needed. 1770.It Ev MISSING_FILES 1771When 1772.Ev FETCH_MANUALLY 1773is set, 1774.Ev MISSING_FILES 1775will contain the list of missing distfiles or patchfiles that need to 1776be fetched manually. 1777Read-only. 1778.It Ev MTREE_FILE 1779.Xr mtree 8 1780specification to check when creating a PLIST with the 1781.Ar update-plist 1782target. 1783.Ev MTREE_FILE 1784can hold a list of file names, to which 1785.Pa ${PORTSDIR}/infrastructure/db/fake.mtree 1786is always appended. 1787These specifications are rooted at 1788.Pa ${WRKINST} , 1789and are subject to 1790.Ev SUBST_VARS 1791substitution, to ease 1792.Pa ${PREFIX} 1793independence. 1794This feature is primarily intended for large, interconnected ports, 1795such as the kde suite, where a base package sets up a large, extra 1796directory hierarchy that would make the manual checking of packing lists 1797tedious. 1798.It Ev MODGNU_CONFIG_GUESS_DIRS 1799If a port uses config.guess outside WRKSRC, the directories 1800containing the other copies must be set here. 1801.It Ev MODULES 1802External modules mechanism, documented separately. 1803Modules such as 1804.Sq imake 1805and 1806.Sq gnu 1807are normally included automatically with the right 1808.Ev CONFIGURE_STYLE . 1809Note that it is possible to 1810.Li CONFIGURE_STYLE = simple , 1811.Li MODULES += gnu 1812to just get the effects of 1813.Ev CONFIG_SITE 1814and 1815.Ev MODGNU_CONFIG_GUESS_DIRS 1816along with the default 1817.Ev REGRESS_TARGET , 1818in case the normal GNU configure script was wrapped in a separate script that 1819takes different arguments. 1820See 1821.Xr port-modules 5 . 1822.It Ev MULTI_PACKAGES 1823Set to a list of subpackage extensions for ports that create multiple packages. 1824See 1825.Qq Flavors and multi-packages 1826below. 1827Especially read the part about 1828.Ev ONLY_FOR_ARCHS 1829when some of the packages only exist for some architectures. 1830.It NO_ARCH 1831Location for arch-independent packages. 1832Defaults to 1833.Sq no-arch . 1834Normally, packages are generated under ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}, 1835except for packages where PKG_ARCH=*, which end up under 1836${PACKAGE_REPOSITORY}/${NO_ARCH}. 1837.It Ev NOT_FOR_ARCHS 1838List of architectures on which this port does not build. 1839See also 1840.Ev ONLY_FOR_ARCHS . 1841See also 1842.Ev SHARED_ONLY . 1843Do not use instead of 1844.Ev SHARED_ONLY 1845without very good reasons. 1846.It Ev NO_BUILD 1847Set to 1848.Sq Yes 1849if port does not need any build stage. 1850.It Ev NO_CCACHE 1851Set to 1852.Sq Yes 1853to prevent ccache from being used when building a certain port, 1854even when 1855.Ev USE_CCACHE 1856is set. 1857.It Ev NO_CHECKSUM 1858User settings. 1859Set to 1860.Sq Yes 1861to avoid 1862.Ar checksum , 1863.Ar makesum , 1864and 1865.Ar addsum 1866actions entirely. 1867Beware of the full implications of this mechanism, namely that it disables 1868the basic authentication mechanisms of the ports tree entirely. 1869.It Ev NO_DEPENDS 1870User settings. 1871Don't verify build of dependencies. 1872Do not use in any ports Makefile. 1873This is only meant as a user convenience when, e.g., you just want to browse 1874through a given port's source and do not wish to trigger the build of 1875dependencies. 1876.It Ev NO_IGNORE 1877User settings. 1878If set to 1879.Sq Yes , 1880avoid ignoring a port for the usual reasons. 1881Use, for instance, for fetching all distribution files, or for fixing a 1882broken port. 1883See also 1884.Ev IGNORE 1885and 1886.Ev TRY_BROKEN . 1887.It Ev NO_REGRESS 1888Port does not have any regression targets. 1889Only set to 1890.Sq Yes 1891for ports with no regression targets. 1892It should be left alone for ports with empty regression targets, and for 1893ports with failing tests. 1894That way, if a subsequent update of a port acquires actual regression tests, 1895they will be picked up automatically. 1896.It Ev NO_SHARED_ARCHS 1897Set to the list of platforms that do not support shared libraries. 1898Read-only. 1899Use with 1900.Ev NOT_FOR_ARCHS . 1901.It Ev NO_SHARED_LIBS 1902Set to 1903.Sq Yes 1904if platform does not support shared libraries. 1905To be tested after including 1906.Nm bsd.port.mk , 1907or 1908.Xr bsd.port.arch.mk 5 , 1909if neither PFRAG.shared nor CONFIGURE_SHARED are enough. 1910.It Ev NO_SYSTRACE 1911Port does not build with systrace-enabled build targets. 1912.It Ev OLD_WRKDIR_NAME 1913Base name for 1914.Ev WRKDIR 1915in the old scheme without 1916.Ev WRKOBJDIR . 1917Mostly used as a value for 1918.Ev WRKDIR_LINKNAME , 1919e.g., 1920.Bd -literal 1921WRKDIR_LINKNAME = ${OLD_WRKDIR_NAME} 1922.Ed 1923.Pp 1924in 1925.Pa /etc/mk.conf . 1926Read-only. 1927.It Ev ONLY_FOR_ARCHS 1928List of architectures on which this port builds. 1929Can hold both processor-specific information (e.g., m68k), and more 1930specific model information (e.g., hp300). 1931This is subpackage dependent. 1932Read the corresponding part of 1933.Qq Flavors and multi-packages 1934if some subpackages should only be built on some architectures. 1935.It Ev OSREV 1936Revision number of 1937.Ox . 1938Read-only. 1939.It Ev PACKAGE_REPOSITORY 1940User settings. 1941Default location for built packages. 1942Defaults to 1943.Pa ${PORTSDIR}/packages . 1944See 1945.Ar package 1946for details. 1947.It Ev PATCH 1948Command to use to apply all patches. 1949Defaults to 1950.Pa /usr/bin/patch . 1951.It Ev PATCHORIG 1952Suffix used by 1953.Ar patch 1954to rename original files, and 1955.Ar update-patches 1956to re-generate 1957.Pa ${PATCHDIR}/${PATCH_LIST} 1958by looking for files using this suffix. 1959Defaults to 1960.Pa .orig . 1961For a port that already contains 1962.Pa .orig 1963files in the ${DISTFILES}, 1964set this to something else, such as 1965.Pa .pat.orig . 1966See also 1967.Ar distpatch , 1968.Ev DISTORIG . 1969.It Ev PATCH_CASES 1970In the normal distpatch stage (when 1971.Ev PATCHFILES 1972is not empty), this is the contents of a case statement, used to apply 1973distribution patches. 1974Fragments are automatically appended to handle gzip'ed and bzip'ed 1975patches, so that the default case is more or less equivalent to the following 1976shell fragment: 1977.Bd -literal 1978set -e 1979cd ${FULLDISTDIR} 1980for patchfile in ${_PATCHFILES} 1981do 1982 case $$patchfile in 1983 *.bz2) 1984 bzip2 -dc $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};; 1985 *.Z|*.gz) 1986 gzcat $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};; 1987 *) 1988 ${PATCH} ${PATCH_DIST_ARGS} <$$patchfile;; 1989 esac 1990done 1991.Ed 1992.It Ev PATCHDIR 1993Location for patches applied by patch target. 1994Default: 1995.Pa patches . 1996.It Ev PATCHFILES 1997Files to fetch from the master sites like 1998.Ev DISTFILES , 1999but serving a different purpose, as they hold distribution patches that 2000will be applied at the 2001.Ar patch 2002stage. 2003See also 2004.Ev SUPDISTFILES . 2005.It Ev PATCH_ARGS 2006Full list of options used while applying port's patches. 2007.It Ev PATCH_CHECK_ONLY 2008Set to 2009.Sq Yes 2010by the 2011.Ar checkpatch 2012target. 2013Don't touch unless the default 2014.Ar checkpatch 2015target needs to be redefined. 2016Ideally, user-defined patch subtargets ought to test checkpatch. 2017In practice, they don't. 2018.It Ev PATCH_DEBUG 2019If set to 2020.Sq Yes , 2021the 2022.Ar patch 2023stage will output extra debug information. 2024.It Ev PATCH_DIST_ARGS 2025Full list of options used while applying distribution patches. 2026.It Ev PATCH_DIST_STRIP 2027Patch option used to strip directory levels while applying distribution 2028patches. 2029Defaults to -p0 . 2030.It Ev PATCH_LIST 2031Wildcard pattern of patches to select under ${PATCHDIR}. 2032Defaults to patch-*. 2033Note that filenames ending in .orig, or ~ are never applied. 2034Note that 2035.Ev PATCH_LIST 2036can hold absolute pathnames, for instance to share patches among similar 2037ports: 2038.Bd -literal 2039PATCH_LIST=${PORTSDIR}/x11/kde/libs2/patches/p-* patch-* 2040.Ed 2041.It Ev PATCH_STRIP 2042Patch option used to strip directory levels while applying port's patches. 2043Defaults to -p0 . 2044.It Ev PERMIT_{DISTFILES,PACKAGE}_{CDROM,FTP} 2045Set to 2046.Sq Yes 2047if package or distribution files can be allowed on FTP sites or CD-ROM without 2048legal issues. 2049Set to reason not to otherwise. 2050PERMIT_* lines in the Makefile should be preceded with a comment explaining 2051details about licensing and patents issues the port may have. 2052Porters must be very thorough in their checks. 2053In case of doubt, ask. 2054.It Ev PKG_ADD 2055User settings. 2056Path to 2057.Xr pkg_add 1 2058command, with possible options. 2059.It Ev PKG_ARCH 2060Comma-separated list of architectures on which this package may install. 2061Defaults to ${MACHINE_ARCH},${ARCH}. 2062Use * for arch-independent packages. 2063.It Ev PKG_ARGS 2064Special arguments to pass to 2065.Xr pkg_create 1 , 2066in addition to the default ones. 2067For mips64 and pic libraries, see 2068.Qq The generation of package information . 2069.It Ev PKG_CREATE 2070User settings. 2071Path to 2072.Xr pkg_create 1 2073command, with possible options. 2074.It Ev PKG_CREATE_NO_CHECKS 2075Porters switch. 2076Set to 2077.Sq Yes 2078to avoid checking the ports tree when solving 2079.Ev WANTLIB 2080.Po 2081see 2082.Ar wantlib-args 2083.Pc . 2084May result in bogus packages that mix 2085.Cm @depends 2086lines obtained from 2087the ports tree with 2088.Cm @wantlib 2089lines that come from the installed system. 2090.It Ev PKG_DBDIR 2091User settings. 2092Path to package installation records. 2093Defaults to 2094.Pa /var/db/pkg . 2095.It Ev PKG_DELETE 2096User settings. 2097Path to 2098.Xr pkg_delete 1 2099command, with possible options. 2100.It Ev PKG_INFO 2101User settings. 2102Path to 2103.Xr pkg_info 1 2104command, with possible options. 2105.It Ev PKG_TMPDIR 2106See 2107.Xr pkg_add 1 . 2108Normally points to 2109.Pa /var/tmp , 2110as per default. 2111.It Ev PORTHOME 2112Setting of env variable 2113.Ev HOME 2114for most shell invocations. 2115Default will trip ports that try to write into $HOME while building. 2116.It Ev PORTPATH 2117Path used by most shell invocations. 2118Don't override unless really needed. 2119.It Ev PORTSDIR 2120Root of the ports tree (default: 2121.Pa /usr/ports ) . 2122.It Ev PORTSDIR_PATH 2123Path used by dependencies and 2124.Pa bsd.port.subdir.mk 2125to look up package specifications. 2126Defaults to 2127.Pa ${PORTSDIR}:${PORTSDIR}/mystuff . 2128.It Ev PKGDIR 2129Location for packaging information (packing list, port description, messages). 2130Default: pkg. 2131.It Ev PKGFILE 2132Full path to the created package for the given subpackage. 2133Read-only. 2134.It Ev PKGFILES 2135Full path to all created packages. 2136Read-only. 2137.It Ev PKGNAME 2138Name of the created package. 2139Default is ${DISTNAME}. 2140This does not take flavors into account. 2141See 2142.Ev FULLPKGNAME 2143for that. 2144Specific revisions and epoch changes should be 2145handled by 2146.Ev REVISION 2147and 2148.Ev EPOCH 2149instead. 2150.It Ev PKGNAMES 2151Read-only. 2152List of all package names generated by the port, with 2153.Ev FLAVORS 2154and 2155.Ev MULTI_PACKAGES 2156taken into account. 2157Mostly used as 2158.Sq make show=PKGNAMES 2159to verify that bumped package names are correct. 2160.It Ev PKGNAME-foo 2161Package name for sub-package foo, if the default value 2162of ${PKGNAME}${SUBPACKAGE} is not appropriate. 2163.It Ev PKGPATH 2164Path to the current port's directory, relative to ${PORTSDIR}. 2165Read-only. 2166.It Ev PKGSPEC 2167Default package spec for using this port as a dependency. 2168Defaults to 2169.Sq stem-* , 2170derived from the 2171.Ev FULLPKGNAME . 2172Do not override without very good reasons, 2173namely software that coexist as different incompatible versions with the 2174same stem, e.g., already a mess. 2175.It Ev PLIST_DB 2176User settings. 2177Directory used to save generated packing-lists, as persistent information. 2178Packing-lists are processed by a script, 2179.Xr register-plist 1 , 2180which complains when packing-lists change without a 2181.Ev REVISION 2182bump. 2183It also knows enough about package version numbers when something in the 2184package or its dependencies goes backward, thus catching 2185.Ev EPOCH 2186issues. 2187This directory is never cleaned during normal operation. 2188.Sq make clean=plist 2189should only ever be used during debugging by port maintainers. 2190Defaults to 2191.Pa ${PORTSDIR}/plist/${MACHINE_ARCH} . 2192If set to empty, will not register anything: very much unsafe. 2193.It Ev PREFERRED_CIPHERS 2194List of cryptographic ciphers to use, in order of preference. 2195Default is 2196.Sq sha256 sha1 rmd160 md5 . 2197The first cipher that matches in ${CHECKSUM_FILE} is verified. 2198.It Ev PREFIX 2199Base directory for the current port installation. 2200Usually ${LOCALBASE}, though some ports may elect a location under 2201.Pa /var , 2202and some multi-package ports may install under several locations. 2203.It Ev PREPARE_CHECK_ONLY 2204Build settings. 2205Prevent the 2206.Ar prepare 2207stage from installing anything, let it just check dependencies, and 2208handle [:target] dependencies. 2209Mostly used by 2210.Xr dpb 1 , 2211which already installs everything before running 2212.Ar prepare . 2213.It Ev PROGRESS_METER 2214User-settings. 2215Defaults to 2216.Sq Yes . 2217Forces commands like 2218.Xr ftp 1 2219and 2220.Xr pkg_create 1 2221to use their progress-meter even in the absence of a terminal. 2222.It Ev PROPERTIES 2223List of properties specific to a given machine architecture. 2224Most often obtained through 2225.Xr bsd.port.arch.mk 5 . 2226These can be checked like this 2227.Bd -literal -offset indent 2228\&.include <bsd.port.arch.mk> 2229\&.if ${PROPERTIES:Mapm} 2230# then add build options specific to apm arches 2231\&... 2232\&.if !${PROPERTIES:Mlp64} 2233# build options specific to lp32 arches 2234\&... 2235.Ed 2236For 2237.Ev MULTI_PACKAGES 2238setup, use of 2239.Ev ONLY_FOR_ARCHS-sub 2240and 2241.Ev BUILD_PACKAGES 2242is generally preferred (and simpler). 2243Possible properties include 2244.Bl -tag -width no_shared 2245.It apm 2246architecture possesses suspend (apm) support. 2247.It be 2248architecture is big-endian. 2249.It gccN 2250gccN architecture. 2251.It elf 2252.Xr elf 5 2253architecture. 2254.It le 2255architecture is little-endian. 2256.It lp64 2257lp64 architecture. 2258.It no_shared 2259architecture has no shared library support. 2260.It mono 2261there is mono support on this architecture. 2262.El 2263.It Ev PSEUDO_FLAVOR 2264List of flavors in 2265.Ev FLAVOR 2266that are actually pseudo-flavors. 2267Only for introspection purposes. 2268Read-only. 2269.It Ev PSEUDO_FLAVORS 2270Extra list of flavors that do not register in package names, but are still 2271used to control build logic, and work directory names. 2272Its only use should be for disabling part of a multi-packages build, 2273for instance: 2274.Bd -literal 2275FLAVOR=no_gnome make package 2276.Ed 2277.Pp 2278Pseudo-flavors should be named as 2279.Sq no_something 2280to disable the build of subpackage 2281.Sq -something 2282.Po 2283and possibly some others, by restricting 2284.Ev BUILD_PACKAGES 2285.Pc . 2286Pseudo-flavors should always be handled through 2287.Xr bsd.port.arch.mk 5 . 2288A pseudo-flavor can remove several subpackages through the following 2289construct. 2290.Bd -literal -offset indent 2291# pseudo-flavor no_gui will also remove gtk and gtk3 2292MULTI_PACKAGES = -main -gtk -gtk3 -gui 2293# ... 2294\&.include <bsd.port.arch.mk> 2295 2296# remove extra build components 2297\&.if !${BUILD_PACKAGES:M-gui} 2298BUILD_PACKAGES := ${BUILD_PACKAGES:N-gtk:N-gtk3} 2299\&.endif 2300 2301# normal configure setup, e.g., 2302\&.if ${BUILD_PACKAGES:M-gtk} 2303# ... 2304.Ed 2305.Pp 2306Caveat: creation of a separate working directory is mandatory for a 2307pseudo-flavor. 2308If, at a later time, a full build with all subpackages is required, 2309all the work will need to be done again. 2310.It Ev RCDIR 2311Location for daemon startup scripts. 2312Defaults to 2313.Pa /etc/rc.d . 2314Do not change. 2315.It Ev RECURSIVE_FETCH_LIST 2316See 2317.Xr mirroring-ports 7 . 2318.It Ev REFETCH 2319User settings. 2320If set to true, 2321.Ar checksum 2322will analyze ${CHECKSUM_FILE}, and try retrieving files with the correct 2323checksum off 2324.Pa ftp.openbsd.org , 2325in the directory 2326.Pa /pub/OpenBSD/distfiles/$cipher/$value/$file . 2327.It Ev REGRESS_DEPENDS 2328See 2329.Ev BUILD_DEPENDS 2330for specification. 2331Regress dependencies are only checked if the regress stage is invoked. 2332.It Ev REGRESS_FLAGS 2333Extra flags passed to ${MAKE_PROGRAM} to run the regression tests. 2334Empty by default. 2335.It Ev REGRESS_IS_INTERACTIVE 2336Set to 2337.Sq Yes 2338if port needs human interaction to run its tests, or set to 2339.Sq X11 2340if the tests need an active X11 display to work. 2341.It Ev REGRESS_LOG 2342Command used to log the results of regression tests to REGRESS_LOGFILE. 2343.It Ev REGRESS_LOGFILE 2344Log file containing the results of regression tests. 2345.It Ev REGRESS_TARGET 2346Target to run regression tests. 2347Defaults to 2348.Sq regress , 2349except for 2350.Sq perl 2351and 2352.Sq gnu 2353.Ev CONFIGURE_STYLE , 2354which default to 2355.Sq test 2356and 2357.Sq check 2358respectively. 2359.It Ev REORDER_DEPENDENCIES 2360Points to a list of files that specify inter-dependencies for 2361.Xr make 1 . 2362If defined, each line of the file is either a comment (starting with #) 2363or a pair of two files: most_recent older. 2364At the end of 2365.Ar post-patch , 2366.Xr touch 1 2367will be used to ensure those files are put in the proper order. 2368The files are assumed to be under 2369.Pa ${WRKSRC} . 2370The notation /file can be used to ask for a recursive search, e.g., 2371to make sure that all Makefile.in are up-to-date. 2372See 2373.Pa ${PORTSDIR}/infrastructure/mk/automake.dep 2374for an example. 2375.It Ev REPORT_PROBLEM 2376See 2377.Xr ports 7 . 2378.It Ev REPORT_PROBLEM_LOGFILE 2379See 2380.Xr ports 7 . 2381.It Ev REVISION 2382Revision number of the current package. 2383Defaults to empty (very first package), then 2384numbering starts at 0. 2385Gets automatically incorporated into 2386.Ev FULLPKGNAME 2387as 2388.Sq p${REVISION} 2389to form a full package-name conforming to 2390.Xr packages-specs 7 . 2391.It Ev RUN_DEPENDS 2392Specification of ports this port needs installed to be functional. 2393Same format as 2394.Ev LIB_DEPENDS . 2395The corresponding packages will be built right before the 2396.Ar install 2397stage, and 2398.Xr pkg_add 1 2399will take care of installing them. 2400.It Ev SEPARATE_BUILD 2401Many GNU configure ports can be built in a directory distinct from the 2402place they were unpacked. 2403For some specific ports, this is even mandatory. 2404Set to 2405.Sq yes 2406or 2407.Sq simple 2408if this is the case. 2409The ports infrastructure will generate a separate ${WRKBUILD} directory 2410in which the port will be configured and built. 2411Wipe ${WRKBUILD} to start anew, but skipping the extract/patch stage. 2412.It Ev SETENV 2413Normally set to 2414.Li /usr/bin/env -i . 2415Prepended to every command invocation that requires a clean environment. 2416Do not override. 2417.It Ev SHARED_LIBS 2418List of shared libraries that the port may build, as a list of the form 2419.Sq libname 2420.Sq libversion . 2421Used to set variables of the form 2422.Ev LIBlibname_VERSION 2423that are then used for substitution by 2424.Xr pkg_create 1 . 2425The porter is responsible for making sure the port uses those version numbers 2426when shared libraries are built. 2427.Pp 2428The intent is that the 2429.Ox 2430ports system must have control over shared library versions because of global 2431changes that may require bumping the major version of every shared library in 2432the system, or simply because the third party programmers do not understand 2433the rules for shared library versions, thus breaking the update mechanism. 2434For that reason it is advised to set libversion to 0.0 when first importing a 2435port. 2436.Pp 2437Porters of software using libtool should also set 2438.Ev USE_LIBTOOL 2439and make sure 2440.Ev MAKE_FLAGS 2441get propagated to the libtool invocations. 2442This should be enough in most cases. 2443.It Ev SHARED_ONLY 2444Set to 2445.Sq Yes 2446if port can only be built on architectures with shared libraries. 2447.It Ev SKIPDIR 2448See 2449.Xr ports 7 . 2450.It Ev STATIC_PLIST 2451Normally set to 2452.Sq yes . 2453Can be set to no for ports that do not have a static plist. 2454Do not change without a very good reason. 2455Note that the only good reason to not have a static plist is for ports such 2456as 2457.Pa databases/ports-readmes 2458which actually build a bunch of files depending on the current ports tree. 2459This breaks all introspection mechanisms within the ports tree, including 2460.Pa databases/pkglocatedb 2461which will not include that port. 2462.It Ev STARTAFTER 2463See 2464.Xr ports 7 . 2465.It Ev STARTDIR 2466See 2467.Xr ports 7 . 2468.It Ev SUBPACKAGE 2469Set to the subpackage suffix when building a package in a multi-package port. 2470Read-only. 2471Used to test for dependencies or to adjust the package name. 2472.It Ev SUBST_CMD 2473A command that can be used to perform 2474.Ev SUBST_VARS 2475substitution on arbitrary files. 2476In normal mode, 2477.Pp 2478.Dl ${SUBST_CMD} file1 file2 ... 2479.Pp 2480will substitute files in place, creating backup copies of them. 2481In copy mode, 2482.Pp 2483.Dl ${SUBST_CMD} -c src1 dest1 src2 dest2 2484.Pp 2485will copy files over while performing the substitution, as suitable for 2486copying template files over from 2487.Pa ${FILESDIR} 2488to 2489.Pa ${PREFIX} , 2490for instance. 2491This uses 2492.Xr pkg_subst 1 2493with suitable parameters. 2494Read-only. 2495.Pp 2496${SUBST_CMD} 2497can be used like 2498.Xr install 1 : 2499.Dl ${SUBST_CMD} Oo Fl g Ar group Oc Oo Fl o Ar owner Oc file... 2500to set file 2501.Ar owner , 2502.Ar group 2503and/or 2504.Ar mode . 2505.It Ev SUBST_VARS 2506Make variables whose values get substituted to create the actual package 2507information. 2508Always holds 2509.Ev ARCH , 2510.Ev BASE_PKGPATH , 2511.Ev FLAVOR_EXT , 2512.Ev FULLPKGNAME , 2513.Ev HOMEPAGE , 2514.Ev LOCALBASE , 2515.Ev MACHINE_ARCH , 2516.Ev MAINTAINER , 2517.Ev PREFIX , 2518.Ev RCDIR , 2519.Ev SYSCONFDIR , 2520.Ev TRUEPREFIX , 2521and 2522.Ev X11BASE . 2523The special construct 2524.Sq ${FLAVORS} 2525can be used in the packing-list to specify the current list of dash 2526separated flavors the port is compiled with (useful for cross-dependencies 2527in 2528.Ev MULTI_PACKAGES ) . 2529Add other 2530variables as needed. 2531Some variable names are prefixed by a ^. 2532This is only relevant for 2533.Ar update-plist , 2534where it means the variable will only be substituted at the beginning of 2535a path. 2536.It Ev SUDO 2537User settings. 2538If set to 2539.Xr sudo 8 2540in 2541.Xr mk.conf 5 , 2542the ports tree will only invoke root's privileges for the parts that 2543really require it. 2544.It Ev SUPDISTFILES 2545Supplementary files that need to be retrieved under some specific 2546circumstances. 2547For instance, a port might need architecture-specific files. 2548.Ev SUPDISTFILES 2549should hold a list of all distribution files and patchfiles that are not 2550always needed, so that a mirror will be able to grab all files, or that 2551.Ar makesum 2552will work. 2553Having an overlap between 2554.Ev SUPDISTFILES 2555and 2556.Ev DISTFILES , 2557.Ev PATCHFILES 2558is admissible, and in fact, expected, as it is much simpler to build 2559an error-free list of files to retrieve in that way. 2560See the xanim port for an example. 2561.It Ev SYSCONFDIR 2562Location for this port's configuration files, should always be derived 2563from 2564.Ev BASESYSCONFDIR , 2565which defaults to 2566.Pa /etc . 2567Passed to gnu configure scripts and substituted in PLISTs. 2568.It Ev SYSTRACE_FILTER 2569Location of the systrace filter file which is the basis for a port's 2570actual systrace policy file. 2571Defaults to 2572.Pa ${PORTSDIR}/infrastructure/db/systrace.filter . 2573.It Ev SYSTRACE_FILTER_CCACHE 2574Location of the supplementary systrace filter file which is used when 2575.Ev USE_CCACHE 2576is enabled. 2577Defaults to 2578.Pa ${PORTSDIR}/infrastructure/db/systrace.filter.ccache . 2579.It Ev SYSTRACE_SUBST_VARS 2580List of variables used in ${SYSTRACE_FILTER} that will be substituted 2581by their real value when creating the systrace policy file. 2582Always holds 2583.Ev WRKOBJDIR , 2584.Ev PORTSDIR , 2585and 2586.Ev DISTDIR . 2587.It Ev TAR 2588Name of the tar binary. 2589.It Ev TARGETS 2590Read-only. 2591Set to the list of special targets for a port 2592.Po 2593.Ar {pre,do,post}-* 2594and module hooks 2595.Pc . 2596Used by introspection tools such as the sqlports package. 2597.It Ev TEMPLATES 2598Base location for the templates used in the 2599.Ar readmes 2600target. 2601User settings. 2602Defaults to 2603.Pa ${PORTSDIR}/infrastructure/templates . 2604.It Ev TRUEPREFIX 2605Read-only. 2606Mostly the same as ${PREFIX}, except it never gets ${DESTDIR} prepended 2607during 2608.Ar fake . 2609Refer to 2610.Qq THE FAKE FRAMEWORK 2611for details. 2612.It Ev TRUST_PACKAGES 2613User settings. 2614If set to 2615.Sq Yes , 2616dependency mechanisms will assume the database of installed packages is 2617correct. 2618See also 2619.Ev BULK . 2620.It Ev TRY_BROKEN 2621User settings. 2622If set to 2623.Sq Yes , 2624don't set 2625.Ev IGNORE 2626for 2627.Ev BROKEN 2628ports, so that we will attempt to build them. 2629.It Ev UNLOCK_CMD 2630User settings. 2631If set, expands to a command that will release a lock. 2632This lock will reside in 2633.Pa ${LOCKDIR} . 2634.It Ev UNMESSAGE 2635File recorded in the package and displayed during deinstallation. 2636Defaults to ${PKGDIR}/UNMESSAGE if this file exists. 2637Leave empty if no message is needed. 2638.It Ev UNZIP 2639Name of the unzip binary. 2640.It Ev UPDATE_COOKIES_DIR 2641User settings. 2642Used to store cookies for package updates and defaults to 2643.Pa ${PORTSDIR}/update/${MACHINE_ARCH} . 2644If set to empty, will revert to a file under 2645.Pa ${WRKDIR} . 2646.It Ev USE_CCACHE 2647User settings. 2648Set to 2649.Sq Yes 2650to use ccache when building ports. 2651Adds a build dependency on devel/ccache, and sets up the build 2652environment so that it is used. 2653.It Ev USE_GMAKE 2654Set to 2655.Sq Yes 2656if GNU make (${GMAKE}) is needed for correct behavior of this port. 2657.It Ev USE_GROFF 2658Set to 2659.Sq Yes 2660to use groff to build manpages. 2661This sets groff as a build dependency, and also tells 2662.Xr pkg_create 1 2663to format manpages behind the scene using groff while building packages. 2664.It Ev USE_LIBTOOL 2665Set to 2666.Sq Yes 2667if libtool is required for correct behavior of this port. 2668Set to 2669.Sq gnu 2670if the ports tree libtool is insufficient and GNU libtool is required. 2671Adds dependencies if necessary, and passes LIBTOOL environment variable to 2672scripts invocations. 2673.It Ev USE_SYSTRACE 2674User settings. 2675Set to 2676.Sq Yes 2677to protect port building with systrace. 2678.It Ev VMEM_WARNING 2679Set to 2680.Sq Yes 2681if the port requires a lot of memory to compile, and the user is 2682likely to see a message like 2683.Qq virtual memory exhausted 2684with the default process limits. 2685.It Ev WANTLIB 2686Extra list of library specifications that a package will need. 2687May include system and X11 libraries. 2688See 2689.Xr library-specs 7 2690for more details. 2691.Pp 2692As a special extension, 2693.Ev WANTLIB 2694may include absolute paths, e.g., 2695.Pa ${LOCALBASE}/lib/expat.=4 2696to distinguish between base libraries and port libraries. 2697Use with caution, this is very seldom needed. 2698.It Ev wantlib_args 2699Controls the behavior of 2700.Xr pkg_create 1 2701related targets, see 2702.Ar print-package-args 2703for details. 2704.It Ev WARNINGS 2705User settings. 2706If set to 2707.Sq Yes , 2708add 2709.Ev CDIAGFLAGS 2710to 2711.Ev CFLAGS 2712and 2713.Ev CXXDIAGFLAGS 2714to 2715.Ev CXXFLAGS . 2716.It Ev WRKBUILD 2717Subdirectory of ${WRKDIR} where the actual build occurs. 2718Defaults to ${WRKSRC}, unless SEPARATE_BUILD is involved, in which case 2719it is set to an appropriate value. 2720.It Ev WRKCONF 2721Subdirectory of ${WRKDIR} where the actual configure set occurs. 2722Defaults to ${WRKBUILD}. 2723.It Ev WRKDIR 2724Location where all port activity occurs. 2725Apart from the actual port, may 2726hold all kinds of cookies that checkpoint the port's build. 2727Read-only. 2728Note that WRKDIR may be a symbolic link. 2729During ports building, 2730.Pa ${WRKDIR}/bin 2731is put at the front of the 2732.Ev PATH . 2733.It Ev WRKDIR_LINKNAME 2734Name of a symbolic link to create within the port directory which will 2735point to the port's ${WRKDIR}. 2736See 2737.Ev OLD_WRKDIRNAME . 2738.It Ev WRKDIST 2739Subdirectory of ${WRKDIR} in which the distribution files normally unpack. 2740Base for all patches. 2741Defaults to 2742.Pa ${WRKDIR}/${DISTNAME} . 2743Note that WRKDIST may be a symbolic link, if set to ${WRKDIR}. 2744.It Ev WRKSRC 2745Subdirectory of ${WRKDIR} where the actual source is. 2746Base for configuration (default: ${WRKDIST}) 2747Note that WRKSRC may be a symbolic link, if set to ${WRKDIR}. 2748.It Ev WRKINST 2749Subdirectory of ${WRKDIR} where port normally installs (see 2750.Ar fake 2751target). 2752.It Ev WRKOBJDIR 2753Used as a base for the actual port working directory. 2754Defaults to 2755.Pa ${PORTSDIR}/pobj . 2756The real working directory ${WRKDIR} is created there. 2757Can be set on a per-${PKGPATH} basis. 2758For instance, setting WRKOBJDIR_www/mozilla=/tmp/obj 2759will affect only the mozilla port. 2760If explicitly unset (WRKOBJDIR=), the working directory is 2761created within the port directory. 2762.It Ev X11BASE 2763Where X11 has been installed. 2764Default: 2765.Pa /usr/X11R6 . 2766.It Ev XAUTHORITY 2767Points to a suitable authority file for X11 interactive regression tests. 2768Defaults to 2769.Pa ${HOME}/.xauthority . 2770.It Ev XMKMF 2771Invocation of xmkmf for a 2772.Li CONFIGURE_STYLE=imake 2773port. 2774Defaults to xmkmf -a -DPorts. 2775The -DPorts is specific to 2776.Ox 2777and is always appended. 2778.It Ev YACC 2779Name of yacc program to pass to GNU-configure, defaults to yacc. 2780GNU-configure would always try to use bison otherwise, which leads to 2781unreproducible builds. 2782Set to bison if needed. 2783.El 2784.Sh DIAGNOSTICS 2785Note that some of these messages are actually emitted by some other external 2786commands, but grouped here for convenience: easier to look for in 2787.Xr dpb 1 Ns 's 2788logs. 2789.Bl -diag 2790.It "Error: change in plist between ..." 2791Error message comes from 2792.Xr register-plist 1 . 2793.It "Error: duplicate item in packing-list" 2794Error message comes from 2795.Xr pkg_create 1 , 2796and will result from incorrect packing-lists, such as including several 2797fragments with the same file, or having incorrect 2798.Ev PKG_ARGS-sub . 2799.It "Error: Libraries in packing-lists...and libraries from installed packages don't match" 2800The ports tree and the installed packages are out-of-sync. 2801Mixing library information from both sources might produce packages that can't 2802be installed elsewhere. 2803Cleanest fix is to update the out-of-date source (e.g., update the ports tree, 2804or build and install new packages). 2805Developers may use 2806.Ev PKG_CREATE_NO_CHECKS 2807instead, assuming they understand the implications. 2808See print-package-args (wantlib-args) for details. 2809.It "Fatal: can't flavor a SUBDIR" 2810A dependency mentions top_subdir,flavor. 2811Flavor would then be ignored, as it is only applied to individual ports. 2812.It "Fatal: can't subpackage a SUBDIR" 2813A dependency mentions top_subdir,-sub. 2814Subpackage would then be ignored, as it is only applied to individual ports. 2815.It "Fatal: flavor should never start with a digit" 2816This would utterly confuse 2817.Xr pkg_add 1 . 2818See 2819.Xr packages-specs 7 . 2820.It "Fatal: inclusion of <file> from <file>" 2821.Pa bsd.port.mk 2822or 2823.Pa bsd.port.subdir.mk 2824has been included from a 2825.Ev MODULE 2826or from 2827.Pa Makefile.inc , 2828resulting in a double inclusion. 2829This would lead to weird results, such as 2830.Ev PKG_ARGS 2831being defined twice. 2832.It "Fatal: <PORTSDIR> is a symlink. Please set to the real directory" 2833A few ports get lost if 2834.Pa /usr/ports 2835points elsewhere. 2836You should set 2837.Ev PORTSDIR 2838in 2839.Pa /etc/mk.conf 2840to the real location of the ports directory. 2841.It "Fatal: SUBPACKAGES should always begin with -: <offending list>" 2842That is the only way to differentiate between 2843.Ev FLAVOR 2844and 2845.Ev SUBPACKAGE 2846in 2847.Xr pkgpath 7 2848specifications. 2849.It "Fatal: the licencing info for <pkgname> is incomplete..." 2850Every port must have explicit defines of all 2851.Ev PERMIT_* 2852values. 2853.It "Fatal: Use 'env FLAVOR=flavor make' instead" 2854Arguments specified after 2855.Xr make 1 2856are hardcoded for all recursive sub-makes, and very difficult to override. 2857Thus, 2858.Ev FLAVOR 2859must be specified in the environment instead. 2860.It "Fatal: Use 'env SUBPACKAGE=-sub make' instead" 2861Arguments specified after 2862.Xr make 1 2863are hardcoded for all recursive sub-makes, and very difficult to override. 2864Thus, 2865.Ev SUBPACKAGE 2866must be specified in the environment instead. 2867.It "ldconfig: <dir>: No such file or directory" 2868Usually produced by 2869.Xr pkg_add 1 2870running 2871.Xr ldconfig 8 . 2872Some tools such as GNU libtool will add directories living under 2873.Pa ${WRKINST} 2874to the shared library path during the 2875.Ar fake 2876stage. 2877Of course, 2878.Xr ldconfig 8 2879will later complain after the directory no longer exists. 2880The bogus tool should be fixed to conform to 2881.Ox 2882usage. 2883.It LIB_DEPENDS <spec> not needed for <FULLPKGPATH> 2884There doesn't seem to be any WANTLIB to match the given LIB_DEPENDS. 2885Thus, the LIB_DEPENDS won't turn into a @depends line in the created package. 2886This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS: 2887RUN_DEPENDS is needed for dlopen'd libraries. 2888.Pp 2889Might be intentional sometimes, if some compile flavors create static binaries, 2890for instance. 2891Also, will happen for multi-packages, where one sets LIB_DEPENDS to have 2892a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE). 2893.Pp 2894See print-package-args (lib-depends-args) for details. 2895.It "Warning: FULLPKGNAME-sub defined but not FULLPKGPATH-sub" 2896.Ev FULLPKGNAME-sub 2897has been explicitly defined by the port, instead of relying on the default, 2898but no value of 2899.Ev FULLPKGPATH-sub 2900has been given. 2901This is often an error. 2902.It "Warning: symlink(s) point to non existent file." 2903Warning message comes from 2904.Xr pkg_create 1 . 2905The symlink resides in the fake area, under 2906.Pa ${WRKINST} . 2907This is only a warning because the symlink may point to a run-time dependency, 2908which obviously won't exist under 2909.Pa ${WRKINST} 2910at the time 2911.Li make package 2912is run. 2913.It "Warning: @option no-default-conflict with no @conflict" 2914Warning message comes from 2915.Xr pkg_create 1 . 2916Most packages that waive "default-conflict" will have explicit conflict markers 2917instead. 2918Otherwise, the package will only conflict with the exact same version, with 2919some possible 2920.Ev REVISION 2921bumps. 2922Any other version or 2923.Ev FLAVOR 2924won't conflict. 2925This is generally an error, apart from very few ports like 2926.Pa devel/autoconf/* . 2927.It "groff produced empty result for <manpage>..." 2928Warning message comes from 2929.Xr pkg_create 1 . 2930Manpages are automatically formatted with 2931.Xr groff 1 2932if 2933.Ev USE_GROFF 2934is set. 2935The above message denotes an actual problem while formatting the page, 2936which should be addressed. 2937In the meantime, 2938.Xr pkg_create 1 2939still produces a package, but leaves the manpage unformatted, in the hope 2940that something will be able to make sense of it. 2941.El 2942.Sh FILES 2943.Bl -tag -width files/md5 2944.It Pa ../Makefile.inc 2945Common Makefile fragment for a set of ports, included automatically. 2946.It Pa /cdrom/distfiles 2947Default path to a CD-ROM (or other media) full of distribution files. 2948.It Pa ${DISTDIR} 2949Cache of all distribution files. 2950.It Pa distinfo 2951Checksum file. 2952Holds the output of 2953.Xr cksum 1 , 2954using ${PREFERRED_CIPHERS}, 2955for the port's ${DISTFILES} and ${PATCHFILES}, 2956as well as the sizes of these files. 2957.It Pa ${DISTDIR}/${CHECKSUMFILES} 2958Cache of normal distribution files for a given port. 2959.It Pa ${DISTDIR}/${MAKESUMFILES} 2960Cache of all distribution files for a given port. 2961.It Pa ${PKGDIR}/DESCR 2962Description for the port. 2963Variables such as ${HOMEPAGE} and ${MAINTAINER} will be expanded 2964(see SUBST_VARS). 2965Multi-package ports will use DESCR${SUBPACKAGE}. 2966.It Pa ${PKGDIR}/README 2967.Ox 2968specific documentation for a port, that will be installed as 2969.Pa ${LOCALBASE}/share/doc/pkg-readmes/${FULLPKGNAME} 2970at the end of 2971.Ar fake . 2972Variables from 2973.Ev SUBST_VARS 2974will be expanded. 2975Multi-package ports will use 2976.Pa README${SUBPACKAGE} . 2977.It Pa ${PKGDIR}/<foo>.rc 2978Startup script for <foo>. 2979Will be installed as 2980.Ar ${RCDIR}/<foo> 2981at the end of 2982.Ar fake . 2983Variables from 2984.Ev SUBST_VARS 2985will be expanded. 2986.It Pa ${PORTSDIR}/infrastructure/db/fake.mtree 2987Specification used for populating ${WRKINST} at the start of 2988.Ar fake . 2989Use 2990.Ar pre-fake 2991if this is incomplete. 2992.It Pa ${PORTSDIR}/packages/${MACHINE_ARCH} 2993Default setup of ${PACKAGE_REPOSITORY}. 2994.It Pa ${PACKAGE_REPOSITORY}/no-arch 2995Location of arch-independent packages. 2996.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all 2997Location of all built packages. 2998.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cache 2999Location of packages retrieved through the network. 3000.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cksums 3001Location of checksums, see 3002.Ev CHECKSUM_PACKAGES . 3003.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cdrom 3004Location of packages suitable for the CD. 3005.It Pa ${PACkAGE_REPOSITORY}/${MACHINE_ARCH}/ftp 3006Location of packages suitable for FTP. 3007.It Pa ${PORTSDIR}/bulk/${MACHINE_ARCH} 3008Default setup of ${BULK_COOKIES_DIR}. 3009.It Pa ${PORTSDIR}/update/${MACHINE_ARCH} 3010Default setup of ${UPDATE_COOKIES_DIR}. 3011.It Pa ${PORTSDIR}/mystuff 3012Extra directory used to store local ports before committing them. 3013All depend targets will normally look there after the normal lookup fails. 3014See 3015.Ev PORTSDIR_PATH . 3016.It Pa systrace.filter 3017List of additional port specific filters, included automatically. 3018.It Pa systrace.policy 3019List of additional port specific policies, included automatically. 3020.El 3021.Sh THE FAKE FRAMEWORK 3022The 3023.Ar fake 3024target is used to install the port in a private directory first, ready for 3025packaging by the 3026.Ar package 3027target, so that the actual installation will use the package. 3028.Pp 3029Essentially, 3030.Ar fake 3031invokes a real 3032.Ar install 3033process after tweaking a few variables. 3034.Pp 3035.Ar fake 3036first creates a skeleton tree under ${WRKINST}, using the 3037.Xr mtree 8 3038specification 3039.Pa ${PORTSDIR}/infrastructure/db/fake.mtree . 3040.Pp 3041A 3042.Ar pre-fake 3043target may be used to complete that skeleton tree. 3044For instance, a few ports may need supplementary stuff to be present (as 3045it would be installed if the port's dependencies were present). 3046.Pp 3047If 3048.Ar {pre,do,post}-install 3049overrides are present, they are used with some 3050important changes: PREFIX is set to ${WRKINST}${PREFIX}, ${DESTDIRNAME} 3051is set to ${WRKINST}, and TRUEPREFIX is set to ${PREFIX}. 3052Essentially, old install targets work transparently, except for a need to 3053change PREFIX to TRUEPREFIX for symbolic links and similar path lookups. 3054Specific traditional post install work can be simply removed, as it will 3055be taken care of by the package itself (for instance, ldconfig, or 3056texinfo's install-info). 3057.Pp 3058If no 3059.Ar do-install 3060override is present, the port is installed using 3061.Bd -literal -offset 2n 3062env -i ${MAKE_ENV} 3063PREFIX=${WRKINST}${PREFIX} ${DESTDIRNAME}=${WRKINST} TRUEPREFIX=${PREFIX} 3064${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE} ${FAKE_TARGET} 3065.Ed 3066.Pp 3067Note that this does set both PREFIX and ${DESTDIRNAME}. 3068If a port's Makefile both heeds ${DESTDIRNAME}, 3069and references PREFIX explicitly, 3070FAKE_FLAGS may rectify the problem by setting PREFIX=${PREFIX} 3071(which will do the right thing, since ${PREFIX} is a 3072.Xr make 1 3073construct which will not be seen by the shell). 3074.Pp 3075${FAKE_FLAGS} is used to set variables on 3076.Xr make 1 3077command line, which will override the port Makefile contents. 3078Thus, a port that mentions DESTDIR= does not need any patch to work with fake. 3079.Pp 3080Files such as 3081.Pa ${PKGDIR}/README* 3082or 3083.Pa ${PKGDIR}/*.rc 3084get copied to 3085.Pa ${WRKINST} 3086at the end of 3087.Ar fake 3088(see the FILES section above for details). 3089.Sh FLAVORS AND MULTI_PACKAGES 3090Starting with 3091.Ox 2.7 , 3092each port can generate distinct packages through two orthogonal mechanisms: 3093FLAVORS and MULTI_PACKAGES. 3094.Pp 3095The current MULTI_PACKAGES mechanism was introduced after 3096.Ox 4.0 . 3097.Pp 3098The arch-dependent part was refined after 3099.Ox 5.0 . 3100.Pp 3101If a port can be compiled with several options, these options 3102should be turned into FLAVORS. 3103The port maintainer will set FLAVORS to be the list of possible options in 3104the Makefile. 3105When building the port, the package builder will set 3106.Li "FLAVOR='option1 option2...'" 3107to build a specific flavor of the port. 3108The Makefile should test the value of FLAVOR as follows: 3109.Bd -literal -offset indent 3110FLAVOR?= 3111\&.if ${FLAVOR:Moption1} 3112# what to do if option1 3113\&.endif 3114\&.if ${FLAVOR:Moption2} 3115# what to do if option2 3116\&.endif 3117.Ed 3118.Pp 3119.Pa bsd.port.mk 3120takes care of a few details, such as generating a distinct work directory for 3121each flavor, or creating a FULLPKGNAME by adding a dash separated list of 3122flavors to the base package name. 3123The order in which FLAVOR is specified does not matter: this dash separated 3124list will be reordered to match the ordering of FLAVORS. 3125.Pp 3126It is an error to specify an option in FLAVOR that does not appear in FLAVORS, 3127to prevent misspellings. 3128.Pp 3129In bulk package building, flavors can be specified as a comma 3130separated list after the package directory, e.g., SUBDIR+=vim,no_x11 3131.Po 3132see 3133.Xr pkgpath 7 3134.Pc 3135.Pp 3136Finally, package information will use templates with the canonical package 3137extension if they are available: if FLAVOR='option1 option2' and both 3138COMMENT and COMMENT-option1-option2 are available, COMMENT-option1-option2 will 3139be used. 3140.Pp 3141If one build of a port can generate several distinct packages, set 3142MULTI_PACKAGES accordingly. 3143Each extension of a MULTI_PACKAGES name should start with a dash, so that 3144they cannot be confused with FLAVORS. 3145In dependency checking and bulk builds, a subpackage can be 3146specified after a comma, e.g., SUBDIR+=quake,-server. 3147MULTI_PACKAGES only affects the actual package building step (and the 3148describe step, since a MULTI_PACKAGES port will produce several 3149descriptions). 3150.Pp 3151If MULTI_PACKAGES is set, the packaging stage happens once for every 3152subpackage, using subpackage-specific variables. 3153For instance, if MULTI_PACKAGES=-main -lib -server, 3154.Ev PKG_ARCH-main , 3155.Ev PKG_ARCH-lib 3156and 3157.Ev PKG_ARCH-server 3158will be used for the subpackages respectively called 3159.Ev FULLPKGNAME-main , 3160.Ev FULLPKGNAME-lib 3161and 3162.Ev FULLPKGNAME-server . 3163.Pp 3164All package information is also derived from 3165templates with SUBPACKAGE appended. 3166In the preceding example, the packing-list template for FULLPKGNAME-lib 3167must be in PLIST-lib. 3168.Pp 3169The following variables are subpackage dependent: 3170.Ev COMMENT , 3171.Ev PKG_ARCH , 3172.Ev PERMIT_PACKAGE_FTP , 3173.Ev PERMIT_PACKAGE_CDROM , 3174.Ev PKGFILE , 3175.Ev PKGNAME , 3176.Ev FULLPKGNAME , 3177.Ev REVISION , 3178.Ev EPOCH , 3179.Ev FULLPKGPATH , 3180.Ev RUN_DEPENDS , 3181.Ev WANTLIB , 3182.Ev LIB_DEPENDS , 3183.Ev IGNORE , 3184.Ev ONLY_FOR_ARCHS , 3185.Ev NOT_FOR_ARCHS , 3186.Ev PKG_ARGS , 3187.Ev PREFIX , 3188.Ev CATEGORIES , 3189.Ev MESSAGE , 3190.Ev UNMESSAGE , 3191.Ev DESCR , 3192.Ev PLIST , 3193.Ev STATIC_PLIST , 3194.Ev PKGSPEC . 3195.Pp 3196The usual non-MULTI_PACKAGES variables are simply used as default values 3197for all subpackages. 3198So, if you set 3199.Li "PKG_ARCH=*" 3200.Li "PKG_ARCH-main=i386" 3201then 3202.Ev PKG_ARCH-lib 3203and 3204.Ev PKG_ARCH-server 3205will both be 3206.Sq * . 3207.Pp 3208.Ev WANTLIB 3209and 3210.Ev LIB_DEPENDS 3211are special. 3212At the beginning of the build, during 3213.Ar prepare , 3214all build dependencies will be checked, 3215which includes both 3216.Ev LIB_DEPENDS , 3217.Ev WANTLIB 3218and the subpackage-specific versions of these. 3219As an exception, any 3220.Ev LIB_DEPENDS-sub 3221that references the current port will be ignored as a build dependency, 3222in order to avoid recursion. 3223.Pp 3224.Ev FULLPKGPATH 3225and 3226.Ev FULLPKGNAME 3227are special as well. 3228You must set 3229.Ev PKGNAME-sub 3230or 3231.Ev FULLPKGNAME-sub 3232for each subpackage, but 3233.Ev FULLPKGPATH-sub 3234is set automatically to the right value. 3235In very rare cases, one may override 3236.Ev FULLPKGPATH-sub . 3237(for instance, if one specific subpackage is not affected by option 3238settings that affect other subpackages, e.g., for include files packs). 3239.Pp 3240In terms of using the port, quite a few targets will have a subpackage 3241specific subtarget: 3242invoking 3243.Ar package 3244is the same as invoking 3245.Ar subpackage 3246for all subpackages, 3247invoking 3248.Ar install-all 3249is the same as invoking 3250.Ar install 3251for all subpackages, 3252and invoking 3253.Ar update 3254is the same as invoking 3255subupdate 3256for all subpackages. 3257.Pp 3258.Ev ONLY_FOR_ARCHS 3259and 3260.Ev NOT_FOR_ARCHS 3261interact with 3262.Ev MULTI_PACKAGES 3263and 3264.Ev IGNORE . 3265The infrastructure will automatically filter subpackages 3266that are not suitable for the current architecture. 3267Thus, 3268.Ev MULTI_PACKAGES 3269should always list all subpackages, 3270even things not buildable on the current architecture, 3271for indexing purposes. 3272.Pp 3273Starting with 3274.Ox 5.1 , 3275.Xr bsd.port.arch.mk 5 3276should be used to simplify the handling of 3277.Ev MULTI_PACKAGES 3278in arch-dependent setups: 3279.Pp 3280Make sure 3281.Ev MULTI_PACKAGES , 3282.Ev ONLY_FOR_ARCHS* , 3283and 3284.Ev PSEUDO_FLAVORS 3285are defined correctly, then 3286.Bd -literal -offset indent 3287\&.include <bsd.port.arch.mk> 3288.Ed 3289.Pp 3290This will compute 3291.Ev BUILD_PACKAGES , 3292the list of actual subpackages to build with the current setup, 3293by taking arch constraints and pseudo-flavors into account. 3294Then test 3295.Ev BUILD_PACKAGES 3296to set up the right configuration, e.g., to check if 3297.Ev SUBPACKAGE 3298.Ar -mono 3299should be built: 3300.Bd -literal -offset indent 3301\&.if ${BUILD_PACKAGES:M-mono} 3302.Ed 3303.Pp 3304The 3305.Pa lang/gcc/4.2 3306or 3307.Pa print/poppler 3308ports should provide examples of proper use. 3309.Pp 3310Note that 3311.Xr dpb 1 3312will break if all subpackages are not properly listed. 3313.Sh THE GENERATION OF PACKAGE INFORMATION 3314Starting after 3315.Ox 4.1 3316all package information is processed directly by 3317.Xr pkg_create 1 3318from templates in ${PKG_DIR}. 3319.Pp 3320.Bl -bullet -compact 3321.It 3322If not overridden by the user, determine which set of templates to use, 3323depending on the current SUBPACKAGE and FLAVOR information. 3324Set PLIST${SUBPACKAGE}, DESCR${SUBPACKAGE}, COMMENT${SUBPACKAGE}, MESSAGE${SUBPACKAGE}, UNMESSAGE${SUBPACKAGE} accordingly. 3325.It 3326Generate the actual DESCR, and if needed, MESSAGE, UNMESSAGE, 3327from the templates in ${DESCR}, ${MESSAGE}, ${UNMESSAGE}, by 3328substituting the variables in ${SUBST_VARS}, and by substituting 3329${FLAVORS} with the canonical flavor extension for this port, 3330e.g., if FLAVORS=no_map gfx qt2, if FLAVOR=gfx no_map, this is 3331.Sq -no_map-gfx . 3332.It 3333Generate the actual PLIST from the template ${PLIST}, 3334by inserting shared/no-shared fragments, merging other fragments, 3335and applying the same variable substitutions as other package information. 3336.El 3337.Pp 3338Note that ${COMMENT} is currently not substituted, to speed up 3339.Ar describe 3340generation. 3341.Pp 3342To avoid substitution, variables can be escaped as follows: 3343.Li "$\e{PREFIX}" 3344.Pp 3345Constructs such as the line 3346.Li "%%SHARED%%" 3347or 3348.Li "!%%SHARED%%" 3349in the packing-list template trigger the inclusion of the 3350.Pa ${PKGDIR}/PFRAG.shared${SUBPACKAGE} 3351or 3352.Pa ${PKGDIR}/PFRAG.no-shared${SUBPACKAGE} . 3353.Pp 3354Similarly, if FLAVORS lists flav1, then the line 3355.Li "%%flav1%%" 3356(resp. 3357.Li "!%%flav1%%" ) 3358will trigger the inclusion of 3359.Pa ${PKGDIR}/PFRAG.flav1${SUBPACKAGE} 3360(resp. 3361.Pa ${PKGDIR}/PFRAG.no-flav1${SUBPACKAGE} ) 3362in the packing-list. 3363Other fragments can be defined by simply adding 3364.Li "-Dfrag=1" 3365or 3366.Li "-Dfrag=0" 3367to 3368.Ev PKG_ARGS 3369.Pp 3370If libraries are built using 3371.Pa bsd.lib.mk , 3372special care should be taken for mips64* architectures, 3373which do not ever build 3374.Pa *pic.a 3375files (all mips code is pic already). 3376.Nm 3377automatically adds 3378.Li "-Dno_mips64=1" 3379or 3380.Li "-Dno_mips64=0" 3381to 3382.Ev PKG_ARGS , 3383and the porter only needs to provide the appropriate fragment. 3384.Pp 3385.Xr pkg_add 1 3386now calls 3387.Xr ldconfig 8 3388directly, provided dynamic libraries have been annotated with 3389.Li "@lib libthingy.so.5.0" . 3390Adding new directories to the dynamic loader cache has been 3391deprecated. 3392It is often better to let libraries be visible as a link 3393under ${LOCALBASE}. 3394Having a separate directory is enough to trick 3395.Xr ld 1 3396into grabbing the right version. 3397Libraries used only for 3398.Xr dlopen 3 3399do not need to be visible. 3400Some programs will prefer to use rpath to find their own libraries. 3401.Pp 3402The special 3403.Ar update-plist 3404target does a fairly good job of automatically generating PLIST and 3405PFRAG.shared fragments. 3406.Pp 3407If 3408.Ev PLIST_DB 3409points to a directory, all packing-lists from packages generated by 3410.Xr pkg_create 1 3411during the 3412.Ar package 3413stage are saved in that location by a script: 3414.Pa ${PORTSDIR}/infrastructure/bin/register-plist . 3415This script strips some irrelevant information and normalizes the 3416packing-list somehow, and compares it to existing information, looking 3417for relevant changes. 3418Since a package name must always be changed when the packing-list changes, 3419any attempt to replace a packing-list of a given name with a different 3420packing-list will be flagged as an error. 3421.Pp 3422In MULTI_PACKAGES mode, there must be separate COMMENT, DESCR, and PLIST 3423templates for each SUBPACKAGE (and optional distinct MESSAGE, UNMESSAGE 3424files in a similar way). 3425This contrasts with the FLAVORS 3426situation, where all these files will automatically default to the 3427non-flavor version if there is no flavor-specific file around. 3428.Sh OBSOLETE TARGETS 3429.Bl -tag -width do-configure 3430.It Ar cdrom-packages , ftp-packages 3431Links are now created during the 3432.Ar package 3433target. 3434.It Ar depends-list 3435Renamed into 3436.Ar full-build-depends 3437.It Ar {pre,do}-extract 3438Don't override. 3439Set 3440.Ev EXTRACT_ONLY 3441to nothing and override 3442.Ar post-extract 3443instead. 3444.It Ar {pre,do,post}-fetch 3445These prevented bulk mechanisms from running properly. 3446.It Ar {pre,do,post}-package 3447There is no port that requires special treatment during packaging, 3448as 3449.Ar {pre,do,post}-install 3450should take care of every necessity. 3451.It Ar fetch-all , Ar fetch-list , Ar mirror-distfiles , Ar fetch-makefile 3452See 3453.Xr mirroring-ports 7 3454for more efficient and flexible ways to build mirrors. 3455.It Ar obj 3456Starting with 3457.Ox 3.3 , 3458using 3459.Ev WRKOBJDIR 3460no longer creates a symlink between the current directory and 3461a subdirectory of ${WRKOBJDIR}, so 3462.Ar obj 3463is no longer applicable. 3464.It Ar print-depends 3465Use 3466.Ar print-build-depends 3467and 3468.Ar print-run-depends 3469instead. 3470.It Ar print-depends-list 3471Renamed into 3472.Ar print-build-depends 3473.It Ar print-package-depends 3474Renamed into 3475.Ar print-run-depends 3476.It Ar readme , readmes 3477replaced by the 3478.Pa databases/ports-readmes 3479port, using the Template Toolkit 3480.Po 3481.Pa textproc/p5-Template 3482.Pc 3483instead of hand-coded substitutions. 3484.El 3485.Sh OBSOLETE VARIABLES 3486.Bl -tag -width MASTER_SITES 3487.It Ev BIN_PACKAGES 3488Old user settings. 3489The infrastructure always trusts the repository to contain correct packages. 3490So, if the package name did not change and if it exists in the repository, 3491it will not be rebuilt without manual user action. 3492.It Ev CATn 3493List of formatted manpages, per section. 3494.It Ev CATPREFIX 3495Location for storing formatted manpages. 3496Derived directly from 3497.Ev PREFIX . 3498.It Ev CDROM_PACKAGES 3499Old user settings. 3500Base location where packages suitable for a CD-ROM (see 3501PERMIT_PACKAGE_CDROM) will be placed. 3502Now hardwired to 3503.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cdrom . 3504.It Ev COMMENT 3505Used to be the name of the comment file for a package. 3506It now holds the comment itself. 3507Some magic has been put in to allow for a seamless transition. 3508.It Ev DESCR_SRC 3509From 3510.Nx . 3511This is DESCR. 3512.Ox 3513does not give a specific name to the generated file. 3514It is not recommended to try to access it directly. 3515.It Ev EXTRACT_AFTER_ARGS 3516Was used to cobble together the normal extraction command, as 3517${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_AFTER_ARGS}. 3518Use 3519.Ev EXTRACT_CASES 3520instead. 3521.It Ev EXTRACT_BEFORE_ARGS 3522Likewise, use 3523.Ev EXTRACT_CASES 3524instead. 3525.It Ev EXTRACT_CMD 3526Likewise, use 3527.Ev EXTRACT_CASES 3528instead. 3529.It Ev FETCH_BEFORE_ARGS , Ev FETCH_AFTER_ARGS 3530Set 3531.Ev FETCH_CMD 3532to point to a script that does any required special treatment instead. 3533.It Ev FETCH_DEPENDS 3534Used to specify dependencies that were needed to fetch files. 3535It is much easier to mirror locally weird distribution files. 3536.It Ev FTP_PACKAGES 3537User settings. 3538Base location where packages suitable for FTP (see 3539PERMIT_PACKAGE_FTP) will be placed. 3540Now hardwired to 3541.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/ftp . 3542.It Ev GNU_CONFIGURE 3543Use 3544.Ev CONFIGURE_STYLE 3545instead. 3546.It Ev HAS_CONFIGURE 3547Use 3548.Ev CONFIGURE_STYLE 3549instead. 3550.It Ev IGNOREFILES 3551Set to the list of files that can't be checksummed. 3552All uses of it have led to postponing the correct action: talking 3553to the software author and getting him to provide versioned archives. 3554.It Ev MANn 3555List of unformatted manpages, per section. 3556.It Ev MANPREFIX 3557Location for storing unformatted manpages. 3558Derived directly from 3559.Ev PREFIX . 3560.It Ev MASTERDIR 3561From 3562.Fx . 3563Used to organize a collection of ports that share most files. 3564.Ox 3565uses a single port with flavors or multi-packages to produce 3566package variations instead. 3567.It Ev MASTER_SITE_SUBDIR 3568Contents were used to replace 3569.Sq %SUBDIR% 3570in all 3571.Ev MASTER_SITES 3572variables. 3573Since 3574.Sq %SUBDIR% 3575almost always occur at the end of the directory, 3576the simpler 3577.Li ${VARIABLE:=subdir/} 3578construct is now used instead 3579.Po 3580taken from 3581.Nx 3582.Pc . 3583.It Ev MD5_FILE 3584Use 3585.Ev CHECKSUM_FILE 3586instead. 3587.It Ev MIRROR_DISTFILE 3588Use 3589.Ev PERMIT_DISTFILES_FTP 3590and 3591.Ev PERMIT_DISTFILES_CDROM 3592to determine which files can be mirrored instead. 3593See 3594.Xr mirroring-ports 7 . 3595.It Ev NEED_VERSION 3596Used to set a requirement on a specific revision of 3597.Nm 3598needed by a port. 3599No longer needed as 3600.Nm 3601should always be kept up-to-date. 3602.It Ev NO_CONFIGURE 3603If ${CONFIGURE_SCRIPT} does not exist, no automatic configuration will 3604be done anyway. 3605.It Ev NO_DESCRIBE 3606All ports should generate a description. 3607.It Ev NO_EXTRACT 3608Set EXTRACT_ONLY= instead. 3609.It Ev NO_INSTALL_MANPAGES 3610Use 3611.Ev CONFIGURE_STYLE 3612instead. 3613.It Ev NO_MTREE 3614Starting with 3615.Ox 2.7 , 3616the operating system installation script runs the /usr/local specification 3617globally, instead of embedding it in each package. 3618So packages no longer record an 3619.Xr mtree 8 3620specification. 3621Use an explicit 3622.Sq @exec 3623command if needed. 3624.It Ev NO_PACKAGE 3625All ports should generate a package, preferably before install. 3626.It Ev NO_PATCH 3627The absence of a patches directory does the same. 3628Use PATCHDIR and PATCH_LIST if patches need to be changed dynamically. 3629.It Ev NO_WRKDIR 3630All ports should have a working directory, as this is necessary to store 3631cookies and keep state. 3632.It Ev NO_WRKSUBDIR 3633The same functionality is obtained by setting WRKDIST=${WRKDIR} . 3634.It Ev NOCLEANDEPENDS 3635Use CLEANDEPENDS instead. 3636.It Ev NOMANCOMPRESS 3637.Fx 3638ships with compressed man pages, and uses this variable to control 3639that behavior. 3640.It Ev OBJMACHINE 3641Starting with 3642.Ox 3.3 , 3643setting 3644.Ev WRKOBJDIR 3645creates the whole 3646.Ev WRKDIR 3647hierarchy under ${WRKOBJDIR}, so 3648.Ev OBJMACHINE 3649is no longer useful. 3650.It Ev OPSYS 3651The operating system. 3652This ports tree is only used on 3653.Ox . 3654.It Ev OPSYS_VER 3655Use 3656.Ev OSREV 3657instead. 3658.It Ev PACKAGES 3659Base location for packages built, everything is based on 3660.Ev PACKAGE_REPOSITORY 3661now. 3662.It Ev PACKAGING 3663Used to be set during package creation, so that the port would test it 3664to tweak some settings at this point. 3665All its effects are now achieved through 3666.Ev MULTI_PACKAGES . 3667.It Ev PATCH_SITES 3668.Ev PATCHFILES 3669used to be retrieved from a separate site list. 3670For greater flexibility, all files are now retrieved from 3671.Ev MASTER_SITES , 3672.Ev MASTER_SITES0 , ... , 3673.Ev MASTER_SITES9 , 3674using a 3675.Sq :0 3676to 3677.Sq :9 3678extension to the file name, e.g., 3679.Bd -literal -offset indent 3680PATCHFILES=foo.diff.gz 3681PATCH_SITES=ftp://ftp.zoinx.org/pub/ 3682.Ed 3683.Pp 3684becomes 3685.Bd -literal -offset indent 3686PATCHFILES=foo.diff.gz:0 3687MASTER_SITES0=ftp://ftp.zoinx.org/pub/ 3688.Ed 3689.It Ev PKG_CMD 3690replaced by 3691.Ev PKG_CREATE . 3692.It Ev PKGREPOSITORY 3693Old user settings. 3694See 3695.Ev PACKAGE_REPOSITORY . 3696.It Ev PKGREPOSITORYBASE 3697Old user settings. 3698See 3699.Ev PACKAGE_REPOSITORY . 3700.It Ev PLIST_SRC 3701From 3702.Nx . 3703This is PLIST. 3704.Ox 3705does not give a specific name to the generated file. 3706It is not recommended to try to access them directly. 3707.It Ev PKGNAME 3708Used to refer to the full package name, has been superseded by 3709.Ev FULLPKGNAME-foo , 3710for 3711.Ev SUBPACKAGE 3712-foo . 3713.Ev PKGNAME 3714now holds the package name, not taking multi-packages or flavors 3715into account. 3716Most ports are not concerned by this change. 3717.It Ev PLIST_SUBST 3718From 3719.Nx 3720and 3721.Fx . 3722Use SUBST_VARS instead. 3723.Ox 3724does not allow general substitutions of the form VAR=value, but uses 3725only a list of variables instead. 3726Most package files gets transformed, instead of only the packing list. 3727.It Ev RESTRICTED 3728Port has cryptographic issues. 3729.Ox 3730focuses on 3731.Ev PERMIT_PACKAGE_{FTP,CDROM} 3732instead. 3733.It Ev SED_PLIST 3734Old pipeline for creating packing-lists at the ports level. 3735Necessary functionality has been integrated directly into 3736.Xr pkg_create 1 . 3737.It Ev SCRIPTDIR 3738Old location for scripts related to the current port. 3739There is no reason for the semantic distinction, use 3740.Ev FILESDIR 3741for those. 3742.It Ev SCRIPTS_ENV 3743Used to contain the environment for invoking various scripts. 3744.Ev CONFIGURE_ENV 3745and 3746.Ev MAKE_ENV 3747are enough. 3748.It Ev USE_AUTOCONF 3749Use 3750.Ev CONFIGURE_STYLE 3751instead. 3752.It Ev USE_BZIP2 3753The framework will automatically detect the presence of 3754.Pa .tar.bz2 3755files to extract. 3756See also 3757.Ev BZIP2 , EXTRACT_CASES , 3758and 3759.Ev EXTRACT_SUFX . 3760.It Ev USE_IMAKE 3761Use 3762.Ev CONFIGURE_STYLE 3763instead. 3764.It Ev USE_X11 3765Presence of ${X11BASE} is now enforced by default for building ports. 3766.It Ev USE_ZIP 3767The framework will automatically detect the presence of 3768.Pa .zip 3769files to extract. 3770See also 3771.Ev ZIP , EXTRACT_CASES , 3772and 3773.Ev EXTRACT_SUFX . 3774.It Ev VARNAME 3775Use make show=name instead of make show VARNAME=name. 3776.It Ev WRKPKG 3777Directory used to build package information from the templates under 3778.Pa ${PKGDIR} . 3779This information is now built on the fly by 3780.Xr pkg_create 1 . 3781.El 3782.Sh OBSOLETE FILES 3783.Bl -tag -width files/md5 3784.It Pa {files,patches,pkg}.${ARCH} 3785Offensive to introspection, makes it impossible to build a decent sqlports 3786on a given arch. 3787Hasn't been used for a long time, and there are lots of mechanisms such as 3788.Ev PKG_ARGS 3789and fragment substitution, or 3790.Ev PATCH_LIST 3791to achieve similar results. 3792.It Pa Makefile.${ARCH} 3793Likewise, offensive to introspection too. 3794.It Pa ${FILESDIR}/md5 3795Renamed to 3796.Pa distinfo 3797to match other BSD, and save directories. 3798.It Pa ${SCRIPTDIR}/{pre,do,post}-* 3799Identical functionality can be obtained through a {pre,do,post}-* target, 3800invoking the script manually if necessary. 3801.It Pa ${SCRIPTDIR}/configure 3802No longer invoked automatically. 3803Just inline the instructions in 3804.Ar do-configure 3805in the Makefile, or put the script in ${FILESDIR} and 3806invoke it. 3807.It Pa ${PKGDIR}/COMMENT 3808Use COMMENT variable instead. 3809.It Pa ${PKGDIR}/DEINSTALL* 3810Use @unexec annotations in the packing-list instead. 3811.It Pa ${PKGDIR}/INSTALL* 3812Use @exec annotations in the packing-list instead. 3813.It Pa ${PKGDIR}/PLIST.noshared 3814Use PFRAG.shared or PFRAG.no-shared instead. 3815PLIST.noshared was too easy to forget when updating ports. 3816.It Pa ${PKGDIR}/PLIST.sed 3817Use PLIST directly. 3818Until revision 1.295, 3819.Nm 3820did not substitute variables in the packing list unless this special form 3821was used. 3822.It Pa ${PKGDIR}/REQ* 3823Old requirement script. 3824Was mostly unused anyway. 3825.It Pa /usr/share/mk/bsd.port.mk 3826Original location of 3827.Nm bsd.port.mk . 3828The current file lives under 3829.Pa ${PORTSDIR}/infrastructure/mk/bsd.port.mk , 3830whereas 3831.Pa /usr/share/mk/bsd.port.mk 3832is just a stub. 3833.It Pa {scripts,files,patches}.${OPSYS} 3834The 3835.Ox 3836ports tree focuses on robustness, not on being portable to other operating 3837systems. 3838In any case, portability should not need to depend on operating 3839system dependent patches. 3840.It Pa /usr/local/etc 3841Used by 3842.Fx 3843to marshall system configuration files. 3844All 3845.Ox 3846system configuration files are located in 3847.Pa /etc , 3848or in a subdirectory of 3849.Pa /etc . 3850.El 3851.Sh SEE ALSO 3852.Xr ftp 1 , 3853.Xr pkg_add 1 , 3854.Xr pkg_create 1 , 3855.Xr OpenBSD::Intro 3p , 3856.Xr bsd.port.arch.mk 5 , 3857.Xr mk.conf 5 , 3858.Xr port-modules 5 , 3859.Xr library-specs 7 , 3860.Xr mirroring-ports 7 , 3861.Xr packages-specs 7 , 3862.Xr pkgpath 7 , 3863.Xr ports 7 3864.Sh HISTORY 3865The ports mechanism originally came from 3866.Fx . 3867A lot of additions were taken from 3868.Nx 3869over the seminal years. 3870.Pp 3871Since 1998, the framework has been systematically cleaned-up and reorganized 3872to remove bugs. 3873New features have been carefully introduced, trying hard to avoid 3874inconsistencies. 3875.Pp 3876FLAVORS, MULTI_PACKAGES and FAKE are 3877.Ox 3878improvements. 3879Most recent additions do not come from another BSD. 3880.\" Voluntarily undocumented: 3881.\" AUTOCONF_ENV: probably not needed anyway, should be internal. 3882.Sh BUGS AND LIMITATIONS 3883.Ev LOCALBASE , 3884.Ev X11BASE , 3885.Ev SYSCONFDIR 3886and 3887.Ev PREFIX 3888are not heeded consistently. 3889Most of the ports tree will probably fall 3890apart if one tries to build/use stuff elsewhere. 3891