Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Aug 2023 18:30:49 GMT
From:      Muhammad Moinur Rahman <bofh@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: a48a24ba4189 - main - japanese/nethack34: Fix build with llvm16
Message-ID:  <202308061830.376IUnQg034221@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bofh:

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

commit a48a24ba4189a7992211bc945e0ac728077c6087
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-08-06 18:11:48 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-08-06 18:30:38 +0000

    japanese/nethack34: Fix build with llvm16
    
    - Utilize OPTIONSNG where possible
    - Pet portclippy
    
    Approved by:    portmgr (blanket)
    Sponsored by:   The FreeBSD Foundation
---
 japanese/nethack34/Makefile | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/japanese/nethack34/Makefile b/japanese/nethack34/Makefile
index 68fa37aed15d..66d361672f41 100644
--- a/japanese/nethack34/Makefile
+++ b/japanese/nethack34/Makefile
@@ -35,12 +35,14 @@ OPTIONS_DEFAULT=SHELL X11
 
 SHELL_DESC=	Shell support
 
+X11_USES=	xorg
+X11_USE=	XORG=xaw,xpm
+X11_VARS=	GRAPHICS=X11_GRAPHICS
+
 .include <bsd.port.options.mk>
 
-.if ${PORT_OPTIONS:MX11}
-USES+=		xorg
-USE_XORG=	xaw xpm
-GRAPHICS=	X11_GRAPHICS
+.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
+CFLAGS+=	-Wno-error=incompatible-function-pointer-types
 .endif
 
 post-patch:
@@ -51,14 +53,14 @@ post-patch:
 		${WRKSRC}/sys/unix/Makefile.doc
 	@${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|g' \
 		${WRKSRC}/win/Qt/qt_win.cpp
-.if ! ${PORT_OPTIONS:MSHELL}
+
+post-patch-SHELL-off:
 	@${REINPLACE_CMD} -e 's|#define SHELL|/* #define SHELL|' \
 		${WRKSRC}/include/unixconf.h
-.endif
-.if ! ${PORT_OPTIONS:MX11}
+
+post-patch-X11-off:
 	@${REINPLACE_CMD} -e 's|# define XI18N|/* # define XI18N|' \
 		${WRKSRC}/include/config.h
-.endif
 
 do-configure:
 	(cd ${WRKSRC}/sys/unix && ${SH} setup.sh)
@@ -68,10 +70,10 @@ post-install:
 		${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_ARGS} manpages)
 	${INSTALL_DATA} ${WRKSRC}/win/X11/JNetHack.ad \
 		${STAGEDIR}${PREFIX}/lib/X11/app-defaults/JNetHack
-.if ${PORT_OPTIONS:MDOCS}
+
+post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	(cd ${WRKSRC} && ${INSTALL_DATA} README.j ChangeLog.j INSTALL.j \
 		doc/Guidebook.txt doc/jGuidebook.txt ${STAGEDIR}${DOCSDIR})
-.endif
 
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308061830.376IUnQg034221>