Skip to content

Commit

Permalink
japanese/nethack34: Fix build with llvm16
Browse files Browse the repository at this point in the history
- Utilize OPTIONSNG where possible
- Pet portclippy

Approved by:	portmgr (blanket)
Sponsored by:	The FreeBSD Foundation
  • Loading branch information
5u623l20 committed Aug 6, 2023
1 parent 0cf8b3f commit a48a24b
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions japanese/nethack34/Makefile
Expand Up @@ -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:
Expand All @@ -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)
Expand All @@ -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>

0 comments on commit a48a24b

Please sign in to comment.