aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2012-12-05 18:52:10 +0800
committerdanfe <danfe@FreeBSD.org>2012-12-05 18:52:10 +0800
commit1abd99d2ef546d1845eb8b45d9fed20f65e1c152 (patch)
tree76d67bf7e71808f3a6636adc43ecb6b363b4f445 /games
parentc84cc375d0ecc19c3b0f47fb49b64e0ca2ba6456 (diff)
downloadfreebsd-ports-gnome-1abd99d2ef546d1845eb8b45d9fed20f65e1c152.tar.gz
freebsd-ports-gnome-1abd99d2ef546d1845eb8b45d9fed20f65e1c152.tar.zst
freebsd-ports-gnome-1abd99d2ef546d1845eb8b45d9fed20f65e1c152.zip
In preparation to update the port to version 1.0.2, cleanup things a bit:
- Convert to the new OPTION framework - Drop shlib ABI version numbers from LIB_DEPENDS - Retire WSWSUBDIR variable, drop article from COMMENT, trim header - Avoid legacy "yes" values in USE_GL and USE_SDL knobs - Slightly change some in-place patching (idea from Gentoo) - Move client-related OPTIONS inside .if ${PORT_OPTIONS:MCLIENT} block Feature safe: yes
Diffstat (limited to 'games')
-rw-r--r--games/warsow/Makefile76
1 files changed, 35 insertions, 41 deletions
diff --git a/games/warsow/Makefile b/games/warsow/Makefile
index b900a03320bd..470d2c6ddcfe 100644
--- a/games/warsow/Makefile
+++ b/games/warsow/Makefile
@@ -1,9 +1,5 @@
-# New ports collection makefile for: Warsow
-# Date created: 31 May 2006
-# Whom: Alexey Dokuchaev <danfe@FreeBSD.org>
-#
+# Created by: Alexey Dokuchaev <danfe@FreeBSD.org>
# $FreeBSD$
-#
PORTNAME= warsow
PORTVERSION= 0.6.2
@@ -14,11 +10,11 @@ DISTNAME= ${PORTNAME}_${PORTVERSION:R}${PORTVERSION:E}_sdk
DIST_SUBDIR= ${PORTNAME}
MAINTAINER= danfe@FreeBSD.org
-COMMENT= A futuristic, fast-paced first person shooter
+COMMENT= Futuristic, fast-paced first person shooter
LICENSE= GPLv2
-LIB_DEPENDS= curl.6:${PORTSDIR}/ftp/curl
+LIB_DEPENDS= curl:${PORTSDIR}/ftp/curl
RUN_DEPENDS= ${DATADIR}/basewsw/data0_06.pk3:${PORTSDIR}/games/warsow-data
ONLY_FOR_ARCHS= i386 amd64
@@ -29,62 +25,60 @@ WRKSRC= ${WRKDIR}/source
ALL_TARGET= game angelwrap
RELEASEDIR= ${WRKSRC}/release
AS_SDK_DIR= ${WRKSRC}/../libsrcs/angelscript/angelSVN/sdk
-WSWSUBDIR= basewsw libs
PLIST_FILES= %%DATADIR%%/basewsw/game_${ARCH}.so \
%%DATADIR%%/libs/angelwrap_${ARCH}.so
PLIST_DIRS= %%DATADIR%%/libs
-OPTIONS= CLIENT "Build client executable" on \
- SERVER "Build dedicated server executable" on \
- QF "Build Qf sound module" on \
- OPENAL "Build OpenAL sound module" on \
- IRC "Build IRC client module" on \
- TV_SRV "Build Warsow TV server" on
+OPTIONS_DEFINE= CLIENT SERVER QF OPENAL IRC TV_SRV
+OPTIONS_DEFAULT= CLIENT SERVER QF OPENAL IRC TV_SRV
-.include <bsd.port.pre.mk>
+CLIENT_DESC= Build game client
+SERVER_DESC= Build dedicated server
+QF_DESC= Build Qf sound module
+OPENAL_DESC= Build OpenAL sound module
+IRC_DESC= Build IRC client module
+TV_SRV_DESC= Build Warsow TV server
-.if defined(WITHOUT_CLIENT) && defined(WITHOUT_SERVER)
-IGNORE= requires at least one of CLIENT or SERVER options
-.endif
+.include <bsd.port.pre.mk>
-.if !defined(WITHOUT_CLIENT)
-LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg
-USE_GL= yes
-USE_SDL= yes
+.if ${PORT_OPTIONS:MCLIENT}
+LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg
+USE_GL= gl
+USE_SDL= sdl
USE_XORG= xinerama xxf86dga
ALL_TARGET+= cgame ui client
PLIST_FILES+= bin/warsow %%DATADIR%%/basewsw/cgame_${ARCH}.so \
%%DATADIR%%/basewsw/ui_${ARCH}.so
-.endif
-.if !defined(WITHOUT_SERVER)
-ALL_TARGET+= ded
-PLIST_FILES+= bin/wsw_server
-.endif
+. if ${PORT_OPTIONS:MQF} || ${PORT_OPTIONS:MOPENAL}
+LIB_DEPENDS+= vorbisfile:${PORTSDIR}/audio/libvorbis
+. endif
-.if !(defined(WITHOUT_QF) && defined(WITHOUT_OPENAL))
-LIB_DEPENDS+= vorbisfile.6:${PORTSDIR}/audio/libvorbis
-.endif
-
-.if !defined(WITHOUT_QF)
-USE_SDL= yes
+. if ${PORT_OPTIONS:MQF}
+USE_SDL= sdl
ALL_TARGET+= qf
PLIST_FILES+= %%DATADIR%%/libs/snd_qf_${ARCH}.so
-.endif
+. endif
-.if !defined(WITHOUT_OPENAL)
+. if ${PORT_OPTIONS:MOPENAL}
USE_OPENAL= al
ALL_TARGET+= openal
PLIST_FILES+= %%DATADIR%%/libs/snd_openal_${ARCH}.so
-.endif
+. endif
-.if !defined(WITHOUT_IRC)
+. if ${PORT_OPTIONS:MIRC}
ALL_TARGET+= irc
PLIST_FILES+= %%DATADIR%%/libs/irc_${ARCH}.so
+. endif
+.endif
+
+.if ${PORT_OPTIONS:MSERVER}
+ALL_TARGET+= ded
+PLIST_FILES+= bin/wsw_server
.endif
-.if !defined(WITHOUT_TV_SRV)
+.if ${PORT_OPTIONS:MTV_SRV}
ALL_TARGET+= tv_server
PLIST_FILES+= bin/wswtv_server
.endif
@@ -101,13 +95,13 @@ post-patch: .SILENT
${AS_SDK_DIR}/angelscript/projects/gnuc/makefile
# Search directory provided by warsow-data port instead of current (doing
# so allows us not to install any wrapper scripts)
- ${REINPLACE_CMD} -e 's|path", "\.|path", "${DATADIR}|' \
+ ${REINPLACE_CMD} -e 's|path", "\.|&:${DATADIR}|' \
${WRKSRC}/qcommon/files.c
# Adjust architecture names, get rid of ``freebsd_'' prefix
${REINPLACE_CMD} -e 's/x86_64/amd64/ ; s/freebsd_//' \
${WRKSRC}/gameshared/q_arch.h
# Resolve name collision with jpeg-8
- ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_jpeg_mem_src|' \
+ ${REINPLACE_CMD} -e 's|jpeg_mem_src|local_&|' \
${WRKSRC}/ref_gl/r_image.c
# Add missing #include's
${REINPLACE_CMD} -e '24s|^|#include <sys/socket.h>|' \
@@ -122,6 +116,6 @@ do-install:
.for b in ${PLIST_FILES:Mbin/*:T}
${INSTALL_PROGRAM} ${RELEASEDIR}/${b}.${ARCH} ${PREFIX}/bin/${b}
.endfor
- cd ${RELEASEDIR} && ${COPYTREE_SHARE} "${WSWSUBDIR}" ${DATADIR}
+ cd ${RELEASEDIR} && ${COPYTREE_SHARE} "basewsw libs" ${DATADIR}
.include <bsd.port.post.mk>