Add two new options helpers:

${OPT}_${TYPE}_DEPENDS_OFF=<something> will automatically add:
${TYPE_DEPENDS}+=<something> in case OPT is 'off'

${OPT}_${FLAG}_OFF=<something> will automatically add:
${FLAG}+=<something> in case OPT is 'off'

With hat:	portmgr
Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2014-01-27 22:53:24 +00:00
parent 71c9c356da
commit b765405ad0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=341467
2 changed files with 28 additions and 1 deletions

11
CHANGES
View File

@ -10,6 +10,17 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20140127:
AUTHOR: mat@FreeBSD.org
Add two new options helpers:
${OPT}_${TYPE}_DEPENDS_OFF=<something> will automatically add:
${TYPE_DEPENDS}+=<something> in case OPT is 'off'
${OPT}_${FLAG}_OFF=<something> will automatically add:
${FLAG}+=<something> in case OPT is 'off'
20140111:
AUTHOR: mva@FreeBSD.org

View File

@ -107,10 +107,14 @@
# ALL_TARGET INSTALL_TARGET USES DISTFILES PLIST_FILES PLIST_DIRS PLIST_DIRSTRY
# EXTRA_PATCHES PATCHFILES PATCH_SITES CATEGORIES, defining ${opt}_${variable}
# will add its content to the actual variable when the option is enabled.
# Defining ${opt}_${variable}_OFF will add its content to the actual variable
# when the option is disabled.
#
# For each of the depends target PKG EXTRACT PATCH FETCH BUILD LIB RUN,
# defining ${opt}_${deptype}_DEPENDS will add its content to the actual
# dependency when the option is enabled.
# dependency when the option is enabled. Defining
# ${opt}_${deptype}_DEPENDS_OFF will add its content to the actual dependency
# when the option is enabled.
##
# Set all the options available for the ports, beginning with the
@ -418,6 +422,18 @@ CONFIGURE_ARGS+= --without-${iopt}
${configure}_ARGS+= ${${opt}_${configure}_OFF}
. endif
. endfor
. for flags in CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CONFIGURE_ENV MAKE_ARGS \
MAKE_ENV ALL_TARGET INSTALL_TARGET USES DISTFILES PLIST_FILES \
PLIST_DIRS PLIST_DIRSTRY EXTRA_PATCHES PATCHFILES PATCH_SITES CATEGORIES
. if defined(${opt}_${flags}_OFF)
${flags}+= ${${opt}_${flags}_OFF}
. endif
. endfor
. for deptype in PKG EXTRACT PATCH FETCH BUILD LIB RUN
. if defined(${opt}_${deptype}_DEPENDS_OFF)
${deptype}_DEPENDS+= ${${opt}_${deptype}_DEPENDS_OFF}
. endif
. endfor
. endif
.endfor