1.\" $OpenBSD: port-modules.5,v 1.260 2022/06/26 05:24:06 jsg 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: June 26 2022 $ 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/qt5 127and 128.Pa x11/qt6 . 129Instead of using the namespace 130.Ev MODQT5* , 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 MODQT4_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/qt5 x11/qt6 145and differentiate between qt5 and qt6 needs with 146.Ev MODQT5_LIB_DEPENDS 147and 148.Ev MODQT6_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/cabal 591See 592.Xr cabal-module 5 for porting Haskell applications . 593.It devel/cargo 594See 595.Xr cargo-module 5 . 596.It devel/dconf 597Sets 598.Ev CONFIGURE_ARGS , 599.Ev BUILD_DEPENDS 600and 601.Ev RUN_DEPENDS . 602This module is used by ports installing gsettings schemas under 603.Pa ${PREFIX}/share/glib-2.0/schemas/ . 604It requires the following goo in the PLIST: 605.Bd -literal -offset indent 606@exec %D/bin/glib-compile-schemas %D/share/glib-2.0/schemas >/dev/null 607@unexec-delete %D/bin/glib-compile-schemas %D/share/glib-2.0/schemas >/dev/null 608.Ed 609.It devel/gconf2 610A link from 611.Xr gconftool-2 1 612to 613.Xr true 1 614will be put at the front of the 615.Ev PATH . 616Sets 617.Ev CONFIGURE_ARGS , 618.Ev BUILD_DEPENDS 619and 620.Ev RUN_DEPENDS . 621According to the values of 622.Ev MODGCONF2_LIBDEP , 623sets 624.Ev LIB_DEPENDS . 625User settings: set 626.Ev MODGCONF2_SCHEMAS_DIR 627to the directory name under 628.Pa ${LOCALBASE}/share/schemas/ 629where schemas files will be installed. 630.It devel/meson 631Adds 632.Pa devel/meson 633and 634.Pa devel/ninja 635to 636.Ev BUILD_DEPENDS . 637Sets up 638.Cm configure 639target. 640If 641.Ev CONFIGURE_STYLE 642was not set before, sets its value to `meson'. 643Changes default value of 644.Ev SEPARATE_BUILD 645to `Yes' because meson requires out-of-source build. 646If 647.Ev CONFIGURE_STYLE 648is 'meson', 649.Ev MODMESON_CONFIGURE_ARGS 650and 651.Ev MODMESON_CONFIGURE_ENV 652will add default values to 653.Ev CONFIGURE_ARGS 654and 655.Ev CONFIGURE_ENV . 656Also this module has the following knob: 657.Bl -tag -width Ds 658.It MODMESON_WANTCOLOR 659If set to `Yes', meson will colorize its output. 660Should not be used in ports Makefiles. 661Default value is `No'. 662.El 663.It devel/qmake 664See 665.Xr qmake-module 5 . 666.It devel/scons 667Adds 668.Pa devel/scons 669to 670.Ev BUILD_DEPENDS . 671Sets 672.Ev MODSCONS_BIN 673and 674.Ev MODSCONS_ENV . 675Also defines an overridable 676.Ev MODSCONS_FLAGS . 677It provides a 678.Cm do-build 679and 680.Cm do-install 681targets that can be overridden in the port Makefile. 682.It font 683Used for ports which primarily install fonts. 684Affects 685.Ev PKG_ARCH 686and 687.Ev EXTRACT_SUFX . 688Appends to 689.Ev CATEGORIES . 690When 691.Ev TYPEFACE 692is set in combination with 693.Ev V 694or 695.Ev VERSION , 696it sets 697.Ev PKGNAME . 698.Ev TYPEFACE 699should be set to the name of the typeface. 700This sets 701.Ev FONTDIR 702using said typeface name. 703.Ev FONTTYPES 704defaults to `ttf' but can be set to include the extensions of 705fonts which are to be installed. 706Also sets 707.Ev FONT_DISTDIR . 708A 709.Cm do-install 710target is provided if the port tself does not provide it. 711.It fortran 712Sets 713.Ev MODFORTRAN_LIB_DEPENDS , 714.Ev MODFORTRAN_WANTLIB , 715.Ev MODFORTRAN_BUILD_DEPENDS . 716Set 717.Ev MODFORTRAN_COMPILER 718to `gfortran', or `flang', depending on what the port requires. 719The default is `gfortran'. 720The dependencies are chosen according to 721.Ev MODFORTRAN_COMPILER . 722.It gcc4 723If 724.Ev COMPILER_VERSION 725is not gcc4 (defined by 726.Pa /usr/share/mk/bsd.own.mk ) , 727and architecture is in 728.Ev MODGCC4_ARCHS , 729then the gcc4 compilers will be put at the front of the path. 730By default, only C language support is included by this module. 731If other languages are needed, they must be listed in 732.Ev MODGCC4_LANGS 733(e.g. c++, fortran). 734The 735.Ev MODGCC4_VERSION 736variable can be used to change the version of gcc. 737By default gcc 4.9 is used. 738If 739.Ev MODGCC4_LANGS 740contains c++, this module provides 741.Ev MODGCC4_CPPLIBDEP 742and 743.Ev MODGCC4_CPPWANTLIB . 744.It gnu 745This module is documented in the main 746.Xr bsd.port.mk 5 747manpage. 748.It imake 749This module is documented in the main 750.Xr bsd.port.mk 5 751manpage. 752.It java 753Set 754.Li MODJAVA_VER=x.y 755to use exactly the JDK x.y, 756.Li MODJAVA_VER=x.y+ 757to use any x.y or higher version. 758Set 759.Li MODJAVA_JRERUN=Yes 760if the port only needs the JRE at runtime. 761The module sets 762.Ev JAVA_HOME , 763.Ev ONLY_FOR_ARCHS , 764.Ev MODJAVA_RUN_DEPENDS , 765.Ev MODJAVA_SHARE_DIR , 766.Ev MODJAVA_JAR_DIR , 767.Ev MODJAVA_EXAMPLE_DIR 768and 769.Ev MODJAVA_DOC_DIR . 770It appends to 771.Ev BUILD_DEPENDS , 772.Ev RUN_DEPENDS , 773.Ev CATEGORIES 774and 775.Ev SUBST_VARS . 776If 777.Li MODJAVA_BUILD=ant 778then this module provides 779.Ev MODJAVA_BUILD_DIR , 780.Ev MODJAVA_BUILD_FILE 781and 782.Ev MODJAVA_BUILD_TARGET_NAME , 783as well as a 784.Cm do-build 785target (if not already defined). 786It heeds 787.Ev NO_BUILD . 788.It lang/clang 789Similar to gcc3 and gcc4 modules. 790If architecture is in MODCLANG_ARCHS, the Clang compilers will be 791put at the front of the path. 792By default, only C language support is included by this module. 793If other languages are needed, they must be listed in 794.Ev MODCLANG_LANGS 795(e.g. c++). 796Sets 797.Ev MODCLANG_VERSION 798which is also appended to 799.Ev SUBST_VARS . 800.It lang/erlang 801.It lang/go 802See 803.Xr go-module 5 . 804.It lang/lua 805Sets 806.Ev MODLUA_BIN , 807.Ev MODLUA_DATADIR , 808.Ev MODLUA_DEP , 809.Ev MODLUA_DEP_VERSION , 810.Ev MODLUA_DOCDIR , 811.Ev MODLUA_EXAMPLEDIR , 812.Ev MODLUA_INCL_DIR , 813.Ev MODLUA_LIB , 814.Ev MODLUA_LIBDIR , 815.Ev MODLUA_VERSION , 816.Ev MODLUA_WANTLIB . 817Appends to 818.Ev CATEGORIES . 819Also appends to 820.Ev BUILD_DEPENDS , 821unless 822.Ev NO_BUILD 823has been set to Yes. 824Also appends to 825.Ev RUN_DEPENDS , 826unless 827.Ev MODLUA_RUNDEP 828is set to No. 829Appends 830.Ev MODLUA_VERSION , 831.Ev MODLUA_LIB , 832.Ev MODLUA_INCL_DIR , 833.Ev MODLUA_EXAMPLEDIR , 834.Ev MODLUA_DOCDIR , 835.Ev MODLUA_LIBDIR , 836.Ev MODLUA_DATADIR , 837.Ev MODLUA_DEP , 838.Ev MODLUA_DEP_VERSION , 839.Ev MODLUA_BIN 840to 841.Ev SUBST_VARS . 842.Ev MODLUA_DEFAULT_VERSION 843is set to 5.1. 844.Ev MODLUA_VERSION is set to 845.Ev MODLUA_DEFAULT_VERSION 846by default. 847Ports can be built with several lua versions. 848If no FLAVOR is set, it defaults to MODLUA_DEFAULT_VERSION. 849Otherwise the FULLPKGNAME is adjusted, if MODLUA_SA is not set. 850In order to set a build, run or test dependency on a lua port, 851use the following, which will propagate the currently used flavor: 852.Ev MODLUA_BUILD_DEPENDS , 853.Ev MODLUA_TEST_DEPENDS , 854.Ev MODLUA_RUN_DEPENDS . 855.It lang/mono 856Sets 857.Ev MODMONO_ONLY_FOR_ARCHS , 858.Ev CONFIGURE_ENV , 859.Ev MAKE_FLAGS , 860.Ev MODMONO_BUILD_DEPENDS 861and 862.Ev MODMONO_RUN_DEPENDS . 863If 864.Ev MODMONO_DEPS 865is set to Yes, 866.Pa lang/mono 867is appended to 868.Ev BUILD_DEPENDS 869and 870.Ev RUN_DEPENDS . 871.Ev DLLMAP_FILES 872defines in which files the module will substitute hardcoded 873shared library versions using a 874.Cm post-configure 875target. 876.It lang/ocaml 877Appends to 878.Ev BUILD_DEPENDS 879and 880.Ev MAKE_ENV . 881Appends to 882.Ev RUN_DEPENDS 883unless 884.Ev MODOCAML_RUNDEP 885is set to No, or set to if-not-native and native compilation 886is supported on this architecture. 887Including this module selects a %%native%% plist fragment and 888.Ev ocaml_native 889property depending on whether the architecture supports native 890compilation. 891If dynamic linking is supported on the native architecture, 892the %%dynlink%% plist fragment and 893.Ev ocaml_native_dynlink 894property is set. 895When 896.Ev CONFIGURE_STYLE 897is set to `oasis', 898overrides for the 899.Cm do-build , 900.Cm do-install , 901and 902.Cm do-test 903targets are added. 904.It lang/php 905Used for ports using PHP in some way: 906either extensions to PHP, or software written in PHP. 907Sets 908.Ev MODPHP_RUN_DEPENDS , 909.Ev MODPHP_LIB_DEPENDS , 910.Ev MODPHP_WANTLIB , 911.Ev MODPHP_BIN , 912.Ev MODPHP_PHPIZE , 913.Ev MODPHP_PHP_CONFIG , 914.Ev MODPHP_INCDIR 915and 916.Ev MODPHP_LIBDIR . 917Adds to 918.Ev RUN_DEPENDS 919unless 920.Ev MODPHP_RUNDEP 921is set to No. 922Adds to 923.Ev BUILD_DEPENDS 924if 925.Ev MODPHP_BUILDDEP 926is set to Yes. 927If 928.Ev MODPHP_DO_PHPIZE 929is set, prepares a build environment for extensions that use phpize. 930.Pp 931Ports using PDO for database connectivity often have a choice of 932dependencies (pdo_sqlite, pdo_mysql, pdo_pgsql and others). 933The module constructs 934.Ev MODPHP_PDO_DEPENDS 935from the PDO types listed in 936.Ev MODPHP_PDO_ALLOWED 937(defaulting to "sqlite mysql pgsql"). 938This can be added to 939.Ev RUN_DEPENDS 940and allows any of these PDO packages to satisfy the dependency, with 941.Ev MODPHP_PDO_PREF 942(sqlite by default) chosen if none are installed. 943.It lang/php/pecl 944Used for ports for PHP PECL extensions. 945Sets default 946.Ev MASTER_SITES , 947.Ev HOMEPAGE , 948.Ev EXTRACT_SUFX , 949.Ev DESTDIRNAME , 950.Ev MODPHP_DO_SAMPLE , 951.Ev MODPHP_DO_PHPIZE , 952.Ev AUTOCONF_VERSION , 953.Ev AUTOMAKE_VERSION , 954.Ev LIBTOOL_FLAGS . 955Provides a default 956.Ev TEST_TARGET 957and 958.Ev TEST_FLAGS 959unless 960.Ev NO_TEST 961or a 962.Cm do-test 963target is defined. 964Adds common dependencies to 965.Ev RUN_DEPENDS 966and 967.Ev BUILD_DEPENDS . 968Sets a default 969.Ev PKGNAME 970and appends to 971.Ev CATEGORIES . 972.It lang/python 973See 974.Xr python-module 5 . 975.It lang/ruby 976See 977.Xr ruby-module 5 . 978.It lang/tcl 979Sets 980.Ev MODTCL_VERSION , 981.Ev MODTCL_BIN , 982.Ev MODTCL_INCDIR , 983.Ev MODTCL_LIBDIR , 984.Ev MODTCL_BUILD_DEPENDS , 985.Ev MODTCL_RUN_DEPENDS , 986.Ev MODTCL_LIB , 987.Ev MODTCL_LIB_DEPENDS , 988and 989.Ev MODTCL_CONFIG . 990.Ev MODTCL_VERSION 991is the default version used by all Tcl ports and may be overridden. 992Provides 993.Ev MODTCL_TCLSH_ADJ 994and 995.Ev MODTCL_WISH_ADJ 996shell fragments to patch the interpreter path in executable scripts. 997Also affects 998.Ev CATEGORIES 999and 1000.Ev SUBST_VARS . 1001.It perl 1002This module is documented in the main 1003.Xr bsd.port.mk 5 1004manpage. 1005.It security/heimdal 1006A link from ${LOCALBASE}/heimdal/bin/krb5-config 1007to 1008.Xr krb5-config 1 1009will be put at the front of the path. 1010Sets 1011.Ev LIB_DEPENDS 1012and 1013.Ev WANTLIB 1014according to the values of 1015.Ev MODHEIMDAL_LIB_DEPENDS , 1016and 1017.Ev MODHEIMDAL_WANTLIB . 1018.It textproc/intltool 1019Sets 1020.Ev MODINTLTOOL_OVERRIDE . 1021.Pa textproc/intltool 1022is added to 1023.Ev BUILD_DEPENDS . 1024.Ev MODINTLTOOL_OVERRIDE 1025changes the paths of 1026.Ev INTLTOOL_EXTRACT , 1027.Ev INTLTOOL_MERGE 1028and 1029.Ev INTLTOOL_UPDATE 1030to use the installed versions of intltool-extract, 1031intltool-merge and intltool-update, instead of the version's packages into the 1032distfile of the port using this module. 1033Also affects 1034.Ev CONFIGURE_ENV , 1035.Ev MAKE_ENV 1036and 1037.Ev MAKE_FLAGS 1038by appending 1039.Ev MODINTLTOOL_OVERRIDE 1040to them. 1041.It www/mozilla 1042Sets 1043.Ev PKGNAME , 1044.Ev HOMEPAGE , 1045.Ev MASTER_SITES , 1046.Ev DISTNAME , 1047.Ev USE_GMAKE , 1048and 1049.Ev ONLY_FOR_ARCHS . 1050.Ev EXTRACT_SUFX 1051defaults to .tar.bz2. 1052.Pp 1053Adds common dependencies to 1054.Ev LIB_DEPENDS , 1055.Ev WANTLIB , 1056.Ev RUN_DEPENDS 1057and 1058.Ev BUILD_DEPENDS . 1059Sets common 1060.Ev CONFIGURE_ARGS , 1061.Ev MAKE_ENV 1062and 1063.Ev CONFIGURE_ENV . 1064Sets 1065.Ev MOB 1066variable as source directory 1067and 1068.Ev MOZ 1069as target directory within 1070.Cm do-install . 1071.Pp 1072Individual port Makefile must set 1073.Ev MOZILLA_PROJECT , 1074.Ev MOZILLA_CODENAME , 1075.Ev MOZILLA_VERSION , 1076.Ev MOZILLA_BRANCH , 1077.Ev MOZILLA_LIBS 1078and 1079.Ev MOZILLA_DATADIRS 1080variables. 1081Port can also append values to 1082.Ev MOZILLA_SUBST_FILES 1083which contains the list of 1084files to run 1085.Ev SUBST_CMD 1086on during 1087.Cm pre-configure , 1088and 1089.Ev MOZILLA_AUTOCONF_DIRS 1090which 1091contains the list of dirs where 1092.Ev AUTOCONF 1093will be run during 1094.Cm pre-configure . 1095.It www/pear 1096Used for PHP PEAR ports. 1097Sets default 1098.Ev MASTER_SITES , 1099.Ev EXTRACT_SUFX , 1100.Ev PKGNAME . 1101Sets 1102.Ev PREFIX 1103to 1104.Pa /var/www . 1105Sets 1106.Ev NO_TEST 1107unless a 1108.Cm do-test 1109target is defined. 1110Adds common dependencies to 1111.Ev RUN_DEPENDS 1112and 1113.Ev BUILD_DEPENDS , 1114sets 1115.Ev MAKE_FILE 1116and 1117.Ev FAKE_FLAGS 1118appropriately. 1119Makes 1120.Ev PEAR_LIBDIR 1121and 1122.Ev PEAR_PHPBIN 1123available for use in the port. 1124Sets a default 1125.Ev PKGNAME 1126and appends to 1127.Ev CATEGORIES . 1128.It x11/gnome 1129See 1130.Xr gnome-module 5 . 1131.It x11/gnustep 1132.It x11/qt5 and x11/qt6 1133All qt* modules share a common 1134.Ev MODQT_* 1135namespace for simple ports. 1136The qt5 module also defines the same variables under 1137.Ev MODQT5_* 1138and the qt6 module also defines the same variables under 1139.Ev MODQT6_* , 1140to allow ports to use both modules, such as 1141.Pa print/poppler . 1142.Pp 1143Those modules define 1144.Ev MODQT*_LIBDIR 1145as the libraries location, 1146.Ev MODQT*_INCDIR 1147as the include files location, 1148.Ev MODQT*_QTDIR 1149as the global qt directory location, 1150.Ev MODQT*_CONFIGURE_ARGS 1151as standard GNU configure-style parameters to locate the include and libraries. 1152.Pp 1153The location of Qt-specific tools 1154.Nm lrelease , 1155.Nm moc , 1156.Nm qmake 1157and 1158.Nm uic 1159is available through 1160.Ev MODQT*_LRELEASE , 1161.Ev MODQT*_MOC , 1162.Ev MODQT*_QMAKE 1163and 1164.Ev MODQT*_UIC . 1165.Ev MODQT*_OVERRIDE_UIC 1166controls whether the default setup will force a value of 1167.Ev UIC 1168or not. 1169The value of 1170.Ev MOC 1171is always forced to ${MODQT*_MOC}. 1172.Pp 1173In most cases the 1174.Pa devel/qmake 1175module should be used instead of using 1176.Ev MODQT*_QMAKE 1177directly. 1178.Pp 1179The modules add to 1180.Ev CONFIGURE_ENV , MAKE_ENV 1181and 1182.Ev MAKE_FLAGS . 1183They define appropriate 1184.Ev MODQT*_LIB_DEPENDS 1185and 1186.Ev MODQT*_WANTLIB . 1187.Pp 1188Note that Qt5 and Qt6 have their code split over several libraries. 1189Both modules qt5 and qt6 doesn't set 1190.Ev MODQT*_WANTLIB 1191at all. 1192Qt5 and Qt6 consist of many so called Qt modules, these Qt modules should be 1193added to 1194.Ev LIB_DEPENDS , 1195.Ev BUILD_DEPENDS 1196or 1197.Ev RUN_DEPENDS 1198manually. 1199.It x11/tk 1200Sets 1201.Ev MODTK_VERSION , 1202.Ev MODTK_BIN , 1203.Ev MODTK_INCDIR , 1204.Ev MODTK_LIBDIR , 1205.Ev MODTK_BUILD_DEPENDS , 1206.Ev MODTK_RUN_DEPENDS , 1207.Ev MODTK_LIB , 1208.Ev MODTK_LIB_DEPENDS , 1209and 1210.Ev MODTK_CONFIG . 1211.Ev MODTK_VERSION 1212is the default version used by all Tk ports and 1213may be overridden. 1214Automatically adds the 1215.Pa lang/tcl 1216module, provides a default 1217.Ev MODTCL_VERSION 1218to match 1219.Ev MODTK_VERSION , 1220and affects 1221.Ev CATEGORIES 1222and 1223.Ev SUBST_VARS . 1224Note the 1225.Ev MODTCL_WISH_ADJ 1226shell fragment in the 1227.Pa lang/tcl 1228module. 1229.It x11/xfce4 1230Sets 1231.Ev DIST_SUBDIR , 1232.Ev EXTRACT_SUFX , 1233.Ev CONFIGURE_STYLE , 1234.Ev CONFIGURE_ENV 1235and 1236.Ev USE_GMAKE . 1237If 1238.Ev MODXFCE_ICON_CACHE 1239is set to yes, it adds 1240.Pa x11/gtk+3,-guic 1241to 1242.Ev RUN_DEPENDS . 1243Unless 1244.Ev XFCE_NO_SRC 1245is set, 1246.Pa textproc/intltool 1247is added to 1248.Ev MODULES . 1249Also affects 1250.Ev CATEGORIES . 1251.Pp 1252Xfce ports can be divided into five categories: core libraries and 1253applications, goodies, artwork, thunar plugins, and panel plugins. 1254.Ev HOMEPAGE , 1255.Ev MASTER_SITES 1256and 1257.Ev DISTNAME 1258are built using 1259.Ev XFCE_VERSION 1260(which defaults to 1261.Ev XFCE_DESKTOP_VERSION 1262if not set) and either 1263.Ev XFCE_PROJECT , 1264.Ev XFCE_GOODIE , 1265.Ev XFCE_ARTWORK , 1266.Ev THUNAR_PLUGIN 1267or 1268.Ev XFCE_PLUGIN . 1269One of the latter has to be provided by the port Makefile. 1270.El 1271.Sh SEE ALSO 1272.Xr make 1 , 1273.Xr bsd.port.mk 5 , 1274.Xr cabal-module 5 , 1275.Xr cargo-module 5 , 1276.Xr gnome-module 5 , 1277.Xr go-module 5 , 1278.Xr python-module 5 , 1279.Xr qmake-module 5 , 1280.Xr ruby-module 5 , 1281.Xr ports 7 1282