diff options
author | alepulver <alepulver@FreeBSD.org> | 2006-09-03 11:43:29 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2006-09-03 11:43:29 +0800 |
commit | 121f9198d6b9e87d132efc10845120abc2d098cf (patch) | |
tree | 0faec02db90c2f932daf776c1a59c58f359d2fbd /games/fteqw | |
parent | 5c5ba53d51610d4a53dfa390362c439e855ccfde (diff) | |
download | freebsd-ports-gnome-121f9198d6b9e87d132efc10845120abc2d098cf.tar.gz freebsd-ports-gnome-121f9198d6b9e87d132efc10845120abc2d098cf.tar.zst freebsd-ports-gnome-121f9198d6b9e87d132efc10845120abc2d098cf.zip |
The intentions to the FTE QuakeWorld mod are to add some cool features to
QuakeWorld, without loosing any (backwards) compatability.
All QuakeWorld clients should be able to connect to an FTE server, and all FTE
clients should connect to any other QW server.
The FTE client, supports Quake, NetQuake, QuakeWorld, Quake II, Quake III
Arena, Hexen 2, Nexuiz and others.
WWW: http://fteqw.com/
Diffstat (limited to 'games/fteqw')
-rw-r--r-- | games/fteqw/Makefile | 88 | ||||
-rw-r--r-- | games/fteqw/distinfo | 3 | ||||
-rw-r--r-- | games/fteqw/files/patch-Makefile | 97 | ||||
-rw-r--r-- | games/fteqw/files/patch-client__cl_main.c | 17 | ||||
-rw-r--r-- | games/fteqw/files/patch-client__snd_linux.c | 82 | ||||
-rw-r--r-- | games/fteqw/files/patch-client__sys_linux.c | 23 | ||||
-rw-r--r-- | games/fteqw/files/patch-common__fs.c | 38 | ||||
-rw-r--r-- | games/fteqw/files/patch-common__net_wins.c | 11 | ||||
-rw-r--r-- | games/fteqw/files/patch-gl__gl_vidlinuxglx.c | 11 | ||||
-rw-r--r-- | games/fteqw/files/patch-server__sv_sys_unix.c | 23 | ||||
-rw-r--r-- | games/fteqw/files/pkg-message.in | 12 | ||||
-rw-r--r-- | games/fteqw/pkg-descr | 10 |
12 files changed, 415 insertions, 0 deletions
diff --git a/games/fteqw/Makefile b/games/fteqw/Makefile new file mode 100644 index 000000000000..0f468645b77b --- /dev/null +++ b/games/fteqw/Makefile @@ -0,0 +1,88 @@ +# New ports collection makefile for: fteqw +# Date created: 2 Sep 2006 +# Whom: alepulver +# +# $FreeBSD$ +# + +PORTNAME= fteqw +PORTVERSION= 2770 +CATEGORIES= games +MASTER_SITES= SF +DISTNAME= ftesrc${PORTVERSION}-all + +MAINTAINER= alepulver@FreeBSD.org +COMMENT= QuakeWorld client with cool features, but still compatible + +USE_ZIP= yes +USE_DOS2UNIX= yes +USE_GCC= 3.2+ +USE_GMAKE= yes +WRKSRC= ${WRKDIR}/engine + +OPTIONS= GL "Build OpenGL client" on \ + OPTIMIZED_CFLAGS "Enable compilation optimizations" on \ + SV "Build dedicated server" on \ + SW "Build software (X11) client" on \ + X86_ASM "Enable use of x86 assembly code" on + +SUB_FILES= pkg-message + +.include "${.CURDIR}/../quake-data/Makefile.include" + +.include <bsd.port.pre.mk> + +.if defined(WITHOUT_DEDICATED) && defined(WITHOUT_GLX) && defined(WITHOUT_X11) +IGNORE= needs at least one executable (DEDICATED, GLX or X11) +.endif + +.if !defined(WITHOUT_GL) || !defined(WITHOUT_SW) +LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \ + png.5:${PORTSDIR}/graphics/png \ + vorbis.3:${PORTSDIR}/audio/libvorbis +.endif + +.if !defined(WITHOUT_GL) +USE_GL= yes +ALL_TARGET+= gl-rel +PLIST_FILES+= bin/fteqw-gl +FTE_TARGETS+= fteqw.gl +.endif + +.if !defined(WITHOUT_OPTIMIZED_CFLAGS) +MAKE_ENV+= OPTIMIZED_CFLAGS=true +.endif + +.if !defined(WITHOUT_SV) +ALL_TARGET+= sv-rel +PLIST_FILES+= bin/fteqw-sv +FTE_TARGETS+= fteqw.sv +.endif + +.if !defined(WITHOUT_SW) +USE_XLIB= yes +ALL_TARGET+= sw-rel +PLIST_FILES+= bin/fteqw-sw +FTE_TARGETS+= fteqw.sw +.endif + +.if !defined(WITHOUT_X86_ASM) && ${ARCH} == "i386" +MAKE_ENV+= USEASM=true +.endif + +post-patch: + @${REINPLACE_CMD} -e 's/malloc\.h/stdlib.h/' ${WRKSRC}/gl/gl_alias.c + @${REINPLACE_CMD} -e 's/__linux__/__unix__/' \ + ${WRKSRC}/common/plugin.c ${WRKSRC}/server/svq3_game.c + +do-install: +.for f in ${FTE_TARGETS} + ${INSTALL_PROGRAM} ${WRKSRC}/release/${f} ${PREFIX}/bin/${f:S/./-/} +.endfor + +post-install: + @${ECHO_CMD} + @${CAT} ${PKGMESSAGE} + @${ECHO_CMD} + +.include <bsd.port.post.mk> diff --git a/games/fteqw/distinfo b/games/fteqw/distinfo new file mode 100644 index 000000000000..885aa24f36ac --- /dev/null +++ b/games/fteqw/distinfo @@ -0,0 +1,3 @@ +MD5 (ftesrc2770-all.zip) = 1a47b5d5c88422316814d6e4ed1c2d17 +SHA256 (ftesrc2770-all.zip) = bc8eb51f67a0f8d73a355db4d317dd35a26a6c1827d96f180a76d7bacef1d43e +SIZE (ftesrc2770-all.zip) = 2713584 diff --git a/games/fteqw/files/patch-Makefile b/games/fteqw/files/patch-Makefile new file mode 100644 index 000000000000..fa95576da1b5 --- /dev/null +++ b/games/fteqw/files/patch-Makefile @@ -0,0 +1,97 @@ +--- ./Makefile.orig Tue Jul 18 00:34:50 2006 ++++ ./Makefile Sat Sep 2 18:40:11 2006 +@@ -1,5 +1,5 @@ +-CC=gcc +-STRIP=strip ++CC?=gcc ++STRIP?=strip + + STRIPFLAGS=--strip-unneeded --remove-section=.comment + +@@ -86,9 +86,9 @@ + BASELDFLAGS ?= -lm -ldl + + #BASELDFLAGS=-lm -lz +-GLXLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lpng -ljpeg +-GLSLDFLAGS=-L/usr/X11R6/lib -lMesaGL -lglide -lvga +-XLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lpng -ljpeg ++GLXLDFLAGS=-L$(X11BASE)/lib -lX11 -lXext -L$(LOCALBASE)/lib -lpng -ljpeg ++GLSLDFLAGS=-L$(X11BASE)/lib -lMesaGL -lglide -lvga ++XLDFLAGS=-L$(X11BASE)/lib -lX11 -lXext -L$(LOCALBASE)/lib -lpng -ljpeg + SLDFLAGS=-lvga + + ifeq ($(USEASM),true) +@@ -119,12 +119,14 @@ + BASE_ASM_CFLAGS = -DNOASM + endif + +-BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Wall -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(SW_DIR) -I$(GL_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(QUX_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -D_vsnprintf=vsnprintf -D_snprintf=snprintf ++BASE_CFLAGS=$(BASE_ASM_CFLAGS) -Dstrnicmp=strncasecmp -Dstricmp=strcasecmp -I$(CLIENT_DIR) -I$(SERVER_DIR) -I$(COMMON_DIR) -I$(SW_DIR) -I$(GL_DIR) -I$(PROGS_DIR) -I$(LIBS_DIR) -I$(QUX_DIR) -I$(LIBS_DIR)/dxsdk7/include -I$(LIBS_DIR)/sdl/include -I$(LIBS_DIR)/sdl/include/SDL -D_vsnprintf=vsnprintf -D_snprintf=snprintf + CLIENT_ONLY_CFLAGS=-DCLIENTONLY + SERVER_ONLY_CFLAGS=-DSERVERONLY + JOINT_CFLAGS= + DEBUG_CFLAGS=-ggdb -g ++ifeq ($(OPTIMIZED_CFLAGS),true) + RELEASE_CFLAGS=-O6 -fno-strict-aliasing -ffast-math -funroll-loops -fexpensive-optimizations $(CPUOPTIMIZATIONS) ++endif + GLCFLAGS=-DGLQUAKE + SWCFLAGS=-DSWQUAKE + +@@ -339,11 +341,11 @@ + GL_EXE_NAME=../fteqw_sdl.gl + GLCL_EXE_NAME=../fteqwcl_sdl.gl + ifdef windir +- GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lwsock32 `sdl-config --libs` ++ GL_LDFLAGS=$(GLLDFLAGS) -lmingw32 -lwsock32 `$(SDL_CONFIG) --libs` + else +- GL_LDFLAGS=$(GLLDFLAGS) -lpng -ljpeg `sdl-config --libs` ++ GL_LDFLAGS=$(GLLDFLAGS) -lpng -ljpeg `$(SDL_CONFIG) --libs` + endif +-GL_CFLAGS=$(GLCFLAGS) `sdl-config --cflags` ++GL_CFLAGS=$(GLCFLAGS) `$(SDL_CONFIG) --cflags` + GLB_DIR=gl_sdl + GLCL_DIR=glcl_sdl + +@@ -354,9 +356,9 @@ + SW_LDFLAGS=$(SWLDFLAGS) -lmingw32 -lwsock32 -lSDLmain -lSDL + else + #pthread is needed because of SDL. +-SW_LDFLAGS=$(SWLDFLAGS) `sdl-config --libs` -lpng -ljpeg ++SW_LDFLAGS=$(SWLDFLAGS) `$(SDL_CONFIG) --libs` -lpng -ljpeg + endif +-SW_CFLAGS=$(SWCFLAGS) `sdl-config --cflags` ++SW_CFLAGS=$(SWCFLAGS) `$(SDL_CONFIG) --cflags` + SWB_DIR=sw_sdl + SWCL_DIR=swcl_sdl + +@@ -424,8 +426,8 @@ + endif + GL_EXE_NAME=../fteqw.gl + GLCL_EXE_NAME=../fteqwcl.gl +- GL_LDFLAGS= -L/usr/local/lib $(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm +- GL_CFLAGS=$(GLCFLAGS) -I/usr/local/include -I/usr/X11R6/include ++ GL_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm ++ GL_CFLAGS=$(GLCFLAGS) -I$(LOCALBASE)/include -I$(X11BASE)/include + GLB_DIR=gl_bsd + GLCL_DIR=glcl_bsd + +@@ -436,8 +438,8 @@ + endif + SW_EXE_NAME=../fteqw.sw + SWCL_EXE_NAME=../fteqwcl.sw +- SW_LDFLAGS=-L/usr/local/lib $(SWLDFLAGS) $(XLDFLAGS) +- SW_CFLAGS=$(SWCFLAGS) -I/usr/local/include -I/usr/X11R6/include ++ SW_LDFLAGS=$(SWLDFLAGS) $(XLDFLAGS) ++ SW_CFLAGS=$(SWCFLAGS) -I$(LOCALBASE)/include -I$(X11BASE)/include + SWB_DIR=sw_bsd + SWCL_DIR=swcl_bsd + +@@ -449,7 +451,7 @@ + M_EXE_NAME=../fteqw + MCL_EXE_NAME=../fteqwcl + M_LDFLAGS=$(GLLDFLAGS) $(GLXLDFLAGS) -lXxf86vm +- M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS) -I/usr/X11R6/include ++ M_CFLAGS=$(SWCFLAGS) $(GLCFLAGS) -I$(X11BASE)/include + MB_DIR=m_bsd + MCL_DIR=mcl_bsd + endif diff --git a/games/fteqw/files/patch-client__cl_main.c b/games/fteqw/files/patch-client__cl_main.c new file mode 100644 index 000000000000..c688f240cbd5 --- /dev/null +++ b/games/fteqw/files/patch-client__cl_main.c @@ -0,0 +1,17 @@ +--- ./client/cl_main.c.orig Tue Jul 18 00:34:50 2006 ++++ ./client/cl_main.c Sat Sep 2 19:03:55 2006 +@@ -2873,11 +2873,13 @@ + + if (host_initialized && cfg_save_name.string && *cfg_save_name.string) + { +- if (strchr(cfg_save_name.string, '.')) ++#if 0 ++ if (strstr(cfg_save_name.string, "..")) + { + Con_TPrintf (TLC_CONFIGCFG_WRITEFAILED); + return; + } ++#endif + + f = FS_OpenVFS(va("%s.cfg",cfg_save_name.string), "wb", FS_GAMEONLY); + if (!f) diff --git a/games/fteqw/files/patch-client__snd_linux.c b/games/fteqw/files/patch-client__snd_linux.c new file mode 100644 index 000000000000..efe25ad5f21b --- /dev/null +++ b/games/fteqw/files/patch-client__snd_linux.c @@ -0,0 +1,82 @@ +--- ./client/snd_linux.c.orig Tue Jul 18 00:34:50 2006 ++++ ./client/snd_linux.c Sat Sep 2 18:40:11 2006 +@@ -115,14 +115,6 @@ + return 0; + } + +- if (ioctl(sc->audio_fd, SNDCTL_DSP_GETOSPACE, &info)==-1) +- { +- perror("GETOSPACE"); +- Con_Printf(S_ERROR "OSS: Um, can't do GETOSPACE?\n"); +- OSS_Shutdown(sc); +- return 0; +- } +- + sc->sn.splitbuffer = 0; + + // set sample bits & speed +@@ -152,27 +144,6 @@ + sc->sn.speed = tryrates[i]; + } + +- if (sc->sn.samples > (info.fragstotal * info.fragsize * 4)) +- { +- Con_Printf(S_NOTICE "OSS: Enabling bigfoot's mmap hack! Hope you know what you're doing!\n"); +- sc->sn.samples = info.fragstotal * info.fragsize * 4; +- } +- sc->sn.samples = info.fragstotal * info.fragsize; +- sc->sn.submission_chunk = 1; +- +-// memory map the dma buffer +- +- sc->sn.buffer = (unsigned char *) mmap(NULL, sc->sn.samples, PROT_WRITE, MAP_FILE|MAP_SHARED, sc->audio_fd, 0); +- if (!sc->sn.buffer) +- { +- perror(snddev); +- Con_Printf(S_ERROR "OSS: Could not mmap %s\n", snddev); +- OSS_Shutdown(sc); +- return 0; +- } +- +- sc->sn.samples /= (sc->sn.samplebits/8); +- + tmp = 0; + if (sc->sn.numchannels == 2) + tmp = 1; +@@ -228,6 +199,36 @@ + Con_Printf(S_ERROR "OSS: %d-bit sound not supported.\n", sc->sn.samplebits); + OSS_Shutdown(sc); + return 0; ++ } ++ ++ if (ioctl(sc->audio_fd, SNDCTL_DSP_GETOSPACE, &info)==-1) ++ { ++ perror("GETOSPACE"); ++ Con_Printf(S_ERROR "OSS: Um, can't do GETOSPACE?\n"); ++ OSS_Shutdown(sc); ++ return 0; ++ } ++ ++ sc->sn.samples = info.fragstotal * info.fragsize; ++ sc->sn.submission_chunk = 1; ++ ++// memory map the dma buffer ++ ++ sc->sn.buffer = (unsigned char *) mmap(NULL, sc->sn.samples, PROT_WRITE, MAP_FILE|MAP_SHARED, sc->audio_fd, 0); ++ if (!sc->sn.buffer) ++ { ++ perror(snddev); ++ Con_Printf(S_ERROR "OSS: Could not mmap %s\n", snddev); ++ OSS_Shutdown(sc); ++ return 0; ++ } ++ ++ sc->sn.samples /= (sc->sn.samplebits/8); ++ ++ if (sc->sn.samples > (info.fragstotal * info.fragsize * 4)) ++ { ++ Con_Printf(S_NOTICE "OSS: Enabling bigfoot's mmap hack! Hope you know what you're doing!\n"); ++ sc->sn.samples = info.fragstotal * info.fragsize * 4; + } + + // toggle the trigger & start her up diff --git a/games/fteqw/files/patch-client__sys_linux.c b/games/fteqw/files/patch-client__sys_linux.c new file mode 100644 index 000000000000..1998a2e12e38 --- /dev/null +++ b/games/fteqw/files/patch-client__sys_linux.c @@ -0,0 +1,23 @@ +--- ./client/sys_linux.c.orig Tue Jul 18 00:34:50 2006 ++++ ./client/sys_linux.c Sat Sep 2 18:40:52 2006 +@@ -364,18 +364,15 @@ + void *(*GetGameAPI)(void *); + + char name[MAX_OSPATH]; +- char curpath[MAX_OSPATH]; + char *searchpath; +- const char *gamename = "gamei386.so"; ++ const char *gamename = "game.so"; + + void *ret; + +- getcwd(curpath, sizeof(curpath)); +- + searchpath = 0; + while((searchpath = COM_NextPath(searchpath))) + { +- sprintf (name, "%s/%s/%s", curpath, searchpath, gamename); ++ sprintf (name, "%s/%s", searchpath, gamename); + + game_library = dlopen (name, RTLD_LAZY ); + if (game_library) diff --git a/games/fteqw/files/patch-common__fs.c b/games/fteqw/files/patch-common__fs.c new file mode 100644 index 000000000000..23c3209883d7 --- /dev/null +++ b/games/fteqw/files/patch-common__fs.c @@ -0,0 +1,38 @@ +--- ./common/fs.c.orig Tue Jul 18 00:34:40 2006 ++++ ./common/fs.c Sat Sep 2 19:18:59 2006 +@@ -2051,7 +2051,7 @@ + case FS_GAMEONLY: //OS access only, no paks + if (*com_homedir) + { +- snprintf(fullname, sizeof(fullname), "%s%s/%s", com_homedir, gamedirfile, filename); ++ snprintf(fullname, sizeof(fullname), "%s/%s/%s", com_homedir, gamedirfile, filename); + vfs = VFSOS_Open(fullname, mode); + if (vfs) + return vfs; +@@ -2060,7 +2060,7 @@ + return VFSOS_Open(fullname, mode); + case FS_GAME: + if (*com_homedir) +- snprintf(fullname, sizeof(fullname), "%s%s/%s", com_homedir, gamedirfile, filename); ++ snprintf(fullname, sizeof(fullname), "%s/%s/%s", com_homedir, gamedirfile, filename); + else + snprintf(fullname, sizeof(fullname), "%s%s/%s", com_quakedir, gamedirfile, filename); + break; +@@ -2073,7 +2073,7 @@ + case FS_BASE: + if (*com_homedir) + { +- snprintf(fullname, sizeof(fullname), "%s%s", com_homedir, filename); ++ snprintf(fullname, sizeof(fullname), "%s/%s", com_homedir, filename); + vfs = VFSOS_Open(fullname, mode); + if (vfs) + return vfs; +@@ -2083,7 +2083,7 @@ + case FS_CONFIGONLY: + if (*com_homedir) + { +- snprintf(fullname, sizeof(fullname), "%sfte/%s", com_homedir, filename); ++ snprintf(fullname, sizeof(fullname), "%s/fte/%s", com_homedir, filename); + vfs = VFSOS_Open(fullname, mode); + if (vfs) + return vfs; diff --git a/games/fteqw/files/patch-common__net_wins.c b/games/fteqw/files/patch-common__net_wins.c new file mode 100644 index 000000000000..05bfae78dfc3 --- /dev/null +++ b/games/fteqw/files/patch-common__net_wins.c @@ -0,0 +1,11 @@ +--- common/net_wins.c.orig Sun Sep 3 00:25:08 2006 ++++ common/net_wins.c Sun Sep 3 00:26:44 2006 +@@ -23,6 +23,8 @@ + #include "quakedef.h" + #include "netinc.h" + ++#include <sys/time.h> ++ + netadr_t net_local_cl_ipadr; + netadr_t net_local_cl_ip6adr; + netadr_t net_local_cl_ipxadr; diff --git a/games/fteqw/files/patch-gl__gl_vidlinuxglx.c b/games/fteqw/files/patch-gl__gl_vidlinuxglx.c new file mode 100644 index 000000000000..0a80aa0eccf7 --- /dev/null +++ b/games/fteqw/files/patch-gl__gl_vidlinuxglx.c @@ -0,0 +1,11 @@ +--- ./gl/gl_vidlinuxglx.c.orig Tue Jul 18 00:34:46 2006 ++++ ./gl/gl_vidlinuxglx.c Sat Sep 2 18:40:11 2006 +@@ -41,7 +41,7 @@ + #include <X11/extensions/xf86dga.h> + #endif + +-#ifdef __linux__ ++#ifdef __unix__ + #define WITH_VMODE //undefine this if the following include fails. + #endif + #ifdef WITH_VMODE diff --git a/games/fteqw/files/patch-server__sv_sys_unix.c b/games/fteqw/files/patch-server__sv_sys_unix.c new file mode 100644 index 000000000000..e4f61f4ce5da --- /dev/null +++ b/games/fteqw/files/patch-server__sv_sys_unix.c @@ -0,0 +1,23 @@ +--- ./server/sv_sys_unix.c.orig Tue Jul 18 00:34:46 2006 ++++ ./server/sv_sys_unix.c Sat Sep 2 18:41:11 2006 +@@ -807,18 +807,15 @@ + void *(*GetGameAPI)(void *); + + char name[MAX_OSPATH]; +- char curpath[MAX_OSPATH]; + char *searchpath; +- const char *gamename = "gamei386.so"; ++ const char *gamename = "game.so"; + + void *ret; + +- getcwd(curpath, sizeof(curpath)); +- + searchpath = 0; + while((searchpath = COM_NextPath(searchpath))) + { +- sprintf (name, "%s/%s/%s", curpath, searchpath, gamename); ++ sprintf (name, "%s/%s", searchpath, gamename); + game_library = dlopen (name, RTLD_LAZY ); + if (game_library) + { diff --git a/games/fteqw/files/pkg-message.in b/games/fteqw/files/pkg-message.in new file mode 100644 index 000000000000..dd01a1d59dbc --- /dev/null +++ b/games/fteqw/files/pkg-message.in @@ -0,0 +1,12 @@ +============================================================================== + +FTE QuakeWorld has been installed. + +To start in full-screen mode run it with "-fullscreen". + +To load and save the configuration to ~/.fte run it with "-usehome". + +To select the game you want to play use "-basedir <dir>". For example, to play +Quake use "-basedir %%Q1DIR%%". + +============================================================================== diff --git a/games/fteqw/pkg-descr b/games/fteqw/pkg-descr new file mode 100644 index 000000000000..f9c969dfcd21 --- /dev/null +++ b/games/fteqw/pkg-descr @@ -0,0 +1,10 @@ +The intentions to the FTE QuakeWorld mod are to add some cool features to +QuakeWorld, without loosing any (backwards) compatability. + +All QuakeWorld clients should be able to connect to an FTE server, and all FTE +clients should connect to any other QW server. + +The FTE client, supports Quake, NetQuake, QuakeWorld, Quake II, Quake III +Arena, Hexen 2, Nexuiz and others. + +WWW: http://fteqw.com/ |