pkgsrc/mk
jlam 85306a8348 bsd.options.mk provides boilerplate code for standard naming conventions
for handling per-package build options.

Before including this file, the following variables should be defined:

	PKG_OPTIONS_VAR
		This is a list of the name of the make(1) variables that
		contain the options the user wishes to select.  This
		variable should be set in a package Makefile.  E.g.,

			PKG_OPTIONS_VAR=	WIBBLE_OPTIONS
		or
			PKG_OPTIONS_VAR=	FOO_OPTIONS BAR_OPTIONS

	PKG_SUPPORTED_OPTIONS
		This is a list of build options supported by the package.
		This variable should be set in a package Makefile.  E.g.,

			PKG_SUPPORTED_OPTIONS=	kerberos ldap ssl

Optionally, the following variables may also be defined:

	PKG_DEFAULT_OPTIONS
		This is a list the options that should be built into
		every package, if that option is supported.  This
		variable should be set in /etc/mk.conf.

	${PKG_OPTIONS_VAR} (the variables named in PKG_OPTIONS_VAR)
		These variables list the selected build options and
		override any default options given in PKG_DEFAULT_OPTIONS.
		If any of the options begin with a '-', then that option
		is always removed from the selected build options, e.g.

			PKG_DEFAULT_OPTIONS=	kerberos ldap sasl
			PKG_OPTIONS_VAR=	WIBBLE_OPTIONS
			WIBBLE_OPTIONS=		${PKG_DEFAULT_OPTIONS} -sasl
			# implies PKG_OPTIONS == "kerberos ldap"
		or
			PKG_OPTIONS_VAR=	WIBBLE_OPTIONS
			WIBBLE_OPTIONS=		kerberos -ldap ldap
			# implies PKG_OPTIONS == "kerberos"

		This variable should be set in /etc/mk.conf.

	PKG_FAIL_UNSUPPORTED_OPTIONS
		If this is set to "yes", then the presence of unsupported
		options in PKG_OPTIONS.<pkg> (see below) causes the build
		to fail.  Set this to "no" to silently ignore unsupported
		options.  Default: "yes".

After including this file, the following variables are defined:

	PKG_OPTIONS
		This is the list of the selected build options, properly
		filtered to remove unsupported and duplicate options.

Example usage:

-------------8<-------------8<-------------8<-------------8<-------------
# Global and legacy options
.if defined(USE_OPENLDAP) || defined(USE_SASL2)
.  if !defined(PKG_OPTIONS.wibble)
.    if defined(USE_OPENLDAP) && !empty(USE_OPENLDAP:M[yY][eE][sS])
PKG_OPTIONS.wibble+=	ldap
.    endif
.    if defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
PKG_OPTIONS.wibble+=	sasl
.    endif
.  endif
.endif

PKG_OPTIONS_VAR=	PKG_OPTIONS.wibble
PKG_SUPPORTED_OPTIONS=	ldap sasl
.include "../../mk/bsd.options.mk"

# Package-specific option-handling

###
### LDAP support
###
.if !empty(PKG_OPTIONS:Mldap)
.  include "../../databases/openldap/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-ldap=${BUILDLINK_PREFIX.openldap}
.endif

###
### SASL authentication
###
.if !empty(PKG_OPTIONS:Msasl)
.  include "../../security/cyrus-sasl2/buildlink3.mk"
CONFIGURE_ARGS+=	--enable-sasl=${BUILDLINK_PREFIX.sasl}
.endif
-------------8<-------------8<-------------8<-------------8<-------------
2004-07-30 20:59:08 +00:00
..
buildlink3 Update documentation for the current state of buildlink3. 2004-07-30 20:52:44 +00:00
bulk correctly use PKG_SUFX instead of ".tgz". 2004-07-25 08:40:46 +00:00
compiler Retire buildlink2, now that all packages using it have been converted to 2004-07-06 22:49:16 +00:00
gnu-config Symlink the libtool-1.4.m4 file into any directory in which there's a 2004-02-20 09:58:49 +00:00
install Replace test -e with -d and -f respectively. 2004-07-10 20:42:37 +00:00
scripts Retire buildlink2, now that all packages using it have been converted to 2004-07-06 22:49:16 +00:00
AIX.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
apache.mk Retire buildlink2, now that all packages using it have been converted to 2004-07-06 22:49:16 +00:00
autoconf.mk Symlink the libtool-1.4.m4 file into any directory in which there's a 2004-02-20 09:58:49 +00:00
automake.mk Remove traces of automake-1.7. 2004-03-27 23:05:07 +00:00
bdb.buildlink3.mk provide BUILDLINK_{CPPFLAGS,LDFLAGS,LIBS}.bdb, taken from whichever db 2004-07-10 03:05:46 +00:00
bsd.options.mk bsd.options.mk provides boilerplate code for standard naming conventions 2004-07-30 20:59:08 +00:00
bsd.pkg.defaults.mk Add a new variable to specify the installation prefix for 2004-07-30 07:48:56 +00:00
bsd.pkg.install.mk Be explicit about the fact that USE_PKGINSTALL has to be set to YES 2004-07-10 20:54:44 +00:00
bsd.pkg.mk Make the option to resume transfer optional, as suggested by 2004-07-27 15:56:19 +00:00
bsd.pkg.obsolete.mk Add a reminder that the old Postfix make variables will be removed after 2004-07-21 16:19:26 +00:00
bsd.pkg.subdir.mk There is no need to use "echo -n" in production of HTML. 2004-04-07 14:14:12 +00:00
bsd.prefs.mk bsd.options.mk provides boilerplate code for standard naming conventions 2004-07-30 20:59:08 +00:00
bsd.sites.mk Readd two mirros which apparently still exist. 2004-07-28 07:35:35 +00:00
BSDOS.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
compiler.mk Re-add USE_PKGSRC_GCC, and document it should only be 2004-07-04 00:38:15 +00:00
curses.buildlink3.mk Fix serious bug where BUILDLINK_PACKAGES wasn't being ordered properly 2004-03-18 09:12:08 +00:00
Darwin.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
Darwin.x11.dist Don't register share/pixmaps; it's now properly handled by xdg-dirs and 2004-03-08 19:43:13 +00:00
defs.AIX.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
defs.BSDOS.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
defs.Darwin.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
defs.FreeBSD.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
defs.Interix.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
defs.IRIX.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
defs.Linux.mk Use shell builtins where possible, particularly for TEST. 2004-06-27 22:54:21 +00:00
defs.NetBSD.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
defs.OpenBSD.mk Enable _OPSYS_MAX_CMDLEN test. 2004-07-21 21:50:41 +00:00
defs.SunOS.mk use built-in test(1) now that bsd.pkg.mk is ${TEST} -e free. 2004-07-03 22:04:57 +00:00
defs.UnixWare.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
dirs.mk Depend on xorg-dirs where appropiate, as was done for XFree86 by jmmv@. 2004-07-29 07:27:43 +00:00
emacs.mk Merge pkgviews-mk branch into the HEAD by running: 2003-09-02 06:59:37 +00:00
endian.mk If we're passing through MAKEFLAGS variables whose values may contain 2004-02-06 19:04:24 +00:00
fonts.mk Use ttmkfdir2 by default. 2004-03-29 22:13:47 +00:00
FreeBSD.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
FreeBSD.x11.dist Don't register share/pixmaps; it's now properly handled by xdg-dirs and 2004-03-08 19:43:13 +00:00
ghostscript.mk Prefer the -esp and -esp-nox11 versions of ghostscript when USE_CUPS is YES. 2004-03-10 16:53:50 +00:00
Interix.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
Interix.x11.dist Use numeric uid/gid instead of Administrator/+Administrators, as native 2004-05-05 14:37:21 +00:00
IRIX.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
IRIX.x11.dist Don't register share/pixmaps; it's now properly handled by xdg-dirs and 2004-03-08 19:43:13 +00:00
java-env.mk Lets be pkgviews friendly: create the bin directory when installing wrappers. 2004-05-23 10:29:43 +00:00
java-vm.mk jdk12 was never here. "avert your eyes." 2004-07-29 14:43:16 +00:00
krb5.buildlink3.mk Make mit-krb5 into an accepted Kerberos 5 distribution. 2004-03-30 18:09:43 +00:00
Linux.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
Linux.x11.dist Don't register share/pixmaps; it's now properly handled by xdg-dirs and 2004-03-08 19:43:13 +00:00
motif.buildlink3.mk Remove Motif 1.2 functionality. 2004-06-18 11:22:41 +00:00
NetBSD.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
NetBSD.x11.dist Don't register share/pixmaps; it's now properly handled by xdg-dirs and 2004-03-08 19:43:13 +00:00
OpenBSD.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
OpenBSD.x11.dist Don't register share/pixmaps; it's now properly handled by xdg-dirs and 2004-03-08 19:43:13 +00:00
ossaudio.buildlink3.mk Fix serious bug where BUILDLINK_PACKAGES wasn't being ordered properly 2004-03-18 09:12:08 +00:00
pgsql.buildlink3.mk Export the according BUILDLINK_PREFIX of postgresql-lib as PGSQL_PREFIX. 2004-07-24 10:40:15 +00:00
pthread.buildlink3.mk eww, replace another [ with ${TEST}. 2004-07-27 11:30:55 +00:00
subst.mk Usually there's no need to keep the original version of a file 2004-06-06 04:22:23 +00:00
SunOS.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
SunOS.x11.dist Don't register share/pixmaps; it's now properly handled by xdg-dirs and 2004-03-08 19:43:13 +00:00
texinfo.mk Insure that the install-info we found is not one provided by the gtexinfo 2003-10-07 09:09:56 +00:00
tools.mk make the TBL variable work as intended 2004-07-22 17:02:22 +00:00
UnixWare.pkg.dist Add the 'et_EE' and 'it_NA' locale directories, used by amule-2.0. 2004-07-26 14:31:10 +00:00
xaw.buildlink3.mk xaw for buildlink3. 2004-04-11 23:35:16 +00:00