git: 6ac8efe2170b - main - lang/yap: unbreak build for llvm16

From: Eugene Grosbein <eugen_at_FreeBSD.org>
Date: Mon, 03 Jul 2023 03:25:52 UTC
The branch main has been updated by eugen:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6ac8efe2170b6618e259446dd25c7d2cfb7971ef

commit 6ac8efe2170b6618e259446dd25c7d2cfb7971ef
Author:     Eugene Grosbein <eugen@FreeBSD.org>
AuthorDate: 2023-07-03 03:23:58 +0000
Commit:     Eugene Grosbein <eugen@FreeBSD.org>
CommitDate: 2023-07-03 03:25:46 +0000

    lang/yap: unbreak build for llvm16
    
    PORTREVISION not changed.
---
 lang/yap/Makefile | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lang/yap/Makefile b/lang/yap/Makefile
index 77b44cbc9fca..448ab250ca03 100644
--- a/lang/yap/Makefile
+++ b/lang/yap/Makefile
@@ -19,7 +19,7 @@ LICENSE_FILE_LGPL20=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libgmp.so:math/gmp
 
-USES=		gmake localbase readline
+USES=		compiler:features gmake localbase readline
 PORTSCOUT=	limit:^6\.2\.
 
 OPTIONS_DEFINE=		DOCS BUILDDOCS
@@ -45,7 +45,12 @@ post-build-DOCS-off:
 	# prevent the instalation of three docs files
 	${REINPLACE_CMD} -e '559,562d' ${WRKSRC}/Makefile
 
-.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OPSYS} == FreeBSD && ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
+CFLAGS+=	-Wno-incompatible-function-pointer-types
+CONFIGURE_ENV+=	CFLAGS="${CFLAGS}"
+.endif
 
 .if ${ARCH:Mpowerpc*}
 USES+=		compiler:gcc-c++11-lib
@@ -57,4 +62,4 @@ MASTER_SITES+=	http://www.grosbein.net/freebsd/distfiles/:docs \
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX} ${DOCS_PACKAGE}${EXTRACT_SUFX}:docs
 .endif
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>