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