aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2018-01-08 00:24:48 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2018-01-08 00:24:48 +0000
commit3b4e6dfcc331e41454a2a0e8bfd4f5ad5b928c7e (patch)
tree1ea58d9f3b6b83b21916bb4cfe39abe3be694141 /Mk
parent01bc9a567af3ae1b80cbd3846f5c45c1f6698b64 (diff)
Fix flavor helpers when only bsd.port.pre.mk is not used and FLAVOR is not set.
The helpers were being evaluated before the default FLAVOR was set. The helpers worked fine if the FLAVOR was specified by the user but not if it was left to the default value. Resolve this by moving the helpers right after the default FLAVOR is set. PR: 224879 exp-run by: antoine Approved by: portmgr (implicit) MFH: 2018Q1 Differential Revision: https://reviews.freebsd.org/D13756
Notes
Notes: svn path=/head/; revision=458394
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk57
1 files changed, 29 insertions, 28 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 0b150f2df832..7d9702b4ed82 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1089,34 +1089,6 @@ _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${WRKDIR} ${EXTRACT_WRKDIR} \
# Do not leak flavors to childs make
.MAKEOVERRIDES:= ${.MAKEOVERRIDES:NFLAVOR}
-.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS)
-_DID_FLAVORS_HELPERS= yes
-_FLAVOR_HELPERS_OVERRIDE= DESCR PLIST PKGNAMEPREFIX PKGNAMESUFFIX
-_FLAVOR_HELPERS_APPEND= CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \
- PKG_DEPENDS EXTRACT_DEPENDS PATCH_DEPENDS \
- FETCH_DEPENDS BUILD_DEPENDS LIB_DEPENDS \
- RUN_DEPENDS TEST_DEPENDS
-# These overwrite the current value
-.for v in ${_FLAVOR_HELPERS_OVERRIDE}
-.if defined(${FLAVOR}_${v})
-${v}= ${${FLAVOR}_${v}}
-.endif
-.endfor
-
-# These append to the current value
-.for v in ${_FLAVOR_HELPERS_APPEND}
-.if defined(${FLAVOR}_${v})
-${v}+= ${${FLAVOR}_${v}}
-.endif
-.endfor
-
-.for v in BROKEN IGNORE
-.if defined(${FLAVOR}_${v})
-${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}}
-.endif
-.endfor
-.endif # defined(${FLAVOR})
-
.if defined(CROSS_TOOLCHAIN)
.if !defined(CROSS_SYSROOT)
IGNORE= CROSS_SYSROOT should be defined
@@ -1516,6 +1488,35 @@ IGNORE= Unknown flavor '${FLAVOR}', possible flavors: ${FLAVORS}.
FLAVOR= ${FLAVORS:[1]}
.endif
+.if !empty(FLAVOR) && !defined(_DID_FLAVORS_HELPERS)
+_DID_FLAVORS_HELPERS= yes
+_FLAVOR_HELPERS_OVERRIDE= DESCR PLIST PKGNAMEPREFIX PKGNAMESUFFIX
+_FLAVOR_HELPERS_APPEND= CONFLICTS CONFLICTS_BUILD CONFLICTS_INSTALL \
+ PKG_DEPENDS EXTRACT_DEPENDS PATCH_DEPENDS \
+ FETCH_DEPENDS BUILD_DEPENDS LIB_DEPENDS \
+ RUN_DEPENDS TEST_DEPENDS
+# These overwrite the current value
+.for v in ${_FLAVOR_HELPERS_OVERRIDE}
+.if defined(${FLAVOR}_${v})
+${v}= ${${FLAVOR}_${v}}
+.endif
+.endfor
+
+# These append to the current value
+.for v in ${_FLAVOR_HELPERS_APPEND}
+.if defined(${FLAVOR}_${v})
+${v}+= ${${FLAVOR}_${v}}
+.endif
+.endfor
+
+.for v in BROKEN IGNORE
+.if defined(${FLAVOR}_${v})
+${v}= flavor "${FLAVOR}" ${${FLAVOR}_${v}}
+.endif
+.endfor
+.endif # defined(${FLAVOR})
+
+
EXTRACT_SUFX?= .tar.gz
.if defined(USE_LINUX_PREFIX)