Date: Mon, 8 Jan 2018 00:24:48 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458394 - head/Mk Message-ID: <201801080024.w080Omwh045345@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Mon Jan 8 00:24:48 2018 New Revision: 458394 URL: https://svnweb.freebsd.org/changeset/ports/458394 Log: 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 Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Jan 8 00:13:21 2018 (r458393) +++ head/Mk/bsd.port.mk Mon Jan 8 00:24:48 2018 (r458394) @@ -1089,34 +1089,6 @@ _PORTS_DIRECTORIES+= ${PKG_DBDIR} ${PREFIX} ${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 @@ -1515,6 +1487,35 @@ IGNORE= Unknown flavor '${FLAVOR}', possible flavors: .if !empty(FLAVORS) && empty(FLAVOR) 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801080024.w080Omwh045345>