aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2013-10-17 09:57:47 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2013-10-17 09:57:47 +0800
commit3d64741eb0986473a5253a894659fc3a61611054 (patch)
tree163a78e8ae8f9ce4402d76d000b7a3e4e6f8e59b
parent0688c00851a5b954c541fb3f54d3440f357a894b (diff)
downloadfreebsd-ports-gnome-3d64741eb0986473a5253a894659fc3a61611054.tar.gz
freebsd-ports-gnome-3d64741eb0986473a5253a894659fc3a61611054.tar.zst
freebsd-ports-gnome-3d64741eb0986473a5253a894659fc3a61611054.zip
- Support staging
- Rework OPTIONS - Use new LIB_DEPENDS syntax - Add DESKTOP_ENTRIES
-rw-r--r--games/nexuiz/Makefile106
-rw-r--r--games/nexuiz/pkg-plist70
2 files changed, 59 insertions, 117 deletions
diff --git a/games/nexuiz/Makefile b/games/nexuiz/Makefile
index 9033bc4f84be..dc33842bdbfb 100644
--- a/games/nexuiz/Makefile
+++ b/games/nexuiz/Makefile
@@ -3,7 +3,7 @@
PORTNAME= nexuiz
PORTVERSION= 2.5.2
-PORTREVISION= 12
+PORTREVISION= 13
CATEGORIES= games
MASTER_SITES= SF/${PORTNAME}/NexuizRelease/Nexuiz%20${PORTVERSION} \
SF/${PORTNAME}/mappack/nexmappack_r2:mappack
@@ -13,8 +13,8 @@ DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Fast-paced, chaotic, and intense multiplayer first person shooter
-LIB_DEPENDS= curl:${PORTSDIR}/ftp/curl \
- jpeg:${PORTSDIR}/graphics/jpeg
+LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
+ libjpeg.so:${PORTSDIR}/graphics/jpeg
LICENSE= GPLv2
@@ -29,61 +29,68 @@ MAKE_ARGS= DP_FS_BASEDIR="${DATADIR}" CC="${CC}" \
OPTIM_RELEASE="${CFLAGS} -fno-strict-aliasing -funroll-loops" \
STRIP="${STRIP_CMD}"
MAKE_JOBS_UNSAFE=yes
-ALL_TARGET= #
+ALL_TARGET= # empty
+
+PORTDATA= *
OPTIONS_DEFINE= MAPPACK
-OPTIONS_MULTI= FLAVOR
-OPTIONS_MULTI_FLAVOR= CLIENT SDL_CLIENT SERVER
-CLIENT_DESC= Build GLX client
-SDL_CLIENT_DESC= Build SDL client
-SERVER_DESC= Build dedicated server
+OPTIONS_MULTI= COMPONENTS
+OPTIONS_MULTI_COMPONENTS=CLIENT SDL_CLIENT DEDICATED
+OPTIONS_DEFAULT=MAPPACK CLIENT SDL_CLIENT DEDICATED
+
MAPPACK_DESC= Install community map pack
-FLAVOR_DESC= Executable Selection
+CLIENT_DESC= Build GLX client
+SDL_CLIENT_DESC=Build SDL client
+DEDICATED_DESC= Build dedicated server
-OPTIONS_DEFAULT= CLIENT SDL_CLIENT SERVER MAPPAC
+CLIENT_LIB_DEPENDS= libmodplug.so:${PORTSDIR}/audio/libmodplug \
+ libpng.so:${PORTSDIR}/graphics/png \
+ libtheora.so:${PORTSDIR}/multimedia/libtheora
+SDL_CLIENT_LIB_DEPENDS= ${CLIENT_LIB_DEPENDS}
+MAPPACK_DISTFILES= nexmappack_r2${EXTRACT_SUFX}:mappack
-NO_STAGE= yes
.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MMAPPACK}
-DISTFILES+= nexmappack_r2${EXTRACT_SUFX}:mappack
-PLIST_SUB+= MAPPACK=""
-.else
-PLIST_SUB+= MAPPACK="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSDL_CLIENT}
-LIB_DEPENDS+= modplug:${PORTSDIR}/audio/libmodplug \
- png15:${PORTSDIR}/graphics/png \
- theora:${PORTSDIR}/multimedia/libtheora
-.endif
-
.if ${PORT_OPTIONS:MCLIENT}
USE_GL= glut
USE_XORG= x11 xpm xxf86vm xxf86dga xext
ALL_TARGET+= cl-release
-PLIST_SUB+= CLIENT=""
-.else
-PLIST_SUB+= CLIENT="@comment "
+PLIST_FILES+= bin/${PORTNAME}-glx
+
+DESKTOP_ENTRIES="Nexuiz" \
+ "${COMMENT}" \
+ "${PREFIX}/share/pixmaps/${PORTNAME}.ico" \
+ "${PORTNAME}-glx" \
+ "Game;Shooter;" \
+ ""
.endif
.if ${PORT_OPTIONS:MSDL_CLIENT}
USE_SDL= sdl
ALL_TARGET+= sdl-release
-PLIST_SUB+= SDL_CLIENT=""
-.else
-PLIST_SUB+= SDL_CLIENT="@comment "
+PLIST_FILES+= bin/${PORTNAME}-sdl
+
+# override of DESKTOP_ENTRIES for GLX client is intented
+DESKTOP_ENTRIES="Nexuiz" \
+ "${COMMENT}" \
+ "${PREFIX}/share/pixmaps/${PORTNAME}.ico" \
+ "${PORTNAME}-sdl" \
+ "Game;Shooter;" \
+ ""
.endif
-.if ${PORT_OPTIONS:MSERVER}
+.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSDL_CLIENT}
+PLIST_FILES+= share/pixmaps/${PORTNAME}.ico
+.endif
+
+.if ${PORT_OPTIONS:MDEDICATED}
ALL_TARGET+= sv-release
-PLIST_SUB+= SERVER=""
-.else
-PLIST_SUB+= SERVER="@comment "
+PLIST_FILES+= bin/${PORTNAME}-dedicated
.endif
post-extract:
- @${EXTRACT_CMD} ${WRKDIR}/Nexuiz/sources/enginesource20091001.zip \
+ @${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} \
+ ${WRKDIR}/Nexuiz/sources/enginesource20091001.zip \
-d ${WRKDIR}/Nexuiz/sources
post-patch:
@@ -96,20 +103,25 @@ post-patch:
${WRKSRC}/image_png.c
do-install:
- ${SH} -c '${FIND} ${WRKSRC} -name "darkplaces-*[^vpj]" | \
- while read f ; do ${INSTALL_PROGRAM} $${f} \
- ${PREFIX}/bin/${PORTNAME}-$${f##*-} ; done'
- @${MKDIR} ${DATADIR}/data ${DATADIR}/havoc
- ${INSTALL_DATA} ${WRKDIR}/Nexuiz/data/*.pk3 ${DATADIR}/data
- ${INSTALL_DATA} ${WRKDIR}/Nexuiz/havoc/*.pk3 ${DATADIR}/havoc
-.if ${PORT_OPTIONS:MMAPPACK}
- ${INSTALL_DATA} ${WRKDIR}/data/*.pk3 ${DATADIR}/data
+.if ${PORT_OPTIONS:MCLIENT}
+ ${INSTALL_PROGRAM} ${WRKDIR}/Nexuiz/sources/darkplaces/darkplaces-glx ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-glx
+.endif
+.if ${PORT_OPTIONS:MSDL_CLIENT}
+ ${INSTALL_PROGRAM} ${WRKDIR}/Nexuiz/sources/darkplaces/darkplaces-sdl ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-sdl
+.endif
+.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MSDL_CLIENT}
+ ${INSTALL_DATA} ${WRKDIR}/Nexuiz/sources/darkplaces/nexuiz.ico ${STAGEDIR}${PREFIX}/share/pixmaps
.endif
-.if ${PORT_OPTIONS:MSERVER}
- cd ${WRKDIR}/Nexuiz && ${COPYTREE_SHARE} server ${DATADIR}
+.if ${PORT_OPTIONS:MDEDICATED}
+ ${INSTALL_PROGRAM} ${WRKDIR}/Nexuiz/sources/darkplaces/darkplaces-dedicated ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-dedicated
+ cd ${WRKDIR}/Nexuiz && ${COPYTREE_SHARE} "server" ${STAGEDIR}${DATADIR}
# Fixup lost +x permissions on scripts after COPYTREE_SHARE
- ${FIND} ${DATADIR}/server -type f -name *.sh -o -name rcon*.pl | \
+ ${FIND} ${STAGEDIR}${DATADIR}/server -type f -name *.sh -o -name rcon*.pl | \
${XARGS} ${CHMOD} +x
.endif
+ cd ${WRKDIR}/Nexuiz && ${COPYTREE_SHARE} "data havoc" ${STAGEDIR}${DATADIR}
+.if ${PORT_OPTIONS:MMAPPACK}
+ ${INSTALL_DATA} ${WRKDIR}/data/*.pk3 ${STAGEDIR}${DATADIR}/data
+.endif
.include <bsd.port.mk>
diff --git a/games/nexuiz/pkg-plist b/games/nexuiz/pkg-plist
deleted file mode 100644
index 64f4ea3e28c3..000000000000
--- a/games/nexuiz/pkg-plist
+++ /dev/null
@@ -1,70 +0,0 @@
-%%CLIENT%%bin/nexuiz-glx
-%%SDL_CLIENT%%bin/nexuiz-sdl
-%%SERVER%%bin/nexuiz-dedicated
-%%DATADIR%%/data/common-spog.pk3
-%%DATADIR%%/data/data20091001.pk3
-%%DATADIR%%/havoc/data20091001havoc.pk3
-@dirrm %%DATADIR%%/havoc
-%%MAPPACK%%%%DATADIR%%/data/79drdm5_beta2_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/79drgc2_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/CMP1-dm6_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/HandsOfGod_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/acid3dm5_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/af3hex_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/ame7q3dm3_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/ame7q3tny1_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/apocalyptica_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/bal3dm3_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/bal3dm5_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/batcula_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/chronic_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/cttourney1_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/distonic_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/dubneoc_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/geo-core_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/hal_palindrome_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/ikzdm1_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/jaxtourney2_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/klzegypt_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/ktsdm4_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/mIKEctf2_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/map-gleeb_geocomp3_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/mappack.pk3
-%%MAPPACK%%%%DATADIR%%/data/monolith_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/pukka3dm2_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/puma3tourney4_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/q3skoredm1_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/qbeast_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/qdolphin_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/quimera_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/quintdm3_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/redm04_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/storm3dm3_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/straledm5_nex.pk3
-%%MAPPACK%%%%DATADIR%%/data/zpdm01_nex.pk3
-%%SERVER%%%%DATADIR%%/server/rcon2irc/echo-rcon.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/fastest_lap.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/irc_nick_change.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/joinmessage.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/joinsparts.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/ping-pl.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/raw.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/rbiserver.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/rcon2irc-example.conf
-%%SERVER%%%%DATADIR%%/server/rcon2irc/rcon2irc.pl
-%%SERVER%%%%DATADIR%%/server/rcon2irc/rcon2irc.txt
-%%SERVER%%%%DATADIR%%/server/rcon2irc/suggestmap.pl
-%%SERVER%%@dirrm %%DATADIR%%/server/rcon2irc
-%%SERVER%%%%DATADIR%%/server/help.cfg
-%%SERVER%%%%DATADIR%%/server/rcon.pl
-%%SERVER%%%%DATADIR%%/server/readme.txt
-%%SERVER%%%%DATADIR%%/server/server.cfg
-%%SERVER%%%%DATADIR%%/server/server_havoc_linux.sh
-%%SERVER%%%%DATADIR%%/server/server_havoc_mac.sh
-%%SERVER%%%%DATADIR%%/server/server_havoc_windows.bat
-%%SERVER%%%%DATADIR%%/server/server_linux.sh
-%%SERVER%%%%DATADIR%%/server/server_mac.sh
-%%SERVER%%%%DATADIR%%/server/server_windows.bat
-%%SERVER%%@dirrm %%DATADIR%%/server
-@dirrm %%DATADIR%%/data
-@dirrm %%DATADIR%%