git: 3efc1cf3079d - 2023Q1 - math/py-fastcluster: fix build on powerpc* with LLVM 14 by forcing 15

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 08 Feb 2023 20:25:06 UTC
The branch 2023Q1 has been updated by pkubaj:

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

commit 3efc1cf3079d811c3620d3dce1ba95658abe38cf
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-02-08 16:12:30 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-02-08 20:24:23 +0000

    math/py-fastcluster: fix build on powerpc* with LLVM 14 by forcing 15
    
    Assertion failed: ((CGF.CurFuncDecl == nullptr || CGF.Builder.getIsFPConstrained() || isa<CXXConstructorDecl>(CGF.CurFuncDecl) || isa<CXXDestructorDecl>(CGF.CurFuncDecl) || (NewExceptionBehavior == llvm::fp::ebIgnore && NewRoundingBehavior == llvm::RoundingMode::NearestTiesToEven)) && "FPConstrained should be enabled on entire function"), function ConstructorHelper, file /usr/local/poudriere/jails/main-powerpc64/usr/src/contrib/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp, line 163.
    
    (cherry picked from commit 278ced6f36e6b428c4f718bd8536a0b4884816e9)
---
 math/py-fastcluster/Makefile | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/math/py-fastcluster/Makefile b/math/py-fastcluster/Makefile
index 96ed61f5a1e7..b9db6e67c12f 100644
--- a/math/py-fastcluster/Makefile
+++ b/math/py-fastcluster/Makefile
@@ -14,10 +14,19 @@ LICENSE_FILE=	${WRKSRC}/COPYING.txt
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}numpy>=1.9,1:math/py-numpy@${PY_FLAVOR}
 
-USES=		python:3.7+
+USES=		compiler python:3.7+
 USE_PYTHON=	autoplist concurrent distutils
 
+.include <bsd.port.pre.mk>
+
+.if ${ARCH:Mpowerpc*} && ${COMPILER_VERSION} == 140
+BUILD_DEPENDS+=	clang15:devel/llvm15
+CPP=            clang-cpp15
+CC=             clang15
+CXX=            clang++15
+.endif
+
 post-install:
 	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>