From owner-svn-ports-head@freebsd.org Mon Jan 8 00:24:49 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8228E6921C; Mon, 8 Jan 2018 00:24:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C487880399; Mon, 8 Jan 2018 00:24:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1219F285C4; Mon, 8 Jan 2018 00:24:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w080Om10045346; Mon, 8 Jan 2018 00:24:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w080Omwh045345; Mon, 8 Jan 2018 00:24:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201801080024.w080Omwh045345@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 8 Jan 2018 00:24:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458394 - head/Mk X-SVN-Group: ports-head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/Mk X-SVN-Commit-Revision: 458394 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 00:24:50 -0000 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