git: fbb3f1c01c4e - main - lang/smlnj: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sat, 22 Jul 2023 06:11:35 UTC
The branch main has been updated by bofh:

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

commit fbb3f1c01c4e60c53dd0d0dd3c11449c3dd97486
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-07-22 05:58:56 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-07-22 06:11:21 +0000

    lang/smlnj: Fix build with llvm16
    
    - Pet portclippy
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 lang/smlnj/Makefile | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/lang/smlnj/Makefile b/lang/smlnj/Makefile
index c34454054a27..db9ec7f3ae40 100644
--- a/lang/smlnj/Makefile
+++ b/lang/smlnj/Makefile
@@ -21,17 +21,20 @@ ONLY_FOR_ARCHS=	amd64 i386
 
 USES=		compiler
 
-NO_WRKSUBDIR=	yes
-
 SUB_FILES=	pkg-install
 SUB_LIST=	EXEBINDIR=${MLBINRELATIVE} EXENAMES="${MLEXE}"
+
+NO_WRKSUBDIR=	yes
+
 PKGDEINSTALL=	${PKGINSTALL}
 
 OPTIONS_DEFINE=		EVERYTHING RECOMPILE
-RECOMPILE_IMPLIES=	EVERYTHING
+
 EVERYTHING_DESC=	install everything from the SML/NJ distribution
 RECOMPILE_DESC=		recompile the SML compiler - implies EVERYTHING
 
+RECOMPILE_IMPLIES=	EVERYTHING
+
 .include <bsd.port.pre.mk>
 
 # XXX see FreeBSD PR 247421
@@ -43,6 +46,10 @@ RUNTIME_SO=	"${STAGEDIR}${MLBIN}/.run/run.$${ARCH}-$${OPSYS}.so"
 PLIST_SUB+=	RUNTIME_SO=
 .endif
 
+.if ${COMPILER_TYPE} == clang && ${COMPILER_VERSION} >= 160
+CFLAGS+=	-Wno-error=incompatible-function-pointer-types
+.endif
+
 .if (${ARCH} == "i386")
 MLARCH=		x86
 MLSIZE=		32