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