git: 85d135cf7a17 - main - cad/libredwg: revert commit a534aad1cee and fix the problem differently

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Thu, 27 Oct 2022 11:32:24 UTC
The branch main has been updated by danfe:

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

commit 85d135cf7a17863ccc89dca7c7ac1b6c8f26ca24
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2022-10-27 11:31:56 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2022-10-27 11:31:56 +0000

    cad/libredwg: revert commit a534aad1cee and fix the problem differently
    
    Do not build LLVM-based fuzzers: they are hardly interesting to regular
    LibreDWG consumers and not even being installed.
    
    Reported by:    pkg-fallout
---
 cad/libredwg/Makefile                         | 13 ++-----------
 cad/libredwg/files/patch-examples_Makefile.in | 12 ++++++++++++
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/cad/libredwg/Makefile b/cad/libredwg/Makefile
index 73f5f74f84c4..9fc82518d7b6 100644
--- a/cad/libredwg/Makefile
+++ b/cad/libredwg/Makefile
@@ -9,7 +9,7 @@ WWW=		https://www.gnu.org/software/libredwg/
 
 LICENSE=	GPLv3+
 
-USES=		compiler cpe libtool tar:xz
+USES=		cpe libtool tar:xz
 GNU_CONFIGURE=	yes
 CONFIGURE_ARGS=	--enable-trace --with-perl-install=no
 USE_LDCONFIG=	yes
@@ -41,15 +41,6 @@ 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)
@@ -73,4 +64,4 @@ post-stage:
 	${MV} ${PORTEXAMPLES:S|^|${STAGEDIR}${PREFIX}/share/|} \
 		${STAGEDIR}${EXAMPLESDIR}
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/cad/libredwg/files/patch-examples_Makefile.in b/cad/libredwg/files/patch-examples_Makefile.in
new file mode 100644
index 000000000000..9dc1b31febd7
--- /dev/null
+++ b/cad/libredwg/files/patch-examples_Makefile.in
@@ -0,0 +1,12 @@
+--- examples/Makefile.in.orig	2021-03-18 08:57:40 UTC
++++ examples/Makefile.in
+@@ -90,8 +90,7 @@ host_triplet = @host@
+ build_triplet = @build@
+ host_triplet = @host@
+ @USE_WRITE_TRUE@bin_PROGRAMS = dwgadd$(EXEEXT)
+-check_PROGRAMS = load_dwg$(EXEEXT) dwg2svg2$(EXEEXT) dwgfuzz$(EXEEXT) \
+-	llvmfuzz_standalone$(EXEEXT)
++check_PROGRAMS = load_dwg$(EXEEXT) dwg2svg2$(EXEEXT)
+ EXTRA_PROGRAMS = unknown$(EXEEXT) bd$(EXEEXT) bits$(EXEEXT) \
+ 	llvmfuzz$(EXEEXT)
+ @ENABLE_GCOV_TRUE@am__append_1 = @GCOV_CFLAGS@