git: 8522a7407ebd - main - lang/yap: fix build with clang 18

From: Eugene Grosbein <eugen_at_FreeBSD.org>
Date: Fri, 12 Apr 2024 06:42:55 UTC
The branch main has been updated by eugen:

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

commit 8522a7407ebdb4c445f3134b565daa14fe78b683
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2024-04-12 06:41:10 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2024-04-12 06:41:10 +0000

    lang/yap: fix build with clang 18
    
    Unbreak build with clang 18. PORTREVISION not bumped.
---
 lang/yap/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lang/yap/Makefile b/lang/yap/Makefile
index 448ab250ca03..41ddab2be836 100644
--- a/lang/yap/Makefile
+++ b/lang/yap/Makefile
@@ -52,6 +52,12 @@ CFLAGS+=	-Wno-incompatible-function-pointer-types
 CONFIGURE_ENV+=	CFLAGS="${CFLAGS}"
 .endif
 
+.if ${OPSYS} == FreeBSD && ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 180
+pre-configure:
+	${REINPLACE_CMD} 's/-export-dynamic/-Wl,--export-dynamic/' \
+		configure packages/cplint/slipcase/Makefile.in
+.endif
+
 .if ${ARCH:Mpowerpc*}
 USES+=		compiler:gcc-c++11-lib
 .endif