git: d841a36e5fd7 - main - games/glsfcave: Fix build with llvm16

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 06 Aug 2023 12:30:49 UTC
The branch main has been updated by bofh:

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

commit d841a36e5fd7495df066beb9ba61ca0451ac57c8
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-06 12:10:55 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-06 12:30:36 +0000

    games/glsfcave: Fix build with llvm16
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 games/glsfcave/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/games/glsfcave/Makefile b/games/glsfcave/Makefile
index 8ce67d092a04..d7054d3d9ac5 100644
--- a/games/glsfcave/Makefile
+++ b/games/glsfcave/Makefile
@@ -19,9 +19,17 @@ PORTDOCS=	*
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.options.mk>
+
 do-build:
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+	cd ${WRKSRC} && ${CC} -o glsfcave main.c -I${LOCALBASE}/include \
+		-Wno-error=incompatible-function-pointer-types \
+		-L${LOCALBASE}/lib -lglut -lGL -lGLU
+.else
 	cd ${WRKSRC} && ${CC} -o glsfcave main.c -I${LOCALBASE}/include \
 		-L${LOCALBASE}/lib -lglut -lGL -lGLU
+.endif
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/glsfcave ${STAGEDIR}${PREFIX}/bin