1.\" $OpenBSD: port-modules.5,v 1.248 2020/10/09 13:24:43 paco Exp $ 2.\" 3.\" Copyright (c) 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: October 9 2020 $ 28.Dt PORT-MODULES 5 29.Os 30.Sh NAME 31.Nm port-modules 32.Nd documentation and conventions used in port modules 33.Sh DESCRIPTION 34The 35.Ox 36Ports framework is based on a gigantic makefile named 37.Xr bsd.port.mk 5 . 38.Pp 39In order to curb unwieldy growth, parts of the framework 40that are not always needed have been set apart in optional 41files called 42.Nm port modules , 43which are retrieved as needed through the 44.Ev MODULES 45variable of 46.Xr bsd.port.mk 5 . 47.Pp 48Some of these modules correspond to basic mechanisms which are not 49always needed, such as GNU autoconf, or perl5. 50.Pp 51For convenience, setting 52.Ev CONFIGURE_STYLE 53in a port's main Makefile is enough to get perl5 or autoconf support, but 54.Ar gnu , 55.Ar imake 56and 57.Ar perl5 58are actually modules, and there is some glue in 59.Xr bsd.port.mk 5 60that magically adds the required module in that case. 61This doesn't work when parsing modules. 62For instance, if you set 63.Li CONFIGURE_STYLE=gnu 64in a module, you also need to 65.Li MODULES += gnu . 66.Pp 67Other modules correspond to shortcuts for using some other ports as 68dependencies without needing to hardcode too much, such as 69the qt ports. 70.Sh THE MODULES LOOK-UP MECHANISM 71The variable 72.Ev MODULES 73should contain a list of module names. 74Some core modules are a single word, all other modules should be 75${PKGPATH}. 76If the module is 77.Pa some/dir/portname , 78the ports framework will look for a file named 79.Pa ${PORTSDIR}/some/dir/portname/portname.port.mk 80and include it. 81.Pp 82Most modules should conform to this syntax. 83The historic practice of having a redirection file directly under 84.Pa ${PORTSDIR}/infrastructure/mk 85is deprecated for new modules. 86.Pp 87Modules may refer to each other. 88The modules mechanism has specific recursion handling such that 89adding 90.Li MODULES += foo/bar 91to a module will work as expected. 92.Sh NAMING CONVENTIONS 93Since there is no actual scope in makefiles, everything defined within 94a module will be global to the ports framework, and thus may interfere 95with other ports. 96.Pp 97As far as possible, all variables and targets belonging to a module named 98.Pa some/dir/foo 99should be named 100.Ev MODFOO_* 101and 102.Ar modfoo_* . 103.Pp 104Following the same conventions as 105.Xr bsd.port.mk 5 , 106internal variables and targets not intended for user consumption should be 107named 108.Ev _MODFOO_* 109and 110.Ar _modfoo_* . 111.Pp 112For instance, if a module wants some value to be available for the rest 113of the world, it should define 114.Ev MODFOO_VARNAME , 115with a name matching the basic infrastructure as far as possible. 116That is, a port that defines specific dependencies will usually 117define 118.Ev MODFOO_WANTLIB , 119.Ev MODFOO_LIB_DEPENDS , 120and 121.Ev MODFOO_RUN_DEPENDS , 122as appropriate. 123.Pp 124As an exception to the naming mechanism, some ports have several distinct 125versions in the ports tree, say 126.Pa x11/qt3 127and 128.Pa x11/qt4 . 129Instead of using the namespace 130.Ev MODQT3* , 131variables will usually drop the version suffix and be simply called 132.Ev MODQT_* 133so that a port using the module can be switched from version to version 134without needing to change everything. 135.Pp 136It is highly desirable to define names in both namespaces for such ports, 137for example to define both 138.Ev MODQT3_LIB_DEPENDS 139and 140.Ev MODQT_LIB_DEPENDS . 141Normal client ports will use 142.Ev MODQT_LIB_DEPENDS , 143but a port may exceptionally import both modules with 144.Li MODULES += x11/qt3 x11/qt4 145and differentiate between qt3 and qt4 needs with 146.Ev MODQT3_LIB_DEPENDS 147and 148.Ev MODQT4_LIB_DEPENDS . 149See 150.Pa print/poppler 151for an example. 152.Sh OVERRIDING TARGET BEHAVIOR 153The main framework contains several hooks that allow ports to override 154normal behavior. 155This evolved as an ad-hoc framework, where only hooks that turned out 156to be needed were added. 157If several modules define the same hook, hook behaviors will be 158invoked in sequence. 159.Bl -tag -width do-configure 160.It Cm extract 161There is a 162.Cm post-extract 163hook that can be activated by defining 164.Ev MODFOO_post-extract . 165It will be run right after 166.Cm post-extract . 167.It Cm patch 168There is a 169.Cm post-patch 170hook that can be activated by defining 171.Ev MODFOO_post-patch . 172It will be run right after 173.Cm post-patch . 174.It Cm gen 175There is a 176.Cm gen 177hook that can be activated by defining 178.Ev MODFOO_gen . 179It will be run right after 180.Cm do-gen 181and before 182.Ev REORDER_DEPENDENCIES 183touches things. 184.It Cm configure 185There is a 186.Cm pre-configure 187hook that can be activated by defining 188.Ev MODFOO_pre-configure . 189It will be run right after 190.Cm pre-configure . 191The normal 192.Cm do-configure 193behavior is to invoke all 194.Ev MODFOO_configure 195contents that are defined in 196.Ev CONFIGURE_STYLE . 197By default, 198.Cm configure 199will do nothing. 200.Pp 201Some 202.Ev CONFIGURE_STYLE 203values, namely perl, gnu, imake, and autoconf, 204will automatically import the correct module. 205User-defined modules must both add to 206.Ev CONFIGURE_STYLE 207and import the correct module to override behavior. 208.Pp 209Contrary to other hooks, module behavior is not invoked in 210addition to 211.Cm do-configure , 212but as the normal configure process. 213If 214.Cm do-configure 215is overridden, normal hook processing will not happen. 216.It Cm fake 217There is a 218.Cm pre-fake 219hook that can be activated by defining 220.Ev MODFOO_pre-fake . 221This will be invoked right after 222.Xr mtree 8 , 223and before the normal 224.Cm pre-fake 225behavior. 226.Pp 227This can occasionally be used for ports that require some specific 228fake installation setup that will be provided by runtime dependencies. 229.It Cm install 230There is a 231.Cm post-install 232hook that can be activated by defining 233.Ev MODFOO_post-install . 234This will be invoked at the end of 235.Cm install , 236right after the normal 237.Cm post-install 238behavior. 239.El 240.Pp 241Some targets, such as 242.Cm do-build 243or 244.Cm do-install , 245can't be overridden simply. 246A module that, for instance, requires specific 247.Cm do-build 248behavior should do so in two steps: 249.Bl -bullet 250.It 251Define a variable named 252.Ev MODFOO_BUILD_TARGET 253that contains the commands necessary for 254.Cm do-build : 255.Bd -literal -offset indent 256MODFOO_BUILD_TARGET = cmd1; cmd2 257.Ed 258.It 259Override 260.Cm do-build 261only if it's not already defined by the port proper: 262.Bd -literal -offset indent 263\&.if !target(do-build) 264do-build: 265 @${MODFOO_BUILD_TARGET} 266\&.endif 267.Ed 268.El 269That way, if several modules require specific actions for those targets, 270the end user can choose the appropriate order in which to run the actions: 271.Bd -literal -offset indent 272do-build: 273 @${MODBAR_BUILD_TARGET} 274 @${MODFOO_BUILD_TARGET} 275 ... 276.Ed 277.Sh OVERRIDING VARIABLE BEHAVIOR 278Some variables can be overridden by modules. 279Be very cautious, as this can make the module difficult to use, 280or interact badly with other modules. 281As a rule, always provide the override as: 282.Pp 283.Dl VARIABLE ?= value 284.Pp 285and provide a module-specific variable with the same value: 286.Pp 287.Dl MODFOO_VARIABLE = value . 288.Pp 289The following variables can be overridden in a relatively safe fashion: 290.Ev ALL_TARGET , 291.Ev CONFIGURE_SCRIPT , 292.Ev DESTDIRNAME , 293.Ev DIST_SUBDIR , 294.Ev DISTNAME , 295.Ev DISTFILES , 296.Ev EXTRACT_SUFX , 297.Ev FAKE_FLAGS , 298.Ev FETCH_MANUALLY , 299.Ev HOMEPAGE , 300.Ev IGNORE , 301.Ev IS_INTERACTIVE , 302.Ev LIBTOOL_FLAGS , 303.Ev MAKE_FILE , 304.Ev MASTER_SITES , 305.Ev MULTI_PACKAGES , 306.Ev NO_BUILD , 307.Ev NO_TEST , 308.Ev PATCH_LIST , 309.Ev PKG_ARCH , 310.Ev PKGNAME* , 311.Ev PREFIX , 312.Ev TEST_TARGET , 313.Ev TEST_IS_INTERACTIVE , 314.Ev REORDER_DEPENDENCIES , 315.Ev SEPARATE_BUILD , 316.Ev USE_GMAKE , 317.Ev USE_LIBTOOL . 318.Pp 319The following variables can be added to in a relatively safe fashion: 320.Ev BUILD_DEPENDS , 321.Ev CATEGORIES , 322.Ev CONFIGURE_ARGS , 323.Ev CONFIGURE_ENV , 324.Ev ERRORS , 325.Ev FAKE_FLAGS , 326.Ev FLAVOR , 327.Ev FLAVORS , 328.Ev INSTALL_TARGET , 329.Ev LIB_DEPENDS , 330.Ev MAKE_ENV , 331.Ev MAKE_FLAGS , 332.Ev PKG_ARGS , 333.Ev PSEUDO_FLAVORS , 334.Ev TEST_DEPENDS , 335.Ev REORDER_DEPENDENCIES , 336.Ev RUN_DEPENDS , 337.Ev SUBST_VARS , 338.Ev WANTLIB . 339.Sh SPECIFIC MODULE INTERACTIONS 340Some modules correspond to extra ports that will be used mostly as 341.Ev BUILD_DEPENDS 342or 343.Ev RUN_DEPENDS . 344Such modules can safely append values directly to the 345.Ev BUILD_DEPENDS , 346.Ev RUN_DEPENDS , 347.Ev LIB_DEPENDS , 348and 349.Ev WANTLIB 350variables, as long as they also define module-specific variables for 351all runtime dependencies. 352.Pp 353Simple client ports will use the module directly, and thus inherit extra 354build and runtime dependencies. 355.Pp 356More sophisticated ports can use 357.Ev MULTI_PACKAGES 358to select specific behavior: build-time dependencies will always be 359needed. 360Runtime dependencies will be selected on a subpackage basis, 361since runtime dependencies such as 362.Ev LIB_DEPENDS-sub 363do not inherit the default 364.Ev LIB_DEPENDS 365value. 366The client port's author must only bear in mind that external modules 367may add values to the default 368.Ev WANTLIB , 369.Ev LIB_DEPENDS , 370and 371.Ev RUN_DEPENDS , 372and thus that it is not safe to inherit from it blindly. 373.Pp 374Modules are imported during 375.Pp 376.Dl .include <bsd.port.mk> 377.Pp 378Thus they can be affected by user choices such as setting a variable 379to Yes or No. 380Modules may make decisions based on documented 381.Ev MODFOO_BEHAVIOR 382values. 383.Pp 384When modules are processed, only a few 385.Xr bsd.port.mk 5 386variables are already defined. 387Modules may depend upon the following variables already having a sane 388value: 389.Ev DISTDIR , 390.Ev LOCALBASE , 391.Ev NO_DEPENDS , 392.Ev PKGPATH , 393.Ev PORTSDIR , 394.Ev X11BASE 395and all arch-dependent constants from 396.Xr bsd.port.arch.mk 5 , 397such as 398.Ev PROPERTIES 399or 400.Ev LP64_ARCHS . 401Note that this is only relevant for tests. 402It is perfectly okay to define variables or targets that depend on the 403basic ports framework without having to care whether that variable is 404already defined, since 405.Xr make 1 406performs lazy evaluation. 407.Sh CORE MODULES DOCUMENTATION 408The following modules are available. 409.Bl -tag -width do-configure 410.It apache-module 411.It cpan 412For perl ports coming from CPAN. 413Wrapper around the normal perl module that fetches the file from 414the correct location depending on 415.Ev DISTNAME , 416and sets a default 417.Ev PKGNAME . 418Also affects 419.Ev TEST_DEPENDS , 420.Ev CONFIGURE_STYLE , 421.Ev PKG_ARCH , 422and 423.Ev CATEGORIES . 424.Pp 425Some CPAN modules are only indexed by author, set 426.Li CPAN_AUTHOR=ID 427to locate the right directory. 428.Pp 429If no 430.Ev HOMEPAGE 431is defined, it will default to 432.Pa http://search.cpan.org/dist/${DISTNAME:C/-[^-]*$//}/ 433.Pp 434User settings: set 435.Ev CPAN_REPORT 436to Yes, 437.Ev CPAN_REPORT_DB 438to a valid directory, 439and 440.Ev CPAN_REPORT_FROM 441to a valid email address to automate the reporting 442of regression tests to CPAN. 443.Pp 444If 445.Ev MODCPAN_EXAMPLES 446is set, the following variables will be set. 447.Ev MODCPAN_EXAMPLES_DIST 448will hold the default directory in the distfile with 449example scripts. 450.Ev MODCPAN_EXAMPLES_DIR 451will be set to the standard installation directory for 452examples. 453Sets the 454.Cm post-install 455target if none has been defined to install the examples, 456otherwise 457.Ev MODCPAN_POST_INSTALL 458should be used as such: 459.Bd -literal 460post-install: 461 ... 462 ${MODCPAN_POST_INSTALL} 463.Ed 464.It databases/mariadb 465Adds small framework for testing ports that require running MariaDB. 466Defines 467.Ev MODMARIADB_TEST_TARGET 468which consists actual commands to run in 469.Cm do-test 470target. 471If this target isn't defined, it will be added automatically. 472.Pp 473The actual test command to be run could be specified in the 474.Ev MODMARIADB_TEST_CMD . 475Default is similar to what 476.Xr bsd.port.mk 5 477runs itself. 478.Pp 479The MariaDB server being started will listen on UNIX domain socket 480only, minimizing impact on running system. 481The path to socket is recorded in 482.Ev MODMARIADB_TEST_SOCKET . 483Any local user will be able to connect without password. 484.Pp 485If the 486.Ev MODMARIADB_TEST_DBNAME 487variable is set, the database with such name will be set up before 488running actual test command. 489Otherwise (default), the test is responsible to call 490.Xr mysqladmin 1 491itself, if needed. 492.Pp 493The 494.Pa databases/mariadb,-server 495will get added to 496.Ev TEST_DEPENDS , 497but not to any other 498.Ev *_DEPENDS . 499The 500.Ev MODMARIADB_CLIENT_ARGS 501and 502.Ev MODMARIADB_ADMIN_ARGS 503variables hold arguments for 504.Xr mysql 1 505and 506.Xr mysqladmin 1 , 507respectively; those argument lists could be used in test scripts 508for connecting to test server, if they aren't satisfied by environment. 509.It databases/postgresql 510Adds small framework for testing ports that require running Postgres. 511Defines 512.Ev MODPOSTGRESQL_TEST_TARGET 513which consists actual commands to run in 514.Cm do-test 515target. 516If this target isn't defined, it will be added automatically. 517.Pp 518The actual test command to be run could be specified in the 519.Ev MODPOSTGRESQL_TEST_CMD . 520Default is similar to what 521.Xr bsd.port.mk 5 522runs itself. 523.Pp 524The Postgres server being started will listen on UNIX domain socket 525only, minimizing impact on running system. 526The path to directory where socket will be created is set by 527.Ev MODPOSTGRESQL_TEST_PGHOST , 528defaulting to 529.Pa ${WRKDIR} . 530Any local user will be able to connect without password. 531.Pp 532If the 533.Ev MODPOSTGRESQL_TEST_DBNAME 534variable is set, the database with such name will be set up before 535running actual test command. 536Otherwise (default), the test is responsible to call 537.Xr initdb 1 538itself. 539.Pp 540The 541.Pa databases/postgresql,-server 542will get added to 543.Ev TEST_DEPENDS , 544but not to any other 545.Ev *_DEPENDS . 546.It devel/cmake 547Adds 548.Pa devel/cmake 549to 550.Ev BUILD_DEPENDS 551and fills up 552.Ev CONFIGURE_ARGS , 553.Ev CONFIGURE_ENV 554and 555.Ev MAKE_ENV . 556Sets up 557.Cm configure 558target. 559If 560.Ev CONFIGURE_STYLE 561was not set before, sets its value to `cmake'. 562Changes default value of 563.Ev SEPARATE_BUILD 564to `Yes' because modern CMake requires out-of-source build anyway. 565Changes 566.Ev TEST_TARGET 567to `test' as this is standard for CMake projects. 568Also this module has the following knobs: 569.Bl -tag -width Ds 570.It MODCMAKE_WANTCOLOR 571If set to `Yes', CMake will colorize its output. 572Should not be used in ports Makefiles. 573Default value is `No'. 574.It MODCMAKE_VERBOSE 575If set to `Yes', CMake will print details during configure and build 576stages about exact command being run, etc. 577Should not be used in ports Makefiles. 578Default value is `Yes'. 579.It MODCMAKE_DEBUG 580If set to `Yes', CMake will produce a debug build instead of a release 581build. 582The exact effects on the build process depend on settings specified in 583the CMake config files. 584Default value is `No'. 585.El 586Also, 587.Sq nojunk 588is added to DPB_PROPERTIES because CMake's include files parser cheats 589too much. 590.It devel/cargo 591Automates download and compilation of dependencies of a Rust project using 592.Xr cargo 1 . 593During 594.Cm fetch , 595static dependencies ("crates") listed in 596.Ev MODCARGO_CRATES 597are downloaded using 598.Ev MODCARGO_DIST_SUBDIR 599as 600.Ev DIST_SUBDIR . 601During 602.Cm post-extract , 603crates defined in 604.Ev MODCARGO_CRATES 605are moved to the 606.Ev MODCARGO_VENDOR_DIR 607directory. 608During 609.Cm post-patch , 610crate-metadata are generated using 611.Pa devel/cargo-generate-vendor . 612With 613.Ev CONFIGURE_STYLE 614set to 615.Sq cargo , 616cargo is configured to use 617.Ev MODCARGO_VENDOR_DIR 618instead of the standard crates-io network source. 619Finally, any crates listed in 620.Ev MODCARGO_CRATES_UPDATE 621are updated. 622.Ev MODCARGO_RUSTFLAGS 623can be used to pass custom flags to all 624.Xr rustc 1 625invocations. 626.Pp 627.Pa lang/rust , 628.Pa devel/cargo 629and 630.Pa devel/cargo-generate-vendor 631are added to 632.Ev BUILD_DEPENDS . 633By default 634.Ev MASTER_SITES9 635is used to download the crates. 636.Pp 637This module defines: 638.Bl -tag -width MODCARGO_CRATES_UPDATE 639.It MODCARGO_CARGOTOML 640Path to cargo manifest. 641Defaults to 642.Pa ${WRKSRC}/Cargo.toml . 643.It MODCARGO_CRATES 644Crates that will be downloaded by the module. 645.It MODCARGO_CRATES_UPDATE 646List of crates to update, overriding the version listed in Cargo.lock. 647.It MODCARGO_FEATURES 648List of features to be used when building. 649.It MODCARGO_VENDOR_DIR 650Name of the local directory for vendoring crates. 651Defaults to 652.Pa ${WRKSRC}/modcargo-crates . 653.El 654.Pp 655This module adds three 656.Xr make 1 657targets: 658.Bl -tag -width modcargo-gen-crates-licenses 659.It Cm modcargo-metadata 660Rerun the generation of crates' metadata. 661.It Cm modcargo-gen-crates 662Generate the 663.Ev MODCARGO_CRATES 664list from Cargo.lock (a preliminary crates list is not required). 665.It Cm modcargo-gen-crates-licenses 666Generate the 667.Ev MODCARGO_CRATES 668list with license information from crates present in the 669.Ev MODCARGO_VENDOR_DIR 670directory. 671.El 672.It devel/dconf 673Sets 674.Ev CONFIGURE_ARGS , 675.Ev BUILD_DEPENDS 676and 677.Ev RUN_DEPENDS . 678This module is used by ports installing gsettings schemas under 679.Pa ${PREFIX}/share/glib-2.0/schemas/ . 680It requires the following goo in the PLIST: 681.Bd -literal -offset indent 682@exec %D/bin/glib-compile-schemas %D/share/glib-2.0/schemas >/dev/null 683@unexec-delete %D/bin/glib-compile-schemas %D/share/glib-2.0/schemas >/dev/null 684.Ed 685.It devel/gconf2 686A link from 687.Xr gconftool-2 1 688to 689.Xr true 1 690will be put at the front of the 691.Ev PATH . 692Sets 693.Ev CONFIGURE_ARGS , 694.Ev BUILD_DEPENDS 695and 696.Ev RUN_DEPENDS . 697According to the values of 698.Ev MODGCONF2_LIBDEP , 699sets 700.Ev LIB_DEPENDS . 701User settings: set 702.Ev MODGCONF2_SCHEMAS_DIR 703to the directory name under 704.Pa ${LOCALBASE}/share/schemas/ 705where schemas files will be installed. 706.It devel/meson 707Adds 708.Pa devel/meson 709and 710.Pa devel/ninja 711to 712.Ev BUILD_DEPENDS . 713Sets up 714.Cm configure 715target. 716If 717.Ev CONFIGURE_STYLE 718was not set before, sets its value to `meson'. 719Changes default value of 720.Ev SEPARATE_BUILD 721to `Yes' because meson requires out-of-source build. 722If 723.Ev CONFIGURE_STYLE 724is 'meson', 725.Ev MODMESON_CONFIGURE_ARGS 726and 727.Ev MODMESON_CONFIGURE_ENV 728will add default values to 729.Ev CONFIGURE_ARGS 730and 731.Ev CONFIGURE_ENV . 732Also this module has the following knob: 733.Bl -tag -width Ds 734.It MODMESON_WANTCOLOR 735If set to `Yes', meson will colorize its output. 736Should not be used in ports Makefiles. 737Default value is `No'. 738.El 739.It devel/pmk 740Sets 741.Ev CONFIGURE_SCRIPT , 742.Ev CONFIGURE_ARGS 743and 744.Ev MODPMK_configure . 745It appends 746.Pa devel/pmk 747to 748.Ev BUILD_DEPENDS . 749.It devel/qmake 750This module automates usage of qmake, independently of the actual 751version of Qt being used. 752This module requires that one of the 753.Pa x11/qt3 , 754.Pa x11/qt4 755or 756.Pa x11/qt5 757to be used as well. 758.Pp 759If 760.Ev CONFIGURE_STYLE 761was not set before, sets its value to 762.Sq qmake . 763If 764.Ev CONFIGURE_STYLE 765contains 766.Sq qmake 767the module will define each of the 768.Ar do-build 769and 770.Ar do-install 771targets, unless port already defines one; also, 772.Ev SEPARATE_BUILD 773will be set to 774.Sq Yes 775unless it's already set to some value. 776Also, unless 777.Ev NO_TEST 778is set, the 779.Ar do-test 780target will be defined. 781.Pp 782The following variables could be used in qmake-based ports: 783.Bl -tag -width 1234 784.It Ev MODQMAKE_ARGS 785Additional arguments for qmake invocation. 786The module already defines some. 787.It Ev MODQMAKE_INSTALL_ROOT 788Root directory for fake install. 789Normally, it's a WRKINST, but some (broken) ports require another value, 790like PREFIX. 791.It Ev MODQMAKE_PROJECTS 792List of qmake project files to be used, relative to WRKSRC. 793Directories containing those projects could be used as well, 794see qmake documentation for details. 795Defaults to 796.Sq \&. , 797which means the (only) project in WRKSRC directory. 798.It Ev MODQMAKE_RECURSIVE 799If 800.Sq Yes , 801then qmake will be run recursively during configure stage; 802otherwise, only projects mentioned in 803.Ev MODQMAKE_PROJECTS 804will be processed during configure stage, and their descendants will 805be visited during main build phase. 806Sometimes a qmake project processing depends on files generated 807by other qmake project during build, and recursive builds break this. 808For Qt4+ defaults to 809.Sq Yes , 810and Qt3 doesn't support recursive configuring. 811.It Ev MODQMAKE_build 812Actual commands that module will use to build all 813.Ev MODQMAKE_PROJECTS 814provided. 815To be used in complicated cases, when port have to use its own 816.Ar do-build 817target or mix different 818.Ev CONFIGURE_STYLE 819values. 820.It Ev MODQMAKE_install 821Same as for 822.Ev MODQMAKE_build , 823but used in 824.Ar do-install 825stage. 826.El 827.It devel/scons 828Adds 829.Pa devel/scons 830to 831.Ev BUILD_DEPENDS . 832Sets 833.Ev MODSCONS_BIN 834and 835.Ev MODSCONS_ENV . 836Also defines an overridable 837.Ev MODSCONS_FLAGS . 838It provides a 839.Cm do-build 840and 841.Cm do-install 842targets that can be overridden in the port Makefile. 843.It font 844Used for ports which primarily install fonts. 845Affects 846.Ev PKG_ARCH 847and 848.Ev EXTRACT_SUFX . 849Appends to 850.Ev CATEGORIES . 851When 852.Ev TYPEFACE 853is set in combination with 854.Ev V 855or 856.Ev VERSION 857it sets 858.Ev PKGNAME . 859.Ev TYPEFACE 860should be set to the name of the typeface. 861This sets 862.Ev FONTDIR 863using said typeface name. 864.Ev FONTTYPES 865defaults to `ttf' but can be set to include the extenions of 866fonts which are to be installed. 867Also sets 868.Ev FONT_DISTDIR . 869A 870.Cm do-install 871target is provided if the port tself does not provide it. 872.It fortran 873Sets 874.Ev MODFORTRAN_LIB_DEPENDS , 875.Ev MODFORTRAN_WANTLIB , 876.Ev MODFORTRAN_BUILD_DEPENDS . 877Set 878.Ev MODFORTRAN_COMPILER 879to `gfortran', or `flang', depending on what the port requires. 880The default is `gfortran'. 881The dependencies are chosen according to 882.Ev MODFORTRAN_COMPILER . 883.It gcc4 884If 885.Ev COMPILER_VERSION 886is not gcc4 (defined by 887.Pa /usr/share/mk/bsd.own.mk ) , 888and architecture is in 889.Ev MODGCC4_ARCHS , 890then the gcc4 compilers will be put at the front of the path. 891By default, only C language support is included by this module. 892If other languages are needed, they must be listed in 893.Ev MODGCC4_LANGS 894(e.g. c++, fortran). 895The 896.Ev MODGCC4_VERSION 897variable can be used to change the version of gcc. 898By default gcc 4.9 is used. 899If 900.Ev MODGCC4_LANGS 901contains c++, this module provides 902.Ev MODGCC4_CPPLIBDEP 903and 904.Ev MODGCC4_CPPWANTLIB . 905.It gnu 906This module is documented in the main 907.Xr bsd.port.mk 5 908manpage. 909.It imake 910This module is documented in the main 911.Xr bsd.port.mk 5 912manpage. 913.It java 914Set 915.Li MODJAVA_VER=x.y 916to use exactly the JDK x.y, 917.Li MODJAVA_VER=x.y+ 918to use any x.y or higher version. 919Set 920.Li MODJAVA_JRERUN=Yes 921if the port only needs the JRE at runtime. 922The module sets 923.Ev JAVA_HOME , 924.Ev ONLY_FOR_ARCHS , 925.Ev MODJAVA_RUN_DEPENDS , 926.Ev MODJAVA_SHARE_DIR , 927.Ev MODJAVA_JAR_DIR , 928.Ev MODJAVA_EXAMPLE_DIR 929and 930.Ev MODJAVA_DOC_DIR . 931It appends to 932.Ev BUILD_DEPENDS , 933.Ev RUN_DEPENDS , 934.Ev CATEGORIES 935and 936.Ev SUBST_VARS . 937If 938.Li MODJAVA_BUILD=ant 939then this module provides 940.Ev MODJAVA_BUILD_DIR , 941.Ev MODJAVA_BUILD_FILE 942and 943.Ev MODJAVA_BUILD_TARGET_NAME , 944as well as a 945.Cm do-build 946target (if not already defined). 947It heeds 948.Ev NO_BUILD . 949.It lang/clang 950Similar to gcc3 and gcc4 modules. 951If architecture is in MODCLANG_ARCHS, the CLang compilers will be 952put at the front of the path. 953By default, only C language support is included by this module. 954If other languages are needed, they must be listed in 955.Ev MODCLANG_LANGS 956(e.g. c++). 957Sets 958.Ev MODCLANG_VERSION 959which is also appended to 960.Ev SUBST_VARS . 961.It lang/erlang 962.It lang/ghc 963Sets 964.Ev ONLY_FOR_ARCHS , 965.Ev MODGHC_VER , 966.Ev BUILD_DEPENDS , 967and 968.Ev RUN_DEPENDS . 969Build and further actions are based on the list of values in 970.Ev MODGHC_BUILD : 971.Bl -tag -width register 972.It Ar nort 973no runtime dependency on 974.Pa lang/ghc 975nor the hs- prefix to 976.Ev PKGNAME 977will be added, 978.It Ar cabal 979get the typical Cabal targets defined, 980.It Ar haddock 981generate API documentation using 982.Pa devel/haddock , 983.It Ar register 984create and include register/unregister scripts, 985.It Ar hackage 986the distfiles are available on Hackage. 987.El 988.Pp 989Also affects 990.Ev CATEGORIES , 991.Ev CONFIGURE_STYLE 992and 993.Ev SUBST_VARS . 994.Cm do-build , 995.Cm do-install 996and 997.Cm do-test 998targets are provided if the port itself didn't set them. 999If 1000.Ar register 1001has been set, the PLIST needs to be modified in order to 1002add the relevant @exec/@unexec lines. 1003This module will run the Setup script and ensure the documentation 1004will be built (if 1005.Ar haddock 1006has been set), and that the package is 1007registered as a library usable by 1008.Pa lang/ghc 1009(if 1010.Ar register 1011has been set). 1012Extra arguments and environment additions for the Setup configure 1013command can be specified with 1014.Ev MODGHC_SETUP_CONF_ARGS 1015and 1016.Ev MODGHC_SETUP_CONF_ENV . 1017.It lang/go 1018Adds Go toolchain support. 1019Requires 1020.Ev ALL_TARGET 1021to be set to canonical Go import path of port. 1022(Module sets it automatically for ports that use 1023.Ev GH_ACCOUNT 1024and 1025.Ev GH_PROJECT 1026macros.) 1027.Pp 1028During execution of 1029.Cm pre-configure 1030target module moves source code from 1031.Pa ${MODGO_SUBDIR} 1032to 1033.Pa ${WRKSRC} , 1034subdirectory of 1035.Pa ${MODGO_WORKSPACE} 1036- specially-crafted Go workspace located at 1037.Pa ${WRKDIR}/go . 1038During 1039.Cm do-build 1040module calls 1041.Dq go install 1042with 1043.Ev GOPATH 1044set to 1045.Pa ${MODGO_WORKSPACE} , 1046runs its output through sed to prevent writes outside 1047.Ev WRKDIR 1048sandbox and sends output to 1049.Xr sh 1 . 1050During 1051.Cm do-install 1052it copies executables from 1053.Pa ${MODGO_WORKSPACE}/bin 1054to 1055.Pa ${PREFIX}/bin , 1056and/or directories 1057.Pa ${MODGO_WORKSPACE}/pkg 1058and 1059.Pa ${MODGO_WORKSPACE}/src 1060to 1061.Pa ${PREFIX}/go , 1062depending on 1063.Ev MODGO_TYPE 1064contents. 1065.Pp 1066Sets 1067.Ev BUILD_DEPENDS , 1068.Ev RUN_DEPENDS , 1069.Ev ALL_TARGET , 1070.Ev TEST_TARGET , 1071.Ev ONLY_FOR_ARCHS , 1072.Ev SEPARATE_BUILD , 1073and 1074.Ev WRKSRC . 1075.Pp 1076Appends to 1077.Ev CATEGORIES . 1078.Pp 1079Defines: 1080.Bl -tag -width MODGO_WORKSPACE 1081.It Ev MODGO_TYPE 1082Type of port. 1083May be any combination of: 1084.Bl -tag -width lib 1085.It bin 1086ordinary binary, which should be installed to 1087.Pa ${PREFIX}/bin , 1088.It lib 1089library, which should come with source code. 1090.El 1091.Pp 1092Defaults to 1093.Ar bin . 1094.It Ev MODGO_WORKSPACE 1095Path to Go workspace set up for port build process. 1096Defaults to 1097.Pa ${WRKDIR}/go . 1098See Go documentation for details. 1099.It Ev MODGO_SUBDIR 1100Path to Go source code within port's sources tarball. 1101Defaults to 1102.Pa ${WRKDIST} . 1103.It Ev MODGO_SETUP_WORKSPACE 1104Commands setting up Go workspace for building ports. 1105By default, happens during execution of 1106.Cm pre-configure 1107target. 1108.It Ev MODGO_BUILDDEP 1109Controls whether contents of 1110.Ev MODGO_BUILD_DEPENDS 1111are appended to port's 1112.Ev BUILD_DEPENDS . 1113Defaults to 1114.Ar Yes . 1115.It Ev MODGO_MODNAME 1116is the module name as defined in the 1117.Pa go.mod 1118file contained in a project. 1119If this is set, 1120.Ev MODGO_MODULES , 1121.Ev MODGO_MODFILES 1122and 1123.Ev MODGO_VERSION 1124need to be defined as well. 1125Setting this will also set 1126.Ev ALL_TARGET . 1127When 1128.Ev MODGO_MODFILES 1129is set, and a "cmd" directory is found in 1130.Ev WRKSRC , 1131"cmd/..." is appended to 1132.Ev ALL_TARGET 1133in 1134.Cm do-build 1135automatically. 1136.It Ev MODGO_VERSION 1137Sets the specific version of a Go module to use. 1138For example: v0.1.3. 1139.It Ev MODGO_MODULES 1140List of modules and their specific versions that an application depends on. 1141.It Ev MODGO_MODFILES 1142List of go.mod files and their versions that are required for dependency 1143resolution. 1144These are required by Go to determine the full dependency graph. 1145.El 1146.Pp 1147Additionally defines 1148.Ev MODGO_PACKAGES , 1149.Ev MODGO_SOURCES 1150and 1151.Ev MODGO_TOOLS 1152(paths for installed Go packages, sources and tools respectively), 1153.Ev MODGO_CMD 1154and 1155.Ev MODGO_FLAGS 1156(source code build command and flags passed as its arguments), 1157.Ev MODGO_LDFLAGS , 1158.Ev MODGO_BUILD_CMD 1159and 1160.Ev MODGO_TEST_CMD 1161(commands for building and testing go packages; normally called with canonical 1162Go package names as arguments), 1163.Ev MODGO_{BUILD,INSTALL,TEST}_TARGET 1164and 1165.Ev MODGO_{BUILD,RUN}_DEPENDS . 1166.Pp 1167This module adds one 1168.Xr make 1 1169target: 1170.Bl -tag -width modgo-gen-modules 1171.It Cm modgo-gen-modules 1172Generate the 1173.Ev MODGO_MODULES 1174and the 1175.Ev MODGO_MODFILES 1176lists. 1177.El 1178.It lang/lua 1179Sets 1180.Ev MODLUA_BIN , 1181.Ev MODLUA_DATADIR , 1182.Ev MODLUA_DEP , 1183.Ev MODLUA_DEP_VERSION , 1184.Ev MODLUA_DOCDIR , 1185.Ev MODLUA_EXAMPLEDIR , 1186.Ev MODLUA_INCL_DIR , 1187.Ev MODLUA_LIB , 1188.Ev MODLUA_LIBDIR , 1189.Ev MODLUA_VERSION , 1190.Ev MODLUA_WANTLIB . 1191Appends to 1192.Ev CATEGORIES . 1193Also appends to 1194.Ev BUILD_DEPENDS , 1195unless 1196.Ev NO_BUILD 1197has been set to Yes. 1198Also appends to 1199.Ev RUN_DEPENDS , 1200unless 1201.Ev MODLUA_RUNDEP 1202is set to No. 1203Appends 1204.Ev MODLUA_VERSION , 1205.Ev MODLUA_LIB , 1206.Ev MODLUA_INCL_DIR , 1207.Ev MODLUA_EXAMPLEDIR , 1208.Ev MODLUA_DOCDIR , 1209.Ev MODLUA_LIBDIR , 1210.Ev MODLUA_DATADIR , 1211.Ev MODLUA_DEP , 1212.Ev MODLUA_DEP_VERSION , 1213.Ev MODLUA_BIN 1214to 1215.Ev SUBST_VARS . 1216.Ev MODLUA_DEFAULT_VERSION 1217is set to 5.1. 1218.Ev MODLUA_VERSION is set to 1219.Ev MODLUA_DEFAULT_VERSION 1220by default. 1221Ports can be built with several lua versions. 1222If no FLAVOR is set it defaults to MODLUA_DEFAULT_VERSION. 1223Otherwise the FULLPKGNAME is adjusted, if MODLUA_SA is not set. 1224In order to set a build, run or test dependency on a lua port, 1225use the following, which will propagate the currently used flavor: 1226.Ev MODLUA_BUILD_DEPENDS , 1227.Ev MODLUA_TEST_DEPENDS , 1228.Ev MODLUA_RUN_DEPENDS . 1229.It lang/mono 1230Sets 1231.Ev MODMONO_ONLY_FOR_ARCHS , 1232.Ev CONFIGURE_ENV , 1233.Ev MAKE_FLAGS , 1234.Ev MODMONO_BUILD_DEPENDS 1235and 1236.Ev MODMONO_RUN_DEPENDS . 1237If 1238.Ev MODMONO_DEPS 1239is set to Yes, 1240.Pa lang/mono 1241is appended to 1242.Ev BUILD_DEPENDS 1243and 1244.Ev RUN_DEPENDS . 1245.Ev DLLMAP_FILES 1246defines in which files the module will substitute hardcoded 1247shared library versions using a 1248.Cm post-configure 1249target. 1250.It lang/node 1251Adds common dependencies to 1252.Ev RUN_DEPENDS 1253and 1254.Ev BUILD_DEPENDS . 1255Recognizes two additional types of 1256.Ev CONFIGURE_STYLE Ns s , 1257"npm" and "npm ext". 1258"npm ext" should be used for npm packages that contain C++ extensions which 1259need to be compiled. 1260"npm" should be used for other npm packages. 1261If regression tests are included that can be run using 1262.Pa devel/node-expresso , 1263append "expresso" to 1264.Ev CONFIGURE_STYLE . 1265.Pa devel/node-expresso 1266will be appended to 1267.Ev TEST_DEPENDS 1268and a default 1269.Ev MODNODE_TEST_TARGET 1270will be defined, along with a 1271.Cm do-test 1272target if it has not already been set. 1273If "expresso" isn't appended to 1274.Ev CONFIGURE_STYLE , 1275.Ev TEST_TARGET 1276will be set to "test". 1277One of these two 1278.Ev CONFIGURE_STYLE Ns s 1279should be used or the module doesn't affect anything except 1280.Ev RUN_DEPENDS 1281and 1282.Ev BUILD_DEPENDS . 1283Requires 1284.Ev NPM_NAME 1285to be set to the name of the npm package. 1286Uses 1287.Ev NPM_NAME 1288and 1289.Ev NPM_VERSION 1290to set 1291.Ev DISTNAME , 1292and 1293.Ev PKGNAME , 1294and 1295.Ev MASTER_SITES . 1296If the npm package depends on other npm packages, the npm package names it 1297depends on should be listed in 1298.Ev MODNODE_DEPENDS . 1299Adds default 1300.Cm do_build 1301and 1302.Cm do_install 1303tasks, and you can reference the default implementations via 1304.Ev MODNODE_BUILD_TARGET 1305and 1306.Ev MODNODE_INSTALL_TARGET . 1307.It lang/ocaml 1308Appends to 1309.Ev BUILD_DEPENDS 1310and 1311.Ev MAKE_ENV . 1312This selects a %%native%% plist fragment and 1313.Ev ocaml_native 1314property depending on whether the architecture supports native 1315compilation. 1316If dynamic linking is supported on the native architecture, 1317the %%dynlink%% plist fragment and 1318.Ev ocaml_native_dynlink 1319property is set. 1320When 1321.Ev CONFIGURE_STYLE 1322is set to `oasis', 1323overrides for the 1324.Cm do-build , 1325.Cm do-install , 1326and 1327.Cm do-test 1328targets are added. 1329.It lang/php 1330Used for ports using PHP in some way: 1331either extensions to PHP, or software written in PHP. 1332Sets 1333.Ev MODPHP_RUN_DEPENDS , 1334.Ev MODPHP_LIB_DEPENDS , 1335.Ev MODPHP_WANTLIB , 1336.Ev MODPHP_BIN , 1337.Ev MODPHP_PHPIZE , 1338.Ev MODPHP_PHP_CONFIG , 1339.Ev MODPHP_INCDIR 1340and 1341.Ev MODPHP_LIBDIR . 1342Adds to 1343.Ev RUN_DEPENDS 1344and 1345.Ev BUILD_DEPENDS 1346unless 1347.Ev MODPHP_RUNDEP 1348or 1349.Ev MODPHP_BUILDDEP 1350are set. 1351If 1352.Ev MODPHP_DO_PHPIZE 1353is set, prepares a build environment for extensions that use phpize. 1354.Pp 1355Ports using PDO for database connectivity often have a choice of 1356dependencies (pdo_sqlite, pdo_mysql, pdo_pgsql and others). 1357The module constructs 1358.Ev MODPHP_PDO_DEPENDS 1359from the PDO types listed in 1360.Ev MODPHP_PDO_ALLOWED 1361(defaulting to "sqlite mysql pgsql"). 1362This can be added to 1363.Ev RUN_DEPENDS 1364and allows any of these PDO packages to satisfy the dependency, with 1365.Ev MODPHP_PDO_PREF 1366(sqlite by default) chosen if none are installed. 1367.It lang/php/pecl 1368Used for ports for PHP PECL extensions. 1369Sets default 1370.Ev MASTER_SITES , 1371.Ev HOMEPAGE , 1372.Ev EXTRACT_SUFX , 1373.Ev DESTDIRNAME , 1374.Ev MODPHP_DO_SAMPLE , 1375.Ev MODPHP_DO_PHPIZE , 1376.Ev AUTOCONF_VERSION , 1377.Ev AUTOMAKE_VERSION , 1378.Ev LIBTOOL_FLAGS . 1379Provides a default 1380.Ev TEST_TARGET 1381and 1382.Ev TEST_FLAGS 1383unless 1384.Ev NO_TEST 1385or a 1386.Cm do-test 1387target is defined. 1388Adds common dependencies to 1389.Ev RUN_DEPENDS 1390and 1391.Ev BUILD_DEPENDS . 1392Sets a default 1393.Ev PKGNAME 1394and appends to 1395.Ev CATEGORIES . 1396.It lang/python 1397Sets 1398.Ev MODPY_VERSION , 1399.Ev MODPY_BIN , 1400.Ev MODPY_INCDIR , 1401.Ev MODPY_LIBDIR , 1402.Ev MODPY_SITEPKG , 1403.Ev MODPY_SETUP , 1404.Ev MODPY_TEST_DIR , 1405.Ev MODPY_TEST_LOCALE , 1406.Ev MODPY_WANTLIB , 1407.Ev MODPY_LIB_DEPENDS , 1408.Ev MODPY_RUN_DEPENDS , 1409.Ev MODPY_TEST_DEPENDS , 1410.Ev MODPY_BUILD_DEPENDS , 1411and 1412.Ev MODPY_ADJ_FILES . 1413Appends to 1414.Ev RUN_DEPENDS 1415unless 1416.Ev MODPY_RUNDEP 1417is set to No. 1418Appends to 1419.Ev BUILD_DEPENDS 1420unless 1421.Ev MODPY_BUILDDEP 1422is set to No or 1423.Ev NO_BUILD 1424is set to Yes. 1425Appends to 1426.Ev TEST_DEPENDS 1427if 1428.Ev MODPY_PYTEST 1429is set to Yes 1430unless 1431.Ev MODPY_TESTDEP 1432is set to No. 1433Appends 1434.Ev MODPY_TEST_LOCALE 1435to 1436.Ev TEST_ENV . 1437Changes to the directory specified in 1438.Ev MODPY_TEST_DIR , 1439by default WRKSRC, before running tests. 1440.Ev MODPY_VERSION 1441is the default version used by all python modules. 1442Ports which use the setuptools module should set 1443.Ev MODPY_SETUPTOOLS 1444to Yes. 1445Ports which use the pytest module should set 1446.Ev MODPY_PYTEST 1447to Yes. 1448Arguments can be passed to pytest during 1449.Cm test 1450with 1451.Ev MODPY_PYTEST_ARGS . 1452All ports that generate egg-info files should set 1453.Ev MODPY_EGG_VERSION 1454to the version string used by the 1455.Fn setup 1456function in the port's 1457.Pa setup.py . 1458Arguments can be passed to setup.py during 1459.Cm configure 1460with 1461.Ev MODPY_SETUP_ARGS . 1462Extra arguments to the build and install commands can be passed via 1463.Ev MODPY_DISTUTILS_BUILDARGS 1464and 1465.Ev MODPY_DISTUTILS_INSTALLARGS . 1466If any files have a python shebang line which needs to be replaced 1467using MODPY_BIN, list them in 1468.Ev MODPY_ADJ_FILES . 1469These are prefixed with WRKSRC and replaced automatically 1470at the end of 1471.Cm pre-configure . 1472Also affects 1473.Ev CATEGORIES , 1474.Ev MAKE_ENV , 1475.Ev CONFIGURE_ENV , 1476and 1477.Ev SUBST_VARS . 1478May affect the 1479.Cm test 1480target. 1481If 1482.Ev MODPY_PI 1483is set to Yes it will set 1484.Ev HOMEPAGE 1485and 1486.Ev MASTER_SITES . 1487The subdirectory can be overridden with 1488.Ev MODPY_PI_DIR . 1489.Pp 1490Python 2.x places .pyc files in the same directory as the associated .py file. 1491Python 3.x places these in a separate __pycache__ directory and uses an 1492additional suffix. 1493In some cases, an ABI tag is also used for names of compiled extensions. 1494The python module defines variables to allow a single PLIST to be 1495used for both versions. 1496Generate or update the PLIST using the python3 1497.Ev FLAVOR , 1498then edit it to prefix any lines creating 1499.Ev MODPY_PYCACHE 1500directories with 1501.Ev MODPY_COMMENT . 1502As python2 and python3 packages should permit being installed together, 1503it may be necessary to suffix names of common binaries or directories, 1504or split common files into a subpackage. 1505If updating the PLIST without using the python3 flavor, 1506take care not to remove ${MODPY_PYCACHE}, ${MODPY_PYC_MAGIC_TAG}, or 1507${MODPY_ABI_TAG} variables from the PLIST. 1508.It lang/ruby 1509See 1510.Xr ruby-module 5 . 1511.It lang/tcl 1512Sets 1513.Ev MODTCL_VERSION , 1514.Ev MODTCL_BIN , 1515.Ev MODTCL_INCDIR , 1516.Ev MODTCL_LIBDIR , 1517.Ev MODTCL_BUILD_DEPENDS , 1518.Ev MODTCL_RUN_DEPENDS , 1519.Ev MODTCL_LIB , 1520.Ev MODTCL_LIB_DEPENDS , 1521and 1522.Ev MODTCL_CONFIG . 1523.Ev MODTCL_VERSION 1524is the default version used by all Tcl ports and may be overridden. 1525Provides 1526.Ev MODTCL_TCLSH_ADJ 1527and 1528.Ev MODTCL_WISH_ADJ 1529shell fragments to patch the interpreter path in executable scripts. 1530Also affects 1531.Ev CATEGORIES 1532and 1533.Ev SUBST_VARS . 1534.It perl 1535This module is documented in the main 1536.Xr bsd.port.mk 5 1537manpage. 1538.It security/heimdal 1539A link from ${LOCALBASE}/heimdal/bin/krb5-config 1540to 1541.Xr krb5-config 1 1542will be put at the front of the path. 1543Sets 1544.Ev LIB_DEPENDS 1545and 1546.Ev WANTLIB 1547according to the values of 1548.Ev MODHEIMDAL_LIB_DEPENDS , 1549and 1550.Ev MODHEIMDAL_WANTLIB . 1551.It textproc/intltool 1552Sets 1553.Ev MODINTLTOOL_OVERRIDE . 1554.Pa textproc/intltool 1555is added to 1556.Ev BUILD_DEPENDS . 1557.Ev MODINTLTOOL_OVERRIDE 1558changes the paths of 1559.Ev INTLTOOL_EXTRACT , 1560.Ev INTLTOOL_MERGE 1561and 1562.Ev INTLTOOL_UPDATE 1563to use the installed versions of intltool-extract, 1564intltool-merge and intltool-update, instead of the version's packages into the 1565distfile of the port using this module. 1566Also affects 1567.Ev CONFIGURE_ENV , 1568.Ev MAKE_ENV 1569and 1570.Ev MAKE_FLAGS 1571by appending 1572.Ev MODINTLTOOL_OVERRIDE 1573to them. 1574.It www/drupal7 1575Can be used to install plugins (default), themes if 1576.Ev MODDRUPAL_THEME 1577is yes, or languages packs if 1578.Ev DRUPAL_LANG 1579is set to the desired language. 1580.Pp 1581The module may set or add to default values for 1582.Ev HOMEPAGE , 1583.Ev MASTER_SITES , 1584.Ev PREFIX , 1585.Ev DISTNAME , 1586.Ev DIST_SUBDIR , 1587.Ev CATEGORIES , 1588.Ev PKGNAME , 1589.Ev PKG_ARCH , 1590.Ev WRKDIST , 1591.Ev RUN_DEPENDS . 1592Drupal modules normally don't have any build part, just an installation part 1593that defaults to copying the plugin/theme/language files into the right 1594location through 1595.Ev MODDRUPAL_INSTALL . 1596.Pp 1597The module sets 1598.Ev DRUPAL 1599to drupal7, 1600.Ev DRUPAL_ROOT 1601to htdocs/${DRUPAL} 1602.Ev DRUPAL_MODS 1603to ${DRUPAL_ROOT}/site/all/modules 1604.Ev DRUPAL_THEMES 1605to ${DRUPAL_ROOT}/site/all/themes 1606and 1607.Ev DRUPAL_TRANSLATIONS 1608to ${DRUPAL_ROOT}/profiles/standard/translations. 1609So, by default, modules and themes are installed for all sites, 1610and translations are activated at install. 1611.Pp 1612.Ev DRUPAL_OWNER , DRUPAL_GROUP 1613are set to root, daemon, since drupal doesn't need to write 1614to any file except the files/ directory and the site settings (those 1615belong to www instead). 1616.Pp 1617Most modules are actually separate projects on the drupal site. 1618If 1619.Ev MODDRUPAL_PROJECT 1620is set, 1621.Ev HOMEPAGE 1622will lead to the corresponding project. 1623If 1624.Ev MODDRUPAL_VERSION 1625is also set, 1626.Ev DISTNAME 1627will default to 1628.Pa ${MODDRUPAL_PROJECT}-7.x-${MODDRUPAL_VERSION} , 1629MODDRUPAL_PKGNAME 1630will default to 1631.Pa ${MODDRUPAL_PROJECT} 1632and 1633.Ev PKGNAME 1634will default to 1635.Pa drupal7-${MODDRUPAL_PKGNAME}-${MODDRUPAL_VERSION} . 1636.Pp 1637Translations are handled by setting 1638.Ev DRUPAL_LANG 1639to the language letter code, and by setting 1640.Ev LANGFILES 1641to a list of module names/version pairs. 1642.Pp 1643With drupal7, all translations have been put in separate .po files. 1644It has been deemed simplest to pack all translations for a given language 1645into a single package, since translations for non installed modules won't 1646affect anything. 1647.It www/mozilla 1648Sets 1649.Ev PKGNAME , 1650.Ev HOMEPAGE , 1651.Ev MASTER_SITES , 1652.Ev DISTNAME , 1653.Ev USE_GMAKE , 1654and 1655.Ev ONLY_FOR_ARCHS . 1656.Ev EXTRACT_SUFX 1657defaults to .tar.bz2. 1658.Pp 1659Adds common dependencies to 1660.Ev LIB_DEPENDS , 1661.Ev WANTLIB , 1662.Ev RUN_DEPENDS 1663and 1664.Ev BUILD_DEPENDS . 1665Sets common 1666.Ev CONFIGURE_ARGS , 1667.Ev MAKE_ENV 1668and 1669.Ev CONFIGURE_ENV . 1670Sets 1671.Ev MOB 1672variable as source directory 1673and 1674.Ev MOZ 1675as target directory within 1676.Cm do-install . 1677.Pp 1678Individual port Makefile must set 1679.Ev MOZILLA_PROJECT , 1680.Ev MOZILLA_CODENAME , 1681.Ev MOZILLA_VERSION , 1682.Ev MOZILLA_BRANCH , 1683.Ev MOZILLA_LIBS 1684and 1685.Ev MOZILLA_DATADIRS 1686variables. 1687Port can also append values to 1688.Ev MOZILLA_SUBST_FILES 1689which contains the list of 1690files to run 1691.Ev SUBST_CMD 1692on during 1693.Cm pre-configure , 1694and 1695.Ev MOZILLA_AUTOCONF_DIRS 1696which 1697contains the list of dirs where 1698.Ev AUTOCONF 1699will be run during 1700.Cm pre-configure . 1701.It www/pear 1702Used for PHP PEAR ports. 1703Sets default 1704.Ev MASTER_SITES , 1705.Ev EXTRACT_SUFX , 1706.Ev PKGNAME . 1707Sets 1708.Ev PREFIX 1709to 1710.Pa /var/www . 1711Sets 1712.Ev NO_TEST 1713unless a 1714.Cm do-test 1715target is defined. 1716Adds common dependencies to 1717.Ev RUN_DEPENDS 1718and 1719.Ev BUILD_DEPENDS , 1720sets 1721.Ev MAKE_FILE 1722and 1723.Ev FAKE_FLAGS 1724appropriately. 1725Makes 1726.Ev PEAR_LIBDIR 1727and 1728.Ev PEAR_PHPBIN 1729available for use in the port. 1730Sets a default 1731.Ev PKGNAME 1732and appends to 1733.Ev CATEGORIES . 1734.It www/plone 1735Sets 1736.Ev MODPLONE_VERSION 1737and 1738.Ev MODZOPE_VERSION . 1739.Ev MODPLONE_VERSION 1740is the default version used by all Plone ports and may be overridden. 1741It appends 1742.Pa www/plone 1743to 1744.Ev RUN_DEPENDS 1745and also sets 1746.Ev NO_TEST 1747to Yes. 1748.It x11/gnome 1749This module has full support for the 1750.Ar gnu , 1751.Ar simple 1752and 1753.Ar cmake 1754CONFIGURE_STYLE. 1755.Pp 1756If both 1757.Ev GNOME_PROJECT 1758and 1759.Ev GNOME_VERSION 1760are set, this module defines 1761.Ev DISTNAME , 1762.Ev VERSION , 1763.Ev MASTER_SITES , 1764adds x11/gnome to 1765.Ev CATEGORIES 1766and 1767.Ev EXTRACT_SUFX 1768will default to .tar.xz if unset. 1769Unless 1770.Li NO_BUILD=Yes , 1771.Pa textproc/intltool 1772is also appended to 1773.Ev MODULES 1774and when CONFIGURE_STYLE is set to 1775.Ar gnu 1776or 1777.Ar simple , 1778.Ev USE_GMAKE 1779is set to "Yes". 1780.Pp 1781When CONFIGURE_STYLE is set to 1782.Ar gnu 1783or 1784.Ar simple , 1785if none of 1786.Ev AUTOCONF_VERSION 1787nor 1788.Ev AUTOMAKE_VERSION 1789are defined, then "--disable-maintainer-mode" is appended to 1790.Ev CONFIGURE_ARGS . 1791When CONFIGURE_STYLE is set to 1792.Ar cmake , 1793"-DENABLE_MAINTAINER_MODE=OFF" and -DSYSCONF_INSTALL_DIR=${SYSCONFDIR} 1794are appended to CONFIGURE_ARGS. 1795.Pp 1796MODGNOME_CPPFLAGS and MODGNOME_LDFLAGS can be used to add compiler and linker 1797flags. 1798.Li CPPFLAGS="-I${LOCALBASE}/include" 1799and 1800.Li LDFLAGS="-L${LOCALBASE}/lib" 1801are always appended to 1802.Ev CONFIGURE_ENV . 1803.Pp 1804Certain build/run dependencies and configure arguments and environment 1805can be set by appending desktop-file-utils, docbook, gobject-introspection, 1806gtk-update-icon-cache, shared-mime-info, vala and/or yelp to 1807.Ev MODGNOME_TOOLS . 1808They are disabled otherwise. 1809If 1810.Ev MODGNOME_TOOLS 1811is set to desktop-file-utils, 1812a dependency on 1813.Pa devel/desktop-file-utils 1814is appended to 1815.Ev MODGNOME_RUN_DEPENDS 1816and a link to /usr/bin/true is created under 1817.Pa ${WRKDIR}/bin/desktop-file-validate . 1818If 1819.Ev MODGNOME_TOOLS 1820is set to docbook, 1821.Pa textproc/docbook-xsl 1822is appended to 1823.Ev MODGNOME_BUILD_DEPENDS . 1824This option is used when the generation of the man pages included in the 1825source tarball requires docbook XML/SGML/XSL definitions and stylesheets. 1826If 1827.Ev MODGNOME_TOOLS 1828is set to gtk-update-icon-cache, a dependency on 1829.Pa x11/gtk+3,-guic 1830is appended to 1831.Ev MODGNOME_RUN_DEPENDS . 1832If 1833.Ev MODGNOME_TOOLS 1834is set to shared-mime-info, a dependency on 1835.Pa misc/shared-mime-info 1836is appended to 1837.Ev MODGNOME_RUN_DEPENDS 1838and a link to /usr/bin/true is created under 1839.Pa ${WRKDIR}/bin/update-mime-database . 1840If 1841.Ev MODGNOME_TOOLS 1842is set to yelp, 1843.Pa textproc/itstool 1844and 1845.Pa x11/gnome/doc-utils 1846are appended to 1847.Ev MODGNOME_BUILD_DEPENDS . 1848Furthermore, 1849.Pa x11/gnome/yelp 1850is appended to 1851.Ev MODGNOME_RUN_DEPENDS 1852if 1853.Ev MODGNOME_TOOLS 1854also contains "desktop-file-utils" 1855This option is to be used when any files are installed into 1856.Pa share/gnome/help/ 1857or page files are installed into 1858.Pa share/help/ . 1859.Ev MODGNOME_BUILD_DEPENDS 1860and 1861.Ev MODGNOME_RUN_DEPENDS 1862are appended to the 1863corresponding 1864.Ev BUILD_DEPENDS 1865and 1866.Ev RUN_DEPENDS . 1867.Pp 1868Some tools require the following goo in the PLIST: 1869.Pp 1870.Ar desktop-file-utils 1871.Bd -literal -offset indent 1872@exec %D/bin/update-desktop-database 1873@unexec-delete %D/bin/update-desktop-database 1874.Ed 1875.Pp 1876.Ar gtk-update-icon-cache 1877($icon-theme is the theme directory) 1878.Bd -literal -offset indent 1879@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/$icon-theme 1880@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/$icon-theme 1881.Ed 1882.Pp 1883.Ar shared-mime-info 1884.Bd -literal -offset indent 1885@exec %D/bin/update-mime-database %D/share/mime 1886@unexec-delete %D/bin/update-mime-database %D/share/mime 1887.Ed 1888.It x11/gnustep 1889.It x11/kde 1890Used for building KDE3-enabled ports. 1891Main variables there is 1892.Ev MODKDE_VERSION , 1893which defines what patches and tweaks should be applied, 1894depending of exact KDE version the ported software is build 1895against of. 1896.It x11/qt3, x11/qt4 and x11/qt5 1897All qt* modules share a common 1898.Ev MODQT_* 1899namespace for simple ports. 1900The qt3 module also defines the same variables under 1901.Ev MODQT3_* , 1902the qt4 module also defines the same variables under 1903.Ev MODQT4_* 1904and the qt5 module also defines the same variables under 1905.Ev MODQT5_* , 1906to allow ports to use both modules, such as 1907.Pa print/poppler . 1908.Pp 1909Those modules define 1910.Ev MODQT*_LIBDIR 1911as the libraries location, 1912.Ev MODQT*_INCDIR 1913as the include files location, 1914.Ev MODQT*_QTDIR 1915as the global qt directory location, 1916.Ev MODQT*_CONFIGURE_ARGS 1917as standard GNU configure-style parameters to locate the include and libraries. 1918.Pp 1919The location of Qt-specific tools 1920.Nm lrelease , 1921.Nm moc , 1922.Nm qmake 1923and 1924.Nm uic 1925is available through 1926.Ev MODQT*_LRELEASE , 1927.Ev MODQT*_MOC , 1928.Ev MODQT*_QMAKE 1929and 1930.Ev MODQT*_UIC . 1931.Ev MODQT*_OVERRIDE_UIC 1932controls whether the default setup will force a value of 1933.Ev UIC 1934or not. 1935The value of 1936.Ev MOC 1937is always forced to ${MODQT*_MOC}. 1938.Pp 1939In most cases the 1940.Pa devel/qmake 1941module should be used instead of using 1942.Ev MODQT*_QMAKE 1943directly. 1944.Pp 1945qt4 includes 1946.Xr pkg-config 1 1947files under a specific location recorded in 1948.Ev MODQT_PKG_CONFIG_PATH . 1949Qt3 requires the use of 1950.Ev MODQT3_PLUGINS 1951to correctly locate plugins. 1952.Pp 1953The modules add to 1954.Ev CONFIGURE_ENV , MAKE_ENV 1955and 1956.Ev MAKE_FLAGS . 1957They define appropriate 1958.Ev MODQT*_LIB_DEPENDS 1959and 1960.Ev MODQT*_WANTLIB . 1961.Pp 1962Note that Qt 4 and Qt 5 has their code split over several libraries. 1963For the qt4 module the basic 1964.Ev WANTLIB 1965only refers to QtCore, and other libraries should be added as needed. 1966The qt5 module doesn't set 1967.Ev MODQT*_WANTLIB 1968at all. 1969Also, Qt 5 consists of many so called Qt modules, and qt5 port module 1970only refers to qtbase Qt 5 module; other Qt modules should be added to 1971.Ev LIB_DEPENDS , 1972.Ev BUILD_DEPENDS 1973or 1974.Ev RUN_DEPENDS 1975manually. 1976.It x11/tk 1977Sets 1978.Ev MODTK_VERSION , 1979.Ev MODTK_BIN , 1980.Ev MODTK_INCDIR , 1981.Ev MODTK_LIBDIR , 1982.Ev MODTK_BUILD_DEPENDS , 1983.Ev MODTK_RUN_DEPENDS , 1984.Ev MODTK_LIB , 1985.Ev MODTK_LIB_DEPENDS , 1986and 1987.Ev MODTK_CONFIG . 1988.Ev MODTK_VERSION 1989is the default version used by all Tk ports and 1990may be overridden. 1991Automatically adds the 1992.Pa lang/tcl 1993module, provides a default 1994.Ev MODTCL_VERSION 1995to match 1996.Ev MODTK_VERSION , 1997and affects 1998.Ev CATEGORIES 1999and 2000.Ev SUBST_VARS . 2001Note the 2002.Ev MODTCL_WISH_ADJ 2003shell fragment in the 2004.Pa lang/tcl 2005module. 2006.It x11/xfce4 2007Sets 2008.Ev DIST_SUBDIR , 2009.Ev EXTRACT_SUFX , 2010.Ev CONFIGURE_STYLE , 2011.Ev CONFIGURE_ENV 2012and 2013.Ev USE_GMAKE . 2014If 2015.Ev MODXFCE_ICON_CACHE 2016is set to yes, it adds 2017.Pa x11/gtk+3,-guic 2018to 2019.Ev RUN_DEPENDS . 2020Unless 2021.Ev XFCE_NO_SRC 2022is set, 2023.Pa textproc/intltool 2024is added to 2025.Ev MODULES . 2026Also affects 2027.Ev CATEGORIES . 2028.Pp 2029Xfce ports can be divided into five categories: core libraries and 2030applications, goodies, artwork, thunar plugins, and panel plugins. 2031.Ev HOMEPAGE , 2032.Ev MASTER_SITES 2033and 2034.Ev DISTNAME 2035are built using 2036.Ev XFCE_VERSION 2037(which defaults to 2038.Ev XFCE_DESKTOP_VERSION 2039if not set) and either 2040.Ev XFCE_PROJECT , 2041.Ev XFCE_GOODIE , 2042.Ev XFCE_ARTWORK , 2043.Ev THUNAR_PLUGIN 2044or 2045.Ev XFCE_PLUGIN . 2046One of the latter has to be provided by the port Makefile. 2047.El 2048.Sh SEE ALSO 2049.Xr make 1 , 2050.Xr bsd.port.mk 5 , 2051.Xr ruby-module 5 , 2052.Xr ports 7 2053