2016-12-01 16:28:57 +01:00
# $NetBSD: bsd.options.mk,v 1.73 2016/12/01 15:28:57 wiz 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.
#
2016-12-01 16:28:57 +01:00
# PKG_DISABLED_OPTIONS
# This is the list of the disabled build options; this is
# the complement of PKG_OPTIONS.
#
2007-03-07 01:33:24 +01:00
2007-10-28 12:29:06 +01:00
. i f ! d e f i n e d ( B S D _ O P T I O N S _ M K )
BSD_OPTIONS_MK = # defined
2007-03-07 01:33:24 +01:00
# To add options support to a package, here is an example for an
# options.mk file. This file should be included by the package Makefile
# or Makefile.common.
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<-------------
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
# .include "../../mk/bsd.prefs.mk"
#
2007-03-07 01:33:24 +01:00
# # this package was previously named wibble2
2005-06-06 15:54:51 +02:00
# .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<-------------
2007-03-07 01:33:24 +01:00
#
# Keywords: options.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
2007-10-07 23:48:30 +02:00
_VARGROUPS += options
_USER_VARS.options = PKG_DEFAULT_OPTIONS ${ PKG_OPTIONS_VAR }
_PKG_VARS.options = PKG_SUPPORTED_OPTIONS PKG_OPTIONS_VAR \
PKG_OPTIONS_OPTIONAL_GROUPS PKG_OPTIONS_REQUIRED_GROUPS \
PKG_OPTIONS_NONEMPTY_SETS PKG_SUGGESTED_OPTIONS \
PKG_OPTIONS_LEGACY_VARS PKG_OPTIONS_LEGACY_OPTS \
PKG_LEGACY_OPTIONS PKG_OPTIONS_DEPRECATED_WARNINGS
2016-12-01 16:28:57 +01:00
_PKG_VARS.options += PKG_DISABLED_OPTIONS
2007-10-07 23:48:30 +02:00
_SYS_VARS.options = PKG_OPTIONS
2007-10-13 13:04:15 +02:00
. i n c l u d e "bsd.prefs.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
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 )
2007-06-06 09:12:31 +02:00
PKG_FAIL_REASON += "[bsd.options.mk] PKG_OPTIONS_VAR is not defined."
. e n d i f
. 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 ) \
&& !defined( PKG_OPTIONS_OPTIONAL_GROUPS) \
&& !defined( PKG_OPTIONS_REQUIRED_GROUPS) \
&& !defined( PKG_OPTIONS_NONEMPTY_SETS)
PKG_SUPPORTED_OPTIONS ?= # none
PKG_FAIL_REASON += "[bsd.options.mk] The package has no options, but includes this file."
. 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
2016-03-23 12:50:01 +01:00
# Handle OPSYSVARS here for package options as we need to test PKG_OPTIONS
# in options.mk and cannot wait for lazy evaluation from bsd.pkg.mk.
. f o r _ v a r _ i n P K G _ S U P P O R T E D _ O P T I O N S P K G _ S U G G E S T E D _ O P T I O N S
. i f d e f i n e d ( $ { _ v a r _ } . $ { O P S Y S } )
${_var_} += ${ ${ _var_ } . ${ OPSYS } }
. e l i f d e f i n e d ( $ { _ v a r _ } . * )
${_var_} += ${ ${ _var_ } .* }
. e n d i f
. e n d f o r
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
2007-06-06 09:12:31 +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 _ } )
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 _ } )
2007-06-06 09:12:31 +02:00
PKG_FAIL_REASON += "[bsd.options.mk] PKG_OPTIONS_SET." ${ _set_ : Q } " must be non-empty."
2005-07-26 11:00:42 +02:00
. 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
2016-12-01 16:28:57 +01:00
PKG_DISABLED_OPTIONS := ${ PKG_SUPPORTED_OPTIONS : O : u }
2005-06-02 23:55:05 +02:00
#
# include deprecated variable to options mapping
#
2007-10-13 13:04:15 +02:00
. i n c l u d e "defaults/obsolete.mk"
2005-06-02 23:55:05 +02:00
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 /^-// }
2007-06-06 09:12:31 +02:00
. if !empty(PKG_SUPPORTED_OPTIONS : M ${_popt_ }) \
2005-05-31 13:05:31 +02:00
|| defined( _PKG_LEGACY_OPTMAP.${ _popt_ } )
2005-05-28 14:14:34 +02:00
_OPTIONS_DEFAULT_SUPPORTED := ${ _OPTIONS_DEFAULT_SUPPORTED } ${ _opt_ }
2007-06-06 09:12:31 +02:00
. e n d i f
2005-05-28 14:14:34 +02:00
. 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
#
2006-10-01 16:51:03 +02:00
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_ })
2013-05-11 20:48:52 +02:00
. if empty(_opt_ : M -*)
2005-05-28 14:14:34 +02:00
_OPTIONS_UNSUPPORTED := ${ _OPTIONS_UNSUPPORTED } ${ _opt_ }
2013-05-11 20:48:52 +02:00
. e l s e
2013-05-12 19:19:41 +02:00
PKG_OPTIONS_DEPRECATED_WARNINGS := ${ PKG_OPTIONS_DEPRECATED_WARNINGS } "Option " ${ _opt_ : C /^-// : Q } " is unsupported, so disabling it has no effect."
2013-05-11 20:48:52 +02:00
. 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
. 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 _ } )
2007-06-06 09:12:31 +02:00
PKG_FAIL_REASON += "[bsd.options.mk] 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 }
2007-06-06 09:12:31 +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"
2007-06-06 09:12:31 +02:00
PKG_FAIL_REASON += "[bsd.options.mk] At least one of the following options must be selected: " ${ PKG_OPTIONS_SET . ${ _set_ } : O : u : Q }
2005-07-26 11:00:42 +02:00
. 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 )
2007-06-06 09:12:31 +02:00
PKG_FAIL_REASON += "[bsd.options.mk] 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 _ 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
2016-12-01 16:28:57 +01:00
. f o r _ o p t _ i n $ { P K G _ O P T I O N S }
PKG_DISABLED_OPTIONS := ${ PKG_DISABLED_OPTIONS : N ${ _opt_ } }
. e n d f o r
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 }
2006-06-03 10:44:46 +02:00
@${ ECHO } ""
@${ ECHO } "You can select which build options to use by setting PKG_DEFAULT_OPTIONS"
2006-06-06 02:15:45 +02:00
@${ ECHO } "or " ${ PKG_OPTIONS_VAR : Q } "."
2007-08-29 17:59:52 +02:00
@set args ${ PKG_OPTIONS_DEPRECATED_WARNINGS } ; shift; \
[ $$ # -eq 0 ] || ${ECHO}; \
for l in " $$ @ " ; do \
2005-07-19 12:30:22 +02:00
${ ECHO } " $$ l " ; \
done
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
First pass at implementing support for package system flavors other
than pkgsrc's current one. This is an important lead-up to any project
that redesigns the pkg_* tools in that it doesn't tie us to past design
(mis)choices. This commit mostly deals with rearranging code, although
there was a considerable amount of rewriting done in cases where I
thought the code was somewhat messy and was difficult to understand.
The design I chose for supporting multiple package system flavors is
that the various depends, install, package, etc. modules would define
default targets and variables that may be overridden in files from
pkgsrc/mk/flavor/${PKG_FLAVOR}. The default targets would do the
sensible thing of doing nothing, and pkgsrc infrastructure would rely
on the appropriate things to be defined in pkgsrc/mk/flavor to do the
real work. The pkgsrc/mk/flavor directory contains subdirectories
corresponding to each package system flavor that we support. Currently,
I only have "pkg" which represents the current pkgsrc-native package
flavor. I've separated out most of the code where we make assumptions
about the package system flavor, mostly either because we directly
use the pkg_* tools, or we make assumptions about the package meta-data
directory, or we directly manipulate the package meta-data files, and
placed it into pkgsrc/mk/flavor/pkg.
There are several new modules that have been refactored out of bsd.pkg.mk
as part of these changes: check, depends, install, package, and update.
Each of these modules has been slimmed down by rewriting them to avoid
some recursive make calls. I've also religiously documented which
targets are "public" and which are "private" so that users won't rely
on reaching into pkgsrc innards to call a private target.
The "depends" module is a complete overhaul of the way that we handle
dependencies. There is now a separate "depends" phase that occurs
before the "extract" phase where dependencies are installed. This
differs from the old way where dependencies were installed just before
extraction occurred. The reduce-depends.mk file is now replaced by
a script that is invoked only once during the depends phase and is
used to generate a cookie file that holds the full set of reduced
dependencies. It is now possible to type "make depends" in a package
directory and all missing dependencies will be installed.
Future work on this project include:
* Resolve the workflow design in anticipation of future work on
staged installations where "package" conceptually happens before
"install".
* Rewrite the buildlink3 framework to not assume the use of the
pkgsrc pkg_* tools.
* Rewrite the pkginstall framework to provide a standard pkg_*
tool to perform the actions, and allowing a purely declarative
file per package to describe what actions need to be taken at
install or deinstall time.
* Implement support for the SVR4 package flavor. This will be
proof that the appropriate abstractions are in place to allow
using a completely different set of package management tools.
2006-06-04 01:11:42 +02:00
pre-depends-hook : 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 } "=========================================================================="
2006-09-25 10:23:59 +02:00
@${ ECHO } " The supported build options for ${ PKGBASE } are: "
2004-11-27 05:50:55 +01:00
@${ 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
2006-10-01 16:51:03 +02:00
@${ ECHO } " ${ PKG_OPTIONS_VAR } = " ${ ${ PKG_OPTIONS_VAR } : Q }
2005-05-08 15:43:30 +02:00
. e n d i f
2007-08-29 17:59:52 +02:00
@set args ${ PKG_OPTIONS_DEPRECATED_WARNINGS } ; shift; \
[ $$ # -eq 0 ] || ${ECHO}; \
for l in " $$ @ " ; do \
2005-05-08 15:43:30 +02:00
${ ECHO } " $$ l " ; \
done
2004-08-04 11:36:16 +02:00
@${ ECHO } ""
@${ ECHO } "=========================================================================="
. e n d i f
. e n d i f
2007-10-28 12:29:06 +01:00
. e n d i f # BSD_OPTIONS_MK