aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoralepulver <alepulver@FreeBSD.org>2007-02-26 07:35:40 +0800
committeralepulver <alepulver@FreeBSD.org>2007-02-26 07:35:40 +0800
commit32ca373d374fc7539e4058c19af26cef75befbf2 (patch)
tree74721cde191fa427206083cb86c6d805c427ad30 /games
parenta3fcfae5acacb269a6c19c9847e727d4469e0df9 (diff)
downloadfreebsd-ports-gnome-32ca373d374fc7539e4058c19af26cef75befbf2.tar.gz
freebsd-ports-gnome-32ca373d374fc7539e4058c19af26cef75befbf2.tar.zst
freebsd-ports-gnome-32ca373d374fc7539e4058c19af26cef75befbf2.zip
The Marriage of XreaL and Icculus.org Q3 w/ Improvements!
Evolution Q3 uses the advanced XreaL OpenGL 2.0 renderer for advanced GLSL powered effects. WWW: http://evolution.quakedev.com/
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/evq3/Makefile117
-rw-r--r--games/evq3/distinfo3
-rw-r--r--games/evq3/files/patch-SConscript_evq341
-rw-r--r--games/evq3/files/patch-SConstruct34
-rw-r--r--games/evq3/files/patch-engine__common__fs.c34
-rw-r--r--games/evq3/files/patch-engine__common__shared.h40
-rw-r--r--games/evq3/files/patch-engine__unix__linux_joystick.c106
-rw-r--r--games/evq3/files/patch-engine__unix__unix_main.c92
-rw-r--r--games/evq3/files/patch-engine__unix__unix_shared.c29
-rw-r--r--games/evq3/files/pkg-message.in10
-rw-r--r--games/evq3/pkg-descr6
-rw-r--r--games/evq3/pkg-plist6
13 files changed, 519 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index 1abf3020c439..f2c74d288e81 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -177,6 +177,7 @@
SUBDIR += ensemblist
SUBDIR += euchre
SUBDIR += evilfinder
+ SUBDIR += evq3
SUBDIR += excido
SUBDIR += exhaust
SUBDIR += exhaust-doc
diff --git a/games/evq3/Makefile b/games/evq3/Makefile
new file mode 100644
index 000000000000..ab24c344f0df
--- /dev/null
+++ b/games/evq3/Makefile
@@ -0,0 +1,117 @@
+# New ports collection makefile for: evq3
+# Date created: 8 Aug 2006
+# Whom: alepulver
+#
+# $FreeBSD$
+#
+
+PORTNAME= evq3
+PORTVERSION= b2
+CATEGORIES= games
+MASTER_SITES= http://evolution.quakedev.com/files/Engine/
+DISTNAME= ${PORTNAME}-${PORTVERSION}-src
+
+MAINTAINER= alepulver@FreeBSD.org
+COMMENT= The Marriage of XreaL and Icculus.org Q3 w/ Improvements
+
+BUILD_DEPENDS= zip:${PORTSDIR}/archivers/zip
+
+USE_ZIP= yes
+USE_DOS2UNIX= yes
+USE_GCC= 3.4+
+USE_GL= yes
+USE_SCONS= yes
+SCONS_ARGS= warnings=0
+REINPLACE_ARGS= -i ''
+NO_WRKSUBDIR= yes
+
+OPTIONS= FREETYPE2 "Compile engine with FreeType 2.x support" off \
+ OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
+ SIMD "Enable CPU optimizations (sse/3dnow)" on \
+ SMP "Build with SMP (threading) support" off
+
+CFLAGS+= -I${X11BASE}/include -DPNG_NO_ASSEMBLER_CODE
+
+PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
+
+LIBDIR= ${PREFIX}/lib/${PORTNAME}
+VM_ARCHS= i386 amd64 powerpc
+
+.include <bsd.port.pre.mk>
+
+.for i in ${ARCH}
+. if ${VM_ARCHS:M${i}} != ""
+HAVE_VM_COMPILED= yes
+. endif
+.endfor
+
+.if !defined(HAVE_VM_COMPILED)
+SCONS_ARGS+= qvm=0
+SUB_FILES+= pkg-message
+.endif
+
+.if defined(WITH_FREETYPE2)
+LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
+SCONS_ARGS+= freetype=1
+.endif
+
+.if defined(WITHOUT_OPTIMIZED_CFLAGS)
+SCONS_ARGS+= optimize=0
+.endif
+
+.if !defined(WITHOUT_SIMD) && !defined(PACKAGE_BUILDING)
+.if ${MACHINE_CPU:Msse} != ""
+SCONS_ARGS+= simd=sse
+.elif ${MACHINE_CPU:M3dnow} != ""
+SCONS_ARGS+= simd=3dnow
+.endif
+.endif
+
+.if defined(WITH_SMP)
+SCONS_ARGS+= smp=1
+.endif
+
+post-patch:
+.for f in CC CCFLAGS X11BASE
+ @${REINPLACE_CMD} -e 's|%%${f}%%|${${f}}|' ${WRKSRC}/SConstruct
+.endfor
+ @${REINPLACE_CMD} -e 's|%%X11BASE%%|${X11BASE}|' \
+ ${WRKSRC}/SConscript_evq3
+.if defined(HAVE_VM_COMPILED) && ${ARCH} != "i386"
+ @${REINPLACE_CMD} -e \
+ 's|vm_x86|vm_${ARCH:S/amd64/x86_64/:S/powerpc/ppc/}|' \
+ ${WRKSRC}/SConscript_evq3
+.endif
+ @${REINPLACE_CMD} -e 's|^#if defined( __FreeBSD__ ).*|#if 0|' \
+ ${WRKSRC}/engine/unix/linux_glimp.c
+ @${REINPLACE_CMD} -e \
+ 's|%%DATADIR%%|${Q3DIR}|; s|%%LIBDIR%%|${LIBDIR}|' \
+ ${WRKSRC}/engine/common/fs.c ${WRKSRC}/engine/unix/unix_main.c
+ @${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \
+ ${WRKSRC}/engine/botlib/be_interface.c
+ @${REINPLACE_CMD} -e 's|\.xreal|.${PORTNAME}|' \
+ ${WRKSRC}/engine/unix/unix_shared.c
+
+# The .pk3 file (ZIP format) available in the web has wrong paths (everything
+# is under a "baseq3" directory), so we have to create our own one.
+post-build:
+ @cd ${WRKSRC}/baseq3 && zip -r ../pak-evq3.pk3 *
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/build/unix/evq3 ${PREFIX}/bin
+ ${MKDIR} ${LIBDIR}/baseq3
+ ${INSTALL_DATA} ${WRKSRC}/pak-evq3.pk3 ${LIBDIR}/baseq3
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.html ${DOCSDIR}
+.endif
+
+.if !defined(HAVE_VM_COMPILED)
+post-install:
+ @${ECHO_CMD}
+ @${CAT} ${PKGMESSAGE}
+ @${ECHO_CMD}
+.endif
+
+.include "${.CURDIR}/../quake3-data/Makefile.include"
+.include <bsd.port.post.mk>
diff --git a/games/evq3/distinfo b/games/evq3/distinfo
new file mode 100644
index 000000000000..c7b309516a20
--- /dev/null
+++ b/games/evq3/distinfo
@@ -0,0 +1,3 @@
+MD5 (evq3-b2-src.zip) = 99278e2d098dcacee8bc853f43e917b3
+SHA256 (evq3-b2-src.zip) = 0beafd8ed65ba1006906e76204214461436a0e70840a1bb43bc43477d6a7d5b5
+SIZE (evq3-b2-src.zip) = 2879491
diff --git a/games/evq3/files/patch-SConscript_evq3 b/games/evq3/files/patch-SConscript_evq3
new file mode 100644
index 000000000000..34c3e954fc2f
--- /dev/null
+++ b/games/evq3/files/patch-SConscript_evq3
@@ -0,0 +1,41 @@
+--- SConscript_evq3.orig Sun Feb 25 20:25:06 2007
++++ SConscript_evq3 Sun Feb 25 20:27:04 2007
+@@ -208,9 +208,9 @@
+
+ # Linux x86 (GCC)
+ if env['arch'] == 'linux-i386':
+- evq3_env.Append(LIBPATH='/usr/X11R6/lib')
++ evq3_env.Append(LIBPATH='%%X11BASE%%/lib')
+ evq3_env.Append(LIBS=['X11', 'Xext', 'Xxf86dga', 'Xxf86vm'])
+- evq3_env.Append(LIBS=['dl', 'm'])
++ evq3_env.Append(LIBS=['m'])
+
+ if env['smp'] == 1:
+ evq3_env.Append(CCFLAGS='-DSMP')
+@@ -220,19 +220,19 @@
+ evq3_env.ParseConfig('freetype-config --cflags --libs')
+ evq3_env.Append(CCFLAGS='-DBUILD_FREETYPE')
+
+- #if env['qvm'] == 1:
+- linux_src += ['engine/common/vm_x86.c']
+- #else:
+- #evq3_env.Append(CCFLAGS='-DDLL_ONLY')
++ if env['qvm'] == 1:
++ linux_src += ['engine/common/vm_x86.c']
++ else:
++ evq3_env.Append(CCFLAGS='-DDLL_ONLY')
+
+ if env['sdl'] == 1:
+ evq3_env.ParseConfig('sdl-config --cflags --libs')
+ evq3_env.Append(CCFLAGS='-DUSE_SDL')
+- evq3_env.Program('evq3.x86', [evq3_src, libs_src, sdl_src])
++ evq3_env.Program('evq3', [evq3_src, libs_src, sdl_src])
+ else:
+- evq3_env.Program('evq3.x86', [evq3_src, libs_src, linux_src])
++ evq3_env.Program('evq3', [evq3_src, libs_src, linux_src])
+
+- evq3_env.Install('#build/unix', 'evq3.x86')
++ evq3_env.Install('#build/unix', 'evq3')
+
+ # Linux x86_64 (GCC)
+ elif env['arch'] == 'linux-x86_64':
diff --git a/games/evq3/files/patch-SConstruct b/games/evq3/files/patch-SConstruct
new file mode 100644
index 000000000000..dc52cbfc353b
--- /dev/null
+++ b/games/evq3/files/patch-SConstruct
@@ -0,0 +1,34 @@
+--- SConstruct.orig Sun Feb 25 20:22:51 2007
++++ SConstruct Sun Feb 25 20:23:30 2007
+@@ -16,6 +16,7 @@
+ opts.Add(BoolOption('sdl', 'Set to 1 to compile engine with a SDL backend instead of the native backend', 0))
+ opts.Add(BoolOption('freetype', 'Set to 1 to compile engine with FreeType 2.x support', 0))
+ opts.Add(BoolOption('tools', 'Set to 1 to compile xmap, gtkradiant, and master', 0))
++opts.Add(BoolOption('qvm', 'Set to 1 to enable QVM support', 1))
+
+ #
+ # initialize compiler environment base
+@@ -32,7 +33,9 @@
+ #
+ print 'compiling for architecture ', env['arch']
+
+-env.Append(CCFLAGS = '-pipe -fsigned-char')
++env['CC'] = '%%CC%%'
++
++env.Append(CCFLAGS = '%%CCFLAGS%% -pipe -fsigned-char')
+
+ if env['arch'] == 'xwin32':
+ env.Tool('xmingw', ['SCons/Tools'])
+@@ -69,9 +72,9 @@
+ Export('env')
+ SConscript('SConscript_evq3', build_dir='build/scons/evq3', duplicate=0)
+ #SConscript('SConscript_evq3-ded', build_dir='build/scons/evq3-ded', duplicate=0)
+-SConscript('SConscript_cgame', build_dir='build/scons/cgame', duplicate=0)
+-SConscript('SConscript_game', build_dir='build/scons/game', duplicate=0)
+-SConscript('SConscript_ui', build_dir='build/scons/ui', duplicate=0)
++#SConscript('SConscript_cgame', build_dir='build/scons/cgame', duplicate=0)
++#SConscript('SConscript_game', build_dir='build/scons/game', duplicate=0)
++#SConscript('SConscript_ui', build_dir='build/scons/ui', duplicate=0)
+
+ #if env['tools'] != '0':
+ #SConscript('SConscript_bspc', build_dir='build/scons/bspc', duplicate=0)
diff --git a/games/evq3/files/patch-engine__common__fs.c b/games/evq3/files/patch-engine__common__fs.c
new file mode 100644
index 000000000000..b1f0257322e8
--- /dev/null
+++ b/games/evq3/files/patch-engine__common__fs.c
@@ -0,0 +1,34 @@
+--- engine/common/fs.c.orig Wed Dec 20 20:29:46 2006
++++ engine/common/fs.c Sat Dec 23 13:16:38 2006
+@@ -3115,6 +3115,7 @@
+ fs_debug = Cvar_Get("fs_debug", "0", 0);
+ fs_copyfiles = Cvar_Get("fs_copyfiles", "0", CVAR_INIT);
+ fs_cdpath = Cvar_Get("fs_cdpath", Sys_DefaultCDPath(), CVAR_INIT);
++ Sys_SetDefaultInstallPath("%%DATADIR%%");
+ fs_basepath = Cvar_Get("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT);
+ fs_basegame = Cvar_Get("fs_basegame", "", CVAR_INIT);
+ homePath = Sys_DefaultHomePath();
+@@ -3135,6 +3136,7 @@
+ {
+ FS_AddGameDirectory(fs_basepath->string, gameName);
+ }
++ FS_AddGameDirectory( "%%LIBDIR%%", gameName );
+ // fs_homepath is somewhat particular to *nix systems, only add if relevant
+ // NOTE: same filtering below for mods and basegame
+ if(fs_basepath->string[0] && Q_stricmp(fs_homepath->string, fs_basepath->string))
+@@ -3153,6 +3155,7 @@
+ {
+ FS_AddGameDirectory(fs_basepath->string, fs_basegame->string);
+ }
++ FS_AddGameDirectory("%%LIBDIR%%", fs_basegame->string);
+ if(fs_homepath->string[0] && Q_stricmp(fs_homepath->string, fs_basepath->string))
+ {
+ FS_AddGameDirectory(fs_homepath->string, fs_basegame->string);
+@@ -3170,6 +3173,7 @@
+ {
+ FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string);
+ }
++ FS_AddGameDirectory("%%LIBDIR%%", fs_gamedirvar->string);
+ if(fs_homepath->string[0] && Q_stricmp(fs_homepath->string, fs_basepath->string))
+ {
+ FS_AddGameDirectory(fs_homepath->string, fs_gamedirvar->string);
diff --git a/games/evq3/files/patch-engine__common__shared.h b/games/evq3/files/patch-engine__common__shared.h
new file mode 100644
index 000000000000..2e2801f58db2
--- /dev/null
+++ b/games/evq3/files/patch-engine__common__shared.h
@@ -0,0 +1,40 @@
+--- ./engine/common/shared.h.orig Wed Dec 20 20:29:46 2006
++++ ./engine/common/shared.h Sat Dec 23 11:12:47 2006
+@@ -365,7 +365,9 @@
+
+ // bk010116 - omitted Q3STATIC (see Linux above), broken target
+
+-#if !idppc
++#include <machine/endian.h>
++
++#if BYTE_ORDER == LITTLE_ENDIAN
+ static short BigShort(short l)
+ {
+ return ShortSwap(l);
+@@ -384,7 +386,7 @@
+ }
+
+ #define LittleFloat
+-#else
++#elif BYTE_ORDER == BIG_ENDIAN
+ #define BigShort
+ static short LittleShort(short l)
+ {
+@@ -402,6 +404,8 @@
+ {
+ return FloatSwap(l);
+ }
++#else
++#error Unknown endianess
+ #endif
+
+ #endif
+@@ -542,7 +546,7 @@
+ #endif
+
+ // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371
+-#if __linux__
++#if __unix__
+ void Snd_Memset(void *dest, const int val, const size_t count);
+ #else
+ #define Snd_Memset memset
diff --git a/games/evq3/files/patch-engine__unix__linux_joystick.c b/games/evq3/files/patch-engine__unix__linux_joystick.c
new file mode 100644
index 000000000000..d821644c5390
--- /dev/null
+++ b/games/evq3/files/patch-engine__unix__linux_joystick.c
@@ -0,0 +1,106 @@
+--- ./engine/unix/linux_joystick.c.orig Wed Dec 20 20:28:48 2006
++++ ./engine/unix/linux_joystick.c Sat Dec 23 11:06:55 2006
+@@ -31,8 +31,10 @@
+ **
+ */
+
+-#ifndef __x86_64__
++#ifdef __linux__
+ #include <linux/joystick.h>
++#elif defined(__FreeBSD__)
++#include <sys/joystick.h>
+ #endif
+
+ #include <sys/types.h>
+@@ -72,7 +74,7 @@
+ // bk001130 - from cvs1.17 (mkv), removed from linux_glimp.c
+ void IN_StartupJoystick(void)
+ {
+-#ifndef __x86_64__
++#if defined(__linux__) || defined(__FreeBSD__)
+ int i = 0;
+
+ joy_fd = -1;
+@@ -87,20 +89,27 @@
+ {
+ char filename[PATH_MAX];
+
++#ifdef __linux__
+ snprintf(filename, PATH_MAX, "/dev/js%d", i);
++#elif defined(__FreeBSD__)
++ snprintf(filename, PATH_MAX, "/dev/joy%d", i);
++#endif
+
+ joy_fd = open(filename, O_RDONLY | O_NONBLOCK);
+
+ if(joy_fd != -1)
+ {
++#ifdef __linux__
+ struct js_event event;
+ char axes = 0;
+ char buttons = 0;
+ char name[128];
+ int n = -1;
++#endif
+
+ Com_Printf("Joystick %s found\n", filename);
+
++#ifdef __linux__
+ /* Get rid of initialization messages. */
+ do
+ {
+@@ -125,6 +134,7 @@
+ Com_Printf("Name: %s\n", name);
+ Com_Printf("Axes: %d\n", axes);
+ Com_Printf("Buttons: %d\n", buttons);
++#endif
+
+ /* Our work here is done. */
+ return;
+@@ -143,7 +153,7 @@
+
+ void IN_JoyMove(void)
+ {
+-#ifndef __x86_64__
++#if defined(__linux__) || defined(__FreeBSD__)
+ /* Store instantaneous joystick state. Hack to get around
+ * event model used in Linux joystick driver.
+ */
+@@ -156,11 +166,16 @@
+ unsigned int axes = 0;
+ int i = 0;
+
++#ifdef __FreeBSD__
++ struct joystick event;
++#endif
++
+ if(joy_fd == -1)
+ {
+ return;
+ }
+
++#ifdef __linux__
+ /* Empty the queue, dispatching button presses immediately
+ * and updating the instantaneous state for the axes.
+ */
+@@ -197,7 +212,19 @@
+ }
+
+ } while(1);
+-
++#elif defined(__FreeBSD__)
++ /*
++ * FreeBSD does not fully support multi-buttoned joysticks.
++ */
++ if (read(joy_fd, &event, sizeof(struct joystick)) != -1) {
++ if (event.b1)
++ Sys_QueEvent(0, SE_KEY, K_JOY1, 1, 0, NULL);
++ if (event.b2)
++ Sys_QueEvent(0, SE_KEY, K_JOY2, 1, 0, NULL);
++ axes_state[0] = event.x;
++ axes_state[1] = event.y;
++ }
++#endif
+
+ /* Translate our instantaneous state to bits. */
+ for(i = 0; i < 16; i++)
diff --git a/games/evq3/files/patch-engine__unix__unix_main.c b/games/evq3/files/patch-engine__unix__unix_main.c
new file mode 100644
index 000000000000..49575df6b0c8
--- /dev/null
+++ b/games/evq3/files/patch-engine__unix__unix_main.c
@@ -0,0 +1,92 @@
+--- engine/unix/unix_main.c.orig Sat Dec 23 14:57:28 2006
++++ engine/unix/unix_main.c Sat Dec 23 15:47:40 2006
+@@ -673,12 +673,12 @@
+ {
+ void *libHandle;
+ void (*dllEntry) (intptr_t (*syscallptr) (intptr_t, ...));
+- char curpath[MAX_OSPATH];
+ char fname[MAX_OSPATH];
+ char *basepath;
+ char *homepath;
+ char *pwdpath;
+ char *gamedir;
++ char *libdir = "%%LIBDIR%%";
+ char *fn;
+ const char *err = NULL;
+
+@@ -687,20 +687,7 @@
+ // bk001206 - let's have some paranoia
+ assert(name);
+
+- getcwd(curpath, sizeof(curpath));
+-#if defined __i386__
+- snprintf(fname, sizeof(fname), "%si386.so", name);
+-#elif defined __x86_64__
+- snprintf(fname, sizeof(fname), "%sx86_64.so", name);
+-#elif defined __powerpc__ //rcg010207 - PPC support.
+- snprintf(fname, sizeof(fname), "%sppc.so", name);
+-#elif defined __axp__
+- snprintf(fname, sizeof(fname), "%saxp.so", name);
+-#elif defined __mips__
+- snprintf(fname, sizeof(fname), "%smips.so", name);
+-#else
+-#error Unknown arch
+-#endif
++ snprintf(fname, sizeof(fname), "%s.so", name);
+
+ // bk001129 - was RTLD_LAZY
+ #define Q_RTLD RTLD_NOW
+@@ -722,29 +709,34 @@
+ fn = FS_BuildOSPath(homepath, gamedir, fname);
+ Com_Printf("Sys_LoadDll(%s)... \n", fn);
+ libHandle = dlopen(fn, Q_RTLD);
++ }
+
+- if(!libHandle)
+- {
+- Com_Printf("Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror());
+- // fs_basepath
+- fn = FS_BuildOSPath(basepath, gamedir, fname);
+- Com_Printf("Sys_LoadDll(%s)... \n", fn);
+- libHandle = dlopen(fn, Q_RTLD);
++ if(!libHandle)
++ {
++ Com_Printf("Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror());
++ // libdir
++ fn = FS_BuildOSPath(libdir, gamedir, fname);
++ Com_Printf("Sys_LoadDll(%s)... \n", fn);
++ libHandle = dlopen(fn, Q_RTLD);
++ }
+
+- if(!libHandle)
+- {
+-#ifndef NDEBUG // bk001206 - in debug abort on failure
+- Com_Error(ERR_FATAL, "Sys_LoadDll(%s) failed dlopen() completely!\n", name);
++ if(!libHandle)
++ {
++ Com_Printf("Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror());
++ // fs_basepath
++ fn = FS_BuildOSPath(basepath, gamedir, fname);
++ Com_Printf("Sys_LoadDll(%s)... \n", fn);
++ libHandle = dlopen(fn, Q_RTLD);
++ }
++
++ if(!libHandle)
++ {
++#ifndef NDEBUG // bk001206 - in debug abort on failure
++ Com_Error(ERR_FATAL, "Sys_LoadDll(%s) failed dlopen() completely!\n", name);
+ #else
+- Com_Printf("Sys_LoadDll(%s) failed dlopen() completely!\n", name);
++ Com_Printf("Sys_LoadDll(%s) failed dlopen() completely!\n", name);
+ #endif
+- return NULL;
+- }
+- else
+- Com_Printf("Sys_LoadDll(%s): succeeded ...\n", fn);
+- }
+- else
+- Com_Printf("Sys_LoadDll(%s): succeeded ...\n", fn);
++ return NULL;
+ }
+ else
+ Com_Printf("Sys_LoadDll(%s): succeeded ...\n", fn);
diff --git a/games/evq3/files/patch-engine__unix__unix_shared.c b/games/evq3/files/patch-engine__unix__unix_shared.c
new file mode 100644
index 000000000000..23a56a7fbb4f
--- /dev/null
+++ b/games/evq3/files/patch-engine__unix__unix_shared.c
@@ -0,0 +1,29 @@
+--- ./engine/unix/unix_shared.c.orig Wed Dec 20 20:28:48 2006
++++ ./engine/unix/unix_shared.c Sat Dec 23 11:21:39 2006
+@@ -78,7 +78,7 @@
+ return curtime;
+ }
+
+-#if defined(__linux__) && !defined(DEDICATED)
++#if defined(__unix__) && !defined(DEDICATED)
+ /*
+ ================
+ Sys_XTimeToSysTime
+@@ -143,7 +143,7 @@
+
+ //#if 0 // bk001215 - see snapvector.nasm for replacement
+ // rcg010206 - using this for PPC builds...
+-#if defined(__APPLE__) || (defined(__linux__) && defined(C_ONLY)) || defined(__x86_64__)
++#if defined(__APPLE__) || (defined(__unix__) && defined(C_ONLY)) || defined(__x86_64__)
+ //#if !(defined __i386__)
+ long fastftol(float f)
+ { // bk001213 - from win32/win_shared.c
+@@ -459,7 +459,7 @@
+ return p->pw_name;
+ }
+
+-#if defined(__linux__)
++#if defined(__unix__)
+ // TTimo
+ // sysconf() in libc, POSIX.1 compliant
+ unsigned int Sys_ProcessorCount()
diff --git a/games/evq3/files/pkg-message.in b/games/evq3/files/pkg-message.in
new file mode 100644
index 000000000000..af8abddacd49
--- /dev/null
+++ b/games/evq3/files/pkg-message.in
@@ -0,0 +1,10 @@
+==============================================================================
+
+Evolution Q3 has been installed.
+
+The program does not support loading QVM files in your architecture, so to
+play it you have to copy the files "game.so", "cgame.so" and "ui.so" installed
+by the "games/quake3" or "games/ioquake3" port from
+"%%PREFIX%%/lib/${PORTNAME}/baseq3" to "%%LIBDIR%%/baseq3".
+
+==============================================================================
diff --git a/games/evq3/pkg-descr b/games/evq3/pkg-descr
new file mode 100644
index 000000000000..f3a067a0c4e2
--- /dev/null
+++ b/games/evq3/pkg-descr
@@ -0,0 +1,6 @@
+The Marriage of XreaL and Icculus.org Q3 w/ Improvements!
+
+Evolution Q3 uses the advanced XreaL OpenGL 2.0 renderer for advanced GLSL
+powered effects.
+
+WWW: http://evolution.quakedev.com/
diff --git a/games/evq3/pkg-plist b/games/evq3/pkg-plist
new file mode 100644
index 000000000000..3786f8001155
--- /dev/null
+++ b/games/evq3/pkg-plist
@@ -0,0 +1,6 @@
+bin/evq3
+%%LIBDIR%%/baseq3/pak-evq3.pk3
+%%PORTDOCS%%%%DOCSDIR%%/README.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%LIBDIR%%/baseq3
+@dirrm %%LIBDIR%%