2012-05-29 09:54:27 +00:00
|
|
|
#-*- tab-width: 4; -*-
|
|
|
|
# $FreeBSD$
|
|
|
|
# Global options
|
|
|
|
#
|
2012-07-16 11:38:36 +00:00
|
|
|
# OPTIONS_DEFINE - List of options this ports accept
|
|
|
|
# OPTIONS_DEFINE_${ARCH} - List of options this ports accept and are
|
|
|
|
# specific to ${ARCH}
|
|
|
|
# OPTIONS_DEFAULT - List of options activated by default
|
|
|
|
# OPTIONS_DEFAULT_${ARCH} - List of options activated by default for a
|
|
|
|
# given arch
|
|
|
|
#
|
|
|
|
# OPTIONS_EXCLUDE_${ARCH} - List of options unsupported on a given ${ARCH}
|
|
|
|
# ${OPTION}_DESC - Description the the ${OPTION}
|
|
|
|
#
|
|
|
|
# OPTIONS_SINGLE - List of radio choice grouped options
|
|
|
|
# OPTIONS_MULTI - List of multiple-choice grouped options
|
|
|
|
#
|
|
|
|
# OPTIONS_SINGLE_${NAME} - List of OPTIONS grouped as radio choice (for
|
|
|
|
# the single named as ${NAME} as defined in
|
|
|
|
# OPTIONS_SINGLE)
|
|
|
|
# OTPIONS_MULTI_${NAME} - List of OPTIONS grouped as multiple-choice
|
|
|
|
# (for the multi named as ${NAME} as defined in
|
|
|
|
# OPTIONS_MULTI)
|
2012-10-05 13:43:45 +00:00
|
|
|
# WITH Set options from the command line
|
|
|
|
# WITHOUT Unset options from the command line
|
2012-05-29 09:54:27 +00:00
|
|
|
|
|
|
|
##
|
|
|
|
# Set all the options available for the ports, beginning with the
|
|
|
|
# global ones and ending with the ones decided by the maintainer.
|
|
|
|
# Options global to the entire ports tree
|
|
|
|
|
|
|
|
OPTIONSFILE?= ${PORT_DBDIR}/${UNIQUENAME}/options
|
|
|
|
|
|
|
|
#ALL_OPTIONS= DOCS \
|
|
|
|
# NLS
|
|
|
|
|
|
|
|
# Set the default values for the global options, as defined by portmgr
|
2012-05-29 14:46:38 +00:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
PORT_OPTIONS+= DOCS
|
|
|
|
.endif
|
2012-06-04 10:23:42 +00:00
|
|
|
|
|
|
|
.if !defined(WITHOUT_NLS)
|
2012-05-29 14:46:38 +00:00
|
|
|
PORT_OPTIONS+= NLS
|
2012-06-04 10:23:42 +00:00
|
|
|
.endif
|
2012-05-29 09:54:27 +00:00
|
|
|
|
2012-05-29 15:19:59 +00:00
|
|
|
# Set the default values for the global options, as defined by portmgr
|
|
|
|
.if !defined(NOPORTEXAMPLES)
|
|
|
|
PORT_OPTIONS+= EXAMPLES
|
|
|
|
.endif
|
|
|
|
|
2012-07-16 11:38:36 +00:00
|
|
|
# Exclude per arch options
|
2012-07-13 10:23:57 +00:00
|
|
|
.for opt in ${OPTIONS_EXCLUDE_${ARCH}}
|
|
|
|
OPTIONS_DEFINE:= ${OPTIONS_DEFINE:N${opt}}
|
|
|
|
OPTIONS_DEFAULT:= ${OPTIONS_DEFAULT:N${opt}}
|
|
|
|
.endfor
|
|
|
|
|
2012-07-16 11:38:36 +00:00
|
|
|
# Add per arch options
|
|
|
|
.for opt in ${OPTIONS_DEFINE_${ARCH}}
|
|
|
|
.if empty(OPTIONS_DEFINE:M${opt})
|
|
|
|
OPTIONS_DEFINE+= ${opt}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
# Add per arch defaults
|
|
|
|
.for opt in ${OPTIONS_DEFAULT_${ARCH}}
|
|
|
|
.if empty(OPTIONS_DEFAULT:M${opt}}
|
|
|
|
OPTIONS_DEFAULT+= ${opt}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
2012-05-29 09:54:27 +00:00
|
|
|
# Append options set by the port Makefile
|
|
|
|
.for opt in ${OPTIONS_DEFINE}
|
|
|
|
ALL_OPTIONS+= ${opt}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
ALL_OPTIONS:= ${ALL_OPTIONS:O:u}
|
|
|
|
|
|
|
|
# Remove global options the port maintainer doesn't want
|
|
|
|
.for opt in ${OPTIONS_EXCLUDE}
|
|
|
|
ALL_OPTIONS:= ${ALL_OPTIONS:N${opt}}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
#XXX to kill when old option framework won't be used anymore
|
|
|
|
.if defined(OPTIONS)
|
2012-06-05 06:56:36 +00:00
|
|
|
NO_OPTIONS_SORT= yes
|
2012-05-29 09:54:27 +00:00
|
|
|
. undef optname
|
|
|
|
. for O in ${OPTIONS:S|\#|\\\#|g}
|
|
|
|
opt:= ${O}
|
|
|
|
. if !defined(optname)
|
|
|
|
optname:= ${O}
|
|
|
|
ALL_OPTIONS+= ${O}
|
2012-06-05 06:03:36 +00:00
|
|
|
.if !defined(OPTIONS_DEFINE) || empty(OPTIONS_DEFINE:M${O})
|
|
|
|
OPTIONS_DEFINE+= ${O}
|
|
|
|
.endif
|
2012-05-29 09:54:27 +00:00
|
|
|
PORT_OPTIONS+= ${O}
|
|
|
|
. elif !defined(optdesc)
|
|
|
|
optdesc:= ${opt}
|
2012-06-02 09:13:13 +00:00
|
|
|
${optname}_DESC:= ${opt:S|"||g}
|
2012-05-29 09:54:27 +00:00
|
|
|
. else
|
|
|
|
. if ${opt:L} == off
|
|
|
|
. if defined(PORT_OPTIONS) && defined(optname)
|
|
|
|
NO_OPTIONS+= ${optname}
|
|
|
|
NO_OPTIONS:= ${NO_OPTIONS:O:u}
|
|
|
|
. else
|
|
|
|
. endif
|
|
|
|
. endif
|
|
|
|
. undef optname
|
|
|
|
. undef optdesc
|
|
|
|
. endif
|
|
|
|
. endfor
|
|
|
|
. if defined(NO_OPTIONS)
|
|
|
|
. for O in ${NO_OPTIONS}
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:N${O}}
|
|
|
|
. endfor
|
|
|
|
. endif
|
|
|
|
#. undef NO_OPTIONS
|
|
|
|
.endif
|
|
|
|
#XXX end of compatibility
|
|
|
|
|
|
|
|
ALL_OPTIONS:= ${ALL_OPTIONS:O:u}
|
|
|
|
|
2012-07-16 22:36:44 +00:00
|
|
|
# complete list
|
|
|
|
COMPLETE_OPTIONS_LIST= ${ALL_OPTIONS}
|
|
|
|
.for single in ${OPTIONS_SINGLE}
|
|
|
|
COMPLETE_OPTIONS_LIST+= ${OPTIONS_SINGLE_${single}}
|
|
|
|
.endfor
|
|
|
|
.for multi in ${OPTIONS_MULTI}
|
|
|
|
COMPLETE_OPTIONS_LIST+= ${OPTIONS_MULTI_${multi}}
|
|
|
|
.endfor
|
|
|
|
|
2012-05-29 09:54:27 +00:00
|
|
|
## Now create the list of activated options
|
|
|
|
.if defined(OPTIONS_OVERRIDE)
|
|
|
|
# Special case $OPTIONS_OVERRIDE; if it is defined forget about anything done
|
|
|
|
# before
|
|
|
|
PORT_OPTIONS:= ${OPTIONS_OVERRIDE}
|
|
|
|
.else
|
|
|
|
|
|
|
|
## Set default options defined by the port maintainer
|
|
|
|
. for opt in ${OPTIONS_DEFAULT}
|
|
|
|
PORT_OPTIONS+= ${opt}
|
|
|
|
. endfor
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
|
|
|
|
|
|
|
|
## Set system-wide defined options (set by user in make.conf)
|
|
|
|
. for opt in ${OPTIONS_SET}
|
2012-07-16 22:36:44 +00:00
|
|
|
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
|
2012-05-29 09:54:27 +00:00
|
|
|
PORT_OPTIONS+= ${opt}
|
2012-07-16 11:38:36 +00:00
|
|
|
. endif
|
2012-05-29 09:54:27 +00:00
|
|
|
. endfor
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
|
|
|
|
|
|
|
|
## Remove the options excluded system-wide (set by user in make.conf)
|
|
|
|
. for opt in ${OPTIONS_UNSET}
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
|
|
|
|
. endfor
|
|
|
|
|
|
|
|
## Set the options specified per-port (set by user in make.conf)
|
2012-06-06 11:47:29 +00:00
|
|
|
. for opt in ${${UNIQUENAME}_SET}
|
2012-07-16 22:36:44 +00:00
|
|
|
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
|
2012-05-29 09:54:27 +00:00
|
|
|
PORT_OPTIONS+= ${opt}
|
2012-07-16 11:38:36 +00:00
|
|
|
. endif
|
2012-05-29 09:54:27 +00:00
|
|
|
. endfor
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
|
|
|
|
|
|
|
|
## Unset the options excluded per-port (set by user in make.conf)
|
2012-06-06 11:47:29 +00:00
|
|
|
. for opt in ${${UNIQUENAME}_UNSET}
|
2012-05-29 09:54:27 +00:00
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
|
|
|
|
. endfor
|
|
|
|
|
|
|
|
## options files (from dialog)
|
|
|
|
. if exists(${OPTIONSFILE}) && !make(rmconfig)
|
|
|
|
. include "${OPTIONSFILE}"
|
|
|
|
. endif
|
|
|
|
. if exists(${OPTIONSFILE}.local)
|
|
|
|
. include "${OPTIONSFILE}.local"
|
|
|
|
. endif
|
|
|
|
|
2012-06-04 10:23:42 +00:00
|
|
|
### convert WITH and WITHOUT found in make.conf or reloaded from old optionsfile
|
|
|
|
.for opt in ${ALL_OPTIONS}
|
|
|
|
.if defined(WITH_${opt})
|
|
|
|
PORT_OPTIONS+= ${opt}
|
2012-05-29 09:54:27 +00:00
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
|
2012-06-04 10:23:42 +00:00
|
|
|
.endif
|
|
|
|
.if defined(WITHOUT_${opt})
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
|
|
|
|
.endif
|
|
|
|
.endfor
|
2012-05-29 09:54:27 +00:00
|
|
|
|
|
|
|
## Finish by using the options set by the port config dialog, if any
|
|
|
|
. for opt in ${OPTIONS_FILE_SET}
|
2012-07-16 22:36:44 +00:00
|
|
|
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
|
2012-05-29 09:54:27 +00:00
|
|
|
PORT_OPTIONS+= ${opt}
|
2012-07-16 11:38:36 +00:00
|
|
|
. endif
|
2012-05-29 09:54:27 +00:00
|
|
|
. endfor
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
|
|
|
|
|
|
|
|
.for opt in ${OPTIONS_FILE_UNSET}
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
|
|
|
|
.endfor
|
|
|
|
.undef opt
|
|
|
|
|
|
|
|
.endif
|
|
|
|
|
2012-10-05 13:43:45 +00:00
|
|
|
## Cmdline always win over the rest
|
|
|
|
.for opt in ${WITH}
|
|
|
|
. if !empty(COMPLETE_OPTIONS_LIST:M${opt})
|
|
|
|
PORT_OPTIONS+= ${opt}
|
|
|
|
. endif
|
|
|
|
.endfor
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:O:u}
|
|
|
|
|
|
|
|
.for opt in ${WITHOUT}
|
|
|
|
PORT_OPTIONS:= ${PORT_OPTIONS:N${opt}}
|
|
|
|
.endfor
|
|
|
|
.undef opt
|
|
|
|
|
2012-05-29 09:54:27 +00:00
|
|
|
## Now some compatibility
|
|
|
|
.if empty(PORT_OPTIONS:MDOCS)
|
|
|
|
NOPORTDOCS= yes
|
|
|
|
.endif
|
|
|
|
|
2012-05-29 15:35:30 +00:00
|
|
|
.if empty(PORT_OPTIONS:MEXAMPLES)
|
|
|
|
NOPORTEXAMPLES= yes
|
|
|
|
.endif
|
|
|
|
|
2012-05-29 09:54:27 +00:00
|
|
|
.if empty(PORT_OPTIONS:MNLS)
|
|
|
|
WITHOUT_NLS= yes
|
|
|
|
.endif
|
|
|
|
|
2012-06-01 09:06:15 +00:00
|
|
|
.if defined(NO_OPTIONS_SORT)
|
|
|
|
_SORTED_OPTIONS:= ${ALL_OPTIONS}
|
|
|
|
ALL_OPTIONS:=
|
|
|
|
.for opt in ${OPTIONS_DEFINE}
|
|
|
|
.if ${_SORTED_OPTIONS:M${opt}}
|
|
|
|
ALL_OPTIONS+= ${opt}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
.undef opt
|
|
|
|
.undef _SORTED_OPTIONS
|
|
|
|
.endif
|
|
|
|
|
2012-05-29 11:49:10 +00:00
|
|
|
### to be removed once old OPTIONS disappear
|
2012-05-29 13:30:56 +00:00
|
|
|
.for opt in ${ALL_OPTIONS}
|
|
|
|
.if empty(PORT_OPTIONS:M${opt})
|
|
|
|
. if !defined(WITH_${opt}) && !defined(WITHOUT_${opt})
|
|
|
|
WITHOUT_${opt}:= true
|
2012-05-29 11:49:10 +00:00
|
|
|
. endif
|
2012-05-29 13:30:56 +00:00
|
|
|
.else
|
|
|
|
. if !defined(WITH_${opt}) && !defined(WITHOUT_${opt})
|
|
|
|
WITH_${opt}:= true
|
2012-05-29 11:49:10 +00:00
|
|
|
. endif
|
|
|
|
.endif
|
2012-05-29 13:30:56 +00:00
|
|
|
. undef opt
|
|
|
|
.endfor
|
2012-05-29 11:49:10 +00:00
|
|
|
###
|