git: 12c2ffe72d30 - 2022Q1 - emulators/virtualbox-ose(-legacy): Take advantage of ccache

From: Guido Falsi <madpilot_at_FreeBSD.org>
Date: Wed, 09 Feb 2022 14:35:04 UTC
The branch 2022Q1 has been updated by madpilot:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12c2ffe72d30ec48aeaf9500dbcc3b82e9979110

commit 12c2ffe72d30ec48aeaf9500dbcc3b82e9979110
Author:     Derek Schrock <dereks@lifeofadishwasher.com>
AuthorDate: 2022-02-09 14:22:27 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2022-02-09 14:33:58 +0000

    emulators/virtualbox-ose(-legacy): Take advantage of ccache
    
    This patch teaches the virtualbox ports to take advantage of ccache
    if the ports are configured to use it.
    
    PR:             254616
    (cherry picked from commit a60dcd712517e7948e6867f2cbe89938b6c55681)
---
 emulators/virtualbox-ose-legacy/Makefile | 2 +-
 emulators/virtualbox-ose/Makefile        | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile
index 9276da479d50..ae08c1b6bc98 100644
--- a/emulators/virtualbox-ose-legacy/Makefile
+++ b/emulators/virtualbox-ose-legacy/Makefile
@@ -324,7 +324,7 @@ post-patch:
 
 do-build:
 	cd ${WRKSRC} && ${SH} -c '. ${WRKSRC}/env.sh && \
-	    ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}'
+	    ${SETENV} ${MAKE_ENV} ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}'
 .if ${PORT_OPTIONS:MPYTHON}
 	${PYTHON_CMD} -mcompileall \
 	    ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index c1993fc01e5a..8d6614ac3068 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -213,8 +213,8 @@ KMK_FLAGS+=	-j${MAKE_JOBS_NUMBER}
 # force llvm11 from ports
 .if ${OPSYS} == FreeBSD && ${OSVERSION} < 1300109
 BUILD_DEPENDS+=	clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER}
-CC=		${LOCALBASE}/bin/clang${VBOX_LLVM_VER}
-CXX=		${LOCALBASE}/bin/clang++${VBOX_LLVM_VER}
+CC=		clang${VBOX_LLVM_VER}
+CXX=		clang++${VBOX_LLVM_VER}
 VBOX_LLVM_VER?=	11
 .endif
 PATCH_DEPENDS+=	${LOCALBASE}/share/kBuild/tools/GXX3.kmk:devel/kBuild
@@ -334,7 +334,7 @@ post-patch-AIO-off:
 
 do-build:
 	cd ${WRKSRC} && ${SH} -c '. ${WRKSRC}/env.sh && \
-	    ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}'
+	    ${SETENV} ${MAKE_ENV} ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}'
 .if ${PORT_OPTIONS:MPYTHON}
 	${PYTHON_CMD} -mcompileall \
 	    ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom