xref: /openbsd-src/share/man/man5/port-modules.5 (revision e5157e49389faebcb42b7237d55fbf096d9c2523)
1.\"	$OpenBSD: port-modules.5,v 1.183 2014/09/13 16:30:05 ajacoutot 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 2014 $
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 devel/cmake
437Adds
438.Pa devel/cmake
439to
440.Ev BUILD_DEPENDS
441and fills up
442.Ev CONFIGURE_ARGS ,
443.Ev CONFIGURE_ENV
444and
445.Ev MAKE_ENV .
446Sets up
447.Ar configure
448target.
449If
450.Ev CONFIGURE_STYLE
451was not set before, sets its value to `cmake'.
452Changes default value of
453.Ev SEPARATE_BUILD
454to `Yes' because modern CMake requires out-of-source build anyway.
455Changes
456.Ev REGRESS_TARGET
457to `test' as this is standard for CMake projects.
458Also this module have following knobs:
459.Bl -tag -width Ds
460.It MODCMAKE_WANTCOLOR
461If set to `Yes', CMake will colorize its output.
462Should not be used in ports Makefiles.
463Default value is `No'.
464.It MODCMAKE_VERBOSE
465If set to `Yes', CMake will print details during configure and build
466stages about exact command being run, etc.
467Should not be used in ports Makefiles.
468Default value is `Yes'.
469.El
470Also,
471.Sq nojunk
472is added to DPB_PROPERTIES because CMake's include files parser cheats
473too much.
474.It devel/dconf
475Sets
476.Ev CONFIGURE_ARGS ,
477.Ev BUILD_DEPENDS
478and
479.Ev RUN_DEPENDS .
480This module is used by ports installing gsettings schemas under
481.Pa ${PREFIX}/share/glib-2.0/schemas/ .
482It requires the following goo in the PLIST:
483.Bd -literal -offset indent
484@exec %D/bin/glib-compile-schemas %D/share/glib-2.0/schemas >/dev/null
485@unexec-delete %D/bin/glib-compile-schemas %D/share/glib-2.0/schemas >/dev/null
486.Ed
487.It devel/gconf2
488A link from
489.Xr gconftool-2 1
490to
491.Xr true 1
492will be put at the front of the
493.Ev PATH .
494Sets
495.Ev CONFIGURE_ARGS ,
496.Ev BUILD_DEPENDS
497and
498.Ev RUN_DEPENDS .
499According to the values of
500.Ev MODGCONF2_LIBDEP ,
501sets
502.Ev LIB_DEPENDS .
503User settings: set
504.Ev MODGCONF2_SCHEMAS_DIR
505to the directory name under
506.Pa ${LOCALBASE}/share/schemas/
507where schemas files will be installed.
508.It devel/gettext
509.It devel/pmk
510Sets
511.Ev CONFIGURE_SCRIPT ,
512.Ev CONFIGURE_ARGS
513and
514.Ev MODPMK_configure .
515It appends
516.Pa devel/pmk
517to
518.Ev BUILD_DEPENDS .
519.It devel/scons
520Adds
521.Pa devel/scons
522to
523.Ev BUILD_DEPENDS .
524Sets
525.Ev MODSCONS_BIN
526and
527.Ev MODSCONS_ENV .
528Also defines an overridable
529.Ev MODSCONS_FLAGS .
530It provides a
531.Ar do-build
532and
533.Ar do-install
534targets that can be overridden in the port Makefile.
535.It devel/waf
536Adds
537.Pa devel/waf
538to
539.Ev BUILD_DEPENDS ,
540.Pa lang/python
541to
542.Ev MODULES ,
543and provides
544.Ar do-configure ,
545.Ar do-build ,
546.Ar do-install
547and
548.Ar post-install
549targets.
550.Ar do-build ,
551.Ar do-install
552and
553.Ar post-install
554can be overridden in the port Makefile.
555.It fortran
556Sets
557.Ev MODFORTRAN_LIB_DEPENDS ,
558.Ev MODFORTRAN_WANTLIB ,
559.Ev MODFORTRAN_BUILD_DEPENDS .
560Set
561.Ev MODFORTRAN_COMPILER
562to `g77' or `gfortran', depending on what the port requires.
563The default is `g77'.
564The dependencies are chosen according to
565.Ev COMPILER_VERSION
566and
567.Ev MODFORTRAN_COMPILER .
568.It gcc4
569If
570.Ev COMPILER_VERSION
571is not gcc4 (defined by
572.Pa /usr/share/mk/bsd.own.mk ) ,
573and architecture is in
574.Ev MODGCC4_ARCHS ,
575then the gcc4 compilers will be put at the front of the path.
576By default, only C language support is included by this module.
577If other languages are needed, they must be listed in
578.Ev MODGCC4_LANGS
579(e.g. c++, fortran).
580The
581.Ev MODGCC4_VERSION
582variable can be used to change the version of gcc.
583By default gcc 4.6 is used.
584If
585.Ev MODGCC4_LANGS
586contains c++, this module provides
587.Ev MODGCC4_CPPLIBDEP
588and
589.Ev MODGCC4_CPPWANTLIB .
590.It gnu
591This module is documented in the main
592.Xr bsd.port.mk 5
593manpage.
594.It imake
595This module is documented in the main
596.Xr bsd.port.mk 5
597manpage.
598.It java
599Set
600.Li MODJAVA_VER=x.y
601to use exactly the JDK x.y,
602.Li MODJAVA_VER=x.y+
603to use any x.y or higher version.
604Set
605.Li MODJAVA_JRERUN=Yes
606if the port only needs the JRE at runtime.
607The module sets
608.Ev JAVA_HOME ,
609.Ev ONLY_FOR_ARCHS ,
610.Ev MODJAVA_RUN_DEPENDS ,
611.Ev MODJAVA_SHARE_DIR ,
612.Ev MODJAVA_JAR_DIR ,
613.Ev MODJAVA_EXAMPLE_DIR
614and
615.Ev MODJAVA_DOC_DIR .
616It appends to
617.Ev BUILD_DEPENDS ,
618.Ev RUN_DEPENDS ,
619.Ev CATEGORIES
620and
621.Ev SUBST_VARS .
622If
623.Li MODJAVA_BUILD=ant
624then this module provides
625.Ev MODJAVA_BUILD_DIR ,
626.Ev MODJAVA_BUILD_FILE
627and
628.Ev MODJAVA_BUILD_TARGET_NAME ,
629as well as a
630.Ar do-build
631target (if not already defined).
632It heeds
633.Ev NO_BUILD .
634.It lang/clang
635Similar to gcc3 and gcc4 modules.
636If architecture is in MODCLANG_ARCHS, the CLang compilers will be
637put at the front of the path.
638By default, only C language support is included by this module.
639If other languages are needed, they must be listed in
640.Ev MODCLANG_LANGS
641(e.g. c++).
642Sets
643.Ev MODCLANG_VERSION
644which is also appended to
645.Ev SUBST_VARS .
646.It lang/erlang
647.It lang/ghc
648Sets
649.Ev ONLY_FOR_ARCHS ,
650.Ev MODGHC_VER ,
651.Ev BUILD_DEPENDS ,
652and
653.Ev RUN_DEPENDS .
654Build and further actions are based on the list of values in
655.Ev MODGHC_BUILD :
656.Bl -tag -width register
657.It Ar nort
658no runtime dependency on
659.Pa lang/ghc
660and hs- prefix will not be added,
661.It Ar cabal
662get the typical Cabal targets defined,
663.It Ar haddock
664generate API documentation using
665.Pa devel/haddock ,
666.It Ar register
667create and include register/unregister scripts,
668.It Ar hackage
669the distfiles are available on Hackage.
670.El
671.Pp
672Also affects
673.Ev CATEGORIES ,
674.Ev CONFIGURE_STYLE
675and
676.Ev SUBST_VARS .
677.Ar do-build ,
678.Ar do-install
679and
680.Ar do-test
681targets are provided if the port itself didn't set them.
682If
683.Ar register
684has been set, the PLIST needs to be modified in order to
685add the relevant @exec/@unexec lines.
686This module will run the Setup script and ensure the documentation
687will be built (if
688.Ar haddock
689has been set), and that the package is
690registered as a library usable by
691.Pa lang/ghc
692(if
693.Ar register
694has been set).
695Extra arguments and environment additions for the Setup configure
696command can be specified with
697.Ev MODGHC_SETUP_CONF_ARGS
698and
699.Ev MODGHC_SETUP_CONF_ENV .
700.It lang/lua
701Sets
702.Ev MODLUA_BIN ,
703.Ev MODLUA_DATADIR ,
704.Ev MODLUA_DEP ,
705.Ev MODLUA_DEP_VERSION ,
706.Ev MODLUA_DOCDIR ,
707.Ev MODLUA_EXAMPLEDIR ,
708.Ev MODLUA_INCL_DIR ,
709.Ev MODLUA_LIB ,
710.Ev MODLUA_LIBDIR ,
711.Ev MODLUA_VERSION ,
712.Ev MODLUA_WANTLIB .
713Appends to
714.Ev CATEGORIES .
715Also appends to
716.Ev BUILD_DEPENDS ,
717unless
718.Ev NO_BUILD
719has been set to Yes.
720Also appends to
721.Ev RUN_DEPENDS ,
722unless
723.Ev MODLUA_RUNDEP
724is set to No.
725Appends
726.Ev MODLUA_VERSION ,
727.Ev MODLUA_LIB ,
728.Ev MODLUA_INCL_DIR ,
729.Ev MODLUA_EXAMPLEDIR ,
730.Ev MODLUA_DOCDIR ,
731.Ev MODLUA_LIBDIR ,
732.Ev MODLUA_DATADIR ,
733.Ev MODLUA_DEP ,
734.Ev MODLUA_DEP_VERSION ,
735.Ev MODLUA_BIN
736to
737.Ev SUBST_VARS .
738.Ev MODLUA_DEFAULT_VERSION
739is set to 5.1.
740.Ev MODLUA_VERSION is set to
741.Ev MODLUA_DEFAULT_VERSION
742by default.
743Ports can be built with two lua versions.
744If no FLAVOR is set it defaults to MODLUA_DEAFULT_VERSION.
745Otherwise the FULLPKGNAME is adjusted, if MODLUA_SA is not set.
746In order to set a build, run or test dependency on a lua port,
747use the following, which will propagate the currently used flavor:
748.Ev MODLUA_BUILD_DEPENDS ,
749.Ev MODLUA_TEST_DEPENDS ,
750.Ev MODLUA_RUN_DEPENDS .
751.It lang/mono
752Sets
753.Ev MODMONO_ONLY_FOR_ARCHS ,
754.Ev CONFIGURE_ENV ,
755.Ev MAKE_FLAGS ,
756.Ev MODMONO_BUILD_DEPENDS
757and
758.Ev MODMONO_RUN_DEPENDS .
759If
760.Ev MODMONO_DEPS
761is set to Yes,
762.Pa lang/mono
763is appended to
764.Ev BUILD_DEPENDS
765and
766.Ev RUN_DEPENDS .
767If
768.Ev MODMONO_NANT
769is set to Yes,
770.Ev NANT
771and
772.Ev NANT_FLAGS
773are set,
774.Pa devel/nant
775is appended to
776.Ev BUILD_DEPENDS
777and a
778.Ar do-build
779and
780.Ar do-install
781targets are provided to use nant for building.
782If these targets are already defined, one can use
783.Ev MODMONO_BUILD_TARGET
784and
785.Ev MODMONO_INSTALL_TARGET
786instead in the corresponding target.
787.Ev DLLMAP_FILES
788defines in which files the module will substitute hardcoded
789shared library versions using a
790.Ar post-configure
791target.
792.It lang/node
793Adds common dependencies to
794.Ev RUN_DEPENDS
795and
796.Ev BUILD_DEPENDS .
797Recognizes two additional types of
798.Ev CONFIGURE_STYLE Ns s ,
799"npm" and "npm ext".
800"npm ext" should be used for npm packages that contain C++ extensions which
801need to be compiled.
802"npm" should be used for other npm packages.
803If regression tests are included that can be run using
804.Pa devel/node-expresso ,
805append "expresso" to
806.Ev CONFIGURE_STYLE .
807.Pa devel/node-expresso
808will be appened to
809.Ev TEST_DEPENDS
810and a default
811.Ev MODNODE_TEST_TARGET
812will be defined, along with a do-test target if it has not
813already been set.
814If "expresso" isn't appended to
815.Ev CONFIGURE_STYLE ,
816.Ev TEST_TARGET
817will be set to "test".
818One of these two
819.Ev CONFIGURE_STYLE Ns s
820should be used or the module doesn't affect anything except
821.Ev RUN_DEPENDS
822and
823.Ev BUILD_DEPENDS .
824Requires
825.Ev NPM_NAME
826to be set to the name of the npm package.
827Uses
828.Ev NPM_NAME
829and
830.Ev NPM_VERSION
831to set
832.Ev DISTNAME ,
833and
834.Ev PKGNAME ,
835and
836.Ev MASTER_SITES .
837If the npm package depends on other npm packages, the npm package names it
838depends on should be listed in
839.Ev MODNODE_DEPENDS .
840Adds default do_build and do_install tasks, and you can reference the default
841implementations via
842.Ev MODNODE_BUILD_TARGET
843and
844.Ev MODNODE_INSTALL_TARGET .
845.It lang/ocaml
846Appends to
847.Ev BUILD_DEPENDS
848and
849.Ev MAKE_ENV .
850This selects a %%native%% plist fragment and
851.Ev ocaml_native
852property depending on whether the architecture supports native
853compilation.
854If dynamic linking is supported on the native architecture,
855the %%dynlink%% plist fragment and
856.Ev ocaml_native_dynlink
857property is set.
858When
859.Ev CONFIGURE_STYLE
860is set to `oasis',
861overrides for the do\-build, do\-install and do\-test targets are added.
862.It lang/php/pecl
863Used for ports for PHP PECL extensions.
864Sets default
865.Ev MASTER_SITES ,
866.Ev HOMEPAGE ,
867.Ev EXTRACT_SUFX ,
868.Ev DESTDIRNAME ,
869.Ev MODPHP_DO_SAMPLE ,
870.Ev MODPHP_DO_PHPIZE ,
871.Ev AUTOCONF_VERSION ,
872.Ev AUTOMAKE_VERSION ,
873.Ev LIBTOOL_FLAGS .
874Provides a default
875.Ev TEST_TARGET
876and
877.Ev TEST_FLAGS
878unless
879.Ev NO_TEST
880or a
881.Ar do-test
882target is defined.
883Adds common dependencies to
884.Ev RUN_DEPENDS
885and
886.Ev BUILD_DEPENDS .
887Sets a default
888.Ev PKGNAME
889and appends to
890.Ev CATEGORIES .
891.It lang/python
892Sets
893.Ev MODPY_VERSION ,
894.Ev MODPY_BIN ,
895.Ev MODPY_INCDIR ,
896.Ev MODPY_LIBDIR ,
897.Ev MODPY_SITEPKG ,
898.Ev MODPY_SETUP ,
899.Ev MODPY_WANTLIB ,
900.Ev MODPY_LIB_DEPENDS ,
901.Ev MODPY_RUN_DEPENDS ,
902.Ev MODPY_BUILD_DEPENDS
903and
904.Ev MODPY_ADJ_FILES .
905Appends to
906.Ev RUN_DEPENDS
907unless
908.Ev MODPY_RUNDEP
909is set to No.
910Appends to
911.Ev BUILD_DEPENDS
912unless
913.Ev MODPY_BUILDDEP
914is set to No or
915.Ev NO_BUILD
916is set to Yes.
917.Ev MODPY_VERSION
918is the default version used by all python modules.
919Ports which use the setuptools module should set
920.Ev MODPY_SETUPTOOLS
921to Yes.
922All ports that generate egg-info files should set
923.Ev MODPY_EGG_VERSION
924to the version string used by the port's setup.py setup() function.
925Extra arguments to the build and install commands can be passed via
926.Ev MODPY_DISTUTILS_BUILDARGS
927and
928.Ev MODPY_DISTUTILS_INSTALLARGS .
929If any files have a python shebang line which needs to be replaced
930using MODPY_BIN, list them in
931.Ev MODPY_ADJ_FILES .
932These are prefixed with WRKSRC and replaced automatically
933at the end of
934.Ar pre-configure .
935Also affects
936.Ev CATEGORIES ,
937.Ev MAKE_ENV ,
938.Ev CONFIGURE_ENV ,
939.Ev SHARED_ONLY ,
940and
941.Ev SUBST_VARS .
942May affect the
943.Ar test
944target.
945.Pp
946Python 2.x places .pyc files in the same directory as the associated .py file.
947Python 3.x places these in a separate __pycache__ directory and uses an
948additional suffix.
949The python module defines variables to allow a single PLIST to be
950used for both versions.
951Generate or update the PLIST using the python3
952.Ev FLAVOR ,
953then edit it to prefix any lines creating
954.Ev MODPY_PYCACHE
955directories with
956.Ev MODPY_PYCOMMENT .
957As python2 and python3 packages should permit being installed together,
958it may be necessary to suffix names of common binaries or directories,
959or split common files into a subpackage.
960If updating the PLIST without using the python3 flavor,
961take care not to remove ${MODPY_PYCACHE} and ${MODPY_PYC_MAGIC_TAG}
962variables from the PLIST.
963.It lang/ruby
964See
965.Xr ruby-module 5 .
966.It lang/tcl
967Sets
968.Ev MODTCL_VERSION ,
969.Ev MODTCL_BIN ,
970.Ev MODTCL_INCDIR ,
971.Ev MODTCL_LIBDIR ,
972.Ev MODTCL_BUILD_DEPENDS ,
973.Ev MODTCL_RUN_DEPENDS ,
974.Ev MODTCL_LIB ,
975.Ev MODTCL_LIB_DEPENDS ,
976and
977.Ev MODTCL_CONFIG .
978.Ev MODTCL_VERSION
979is the default version used by all Tcl ports and may be overridden.
980Provides
981.Ev MODTCL_TCLSH_ADJ
982and
983.Ev MODTCL_WISH_ADJ
984shell fragments to patch the interpreter path in executable scripts.
985Also affects
986.Ev CATEGORIES
987and
988.Ev SUBST_VARS .
989.It perl
990This module is documented in the main
991.Xr bsd.port.mk 5
992manpage.
993.It security/heimdal
994A link from ${LOCALBASE}/heimdal/bin/krb5-config
995to
996.Xr krb5-config 1
997will be put at the front of the path.
998Sets
999.Ev LIB_DEPENDS
1000and
1001.Ev WANTLIB
1002according to the values of
1003.Ev MODHEIMDAL_LIB_DEPENDS ,
1004and
1005.Ev MODHEIMDAL_WANTLIB .
1006.It textproc/intltool
1007Sets
1008.Ev MODINTLTOOL_OVERRIDE .
1009.Pa textproc/intltool
1010is added to
1011.Ev BUILD_DEPENDS .
1012.Ev MODINTLTOOL_OVERRIDE
1013changes the paths of
1014.Ev INTLTOOL_EXTRACT ,
1015.Ev INTLTOOL_MERGE
1016and
1017.Ev INTLTOOL_UPDATE
1018to use the installed versions of intltool-extract,
1019intltool-merge and intltool-update, instead of the version's packages into the
1020distfile of the port using this module.
1021Also affects
1022.Ev CONFIGURE_ENV ,
1023.Ev MAKE_ENV
1024and
1025.Ev MAKE_FLAGS
1026by appending
1027.Ev MODINTLTOOL_OVERRIDE
1028to them.
1029.It www/drupal6
1030This module is legacy.
1031drupal6 is still supported, but new work should mostly happen in drupal7 land.
1032.It www/drupal7
1033Can be used to install plugins (default), themes if
1034.Ev MODDRUPAL_THEME
1035is yes, or languages packs if
1036.Ev DRUPAL_LANG
1037is set to the desired language.
1038.Pp
1039The module will set or add to default values for
1040.Ev HOMEPAGE ,
1041.Ev MASTER_SITES ,
1042.Ev PREFIX ,
1043.Ev DIST_SUBDIR ,
1044.Ev CATEGORIES ,
1045.Ev PKG_ARCH ,
1046.Ev WRKDIST ,
1047.Ev RUN_DEPENDS .
1048Drupal modules normally don't have any build part, just an installation part
1049that defaults to copying the plugin/theme/language files into the right
1050location through
1051.Ev MODDRUPAL_INSTALL .
1052.Pp
1053The module sets
1054.Ev DRUPAL
1055to drupal7,
1056.Ev DRUPAL_ROOT
1057to htdocs/${DRUPAL}
1058.Ev DRUPAL_MODS
1059to ${DRUPAL_ROOT}/site/all/modules
1060.Ev DRUPAL_THEMES
1061to ${DRUPAL_ROOT}/site/all/themes
1062and
1063.Ev DRUPAL_TRANSLATIONS
1064to ${DRUPAL_ROOT}/profiles/standard/translations.
1065So, by default, modules and themes are installed for all sites,
1066and translations are activated at install.
1067.Pp
1068.Ev DRUPAL_OWNER , DRUPAL_GROUP
1069are set to root, daemon, since drupal doesn't need to write
1070to any file except the files/ directory and the site settings (those
1071belong to www instead).
1072.Pp
1073Translations are handled by setting
1074.Ev DRUPAL_LANG
1075to the language letter code, and by setting
1076.Ev LANGFILES
1077to a list of module names/version pairs.
1078.Pp
1079With drupal7, all translations have been put in separate .po files.
1080It has been deemed simplest to pack all translations for a given language
1081into a single package, since translations for non installed modules won't
1082affect anything.
1083.It www/horde
1084.It www/mozilla
1085Sets
1086.Ev PKGNAME ,
1087.Ev HOMEPAGE ,
1088.Ev MASTER_SITES ,
1089.Ev DISTNAME ,
1090.Ev USE_GMAKE ,
1091.Ev ONLY_FOR_ARCHS
1092and
1093.Ev SHARED_ONLY .
1094.Ev EXTRACT_SUFX
1095defaults to .tar.bz2.
1096.Pp
1097Adds common dependencies to
1098.Ev LIB_DEPENDS ,
1099.Ev WANTLIB ,
1100.Ev RUN_DEPENDS
1101and
1102.Ev BUILD_DEPENDS .
1103Sets common
1104.Ev CONFIGURE_ARGS ,
1105.Ev MAKE_ENV
1106and
1107.Ev CONFIGURE_ENV .
1108Sets
1109.Ev MOB
1110variable as source directory
1111and
1112.Ev MOZ
1113as target directory within
1114.Ar do-install .
1115.Pp
1116Individual port Makefile must set
1117.Ev MOZILLA_PROJECT ,
1118.Ev MOZILLA_CODENAME ,
1119.Ev MOZILLA_VERSION ,
1120.Ev MOZILLA_BRANCH ,
1121.Ev MOZILLA_LIBS
1122and
1123.Ev MOZILLA_DATADIRS
1124variables.
1125Port can also append values to
1126.Ev MOZILLA_SUBST_FILES
1127which contains the list of
1128files to run
1129.Ev SUBST_CMD
1130on during
1131.Ar pre-configure ,
1132and
1133.Ev MOZILLA_AUTOCONF_DIRS
1134which
1135contains the list of dirs where
1136.Ev AUTOCONF
1137will be run during
1138.Ar pre-configure .
1139.It www/pear
1140Used for PHP PEAR ports.
1141Sets default
1142.Ev MASTER_SITES ,
1143.Ev EXTRACT_SUFX ,
1144.Ev PKGNAME .
1145Sets
1146.Ev PREFIX
1147to
1148.Pa /var/www .
1149Sets
1150.Ev NO_TEST
1151unless a
1152.Ar do-test
1153target is defined.
1154Adds common dependencies to
1155.Ev RUN_DEPENDS
1156and
1157.Ev BUILD_DEPENDS ,
1158sets
1159.Ev MAKE_FILE
1160and
1161.Ev FAKE_FLAGS
1162appropriately.
1163Makes
1164.Ev PEAR_LIBDIR
1165and
1166.Ev PEAR_PHPBIN
1167available for use in the port.
1168Sets a default
1169.Ev PKGNAME
1170and appends to
1171.Ev CATEGORIES .
1172.It www/plone
1173Sets
1174.Ev MODPLONE_VERSION
1175and
1176.Ev MODZOPE_VERSION .
1177.Ev MODPLONE_VERSION
1178is the default version used by all Plone ports and may be overridden.
1179It appends
1180.Pa www/plone
1181to
1182.Ev RUN_DEPENDS
1183and also sets
1184.Ev NO_TEST
1185to Yes.
1186.It www/zope
1187.It x11/gnome
1188If both
1189.Ev GNOME_PROJECT
1190and
1191.Ev GNOME_VERSION
1192are set, this module defines
1193.Ev DISTNAME ,
1194.Ev VERSION ,
1195.Ev MASTER_SITES ,
1196adds x11/gnome to
1197.Ev CATEGORIES
1198and
1199.Ev EXTRACT_SUFX
1200will default to .tar.xz if unset.
1201Unless
1202.Li NO_BUILD=Yes ,
1203.Pa textproc/intltool
1204is also appended to
1205.Ev MODULES
1206and
1207.Ev USE_GMAKE
1208is set to "Yes".
1209.Pp
1210If
1211.Ev CONFIGURE_STYLE
1212is set to "gnu" or "simple",
1213.Ev CONFIGURE_SHARED
1214is appended to
1215.Ev CONFIGURE_ARGS ,
1216.Li CPPFLAGS="-I${LOCALBASE}/include"
1217and
1218.Li LDFLAGS="-L${LOCALBASE}/lib"
1219are appended to
1220.Ev CONFIGURE_ENV .
1221.Pp
1222If none of
1223.Ev AUTOCONF_VERSION
1224nor
1225.Ev AUTOMAKE_VERSION
1226are defined, then "--disable-maintainer-mode" is appended to
1227.Ev CONFIGURE_ARGS .
1228.Pp
1229Certain build/run dependencies and configure arguments and environment
1230can be set by appending desktop-file-utils, docbook, gobject-introspection,
1231gtk-update-icon-cache, shared-mime-info, vala and/or yelp to
1232.Ev MODGNOME_TOOLS .
1233They are disabled otherwise.
1234If
1235.Ev MODGNOME_TOOLS
1236is set to desktop-file-utils,
1237a dependency on
1238.Pa devel/desktop-file-utils
1239is appended to
1240.Ev MODGNOME_RUN_DEPENDS
1241and a link to /usr/bin/true is created under
1242.Pa ${WRKDIR}/bin/desktop-file-validate .
1243If
1244.Ev MODGNOME_TOOLS
1245is set to docbook,
1246.Pa textproc/docbook-xsl
1247is appended to
1248.Ev MODGNOME_BUILD_DEPENDS .
1249This option is used when the generation of the man pages included in the
1250source tarball requires docbook XML/SGML/XSL definitions and stylesheets.
1251If
1252.Ev MODGNOME_TOOLS
1253is set to gtk-update-icon-cache, a dependency on
1254.Pa x11/gtk+2,-guic
1255is appended to
1256.Ev MODGNOME_RUN_DEPENDS .
1257If
1258.Ev MODGNOME_TOOLS
1259is set to shared-mime-info, a dependency on
1260.Pa misc/shared-mime-info
1261is appended to
1262.Ev MODGNOME_RUN_DEPENDS
1263and a link to /usr/bin/true is created under
1264.Pa ${WRKDIR}/bin/update-mime-database .
1265If
1266.Ev MODGNOME_TOOLS
1267is set to yelp,
1268.Pa textproc/itstool
1269and
1270.Pa x11/gnome/doc-utils
1271are appended to
1272.Ev MODGNOME_BUILD_DEPENDS .
1273Furthermore,
1274.Pa x11/gnome/yelp
1275is appended to
1276.Ev MODGNOME_RUN_DEPENDS
1277if
1278.Ev MODGNOME_TOOLS
1279also contains "desktop-file-utils"
1280This option is to be used when any files are installed into
1281.Pa share/gnome/help/
1282or page files are installed into
1283.Pa share/help/ .
1284.Ev MODGNOME_BUILD_DEPENDS
1285and
1286.Ev MODGNOME_RUN_DEPENDS
1287are appended to the
1288corresponding
1289.Ev BUILD_DEPENDS
1290and
1291.Ev RUN_DEPENDS .
1292.Pp
1293Some tools require the following goo in the PLIST:
1294.Pp
1295.Ar desktop-file-utils
1296.Bd -literal -offset indent
1297@exec %D/bin/update-desktop-database
1298@unexec-delete %D/bin/update-desktop-database
1299.Ed
1300.Pp
1301.Ar gtk-update-icon-cache
1302($icon-theme is the theme directory)
1303.Bd -literal -offset indent
1304@exec %D/bin/gtk-update-icon-cache -q -t %D/share/icons/$icon-theme
1305@unexec-delete %D/bin/gtk-update-icon-cache -q -t %D/share/icons/$icon-theme
1306.Ed
1307.Pp
1308.Ar shared-mime-info
1309.Bd -literal -offset indent
1310@exec %D/bin/update-mime-database %D/share/mime
1311@unexec-delete %D/bin/update-mime-database %D/share/mime
1312.Ed
1313.It x11/gnustep
1314.It x11/kde
1315.It x11/kde4
1316Required for building KDE4-enabled ports.
1317Main variables are: MODKDE4_USE,
1318MODKDE4_VERSION, MODKDE4_DEP_DIR, MODKDE4_DEP_VERSION, MODKDE4_FLAVOR.
1319It's used both for KDE4 SC itself and for software built on top of it,
1320e.g., Digikam.
1321This module supports several KDE4 trees at the same time, see below.
1322The following variables are designed to be used in both types of ports:
1323.Bl -tag -width KDE4LIB
1324.It Ev MODKDE4_USE
1325Defines the core components of KDE4 to be used by the port.
1326Could have zero or more of the following values, in any order:
1327.Sq libs ,
1328.Sq runtime ,
1329.Sq pim ,
1330.Sq games ,
1331.Sq workspace .
1332Could be forced to be empty, this will mean no automated dependencies.
1333If
1334.Sq libs
1335is specified, no dependencies on runtime (kde-runtime or kdepim-runtime)
1336will be recorded.
1337The
1338.Sq workspace
1339component implies
1340.Sq runtime .
1341The
1342.Sq games
1343component is to be used by games and affects default HOMEPAGE, too.
1344If neither
1345.Sq libs
1346or
1347.Sq runtime
1348are specified, the
1349.Sq runtime
1350is implied.
1351If both
1352.Sq libs
1353and
1354.Sq runtime
1355are specified, then
1356.Sq runtime
1357takes precedence (actually, it's a libs+ anyway).
1358The
1359.Sq pim libs
1360combination adds dependencies on both kdelibs and kdepimlibs,
1361and
1362.Sq pim runtime (
1363or just
1364.Sq pim )
1365also adds dependencies on both kde-runtime and kdepim-runtime.
1366Defaults to
1367.Sq libs
1368when
1369.Ev MODKDE4_RESOURCES
1370is set to
1371.Sq Yes ,
1372and
1373.Sq runtime
1374otherwise.
1375.It Ev MODKDE4_DEP_DIR
1376Expands to
1377.Sq x11/kdeVERSION
1378where version depends on current
1379.Ev MODKDE4_VERSION ,
1380see below.
1381Read-only.
1382.It Ev MODKDE4_DEP_VERSION
1383Expands to a string to be used in dependency lines, see
1384examples in
1385.Pa x11/kde4/*
1386ports.
1387Read-only.
1388.It Ev MODKDE4_RESOURCES
1389Should be set to
1390.Sq Yes
1391for ports that only provide non-executable stuff like icons,
1392localization files and so on.
1393Affects
1394.Ev FLAVORS ,
1395.Ev MODKDE4_NO_QT ,
1396.Ev MODKDE4_USE ,
1397.Ev MODULES ,
1398.Ev PKG_ARCH
1399and
1400.Ev SUBST_VARS
1401variables.
1402Defaults to
1403.Sq No .
1404.It Ev MODKDE4_INCLUDE_DIR
1405Path where KDE4 headers to be placed/searched for, relative to
1406.Ev PREFIX .
1407Read-only.
1408.It Ev MODKDE4_LIB_DIR
1409Path where KDE4 headers to be placed/searched for, relative to
1410.Ev PREFIX .
1411Read-only.
1412.It Ev KDE4LIB
1413Shorter synonym for
1414.Ev MODKDE4_LIB_DIR ,
1415to be used in plists and
1416.Ev WANTLIB
1417declarations.
1418Read-only.
1419.It Ev MODKDE4_FIX_GETTEXT
1420If set to
1421.Sq Yes ,
1422adds an additional step before building port that
1423searches for KDE-specific calls of GETTEXT_PROCESS_PO_FILES()
1424CMake command and tweaks them to be compatible with the one from
1425FindGettext.cmake module provided by CMake itself.
1426Defaults to
1427.Sq Yes .
1428.It Ev MODKDE4_SYSCONF_FILES
1429Some KDE ports install files under
1430.Pa ${SYSCONFDIR} .
1431We want to have them under
1432.Ev ${PREFIX}/share/examples
1433or such, and just be @sample'd under
1434.Pa ${SYSCONFDIR} .
1435So add
1436.Sq file/dir destination
1437pairs to this variable, and appropriate @sample lines to packing list, e.g.:
1438.Bd -literal -offset indent
1439# in Makefile:
1440MODKDE4_SYSCONF_FILES = dbus-1      share/examples
1441
1442# in PLIST:
1443share/examples/dbus-1/system.d/org.kde.baloo.filewatch.conf
1444@sample ${SYSCONFDIR}/dbus-1/system.d/org.kde.baloo.filewatch.conf
1445.Ed
1446.El
1447.Pp
1448The following variables are mostly used only inside KDE4 SC:
1449.Bl -tag -width KDE4LIB
1450.It MODKDE4_LIB_LINKS
1451If set to
1452.Sq Yes ,
1453soft links for shared libraries in
1454.Pa ${PREFIX}/lib
1455to
1456.Pa ${MODKDE4_LIB_DIR}
1457will be created.
1458Used to distinguish libraries from different KDE versions (3, 4...).
1459Defaults to
1460.Sq No .
1461.It KDE4_ONLY
1462If set to
1463.Sq Yes ,
1464sets the
1465.Xr dpb 1
1466tag to
1467.Sq kde4 .
1468Defaults to
1469.Sq No
1470when
1471.Ev MODKDE4_USE
1472is empty, and to
1473.Sq Yes
1474otherwise.
1475.El
1476.Pp
1477The following variables are likely to be used only outside KDE4 SC:
1478.Bl -tag -width KDE4LIB
1479.It MODKDE4_NO_QT
1480If set to
1481.Sq Yes ,
1482avoids automatic addition of x11/qt4 to
1483.Ev MODULES .
1484.El
1485.Pp
1486The x11/kde4 module supports co-existence of different KDE4 SC version
1487ports subtrees.
1488There always is a so-called stable tree in
1489.Pa ${PORTSDIR}/x11/kde4
1490and additional trees are placed in
1491.Pa ${PORTSDIR}/x11/kdeXYZ ,
1492where
1493.Sq XYZ
1494correspond to the
1495.Sq X.Y.Z
1496KDE version.
1497So, say, KDE 4.12.4 tree should be placed in
1498.Pa ${PORTSDIR}/x11/kde4124
1499directory.
1500The process of preparing a new KDE SC version subtree is automated,
1501just use kde-release-helper script:
1502.Bd -literal -offset indent
1503cd ${PORTSDIR}/x11/kde4
1504\&./kde-release-helper prepare 4.12.4
1505.Ed
1506This will copy the x11/kde4 subtree to x11/kde4124 and strip it:
1507remove
1508.Ev REVISION
1509marks, remove distinfo files and so on.
1510.Pp
1511To access the new version then you'll need to add appropriate
1512values at the top of x11/kde4 module file itself.
1513Then you be able to use automatically created
1514.Sq kdeXYZ
1515.Ev FLAVOR
1516to reference corresponding KDE4 SC version outside x11/kde4*.
1517.Pp
1518The x11/kde4 module sets the following variables unless they're already
1519set by a port:
1520.Ev CONFIGURE_STYLE ,
1521.Ev EXTRACT_SUFX ,
1522.Ev ONLY_FOR_ARCHS ,
1523.Ev PORTHOME ,
1524.Ev SEPARATE_BUILD
1525and
1526.Ev SHARED_ONLY .
1527.Pp
1528The x11/kde4 module modifies the following variables if needed:
1529.Ev BUILD_DEPENDS ,
1530.Ev CONFIGURE_ARGS ,
1531.Ev CONFIGURE_ENV ,
1532.Ev LIB_DEPENDS ,
1533.Ev RUN_DEPENDS ,
1534and
1535.Ev WANTLIB .
1536.Pp
1537The x11/kde4 module automatically adds devel/cmake to
1538.Ev MODULES
1539unless
1540.Ev NO_BUILD
1541is set to
1542.Sq Yes .
1543The x11/kde4 module automatically adds x11/qt4 to
1544.Ev MODULES
1545unless
1546.Ev MODKDE4_NO_QT
1547is set to
1548.Sq Yes .
1549The x11/kde4 module automatically adds gcc4 to
1550.Ev MODULES
1551unless
1552.Ev MODKDE4_RESOURCES
1553is set to
1554.Sq Yes .
1555.It x11/qt3 and x11/qt4
1556Both qt modules share a common
1557.Ev MODQT_*
1558namespace for simple ports.
1559The qt3 module also defines the same variables under
1560.Ev MODQT3_*
1561and the qt4 module also defines the same variables under
1562.Ev MODQT4_* ,
1563to allow ports to use both modules, such as
1564.Pa print/poppler .
1565.Pp
1566Those modules define
1567.Ev MODQT*_LIBDIR
1568as the libraries location,
1569.Ev MODQT*_INCDIR
1570as the include files location ,
1571.Ev MODQT*_QTDIR
1572as the global qt directory location ,
1573.Ev MODQT*_CONFIGURE_ARGS
1574as standard GNU configure-style parameters to locate the include and libraries.
1575.Pp
1576The location of qt specific tools
1577.Nm moc
1578and
1579.Nm uic
1580is available through
1581.Ev MODQT*_MOC
1582and
1583.Ev MODQT*_UIC .
1584.Ev MODQT*_OVERRIDE_UIC
1585controls whether the default setup will force a value of
1586.Ev UIC
1587or not.
1588The value of
1589.Ev MOC
1590is always forced to ${MODQT*_MOC}.
1591qt4 includes
1592.Xr pkg-config 1
1593files under a specific location recorded in
1594.Ev MODQT_PKG_CONFIG_PATH .
1595qt3 requires the use of
1596.Ev MODQT3_PLUGINS
1597to correctly locate plugins.
1598.Pp
1599The modules add to
1600.Ev CONFIGURE_ENV , MAKE_ENV
1601and
1602.Ev MAKE_FLAGS .
1603They define appropriate
1604.Ev MODQT*_LIB_DEPENDS
1605and
1606.Ev MODQT*_WANTLIB .
1607Note that qt4 has split its code over several libraries, so the basic
1608.Ev WANTLIB
1609only refers to QtCore.
1610Other libraries should be added as needed.
1611.It x11/tk
1612Sets
1613.Ev MODTK_VERSION ,
1614.Ev MODTK_BIN ,
1615.Ev MODTK_INCDIR ,
1616.Ev MODTK_LIBDIR ,
1617.Ev MODTK_BUILD_DEPENDS ,
1618.Ev MODTK_RUN_DEPENDS ,
1619.Ev MODTK_LIB ,
1620.Ev MODTK_LIB_DEPENDS ,
1621and
1622.Ev MODTK_CONFIG .
1623.Ev MODTK_VERSION
1624is the default version used by all Tk ports and
1625may be overridden.
1626Automatically adds the
1627.Pa lang/tcl
1628module, provides a default
1629.Ev MODTCL_VERSION
1630to match
1631.Ev MODTK_VERSION ,
1632and affects
1633.Ev CATEGORIES
1634and
1635.Ev SUBST_VARS .
1636Note the
1637.Ev MODTCL_WISH_ADJ
1638shell fragment in the
1639.Pa lang/tcl
1640module.
1641.It x11/xfce4
1642Sets
1643.Ev DIST_SUBDIR ,
1644.Ev EXTRACT_SUFX ,
1645.Ev CONFIGURE_STYLE ,
1646.Ev CONFIGURE_ENV
1647and
1648.Ev USE_GMAKE .
1649If
1650.Ev MODXFCE_ICON_CACHE
1651is set to yes, it adds
1652.Pa x11/gtk+2,-guic
1653to
1654.Ev RUN_DEPENDS .
1655Unless
1656.Ev XFCE_NO_SRC
1657is set,
1658.Pa devel/gettext
1659and
1660.Pa textproc/intltool
1661are added to
1662.Ev MODULES .
1663Also affects
1664.Ev CATEGORIES .
1665.Pp
1666Xfce ports can be divided into five categories: core libraries and
1667applications, goodies, artwork, thunar plugins, and panel plugins.
1668.Ev HOMEPAGE ,
1669.Ev MASTER_SITES
1670and
1671.Ev DISTNAME
1672are built using
1673.Ev XFCE_VERSION
1674(which defaults to
1675.Ev XFCE_DESKTOP_VERSION
1676if not set) and either
1677.Ev XFCE_PROJECT ,
1678.Ev XFCE_GOODIE ,
1679.Ev XFCE_ARTWORK ,
1680.Ev THUNAR_PLUGIN
1681or
1682.Ev XFCE_PLUGIN .
1683One of the latter has to be provided by the port Makefile.
1684.El
1685.Sh SEE ALSO
1686.Xr make 1 ,
1687.Xr bsd.port.mk 5 ,
1688.Xr ports 7
1689