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