Changeset View
Changeset View
Standalone View
Standalone View
Mk/bsd.options.mk
Show First 20 Lines • Show All 191 Lines • ▼ Show 20 Lines | |||||
_OPTIONS_DEPENDS= PKG FETCH EXTRACT PATCH BUILD LIB RUN TEST | _OPTIONS_DEPENDS= PKG FETCH EXTRACT PATCH BUILD LIB RUN TEST | ||||
_ALL_OPTIONS_HELPERS= ${_OPTIONS_DEPENDS:S/$/_DEPENDS/} \ | _ALL_OPTIONS_HELPERS= ${_OPTIONS_DEPENDS:S/$/_DEPENDS/} \ | ||||
${_OPTIONS_DEPENDS:S/$/_DEPENDS_OFF/} \ | ${_OPTIONS_DEPENDS:S/$/_DEPENDS_OFF/} \ | ||||
${_OPTIONS_FLAGS:S/$/_OFF/} ${_OPTIONS_FLAGS} \ | ${_OPTIONS_FLAGS:S/$/_OFF/} ${_OPTIONS_FLAGS} \ | ||||
CABAL_FLAGS CMAKE_BOOL CMAKE_BOOL_OFF CMAKE_OFF CMAKE_ON \ | CABAL_FLAGS CMAKE_BOOL CMAKE_BOOL_OFF CMAKE_OFF CMAKE_ON \ | ||||
CONFIGURE_ENABLE CONFIGURE_OFF CONFIGURE_ON \ | CONFIGURE_ENABLE CONFIGURE_OFF CONFIGURE_ON \ | ||||
CONFIGURE_WITH IMPLIES MESON_ARGS MESON_DISABLED \ | CONFIGURE_WITH IMPLIES MESON_ARGS MESON_DISABLED \ | ||||
MESON_ENABLED MESON_FALSE MESON_OFF MESON_ON MESON_TRUE \ | MESON_ENABLED MESON_FALSE MESON_OFF MESON_ON MESON_TRUE \ | ||||
PREVENTS PREVENTS_MSG QMAKE_OFF QMAKE_ON USE USE_OFF \ | PREVENTS PREVENTS_MSG QMAKE_OFF QMAKE_ON \ | ||||
VARS VARS_OFF | SUBPACKAGES SUBPACKAGES_OFF USE USE_OFF VARS VARS_OFF | ||||
# The format here is target_family:priority:target-type | # The format here is target_family:priority:target-type | ||||
_OPTIONS_TARGETS= fetch:300:pre fetch:500:do fetch:700:post \ | _OPTIONS_TARGETS= fetch:300:pre fetch:500:do fetch:700:post \ | ||||
extract:300:pre extract:500:do extract:700:post \ | extract:300:pre extract:500:do extract:700:post \ | ||||
patch:300:pre patch:500:do patch:700:post \ | patch:300:pre patch:500:do patch:700:post \ | ||||
configure:300:pre configure:500:do configure:700:post \ | configure:300:pre configure:500:do configure:700:post \ | ||||
build:300:pre build:500:do build:700:post \ | build:300:pre build:500:do build:700:post \ | ||||
install:300:pre install:500:do install:700:post \ | install:300:pre install:500:do install:700:post \ | ||||
▲ Show 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | |||||
. if defined(NO_OPTIONS_SORT) | . if defined(NO_OPTIONS_SORT) | ||||
ALL_OPTIONS= ${OPTIONS_DEFINE} | ALL_OPTIONS= ${OPTIONS_DEFINE} | ||||
. endif | . endif | ||||
. for target in ${_OPTIONS_TARGETS:C/:.*//:u} | . for target in ${_OPTIONS_TARGETS:C/:.*//:u} | ||||
_OPTIONS_${target}?= | _OPTIONS_${target}?= | ||||
. endfor | . endfor | ||||
# Handle subpackages before the rest to be able to handle options helpers | |||||
# with subpackages | |||||
. for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} | . for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} | ||||
. if ${PORT_OPTIONS:M${opt}} | |||||
. if defined(${opt}_SUBPACKAGES) | |||||
SUBPACKAGES+= ${${opt}_SUBPACKAGES} | |||||
. endif | |||||
. else | |||||
. if defined(${opt}_SUBPACKAGES_OFF) | |||||
SUBPACKAGES+= ${${opt}_SUBPACKAGES_OFF} | |||||
. endif | |||||
. endif | |||||
. endfor | |||||
. for opt in ${_REALLY_ALL_POSSIBLE_OPTIONS} | |||||
# PLIST_SUB | # PLIST_SUB | ||||
PLIST_SUB?= | PLIST_SUB?= | ||||
SUB_LIST?= | SUB_LIST?= | ||||
. if defined(OPTIONS_SUB) | . if defined(OPTIONS_SUB) | ||||
. if ! ${PLIST_SUB:M${opt}=*} | . if ! ${PLIST_SUB:M${opt}=*} | ||||
. if ${PORT_OPTIONS:M${opt}} | . if ${PORT_OPTIONS:M${opt}} | ||||
PLIST_SUB:= ${PLIST_SUB} ${opt}="" NO_${opt}="@comment " | PLIST_SUB:= ${PLIST_SUB} ${opt}="" NO_${opt}="@comment " | ||||
. else | . else | ||||
▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
. if defined(${opt}_${flags}) | . if defined(${opt}_${flags}) | ||||
${flags}+= ${${opt}_${flags}} | ${flags}+= ${${opt}_${flags}} | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
. for deptype in ${_OPTIONS_DEPENDS} | . for deptype in ${_OPTIONS_DEPENDS} | ||||
. if defined(${opt}_${deptype}_DEPENDS) | . if defined(${opt}_${deptype}_DEPENDS) | ||||
${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS} | ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS} | ||||
. endif | . endif | ||||
. for p in ${SUBPACKAGES} | |||||
. if defined(${opt}_${deptype}_DEPENDS.${p}) | |||||
${deptype}_DEPENDS.{p}+= ${${opt}_${deptype}_DEPENDS.${p}} | |||||
. endif | |||||
. endfor | . endfor | ||||
. endfor | |||||
. for target in ${_OPTIONS_TARGETS} | . for target in ${_OPTIONS_TARGETS} | ||||
_target= ${target:C/:.*//} | _target= ${target:C/:.*//} | ||||
_prio= ${target:C/.*:(.*):.*/\1/} | _prio= ${target:C/.*:(.*):.*/\1/} | ||||
_type= ${target:C/.*://} | _type= ${target:C/.*://} | ||||
_OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-on | _OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-on | ||||
. endfor | . endfor | ||||
. else | . else | ||||
. if defined(${opt}_USE_OFF) | . if defined(${opt}_USE_OFF) | ||||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
. if defined(${opt}_${flags}_OFF) | . if defined(${opt}_${flags}_OFF) | ||||
${flags}+= ${${opt}_${flags}_OFF} | ${flags}+= ${${opt}_${flags}_OFF} | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
. for deptype in ${_OPTIONS_DEPENDS} | . for deptype in ${_OPTIONS_DEPENDS} | ||||
. if defined(${opt}_${deptype}_DEPENDS_OFF) | . if defined(${opt}_${deptype}_DEPENDS_OFF) | ||||
${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS_OFF} | ${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS_OFF} | ||||
. endif | . endif | ||||
. for p in ${SUBPACKAGES} | |||||
. if defined(${opt}_${deptype}_DEPENDS_OFF.${p}) | |||||
${deptype}_DEPENDS.{p}+= ${${opt}_${deptype}_DEPENDS_OFF.${p}} | |||||
. endif | |||||
. endfor | |||||
. endfor | . endfor | ||||
. for target in ${_OPTIONS_TARGETS} | . for target in ${_OPTIONS_TARGETS} | ||||
_target= ${target:C/:.*//} | _target= ${target:C/:.*//} | ||||
_prio= ${target:C/.*:(.*):.*/\1/} | _prio= ${target:C/.*:(.*):.*/\1/} | ||||
_type= ${target:C/.*://} | _type= ${target:C/.*://} | ||||
_OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-off | _OPTIONS_${_target}:= ${_OPTIONS_${_target}} ${_prio}:${_type}-${_target}-${opt}-off | ||||
. endfor | . endfor | ||||
. endif | . endif | ||||
Show All 31 Lines |