git: 43b9c52026ff - main - devel/apr1: unbreak the port's build against enforced ccache

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Thu, 11 May 2023 07:00:15 UTC
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=43b9c52026ff6e3d0921efee780f67e2d0865127

commit 43b9c52026ff6e3d0921efee780f67e2d0865127
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-05-11 06:59:10 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-05-11 06:59:10 +0000

    devel/apr1: unbreak the port's build against enforced ccache
    
    Without setting CC_FOR_BUILD the configure script will try to
    search for suitable compiler, and if `devel/ccache` is packaged
    with compiler symlinks, its `gcc' would be detected first thus
    breaking the port's build.  This only applies to APR_CONF_ENV,
    not APU_CONF_ENV.
---
 devel/apr1/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/devel/apr1/Makefile b/devel/apr1/Makefile
index b6841930df3c..233168dbcb4e 100644
--- a/devel/apr1/Makefile
+++ b/devel/apr1/Makefile
@@ -112,7 +112,8 @@ SQLITE_VARS_OFF=	APU_CONF_ARGS+=--without-sqlite3
 ${db}_VARS_OFF=	APU_CONF_ARGS+=--without-${db:tl}
 .endfor
 
-APR_CONF_ENV+=	${CONFIGURE_ENV:O:u} CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}"
+APR_CONF_ENV+=	${CONFIGURE_ENV:O:u} CC="${CC}" CC_FOR_BUILD="${CC}" \
+		CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}"
 # include apu specific CPPFLAGS 1st!
 APU_CONF_ENV+=	${CONFIGURE_ENV:O:u} CC="${CC}" CFLAGS="${CFLAGS}" CPPFLAGS="${APU_CPPFLAGS} ${CPPFLAGS}"