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