git: a534aad1cee4 - main - cad/libredwg: fix build on powerpc64*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 Sep 2022 11:26:41 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=a534aad1cee458e9b23b551ff93331b42d1f0187
commit a534aad1cee458e9b23b551ff93331b42d1f0187
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2022-09-22 10:13:41 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2022-09-22 10:13:41 +0000
cad/libredwg: fix build on powerpc64*
Use newer LLVM with sanitizer libraries:
ld: error: cannot open /usr/lib/clang/13.0.0/lib/freebsd/libclang_rt.asan-powerpc64le.a: No such file or directory
---
cad/libredwg/Makefile | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/cad/libredwg/Makefile b/cad/libredwg/Makefile
index 9fc82518d7b6..73f5f74f84c4 100644
--- a/cad/libredwg/Makefile
+++ b/cad/libredwg/Makefile
@@ -9,7 +9,7 @@ WWW= https://www.gnu.org/software/libredwg/
LICENSE= GPLv3+
-USES= cpe libtool tar:xz
+USES= compiler cpe libtool tar:xz
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-trace --with-perl-install=no
USE_LDCONFIG= yes
@@ -41,6 +41,15 @@ PYTHON_CONFIGURE_OFF= --disable-python
PYTHON_PORTEXAMPLES= load_dwg.py
PYTHON_VARS= SHEBANG_FILES+=examples/load_dwg.py
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_VERSION} < 150 && ${ARCH:Mpowerpc64*}
+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
+
post-patch:
# XXX: switch the order of #include's to unbreak on powerpc/sparc64
# which are still based on gcc-4.2.1 (should be no-op elsewhere)
@@ -64,4 +73,4 @@ post-stage:
${MV} ${PORTEXAMPLES:S|^|${STAGEDIR}${PREFIX}/share/|} \
${STAGEDIR}${EXAMPLESDIR}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>