2006-05-31 20:54:32 +02:00
# $NetBSD: bsd.options.mk,v 1.53 2006/05/31 18:54:32 ghen Exp $
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 22:59:08 +02:00
#
# This Makefile fragment provides boilerplate code for standard naming
# conventions for handling per-package build options.
#
2005-05-08 15:43:30 +02:00
# Before including this file, the following variables can be defined:
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 22:59:08 +02:00
#
2005-06-03 16:25:47 +02:00
# PKG_SUPPORTED_OPTIONS
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 22:59:08 +02:00
# 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
#
2005-06-09 00:36:52 +02:00
# PKG_OPTIONS_VAR (must be defined)
2005-05-08 15:43:30 +02:00
# The variable the user can set to enable or disable
# options specifically for this package.
#
2005-06-02 22:38:09 +02:00
# PKG_OPTIONS_OPTIONAL_GROUPS
2005-07-26 11:00:42 +02:00
# This is a list of names of groups of mutually exclusive
2005-06-02 22:38:09 +02:00
# options. The options in each group are listed in
# PKG_OPTIONS_GROUP.<groupname>. The most specific
# setting of any option from the group takes precedence
2005-06-02 22:43:55 +02:00
# over all other options in the group. Options from
2005-06-02 22:38:09 +02:00
# the groups will be automatically added to
2005-07-28 15:22:08 +02:00
# PKG_SUPPORTED_OPTIONS.
2005-06-02 22:38:09 +02:00
#
# PKG_OPTIONS_REQUIRED_GROUPS
# Like PKG_OPTIONS_OPTIONAL_GROUPS, but building
# the packages will fail if no option from the group
# is selected.
#
2005-07-26 11:00:42 +02:00
# PKG_OPTIONS_NONEMPTY_SETS
# This is a list of names of sets of options. At
# least one option from each set must be selected.
# The options in each set are listed in
# PKG_OPTIONS_SET.<setname>. Options from the sets
# will be automatically added to PKG_SUPPORTED_OPTIONS.
#
2005-05-08 15:43:30 +02:00
# PKG_SUGGESTED_OPTIONS (defaults to empty)
# This is a list of build options which are enabled by default.
#
2005-05-25 13:18:35 +02:00
# PKG_OPTIONS_LEGACY_VARS
2005-05-08 15:43:30 +02:00
# This is a list of USE_VARIABLE:option pairs that
# map legacy /etc/mk.conf variables to their option
# counterparts.
2005-05-31 13:05:31 +02:00
#
# PKG_OPTIONS_LEGACY_OPTS
# This is a list of old-option:new-option pairs that
# map options that have been renamed to their new
# counterparts.
2005-06-03 16:25:47 +02:00
#
2005-06-06 15:54:51 +02:00
# PKG_LEGACY_OPTIONS
# A list of options implied by deprecated variables
# used. This can be used for cases that neither
# PKG_OPTIONS_LEGACY_VARS nor PKG_OPTIONS_LEGACY_OPTS
# can handle, e. g. when PKG_OPTIONS_VAR is renamed.
#
# PKG_OPTIONS_DEPRECATED_WARNINGS
# A list of warnings about deprecated variables or
# options used, and what to use instead.
#
2005-07-26 11:00:42 +02:00
# If none of PKG_SUPPORTED_OPTIONS, PKG_OPTIONS_OPTIONAL_GROUPS,
# PKG_OPTIONS_REQUIRED_GROUPS, and PKG_OPTIONS_NONEMPTY_SETS are
# defined, PKG_OPTIONS is set to the empty list and the package
# is otherwise treated as not using the options framework.
2005-11-14 05:25:50 +01:00
#
2005-05-08 15:43:30 +02:00
#
# Optionally, the user may define the following variables in /etc/mk.conf:
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 22:59:08 +02:00
#
# PKG_DEFAULT_OPTIONS
2005-05-08 15:43:30 +02:00
# This variable can be used to override default
# options for every package. Options listed in this
# variable will be enabled in every package that
# supports them. If you prefix an option with `-',
# it will be disabled in every package.
#
# ${PKG_OPTIONS_VAR}
# This variable can be used to override default
# options and options listed in PKG_DEFAULT_OPTIONS.
# The syntax is the same as PKG_DEFAULT_OPTIONS.
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 22:59:08 +02:00
#
# 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<-------------
2005-05-19 03:15:57 +02:00
# PKG_OPTIONS_VAR= PKG_OPTIONS.wibble
2005-05-31 13:05:31 +02:00
# PKG_SUPPORTED_OPTIONS= wibble-foo ldap sasl
2005-06-04 12:11:24 +02:00
# PKG_OPTIONS_OPTIONAL_GROUPS= database
# PKG_OPTIONS_GROUP.database= mysql pgsql
2005-05-31 13:05:31 +02:00
# PKG_SUGGESTED_OPTIONS= wibble-foo
2005-05-08 15:43:30 +02:00
# PKG_OPTIONS_LEGACY_VARS+= WIBBLE_USE_OPENLDAP:ldap
# PKG_OPTIONS_LEGACY_VARS+= WIBBLE_USE_SASL2:sasl
2005-05-31 13:05:31 +02:00
# PKG_OPTIONS_LEGACY_OPTS+= foo:wibble-foo
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 22:59:08 +02:00
#
2005-06-06 15:54:51 +02:00
# # this package was previously named wibble2
# .include "../../mk/bsd.prefs.mk"
#
# .if defined(PKG_OPTIONS.wibble2)
# PKG_LEGACY_OPTIONS+= ${PKG_OPTIONS.wibble2}
2005-06-08 18:19:08 +02:00
# PKG_OPTIONS_DEPRECATED_WARNINGS+="Deprecated variable PKG_OPTIONS.wibble2 used, use "${PKG_OPTIONS_VAR:Q}" instead."
2005-06-06 15:54:51 +02:00
# .endif
#
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 22:59:08 +02:00
# .include "../../mk/bsd.options.mk"
#
# # Package-specific option-handling
#
2005-05-08 15:43:30 +02:00
# ###
# ### FOO support
# ###
2005-05-31 13:05:31 +02:00
# .if !empty(PKG_OPTIONS:Mwibble-foo)
2005-05-08 15:43:30 +02:00
# CONFIGURE_ARGS+= --enable-foo
# .endif
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 22:59:08 +02:00
# ###
# ### LDAP support
# ###
# .if !empty(PKG_OPTIONS:Mldap)
2006-05-31 20:54:32 +02:00
# . include "../../databases/openldap-client/buildlink3.mk"
# CONFIGURE_ARGS+= --enable-ldap=${BUILDLINK_PREFIX.openldap-client}
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 22:59:08 +02:00
# .endif
#
# ###
# ### SASL authentication
# ###
# .if !empty(PKG_OPTIONS:Msasl)
2006-04-13 23:45:12 +02:00
# . include "../../security/cyrus-sasl/buildlink3.mk"
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 22:59:08 +02:00
# CONFIGURE_ARGS+= --enable-sasl=${BUILDLINK_PREFIX.sasl}
# .endif
2005-06-02 22:38:09 +02:00
#
# ###
# ### database support
# ###
# .if !empty(PKG_OPTIONS:Mmysql)
# . include "../../mk/mysql.buildlink3.mk"
# .endif
# .if !empty(PKG_OPTIONS:Mpgsql)
# . include "../../mk/pgsql.buildlink3.mk"
# .endif
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 22:59:08 +02:00
# -------------8<-------------8<-------------8<-------------8<-------------
. i n c l u d e "../../mk/bsd.prefs.mk"
2005-05-14 04:17:43 +02:00
# Define PKG_OPTIONS, no matter if we have an error or not, to suppress
# further make(1) warnings.
PKG_OPTIONS = # empty
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 22:59:08 +02:00
# Check for variable definitions required before including this file.
2005-06-11 18:12:13 +02:00
. i f ! d e f i n e d ( P K G _ O P T I O N S _ V A R )
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 22:59:08 +02:00
PKG_FAIL_REASON += "bsd.options.mk: PKG_OPTIONS_VAR is not defined."
2005-07-26 11:00:42 +02:00
. e l i f ! d e f i n e d ( P K G _ S U P P O R T E D _ O P T I O N S ) & & ! d e f i n e d ( P K G _ O P T I O N S _ O P T I O N A L _ G R O U P S ) & & ! d e f i n e d ( P K G _ O P T I O N S _ R E Q U I R E D _ G R O U P S ) & & ! d e f i n e d ( P K G _ O P T I O N S _ N O N E M P T Y _ S E T S )
2005-06-11 18:12:13 +02:00
# no supported options: set PKG_OPTIONS to empty and skip rest of file
PKG_OPTIONS = #empty
2005-05-14 04:17:43 +02:00
. e l s e # process the rest of the file
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 22:59:08 +02:00
2005-06-02 22:38:09 +02:00
#
2005-07-28 15:22:08 +02:00
# create map of option to group and add group options to PKG_SUPPORTED_OPTIONS
2005-06-02 22:38:09 +02:00
#
2005-06-04 18:30:19 +02:00
. f o r _ g r p _ i n $ { P K G _ O P T I O N S _ O P T I O N A L _ G R O U P S } $ { P K G _ O P T I O N S _ R E Q U I R E D _ G R O U P S }
_PKG_OPTIONS_GROUP_STACK.${_grp_} := #empty
2005-07-26 18:09:34 +02:00
. i f ! d e f i n e d ( P K G _ O P T I O N S _ G R O U P . $ { _ g r p _ } ) | | e m p t y ( P K G _ O P T I O N S _ G R O U P . $ { _ g r p _ } )
2005-07-26 11:00:42 +02:00
PKG_FAIL_REASON := "bsd.options.mk: PKG_OPTIONS_GROUP." ${ _grp_ : Q } " must be non-empty."
. e n d i f
2005-06-04 18:30:19 +02:00
. f o r _ o p t _ i n $ { P K G _ O P T I O N S _ G R O U P . $ { _ g r p _ } }
2005-06-02 22:38:09 +02:00
PKG_SUPPORTED_OPTIONS += ${ _opt_ }
2005-06-04 18:30:19 +02:00
_PKG_OPTIONS_GROUP_MAP.${_opt_} = ${ _grp_ }
2005-06-02 22:38:09 +02:00
. e n d f o r
. e n d f o r
2005-07-26 11:00:42 +02:00
#
# add options from sets to PKG_SUPPORTED_OPTIONS
#
_PKG_OPTIONS_ALL_SETS := #empty
. f o r _ s e t _ i n $ { P K G _ O P T I O N S _ N O N E M P T Y _ S E T S }
2005-07-28 17:17:55 +02:00
. i f ! d e f i n e d ( P K G _ O P T I O N S _ S E T . $ { _ s e t _ } ) | | e m p t y ( P K G _ O P T I O N S _ S E T . $ { _ s e t _ } )
2005-07-26 11:00:42 +02:00
PKG_FAIL_REASON := "bsd.options.mk: PKG_OPTIONS_SET." ${ _set_ : Q } " must be non-empty."
. e n d i f
. f o r _ o p t _ i n $ { P K G _ O P T I O N S _ S E T . $ { _ s e t _ } }
PKG_SUPPORTED_OPTIONS += ${ _opt_ }
_PKG_OPTIONS_ALL_SETS += ${ _opt_ }
. e n d f o r
. e n d f o r
2005-06-02 23:55:05 +02:00
#
# include deprecated variable to options mapping
#
. i n c l u d e "${.CURDIR}/../../mk/defaults/obsolete.mk"
2005-06-02 22:38:09 +02:00
#
2005-07-26 11:00:42 +02:00
# place options implied by legacy variables in PKG_LEGACY_OPTIONS
2005-06-02 22:38:09 +02:00
#
2005-05-08 15:43:30 +02:00
. f o r _ m _ i n $ { P K G _ O P T I O N S _ L E G A C Y _ V A R S }
2005-05-25 13:18:35 +02:00
_var_ := ${ _m_ : C / : .*// }
_opt_ := ${ _m_ : C /.* : // }
2005-06-01 15:40:14 +02:00
_popt_ := ${ _opt_ : C /^-// }
2005-05-25 13:18:35 +02:00
. if !empty(PKG_SUPPORTED_OPTIONS : M ${_popt_ })
2005-05-31 18:03:41 +02:00
. i f d e f i n e d ( $ { _ v a r _ } )
. if empty(${_var_} : M [nN ][oO ])
2005-06-06 15:54:51 +02:00
PKG_LEGACY_OPTIONS := ${ PKG_LEGACY_OPTIONS } ${ _opt_ }
2005-09-05 17:24:08 +02:00
PKG_OPTIONS_DEPRECATED_WARNINGS := ${ PKG_OPTIONS_DEPRECATED_WARNINGS } "Deprecated variable " ${ _var_ : Q } " set to " ${ ${ _var_ } : Q } ", use PKG_DEFAULT_OPTIONS+=" ${ _opt_ : Q } " instead."
2005-05-31 18:03:41 +02:00
. elif empty(_opt_ : M -*)
2005-06-06 15:54:51 +02:00
PKG_LEGACY_OPTIONS := ${ PKG_LEGACY_OPTIONS } -${ _popt_ }
2005-09-05 17:24:08 +02:00
PKG_OPTIONS_DEPRECATED_WARNINGS := ${ PKG_OPTIONS_DEPRECATED_WARNINGS } "Deprecated variable " ${ _var_ : Q } " set to " ${ ${ _var_ } : Q } ", use PKG_DEFAULT_OPTIONS+=-" ${ _popt_ : Q } " instead."
2005-05-31 18:03:41 +02:00
. e l s e
2005-06-06 15:54:51 +02:00
PKG_LEGACY_OPTIONS := ${ PKG_LEGACY_OPTIONS } ${ _popt_ }
2005-09-05 17:24:08 +02:00
PKG_OPTIONS_DEPRECATED_WARNINGS := ${ PKG_OPTIONS_DEPRECATED_WARNINGS } "Deprecated variable " ${ _var_ : Q } " set to " ${ ${ _var_ } : Q } ", use PKG_DEFAULT_OPTIONS+=" ${ _popt_ : Q } " instead."
2005-05-31 18:03:41 +02:00
. e n d i f
2005-05-25 13:18:35 +02:00
. e n d i f
. e n d i f
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 22:59:08 +02:00
. e n d f o r
2005-05-25 13:18:35 +02:00
. u n d e f _ v a r _
. u n d e f _ o p t _
. u n d e f _ p o p t _
2005-05-08 15:43:30 +02:00
2005-06-02 22:38:09 +02:00
#
# create map of old option name to new option name for legacy options
#
2005-05-31 13:05:31 +02:00
. f o r _ m _ i n $ { P K G _ O P T I O N S _ L E G A C Y _ O P T S }
_old_ := ${ _m_ : C / : .*// }
_new_ := ${ _m_ : C /.* : // }
. if !empty(PKG_SUPPORTED_OPTIONS : M ${_new_ })
_PKG_LEGACY_OPTMAP.${_old_} := ${ _new_ }
. e n d i f
. e n d f o r
. u n d e f _ o l d _
. u n d e f _ n e w _
2005-05-28 14:14:34 +02:00
#
# filter unsupported options from PKG_DEFAULT_OPTIONS
#
2005-06-09 20:44:26 +02:00
_OPTIONS_DEFAULT_SUPPORTED := #empty
2005-05-28 14:14:34 +02:00
. f o r _ o _ i n $ { P K G _ D E F A U L T _ O P T I O N S }
_opt_ := ${ _o_ }
_popt_ := ${ _opt_ : C /^-// }
2005-05-31 13:05:31 +02:00
.if !empty(PKG_SUPPORTED_OPTIONS : M ${_popt_ }) \
|| defined( _PKG_LEGACY_OPTMAP.${ _popt_ } )
2005-05-28 14:14:34 +02:00
_OPTIONS_DEFAULT_SUPPORTED := ${ _OPTIONS_DEFAULT_SUPPORTED } ${ _opt_ }
. e n d i f
. e n d f o r
. u n d e f _ o p t _
. u n d e f _ p o p t _
2005-05-08 15:43:30 +02:00
#
2005-05-16 11:08:29 +02:00
# process options from generic to specific
#
2005-05-28 14:14:34 +02:00
PKG_OPTIONS := # empty
_OPTIONS_UNSUPPORTED := #empty
2005-06-06 15:54:51 +02:00
. f o r _ o _ i n $ { P K G _ S U G G E S T E D _ O P T I O N S } $ { P K G _ L E G A C Y _ O P T I O N S } \
2005-05-28 14:14:34 +02:00
${ _OPTIONS_DEFAULT_SUPPORTED } ${ ${ PKG_OPTIONS_VAR } }
2005-05-16 11:08:29 +02:00
_opt_ := ${ _o_ }
2005-05-28 14:14:34 +02:00
_popt_ := ${ _o_ : C /^-// } # positive option
2005-05-31 13:05:31 +02:00
. i f d e f i n e d ( _ P K G _ L E G A C Y _ O P T M A P . $ { _ p o p t _ } )
2005-07-19 11:28:50 +02:00
PKG_OPTIONS_DEPRECATED_WARNINGS := ${ PKG_OPTIONS_DEPRECATED_WARNINGS } "Deprecated option " ${ _popt_ : Q } " used, use option " ${ _PKG_LEGACY_OPTMAP . ${ _popt_ } : Q } " instead."
2005-05-31 13:05:31 +02:00
_popt_ := ${ _PKG_LEGACY_OPTMAP . ${ _popt_ } }
. if empty(_opt_ : M -*)
_opt_ := ${ _popt_ }
. e l s e
_opt_ := -${ _popt_ }
. e n d i f
. e n d i f
2005-05-28 14:14:34 +02:00
. if empty(PKG_SUPPORTED_OPTIONS : M ${_popt_ })
_OPTIONS_UNSUPPORTED := ${ _OPTIONS_UNSUPPORTED } ${ _opt_ }
. e l s e
2005-06-02 22:38:09 +02:00
. i f d e f i n e d ( _ P K G _ O P T I O N S _ G R O U P _ M A P . $ { _ p o p t _ } )
2005-06-04 18:30:19 +02:00
_grp_ := ${ _PKG_OPTIONS_GROUP_MAP . ${ _popt_ } }
_stk_ := _PKG_OPTIONS_GROUP_STACK.${ _grp_ }
2005-06-02 22:38:09 +02:00
_cnt_ := ${ ${ _stk_ } }
. if !empty(_opt_ : M -*)
${_stk_} := ${ _cnt_ : N ${ _popt_ } }
. e l s e
${_stk_} := ${ _cnt_ } ${ _popt_ }
. e n d i f
2005-05-28 14:14:34 +02:00
. e l s e
2005-06-02 22:38:09 +02:00
. if !empty(_opt_ : M -*)
PKG_OPTIONS := ${ PKG_OPTIONS : N ${ _popt_ } }
. e l s e
2005-05-16 11:08:29 +02:00
PKG_OPTIONS := ${ PKG_OPTIONS } ${ _popt_ }
2005-06-02 22:38:09 +02:00
. e n d i f
2005-05-28 14:14:34 +02:00
. e n d i f
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 22:59:08 +02:00
. e n d i f
. e n d f o r
2005-05-25 13:18:35 +02:00
. u n d e f _ o p t _
. u n d e f _ p o p t _
2005-06-02 22:38:09 +02:00
. u n d e f _ s t k _
2005-06-04 18:30:19 +02:00
. f o r _ g r p _ i n $ { P K G _ O P T I O N S _ R E Q U I R E D _ G R O U P S }
. i f e m p t y ( _ P K G _ O P T I O N S _ G R O U P _ S T A C K . $ { _ g r p _ } )
PKG_FAIL_REASON := "One of the following options must be selected: " ${ PKG_OPTIONS_GROUP . ${ _grp_ } : O : u : Q }
2005-06-02 22:38:09 +02:00
. e n d i f
. e n d f o r
2005-06-04 18:30:19 +02:00
. f o r _ g r p _ i n $ { P K G _ O P T I O N S _ R E Q U I R E D _ G R O U P S } $ { P K G _ O P T I O N S _ O P T I O N A L _ G R O U P S }
2005-06-02 22:38:09 +02:00
. u n d e f _ o p t _
2005-06-04 18:30:19 +02:00
. f o r _ o _ i n $ { _ P K G _ O P T I O N S _ G R O U P _ S T A C K . $ { _ g r p _ } }
2005-06-02 22:38:09 +02:00
_opt_ := ${ _o_ }
. e n d f o r
. i f d e f i n e d ( _ o p t _ )
PKG_OPTIONS := ${ PKG_OPTIONS } ${ _opt_ }
. e n d i f
. e n d f o r
. u n d e f _ o p t _
2005-05-28 14:14:34 +02:00
2005-07-26 11:00:42 +02:00
. f o r _ s e t _ i n $ { P K G _ O P T I O N S _ N O N E M P T Y _ S E T S }
_ISEMPTY := true
2005-07-28 17:17:55 +02:00
. f o r _ o p t _ i n $ { P K G _ O P T I O N S _ S E T . $ { _ s e t _ } }
2005-07-26 11:00:42 +02:00
. if !empty(PKG_OPTIONS : M ${_opt_ })
_ISEMPTY := false
. e n d i f
. e n d f o r
. i f ${_ISEMPTY} = = "true"
PKG_FAIL_REASON := "At least one of the following options must be selected: " ${ PKG_OPTIONS_SET . ${ _set_ } : O : u : Q }
. e n d i f
. e n d f o r
. u n d e f _ I S E M P T Y
2005-05-28 14:14:34 +02:00
. i f ! e m p t y ( _ O P T I O N S _ U N S U P P O R T E D )
2005-06-02 22:38:09 +02:00
PKG_FAIL_REASON := "The following selected options are not supported: " ${ _OPTIONS_UNSUPPORTED : O : u : Q } "."
2005-05-28 14:14:34 +02:00
. e n d i f
. u n d e f _ O P T I O N S _ U N S U P P O R T E D
. u n d e f _ O P T I O N S _ D E F A U L T _ S U P P O R T E D
2005-05-16 11:08:29 +02:00
PKG_OPTIONS := ${ PKG_OPTIONS : O : u }
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 22:59:08 +02:00
2004-11-27 05:50:55 +01:00
_PKG_OPTIONS_WORDWRAP_FILTER = \
2006-04-14 19:15:03 +02:00
${ XARGS } -n 1 | \
2004-08-07 20:02:05 +02:00
${ AWK } ' \
BEGIN { printwidth = 40; line = "" } \
{ \
if ( length( line) > 0) \
line = line" " $$ 0; \
else \
line = $$ 0; \
if ( length( line) > 40) { \
print " " line; \
line = "" ; \
} \
} \
END { if ( length( line) > 0) print " " line } \
'
2004-11-27 05:50:55 +01:00
2005-05-31 14:10:07 +02:00
.PHONY : show -options
show-options :
2005-07-26 11:00:42 +02:00
@${ ECHO } Any of the following general options may be selected:
2005-05-08 15:43:30 +02:00
.for _opt_ in ${PKG_SUPPORTED_OPTIONS : O }
2005-07-26 11:00:42 +02:00
. if !defined(_PKG_OPTIONS_GROUP_MAP.${_opt_}) && empty(_PKG_OPTIONS_ALL_SETS : M ${_opt_ })
2005-05-08 15:43:30 +02:00
@${ ECHO } " " ${ _opt_ : Q } " " ` ${ SED } -n "s/^" ${ _opt_ : Q } " //p" ../../mk/defaults/options.description`
2005-06-04 18:30:19 +02:00
. e n d i f
. e n d f o r
. f o r _ g r p _ i n $ { P K G _ O P T I O N S _ R E Q U I R E D _ G R O U P S }
@${ ECHO } "Exactly one of the following " ${ _grp_ : Q } " options is required:"
. for _opt_ in ${PKG_OPTIONS_GROUP.${_grp_} : O }
@${ ECHO } " " ${ _opt_ : Q } " " ` ${ SED } -n "s/^" ${ _opt_ : Q } " //p" ../../mk/defaults/options.description`
. e n d f o r
. e n d f o r
. f o r _ g r p _ i n $ { P K G _ O P T I O N S _ O P T I O N A L _ G R O U P S }
@${ ECHO } "At most one of the following " ${ _grp_ : Q } " options may be selected:"
. for _opt_ in ${PKG_OPTIONS_GROUP.${_grp_} : O }
@${ ECHO } " " ${ _opt_ : Q } " " ` ${ SED } -n "s/^" ${ _opt_ : Q } " //p" ../../mk/defaults/options.description`
. e n d f o r
2005-07-26 11:00:42 +02:00
. e n d f o r
. f o r _ s e t _ i n $ { P K G _ O P T I O N S _ N O N E M P T Y _ S E T S }
@${ ECHO } "At least one of the following " ${ _set_ : Q } " options must be selected:"
. for _opt_ in ${PKG_OPTIONS_SET.${_set_} : O }
@${ ECHO } " " ${ _opt_ : Q } " " ` ${ SED } -n "s/^" ${ _opt_ : Q } " //p" ../../mk/defaults/options.description`
. e n d f o r
2005-05-08 15:43:30 +02:00
. e n d f o r
@${ ECHO }
2006-04-14 19:15:03 +02:00
@${ ECHO } "These options are enabled by default:"
@${ ECHO } ${ PKG_SUGGESTED_OPTIONS : O : Q } | ${ _PKG_OPTIONS_WORDWRAP_FILTER }
@${ ECHO } ""
@${ ECHO } "These options are currently enabled:"
@${ ECHO } ${ PKG_OPTIONS : O : Q } | ${ _PKG_OPTIONS_WORDWRAP_FILTER }
2005-07-19 12:30:22 +02:00
. i f d e f i n e d ( P K G _ O P T I O N S _ D E P R E C A T E D _ W A R N I N G S )
@${ ECHO }
@for l in ${ PKG_OPTIONS_DEPRECATED_WARNINGS } ; \
do \
${ ECHO } " $$ l " ; \
done
. e n d i f
2005-05-08 15:43:30 +02:00
2005-01-24 19:04:24 +01:00
. i f d e f i n e d ( P K G _ S U P P O R T E D _ O P T I O N S )
.PHONY : supported -options -message
2005-05-31 17:05:13 +02:00
pre-install-depends : supported -options -message
2005-01-24 19:04:24 +01:00
supported-options-message :
2004-11-27 05:50:55 +01:00
. i f ! e m p t y ( P K G _ S U P P O R T E D _ O P T I O N S )
@${ ECHO } "=========================================================================="
@${ ECHO } "The supported build options for this package are:"
@${ ECHO } ""
2006-04-14 19:15:03 +02:00
@${ ECHO } ${ PKG_SUPPORTED_OPTIONS : O : Q } | ${ _PKG_OPTIONS_WORDWRAP_FILTER }
2004-11-28 09:00:51 +01:00
. i f ! e m p t y ( P K G _ O P T I O N S )
2004-11-27 05:50:55 +01:00
@${ ECHO } ""
@${ ECHO } "The currently selected options are:"
@${ ECHO } ""
2005-04-28 23:58:44 +02:00
@${ ECHO } ${ PKG_OPTIONS : O : Q } | ${ XARGS } -n 1 | ${ _PKG_OPTIONS_WORDWRAP_FILTER }
2004-11-28 09:00:51 +01:00
. e n d i f
2004-08-04 11:36:16 +02:00
@${ ECHO } ""
2005-05-08 15:43:30 +02:00
@${ ECHO } "You can select which build options to use by setting PKG_DEFAULT_OPTIONS"
@${ ECHO } "or the following variable. Its current value is shown:"
2004-08-04 11:36:16 +02:00
@${ ECHO } ""
2005-05-08 15:43:30 +02:00
. i f ! d e f i n e d ( $ { P K G _ O P T I O N S _ V A R } )
@${ ECHO } " ${ PKG_OPTIONS_VAR } (not defined) "
. e l s e
@${ ECHO } " ${ PKG_OPTIONS_VAR } = ${ ${ PKG_OPTIONS_VAR } } "
. e n d i f
2005-06-06 15:54:51 +02:00
. i f d e f i n e d ( P K G _ O P T I O N S _ D E P R E C A T E D _ W A R N I N G S )
2005-05-08 15:43:30 +02:00
@${ ECHO }
2005-06-06 15:54:51 +02:00
@for l in ${ PKG_OPTIONS_DEPRECATED_WARNINGS } ; \
2005-05-08 15:43:30 +02:00
do \
${ ECHO } " $$ l " ; \
done
. e n d i f
2004-08-04 11:36:16 +02:00
@${ ECHO } ""
@${ ECHO } "=========================================================================="
. e n d i f
. e n d i f
2005-05-14 04:17:43 +02:00
. e n d i f # defined(PKG_OPTIONS_VAR) && defined(PKG_SUPPORTED_OPTIONS)