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