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