diff options
author | mat <mat@FreeBSD.org> | 2017-11-30 23:33:46 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2017-11-30 23:33:46 +0800 |
commit | 87acdef7b7611e12c4cc94c9151dc1bc5e5ab5e9 (patch) | |
tree | 32c22bac71e3351d3f69ef4c94b7a12e5dcdc611 /Mk | |
parent | 4b9fac224203752b835bc0bf378c002afcaafe9d (diff) | |
download | freebsd-ports-gnome-87acdef7b7611e12c4cc94c9151dc1bc5e5ab5e9.tar.gz freebsd-ports-gnome-87acdef7b7611e12c4cc94c9151dc1bc5e5ab5e9.tar.zst freebsd-ports-gnome-87acdef7b7611e12c4cc94c9151dc1bc5e5ab5e9.zip |
Add various FLAVOR related helpers.
To help with flavored ports, helpers are available. In these, replace <*>
with the flavor name.
*_PKGNAMEPREFIX *_PKGNAMESUFFIX *_PLIST *_DESCR will overwrite the variable.
*_CONFLICTS *_CONFLICTS_BUILD *_CONFLICTS_INSTALL *_PKG_DEPENDS
*_EXTRACT_DEPENDS *_PATCH_DEPENDS *_FETCH_DEPENDS *_BUILD_DEPENDS
*_LIB_DEPENDS *_RUN_DEPENDS *_TEST_DEPENDS will append to the variable.
Reviewed by: portmgr
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D12483
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 689033f34421..8dd4903cd789 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1084,6 +1084,34 @@ _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 |