git: f2488f960dc8 - main - games/openttd: fix build with LLVM 15 on powerpc*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sat, 18 Mar 2023 20:58:40 UTC
The branch main has been updated by pkubaj:

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

commit f2488f960dc89761a6bd51a036168f737bb99988
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-03-18 20:56:23 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-03-18 20:58:13 +0000

    games/openttd: fix build with LLVM 15 on powerpc*
    
    Use LLVM 16 instead:
    Assertion failed: (!KnownValid && "Explicit template arguments?"), function AddOverloadedCallCandidate, file /usr/local/poudriere/jails/main-powerpc64le/usr/src/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp, line 12672.
---
 games/openttd/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/games/openttd/Makefile b/games/openttd/Makefile
index 12ef1dbac690..48a7d231120e 100644
--- a/games/openttd/Makefile
+++ b/games/openttd/Makefile
@@ -13,7 +13,7 @@ LICENSE=	GPLv2
 LIB_DEPENDS=	libpng.so:graphics/png \
 		liblzo2.so:archivers/lzo2
 
-USES=		cmake compiler:c++17-lang cpe pkgconfig tar:xz
+USES=		cmake cpe pkgconfig tar:xz
 CMAKE_ARGS=	-DCMAKE_INSTALL_BINDIR:PATH=bin \
 		-DCMAKE_INSTALL_DATADIR:PATH=share
 
@@ -41,6 +41,14 @@ SERVER_VARS=		USE_RC_SUBR=${PORTNAME}
 
 .include <bsd.port.options.mk>
 
+.if ${ARCH:Mpowerpc*} && ${OSVERSION} > 1400078
+USES+=		llvm:min=16
+CC=		clang${LLVM_VERSION}
+CXX=		clang++${LLVM_VERSION}
+.else
+USES+=		compiler:c++17-lang
+.endif
+
 .if exists(${LOCALBASE}/lib/libSDL2.so)
 _SDL_VERSION=		sdl2
 .else