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