git: b4173875e5ef - main - x11-toolkits/vte3: Unbreak 12.3 with LLVM < 11

From: Neel Chauhan <nc_at_FreeBSD.org>
Date: Wed, 23 Mar 2022 19:06:53 UTC
The branch main has been updated by nc:

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

commit b4173875e5eff5fa5aa35f93e4af82f2695947a4
Author:     VVD <vvd@unislabs.com>
AuthorDate: 2022-03-23 19:06:13 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-03-23 19:06:13 +0000

    x11-toolkits/vte3: Unbreak 12.3 with LLVM < 11
    
    PR:     262736
---
 x11-toolkits/vte3/Makefile | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/x11-toolkits/vte3/Makefile b/x11-toolkits/vte3/Makefile
index 0845df70692e..467db3a10af3 100644
--- a/x11-toolkits/vte3/Makefile
+++ b/x11-toolkits/vte3/Makefile
@@ -39,6 +39,18 @@ PLIST_SUB=	VERSION=2.91
 
 BINARY_ALIAS=	python3=${PYTHON_CMD}
 
-LLVM_VERSION=	11
-
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD && ${OSVERSION} < 1300109
+CPP=		${LOCALBASE}/bin/clang-cpp${_LLVM_VERSION}
+CC=		${LOCALBASE}/bin/clang${_LLVM_VERSION}
+CXX=		${LOCALBASE}/bin/clang++${_LLVM_VERSION}
+BUILD_DEPENDS+=	llvm${_LLVM_VERSION}>=0:devel/llvm${_LLVM_VERSION}
+.if (${LLVM_DEFAULT} == 90 || ${LLVM_DEFAULT} == 10)
+_LLVM_VERSION=	11
+.else
+_LLVM_VERSION=	${LLVM_DEFAULT}
+.endif
+.endif
+
+.include <bsd.port.post.mk>