aboutsummaryrefslogtreecommitdiff
path: root/games/quake2max
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2006-07-28 22:05:00 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2006-07-28 22:05:00 +0000
commit9b386ca62058418126c1ee6d37ef6139397d0b63 (patch)
tree71ac9c2b55d6308108ef896867c442d5679f097e /games/quake2max
parentc2a1e348fecf3044168e6ade0549d4378edf4050 (diff)
downloadports-9b386ca62058418126c1ee6d37ef6139397d0b63.tar.gz
ports-9b386ca62058418126c1ee6d37ef6139397d0b63.zip
OpenGL only Quake II engine modification with the following features:
- Requires id Software's Quake II: Patched to v3.20. - OpenGL Only: No software mode; No 3dfx. - 32-bit color skin/texture support: .jpg; .tga; .png. - Texture Compression: For large textures/skins. - Particle Engine: Fast intuitive system; dynamically lit; custom special effects. - RScript Shaders: Spheremapping; detail textures; animated skins; vertex deformation, other custom functions. - Enhanced Menus: Mouse support in menus; menus scaled to fixed resolution; reorganized menus. - Client side 3-D Chase Camera: Accurate aiming system; adjustable viewing distance; adjustable viewing angle. - Miscellaneous Special Effects: Improved model lighting system; improved dynamic shadows system; overbright maps, entities and particles; transparent surface vertex lighting. - Miscellaneous Game play Enhancements: Decals for blood, bullet marks, and impact explosions; mouse FOV autosensitivity; "*.pak" pak loading; CVARlist filter parameter. - Backwards Compatible: With old mods. WWW: http://www.quake2max.net/
Notes
Notes: svn path=/head/; revision=169007
Diffstat (limited to 'games/quake2max')
-rw-r--r--games/quake2max/Makefile124
-rw-r--r--games/quake2max/distinfo6
-rw-r--r--games/quake2max/files/patch-Makefile84
-rw-r--r--games/quake2max/files/patch-qcommon__files.c42
-rw-r--r--games/quake2max/files/patch-unix__gl_glx.c19
-rw-r--r--games/quake2max/files/patch-unix__sys_unix.c53
-rw-r--r--games/quake2max/pkg-descr23
-rw-r--r--games/quake2max/pkg-plist9
8 files changed, 360 insertions, 0 deletions
diff --git a/games/quake2max/Makefile b/games/quake2max/Makefile
new file mode 100644
index 000000000000..5f3d8f3ce102
--- /dev/null
+++ b/games/quake2max/Makefile
@@ -0,0 +1,124 @@
+# New ports collection makefile for: quake2max
+# Date created: 24 Jul 2006
+# Whom: alepulver
+#
+# $FreeBSD$
+#
+
+PORTNAME= quake2max
+PORTVERSION= 0.44
+CATEGORIES= games
+MASTER_SITES= http://qudos.quakedev.com/linux/quake2/engines/Quake2MaX/:src \
+ ${MASTER_SITE_LOCAL:S/$/:data/}
+MASTER_SITE_SUBDIR= alepulver/:data
+DISTNAME= Quake2maX_${PORTVERSION}-src_unix
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:src \
+ ${Q2MAX_DATA}:data
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= alepulver@FreeBSD.org
+COMMENT= An OpenGL only Quake II engine modification
+
+EXTRACT_DEPENDS=unrar:${PORTSDIR}/archivers/unrar
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+ALL_TARGET= release
+WRKSRC= ${WRKDIR}/Quake2maX-44-src_unix
+
+OPTIONS= CLIENT "Build client" on \
+ DEDICATED "Build dedicated server" on \
+ GAME "Build a main game .so file" off \
+ GLX "Build OpenGL renderer" on \
+ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
+ SDL "Build SDL client" on \
+ SDLGL "Build SDL OpenGL renderer" on
+
+MAKE_ENV= LIBDIR="${LIBDIR}"
+PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
+LIBDIR= ${PREFIX}/lib/${PORTNAME}
+
+Q2MAX_DATA= ${PORTNAME}.${PORTVERSION:S/.//}.rar
+
+.include "${.CURDIR}/../quake2-data/Makefile.include"
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_GLX) || defined(WITH_SDLGL)
+LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg \
+ png.5:${PORTSDIR}/graphics/png
+USE_GL= yes
+.endif
+
+.if defined(WITH_SDL) || defined(WITH_SDLGL)
+USE_SDL= yes
+.endif
+
+.if defined(WITH_CLIENT)
+MAKE_ENV+= BUILD_QUAKE2MAX=YES
+PLIST_SUB+= CLIENT=""
+Q2MAX_BIN+= quake2max
+.else
+PLIST_SUB+= CLIENT="@comment "
+.endif
+
+.if defined(WITH_DEDICATED)
+MAKE_ENV+= BUILD_DEDICATED=YES
+PLIST_SUB+= DEDICATED=""
+Q2MAX_BIN+= quake2max-ded
+.else
+PLIST_SUB+= DEDICATED="@comment "
+.endif
+
+.if defined(WITH_GAME)
+MAKE_ENV+= BUILD_GAME=YES
+PLIST_SUB+= GAME=""
+.else
+PLIST_SUB+= GAME="@comment "
+.endif
+
+.if defined(WITH_GLX)
+MAKE_ENV+= BUILD_GLX=YES
+PLIST_SUB+= GLX=""
+Q2MAX_REF+= glx
+.else
+PLIST_SUB+= GLX="@comment "
+.endif
+
+.if defined(WITH_OPTIMIZED_CFLAGS)
+MAKE_ENV+= WITH_OPTIMIZED_CFLAGS=YES
+.endif
+
+.if defined(WITH_SDL)
+MAKE_ENV+= BUILD_QUAKE2MAX-SDL=YES
+PLIST_SUB+= SDL=""
+Q2MAX_BIN+= quake2max-sdl
+.else
+PLIST_SUB+= SDL="@comment "
+.endif
+
+.if defined(WITH_SDLGL)
+MAKE_ENV+= BUILD_SDLGL=YES
+PLIST_SUB+= SDLGL=""
+Q2MAX_REF+= sdlgl
+.else
+PLIST_SUB+= SDLGL="@comment "
+.endif
+
+post-extract:
+ @cd ${WRKSRC} && unrar e ${DISTDIR}/${Q2MAX_DATA} baseq2/_maxpak.pak
+
+do-install:
+ ${MKDIR} ${LIBDIR}/baseq2
+.for f in ${Q2MAX_BIN}
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/${f} ${PREFIX}/bin
+.endfor
+.for f in ${Q2MAX_REF}
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/rfx_${f}.so ${LIBDIR}
+.endfor
+.if defined(WITH_GAME)
+ ${INSTALL_PROGRAM} ${WRKSRC}/quake2/baseq2/game.so ${LIBDIR}/baseq2
+.endif
+ ${INSTALL_DATA} ${WRKSRC}/_maxpak.pak ${LIBDIR}/baseq2/maxpak.pak
+
+.include <bsd.port.post.mk>
diff --git a/games/quake2max/distinfo b/games/quake2max/distinfo
new file mode 100644
index 000000000000..96c90581f573
--- /dev/null
+++ b/games/quake2max/distinfo
@@ -0,0 +1,6 @@
+MD5 (Quake2maX_0.44-src_unix.tar.bz2) = 862d114541a49df2ef78f2700fde636b
+SHA256 (Quake2maX_0.44-src_unix.tar.bz2) = 579aa80b1f26ebb5e7cd4dff4096504c378c7b225dd6c05fd5f076e3a4b5c8b7
+SIZE (Quake2maX_0.44-src_unix.tar.bz2) = 535440
+MD5 (quake2max.044.rar) = 8a18fa4a431acbe1891a9666abb210e7
+SHA256 (quake2max.044.rar) = a8fd147c747e283438780bc8a4700df9c6173f4417e7ace0c67975036a08bce1
+SIZE (quake2max.044.rar) = 2071329
diff --git a/games/quake2max/files/patch-Makefile b/games/quake2max/files/patch-Makefile
new file mode 100644
index 000000000000..923fd31cfa51
--- /dev/null
+++ b/games/quake2max/files/patch-Makefile
@@ -0,0 +1,84 @@
+--- ./Makefile.orig Wed Jan 11 16:55:21 2006
++++ ./Makefile Fri Jul 28 13:30:29 2006
+@@ -17,15 +17,16 @@
+ #OPTIONS
+ ######################################
+
+-BUILD_3ZB2_SUPPORT=YES #For play Capture the Flag with bots is required to YES, there is a bug
+-BUILD_DATADIR=NO # Use DATADIR to read (data, renderers, etc.) and ~/.quake2 to write.
+-BUILD_DEDICATED=NO # build a dedicated quake2 server
+-BUILD_GAME=YES # game$(ARCH).so
+-BUILD_GLX=YES # X11 GLX driver. Works somewhat ok.
+-BUILD_QUAKE2MAX=YES # kmquake executable (uses OSS for cdrom and sound)
+-BUILD_QUAKE2MAX-SDL=YES # kmquake2-sdl executable (uses SDL for cdrom and sound)
+-BUILD_LIBDIR=NO # Use LIBDIR to read data and renderers (independent from DATADIR).
+-BUILD_SDLGL=YES # SDL OpenGL driver. Works fine for some people.
++BUILD_3ZB2_SUPPORT?=NO #For play Capture the Flag with bots is required to YES, there is a bug
++BUILD_DATADIR?=YES # Use DATADIR to read (data, renderers, etc.) and ~/.quake2 to write.
++BUILD_DEDICATED?=NO # build a dedicated quake2 server
++BUILD_GAME?=NO # game$(ARCH).so
++BUILD_GLX?=NO # X11 GLX driver. Works somewhat ok.
++BUILD_QUAKE2MAX?=NO # kmquake executable (uses OSS for cdrom and sound)
++BUILD_QUAKE2MAX-SDL?=NO # kmquake2-sdl executable (uses SDL for cdrom and sound)
++BUILD_LIBDIR?=YES # Use LIBDIR to read data and renderers (independent from DATADIR).
++BUILD_SDLGL?=NO # SDL OpenGL driver. Works fine for some people.
++WITH_OPTIMIZED_CFLAGS?=NO # Enable compilation optimizations.
+
+ ######################################
+
+@@ -38,14 +39,17 @@
+ CC?=gcc
+ BASE_CFLAGS= #-Wall -pipe
+ DEBUG_CFLAGS=$(BASE_CFLAGS) -g -ggdb
+-RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
++RELEASE_CFLAGS=$(BASE_CFLAGS)
+
+-ifeq ($(ARCH),i386)
+- RELEASE_CFLAGS+=-falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing
++ifeq ($(WITH_OPTIMIZED_CFLAGS),YES)
++ RELEASE_CFLAGS+=-O2 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
++ ifeq ($(ARCH),i386)
++ RELEASE_CFLAGS+=-falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing
++ endif
+ endif
+
+-BUILD_DEBUG_DIR=debug$(ARCH)
+-BUILD_RELEASE_DIR=release$(ARCH)
++BUILD_DEBUG_DIR=debug
++BUILD_RELEASE_DIR=release
+
+ CLIENT_DIR=$(MOUNT_DIR)/client
+ SERVER_DIR=$(MOUNT_DIR)/server
+@@ -133,7 +137,7 @@
+ endif
+
+ ifeq ($(strip $(BUILD_GAME)),YES)
+- TARGETS+=$(BINDIR)/baseq2/game$(ARCH).$(SHLIBEXT)
++ TARGETS+=$(BINDIR)/baseq2/game.$(SHLIBEXT)
+ endif
+
+ ifeq ($(strip $(BUILD_QUAKE2MAX)),YES)
+@@ -249,11 +253,11 @@
+ $(BUILDDIR)/client/cd_sdl.o \
+ $(BUILDDIR)/client/snd_sdl.o
+
+-ifeq ($(ARCH),axp)
+-QUAKE2_AS_OBJS = #blank
+-else
++ifeq ($(ARCH),i386)
+ QUAKE2_AS_OBJS = \
+ $(BUILDDIR)/client/snd_mixa.o
++else
++QUAKE2_AS_OBJS = # empty
+ endif
+
+ $(BINDIR)/quake2max : $(QUAKE2_OBJS) $(QUAKE2_LNX_OBJS) $(QUAKE2_AS_OBJS)
+@@ -579,7 +583,7 @@
+ $(BUILDDIR)/game/p_weapon.o \
+ $(BUILDDIR)/game/m_flash.o
+
+-$(BINDIR)/baseq2/game$(ARCH).$(SHLIBEXT) : $(GAME_OBJS)
++$(BINDIR)/baseq2/game.$(SHLIBEXT) : $(GAME_OBJS)
+ $(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(GAME_OBJS)
+
+ $(BUILDDIR)/game/g_ai.o : $(GAME_DIR)/g_ai.c
diff --git a/games/quake2max/files/patch-qcommon__files.c b/games/quake2max/files/patch-qcommon__files.c
new file mode 100644
index 000000000000..1b5dfad39816
--- /dev/null
+++ b/games/quake2max/files/patch-qcommon__files.c
@@ -0,0 +1,42 @@
+--- ./qcommon/files.c.orig Wed Jan 4 07:14:49 2006
++++ ./qcommon/files.c Fri Jul 28 13:30:29 2006
+@@ -778,6 +778,9 @@
+ Cvar_FullSet ("gamedir", dir, CVAR_SERVERINFO|CVAR_NOSET);
+ if (fs_cddir->string[0])
+ FS_AddGameDirectory (va("%s/%s", fs_cddir->string, dir) );
++#ifdef DATADIR
++ FS_AddGameDirectory(va("%s/%s", DATADIR, dir));
++#endif
+ #ifdef LIBDIR
+ FS_AddGameDirectory(va("%s/%s", LIBDIR, dir));
+ #endif
+@@ -1002,16 +1005,7 @@
+ // basedir <path>
+ // allows the game to run from outside the data tree
+ //
+-#if defined __unix__
+-#ifdef DATADIR
+- fs_basedir = Cvar_Get("basedir", DATADIR, CVAR_NOSET);
+-#else
+ fs_basedir = Cvar_Get("basedir", ".", CVAR_NOSET);
+-#endif
+-#endif
+-#ifdef _WIN32
+- fs_basedir = Cvar_Get ("basedir", ".", CVAR_NOSET);
+-#endif
+
+ sv_defaultpaks = Cvar_Get ("sv_defaultpaks", "0", CVAR_ARCHIVE);
+
+@@ -1027,8 +1021,11 @@
+ //
+ // start up with baseq2 by default
+ //
++#ifdef DATADIR
++ FS_AddGameDirectory (va("%s/"BASEDIRNAME, DATADIR) );
++#endif
+ #ifdef LIBDIR
+- FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) );
++ FS_AddGameDirectory (va("%s/"BASEDIRNAME, LIBDIR) );
+ #endif
+ FS_AddGameDirectory(va("%s/"BASEDIRNAME, fs_basedir->string));
+ #ifdef DATADIR
diff --git a/games/quake2max/files/patch-unix__gl_glx.c b/games/quake2max/files/patch-unix__gl_glx.c
new file mode 100644
index 000000000000..e434e5b7a8cb
--- /dev/null
+++ b/games/quake2max/files/patch-unix__gl_glx.c
@@ -0,0 +1,19 @@
+--- ./unix/gl_glx.c.orig Wed Jan 4 08:01:06 2006
++++ ./unix/gl_glx.c Fri Jul 28 13:33:32 2006
+@@ -476,7 +476,6 @@
+ while (XPending(dpy)) {
+
+ XNextEvent(dpy, &event);
+- mx = my = 0;
+ switch(event.type) {
+ case KeyPress:
+ myxtime = event.xkey.time;
+@@ -498,8 +497,6 @@
+ {
+ mx += ((int)event.xmotion.x - mwx) * 2;
+ my += ((int)event.xmotion.y - mwy) * 2;
+- mwx = event.xmotion.x;
+- mwy = event.xmotion.y;
+
+ if (mx || my)
+ dowarp = true;
diff --git a/games/quake2max/files/patch-unix__sys_unix.c b/games/quake2max/files/patch-unix__sys_unix.c
new file mode 100644
index 000000000000..2f0f81782a93
--- /dev/null
+++ b/games/quake2max/files/patch-unix__sys_unix.c
@@ -0,0 +1,53 @@
+--- ./unix/sys_unix.c.orig Wed Jan 4 07:57:40 2006
++++ ./unix/sys_unix.c Fri Jul 28 13:30:29 2006
+@@ -220,15 +220,8 @@
+ void *(*GetGameAPI) (void *);
+
+ char name[MAX_OSPATH];
+- char curpath[MAX_OSPATH];
+ char *path;
+-#ifdef __i386__
+- const char *gamename = "gamei386.so";
+-#elif defined __alpha__
+- const char *gamename = "gameaxp.so";
+-#else
+-#error Unknown arch
+-#endif
++ const char *gamename = "game.so";
+
+ setreuid(getuid(), getuid());
+ setegid(getgid());
+@@ -236,8 +229,6 @@
+ if (game_library)
+ Com_Error (ERR_FATAL, "Sys_GetGameAPI without Sys_UnloadingGame");
+
+- getcwd(curpath, sizeof(curpath));
+-
+ Com_Printf("------- Loading %s -------\n", gamename);
+
+ // now run through the search paths
+@@ -247,7 +238,7 @@
+ path = FS_NextPath (path);
+ if (!path)
+ return NULL; // couldn't find one anywhere
+- sprintf (name, "%s/%s/%s", curpath, path, gamename);
++ sprintf (name, "%s/%s", path, gamename);
+ game_library = dlopen (name, RTLD_LAZY );
+ if (game_library)
+ {
+@@ -319,6 +310,7 @@
+
+ void Sys_CopyProtect(void)
+ {
++#if 0
+ FILE *mnt;
+ struct mntent *ent;
+ char path[MAX_OSPATH];
+@@ -366,6 +358,7 @@
+ Com_Error (ERR_FATAL, "Could not find a Quake2 CD in your CD drive.");
+ Com_Error (ERR_FATAL, "Unable to find a mounted iso9660 file system.\n"
+ "You must mount the Quake2 CD in a cdrom drive in order to play.");
++#endif
+ }
+
+ #if 0
diff --git a/games/quake2max/pkg-descr b/games/quake2max/pkg-descr
new file mode 100644
index 000000000000..a689a2341c0d
--- /dev/null
+++ b/games/quake2max/pkg-descr
@@ -0,0 +1,23 @@
+OpenGL only Quake II engine modification with the following features:
+
+- Requires id Software's Quake II: Patched to v3.20.
+- OpenGL Only: No software mode; No 3dfx.
+- 32-bit color skin/texture support: .jpg; .tga; .png.
+- Texture Compression: For large textures/skins.
+- Particle Engine: Fast intuitive system; dynamically lit; custom special
+ effects.
+- RScript Shaders: Spheremapping; detail textures; animated skins; vertex
+ deformation, other custom functions.
+- Enhanced Menus: Mouse support in menus; menus scaled to fixed resolution;
+ reorganized menus.
+- Client side 3-D Chase Camera: Accurate aiming system; adjustable viewing
+ distance; adjustable viewing angle.
+- Miscellaneous Special Effects: Improved model lighting system; improved
+ dynamic shadows system; overbright maps, entities and particles; transparent
+ surface vertex lighting.
+- Miscellaneous Game play Enhancements: Decals for blood, bullet marks, and
+ impact explosions; mouse FOV autosensitivity; "*.pak" pak loading; CVARlist
+ filter parameter.
+- Backwards Compatible: With old mods.
+
+WWW: http://www.quake2max.net/
diff --git a/games/quake2max/pkg-plist b/games/quake2max/pkg-plist
new file mode 100644
index 000000000000..1028e9f41547
--- /dev/null
+++ b/games/quake2max/pkg-plist
@@ -0,0 +1,9 @@
+%%CLIENT%%bin/quake2max
+%%DEDICATED%%bin/quake2max-ded
+%%SDL%%bin/quake2max-sdl
+%%GAME%%%%LIBDIR%%/baseq2/game.so
+%%LIBDIR%%/baseq2/maxpak.pak
+%%GLX%%%%LIBDIR%%/rfx_glx.so
+%%SDLGL%%%%LIBDIR%%/rfx_sdlgl.so
+@dirrm %%LIBDIR%%/baseq2
+@dirrm %%LIBDIR%%