1.\" $OpenBSD: bsd.port.mk.5,v 1.526 2020/01/30 07:19:45 kn 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: January 30 2020 $ 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}, in kilobytes. 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 759Print the size of the work directory, in kilobytes. 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 8 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 8 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 desirable. 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_DEBUG_PACKAGES 1899User settings. 1900Defaults to 1901.Sq \&No . 1902If 1903.Sq Yes , 1904install available debug packages during all install/update targets. 1905.It Ev INSTALL_{PROGRAM,SCRIPT,DATA,MAN}[_DIR] 1906Macros to use to install a program, a script, data, or a man page (or the 1907corresponding directory), respectively. 1908.It Ev INSTALL_TARGET 1909Target invoked to install the software, during fake installation. 1910Default is 1911.Sq install . 1912.It Ev INTERACTIVE 1913User settings. 1914Set to 1915.Sq Yes 1916to skip all non-interactive ports. 1917Used in conjunction with 1918.Ev BATCH 1919to simplify bulk-package builds. 1920.It Ev IS_INTERACTIVE 1921Set to 1922.Sq Yes 1923if port needs human interaction to build. 1924Porters should strive to minimize 1925.Ev IS_INTERACTIVE 1926ports, by using 1927.Ev FLAVORS 1928for multiple choice ports, and by postponing human intervention 1929to package installation time. 1930.It Ev LE_ARCHS 1931Set to the list of little-endian architectures. 1932Read-only. 1933Use with 1934.Ev NOT_FOR_ARCHS 1935and 1936.Ev ONLY_FOR_ARCHS . 1937.It Ev LIB_DEPENDS 1938List of packages used by a port for its library dependencies. 1939Each item has the form 1940.Sq [pkgspec:]pkgpath . 1941Similar to 1942.Ev BUILD_DEPENDS 1943and 1944.Ev RUN_DEPENDS , 1945but with specific rules: 1946.Ev LIB_DEPENDS 1947always turn into 1948.Ev BUILD_DEPENDS 1949.Po 1950but see 1951.Sx FLAVORS AND MULTI PACKAGES 1952.Pc . 1953.Pp 1954.Ev LIB_DEPENDS 1955is also used as a run-time dependency, and recorded in the package as 1956such, if any of the libraries mentioned in 1957.Ev WANTLIB 1958is a shared library that originates within the dependent port. 1959.Pp 1960See 1961.Xr library-specs 7 1962for more details. 1963.It Ev lib_depends_args 1964Controls the behavior of 1965.Xr pkg_create 1 1966related targets, see 1967.Cm print-package-args 1968for details. 1969.It Ev LIBCXX 1970List of standard C++ libraries for the base compiler. 1971Read-only. 1972Use in 1973.Ev WANTLIB . 1974.It Ev LIBTOOL 1975Location of the libtool binary. 1976Default: 1977.Pa /usr/bin/libtool . 1978.It Ev LIBTOOL_FLAGS 1979Arguments to pass to libtool. 1980If USE_LIBTOOL is set, the environment variable LIBTOOL is set 1981to ${LIBTOOL} ${LIBTOOL_FLAGS}. 1982.It Ev LLD_EMUL 1983As 1984.Xr ld.lld 1 1985does not have a default emulation mode, 1986if it is the linker in-use, 1987.Ev LLD_EMUL 1988defaults to the correct option to set the emulation mode; 1989Otherwise, it stays empty. 1990Read-only. 1991Seldom used, as it is only needed to link binary data without using the 1992compiler. 1993.It Ev LLVM_ARCHS 1994Set to the list of architectures where LLVM/Clang could be used, 1995e.g., via lang/clang port module, see 1996.Xr port-modules 5 . 1997Read-only. 1998Use with 1999.Ev NOT_FOR_ARCHS 2000or 2001.Ev ONLY_FOR_ARCHS . 2002.It Ev LOCALBASE 2003where other ports have already been installed. 2004Default: 2005.Pa /usr/local . 2006.It Ev LOCALSTATEDIR 2007Location for this port's state directory, should always be derived 2008from 2009.Ev BASELOCALSTATEDIR , 2010which defaults to 2011.Pa /var . 2012Passed to gnu configure scripts. 2013.It Ev LOCKDIR 2014User settings. 2015Defaults to 2016.Pa ${WRKOBJDIR}/locks . 2017If set, points to a local directory common for all instances of 2018concurrent ports builds. 2019.It Ev LOCK_CMD 2020Expands to a command that will acquire a lock, namely 2021.Xr portlock 1 . 2022See also 2023.Xr ports 7 . 2024.It Ev LOCK_VERBOSE 2025User settings. 2026Defaults to 2027.Sq \&No . 2028Set to 2029.Sq Yes 2030to show every acquire/release lock operation. 2031.It Ev LP64_ARCHS 2032Set to the list of 64-bit architectures. 2033Read-only. 2034Use with 2035.Ev NOT_FOR_ARCHS . 2036.It Ev MAINTAINER 2037Email address with full name of the port's maintainer. 2038Defaults to 2039.Mt ports@openbsd.org . 2040.It Ev MAKE_ENV 2041Environment variables passed to make invocations and tests. 2042Sets at least PATH, PREFIX, LOCALBASE, X11BASE, CFLAGS, TRUEPREFIX, DESTDIR, 2043and the BSD_INSTALL_* macros. 2044.It Ev MAKE_FLAGS 2045Flags used for all make invocations, except for the 2046.Cm fake 2047stage, which adds 2048.Ev FAKE_FLAGS 2049(see 2050.Ev ALL_FAKE_FLAGS ) 2051and for the 2052.Cm test 2053stage, which adds 2054.Ev TEST_FLAGS 2055(see 2056.Ev ALL_TEST_FLAGS ) . 2057.It Ev MAKE_FILE 2058Name of the Makefile used for ports building. 2059Defaults to Makefile. 2060Used after changing directory to ${WRKBUILD}. 2061.It Ev MAKE_JOBS 2062Number of jobs to use when building the port, normally passed to 2063.Ev MAKE_PROGRAM 2064through 2065.Ev PARALLEL_MAKE_FLAGS . 2066Mostly set automatically when 2067.Ev DPB_PROPERTIES 2068contains 2069.Sq parallel . 2070.Pp 2071Note that 2072.Xr make 1 2073still has bugs that may prevent parallel build from working correctly! 2074.It Ev MAKE_PROGRAM 2075The make program that is used for building the port. 2076Set to ${MAKE} or ${GMAKE} depending on USE_GMAKE. 2077Read-only. 2078.It Ev MAKEFILE_LIST 2079Introspection variable, see 2080.Xr make 1 . 2081.It Ev MAKESUMFILES 2082List of all files that need to be retrieved by 2083.Cm fetch-all , 2084with 2085.Ev DIST_SUBDIR 2086prepended and with master site selection extension removed. 2087Read-only. 2088See also 2089.Ev CHECKSUMFILES . 2090.It Ev MASTER_SITE_BACKUP 2091User settings. 2092List of sites to try after normal master sites. 2093Normally includes ${MASTER_SITE_OPENBSD} and ${MASTER_SITE_FREEBSD}. 2094.It Ev MASTER_SITE_* 2095Lists of standard sites to retrieve files from, refer to 2096.Pa ${PORTSDIR}/infrastructure/db/network.conf . 2097.It Ev MASTER_SITES 2098List of primary locations from which distribution files and patchfiles are 2099retrieved. 2100See the 2101.Cm fetch 2102target for details. 2103Defaults to ${MASTER_SITES_GITHUB} for GitHub-hosted projects, 2104see 2105.Ev GH_* . 2106See 2107.Xr ports 7 2108for user configuration. 2109.It Ev MASTER_SITES0 , ... , MASTER_SITES9 2110Supplementary locations from which distribution files and patchfiles are 2111retrieved. 2112.It Ev MESSAGE 2113File recorded in the package and displayed during installation. 2114Defaults to ${PKGDIR}/MESSAGE if this file exists. 2115Leave empty if no message is needed. 2116.It Ev MISSING_FILES 2117When 2118.Ev FETCH_MANUALLY 2119is set, 2120.Ev MISSING_FILES 2121will contain the list of missing distfiles or patchfiles that need to 2122be fetched manually. 2123Read-only. 2124.It Ev MTREE_FILE 2125.Xr mtree 8 2126specification used during 2127.Ar fake . 2128Replaced by direct use of 2129.Xr mkdir 1 2130now that 2131.Ar fake 2132no longer happens as root. 2133.It Ev MODGNU_CONFIG_GUESS_DIRS 2134If a port uses config.guess outside WRKSRC, the directories 2135containing the other copies must be set here. 2136.It Ev MODPERL_ADJ_FILES 2137If any files have a Perl shebang line, which needs to be replaced 2138with 2139.Dq #!/usr/bin/perl , 2140list them in 2141.Ev MODPERL_ADJ_FILES . 2142File paths here should be relative to 2143.Ev WRKSRC . 2144These files are patched automatically at the end of 2145.Cm pre-configure . 2146.It Ev MODPERL_BIN_ADJ 2147Shell fragment to patch the Perl interpreter path in executable scripts. 2148Used by 2149.Ev MODPERL_ADJ_FILES . 2150.It Ev MODPERL_BUILD_TARGET 2151Normal content of 2152.Cm do-build 2153when 2154.Ev CONFIGURE_STYLE 2155uses perl. 2156Provided as a separate variable if a port wants to override 2157.Cm do-build 2158for its own reasons. 2159.It Ev MODPERL_INSTALL_TARGET 2160Likewise for 2161.Cm do-install . 2162.It Ev MODPERL_TEST_TARGET 2163Likewise for 2164.Cm do-test . 2165.It Ev MODULES 2166External modules mechanism, documented separately. 2167Modules such as 2168.Sq imake 2169and 2170.Sq gnu 2171are normally included automatically with the right 2172.Ev CONFIGURE_STYLE . 2173Note that it is possible to 2174.Li CONFIGURE_STYLE = simple , 2175.Li MODULES += gnu 2176to just get the effects of 2177.Ev CONFIG_SITE 2178and 2179.Ev MODGNU_CONFIG_GUESS_DIRS 2180along with the default 2181.Ev TEST_TARGET , 2182in case the normal GNU configure script was wrapped in a separate script that 2183takes different arguments. 2184See 2185.Xr port-modules 5 . 2186.It Ev MULTI_PACKAGES 2187Set to a list of subpackage extensions for ports that create multiple packages. 2188See 2189.Sx FLAVORS AND MULTI_PACKAGES 2190below. 2191Especially read the part about 2192.Ev ONLY_FOR_ARCHS 2193when some of the packages only exist for some architectures. 2194.It NO_ARCH 2195Location for arch-independent packages. 2196Defaults to 2197.Sq no-arch . 2198Normally, packages are generated under ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}, 2199except for packages where PKG_ARCH=*, which end up under 2200${PACKAGE_REPOSITORY}/${NO_ARCH}. 2201.It Ev NOT_FOR_ARCHS 2202List of architectures on which this port does not build. 2203See also 2204.Ev ONLY_FOR_ARCHS . 2205.It Ev NO_BUILD 2206Set to 2207.Sq Yes 2208if port does not need any build stage. 2209.It Ev NO_CCACHE 2210Set to 2211.Sq Yes 2212to prevent ccache from being used when building a certain port, 2213even when 2214.Ev USE_CCACHE 2215is set. 2216.It Ev NO_CHECKSUM 2217Set to 2218.Sq Yes 2219by 2220.Xr dpb 1 2221to avoid 2222.Cm checksum 2223entirely, 2224as 2225.Xr dpb 1 2226already deals with checksums internally. 2227.It Ev NO_DEPENDS 2228User settings. 2229Don't verify build of dependencies. 2230Do not use in any ports Makefile. 2231This is only meant as a user convenience when, e.g., you just want to browse 2232through a given port's source and do not wish to trigger the build of 2233dependencies. 2234.It Ev NO_IGNORE 2235User settings. 2236If set to 2237.Sq Yes , 2238avoid ignoring a port for the usual reasons. 2239Use, for instance, for fetching all distribution files, or for fixing a 2240broken port. 2241See also 2242.Ev IGNORE 2243and 2244.Ev TRY_BROKEN . 2245.It Ev NO_TEST 2246Port does not have any regression tests. 2247Only set to 2248.Sq Yes 2249for ports with no regression test. 2250It should be left alone for ports with empty regression tests, and for 2251ports with failing tests. 2252That way, if a subsequent update of a port acquires actual regression tests, 2253they will be picked up automatically. 2254.It Ev ONLY_FOR_ARCHS 2255List of architectures on which this port builds. 2256Can hold both processor-specific information (e.g., powerpc), and more 2257specific model information (e.g., macppc). 2258This is subpackage dependent. 2259Read the corresponding part of 2260.Sx FLAVORS AND MULTI_PACKAGES 2261if some subpackages should only be built on some architectures. 2262.It Ev OSREV 2263Revision number of 2264.Ox . 2265Read-only. 2266.It Ev PACKAGE_REPOSITORY 2267User settings. 2268Location for built packages. 2269Defaults to 2270.Pa ${PORTSDIR}/packages . 2271See 2272.Cm package 2273for details. 2274.It Ev PARALLEL_MAKE_FLAGS 2275Used when 2276.Ev DPB_PROPERTIES 2277contains 2278.Sq parallel . 2279Flags to pass to 2280.Ev MAKE_PROGRAM 2281to yield a parallel build. 2282Defaults to 2283.Li -j${MAKE_JOBS} . 2284Mostly set to empty by ports that use other mechanisms for setting the number 2285of jobs. 2286.It Ev PARALLEL_MAKE_JOBS 2287User settings. 2288Value of 2289.Ev MAKE_JOBS 2290to use when building manually a port with 2291.Ev DPB_PROPERTIES 2292containing 2293.Sq parallel . 2294Defaults to the number of online cpus. 2295.It Ev PATCH 2296Command to use to apply all patches. 2297Defaults to 2298.Pa /usr/bin/patch . 2299.It Ev PATCHORIG 2300Suffix used by 2301.Cm patch 2302to rename original files, and 2303.Cm update-patches 2304to re-generate 2305.Pa ${PATCHDIR}/${PATCH_LIST} 2306by looking for files using this suffix. 2307Defaults to 2308.Pa .orig . 2309For a port that already contains 2310.Pa .orig 2311files in the ${DISTFILES}, 2312set this to something else, such as 2313.Pa .pat.orig . 2314See also 2315.Cm distpatch , 2316.Ev DISTORIG . 2317.It Ev PATCH_CASES 2318In the normal 2319.Cm distpatch 2320stage (when 2321.Ev PATCHFILES 2322is not empty), this is the contents of a case statement, used to apply 2323distribution patches. 2324Fragments are automatically appended to handle gzip'ed, bzip'ed and lzip'ed 2325patches, so that the default case is more or less equivalent to the following 2326shell fragment: 2327.Bd -literal 2328set -e 2329cd ${FULLDISTDIR} 2330for patchfile in ${_LIST_PATCHFILES} 2331do 2332 case $$patchfile in 2333 *.bz2) 2334 bzip2 -dc $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};; 2335 *.lz) 2336 lunzip -c $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};; 2337 *.Z|*.gz) 2338 gzcat $$patchfile | ${PATCH} ${PATCH_DIST_ARGS};; 2339 *) 2340 ${PATCH} ${PATCH_DIST_ARGS} <$$patchfile;; 2341 esac 2342done 2343.Ed 2344.It Ev PATCHDIR 2345Location for patches applied by the 2346.Cm patch 2347target. 2348Default: 2349.Pa patches . 2350.It Ev PATCHFILES 2351Files to fetch from the master sites like 2352.Ev DISTFILES , 2353but serving a different purpose, as they hold distribution patches that 2354will be applied at the 2355.Cm patch 2356stage. 2357See also 2358.Ev SUPDISTFILES . 2359.It Ev PATCH_ARGS 2360Full list of options used while applying port's patches. 2361.It Ev PATCH_CHECK_ONLY 2362Set to 2363.Sq Yes 2364by the 2365.Cm checkpatch 2366target. 2367Don't touch unless the default 2368.Cm checkpatch 2369target needs to be redefined. 2370Ideally, user-defined patch subtargets ought to test checkpatch. 2371In practice, they don't. 2372.It Ev PATCH_DEBUG 2373If set to 2374.Sq Yes , 2375the 2376.Cm patch 2377stage will output extra debug information. 2378This is the default. 2379.It Ev PATCH_DIST_ARGS 2380Full list of options used while applying distribution patches. 2381.It Ev PATCH_DIST_STRIP 2382Patch option used to strip directory levels while applying distribution 2383patches. 2384Defaults to -p0. 2385.It Ev PATCH_LIST 2386Wildcard pattern of patches to select under ${PATCHDIR}. 2387Defaults to patch-*. 2388Note that filenames ending in .orig, or ~ are never applied. 2389Note that 2390.Ev PATCH_LIST 2391can hold absolute pathnames, for instance to share patches among similar 2392ports: 2393.Bd -literal 2394PATCH_LIST=${PORTSDIR}/x11/kde/libs2/patches/p-* patch-* 2395.Ed 2396.It Ev PATCH_STRIP 2397Patch option used to strip directory levels while applying port's patches. 2398Defaults to -p0. 2399.It Ev PERMIT_DISTFILES , PERMIT_PACKAGE 2400Set to 2401.Sq Yes 2402if the distribution files or the package can be allowed on FTP sites without 2403legal issues. 2404Set to reason not to otherwise. 2405PERMIT_* lines in the Makefile should be preceded with a comment explaining 2406details about licensing and patents issues the port may have. 2407Porters must be very thorough in their checks. 2408In case of doubt, ask. 2409.Pp 2410If 2411.Ev PERMIT_PACKAGE 2412is set to 2413.Sq Yes , 2414.Ev PERMIT_DISTFILES 2415will default to 2416.Sq Yes . 2417.It Ev PKG_ADD 2418User settings. 2419Path to 2420.Xr pkg_add 1 2421command, with possible options. 2422.It Ev PKG_ARCH 2423Comma-separated list of architectures on which this package may install. 2424Defaults to ${MACHINE_ARCH},${ARCH}. 2425Use * for arch-independent packages. 2426.It Ev PKG_ARGS 2427Special arguments to pass to 2428.Xr pkg_create 1 , 2429in addition to the default ones. 2430For mips64 and pic libraries, see 2431.Sx THE GENERATION OF PACKAGE INFORMATION . 2432.It Ev PKG_CREATE 2433User settings. 2434Path to 2435.Xr pkg_create 1 2436command, with possible options. 2437.It Ev PKG_CREATE_NO_CHECKS 2438Porters switch. 2439Set to 2440.Sq Yes 2441to avoid checking the ports tree when solving 2442.Ev WANTLIB 2443.Po 2444see 2445.Cm wantlib-args 2446.Pc . 2447May result in bogus packages that mix 2448.Cm @depends 2449lines obtained from 2450the ports tree with 2451.Cm @wantlib 2452lines that come from the installed system. 2453Set to 2454.Sq Warn 2455to have the differences printed as a warning instead of an error 2456.Po 2457the default 2458.Pc . 2459.It Ev PKG_DBDIR 2460User settings. 2461Path to package installation records. 2462Defaults to 2463.Pa /var/db/pkg . 2464.It Ev PKG_DELETE 2465User settings. 2466Path to 2467.Xr pkg_delete 1 2468command, with possible options. 2469.It Ev PKG_INFO 2470User settings. 2471Path to 2472.Xr pkg_info 1 2473command, with possible options. 2474.It Ev PKG_TMPDIR 2475See 2476.Xr pkg_add 1 . 2477Normally points to 2478.Pa /var/tmp , 2479as per default. 2480.It Ev PORTHOME 2481Setting of env variable 2482.Ev HOME 2483for most shell invocations. 2484Default will trip ports that try to write into $HOME while building. 2485.It Ev PORTPATH 2486Path used by most shell invocations. 2487Don't override unless really needed. 2488.It Ev PORTSDIR 2489Root of the ports tree (default: 2490.Pa /usr/ports ) . 2491.It Ev PORTSDIR_PATH 2492Path used by dependencies and 2493.Pa bsd.port.subdir.mk 2494to look up package specifications. 2495Defaults to 2496.Pa ${PORTSDIR}:${PORTSDIR}/mystuff . 2497.It Ev PORTS_PRIVSEP 2498If set to 2499.Sq Yes , 2500will build ports as 2501.Ev BUILD_USER 2502and fetch distfiles 2503as 2504.Ev FETCH_USER . 2505.Pp 2506To work fully, this does require the ports tree 2507to be world-readable, and 2508.Pa ${WRKDIR} 2509to be world-readable as well 2510.Po 2511.Cm update-patches 2512and friends won't work otherwise 2513.Pc . 2514.Pp 2515Meant to use in concert with 2516.Xr dpb 1 , 2517which uses the same permissions 2518.Po 2519see 2520.Sq THE SECURITY MODEL OF DPB 2521in 2522.Xr dpb 1 2523.Pc . 2524.Pp 2525Basically, 2526.Ev BUILD_USER 2527must be able to write into 2528.Pa ${WRKOBJDIR} , ${PACKAGE_REPOSITORY} , ${PLIST_REPOSITORY} 2529and 2530.Ev FETCH_USER 2531must be able to write into 2532.Pa ${DISTDIR} . 2533The directories and permissions can be set correctly using 2534.Cm fix-permissions . 2535.Pp 2536The regular user must be allowed to execute commands as 2537.Ev BUILD_USER 2538and 2539.Ev FETCH_USER . 2540Running commands as another user can be achieved with 2541.Xr doas 1 2542by setting 2543.Ev SUDO=doas 2544in 2545.Xr mk.conf 5 2546and using the following minimal 2547.Xr doas.conf 5 : 2548.Bd -literal -offset indent 2549permit keepenv nopass solene as _pbuild 2550permit keepenv nopass solene as _pfetch 2551.Ed 2552.Pp 2553Note that this also means that 2554.Xr doas 1 2555must be configured to work within the chroot 2556created by 2557.Xr proot 1 . 2558.Pp 2559If the regular user is not allowed to run privileged commands 2560without entering a password, 2561you may want these additional rules in 2562.Xr doas.conf 5 , 2563to reduce the amount of times the password needs to be entered 2564during ports work: 2565.Bd -literal -offset indent 2566permit nopass solene cmd /usr/bin/touch 2567permit nopass setenv { \\ 2568 TRUSTED_PKG_PATH TERM } solene cmd /usr/sbin/pkg_add 2569permit nopass setenv { \\ 2570 TERM } solene cmd /usr/sbin/pkg_delete 2571.Ed 2572.Pp 2573Also, in such a situation, 2574the regular user will still need to enter their password when 2575.Xr update-plist 1 2576is invoked. 2577.Pp 2578As 2579.Xr dpb 1 2580does its own privilege dropping when run as root, 2581it will automatically override 2582.Ev PORTS_PRIVSEP . 2583.Pp 2584User settings, defaults to 2585.Sq \&No . 2586.It Ev PKGDIR 2587Location for packaging information (packing list, port description, messages). 2588.Cm update-plist 2589may create it. 2590Must be a valid directory. 2591Default: pkg. 2592.It Ev PKGFILE 2593Full path to the created package for the given subpackage. 2594Read-only. 2595.It Ev PKGFILES 2596Full path to all created packages. 2597Read-only. 2598.It Ev PKGNAME 2599Name of the created package. 2600Default is ${DISTNAME}. 2601This does not take flavors into account. 2602See 2603.Ev FULLPKGNAME 2604for that. 2605Specific revisions and epoch changes should be 2606handled by 2607.Ev REVISION 2608and 2609.Ev EPOCH 2610instead. 2611.It Ev PKGNAMES 2612Read-only. 2613List of all package names generated by the port, with 2614.Ev FLAVORS 2615and 2616.Ev BUILD_PACKAGES 2617taken into account. 2618Mostly used as 2619.Ql make show=PKGNAMES 2620to verify that bumped package names are correct. 2621.It Ev PKGNAME-foo 2622Package name for sub-package foo, if the default value 2623of ${PKGNAME}${SUBPACKAGE} is not appropriate. 2624.It Ev PKGPATH 2625Path to the current port's directory, relative to ${PORTSDIR}. 2626Read-only. 2627.It Ev PKGPATHS 2628Read-only. 2629List of all package paths generated by the port, with 2630.Ev FLAVORS 2631and 2632.Ev MULTI_PACKAGES 2633taken into account. 2634Order matches 2635.Ev PKGNAMES 2636exactly. 2637.It Ev PKGSPEC 2638Default package spec for using this port as a dependency. 2639Defaults to 2640.Sq stem-* , 2641derived from the 2642.Ev FULLPKGNAME . 2643Do not override without very good reasons, 2644namely software that coexist as different incompatible versions with the 2645same stem, e.g., already a mess. 2646.It Ev PKGSTEM 2647Base for the package name without any version number. 2648Used in 2649.Pa READMEs 2650file names and actual contents, can be overridden for ports 2651with branches, like php, e.g., 2652.Li PKGSTEM-main = php-5.6 2653.It Ev PLIST_DB 2654Deprecated, see 2655.Ev PLIST_REPOSITORY . 2656.It Ev PLIST_REPOSITORY 2657User settings. 2658Base directory used to save generated packing-lists, as persistent information. 2659Packing-lists are processed by a script, 2660.Xr register-plist 1 , 2661which complains when packing-lists change without a 2662.Ev REVISION 2663bump. 2664It also knows enough about package version numbers when something in the 2665package or its dependencies goes backward, thus catching 2666.Ev EPOCH 2667issues. 2668This directory is never cleaned during normal operation. 2669.Ql make clean=plist 2670should only ever be used during debugging by port maintainers. 2671Defaults to 2672.Pa ${PORTSDIR}/plist 2673.Po 2674plists actually get saved into 2675.Pa ${PLIST_REPOSITORY}/${MACHINE_ARCH} 2676.Pc . 2677If set to empty, will not register anything: very much unsafe. 2678.It Ev PORTS_BUILD_XENOCARA_TOO 2679EXPERIMENTAL. 2680Set to 2681.Sq Yes 2682to build xenocara through ports. 2683This is highly experimental and not recommended. 2684.It Ev PORTROACH 2685Controls the behavior of 2686.Pa misc/portroach 2687as documented in detail at 2688.Lk http://jasperla.github.io/portroach/docs/portroach-portconfig.txt . 2689.It Ev PREFIX 2690Base directory for the current port installation. 2691Usually ${LOCALBASE}, though some ports may elect a location under 2692.Pa ${VARBASE} , 2693and some multi-package ports may install under several locations. 2694Additionally, firmware files generally install under 2695.Pa ${BASESYSCONFDIR} . 2696.It Ev PREPARE_CHECK_ONLY 2697Build settings. 2698Prevent the 2699.Cm prepare 2700stage from installing anything, let it just check dependencies, and 2701handle [:target] dependencies. 2702Mostly used by 2703.Xr dpb 1 , 2704which already installs everything before running 2705.Cm prepare . 2706.It Ev PROGRESS_METER 2707User settings. 2708Defaults to 2709.Sq Yes . 2710Forces commands like 2711.Xr ftp 1 2712and 2713.Xr pkg_create 1 2714to use their progress-meter even in the absence of a terminal. 2715.It Ev PROPERTIES 2716List of properties specific to a given machine architecture. 2717Most often obtained through 2718.Xr bsd.port.arch.mk 5 . 2719These can be checked like this 2720.Bd -literal -offset indent 2721\&.include <bsd.port.arch.mk> 2722\&.if ${PROPERTIES:Mapm} 2723# then add build options specific to apm arches 2724\&... 2725\&.if !${PROPERTIES:Mlp64} 2726# build options specific to lp32 arches 2727\&... 2728.Ed 2729For 2730.Ev MULTI_PACKAGES 2731setup, use of 2732.Ev ONLY_FOR_ARCHS-sub 2733and 2734.Ev BUILD_PACKAGES 2735is generally preferred (and simpler). 2736Possible properties include 2737.Bl -tag -width mono 2738.It apm 2739architecture possesses suspend (apm) support. 2740.It be 2741architecture is big-endian. 2742.It gccN 2743gccN architecture. 2744.It le 2745architecture is little-endian. 2746.It lp64 2747lp64 architecture. 2748.It llvm 2749there is 2750.Pa lang/llvm 2751support on this architecture. 2752.It mono 2753there is 2754.Pa lang/mono 2755support on this architecture. 2756.El 2757.It Ev PSEUDO_FLAVOR 2758List of flavors in 2759.Ev FLAVOR 2760that are actually pseudo-flavors. 2761Only for introspection purposes. 2762Read-only. 2763.It Ev PSEUDO_FLAVORS 2764Extra list of flavors that do not register in package names, but are still 2765used to control build logic, and work directory names. 2766Its only use should be for disabling part of a multi-packages build, 2767for instance: 2768.Bd -literal 2769FLAVOR=no_gnome make package 2770.Ed 2771.Pp 2772Pseudo-flavors should be named as 2773.Sq no_something 2774to disable the build of subpackage 2775.Sq -something 2776.Po 2777and possibly some others, by restricting 2778.Ev BUILD_PACKAGES 2779.Pc . 2780Pseudo-flavors should always be handled through 2781.Xr bsd.port.arch.mk 5 . 2782A pseudo-flavor can remove several subpackages through the following 2783construct. 2784.Bd -literal -offset indent 2785# pseudo-flavor no_gui will also remove gtk and gtk3 2786MULTI_PACKAGES = -main -gtk -gtk3 -gui 2787# ... 2788\&.include <bsd.port.arch.mk> 2789 2790# remove extra build components 2791\&.if !${BUILD_PACKAGES:M-gui} 2792BUILD_PACKAGES := ${BUILD_PACKAGES:N-gtk:N-gtk3} 2793\&.endif 2794 2795# normal configure setup, e.g., 2796\&.if ${BUILD_PACKAGES:M-gtk} 2797# ... 2798.Ed 2799.Pp 2800Caveat: creation of a separate working directory is mandatory for a 2801pseudo-flavor. 2802If, at a later time, a full build with all subpackages is required, 2803all the work will need to be done again. 2804.Pp 2805See also 2806.Ev BUILD_ONCE . 2807.It Ev RCDIR 2808Location for daemon startup scripts. 2809Defaults to 2810.Pa /etc/rc.d . 2811Do not change. 2812.It Ev REFETCH 2813User settings. 2814If set to true, 2815.Cm checksum 2816will analyze ${CHECKSUM_FILE}, and try retrieving files with the correct 2817checksum off 2818.Lk https://ftp.openbsd.org , 2819in the directory 2820.Pa /pub/OpenBSD/distfiles/$cipher/$value/$file . 2821.It Ev REORDER_DEPENDENCIES 2822Points to a list of files that specify inter-dependencies for 2823.Xr make 1 . 2824If defined, each line of the file is either a comment (starting with #) 2825or a pair of two files: most_recent older. 2826At the end of 2827.Cm post-patch , 2828.Xr touch 1 2829will be used to ensure those files are put in the proper order. 2830The files are assumed to be under 2831.Pa ${WRKSRC} . 2832The notation /file can be used to ask for a recursive search, e.g., 2833to make sure that all Makefile.in are up to date. 2834See 2835.Pa ${PORTSDIR}/infrastructure/mk/automake.dep 2836for an example. 2837.It Ev REPORT_PROBLEM 2838See 2839.Xr ports 7 . 2840.It Ev REPORT_PROBLEM_LOGFILE 2841See 2842.Xr ports 7 . 2843.It Ev REVISION 2844Revision number of the current package. 2845Defaults to empty (very first package), then 2846numbering starts at 0. 2847Gets automatically incorporated into 2848.Ev FULLPKGNAME 2849as 2850.Sq p${REVISION} 2851to form a full package-name conforming to 2852.Xr packages-specs 7 . 2853.It Ev RUN_DEPENDS 2854Specification of ports this port needs installed to be functional. 2855Same format as 2856.Ev LIB_DEPENDS . 2857The corresponding packages will be built right before the 2858.Cm install 2859stage, and 2860.Xr pkg_add 1 2861will take care of installing them. 2862.It Ev SEPARATE_BUILD 2863Many GNU configure ports can be built in a directory distinct from the 2864place they were unpacked. 2865For some specific ports, this is even mandatory. 2866Set to 2867.Sq yes 2868or 2869.Sq simple 2870if this is the case. 2871The ports infrastructure will generate a separate ${WRKBUILD} directory 2872in which the port will be configured and built. 2873Wipe ${WRKBUILD} to start anew, but skipping the extract/patch stage. 2874.It Ev SETENV 2875Normally set to 2876.Li /usr/bin/env -i . 2877Prepended to every command invocation that requires a clean environment. 2878Do not override. 2879.It Ev SHARED_LIBS 2880List of shared libraries that the port may build, as a list of the form 2881.Sq libname 2882.Sq libversion . 2883Used to set variables of the form 2884.Ev LIBlibname_VERSION 2885that are then used for substitution by 2886.Xr pkg_create 1 . 2887The porter is responsible for making sure the port uses those version numbers 2888when shared libraries are built. 2889.Pp 2890The intent is that the 2891.Ox 2892ports system must have control over shared library versions because of global 2893changes that may require bumping the major version of every shared library in 2894the system, or simply because the third party programmers do not understand 2895the rules for shared library versions, thus breaking the update mechanism. 2896For that reason it is advised to set libversion to 0.0 when first importing a 2897port. 2898.Pp 2899Porters of software using libtool should make sure 2900.Ev MAKE_FLAGS 2901get propagated to the libtool invocations. 2902This should be enough in most cases. 2903.It Ev SKIPDIR 2904See 2905.Xr ports 7 . 2906.It Ev STATIC_PLIST 2907Normally set to 2908.Sq yes . 2909Can be set to no for ports that do not have a static plist. 2910Do not change without a very good reason. 2911Note that the only good reason to not have a static plist is for ports such 2912as 2913.Pa databases/ports-readmes 2914which actually build a bunch of files depending on the current ports tree. 2915This breaks all introspection mechanisms within the ports tree, including 2916.Pa databases/pkglocatedb 2917which will not include that port. 2918.It Ev STARTAFTER 2919See 2920.Xr ports 7 . 2921.It Ev STARTDIR 2922See 2923.Xr ports 7 . 2924.It Ev SUBPACKAGE 2925Set to the subpackage suffix when building a package in a multi-package port. 2926Read-only. 2927Used to test for dependencies or to adjust the package name. 2928.It Ev SUBST_CMD 2929A command that can be used to perform 2930.Ev SUBST_VARS 2931substitution on arbitrary files. 2932In normal mode, 2933.Pp 2934.Dl ${SUBST_CMD} file1 file2 ... 2935.Pp 2936will substitute files in place, creating backup copies of them. 2937In copy mode, 2938.Pp 2939.Dl ${SUBST_CMD} -c src1 dest1 src2 dest2 2940.Pp 2941will copy files over while performing the substitution, as suitable for 2942copying template files over from 2943.Pa ${FILESDIR} 2944to 2945.Pa ${PREFIX} , 2946for instance. 2947This uses 2948.Xr pkg_subst 1 2949with suitable parameters. 2950Read-only. 2951.Pp 2952${SUBST_CMD} 2953can be used like 2954.Xr install 1 : 2955.Dl ${SUBST_CMD} Oo Fl g Ar group Oc Oo Fl o Ar owner Oc Oo Fl m Ar mode Oc file... 2956to set file 2957.Ar owner , 2958.Ar group 2959and/or 2960.Ar mode . 2961.Pp 2962Note that 2963.Ev SUBST_CMD 2964is not really appropriate when variables have subpackage variations, like 2965.Ev PREFIX 2966or 2967.Ev FULLPKGNAME . 2968Use the appropriate 2969.Ev SUBST_CMD-sub 2970instead. 2971.It Ev SUBST_CMD-sub 2972.Ev SUBST_CMD 2973with subpackage-dependent semantics, like packing-list substitution. 2974It will substitute the right variable depending on the desired subpackage, 2975e.g., 2976.Ev SUBST_CMD-foo 2977will substitute the value of 2978.Ev FULLPKGNAME-foo 2979for 2980.Li ${FULLPKGNAME} . 2981.It Ev SUBST_DATA , SUBST_MAN , SUBST_PROGRAM 2982Specialized versions of 2983.Ev SUBST_CMD 2984that use 2985.Fl c 2986and appropriate owner/group/mode for data, manpages and programs respectively. 2987.It Ev SUBST_VARS 2988Make variables whose values get substituted to create the actual package 2989information. 2990Always holds 2991.Ev ARCH , 2992.Ev BASE_PKGPATH , 2993.Ev FLAVOR_EXT , 2994.Ev FULLPKGNAME , 2995.Ev HOMEPAGE , 2996.Ev LOCALBASE , 2997.Ev MACHINE_ARCH , 2998.Ev MAINTAINER , 2999.Ev PREFIX , 3000.Ev PKGSTEM , 3001.Ev RCDIR , 3002.Ev SYSCONFDIR , 3003.Ev TRUEPREFIX , 3004and 3005.Ev X11BASE . 3006The special construct 3007.Sq ${FLAVORS} 3008can be used in the packing-list to specify the current list of dash 3009separated flavors the port is compiled with (useful for cross-dependencies 3010in 3011.Ev MULTI_PACKAGES ) . 3012Add other 3013variables as needed. 3014.Pp 3015.Ev TRUEPREFIX 3016is never passed to 3017.Xr pkg_create 1 3018as it is identical to 3019.Ev PREFIX . 3020.Pp 3021By default, 3022.Xr update-plist 1 3023is run with the following options: 3024.Bd -literal -offset indent 3025update-plist -i ARCH -i BASE_PKGPATH -i FULLPKGNAME 3026-i FULLPKGPATH -i LOCALSTATEDIR -i MACHINE_ARCH 3027-s BASE_PKGPATH -s LOCALBASE -s LOCALSTATEDIR -s PREFIX 3028-s RCDIR -s SYSCONFDIR -s X11BASE 3029.Ed 3030.It Ev SUDO 3031User settings. 3032If set to 3033.Xr doas 1 3034in 3035.Xr mk.conf 5 , 3036the ports tree will only invoke root's privileges for the parts that 3037really require it. 3038.It Ev SUPDISTFILES 3039Supplementary files that need to be retrieved under some specific 3040circumstances. 3041For instance, a port might need architecture-specific files. 3042.Ev SUPDISTFILES 3043should hold a list of all distribution files and patchfiles that are not 3044always needed, so that a mirror will be able to grab all files, or that 3045.Cm makesum 3046will work. 3047Having an overlap between 3048.Ev SUPDISTFILES 3049and 3050.Ev DISTFILES , 3051.Ev PATCHFILES 3052is admissible, and in fact, expected, as it is much simpler to build 3053an error-free list of files to retrieve in that way. 3054See the xanim port for an example. 3055.It Ev SYSCONFDIR 3056Location for this port's configuration files, should always be derived 3057from 3058.Ev BASESYSCONFDIR , 3059which defaults to 3060.Pa /etc . 3061Passed to gnu configure scripts and substituted in PLISTs. 3062.It Ev TAR 3063Name of the tar binary. 3064.It Ev TARGETS 3065Read-only. 3066Set to the list of special targets for a port 3067.Po 3068.Cm {pre,do,post}-* 3069and module hooks 3070.Pc . 3071Used by introspection tools such as the sqlports package. 3072.It Ev TEMPLATES 3073Base location for the templates used in the 3074.Cm readmes 3075target. 3076User settings. 3077Defaults to 3078.Pa ${PORTSDIR}/infrastructure/templates . 3079.It Ev TEST_DEPENDS 3080See 3081.Ev BUILD_DEPENDS 3082for specification. 3083Test dependencies are only checked if the 3084.Cm test 3085stage is invoked. 3086.It Ev TEST_ENV 3087Additional environment variables passed to tests. 3088Empty by default. 3089.It Ev TEST_FLAGS 3090Extra flags passed to ${MAKE_PROGRAM} to run the regression tests. 3091Empty by default. 3092.It Ev TEST_IS_INTERACTIVE 3093Set to 3094.Sq Yes 3095if port needs human interaction to run its tests, or set to 3096.Sq X11 3097if the tests need an active X11 display to work. 3098.It Ev TEST_LOG 3099Command used to log the results of regression tests to TEST_LOGFILE. 3100Read-only. 3101.It Ev TEST_LOGFILE 3102Log file containing the results of regression tests. 3103.It Ev TEST_TARGET 3104Target to run regression tests. 3105Defaults to 3106.Sq regress , 3107except for 3108.Sq perl 3109and 3110.Sq gnu 3111.Ev CONFIGURE_STYLE , 3112which default to 3113.Sq test 3114and 3115.Sq check , 3116respectively. 3117.It Ev TRUEPREFIX 3118Read-only. 3119Mostly the same as ${PREFIX}, except it never gets ${DESTDIR} prepended 3120during 3121.Cm fake . 3122Refer to 3123.Sx THE FAKE FRAMEWORK 3124section for details. 3125.It Ev TRY_BROKEN 3126User settings. 3127If set to 3128.Sq Yes , 3129don't set 3130.Ev IGNORE 3131for 3132.Ev BROKEN 3133ports, so that we will attempt to build them. 3134.It Ev UNLOCK_CMD 3135User settings. 3136If set, expands to a command that will release a lock. 3137This lock will reside in 3138.Pa ${LOCKDIR} . 3139.It Ev UNMESSAGE 3140File recorded in the package and displayed during deinstallation. 3141Defaults to ${PKGDIR}/UNMESSAGE if this file exists. 3142Leave empty if no message is needed. 3143.It Ev UNZIP 3144Name of the unzip binary. 3145.It Ev UPDATE_COOKIES_DIR 3146User settings. 3147Used to store cookies for package updates and defaults to 3148.Pa ${PORTSDIR}/update/${MACHINE_ARCH} . 3149If set to empty, will revert to a file under 3150.Pa ${WRKDIR} . 3151.It Ev UPDATE_PLIST_ARGS 3152Tweaks to 3153.Xr update-plist 1 3154behavior for some specific ports, such as variable handling. 3155.It Ev UPDATE_PLIST_OPTS 3156User settings. 3157User options added to 3158.Xr update-plist 1 , 3159mostly 3160.Fl v 3161for now. 3162.It Ev USE_CCACHE 3163User settings. 3164Set to 3165.Sq Yes 3166to use ccache when building ports. 3167Adds a build dependency on devel/ccache, and sets up the build 3168environment so that it is used. 3169.It Ev USE_GMAKE 3170Set to 3171.Sq Yes 3172if GNU make (${GMAKE}) is needed for correct behavior of this port. 3173.It Ev USE_GROFF 3174Set to 3175.Sq Yes 3176to use groff to build manpages. 3177This sets groff as a build dependency, and also tells 3178.Xr pkg_create 1 3179to format manpages behind the scene using groff while building packages. 3180.It Ev USE_LIBTOOL 3181Defaults to 3182.Sq Yes . 3183Set to 3184.Sq gnu 3185if the base 3186.Xr libtool 1 3187is insufficient and GNU libtool is required. 3188Set to 3189.Sq \&No 3190to disable the use of 3191.Xr libtool 1 3192entirely; this should not be set under normal circumstances. 3193Adds dependencies if necessary, and passes LIBTOOL environment variable to 3194scripts invocations. 3195.Pp 3196Many ports using GNU autoconf need an m4 file from the GNU libtool package 3197but otherwise work with base 3198.Xr libtool 1 . 3199In those cases do not set 3200.Ev USE_LIBTOOL , 3201instead just set 3202.Li BUILD_DEPENDS = devel/libtool . 3203.It Ev USE_LLD 3204Set to 3205.Sq Yes 3206or 3207.Sq \&No 3208to force the use of 3209.Xr ld.lld 1 3210.Po 3211as opposed to 3212bfd's 3213.Xr ld 1 3214.Pc . 3215Defaults to the appropriate value for the current archictecture 3216.Po 3217see 3218.Ev LLD_ARCHS 3219in 3220.Xr bsd.port.arch.mk 5 3221.Pc . 3222.It Ev USE_MFS 3223Set to 3224.Sq Yes 3225to build ports under an MFS filesystem 3226(see 3227.Xr mount_mfs 8 ) . 3228Mostly for use by 3229.Xr dpb 1 3230and not intended to be a user setting. 3231See 3232.Ev WRKOBJDIR_MFS 3233for configuration. 3234.It Ev USE_WXNEEDED 3235If set to 3236.Sq Yes , 3237writes a wrapper script to ${WRKDIR}/bin/ld in 3238.Cm patch 3239to request that the linker adds an OPENBSD_WXNEEDED ELF section. 3240Use when a port requires memory mappings that are both executable 3241and writable and cannot be modified to avoid this. 3242.It Ev USE_X11 3243Normally, presence of ${X11BASE} is enforced by default for building ports. 3244But there is an experimental way to hook the xenocara build into 3245.Xr dpb 1 , 3246which requires knowing whether a port requires X11 to already 3247be there. 3248.Pp 3249The infrastructure mostly sets 3250.Ev USE_X11 3251automatically based on 3252.Ev WANTLIB 3253values, there are a few ports (about 20) that require X11 components without 3254any library telltale. 3255.It Ev VARBASE 3256User settings. 3257Base location for ports that install stuff outside of 3258.Pa ${LOCALBASE} . 3259Defaults to 3260.Pa /var . 3261.It Ev WANTLIB 3262List of library specifications that a package will need. 3263May include system and X11 libraries. 3264See 3265.Xr library-specs 7 3266for more details. 3267.Pp 3268As a special extension, 3269.Ev WANTLIB 3270may include absolute paths, e.g., 3271.Pa ${LOCALBASE}/lib/expat=4 3272to distinguish between base libraries and port libraries. 3273Use with caution, this is very seldom needed. 3274.It Ev wantlib_args 3275Controls the behavior of 3276.Xr pkg_create 1 3277related targets, see 3278.Cm print-package-args 3279for details. 3280.It Ev WARNINGS 3281User settings. 3282If set to 3283.Sq Yes , 3284add 3285.Ev CDIAGFLAGS 3286to 3287.Ev CFLAGS 3288and 3289.Ev CXXDIAGFLAGS 3290to 3291.Ev CXXFLAGS . 3292.It Ev WRKBUILD 3293Subdirectory of ${WRKDIR} where the actual build occurs. 3294Defaults to ${WRKSRC}, unless 3295.Ev SEPARATE_BUILD 3296is involved, in which case it is set to an appropriate value. 3297.It Ev WRKCONF 3298Subdirectory of ${WRKDIR} where the actual configure set occurs. 3299Defaults to ${WRKBUILD}. 3300.It Ev WRKDIR 3301Location where all port activity occurs. 3302Apart from the actual port, may 3303hold all kinds of cookies that checkpoint the port's build. 3304Read-only. 3305Note that WRKDIR may be a symbolic link. 3306During ports building, 3307.Pa ${WRKDIR}/bin 3308is put at the front of the 3309.Ev PATH . 3310.It Ev WRKDIR_LINKNAME 3311Name of a symbolic link to create within the port directory which will 3312point to the port's ${WRKDIR}. 3313Deprecated. 3314.It Ev WRKDIST 3315Subdirectory of ${WRKDIR} in which the distribution files normally unpack. 3316Base for all patches. 3317Defaults to 3318.Pa ${WRKDIR}/${DISTNAME} . 3319Note that WRKDIST may be a symbolic link, if set to ${WRKDIR}. 3320.It Ev WRKSRC 3321Subdirectory of ${WRKDIR} where the actual source is. 3322Base for configuration (default: ${WRKDIST}). 3323Note that WRKSRC may be a symbolic link, if set to ${WRKDIR}. 3324.It Ev WRKINST 3325Subdirectory of ${WRKDIR} where port normally installs (see the 3326.Cm fake 3327target). 3328.It Ev WRKOBJDIR 3329Used as a base for the actual port working directory. 3330Defaults to 3331.Pa ${PORTSDIR}/pobj . 3332The real working directory ${WRKDIR} is created there. 3333Can be set on a per-${PKGPATH} basis. 3334For instance, setting WRKOBJDIR_www/mozilla=/tmp/obj 3335will affect only the mozilla port. 3336If explicitly unset (WRKOBJDIR=), the working directory is 3337created within the port directory. 3338.It Ev WRKOBJDIR_MFS 3339Alternate location for the port working directory. 3340The intent is to use an MFS based filesystem for small ports with 3341.Xr dpb 1 . 3342Active when 3343.Ev USE_MFS 3344is 3345.Sq Yes . 3346Defaults to 3347.Pa /tmp/pobj . 3348.It Ev X11BASE 3349Where X11 has been installed. 3350Default: 3351.Pa /usr/X11R6 . 3352.It Ev XAUTHORITY 3353Points to a suitable authority file for X11 interactive regression tests. 3354Defaults to 3355.Pa ${HOME}/.Xauthority . 3356.It Ev XMKMF 3357Invocation of xmkmf for a 3358.Li CONFIGURE_STYLE=imake 3359port. 3360Defaults to xmkmf -a -DPorts. 3361The -DPorts is specific to 3362.Ox 3363and is always appended. 3364.It Ev YACC 3365Name of yacc program to pass to GNU-configure, defaults to yacc. 3366GNU-configure would always try to use bison otherwise, which leads to 3367unreproducible builds. 3368Set to bison if needed. 3369.El 3370.Sh DIAGNOSTICS 3371Note that some of these messages are actually emitted by some other external 3372commands, but grouped here for convenience: easier to look for in 3373.Xr dpb 1 Ns 's 3374logs. 3375.Bl -diag 3376.It "/bin/sh: cd .../pkg - No such file or directory" 3377Emitted during 3378.Cm generate-readmes . 3379.Pa ${PKGDIR} 3380must point to an existing directory, so that 3381.Nm 3382can be certain there are no 3383.Pa MESSAGEs 3384or 3385other files pertinent to the package. 3386.It "Discovered old directory in ..." 3387This message comes from 3388.Xr update-plist 1 . 3389A directory was found in the PLIST that used to be needed but is no longer, 3390because it's now accounted for through dependencies. 3391Indicates the old directory has been removed. 3392.It "Error: change in plist between ..." 3393Error message comes from 3394.Xr register-plist 1 . 3395.It "Error: duplicate item in packing-list" 3396Error message comes from 3397.Xr pkg_create 1 , 3398and will result from incorrect packing-lists, such as including several 3399fragments with the same file, or having incorrect 3400.Ev PKG_ARGS-sub . 3401.It "Error: Libraries in packing-lists...and libraries from installed packages don't match" 3402The ports tree and the installed packages are out-of-sync. 3403Mixing library information from both sources might produce packages that can't 3404be installed elsewhere. 3405Cleanest fix is to update the out-of-date source (e.g., update the ports tree, 3406or build and install new packages). 3407Developers may use 3408.Ev PKG_CREATE_NO_CHECKS 3409instead, assuming they understand the implications. 3410See 3411.Cm print-package-args Pq Cm wantlib-args 3412for details. 3413.It "Fatal: can't flavor a SUBDIR" 3414A dependency mentions top_subdir,flavor. 3415Flavor would then be ignored, as it is only applied to individual ports. 3416.It "Fatal: can't subpackage a SUBDIR" 3417A dependency mentions top_subdir,-sub. 3418Subpackage would then be ignored, as it is only applied to individual ports. 3419.It "Fatal: flavor should never start with a digit" 3420This would utterly confuse 3421.Xr pkg_add 1 . 3422See 3423.Xr packages-specs 7 . 3424.It "Fatal: inclusion of <file> from <file>" 3425.Pa bsd.port.mk 3426or 3427.Pa bsd.port.subdir.mk 3428has been included from a 3429.Ev MODULE 3430or from 3431.Pa Makefile.inc , 3432resulting in a double inclusion. 3433This would lead to weird results, such as 3434.Ev PKG_ARGS 3435being defined twice. 3436.It "Fatal: SUBPACKAGES should always begin with -: <offending list>" 3437That is the only way to differentiate between 3438.Ev FLAVOR 3439and 3440.Ev SUBPACKAGE 3441in 3442.Xr pkgpath 7 3443specifications. 3444.It "Fatal: building ports requires correctly installed X11" 3445All file sets of the base OS, including xenocara, must be installed 3446before building ports. 3447.It "Fatal: /usr/local/lib/X11/app-defaults should exist and be a symlink" 3448/usr/local/lib/X11/app-defaults is distributed as a symlink in the 3449xshare*.tgz file set. 3450If xenocara was not fully installed before packages were added, it may 3451have been created as a directory instead. 3452.It "Fatal: the licensing info for <pkgname> is incomplete..." 3453Every port must have explicit defines of all 3454.Ev PERMIT_* 3455values. 3456.It "Fatal: Use 'env FLAVOR=flavor make' instead" 3457Arguments specified after 3458.Xr make 1 3459are hardcoded for all recursive sub-makes, and very difficult to override. 3460Thus, 3461.Ev FLAVOR 3462must be specified in the environment instead. 3463.It "Fatal: Use 'env SUBPACKAGE=-sub make' instead" 3464Arguments specified after 3465.Xr make 1 3466are hardcoded for all recursive sub-makes, and very difficult to override. 3467Thus, 3468.Ev SUBPACKAGE 3469must be specified in the environment instead. 3470.It "ldconfig: <dir>: No such file or directory" 3471Usually produced by 3472.Xr pkg_add 1 3473running 3474.Xr ldconfig 8 . 3475Some tools such as GNU libtool will add directories living under 3476.Pa ${WRKINST} 3477to the shared library path during the 3478.Cm fake 3479stage. 3480Of course, 3481.Xr ldconfig 8 3482will later complain after the directory no longer exists. 3483The bogus tool should be fixed to conform to 3484.Ox 3485usage. 3486.It LIB_DEPENDS <spec> not needed for <FULLPKGPATH> 3487There doesn't seem to be any WANTLIB to match the given LIB_DEPENDS. 3488Thus, the LIB_DEPENDS won't turn into a @depends line in the created package. 3489This is often because of confusion between LIB_DEPENDS and RUN_DEPENDS: 3490RUN_DEPENDS is needed for dlopen'd libraries. 3491.Pp 3492Might be intentional sometimes, if some compile flavors create static binaries, 3493for instance. 3494Also, will happen for multi-packages, where one sets LIB_DEPENDS to have 3495a given build dependency (and corresponding WANTLIB for a given SUBPACKAGE). 3496.Pp 3497See 3498.Cm print-package-args Pq Cm lib-depends-args 3499for details. 3500.It "Warning: FULLPKGNAME-sub defined but not FULLPKGPATH-sub" 3501.Ev FULLPKGNAME-sub 3502has been explicitly defined by the port, instead of relying on the default, 3503but no value of 3504.Ev FULLPKGPATH-sub 3505has been given. 3506This is often an error. 3507.It "Warning: no debug-info in ..." 3508Port uses 3509.Ev DEBUG_PACKAGES 3510so the 3511.Xr build-debug-info 1 3512script excepts debug information on all binaries and libraries. 3513Most probably, the build machinery for that specific port omitted -g 3514somewhere, or it runs strips during fake anyway. 3515It can also occur if 3516.Ev DEBUG_PACKAGES 3517includes subpackages with no files holding debug info. 3518.It "Warning: symlink(s) point to non existent file." 3519Warning message comes from 3520.Xr pkg_create 1 . 3521The symlink resides in the fake area, under 3522.Pa ${WRKINST} . 3523This is only a warning because the symlink may point to a run-time dependency, 3524which obviously won't exist under 3525.Pa ${WRKINST} 3526at the time 3527.Ql make package 3528is run. 3529.It "Warning: @option no-default-conflict with no @conflict" 3530Warning message comes from 3531.Xr pkg_create 1 . 3532Most packages that waive "default-conflict" will have explicit conflict markers 3533instead. 3534Otherwise, the package will only conflict with the exact same version, with 3535some possible 3536.Ev REVISION 3537bumps. 3538Any other version or 3539.Ev FLAVOR 3540won't conflict. 3541This is generally an error, apart from very few ports like 3542.Pa devel/autoconf/* . 3543.It "groff produced empty result for <manpage>..." 3544Warning message comes from 3545.Xr pkg_create 1 . 3546Manpages are automatically formatted with 3547.Xr groff 1 3548if 3549.Ev USE_GROFF 3550is set. 3551The above message denotes an actual problem while formatting the page, 3552which should be addressed. 3553In the meantime, 3554.Xr pkg_create 1 3555still produces a package, but leaves the manpage unformatted, in the hope 3556that something will be able to make sense of it. 3557.El 3558.Sh FILES 3559.Bl -tag -width Ds 3560.It Pa ../Makefile.inc 3561Common Makefile fragment for a set of ports, included automatically. 3562.It Pa /cdrom/distfiles 3563Default path to a CD-ROM (or other media) full of distribution files. 3564.It Pa ${PORTSDIR}/distfiles 3565Default setup of ${DISTDIR}. 3566.It Pa ${DISTDIR} 3567Cache of all distribution files. 3568.It Pa distinfo 3569Checksum file. 3570Holds the output of 3571.Xr cksum 1 , 3572using 3573.Xr sha256 1 3574for the port's ${DISTFILES} and ${PATCHFILES}, 3575as well as the sizes of these files. 3576.It Pa ${DISTDIR}/${CHECKSUMFILES} 3577Cache of normal distribution files for a given port. 3578.It Pa ${DISTDIR}/${MAKESUMFILES} 3579Cache of all distribution files for a given port. 3580.It Pa ${PKGDIR}/DESCR 3581Description for the port. 3582Variables such as ${HOMEPAGE} and ${MAINTAINER} will be expanded 3583(see SUBST_VARS). 3584Multi-package ports will use DESCR${SUBPACKAGE}. 3585.It Pa ${PKGDIR}/README 3586.Ox 3587specific documentation for a port, that will be installed as 3588.Pa ${LOCALBASE}/share/doc/pkg-readmes/${PKGSTEM} 3589at the end of 3590.Cm fake . 3591Variables from 3592.Ev SUBST_VARS 3593will be expanded. 3594Multi-package ports will use 3595.Pa README${SUBPACKAGE} . 3596.It Pa ${PKGDIR}/<foo>.rc 3597Startup script for <foo>. 3598Will be installed as 3599.Ar ${RCDIR}/<foo> 3600at the end of 3601.Cm fake . 3602Variables from 3603.Ev SUBST_VARS 3604will be expanded. 3605.It Pa ${PORTSDIR}/packages/${MACHINE_ARCH} 3606Default setup of ${PACKAGE_REPOSITORY}. 3607.It Pa ${PACKAGE_REPOSITORY}/no-arch 3608Location of arch-independent packages. 3609.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all 3610Location of all built packages. 3611.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cache 3612Location of packages retrieved through the network. 3613.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cksums 3614Location of checksums, see 3615.Ev CHECKSUM_PACKAGES . 3616.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/cdrom 3617Location of packages suitable for the CD. 3618.It Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/ftp 3619Location of packages suitable for FTP. 3620.It Pa ${PORTSDIR}/bulk/${MACHINE_ARCH} 3621Default setup of ${BULK_COOKIES_DIR}. 3622.It Pa ${PORTSDIR}/update/${MACHINE_ARCH} 3623Default setup of ${UPDATE_COOKIES_DIR}. 3624.It Pa ${PORTSDIR}/mystuff 3625Extra directory used to store local ports before committing them. 3626All depend targets will normally look there after the normal lookup fails. 3627See 3628.Ev PORTSDIR_PATH . 3629.El 3630.Sh THE FAKE FRAMEWORK 3631The 3632.Cm fake 3633target is used to install the port in a private directory first, ready for 3634packaging by the 3635.Cm package 3636target, so that the actual installation will use the package. 3637.Pp 3638Essentially, 3639.Cm fake 3640invokes a real install process after tweaking a few variables. 3641.Pp 3642.Cm fake 3643first creates a skeleton tree under ${WRKINST}, using 3644.Xr mkdir 1 3645.Fl p . 3646.Pp 3647A 3648.Cm pre-fake 3649target may be used to complete that skeleton tree. 3650For instance, a few ports may need supplementary stuff to be present (as 3651it would be installed if the port's dependencies were present). 3652.Pp 3653If 3654.Cm {pre,do,post}-install 3655overrides are present, they are used with some 3656important changes, listed in 3657.Ev FAKE_SETUP : 3658.Bd -literal -offset indent 3659TRUEPREFIX=${PREFIX} 3660PREFIX=${WRKINST}${PREFIX} 3661${DESTDIRNAME}=${WRKINST} 3662.Ed 3663.Pp 3664Essentially, old install targets work transparently, except for a need to 3665change 3666.Ev PREFIX 3667to 3668.Ev TRUEPREFIX 3669for symbolic links and similar path lookups. 3670Specific traditional post install work can be simply removed, as it will 3671be taken care of by the package itself (for instance, ldconfig, or 3672texinfo's install-info). 3673.Pp 3674If no 3675.Cm do-install 3676override is present, the port is installed using 3677.Bd -literal -offset 2n 3678env -i ${MAKE_ENV} ${FAKE_SETUP} ${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE} ${FAKE_TARGET} 3679.Ed 3680.Pp 3681Note that this does set both PREFIX and ${DESTDIRNAME}. 3682If a port's Makefile both heeds ${DESTDIRNAME}, 3683and references PREFIX explicitly, 3684FAKE_FLAGS may rectify the problem by setting PREFIX=${PREFIX} 3685(which will do the right thing, since ${PREFIX} is a 3686.Xr make 1 3687construct which will not be seen by the shell). 3688.Pp 3689${FAKE_FLAGS} is used to set variables on 3690.Xr make 1 3691command line, which will override the port Makefile contents. 3692Thus, a port that mentions DESTDIR= does not need any patch to work with fake. 3693.Pp 3694Files such as 3695.Pa ${PKGDIR}/README* 3696or 3697.Pa ${PKGDIR}/*.rc 3698get copied to 3699.Pa ${WRKINST} 3700right after the end of 3701.Cm fake , 3702during 3703.Cm generate-readmes 3704(see the 3705.Sx FILES 3706section above for details). 3707.Sh THE DEBUG_PACKAGES INFRASTRUCTURE 3708If 3709.Ev DEBUG_PACKAGES 3710is not empty, debug packages will be built "on the side". 3711Since debug information is usually large, this is controlled on a per-arch 3712basis with 3713.Ev DEBUGINFO_ARCHS 3714controlling the behavior (set to amd64 by default). 3715.Pp 3716During the normal 3717.Cm package 3718target , 3719.Xr build-debug-info 1 3720will be invoked to deduce debug packing-lists from the normal packing-lists, 3721and some extra makefile rules will be invoked to set aside the debug 3722information. 3723.Pp 3724Then each normal package will have a "shadow" debug-* package built alongside 3725it, with the exact same package signature, except it will also be tied closely 3726with the normal package. 3727.Pp 3728Figuring out what files contain debug information is entirely achieved through 3729.Cm @bin , 3730.Cm @lib , 3731.Cm @so 3732and 3733.Cm @static-lib 3734annotations in the base packing-lists. 3735.Pp 3736Debug packages will be produced for all subpackages in 3737.Ev DEBUG_PACKAGES . 3738Usually, the heuristics of trimming arch-independent packages 3739from 3740.Ev BUILD_PACKAGES 3741is enough. 3742In case this still produces empty debug packages, the 3743.Ev DEBUG_PACKAGES 3744list should be produced manually. 3745.Pp 3746The actual debug packages are not registered through 3747.Xr register-plist 1 3748since the information was automatically generated. 3749.Pp 3750debug package names and debug package filenames are added to 3751.Ev PKGNAMES 3752and 3753.Ev PKGFILES 3754respectively for introspection purpose. 3755.Pp 3756.Xr egdb 1 3757from ports can read debug information from a separate file, as long as 3758the original ELF file was annotated with a debuginfo link. 3759.Pp 3760That feature is used to set debug information on the side, in 3761.Pa .debug/ 3762subdirectories alongside the normal binaries, shared objects and shared 3763libraries. 3764.Pp 3765For static libraries, the information can't be separated, instead the full 3766static library with debug information is provided in the 3767.Pa .debug/ 3768subdirectory, while the normal static library gets stripped. 3769.Sh FLAVORS AND MULTI_PACKAGES 3770Starting with 3771.Ox 2.7 , 3772each port can generate distinct packages through two orthogonal mechanisms: 3773.Ev FLAVORS 3774and 3775.Ev MULTI_PACKAGES . 3776.Pp 3777The current 3778.Ev MULTI_PACKAGES 3779mechanism was introduced after 3780.Ox 4.0 . 3781.Pp 3782The arch-dependent part was refined after 3783.Ox 5.0 . 3784.Pp 3785If a port can be compiled with several options, these options 3786should be turned into 3787.Ev FLAVORS . 3788The port maintainer will set 3789.Ev FLAVORS 3790to be the list of possible options in the Makefile. 3791When building the port, the package builder will set 3792.Li "FLAVOR='option1 option2...'" 3793to build a specific flavor of the port. 3794The Makefile should test the value of FLAVOR as follows: 3795.Bd -literal -offset indent 3796FLAVOR?= 3797\&.if ${FLAVOR:Moption1} 3798# what to do if option1 3799\&.endif 3800\&.if ${FLAVOR:Moption2} 3801# what to do if option2 3802\&.endif 3803.Ed 3804.Pp 3805.Nm 3806takes care of a few details, such as generating a distinct work directory for 3807each flavor, or creating a FULLPKGNAME by adding a dash separated list of 3808flavors to the base package name. 3809The order in which 3810.Ev FLAVOR 3811is specified does not matter: this dash separated list will be 3812reordered to match the ordering of 3813.Ev FLAVORS . 3814.Pp 3815It is an error to specify an option in 3816.Ev FLAVOR 3817that does not appear in 3818.Ev FLAVORS , 3819to prevent misspellings. 3820.Pp 3821In bulk package building, flavors can be specified as a comma 3822separated list after the package directory, e.g., SUBDIR+=vim,no_x11 3823.Po 3824see 3825.Xr pkgpath 7 3826.Pc 3827.Pp 3828Finally, package information will use templates with the canonical package 3829extension if they are available: if FLAVOR='option1 option2' and both 3830COMMENT and COMMENT-option1-option2 are available, COMMENT-option1-option2 will 3831be used. 3832.Pp 3833If one build of a port can generate several distinct packages, set 3834.Ev MULTI_PACKAGES 3835accordingly. 3836Each extension of a 3837.Ev MULTI_PACKAGES 3838name should start with a dash, so that they cannot be confused with 3839.Ev FLAVORS . 3840In dependency checking and bulk builds, a subpackage can be 3841specified after a comma, e.g., 3842.Li SUBDIR+=quake,-server . 3843.Ev MULTI_PACKAGES 3844only affects the actual package building step (and the 3845.Cm describe 3846step, since a 3847.Ev MULTI_PACKAGES 3848port will produce several descriptions). 3849.Pp 3850If 3851.Ev MULTI_PACKAGES 3852is set, the packaging stage happens once for every 3853subpackage, using subpackage-specific variables. 3854For instance, if 3855.Li MULTI_PACKAGES=-main -lib -server , 3856.Ev PKG_ARCH-main , 3857.Ev PKG_ARCH-lib 3858and 3859.Ev PKG_ARCH-server 3860will be used for the subpackages respectively called 3861.Ev FULLPKGNAME-main , 3862.Ev FULLPKGNAME-lib 3863and 3864.Ev FULLPKGNAME-server . 3865.Pp 3866All package information is also derived from 3867templates with SUBPACKAGE appended. 3868In the preceding example, the packing-list template for FULLPKGNAME-lib 3869must be in PLIST-lib. 3870.Pp 3871The following variables are subpackage dependent: 3872.Ev COMMENT , 3873.Ev PKG_ARCH , 3874.Ev PERMIT_PACKAGE , 3875.Ev PKGFILE , 3876.Ev PKGNAME , 3877.Ev PKGSTEM , 3878.Ev FULLPKGNAME , 3879.Ev REVISION , 3880.Ev EPOCH , 3881.Ev FULLPKGPATH , 3882.Ev RUN_DEPENDS , 3883.Ev WANTLIB , 3884.Ev LIB_DEPENDS , 3885.Ev IGNORE , 3886.Ev ONLY_FOR_ARCHS , 3887.Ev NOT_FOR_ARCHS , 3888.Ev PKG_ARGS , 3889.Ev PREFIX , 3890.Ev CATEGORIES , 3891.Ev MESSAGE , 3892.Ev UNMESSAGE , 3893.Ev DESCR , 3894.Ev PLIST , 3895.Ev STATIC_PLIST , 3896.Ev PKGSPEC . 3897.Pp 3898The usual non-MULTI_PACKAGES variables are simply used as default values 3899for all subpackages. 3900So, if you set 3901.Li "PKG_ARCH=*" 3902.Li "PKG_ARCH-main=i386" 3903then 3904.Ev PKG_ARCH-lib 3905and 3906.Ev PKG_ARCH-server 3907will both be 3908.Sq * . 3909.Pp 3910.Ev WANTLIB 3911and 3912.Ev LIB_DEPENDS 3913are special. 3914At the beginning of the build, during 3915.Cm prepare , 3916all build dependencies will be checked, 3917which includes 3918.Ev LIB_DEPENDS , 3919.Ev WANTLIB 3920for every subpackage. 3921As an exception, any 3922.Ev LIB_DEPENDS-sub 3923that references the current port will be ignored as a build dependency, 3924in order to avoid recursion. 3925.Pp 3926.Ev FULLPKGPATH 3927and 3928.Ev FULLPKGNAME 3929are special as well. 3930You must set 3931.Ev PKGNAME-sub 3932or 3933.Ev FULLPKGNAME-sub 3934for each subpackage, but 3935.Ev FULLPKGPATH-sub 3936is set automatically to the right value. 3937In very rare cases, one may override 3938.Ev FULLPKGPATH-sub . 3939(for instance, if one specific subpackage is not affected by option 3940settings that affect other subpackages, e.g., for include files packs). 3941.Pp 3942In terms of using the port, quite a few targets will have a subpackage 3943specific subtarget: 3944invoking 3945.Cm package 3946is the same as invoking 3947.Cm subpackage 3948for all subpackages, 3949invoking 3950.Cm install-all 3951is the same as invoking 3952.Cm install 3953for all subpackages, 3954and invoking 3955.Cm update 3956is the same as invoking 3957.Cm subupdate 3958for all subpackages. 3959.Pp 3960.Ev ONLY_FOR_ARCHS 3961and 3962.Ev NOT_FOR_ARCHS 3963interact with 3964.Ev MULTI_PACKAGES 3965and 3966.Ev IGNORE . 3967The infrastructure will automatically filter subpackages 3968that are not suitable for the current architecture. 3969Thus, 3970.Ev MULTI_PACKAGES 3971should always list all subpackages, 3972even things not buildable on the current architecture, 3973for indexing purposes. 3974.Pp 3975Starting with 3976.Ox 5.1 , 3977.Xr bsd.port.arch.mk 5 3978should be used to simplify the handling of 3979.Ev MULTI_PACKAGES 3980in arch-dependent setups: 3981.Pp 3982Make sure 3983.Ev MULTI_PACKAGES , 3984.Ev ONLY_FOR_ARCHS* , 3985and 3986.Ev PSEUDO_FLAVORS 3987are defined correctly, then 3988.Bd -literal -offset indent 3989\&.include <bsd.port.arch.mk> 3990.Ed 3991.Pp 3992This will compute 3993.Ev BUILD_PACKAGES , 3994the list of actual subpackages to build with the current setup, 3995by taking arch constraints and pseudo-flavors into account. 3996Then test 3997.Ev BUILD_PACKAGES 3998to set up the right configuration, e.g., to check if 3999.Ev SUBPACKAGE 4000.Ar -mono 4001should be built: 4002.Bd -literal -offset indent 4003\&.if ${BUILD_PACKAGES:M-mono} 4004.Ed 4005.Pp 4006The 4007.Pa lang/gcc/8 4008or 4009.Pa print/poppler 4010ports should provide examples of proper use. 4011.Pp 4012Note that 4013.Xr dpb 1 4014will break if all subpackages are not properly listed. 4015.Sh THE GENERATION OF PACKAGE INFORMATION 4016Starting after 4017.Ox 4.1 4018all package information is processed directly by 4019.Xr pkg_create 1 4020from templates in ${PKG_DIR}. 4021.Pp 4022.Bl -bullet -compact 4023.It 4024If not overridden by the user, determine which set of templates to use, 4025depending on the current SUBPACKAGE and FLAVOR information. 4026Set PLIST${SUBPACKAGE}, DESCR${SUBPACKAGE}, COMMENT${SUBPACKAGE}, MESSAGE${SUBPACKAGE}, UNMESSAGE${SUBPACKAGE} accordingly. 4027.It 4028Generate the actual DESCR, and if needed, MESSAGE, UNMESSAGE, 4029from the templates in ${DESCR}, ${MESSAGE}, ${UNMESSAGE}, by 4030substituting the variables in ${SUBST_VARS}, and by substituting 4031${FLAVORS} with the canonical flavor extension for this port, 4032e.g., if 4033.Li FLAVORS=no_map gfx qt2 , 4034if 4035.Li FLAVOR=gfx no_map , 4036this is 4037.Sq -no_map-gfx . 4038.It 4039Generate the actual PLIST from the template ${PLIST}, 4040by inserting fragments 4041and applying the same variable substitutions as other package information. 4042.El 4043.Pp 4044Note that ${COMMENT} is currently not substituted, to speed up 4045.Cm describe 4046generation. 4047.Pp 4048To avoid substitution, variables can be escaped as follows: 4049.Li "$\e{PREFIX}" 4050.Pp 4051If 4052.Ev FLAVORS 4053lists flv, then constructs such as the line 4054.Li "%%flv%%" 4055or 4056.Li "!%%flv%%" 4057in the packing-list template trigger the inclusion of 4058.Pa ${PKGDIR}/PFRAG.flv${SUBPACKAGE} 4059or 4060.Pa ${PKGDIR}/PFRAG.no-flv${SUBPACKAGE} . 4061Other fragments can be defined by simply adding 4062.Li "-Dfrag=1" 4063or 4064.Li "-Dfrag=0" 4065to 4066.Ev PKG_ARGS . 4067.Pp 4068If libraries are built using 4069.Pa bsd.lib.mk , 4070special care should be taken for mips64* architectures, 4071which do not ever build 4072.Pa *pic.a 4073files (all mips code is pic already). 4074.Nm 4075automatically adds 4076.Li "-Dno_mips64=1" 4077or 4078.Li "-Dno_mips64=0" 4079to 4080.Ev PKG_ARGS , 4081and the porter only needs to provide the appropriate fragment. 4082.Pp 4083.Xr pkg_add 1 4084now calls 4085.Xr ldconfig 8 4086directly, provided dynamic libraries have been annotated with 4087.Li "@lib libthingy.so.5.0" . 4088Adding new directories to the dynamic loader cache has been 4089deprecated. 4090It is often better to let libraries be visible as a link 4091under ${LOCALBASE}. 4092Having a separate directory is enough to trick 4093.Xr ld 1 4094into grabbing the right version. 4095Libraries used only for 4096.Xr dlopen 3 4097do not need to be visible. 4098Some programs will prefer to use rpath to find their own libraries. 4099.Pp 4100The special 4101.Cm update-plist 4102target does a fairly good job of automatically generating the PLIST. 4103.Pp 4104If 4105.Ev PLIST_REPOSITORY 4106points to a directory, all packing-lists from packages generated by 4107.Xr pkg_create 1 4108during the 4109.Cm package 4110stage are saved in 4111.Pa ${PLIST_REPOSITORY}/${MACHINE_ARCH} 4112by a script: 4113.Pa ${PORTSDIR}/infrastructure/bin/register-plist . 4114This script strips some irrelevant information and normalizes the 4115packing-list somehow, and compares it to existing information, looking 4116for relevant changes. 4117Since a package name must always be changed when the packing-list changes, 4118any attempt to replace a packing-list of a given name with a different 4119packing-list will be flagged as an error. 4120.Pp 4121In 4122.Ev MULTI_PACKAGES 4123mode, there must be separate COMMENT, DESCR, and PLIST 4124templates for each SUBPACKAGE (and optional distinct MESSAGE, UNMESSAGE 4125files in a similar way). 4126This contrasts with the 4127.Ev FLAVORS 4128situation, where all these files will automatically default to the 4129non-flavor version if there is no flavor-specific file around. 4130.Sh OBSOLETE TARGETS 4131.Bl -tag -width Ds 4132.It Cm addsum 4133Used for direct fiddling with 4134.Pa distinfo , 4135made obsolete by the correct use of 4136.Ev SUPDISTFILES . 4137.It Cm cdrom-packages , ftp-packages 4138Links are now created during the 4139.Cm package 4140target. 4141.It Cm depends-list 4142Renamed into 4143.Cm full-build-depends . 4144.It Cm describe 4145Prints a one-line index entry of the port. 4146.Cm dump-vars 4147provides much more accurate information, and the indexing role 4148has been taken over by the 4149.Pa sqlports 4150and 4151.Pa portslist 4152packages. 4153.It Cm {build,run,lib}-depends 4154The dependency mechanism now meshes 4155.Ev BUILD_DEPENDS , LIB_DEPENDS , RUN_DEPENDS, WANTLIB 4156and 4157.Ev MULTI_PACKAGES . 4158Refer to 4159.Cm prepare , install-depends , test-depends . 4160.It Cm {pre,do}-extract 4161Don't override. 4162Set 4163.Ev EXTRACT_ONLY 4164to nothing and override 4165.Cm post-extract 4166instead. 4167.It Cm {pre,do,post}-fetch 4168These prevented bulk mechanisms from running properly. 4169.It Cm {pre,do,post}-package 4170There is no port that requires special treatment during packaging, 4171as 4172.Cm {pre,do,post}-install 4173should take care of every necessity. 4174.It Cm fetch-list , mirror-distfiles , fetch-makefile , mirror-maker , mirror-maker-fetch 4175Use 4176.Cm dpb Fl F 4177instead, see 4178.Xr mirroring-ports 7 . 4179.It Cm obj 4180Starting with 4181.Ox 3.3 , 4182using 4183.Ev WRKOBJDIR 4184no longer creates a symlink between the current directory and 4185a subdirectory of ${WRKOBJDIR}, so 4186.Cm obj 4187is no longer applicable. 4188.It Cm print-depends 4189Use 4190.Cm print-build-depends 4191and 4192.Cm print-run-depends 4193instead. 4194.It Cm print-depends-list 4195Renamed into 4196.Cm print-build-depends . 4197.It Cm print-package-depends 4198Renamed into 4199.Cm print-run-depends . 4200.It Cm print-package-signature 4201Renamed into 4202.Cm print-update-signature . 4203.It Cm readme , readmes 4204replaced by the 4205.Pa databases/ports-readmes 4206port, using the Template Toolkit 4207.Po 4208.Pa textproc/p5-Template 4209.Pc 4210instead of hand-coded substitutions. 4211.El 4212.Sh OBSOLETE VARIABLES 4213.Bl -tag -width Ds 4214.It Ev BIN_PACKAGES 4215Old user settings. 4216The infrastructure always trusts the repository to contain correct packages. 4217So, if the package name did not change and if it exists in the repository, 4218it will not be rebuilt without manual user action. 4219.It Ev CATn 4220List of formatted manpages, per section. 4221.It Ev CATPREFIX 4222Location for storing formatted manpages. 4223Derived directly from 4224.Ev PREFIX . 4225.It Ev CDROM_PACKAGES 4226Old user settings. 4227Base location where packages suitable for a CD-ROM would be placed. 4228.It Ev COMMENT 4229Used to be the name of the comment file for a package. 4230It now holds the comment itself. 4231Some magic has been put in to allow for a seamless transition. 4232.It Ev CONFIGURE_SHARED 4233Used to default to --enable-shared or --disable-shared, depending on whether 4234the architecture supported shared libraries. 4235.It Ev DESCR_SRC 4236From 4237.Nx . 4238This is DESCR. 4239.Ox 4240does not give a specific name to the generated file. 4241It is not recommended to try to access it directly. 4242.It Ev EXTRACT_AFTER_ARGS 4243Was used to cobble together the normal extraction command, as 4244${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${EXTRACT_AFTER_ARGS}. 4245Use 4246.Ev EXTRACT_CASES 4247instead. 4248.It Ev EXTRACT_BEFORE_ARGS 4249Likewise, use 4250.Ev EXTRACT_CASES 4251instead. 4252.It Ev EXTRACT_CMD 4253Likewise, use 4254.Ev EXTRACT_CASES 4255instead. 4256.It Ev FETCH_BEFORE_ARGS , FETCH_AFTER_ARGS 4257Set 4258.Ev FETCH_CMD 4259to point to a script that does any required special treatment instead. 4260.It Ev FETCH_DEPENDS 4261Used to specify dependencies that were needed to fetch files. 4262It is much easier to mirror locally weird distribution files. 4263.It Ev FTP_PACKAGES 4264User settings. 4265Base location where packages suitable for FTP (see 4266PERMIT_PACKAGE) will be placed. 4267Now hardwired to 4268.Pa ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/ftp . 4269.It Ev GNU_CONFIGURE 4270Use 4271.Ev CONFIGURE_STYLE 4272instead. 4273.It Ev HAS_CONFIGURE 4274Use 4275.Ev CONFIGURE_STYLE 4276instead. 4277.It Ev IGNOREFILES 4278Set to the list of files that can't be checksummed. 4279All uses of it have led to postponing the correct action: talking 4280to the software author and getting him to provide versioned archives. 4281.It Ev MANn 4282List of unformatted manpages, per section. 4283.It Ev MANPREFIX 4284Location for storing unformatted manpages. 4285Derived directly from 4286.Ev PREFIX . 4287.It Ev MASTERDIR 4288From 4289.Fx . 4290Used to organize a collection of ports that share most files. 4291.Ox 4292uses a single port with flavors or multi-packages to produce 4293package variations instead. 4294.It Ev MASTER_SITE_SUBDIR 4295Contents were used to replace 4296.Sq %SUBDIR% 4297in all 4298.Ev MASTER_SITES 4299variables. 4300Since 4301.Sq %SUBDIR% 4302almost always occur at the end of the directory, 4303the simpler 4304.Li ${VARIABLE:=subdir/} 4305construct is now used instead 4306.Po 4307taken from 4308.Nx 4309.Pc . 4310.It Ev MD5_FILE 4311Use 4312.Ev CHECKSUM_FILE 4313instead. 4314.It Ev MIRROR_DISTFILE 4315Use 4316.Ev PERMIT_DISTFILES 4317to determine which files can be mirrored instead. 4318See 4319.Xr mirroring-ports 7 . 4320.It Ev NEED_VERSION 4321Used to set a requirement on a specific revision of 4322.Nm 4323needed by a port. 4324No longer needed as 4325.Nm 4326should always be kept up to date. 4327.It Ev NO_CONFIGURE 4328If ${CONFIGURE_SCRIPT} does not exist, no automatic configuration will 4329be done anyway. 4330.It Ev NO_DESCRIBE 4331All ports should generate a description. 4332.It Ev NO_EXTRACT 4333Set EXTRACT_ONLY= instead. 4334.It Ev NO_INSTALL_MANPAGES 4335Use 4336.Ev CONFIGURE_STYLE 4337instead. 4338.It Ev NO_MTREE 4339Starting with 4340.Ox 2.7 , 4341the operating system installation script runs the /usr/local specification 4342globally, instead of embedding it in each package. 4343So packages no longer record an 4344.Xr mtree 8 4345specification. 4346Use an explicit 4347.Sq @exec 4348command if needed. 4349.It Ev NO_PACKAGE 4350All ports should generate a package, preferably before install. 4351.It Ev NO_PATCH 4352The absence of a patches directory does the same. 4353Use PATCHDIR and PATCH_LIST if patches need to be changed dynamically. 4354.It Ev NO_SHARED_ARCHS 4355Used to be set to the list of platforms that did not support shared libraries. 4356No such architectures remain. 4357.It Ev NO_SHARED_LIBS 4358Used to be set to 4359.Sq Yes 4360if platform did not support shared libraries. 4361.It Ev NO_WRKDIR 4362All ports should have a working directory, as this is necessary to store 4363cookies and keep state. 4364.It Ev NO_WRKSUBDIR 4365The same functionality is obtained by setting WRKDIST=${WRKDIR}. 4366.It Ev NOCLEANDEPENDS 4367Use CLEANDEPENDS instead. 4368.It Ev NOMANCOMPRESS 4369.Fx 4370ships with compressed man pages, and uses this variable to control 4371that behavior. 4372.It Ev OBJMACHINE 4373Starting with 4374.Ox 3.3 , 4375setting 4376.Ev WRKOBJDIR 4377creates the whole 4378.Ev WRKDIR 4379hierarchy under ${WRKOBJDIR}, so 4380.Ev OBJMACHINE 4381is no longer useful. 4382.It Ev OLD_WRKDIR_NAME 4383Used to be a base name for 4384.Ev WRKDIR 4385in the old scheme without 4386.Ev WRKOBJDIR . 4387.It Ev OPSYS 4388The operating system. 4389This ports tree is only used on 4390.Ox . 4391.It Ev OPSYS_VER 4392Use 4393.Ev OSREV 4394instead. 4395.It Ev PACKAGES 4396Base location for packages built, everything is based on 4397.Ev PACKAGE_REPOSITORY 4398now. 4399.It Ev PACKAGING 4400Used to be set during package creation, so that the port would test it 4401to tweak some settings at this point. 4402All its effects are now achieved through 4403.Ev MULTI_PACKAGES . 4404.It Ev PATCH_SITES 4405.Ev PATCHFILES 4406used to be retrieved from a separate site list. 4407For greater flexibility, all files are now retrieved from 4408.Ev MASTER_SITES , 4409.Ev MASTER_SITES0 , ... , 4410.Ev MASTER_SITES9 , 4411using a 4412.Sq :0 4413to 4414.Sq :9 4415extension to the file name, e.g., 4416.Bd -literal -offset indent 4417PATCHFILES=foo.diff.gz 4418PATCH_SITES=ftp://ftp.zoinx.org/pub/ 4419.Ed 4420.Pp 4421becomes 4422.Bd -literal -offset indent 4423PATCHFILES=foo.diff.gz:0 4424MASTER_SITES0=ftp://ftp.zoinx.org/pub/ 4425.Ed 4426.\" keep the long form so searching can find them 4427.It Ev PERMIT_DISTFILES_CDROM , PERMIT_DISTFILES_FTP , PERMIT_PACKAGE_CDROM , PERMIT_PACKAGE_FTP 4428The 4429.Ox 4430project no longer produces CD-ROMs, so the 4431.Ev PERMIT_*_CDROM 4432variables were dropped, 4433and 4434.Ev PERMIT_DISTFILES_FTP / PERMIT_PACKAGE_FTP 4435were shortened to 4436.Ev PERMIT_DISTFILES / PERMIT_PACKAGE . 4437.It Ev PKG_CMD 4438Replaced by 4439.Ev PKG_CREATE . 4440.It Ev PKGREPOSITORY 4441Old user settings. 4442See 4443.Ev PACKAGE_REPOSITORY . 4444.It Ev PKGREPOSITORYBASE 4445Old user settings. 4446See 4447.Ev PACKAGE_REPOSITORY . 4448.It Ev PLIST_SRC 4449From 4450.Nx . 4451This is PLIST. 4452.Ox 4453does not give a specific name to the generated file. 4454It is not recommended to try to access them directly. 4455.It Ev PKGNAME 4456Used to refer to the full package name, has been superseded by 4457.Ev FULLPKGNAME-foo , 4458for 4459.Ev SUBPACKAGE 4460-foo. 4461.Ev PKGNAME 4462now holds the package name, not taking multi-packages or flavors 4463into account. 4464Most ports are not concerned by this change. 4465.It Ev PLIST_SUBST 4466From 4467.Nx 4468and 4469.Fx . 4470Use SUBST_VARS instead. 4471.Ox 4472does not allow general substitutions of the form VAR=value, but uses 4473only a list of variables instead. 4474Most package files gets transformed, instead of only the packing list. 4475.It Ev PREFERRED_CIPHERS 4476Allowing user change of cryptographic digest is dangerous. 4477.It Ev RECURSIVE_FETCH_LIST 4478No longer needed with modern 4479.Xr mirroring-ports 7 . 4480.It Ev RESTRICTED 4481Port has cryptographic issues. 4482.Ox 4483focuses on 4484.Ev PERMIT_PACKAGE 4485instead. 4486.It Ev SED_PLIST 4487Old pipeline for creating packing-lists at the ports level. 4488Necessary functionality has been integrated directly into 4489.Xr pkg_create 1 . 4490.It Ev SIGNING_PARAMETERS 4491Old user settings. 4492There is no longer any benefit to signing packages during creation. 4493.It Ev SCRIPTDIR 4494Old location for scripts related to the current port. 4495There is no reason for the semantic distinction, use 4496.Ev FILESDIR 4497for those. 4498.It Ev SCRIPTS_ENV 4499Used to contain the environment for invoking various scripts. 4500.Ev CONFIGURE_ENV 4501and 4502.Ev MAKE_ENV 4503are enough. 4504.It Ev SHARED_ONLY 4505Had to be set to 4506.Sq Yes 4507if port could only be built on architectures with shared libraries. 4508.It Ev USE_AUTOCONF 4509Use 4510.Ev CONFIGURE_STYLE 4511instead. 4512.It Ev USE_BZIP2 4513The framework will automatically detect the presence of 4514.Pa .tar.bz2 4515files to extract. 4516See also 4517.Ev BZIP2 , EXTRACT_CASES , 4518and 4519.Ev EXTRACT_SUFX . 4520.It Ev USE_IMAKE 4521Use 4522.Ev CONFIGURE_STYLE 4523instead. 4524.It Ev USE_ZIP 4525The framework will automatically detect the presence of 4526.Pa .zip 4527files to extract. 4528See also 4529.Ev ZIP , EXTRACT_CASES , 4530and 4531.Ev EXTRACT_SUFX . 4532.It Ev VARNAME 4533Use make show=name instead of make show VARNAME=name. 4534.It Ev WRKPKG 4535Directory used to build package information from the templates under 4536.Pa ${PKGDIR} . 4537This information is now built on the fly by 4538.Xr pkg_create 1 . 4539.El 4540.Sh OBSOLETE FILES 4541.Bl -tag -width Ds 4542.It Pa {files,patches,pkg}.${ARCH} 4543Offensive to introspection, makes it impossible to build a decent sqlports 4544on a given arch. 4545Hasn't been used for a long time, and there are lots of mechanisms such as 4546.Ev PKG_ARGS 4547and fragment substitution, or 4548.Ev PATCH_LIST 4549to achieve similar results. 4550.It Pa Makefile.${ARCH} 4551Likewise, offensive to introspection too. 4552.It Pa ${FILESDIR}/md5 4553Renamed to 4554.Pa distinfo 4555to match other 4556.Bx , 4557and save directories. 4558.It Pa ${SCRIPTDIR}/{pre,do,post}-* 4559Identical functionality can be obtained through a 4560.Cm {pre,do,post}-* 4561target, invoking the script manually if necessary. 4562.It Pa ${SCRIPTDIR}/configure 4563No longer invoked automatically. 4564Just inline the instructions in 4565.Cm do-configure 4566in the Makefile, or put the script in ${FILESDIR} and 4567invoke it. 4568.It Pa ${PKGDIR}/COMMENT 4569Use COMMENT variable instead. 4570.It Pa ${PKGDIR}/DEINSTALL* 4571Use @unexec annotations in the packing-list instead. 4572.It Pa ${PKGDIR}/INSTALL* 4573Use @exec annotations in the packing-list instead. 4574.It Pa ${PKGDIR}/PLIST.{noshared,no-shared,shared} 4575Packaging list fragments to handle platforms that did not support 4576shared libraries. 4577.It Pa ${PKGDIR}/PLIST.sed 4578Use PLIST directly. 4579Until revision 1.295, 4580.Nm 4581did not substitute variables in the packing list unless this special form 4582was used. 4583.It Pa ${PKGDIR}/REQ* 4584Old requirement script. 4585Was mostly unused anyway. 4586.It Pa /usr/share/mk/bsd.port.mk 4587Original location of 4588.Nm . 4589The current file lives under 4590.Pa ${PORTSDIR}/infrastructure/mk/bsd.port.mk , 4591whereas 4592.Pa /usr/share/mk/bsd.port.mk 4593is just a stub. 4594.It Pa {scripts,files,patches}.${OPSYS} 4595The 4596.Ox 4597ports tree focuses on robustness, not on being portable to other operating 4598systems. 4599In any case, portability should not need to depend on operating 4600system dependent patches. 4601.It Pa /usr/local/etc 4602Used by 4603.Fx 4604to marshall system configuration files. 4605All 4606.Ox 4607system configuration files are located in 4608.Pa /etc , 4609or in a subdirectory of 4610.Pa /etc . 4611.El 4612.Sh SEE ALSO 4613.Xr ftp 1 , 4614.Xr pkg_add 1 , 4615.Xr pkg_create 1 , 4616.Xr OpenBSD::Intro 3p , 4617.Xr bsd.port.arch.mk 5 , 4618.Xr mk.conf 5 , 4619.Xr port-modules 5 , 4620.Xr library-specs 7 , 4621.Xr mirroring-ports 7 , 4622.Xr packages-specs 7 , 4623.Xr pkgpath 7 , 4624.Xr ports 7 4625.Sh HISTORY 4626The ports mechanism originally came from 4627.Fx . 4628A lot of additions were taken from 4629.Nx 4630over the seminal years. 4631.Pp 4632Since 1998, the framework has been systematically cleaned-up and reorganized 4633to remove bugs. 4634New features have been carefully introduced, trying hard to avoid 4635inconsistencies. 4636.Pp 4637.Ev FLAVORS , 4638.Ev MULTI_PACKAGES , 4639.Ev SEPARATE_BUILD 4640and FAKE are 4641.Ox 4642improvements. 4643Most recent additions do not come from another 4644.Bx . 4645.\" Voluntarily undocumented: 4646.\" AUTOCONF_ENV: probably not needed anyway, should be internal. 4647.Sh BUGS AND LIMITATIONS 4648.Ev LOCALBASE , 4649.Ev X11BASE , 4650.Ev BASESYSCONFDIR , 4651.Ev VARBASE 4652and 4653.Ev PREFIX 4654are not heeded consistently. 4655Using anything but the default values has not been heavily tested. 4656Some ports may not build if you change them. 4657