games/quake2-3zb2: try to unbreak the port against Clang 16

The treatment is basically the same as in commit 2ca9bcd573
(-Wno-incompatible-function-pointer-types); using the MAKEFILE
instead of copying the Makefile to ${WRKSRC} is also alike.

While I'm here, prune the header files from the SRCS list and
banal comment in the `post-extract' target, use option helpers
during the installation, and stop messing with permissions as
it breaks ``make clean''.

Reported by:	pkg-fallout
2023Q4
Alexey Dokuchaev 2023-07-26 12:58:04 +00:00
parent 1de44df5d3
commit d4ca82f4f8
2 changed files with 8 additions and 21 deletions

View File

@ -16,6 +16,7 @@ WWW= http://users.jp.tri6.net/~ponpoko/3zb2/
USES= dos2unix zip
DOS2UNIX_FILES= *.[ch]
MAKEFILE= ${FILESDIR}/Makefile
NO_WRKSUBDIR= yes
SUB_FILES= pkg-message
@ -44,11 +45,9 @@ DISTFILES+= ${f}${EXTRACT_SUFX}:routes
.endif
post-extract:
# Rename files and directories to lower case
@cd ${WRKSRC}; for f in *; do \
${MV} $${f} `${ECHO_CMD} $${f} | ${TR} '[:upper:]' '[:lower:]'`; \
done
@${CP} ${FILESDIR}/${MAKEFILE} ${WRKSRC}
do-install:
.for f in chctf chdtm
@ -60,15 +59,13 @@ do-install:
${STAGEDIR}${Q2DIR}/${PORTNAME}
cd ${WRKSRC}/3zb2 && ${INSTALL_DATA} *.cfg 3ZBMaps.lst pak6.pak \
${STAGEDIR}${Q2DIR}/${PORTNAME}
.if ${PORT_OPTIONS:MROUTES}
do-install-ROUTES-on:
${INSTALL_DATA} ${WRKSRC}/*.chn ${STAGEDIR}${Q2DIR}/${PORTNAME}/chdtm
${INSTALL_DATA} ${WRKSRC}/*.chf ${STAGEDIR}${Q2DIR}/${PORTNAME}/chctf
.endif
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/3zb2 && ${CP} -a *.txt "User Guide" ${STAGEDIR}${DOCSDIR}
@${FIND} ${STAGEDIR}${DOCSDIR} -type d -print0 | \
${XARGS} -0 ${CHMOD} ${BINMODE}
@${FIND} ${STAGEDIR}${DOCSDIR} -type f -print0 | \
${XARGS} -0 ${CHMOD} ${SHAREMODE}
.include <bsd.port.mk>

View File

@ -2,19 +2,15 @@ SHLIB= game
SHLIB_NAME= game.so
SRCS= bot.c \
bot.h \
bot_fire.c \
bot_func.c \
bot_za.c \
botstr.h \
g_chase.c \
g_cmds.c \
g_combat.c \
g_ctf.c \
g_ctf.h \
g_func.c \
g_items.c \
g_local.h \
g_main.c \
g_misc.c \
g_monster.c \
@ -27,22 +23,16 @@ SRCS= bot.c \
g_turret.c \
g_utils.c \
g_weapon.c \
game.h \
m_move.c \
m_player.h \
p_client.c \
p_hud.c \
p_menu.c \
p_menu.h \
p_trail.c \
p_view.c \
p_weapon.c \
q_shared.c \
q_shared.h
q_shared.c
CFLAGS+= -Dstricmp=strcasecmp -ffast-math -funroll-loops \
-fomit-frame-pointer -fexpensive-optimizations
LDFLAGS+= -L/lib -L/usr/lib -lm
CFLAGS+= -Dstricmp=strcasecmp -ffast-math \
-Wno-incompatible-function-pointer-types
.include <bsd.lib.mk>