git: fb91445edeab - main - graphics/dcmtk: use LLVM 15 on powerpc* when 14 is in the system

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 12 Oct 2022 10:15:43 UTC
The branch main has been updated by pkubaj:

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

commit fb91445edeab0e0d2e6273600ed604da50fb2ee8
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-10-11 20:23:42 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-10-12 10:15:38 +0000

    graphics/dcmtk: use LLVM 15 on powerpc* when 14 is in the system
    
    LLVM 14 crashes:
    Assertion failed: (all_of(I->users(), [&InsertedSet](Value *U) { return InsertedSet.contains(cast<Instruction>(U)); }) && "removed instruction should only be used by instructions inserted " "during expansion"), function cleanup, file /usr/local/poudriere/jails/powerpc64-140/usr/src/contrib/llvm-project/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp, line 2798.
---
 graphics/dcmtk/Makefile | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/graphics/dcmtk/Makefile b/graphics/dcmtk/Makefile
index f1e606b9bec1..eb97a85aed4e 100644
--- a/graphics/dcmtk/Makefile
+++ b/graphics/dcmtk/Makefile
@@ -32,4 +32,13 @@ PORTDOCS=	*
 
 TEST_TARGET=	test test-exhaustive
 
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${ARCH:Mpowerpc*} && ${COMPILER_VERSION} == 140
+LLVM_VER=	15
+BUILD_DEPENDS+=	clang${LLVM_VER}:devel/llvm${LLVM_VER}
+CC=		${LOCALBASE}/bin/clang${LLVM_VER}
+CXX=		${LOCALBASE}/bin/clang++${LLVM_VER}
+.endif
+
+.include <bsd.port.post.mk>