aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2005-10-16 13:58:42 +0800
committeredwin <edwin@FreeBSD.org>2005-10-16 13:58:42 +0800
commit3dc50a6924bca770aaf73f30f6851684cb88fd60 (patch)
tree8ac1a94f116b575e959bc95c90207f246210b213 /games
parent646b99bd3994366543d55d7dea065d6c08ae6993 (diff)
downloadfreebsd-ports-gnome-3dc50a6924bca770aaf73f30f6851684cb88fd60.tar.gz
freebsd-ports-gnome-3dc50a6924bca770aaf73f30f6851684cb88fd60.tar.zst
freebsd-ports-gnome-3dc50a6924bca770aaf73f30f6851684cb88fd60.zip
[NEW PORT] games/quake2-source - Quake II game source
Quake II game source. This port installs the Quake II game source, together with BSD Makefiles, for building modifications. It can also install the Capture the Flag mod, Rogue and Xatrix game source. PR: ports/86737 Submitted by: Alejandro Pulver <alejandro@varnet.biz>
Diffstat (limited to 'games')
-rw-r--r--games/Makefile1
-rw-r--r--games/quake2-source/Makefile86
-rw-r--r--games/quake2-source/distinfo6
-rw-r--r--games/quake2-source/files/Makefile.ctf32
-rw-r--r--games/quake2-source/files/Makefile.game54
-rw-r--r--games/quake2-source/files/Makefile.rogue68
-rw-r--r--games/quake2-source/files/Makefile.xatrix58
-rw-r--r--games/quake2-source/files/extra-patch-src_rogue_g__local.h10
-rw-r--r--games/quake2-source/files/extra-patch-src_rogue_q__shared.c11
-rw-r--r--games/quake2-source/files/extra-patch-src_xatrix_q__shared.c11
-rw-r--r--games/quake2-source/files/patch-security201
-rw-r--r--games/quake2-source/files/patch-src_game_g__phys.c17
-rw-r--r--games/quake2-source/pkg-descr5
-rw-r--r--games/quake2-source/pkg-plist306
14 files changed, 866 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index adb7e53ab746..929be25d6f84 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -467,6 +467,7 @@
SUBDIR += quake-dpmod
SUBDIR += quake-reaper
SUBDIR += quake-source
+ SUBDIR += quake2-source
SUBDIR += quake2forge
SUBDIR += quake2lnx
SUBDIR += quakeforge
diff --git a/games/quake2-source/Makefile b/games/quake2-source/Makefile
new file mode 100644
index 000000000000..8d9529dd24fe
--- /dev/null
+++ b/games/quake2-source/Makefile
@@ -0,0 +1,86 @@
+# New ports collection makefile for: quake2-source
+# Date created: 29 Sep 2005
+# Whom: Alejandro Pulver <alejandro@varnet.biz>
+#
+# $FreeBSD$
+#
+
+PORTNAME= source
+PORTVERSION= 3.21
+CATEGORIES= games
+MASTER_SITES= http://www.icculus.org/quake2/files/:icc \
+ ftp://ftp.idsoftware.com/idstuff/quake2/source/:id
+PKGNAMEPREFIX= quake2-
+DISTNAME= quake2-r0.16.2
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}:icc
+DIST_SUBDIR= quake2lnx
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= alejandro@varnet.biz
+COMMENT= Quake II game source
+
+NO_BUILD= yes
+
+OPTIONS= CTF "Install Capture The Flag mod source" off \
+ ROGUE "Install Ground Zero (Rogue) mission pack source" off \
+ XATRIX "Install The Reckoning (Xatrix) mission pack source" off
+
+LATEST_LINK= ${PKGNAMEPREFIX}${PORTNAME}
+
+DATADIR= ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME}
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_CTF)
+PLIST_SUB+= CTF=""
+.else
+PLIST_SUB+= CTF="@comment "
+.endif
+
+.if defined(WITH_ROGUE)
+DISTFILES+= roguesrc320.shar.Z:id
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_rogue_g__local.h \
+ ${FILESDIR}/extra-patch-src_rogue_q__shared.c
+ROGUE_OFF= 454
+PLIST_SUB+= ROGUE=""
+.else
+PLIST_SUB+= ROGUE="@comment "
+.endif
+
+.if defined(WITH_XATRIX)
+DISTFILES+= xatrixsrc320.shar.Z:id
+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_xatrix_q__shared.c
+XATRIX_OFF= 441
+PLIST_SUB+= XATRIX=""
+.else
+PLIST_SUB+= XATRIX="@comment "
+.endif
+
+post-extract:
+.for f in rogue xatrix
+. if defined(WITH_${f:U})
+ @${MKDIR} ${WRKSRC}/src/${f}
+ @(cd ${WRKSRC}/src/${f} && ${GUNZIP_CMD} -c \
+ ${DISTDIR}/${DIST_SUBDIR}/${f}src320.shar.Z > \
+ ${f}src320.shar && \
+ ${TAIL} +${${f:U}_OFF} ${f}src320.shar | ${SH})
+. endif
+.endfor
+
+pre-install:
+ @${FIND} -E ${WRKSRC} -type f \
+ -iregex "(Makefile|.*\.(def|dsp|orig|shar))" -print0 | \
+ ${XARGS} -0 ${RM}
+
+do-install:
+ @${MKDIR} ${DATADIR}
+ @${CP} -R ${WRKSRC}/src/game ${DATADIR}
+ @${INSTALL_DATA} ${FILESDIR}/Makefile.game ${DATADIR}/game/Makefile
+.for f in ctf rogue xatrix
+. if defined(WITH_${f:U})
+ @${CP} -R ${WRKSRC}/src/${f} ${DATADIR}
+ @${INSTALL_DATA} ${FILESDIR}/Makefile.${f} ${DATADIR}/${f}/Makefile
+. endif
+.endfor
+
+.include <bsd.port.post.mk>
diff --git a/games/quake2-source/distinfo b/games/quake2-source/distinfo
new file mode 100644
index 000000000000..c5ecd52b8aff
--- /dev/null
+++ b/games/quake2-source/distinfo
@@ -0,0 +1,6 @@
+MD5 (quake2lnx/quake2-r0.16.2.tar.gz) = 872fee27fb13a2a4c8876d5973c3c691
+SIZE (quake2lnx/quake2-r0.16.2.tar.gz) = 1496377
+MD5 (quake2lnx/roguesrc320.shar.Z) = 7d5e052839c9e629bad0a6570aa70554
+SIZE (quake2lnx/roguesrc320.shar.Z) = 626769
+MD5 (quake2lnx/xatrixsrc320.shar.Z) = 41fc4ecc4f25c068e7d1f488bd4a1e1a
+SIZE (quake2lnx/xatrixsrc320.shar.Z) = 455917
diff --git a/games/quake2-source/files/Makefile.ctf b/games/quake2-source/files/Makefile.ctf
new file mode 100644
index 000000000000..5cb06beae90d
--- /dev/null
+++ b/games/quake2-source/files/Makefile.ctf
@@ -0,0 +1,32 @@
+# BSD Makefile for Quake II: Capture The Flag game source
+
+SHLIB_NAME= game.so
+
+SRCS= g_ai.c \
+ g_chase.c \
+ g_cmds.c \
+ g_combat.c \
+ g_ctf.c \
+ g_func.c \
+ g_items.c \
+ g_main.c \
+ g_misc.c \
+ g_monster.c \
+ g_phys.c \
+ g_save.c \
+ g_spawn.c \
+ g_svcmds.c \
+ g_target.c \
+ g_trigger.c \
+ g_utils.c \
+ g_weapon.c \
+ m_move.c \
+ p_client.c \
+ p_hud.c \
+ p_menu.c \
+ p_trail.c \
+ p_view.c \
+ p_weapon.c \
+ q_shared.c
+
+.include <bsd.lib.mk>
diff --git a/games/quake2-source/files/Makefile.game b/games/quake2-source/files/Makefile.game
new file mode 100644
index 000000000000..0e31cad102ba
--- /dev/null
+++ b/games/quake2-source/files/Makefile.game
@@ -0,0 +1,54 @@
+# BSD Makefile for Quake II game source
+
+SHLIB_NAME= game.so
+
+SRCS= g_ai.c \
+ g_chase.c \
+ g_cmds.c \
+ g_combat.c \
+ g_func.c \
+ g_items.c \
+ g_main.c \
+ g_misc.c \
+ g_monster.c \
+ g_phys.c \
+ g_save.c \
+ g_spawn.c \
+ g_svcmds.c \
+ g_target.c \
+ g_trigger.c \
+ g_turret.c \
+ g_utils.c \
+ g_weapon.c \
+ m_actor.c \
+ m_berserk.c \
+ m_boss2.c \
+ m_boss3.c \
+ m_boss31.c \
+ m_boss32.c \
+ m_brain.c \
+ m_chick.c \
+ m_flash.c \
+ m_flipper.c \
+ m_float.c \
+ m_flyer.c \
+ m_gladiator.c \
+ m_gunner.c \
+ m_hover.c \
+ m_infantry.c \
+ m_insane.c \
+ m_medic.c \
+ m_move.c \
+ m_mutant.c \
+ m_parasite.c \
+ m_soldier.c \
+ m_supertank.c \
+ m_tank.c \
+ p_client.c \
+ p_hud.c \
+ p_trail.c \
+ p_view.c \
+ p_weapon.c \
+ q_shared.c
+
+.include <bsd.lib.mk>
diff --git a/games/quake2-source/files/Makefile.rogue b/games/quake2-source/files/Makefile.rogue
new file mode 100644
index 000000000000..c62c037704ab
--- /dev/null
+++ b/games/quake2-source/files/Makefile.rogue
@@ -0,0 +1,68 @@
+# BSD Makefile for Quake II: Ground Zero (Rogue) game source
+
+SHLIB_NAME= game.so
+
+SRCS= dm_ball.c \
+ dm_tag.c \
+ g_ai.c \
+ g_chase.c \
+ g_cmds.c \
+ g_combat.c \
+ g_func.c \
+ g_items.c \
+ g_main.c \
+ g_misc.c \
+ g_monster.c \
+ g_newai.c \
+ g_newdm.c \
+ g_newfnc.c \
+ g_newtarg.c \
+ g_newtrig.c \
+ g_newweap.c \
+ g_phys.c \
+ g_save.c \
+ g_spawn.c \
+ g_sphere.c \
+ g_svcmds.c \
+ g_target.c \
+ g_trigger.c \
+ g_turret.c \
+ g_utils.c \
+ g_weapon.c \
+ m_actor.c \
+ m_berserk.c \
+ m_boss2.c \
+ m_boss3.c \
+ m_boss31.c \
+ m_boss32.c \
+ m_brain.c \
+ m_carrier.c \
+ m_chick.c \
+ m_flash.c \
+ m_flipper.c \
+ m_float.c \
+ m_flyer.c \
+ m_gladiator.c \
+ m_gunner.c \
+ m_hover.c \
+ m_infantry.c \
+ m_insane.c \
+ m_medic.c \
+ m_move.c \
+ m_mutant.c \
+ m_parasite.c \
+ m_soldier.c \
+ m_stalker.c \
+ m_supertank.c \
+ m_tank.c \
+ m_turret.c \
+ m_widow.c \
+ m_widow2.c \
+ p_client.c \
+ p_hud.c \
+ p_trail.c \
+ p_view.c \
+ p_weapon.c \
+ q_shared.c
+
+.include <bsd.lib.mk>
diff --git a/games/quake2-source/files/Makefile.xatrix b/games/quake2-source/files/Makefile.xatrix
new file mode 100644
index 000000000000..7a56b35537a2
--- /dev/null
+++ b/games/quake2-source/files/Makefile.xatrix
@@ -0,0 +1,58 @@
+# BSD Makefile for Quake II: The Reckoning (Xatrix) game source
+
+SHLIB_NAME= game.so
+
+SRCS= g_ai.c \
+ g_chase.c \
+ g_cmds.c \
+ g_combat.c \
+ g_func.c \
+ g_items.c \
+ g_main.c \
+ g_misc.c \
+ g_monster.c \
+ g_phys.c \
+ g_save.c \
+ g_spawn.c \
+ g_svcmds.c \
+ g_target.c \
+ g_trigger.c \
+ g_turret.c \
+ g_utils.c \
+ g_weapon.c \
+ m_actor.c \
+ m_berserk.c \
+ m_boss2.c \
+ m_boss3.c \
+ m_boss31.c \
+ m_boss32.c \
+ m_boss5.c \
+ m_brain.c \
+ m_chick.c \
+ m_fixbot.c \
+ m_flash.c \
+ m_flipper.c \
+ m_float.c \
+ m_flyer.c \
+ m_gekk.c \
+ m_gladb.c \
+ m_gladiator.c \
+ m_gunner.c \
+ m_hover.c \
+ m_infantry.c \
+ m_insane.c \
+ m_medic.c \
+ m_move.c \
+ m_mutant.c \
+ m_parasite.c \
+ m_soldier.c \
+ m_supertank.c \
+ m_tank.c \
+ p_client.c \
+ p_hud.c \
+ p_trail.c \
+ p_view.c \
+ p_weapon.c \
+ q_shared.c
+
+.include <bsd.lib.mk>
diff --git a/games/quake2-source/files/extra-patch-src_rogue_g__local.h b/games/quake2-source/files/extra-patch-src_rogue_g__local.h
new file mode 100644
index 000000000000..6b43c988effc
--- /dev/null
+++ b/games/quake2-source/files/extra-patch-src_rogue_g__local.h
@@ -0,0 +1,10 @@
+--- src/rogue/g_local.h.orig Mon Nov 30 17:53:20 1998
++++ src/rogue/g_local.h Tue Sep 27 20:20:27 2005
+@@ -22,7 +22,6 @@
+ //==================================================================
+
+ #ifndef _WIN32
+-#include <nan.h>
+ #define min(a,b) ((a) < (b) ? (a) : (b))
+ #define max(a,b) ((a) > (b) ? (a) : (b))
+ #ifdef __sun__
diff --git a/games/quake2-source/files/extra-patch-src_rogue_q__shared.c b/games/quake2-source/files/extra-patch-src_rogue_q__shared.c
new file mode 100644
index 000000000000..25ffc42c24b4
--- /dev/null
+++ b/games/quake2-source/files/extra-patch-src_rogue_q__shared.c
@@ -0,0 +1,11 @@
+--- src/rogue/q_shared.c.orig Mon Nov 30 17:53:34 1998
++++ src/rogue/q_shared.c Tue Sep 27 20:03:24 2005
+@@ -329,7 +329,7 @@
+ Returns 1, 2, or 1 + 2
+ ==================
+ */
+-#if !id386 || defined __linux__
++#if !id386 || defined __linux__ || defined __FreeBSD__
+ int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
+ {
+ float dist1, dist2;
diff --git a/games/quake2-source/files/extra-patch-src_xatrix_q__shared.c b/games/quake2-source/files/extra-patch-src_xatrix_q__shared.c
new file mode 100644
index 000000000000..917934b400b9
--- /dev/null
+++ b/games/quake2-source/files/extra-patch-src_xatrix_q__shared.c
@@ -0,0 +1,11 @@
+--- src/xatrix/q_shared.c.orig Mon Nov 30 17:55:36 1998
++++ src/xatrix/q_shared.c Tue Sep 27 20:04:53 2005
+@@ -326,7 +326,7 @@
+ Returns 1, 2, or 1 + 2
+ ==================
+ */
+-#if !id386 || defined __linux__
++#if !id386 || defined __linux__ || defined __FreeBSD__
+ int BoxOnPlaneSide (vec3_t emins, vec3_t emaxs, struct cplane_s *p)
+ {
+ float dist1, dist2;
diff --git a/games/quake2-source/files/patch-security b/games/quake2-source/files/patch-security
new file mode 100644
index 000000000000..89934359d270
--- /dev/null
+++ b/games/quake2-source/files/patch-security
@@ -0,0 +1,201 @@
+Index: client/cl_parse.c
+===================================================================
+RCS file: /cvs/cvsroot/quake2/src/client/cl_parse.c,v
+retrieving revision 1.3
+diff -u -r1.3 cl_parse.c
+--- src/client/cl_parse.c 24 Sep 2004 22:06:52 -0000 1.3
++++ src/client/cl_parse.c 29 Jan 2005 20:57:01 -0000
+@@ -397,6 +397,9 @@
+ strncpy(ci->cinfo, s, sizeof(ci->cinfo));
+ ci->cinfo[sizeof(ci->cinfo)-1] = 0;
+
++ // sku - avoid potentional buffer overflow vulnerability
++ s = ci->cinfo;
++
+ // isolate the player's name
+ strncpy(ci->name, s, sizeof(ci->name));
+ ci->name[sizeof(ci->name)-1] = 0;
+@@ -528,6 +531,7 @@
+ int i;
+ char *s;
+ char olds[MAX_QPATH];
++ int length;
+
+ i = MSG_ReadShort (&net_message);
+ if (i < 0 || i >= MAX_CONFIGSTRINGS)
+@@ -537,6 +541,12 @@
+ strncpy (olds, cl.configstrings[i], sizeof(olds));
+ olds[sizeof(olds) - 1] = 0;
+
++ // sku - avoid potentional buffer overflow vulnerability
++ length = strlen( s );
++ if( length > sizeof( cl.configstrings ) - sizeof( cl.configstrings[0] ) * i - 1 ) {
++ Com_Error( ERR_DROP, "CL_ParseConfigString: oversize configstring" );
++ }
++
+ strcpy (cl.configstrings[i], s);
+
+ // do something apropriate
+Index: qcommon/cmd.c
+===================================================================
+RCS file: /cvs/cvsroot/quake2/src/qcommon/cmd.c,v
+retrieving revision 1.2
+diff -u -r1.2 cmd.c
+--- src/qcommon/cmd.c 3 Jan 2002 05:10:14 -0000 1.2
++++ src/qcommon/cmd.c 29 Jan 2005 20:57:01 -0000
+@@ -215,8 +215,11 @@
+ if (text[i] == '\n')
+ break;
+ }
+-
+-
++
++ // sku - removed potentional buffer overflow vulnerability
++ if( i > sizeof( line ) - 1 ) {
++ i = sizeof( line ) - 1;
++ }
+ memcpy (line, text, i);
+ line[i] = 0;
+
+@@ -657,7 +660,8 @@
+ {
+ int l;
+
+- strcpy (cmd_args, text);
++ // sku - removed potentional buffer overflow vulnerability
++ strncpy( cmd_args, text, sizeof( cmd_args ) );
+
+ // strip off any trailing whitespace
+ l = strlen(cmd_args) - 1;
+Index: qcommon/common.c
+===================================================================
+RCS file: /cvs/cvsroot/quake2/src/qcommon/common.c,v
+retrieving revision 1.4
+diff -u -r1.4 common.c
+--- src/qcommon/common.c 30 Mar 2002 22:48:36 -0000 1.4
++++ src/qcommon/common.c 29 Jan 2005 20:57:02 -0000
+@@ -797,7 +797,9 @@
+ l = 0;
+ do
+ {
+- c = MSG_ReadChar (msg_read);
++ // sku - replaced MSG_ReadChar with MSG_ReadByte to avoid
++ // potentional vulnerability
++ c = MSG_ReadByte (msg_read);
+ if (c == -1 || c == 0)
+ break;
+ string[l] = c;
+@@ -817,7 +819,9 @@
+ l = 0;
+ do
+ {
+- c = MSG_ReadChar (msg_read);
++ // sku - replaced MSG_ReadChar with MSG_ReadByte to avoid
++ // potentional vulnerability
++ c = MSG_ReadByte (msg_read);
+ if (c == -1 || c == 0 || c == '\n')
+ break;
+ string[l] = c;
+Index: server/sv_main.c
+===================================================================
+RCS file: /cvs/cvsroot/quake2/src/server/sv_main.c,v
+retrieving revision 1.2
+diff -u -r1.2 sv_main.c
+--- src/server/sv_main.c 22 Mar 2002 00:24:37 -0000 1.2
++++ src/server/sv_main.c 29 Jan 2005 20:57:03 -0000
+@@ -293,8 +293,9 @@
+
+ challenge = atoi(Cmd_Argv(3));
+
+- strncpy (userinfo, Cmd_Argv(4), sizeof(userinfo)-1);
+- userinfo[sizeof(userinfo) - 1] = 0;
++ // sku - reserve 32 bytes for the IP address
++ strncpy (userinfo, Cmd_Argv(4), sizeof(userinfo)-32);
++ userinfo[sizeof(userinfo) - 32] = 0;
+
+ // force the IP key/value pair so the game can filter based on ip
+ Info_SetValueForKey (userinfo, "ip", NET_AdrToString(net_from));
+@@ -317,8 +318,11 @@
+ {
+ if (NET_CompareBaseAdr (net_from, svs.challenges[i].adr))
+ {
+- if (challenge == svs.challenges[i].challenge)
++ // sku - ignore zero challenges
++ if( svs.challenges[i].challenge && challenge == svs.challenges[i].challenge ) {
++ svs.challenges[i].challenge = 0;
+ break; // good
++ }
+ Netchan_OutOfBandPrint (NS_SERVER, adr, "print\nBad challenge.\n");
+ return;
+ }
+@@ -342,6 +346,11 @@
+ && ( cl->netchan.qport == qport
+ || adr.port == cl->netchan.remote_address.port ) )
+ {
++ // sku - avoid reusing slot of the client already connected
++ if( cl->state != cs_zombie ) {
++ Netchan_OutOfBandPrint( NS_SERVER, adr, "print\nConnected client from this IP is already present.\n" );
++ return;
++ }
+ if (!NET_IsLocalAddress (adr) && (svs.realtime - cl->lastconnect) < ((int)sv_reconnect_limit->value * 1000))
+ {
+ Com_DPrintf ("%s:reconnect rejected : too soon\n", NET_AdrToString (adr));
+Index: server/sv_user.c
+===================================================================
+RCS file: /cvs/cvsroot/quake2/src/server/sv_user.c,v
+retrieving revision 1.2
+diff -u -r1.2 sv_user.c
+--- src/server/sv_user.c 21 Mar 2002 04:44:46 -0000 1.2
++++ src/server/sv_user.c 29 Jan 2005 20:57:04 -0000
+@@ -142,6 +142,9 @@
+ }
+
+ start = atoi(Cmd_Argv(2));
++ if( start < 0 ) {
++ start = 0; // sku - catch negative offsets
++ }
+
+ // write a packet full of data
+
+@@ -150,9 +153,18 @@
+ {
+ if (sv.configstrings[start][0])
+ {
++ int length;
++
++ // sku - write configstrings that exceed MAX_QPATH in proper-sized chunks
++ length = strlen( sv.configstrings[start] );
++ if( length > MAX_QPATH ) {
++ length = MAX_QPATH;
++ }
++
+ MSG_WriteByte (&sv_client->netchan.message, svc_configstring);
+ MSG_WriteShort (&sv_client->netchan.message, start);
+- MSG_WriteString (&sv_client->netchan.message, sv.configstrings[start]);
++ SZ_Write (&sv_client->netchan.message, sv.configstrings[start], length);
++ MSG_WriteByte (&sv_client->netchan.message, 0);
+ }
+ start++;
+ }
+@@ -199,6 +211,9 @@
+ }
+
+ start = atoi(Cmd_Argv(2));
++ if( start < 0 ) {
++ start = 0;
++ }
+
+ memset (&nullstate, 0, sizeof(nullstate));
+
+@@ -398,7 +413,7 @@
+ */
+ void SV_ShowServerinfo_f (void)
+ {
+- Info_Print (Cvar_Serverinfo());
++// Info_Print (Cvar_Serverinfo());
+ }
+
+
+
+
+
diff --git a/games/quake2-source/files/patch-src_game_g__phys.c b/games/quake2-source/files/patch-src_game_g__phys.c
new file mode 100644
index 000000000000..d6684b01e770
--- /dev/null
+++ b/games/quake2-source/files/patch-src_game_g__phys.c
@@ -0,0 +1,17 @@
+--- src/game/g_phys.c.orig Tue Mar 15 22:15:11 2005
++++ src/game/g_phys.c Tue Mar 15 22:16:41 2005
+@@ -356,7 +356,13 @@
+ mask = MASK_SOLID;
+
+ trace = gi.trace (start, ent->mins, ent->maxs, end, ent, mask);
+-
++
++ if (trace.startsolid || trace.allsolid)
++ {
++ mask ^= CONTENTS_DEADMONSTER;
++ trace = gi.trace (start, ent->mins, ent->maxs, end, ent, mask);
++ }
++
+ VectorCopy (trace.endpos, ent->s.origin);
+ gi.linkentity (ent);
+
diff --git a/games/quake2-source/pkg-descr b/games/quake2-source/pkg-descr
new file mode 100644
index 000000000000..4b82f4c49328
--- /dev/null
+++ b/games/quake2-source/pkg-descr
@@ -0,0 +1,5 @@
+Quake II game source.
+
+This port installs the Quake II game source, together with BSD Makefiles, for
+building modifications. It can also install the Capture the Flag mod, Rogue
+and Xatrix game source.
diff --git a/games/quake2-source/pkg-plist b/games/quake2-source/pkg-plist
new file mode 100644
index 000000000000..e88dbecf7e9c
--- /dev/null
+++ b/games/quake2-source/pkg-plist
@@ -0,0 +1,306 @@
+%%CTF%%%%DATADIR%%/ctf/docs/admin.gif
+%%CTF%%%%DATADIR%%/ctf/docs/adminset.gif
+%%CTF%%%%DATADIR%%/ctf/docs/automac.gif
+%%CTF%%%%DATADIR%%/ctf/docs/ghost.jpg
+%%CTF%%%%DATADIR%%/ctf/docs/grapple.jpg
+%%CTF%%%%DATADIR%%/ctf/docs/layout.jpg
+%%CTF%%%%DATADIR%%/ctf/docs/mainctf_back.jpg
+%%CTF%%%%DATADIR%%/ctf/docs/menu.gif
+%%CTF%%%%DATADIR%%/ctf/docs/q2ctf.html
+%%CTF%%%%DATADIR%%/ctf/docs/say_team.gif
+%%CTF%%%%DATADIR%%/ctf/docs/stats.jpg
+%%CTF%%%%DATADIR%%/ctf/docs/tech1.gif
+%%CTF%%%%DATADIR%%/ctf/docs/tech2.gif
+%%CTF%%%%DATADIR%%/ctf/docs/tech3.gif
+%%CTF%%%%DATADIR%%/ctf/docs/tech4.gif
+%%CTF%%%%DATADIR%%/ctf/Makefile
+%%CTF%%%%DATADIR%%/ctf/g_ai.c
+%%CTF%%%%DATADIR%%/ctf/g_chase.c
+%%CTF%%%%DATADIR%%/ctf/g_cmds.c
+%%CTF%%%%DATADIR%%/ctf/g_combat.c
+%%CTF%%%%DATADIR%%/ctf/g_ctf.c
+%%CTF%%%%DATADIR%%/ctf/g_ctf.h
+%%CTF%%%%DATADIR%%/ctf/g_func.c
+%%CTF%%%%DATADIR%%/ctf/g_items.c
+%%CTF%%%%DATADIR%%/ctf/g_local.h
+%%CTF%%%%DATADIR%%/ctf/g_main.c
+%%CTF%%%%DATADIR%%/ctf/g_misc.c
+%%CTF%%%%DATADIR%%/ctf/g_monster.c
+%%CTF%%%%DATADIR%%/ctf/g_phys.c
+%%CTF%%%%DATADIR%%/ctf/g_save.c
+%%CTF%%%%DATADIR%%/ctf/g_spawn.c
+%%CTF%%%%DATADIR%%/ctf/g_svcmds.c
+%%CTF%%%%DATADIR%%/ctf/g_target.c
+%%CTF%%%%DATADIR%%/ctf/g_trigger.c
+%%CTF%%%%DATADIR%%/ctf/g_utils.c
+%%CTF%%%%DATADIR%%/ctf/g_weapon.c
+%%CTF%%%%DATADIR%%/ctf/game.h
+%%CTF%%%%DATADIR%%/ctf/m_move.c
+%%CTF%%%%DATADIR%%/ctf/m_player.h
+%%CTF%%%%DATADIR%%/ctf/p_client.c
+%%CTF%%%%DATADIR%%/ctf/p_hud.c
+%%CTF%%%%DATADIR%%/ctf/p_menu.c
+%%CTF%%%%DATADIR%%/ctf/p_menu.h
+%%CTF%%%%DATADIR%%/ctf/p_trail.c
+%%CTF%%%%DATADIR%%/ctf/p_view.c
+%%CTF%%%%DATADIR%%/ctf/p_weapon.c
+%%CTF%%%%DATADIR%%/ctf/q_shared.c
+%%CTF%%%%DATADIR%%/ctf/q_shared.h
+%%DATADIR%%/game/Makefile
+%%DATADIR%%/game/g_ai.c
+%%DATADIR%%/game/g_chase.c
+%%DATADIR%%/game/g_cmds.c
+%%DATADIR%%/game/g_combat.c
+%%DATADIR%%/game/g_func.c
+%%DATADIR%%/game/g_items.c
+%%DATADIR%%/game/g_local.h
+%%DATADIR%%/game/g_main.c
+%%DATADIR%%/game/g_misc.c
+%%DATADIR%%/game/g_monster.c
+%%DATADIR%%/game/g_phys.c
+%%DATADIR%%/game/g_save.c
+%%DATADIR%%/game/g_spawn.c
+%%DATADIR%%/game/g_svcmds.c
+%%DATADIR%%/game/g_target.c
+%%DATADIR%%/game/g_trigger.c
+%%DATADIR%%/game/g_turret.c
+%%DATADIR%%/game/g_utils.c
+%%DATADIR%%/game/g_weapon.c
+%%DATADIR%%/game/game.h
+%%DATADIR%%/game/m_actor.c
+%%DATADIR%%/game/m_actor.h
+%%DATADIR%%/game/m_berserk.c
+%%DATADIR%%/game/m_berserk.h
+%%DATADIR%%/game/m_boss2.c
+%%DATADIR%%/game/m_boss2.h
+%%DATADIR%%/game/m_boss3.c
+%%DATADIR%%/game/m_boss31.c
+%%DATADIR%%/game/m_boss31.h
+%%DATADIR%%/game/m_boss32.c
+%%DATADIR%%/game/m_boss32.h
+%%DATADIR%%/game/m_brain.c
+%%DATADIR%%/game/m_brain.h
+%%DATADIR%%/game/m_chick.c
+%%DATADIR%%/game/m_chick.h
+%%DATADIR%%/game/m_flash.c
+%%DATADIR%%/game/m_flipper.c
+%%DATADIR%%/game/m_flipper.h
+%%DATADIR%%/game/m_float.c
+%%DATADIR%%/game/m_float.h
+%%DATADIR%%/game/m_flyer.c
+%%DATADIR%%/game/m_flyer.h
+%%DATADIR%%/game/m_gladiator.c
+%%DATADIR%%/game/m_gladiator.h
+%%DATADIR%%/game/m_gunner.c
+%%DATADIR%%/game/m_gunner.h
+%%DATADIR%%/game/m_hover.c
+%%DATADIR%%/game/m_hover.h
+%%DATADIR%%/game/m_infantry.c
+%%DATADIR%%/game/m_infantry.h
+%%DATADIR%%/game/m_insane.c
+%%DATADIR%%/game/m_insane.h
+%%DATADIR%%/game/m_medic.c
+%%DATADIR%%/game/m_medic.h
+%%DATADIR%%/game/m_move.c
+%%DATADIR%%/game/m_mutant.c
+%%DATADIR%%/game/m_mutant.h
+%%DATADIR%%/game/m_parasite.c
+%%DATADIR%%/game/m_parasite.h
+%%DATADIR%%/game/m_player.h
+%%DATADIR%%/game/m_rider.h
+%%DATADIR%%/game/m_soldier.c
+%%DATADIR%%/game/m_soldier.h
+%%DATADIR%%/game/m_supertank.c
+%%DATADIR%%/game/m_supertank.h
+%%DATADIR%%/game/m_tank.c
+%%DATADIR%%/game/m_tank.h
+%%DATADIR%%/game/p_client.c
+%%DATADIR%%/game/p_hud.c
+%%DATADIR%%/game/p_trail.c
+%%DATADIR%%/game/p_view.c
+%%DATADIR%%/game/p_weapon.c
+%%DATADIR%%/game/q_shared.c
+%%DATADIR%%/game/q_shared.h
+%%ROGUE%%%%DATADIR%%/rogue/Makefile
+%%ROGUE%%%%DATADIR%%/rogue/dm_ball.c
+%%ROGUE%%%%DATADIR%%/rogue/dm_tag.c
+%%ROGUE%%%%DATADIR%%/rogue/g_ai.c
+%%ROGUE%%%%DATADIR%%/rogue/g_chase.c
+%%ROGUE%%%%DATADIR%%/rogue/g_cmds.c
+%%ROGUE%%%%DATADIR%%/rogue/g_combat.c
+%%ROGUE%%%%DATADIR%%/rogue/g_func.c
+%%ROGUE%%%%DATADIR%%/rogue/g_items.c
+%%ROGUE%%%%DATADIR%%/rogue/g_local.h
+%%ROGUE%%%%DATADIR%%/rogue/g_main.c
+%%ROGUE%%%%DATADIR%%/rogue/g_misc.c
+%%ROGUE%%%%DATADIR%%/rogue/g_monster.c
+%%ROGUE%%%%DATADIR%%/rogue/g_newai.c
+%%ROGUE%%%%DATADIR%%/rogue/g_newdm.c
+%%ROGUE%%%%DATADIR%%/rogue/g_newfnc.c
+%%ROGUE%%%%DATADIR%%/rogue/g_newtarg.c
+%%ROGUE%%%%DATADIR%%/rogue/g_newtrig.c
+%%ROGUE%%%%DATADIR%%/rogue/g_newweap.c
+%%ROGUE%%%%DATADIR%%/rogue/g_phys.c
+%%ROGUE%%%%DATADIR%%/rogue/g_save.c
+%%ROGUE%%%%DATADIR%%/rogue/g_spawn.c
+%%ROGUE%%%%DATADIR%%/rogue/g_sphere.c
+%%ROGUE%%%%DATADIR%%/rogue/g_svcmds.c
+%%ROGUE%%%%DATADIR%%/rogue/g_target.c
+%%ROGUE%%%%DATADIR%%/rogue/g_trigger.c
+%%ROGUE%%%%DATADIR%%/rogue/g_turret.c
+%%ROGUE%%%%DATADIR%%/rogue/g_utils.c
+%%ROGUE%%%%DATADIR%%/rogue/g_weapon.c
+%%ROGUE%%%%DATADIR%%/rogue/game.h
+%%ROGUE%%%%DATADIR%%/rogue/m_actor.c
+%%ROGUE%%%%DATADIR%%/rogue/m_actor.h
+%%ROGUE%%%%DATADIR%%/rogue/m_berserk.c
+%%ROGUE%%%%DATADIR%%/rogue/m_berserk.h
+%%ROGUE%%%%DATADIR%%/rogue/m_boss2.c
+%%ROGUE%%%%DATADIR%%/rogue/m_boss2.h
+%%ROGUE%%%%DATADIR%%/rogue/m_boss3.c
+%%ROGUE%%%%DATADIR%%/rogue/m_boss31.c
+%%ROGUE%%%%DATADIR%%/rogue/m_boss31.h
+%%ROGUE%%%%DATADIR%%/rogue/m_boss32.c
+%%ROGUE%%%%DATADIR%%/rogue/m_boss32.h
+%%ROGUE%%%%DATADIR%%/rogue/m_brain.c
+%%ROGUE%%%%DATADIR%%/rogue/m_brain.h
+%%ROGUE%%%%DATADIR%%/rogue/m_carrier.c
+%%ROGUE%%%%DATADIR%%/rogue/m_carrier.h
+%%ROGUE%%%%DATADIR%%/rogue/m_chick.c
+%%ROGUE%%%%DATADIR%%/rogue/m_chick.h
+%%ROGUE%%%%DATADIR%%/rogue/m_flash.c
+%%ROGUE%%%%DATADIR%%/rogue/m_flipper.c
+%%ROGUE%%%%DATADIR%%/rogue/m_flipper.h
+%%ROGUE%%%%DATADIR%%/rogue/m_float.c
+%%ROGUE%%%%DATADIR%%/rogue/m_float.h
+%%ROGUE%%%%DATADIR%%/rogue/m_flyer.c
+%%ROGUE%%%%DATADIR%%/rogue/m_flyer.h
+%%ROGUE%%%%DATADIR%%/rogue/m_gladiator.c
+%%ROGUE%%%%DATADIR%%/rogue/m_gladiator.h
+%%ROGUE%%%%DATADIR%%/rogue/m_gunner.c
+%%ROGUE%%%%DATADIR%%/rogue/m_gunner.h
+%%ROGUE%%%%DATADIR%%/rogue/m_hover.c
+%%ROGUE%%%%DATADIR%%/rogue/m_hover.h
+%%ROGUE%%%%DATADIR%%/rogue/m_infantry.c
+%%ROGUE%%%%DATADIR%%/rogue/m_infantry.h
+%%ROGUE%%%%DATADIR%%/rogue/m_insane.c
+%%ROGUE%%%%DATADIR%%/rogue/m_insane.h
+%%ROGUE%%%%DATADIR%%/rogue/m_medic.c
+%%ROGUE%%%%DATADIR%%/rogue/m_medic.h
+%%ROGUE%%%%DATADIR%%/rogue/m_move.c
+%%ROGUE%%%%DATADIR%%/rogue/m_move2.c
+%%ROGUE%%%%DATADIR%%/rogue/m_mutant.c
+%%ROGUE%%%%DATADIR%%/rogue/m_mutant.h
+%%ROGUE%%%%DATADIR%%/rogue/m_parasite.c
+%%ROGUE%%%%DATADIR%%/rogue/m_parasite.h
+%%ROGUE%%%%DATADIR%%/rogue/m_player.h
+%%ROGUE%%%%DATADIR%%/rogue/m_rider.h
+%%ROGUE%%%%DATADIR%%/rogue/m_soldier.c
+%%ROGUE%%%%DATADIR%%/rogue/m_soldier.h
+%%ROGUE%%%%DATADIR%%/rogue/m_stalker.c
+%%ROGUE%%%%DATADIR%%/rogue/m_stalker.h
+%%ROGUE%%%%DATADIR%%/rogue/m_supertank.c
+%%ROGUE%%%%DATADIR%%/rogue/m_supertank.h
+%%ROGUE%%%%DATADIR%%/rogue/m_tank.c
+%%ROGUE%%%%DATADIR%%/rogue/m_tank.h
+%%ROGUE%%%%DATADIR%%/rogue/m_turret.c
+%%ROGUE%%%%DATADIR%%/rogue/m_turret.h
+%%ROGUE%%%%DATADIR%%/rogue/m_widow.c
+%%ROGUE%%%%DATADIR%%/rogue/m_widow.h
+%%ROGUE%%%%DATADIR%%/rogue/m_widow2.c
+%%ROGUE%%%%DATADIR%%/rogue/m_widow2.h
+%%ROGUE%%%%DATADIR%%/rogue/p_client.c
+%%ROGUE%%%%DATADIR%%/rogue/p_hud.c
+%%ROGUE%%%%DATADIR%%/rogue/p_trail.c
+%%ROGUE%%%%DATADIR%%/rogue/p_view.c
+%%ROGUE%%%%DATADIR%%/rogue/p_weapon.c
+%%ROGUE%%%%DATADIR%%/rogue/q_shared.c
+%%ROGUE%%%%DATADIR%%/rogue/q_shared.h
+%%XATRIX%%%%DATADIR%%/xatrix/Makefile
+%%XATRIX%%%%DATADIR%%/xatrix/g_ai.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_chase.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_cmds.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_combat.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_func.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_items.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_local.h
+%%XATRIX%%%%DATADIR%%/xatrix/g_main.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_misc.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_monster.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_phys.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_save.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_spawn.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_svcmds.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_target.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_trigger.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_turret.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_utils.c
+%%XATRIX%%%%DATADIR%%/xatrix/g_weapon.c
+%%XATRIX%%%%DATADIR%%/xatrix/game.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_actor.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_actor.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_berserk.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_berserk.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss2.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss2.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss3.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss31.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss31.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss32.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss32.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_boss5.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_brain.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_brain.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_chick.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_chick.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_fixbot.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_fixbot.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_flash.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_flipper.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_flipper.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_float.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_float.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_flyer.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_flyer.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_gekk.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_gekk.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_gladb.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_gladiator.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_gladiator.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_gunner.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_gunner.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_hover.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_hover.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_infantry.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_infantry.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_insane.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_insane.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_medic.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_medic.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_move.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_mutant.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_mutant.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_parasite.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_parasite.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_player.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_rider.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_soldier.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_soldier.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_soldierh.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_supertank.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_supertank.h
+%%XATRIX%%%%DATADIR%%/xatrix/m_tank.c
+%%XATRIX%%%%DATADIR%%/xatrix/m_tank.h
+%%XATRIX%%%%DATADIR%%/xatrix/p_client.c
+%%XATRIX%%%%DATADIR%%/xatrix/p_hud.c
+%%XATRIX%%%%DATADIR%%/xatrix/p_trail.c
+%%XATRIX%%%%DATADIR%%/xatrix/p_view.c
+%%XATRIX%%%%DATADIR%%/xatrix/p_weapon.c
+%%XATRIX%%%%DATADIR%%/xatrix/q_shared.c
+%%XATRIX%%%%DATADIR%%/xatrix/q_shared.h
+%%XATRIX%%@dirrm %%DATADIR%%/xatrix
+%%ROGUE%%@dirrm %%DATADIR%%/rogue
+@dirrm %%DATADIR%%/game
+%%CTF%%@dirrm %%DATADIR%%/ctf/docs
+%%CTF%%@dirrm %%DATADIR%%/ctf
+@dirrm %%DATADIR%%