science/tfel: Fix build with llvm16

Approved by:	portmgr (blanket)
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Muhammad Moinur Rahman 2023-08-02 22:10:22 +02:00
parent 85610d4c6c
commit 94d12ee1df

View file

@ -41,10 +41,21 @@ CMAKE_ON+= enable-portable-build
TEST_TARGET= check
.include <bsd.port.pre.mk>
post-patch:
.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
@${REINPLACE_CMD} -e 's|std::unary_function|std::__unary_function|' \
${WRKSRC}/include/NUMODIS/Math/Utilities.hxx \
${WRKSRC}/include/TFEL/Math/General/Abs.hxx
@${REINPLACE_CMD} -e 's|std::binary_function|std::__binary_function|' \
${WRKSRC}/include/TFEL/Math/General/AbsCompare.hxx
.endif
post-install:
(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py \
-d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S,${PREFIX}/,,})
(cd ${STAGEDIR}${PREFIX} && ${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
-d ${PREFIX} -f ${PYTHONPREFIX_SITELIBDIR:S,${PREFIX}/,,})
.include <bsd.port.mk>
.include <bsd.port.post.mk>