diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2006-06-29 09:07:17 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2006-06-29 09:07:17 +0000 |
commit | f9d671cff068987a2930510f4a9ad7866daa100c (patch) | |
tree | 3fa22bca7776e6e2b405fbca86da0959e7d110b6 /games/warsow | |
parent | 9d9ba9300a98d05470b1b5a4067c4c11c022e5a3 (diff) |
Notes
Diffstat (limited to 'games/warsow')
-rw-r--r-- | games/warsow/Makefile | 45 | ||||
-rw-r--r-- | games/warsow/files/patch-linux+in_x11.c | 15 | ||||
-rw-r--r-- | games/warsow/pkg-plist | 8 |
3 files changed, 55 insertions, 13 deletions
diff --git a/games/warsow/Makefile b/games/warsow/Makefile index 2541d9848f97..bf18e6e2ed19 100644 --- a/games/warsow/Makefile +++ b/games/warsow/Makefile @@ -7,6 +7,7 @@ PORTNAME= warsow PORTVERSION= 0.12 +PORTREVISION= 1 CATEGORIES= games MASTER_SITES= http://warsow.aditsystems.com/ \ http://ftp.club-internet.fr/pub/games/nofrag/warsow/ \ @@ -20,20 +21,45 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= danfe@FreeBSD.org COMMENT= A fast paced first person shooter game -LIB_DEPENDS= curl.3:${PORTSDIR}/ftp/curl \ - jpeg.9:${PORTSDIR}/graphics/jpeg - USE_GMAKE= yes -USE_GL= yes USE_GCC= 3.3+ -USE_SDL= yes USE_ZIP= yes -USE_DOS2UNIX= linux/sys_linux.c +USE_DOS2UNIX= linux/in_x11.c linux/sys_linux.c +ALL_TARGET= game WRKSRC= ${WRKDIR}/source/source012 RELEASEDIR= ${WRKSRC}/release DATADIR= ${PREFIX}/lib/${PORTNAME} +OPTIONS= CLIENT "Build client executable" on \ + SERVER "Build dedicated server executable" on + +.include <bsd.port.pre.mk> + +.if defined(WITHOUT_CLIENT) && defined(WITHOUT_SERVER) +IGNORE= requires at least one of CLIENT and SERVER options +.endif + +.if !defined(WITHOUT_CLIENT) +LIB_DEPENDS= curl.3:${PORTSDIR}/ftp/curl \ + jpeg.9:${PORTSDIR}/graphics/jpeg +USE_GL= yes +USE_SDL= yes +ALL_TARGET+= cgame ui client +WSBIN+= warsow +PLIST_SUB+= CLIENT="" +.else +PLIST_SUB+= CLIENT="@comment " +.endif + +.if !defined(WITHOUT_SERVER) +ALL_TARGET+= ded +WSBIN+= wsw_server +PLIST_SUB+= SERVER="" +.else +PLIST_SUB+= SERVER="@comment " +.endif + post-patch: .SILENT ${REINPLACE_CMD} -e 's#@$$(DO_CC#$$(DO_CC#; \ s#_$$(ARCH)##; s#-O2 ##' ${WRKSRC}/Makefile @@ -42,8 +68,9 @@ post-patch: .SILENT ${REINPLACE_CMD} -e 's#Linux#FreeBSD#' ${WRKSRC}/game/q_shared.h do-install: - ${INSTALL_PROGRAM} ${RELEASEDIR}/warsow ${RELEASEDIR}/wsw_server \ - ${PREFIX}/bin +.for bin in ${WSBIN} + ${INSTALL_PROGRAM} ${RELEASEDIR}/${bin} ${PREFIX}/bin +.endfor @${MKDIR} ${DATADIR}/basewsw ${INSTALL_PROGRAM} ${RELEASEDIR}/basewsw/*.so ${DATADIR}/basewsw @${TAR} xzvf ${_DISTDIR}/${PORTNAME}_${PORTVERSION}_linux.tar.gz \ @@ -57,4 +84,4 @@ do-install: ${DOCSDIR} && ${CHMOD} -R 777 ${WRKDIR}/warsow .endif -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/games/warsow/files/patch-linux+in_x11.c b/games/warsow/files/patch-linux+in_x11.c new file mode 100644 index 000000000000..d57a3569922c --- /dev/null +++ b/games/warsow/files/patch-linux+in_x11.c @@ -0,0 +1,15 @@ +--- linux/in_x11.c.orig Thu Jun 29 12:26:46 2006 ++++ linux/in_x11.c Thu Jun 29 11:55:06 2006 +@@ -589,10 +589,8 @@ + } + else + { +- mx = -((int)event.xmotion.x - mwx);// * 2; +- my = -((int)event.xmotion.y - mwy);// * 2; +- mwx = event.xmotion.x; +- mwy = event.xmotion.y; ++ mx += ((int)event.xmotion.x - mwx); ++ my += ((int)event.xmotion.y - mwy); + + if (mx || my) + dowarp = qtrue; diff --git a/games/warsow/pkg-plist b/games/warsow/pkg-plist index 2d7075669881..c5caef11ea23 100644 --- a/games/warsow/pkg-plist +++ b/games/warsow/pkg-plist @@ -1,8 +1,8 @@ -bin/warsow -bin/wsw_server -%%DATADIR%%/basewsw/cgame.so +%%CLIENT%%bin/warsow +%%SERVER%%bin/wsw_server +%%CLIENT%%%%DATADIR%%/basewsw/cgame.so %%DATADIR%%/basewsw/game.so -%%DATADIR%%/basewsw/ui.so +%%CLIENT%%%%DATADIR%%/basewsw/ui.so %%DATADIR%%/basewsw/data0.pk3 %%DATADIR%%/basewsw/data0fix1.pk3 %%DATADIR%%/basewsw/data0fix2.pk3 |