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