diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2014-09-25 20:18:05 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2014-09-25 20:18:05 +0000 |
commit | 42d4e1b7c0308f6b491700adaaae065cb2fc2ced (patch) | |
tree | d3ca5d2a5acae62fac581f2ce0cb51e7b7fe8761 /games/warsow | |
parent | 89917441c2738b8da40a2d508712058eb6306fe4 (diff) | |
download | ports-42d4e1b7c0308f6b491700adaaae065cb2fc2ced.tar.gz ports-42d4e1b7c0308f6b491700adaaae065cb2fc2ced.zip |
Notes
Diffstat (limited to 'games/warsow')
-rw-r--r-- | games/warsow/Makefile | 46 | ||||
-rw-r--r-- | games/warsow/distinfo | 4 | ||||
-rw-r--r-- | games/warsow/files/extra-patch-no-xrandr | 72 | ||||
-rw-r--r-- | games/warsow/files/patch-Makefile | 6 |
4 files changed, 97 insertions, 31 deletions
diff --git a/games/warsow/Makefile b/games/warsow/Makefile index 9fc7dfb80a47..eeeb8fd9371f 100644 --- a/games/warsow/Makefile +++ b/games/warsow/Makefile @@ -2,13 +2,11 @@ # $FreeBSD$ PORTNAME= warsow -PORTVERSION= 1.5 -PORTREVISION= 2 +PORTVERSION= 1.51 CATEGORIES= games -MASTER_SITES= SF/warsow.mirror/Warsow%20${PORTVERSION} \ - http://www.warsow.net:1337/~warsow/${PORTVERSION}/ -DISTNAME= ${PORTNAME}_${PORTVERSION:S/.//}_sdk -DIST_SUBDIR= ${PORTNAME} +MASTER_SITES= SF/warsow.mirror/Warsow%20${PORTVERSION} +DISTNAME= ${PORTNAME}_${PORTVERSION}_sdk +EXTRACT_SUFX= .tar.gz.1 MAINTAINER= games@FreeBSD.org COMMENT= Futuristic, fast-paced first person shooter @@ -16,21 +14,21 @@ COMMENT= Futuristic, fast-paced first person shooter LICENSE= GPLv2 LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl +RUN_DEPENDS= ${DATADIR}/basewsw/data1_15.pk3:${PORTSDIR}/games/warsow-data ONLY_FOR_ARCHS= i386 amd64 -USES= gmake +USES= gmake compiler:c++11-lang WRKSRC= ${WRKDIR}/source/source ALL_TARGET= game angelwrap RELEASEDIR= ${WRKSRC}/release AS_SDK_DIR= ${WRKSRC}/../libsrcs/angelscript/sdk -PLIST_FILES= %%DATADIR%%/basewsw/game_${ARCH}.so \ - %%DATADIR%%/libs/angelwrap_${ARCH}.so -PLIST_DIRS= %%DATADIR%%/basewsw %%DATADIR%%/libs %%DATADIR%% +PORTDATA= * +PORTDOCS= *.rtf *.doc sourcecode_quickstart.txt -OPTIONS_DEFINE= CLIENT SERVER FTLIB REF_GL QF OPENAL IRC CIN TV_SRV DOCS +OPTIONS_DEFINE= CLIENT SERVER FTLIB REF_GL QF OPENAL IRC CIN TV_SRV DOCS XRANDR OPTIONS_DEFAULT= CLIENT SERVER FTLIB REF_GL QF OPENAL IRC CIN TV_SRV CLIENT_DESC= Build game client @@ -42,22 +40,20 @@ OPENAL_DESC= Build OpenAL sound module IRC_DESC= Build IRC client module CIN_DESC= Build Cinematics playback module TV_SRV_DESC= Build Warsow TV server - -PORTDOCS= *.rtf *.doc sourcecode_quickstart.txt +XRANDR_DESC= Xrandr support (may be broken with nvidia-driver) .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MCLIENT} -USE_XORG= xi xrandr +USE_XORG= xi ALL_TARGET+= cgame ui client -PLIST_FILES+= bin/warsow %%DATADIR%%/basewsw/cgame_${ARCH}.so \ - %%DATADIR%%/basewsw/ui_${ARCH}.so \ +PLIST_FILES+= bin/warsow \ share/pixmaps/warsow128x128.xpm DESKTOP_ENTRIES="Warsow" "${COMMENT}" \ "${PREFIX}/share/pixmaps/warsow128x128.xpm" "${PORTNAME}" \ - "Game;Shooter;" "" + "Game;Shooter;" false . if ${PORT_OPTIONS:MFTLIB} || ${PORT_OPTIONS:MREF_GL} LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png @@ -66,7 +62,6 @@ LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png . if ${PORT_OPTIONS:MFTLIB} LIB_DEPENDS+= libfreetype.so:${PORTSDIR}/print/freetype2 ALL_TARGET+= ftlib -PLIST_FILES+= %%DATADIR%%/libs/ftlib_${ARCH}.so . endif . if ${PORT_OPTIONS:MREF_GL} @@ -74,7 +69,6 @@ USE_GL= gl USE_XORG+= xinerama LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg ALL_TARGET+= ref_gl -PLIST_FILES+= %%DATADIR%%/libs/ref_gl_${ARCH}.so . endif . if ${PORT_OPTIONS:MQF} || ${PORT_OPTIONS:MOPENAL} @@ -84,25 +78,27 @@ LIB_DEPENDS+= libvorbisfile.so:${PORTSDIR}/audio/libvorbis . if ${PORT_OPTIONS:MQF} USE_SDL= sdl ALL_TARGET+= qf -PLIST_FILES+= %%DATADIR%%/libs/snd_qf_${ARCH}.so . endif . if ${PORT_OPTIONS:MOPENAL} USES+= openal:al ALL_TARGET+= openal -PLIST_FILES+= %%DATADIR%%/libs/snd_openal_${ARCH}.so . endif . if ${PORT_OPTIONS:MIRC} ALL_TARGET+= irc -PLIST_FILES+= %%DATADIR%%/libs/irc_${ARCH}.so . endif . if ${PORT_OPTIONS:MCIN} ALL_TARGET+= cin -PLIST_FILES+= %%DATADIR%%/libs/cin_${ARCH}.so BUILD_DEPENDS+= ${LOCALBASE}/include/theora/theoradec.h:${PORTSDIR}/multimedia/libtheora . endif + +. if ${PORT_OPTIONS:MXRANDR} +USE_XORG+= xrandr +. else +EXTRA_PATCHES+= ${FILESDIR}/extra-patch-no-xrandr +. endif .endif .if ${PORT_OPTIONS:MSERVER} @@ -142,8 +138,6 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/unix/warsow128x128.xpm \ ${STAGEDIR}${PREFIX}/share/pixmaps .endif - - @${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/../../docs/|} ${STAGEDIR}${DOCSDIR} + cd ${WRKDIR}/docs && ${COPYTREE_SHARE} "${PORTDOCS}" ${STAGEDIR}${DOCSDIR} .include <bsd.port.mk> diff --git a/games/warsow/distinfo b/games/warsow/distinfo index 03f8b5103adf..3b91e9b1555d 100644 --- a/games/warsow/distinfo +++ b/games/warsow/distinfo @@ -1,2 +1,2 @@ -SHA256 (warsow/warsow_15_sdk.tar.gz) = 277bbe87744352ee02476dc1bf9258ed5b204345b1b8eb394442dcec6a956949 -SIZE (warsow/warsow_15_sdk.tar.gz) = 89175325 +SHA256 (warsow_1.51_sdk.tar.gz.1) = ac635c654e088566d30d53e8fab21abd2d40762d7f4ab0e09faa827aac5c4f97 +SIZE (warsow_1.51_sdk.tar.gz.1) = 89191554 diff --git a/games/warsow/files/extra-patch-no-xrandr b/games/warsow/files/extra-patch-no-xrandr new file mode 100644 index 000000000000..b8ec765656f5 --- /dev/null +++ b/games/warsow/files/extra-patch-no-xrandr @@ -0,0 +1,72 @@ +--- unix/unix_vid.c.orig 2014-06-08 16:08:05.000000000 +0400 ++++ unix/unix_vid.c 2014-09-25 15:20:25.000000000 +0400 +@@ -126,28 +126,5 @@ + */ + qboolean VID_GetDisplaySize( int *width, int *height ) + { +- XRRScreenConfiguration *xrrConfig; +- XRRScreenSize *xrrSizes; +- Display *dpy; +- Window root; +- Rotation rotation; +- SizeID size_id; +- int num_sizes; +- +- dpy = XOpenDisplay( NULL ); +- if( dpy ) +- { +- root = DefaultRootWindow( dpy ); +- xrrConfig = XRRGetScreenInfo( dpy, root ); +- xrrSizes = XRRConfigSizes( xrrConfig, &num_sizes ); +- size_id = XRRConfigCurrentConfiguration( xrrConfig, &rotation ); +- +- *width = xrrSizes[size_id].width; +- *height = xrrSizes[size_id].height; +- +- XCloseDisplay( dpy ); +- return qtrue; +- } +- + return qfalse; + } +--- unix/unix_glw.c.orig 2014-06-08 16:08:05.000000000 +0400 ++++ unix/unix_glw.c 2014-09-25 15:20:05.000000000 +0400 +@@ -41,7 +41,7 @@ + #define INIT_MASK ( KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | FocusChangeMask | DISPLAY_MASK ) + + // use experimental Xrandr resolution? +-#define _XRANDR_OVER_VIDMODE_ ++#undef _XRANDR_OVER_VIDMODE_ + + x11display_t x11display; + x11wndproc_t x11wndproc; +--- Makefile.orig 2014-06-08 16:08:05.000000000 +0400 ++++ Makefile 2014-09-25 15:39:56.000000000 +0400 +@@ -265,7 +265,7 @@ + LIB=lib + endif + +-LDFLAGS_CLIENT=-lz -lpthread -lX11 -lXext -lXi -lXrandr -lrt $(shell curl-config --libs) ++LDFLAGS_CLIENT=-lz -lpthread -lX11 -lXext -lXi -lrt $(shell curl-config --libs) + LDFLAGS_DED=-lz -lpthread $(shell curl-config --libs) + LDFLAGS_MODULE=-shared + LDFLAGS_TV_SERVER=-lz -lpthread $(shell curl-config --libs) +@@ -306,7 +306,7 @@ + + ifeq ($(BUILD_REF_GL),YES) + CFLAGS_REF_GL= +-LDFLAGS_REF_GL=-lX11 -lXext -lXinerama -lXrandr -lXxf86vm -ljpeg -lpng -lz ++LDFLAGS_REF_GL=-lX11 -lXext -lXinerama -lXxf86vm -ljpeg -lpng -lz + endif + + LDFLAGS_IRC= +--- unix/x11.h.orig 2014-06-08 16:08:05.000000000 +0400 ++++ unix/x11.h 2014-09-25 16:38:59.000000000 +0400 +@@ -6,7 +6,6 @@ + + #include <X11/extensions/xf86vmode.h> + #include <X11/extensions/Xinerama.h> +-#include <X11/extensions/Xrandr.h> + #include <X11/extensions/XInput2.h> + + #include <GL/glx.h> diff --git a/games/warsow/files/patch-Makefile b/games/warsow/files/patch-Makefile index 1e59627f1453..f1f4dc1958ef 100644 --- a/games/warsow/files/patch-Makefile +++ b/games/warsow/files/patch-Makefile @@ -1,5 +1,5 @@ ---- Makefile.orig 2014-05-02 01:12:05.000000000 +0400 -+++ Makefile 2014-05-07 12:00:03.000000000 +0400 +--- Makefile.orig 2014-06-08 16:08:05.000000000 +0400 ++++ Makefile 2014-06-12 17:44:20.000000000 +0400 @@ -54,21 +54,13 @@ else CC?=gcc @@ -37,7 +37,7 @@ else LDFLAGS_COMMON+= -L$(LOCALBASE)/lib -lm -ldl -O1 -Wl,--as-needed endif -@@ -358,12 +351,9 @@ +@@ -357,12 +350,9 @@ ###################################################################################################### # Helper functions ###################################################################################################### |