aboutsummaryrefslogtreecommitdiff
path: root/games/quake3
diff options
context:
space:
mode:
authorAlejandro Pulver <alepulver@FreeBSD.org>2006-06-03 14:51:46 +0000
committerAlejandro Pulver <alepulver@FreeBSD.org>2006-06-03 14:51:46 +0000
commitac2c14f932310e1a02000206b91e24ff1ba73bea (patch)
tree703abd790144aa51ccf01e1395e409d2d3562148 /games/quake3
parent49a4ea56898c547a6f0f46bc9b2b48bf1abc46b9 (diff)
downloadports-ac2c14f932310e1a02000206b91e24ff1ba73bea.tar.gz
ports-ac2c14f932310e1a02000206b91e24ff1ba73bea.zip
- Update to version 1.32c (security patch, see below).
- Make portlint happy. - Allow building the VM on PowerPC. - Fix a typo in option detection code (&& -> ||). - Fix 2 security vulnerabilities [1]. PR: ports/98296 Submitted by: alepulver (myself) Approved by: Linas Valiukas <shirshegsm@gmail.com> (maintainer) Obtained from: q3icculus (http://icculus.org/quake3/) [1] Security: CVE-2006-2082
Notes
Notes: svn path=/head/; revision=164295
Diffstat (limited to 'games/quake3')
-rw-r--r--games/quake3/Makefile18
-rw-r--r--games/quake3/files/patch-code-cgame-cg_weapons.c23
-rw-r--r--games/quake3/files/patch-code-client-cl_ui.c4
-rw-r--r--games/quake3/files/patch-code-game-q_shared.c41
-rw-r--r--games/quake3/files/patch-code-game-q_shared.h13
-rw-r--r--games/quake3/files/patch-code-q3_ui-ui_playermodel.c11
-rw-r--r--games/quake3/files/patch-code-q3_ui-ui_players.c18
-rw-r--r--games/quake3/files/patch-code-q3_ui-ui_saveconfig.c11
-rw-r--r--games/quake3/files/patch-code-qcommon-common.c19
-rw-r--r--games/quake3/files/patch-code-qcommon-files.c4
-rw-r--r--games/quake3/files/patch-code-qcommon-vm.c13
-rw-r--r--games/quake3/files/patch-code-renderer-tr_bsp.c11
-rw-r--r--games/quake3/files/patch-code-renderer-tr_shader.c29
-rw-r--r--games/quake3/files/patch-code-server-sv_client.c80
-rw-r--r--games/quake3/files/patch-code-ui-ui_main.c11
-rw-r--r--games/quake3/files/patch-code-ui-ui_players.c18
-rw-r--r--games/quake3/files/patch-code-unix-Makefile74
-rw-r--r--games/quake3/files/patch-code-unix-linux_common.c18
-rw-r--r--games/quake3/files/patch-code-unix-linux_glimp.c11
-rw-r--r--games/quake3/files/patch-code-unix-unix_main.c4
-rw-r--r--games/quake3/files/patch-code-unix-unix_shared.c4
21 files changed, 340 insertions, 95 deletions
diff --git a/games/quake3/Makefile b/games/quake3/Makefile
index 8b69ea6c6bc2..f1e660b4410c 100644
--- a/games/quake3/Makefile
+++ b/games/quake3/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= quake3
-PORTVERSION= 1.32b
-PORTREVISION= 5
+PORTVERSION= 1.32c
CATEGORIES= games
MASTER_SITES= http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \
http://www.planetgargoyle.com/ \
@@ -15,7 +14,7 @@ MASTER_SITES= http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \
http://0day.icculus.org/mirrors/quake3/ \
http://www.olpainless.net/files/ \
${MASTER_SITE_IDSOFTWARE:S|$|source/|}
-DISTFILES= ${DISTNAME}-source${EXTRACT_SUFX}
+DISTNAME= ${PORTNAME}-${REALVERSION}-source
MAINTAINER= shirshegsm@gmail.com
COMMENT= Quake III Arena -- first person shooter (native build)
@@ -24,11 +23,12 @@ USE_ZIP= yes
USE_DOS2UNIX= yes
USE_GMAKE= yes
USE_GCC= 3.2+
+WRKSRC= ${WRKDIR}/${PORTNAME}-${REALVERSION}
BUILD_WRKSRC= ${WRKSRC}/code/unix
OPTIONS= CLIENT "Build client" on \
DEDICATED "Build dedicated server" on \
- GAMELIBS "Build game libraries (mandatory on !i386)" off \
+ GAMELIBS "Build game libraries (when not mandatory)" off \
OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
SMP "Build SMP (threaded) client" on
@@ -36,6 +36,7 @@ MAKE_ENV= LIBDIR="${LIBDIR}"
PLIST_SUB= LIBDIR="${LIBDIR:S/${PREFIX}\///}"
LIBDIR= ${PREFIX}/lib/${PORTNAME}
+REALVERSION= 1.32b
.include <bsd.port.pre.mk>
@@ -45,10 +46,10 @@ IGNORE= needs at least one of CLIENT, DEDICATED and SMP options
.endif
.if ${ARCH} == "i386"
-BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
+BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
.endif
-.if !defined(WITHOUT_CLIENT) && !defined(WITHOUT_SMP)
+.if !defined(WITHOUT_CLIENT) || !defined(WITHOUT_SMP)
USE_GL= yes
.endif
@@ -68,7 +69,7 @@ Q3BIN+= q3ded
PLIST_SUB+= DEDICATED="@comment "
.endif
-.if defined(WITH_GAMELIBS) || ${ARCH} != "i386"
+.if defined(WITH_GAMELIBS) || (${ARCH} != "i386" && ${ARCH} != "powerpc")
MAKE_ENV+= GAMELIBS=YES
PLIST_SUB+= GAMELIBS=""
.else
@@ -94,14 +95,13 @@ post-patch:
@${REINPLACE_CMD} -e \
's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \
${WRKSRC}/code/botlib/be_interface.c \
- ${WRKSRC}/code/qcommon/common.c \
${WRKSRC}/code/renderer/tr_init.c
do-install:
.for bin in ${Q3BIN}
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${PREFIX}/bin
.endfor
-.if defined(WITH_GAMELIBS) || ${ARCH} != "i386"
+.if defined(WITH_GAMELIBS) || (${ARCH} != "i386" && ${ARCH} != "powerpc")
.for dir in baseq3 missionpack
${MKDIR} ${LIBDIR}/${dir}
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${LIBDIR}/${dir}
diff --git a/games/quake3/files/patch-code-cgame-cg_weapons.c b/games/quake3/files/patch-code-cgame-cg_weapons.c
new file mode 100644
index 000000000000..4064c095e1d0
--- /dev/null
+++ b/games/quake3/files/patch-code-cgame-cg_weapons.c
@@ -0,0 +1,23 @@
+--- ./code/cgame/cg_weapons.c.orig Wed May 31 18:55:11 2006
++++ ./code/cgame/cg_weapons.c Wed May 31 19:05:20 2006
+@@ -656,17 +656,17 @@
+ }
+
+ strcpy( path, item->world_model[0] );
+- COM_StripExtension( path, path );
++ COM_StripExtension( path, path, sizeof(path) );
+ strcat( path, "_flash.md3" );
+ weaponInfo->flashModel = trap_R_RegisterModel( path );
+
+ strcpy( path, item->world_model[0] );
+- COM_StripExtension( path, path );
++ COM_StripExtension( path, path, sizeof(path) );
+ strcat( path, "_barrel.md3" );
+ weaponInfo->barrelModel = trap_R_RegisterModel( path );
+
+ strcpy( path, item->world_model[0] );
+- COM_StripExtension( path, path );
++ COM_StripExtension( path, path, sizeof(path) );
+ strcat( path, "_hand.md3" );
+ weaponInfo->handsModel = trap_R_RegisterModel( path );
+
diff --git a/games/quake3/files/patch-code-client-cl_ui.c b/games/quake3/files/patch-code-client-cl_ui.c
index 58cfc63e87ea..be618fb8922e 100644
--- a/games/quake3/files/patch-code-client-cl_ui.c
+++ b/games/quake3/files/patch-code-client-cl_ui.c
@@ -1,5 +1,5 @@
---- code/client/cl_ui.c.orig Thu May 25 15:41:27 2006
-+++ code/client/cl_ui.c Thu May 25 15:46:39 2006
+--- ./code/client/cl_ui.c.orig Wed May 31 18:55:11 2006
++++ ./code/client/cl_ui.c Wed May 31 18:55:13 2006
@@ -1166,7 +1166,7 @@
// init for this gamestate
VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE));
diff --git a/games/quake3/files/patch-code-game-q_shared.c b/games/quake3/files/patch-code-game-q_shared.c
index efbf3bd6789b..1047fa8aead0 100644
--- a/games/quake3/files/patch-code-game-q_shared.c
+++ b/games/quake3/files/patch-code-game-q_shared.c
@@ -1,6 +1,33 @@
---- code/game/q_shared.c.orig Thu May 25 13:42:26 2006
-+++ code/game/q_shared.c Thu May 25 13:44:30 2006
-@@ -99,29 +99,29 @@
+--- ./code/game/q_shared.c.orig Wed May 31 18:55:11 2006
++++ ./code/game/q_shared.c Wed May 31 19:06:32 2006
+@@ -58,13 +58,20 @@
+ COM_StripExtension
+ ============
+ */
+-void COM_StripExtension( const char *in, char *out ) {
+- while ( *in && *in != '.' ) {
+- *out++ = *in++;
+- }
+- *out = 0;
+-}
++void COM_StripExtension( const char *in, char *out, int destsize ) {
++ int length;
+
++ Q_strncpyz(out, in, destsize);
++
++ length = strlen(out)-1;
++ while (length > 0 && out[length] != '.') {
++ length--;
++ if (out[length] == '/')
++ return; // no extension
++ }
++ if (length)
++ out[length] = 0;
++}
+
+ /*
+ ==================
+@@ -99,29 +106,29 @@
============================================================================
*/
@@ -45,7 +72,7 @@
{
byte b1,b2;
-@@ -131,12 +131,12 @@
+@@ -131,12 +138,12 @@
return (b1<<8) + b2;
}
@@ -60,7 +87,7 @@
{
byte b1,b2,b3,b4;
-@@ -145,15 +145,15 @@
+@@ -145,15 +152,15 @@
b3 = (l>>16)&255;
b4 = (l>>24)&255;
@@ -79,7 +106,7 @@
{
qint64 result;
-@@ -199,7 +199,7 @@
+@@ -199,7 +206,7 @@
Swap_Init
================
*/
@@ -88,7 +115,7 @@
void Swap_Init (void)
{
byte swaptest[2] = {1,0};
-@@ -229,7 +229,7 @@
+@@ -229,7 +236,7 @@
}
}
diff --git a/games/quake3/files/patch-code-game-q_shared.h b/games/quake3/files/patch-code-game-q_shared.h
index 4b72f5464fd3..6b614d628405 100644
--- a/games/quake3/files/patch-code-game-q_shared.h
+++ b/games/quake3/files/patch-code-game-q_shared.h
@@ -1,5 +1,5 @@
---- code/game/q_shared.h.orig Thu May 25 13:26:31 2006
-+++ code/game/q_shared.h Thu May 25 13:26:58 2006
+--- ./code/game/q_shared.h.orig Wed May 31 18:55:11 2006
++++ ./code/game/q_shared.h Wed May 31 19:06:40 2006
@@ -150,12 +150,14 @@
#define ID_INLINE __inline
@@ -102,6 +102,15 @@
#if !( defined __VECTORC )
void Com_Memset (void* dest, const int val, const size_t count);
+@@ -787,7 +800,7 @@
+ float Com_Clamp( float min, float max, float value );
+
+ char *COM_SkipPath( char *pathname );
+-void COM_StripExtension( const char *in, char *out );
++void COM_StripExtension( const char *in, char *out, int destsize );
+ void COM_DefaultExtension( char *path, int maxSize, const char *extension );
+
+ void COM_BeginParseSession( const char *name );
@@ -888,18 +901,18 @@
} qint64;
diff --git a/games/quake3/files/patch-code-q3_ui-ui_playermodel.c b/games/quake3/files/patch-code-q3_ui-ui_playermodel.c
new file mode 100644
index 000000000000..de2905949fdf
--- /dev/null
+++ b/games/quake3/files/patch-code-q3_ui-ui_playermodel.c
@@ -0,0 +1,11 @@
+--- ./code/q3_ui/ui_playermodel.c.orig Wed May 31 18:55:11 2006
++++ ./code/q3_ui/ui_playermodel.c Wed May 31 19:07:38 2006
+@@ -424,7 +424,7 @@
+ {
+ filelen = strlen(fileptr);
+
+- COM_StripExtension(fileptr,skinname);
++ COM_StripExtension(fileptr, skinname, sizeof(skinname));
+
+ // look for icon_????
+ if (!Q_stricmpn(skinname,"icon_",5))
diff --git a/games/quake3/files/patch-code-q3_ui-ui_players.c b/games/quake3/files/patch-code-q3_ui-ui_players.c
new file mode 100644
index 000000000000..1bd082902c13
--- /dev/null
+++ b/games/quake3/files/patch-code-q3_ui-ui_players.c
@@ -0,0 +1,18 @@
+--- ./code/q3_ui/ui_players.c.orig Wed May 31 18:55:11 2006
++++ ./code/q3_ui/ui_players.c Wed May 31 19:07:49 2006
+@@ -89,13 +89,13 @@
+
+ if ( weaponNum == WP_MACHINEGUN || weaponNum == WP_GAUNTLET || weaponNum == WP_BFG ) {
+ strcpy( path, item->world_model[0] );
+- COM_StripExtension( path, path );
++ COM_StripExtension( path, path, sizeof(path) );
+ strcat( path, "_barrel.md3" );
+ pi->barrelModel = trap_R_RegisterModel( path );
+ }
+
+ strcpy( path, item->world_model[0] );
+- COM_StripExtension( path, path );
++ COM_StripExtension( path, path, sizeof(path) );
+ strcat( path, "_flash.md3" );
+ pi->flashModel = trap_R_RegisterModel( path );
+
diff --git a/games/quake3/files/patch-code-q3_ui-ui_saveconfig.c b/games/quake3/files/patch-code-q3_ui-ui_saveconfig.c
new file mode 100644
index 000000000000..b02d32f04f5c
--- /dev/null
+++ b/games/quake3/files/patch-code-q3_ui-ui_saveconfig.c
@@ -0,0 +1,11 @@
+--- ./code/q3_ui/ui_saveconfig.c.orig Wed May 31 18:55:11 2006
++++ ./code/q3_ui/ui_saveconfig.c Wed May 31 19:08:05 2006
+@@ -85,7 +85,7 @@
+ return;
+ }
+
+- COM_StripExtension(saveConfig.savename.field.buffer, configname );
++ COM_StripExtension(saveConfig.savename.field.buffer, configname, sizeof(configname) );
+ trap_Cmd_ExecuteText( EXEC_APPEND, va( "writeconfig %s.cfg\n", configname ) );
+ UI_PopMenu();
+ }
diff --git a/games/quake3/files/patch-code-qcommon-common.c b/games/quake3/files/patch-code-qcommon-common.c
index 9db06e6c63a5..ee3d83c93876 100644
--- a/games/quake3/files/patch-code-qcommon-common.c
+++ b/games/quake3/files/patch-code-qcommon-common.c
@@ -1,15 +1,15 @@
---- code/qcommon/common.c.orig Mon Aug 15 23:10:07 2005
-+++ code/qcommon/common.c Wed Nov 23 10:53:29 2005
+--- ./code/qcommon/common.c.orig Wed May 31 18:55:11 2006
++++ ./code/qcommon/common.c Wed May 31 18:55:13 2006
@@ -24,15 +24,8 @@
#include "../game/q_shared.h"
#include "qcommon.h"
#include <setjmp.h>
-#ifdef __linux__
-+#include <sys/types.h>
- #include <netinet/in.h>
+-#include <netinet/in.h>
-#else
-#if defined(MACOS_X)
--#include <netinet/in.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
-#else
-#include <winsock.h>
-#endif
@@ -17,3 +17,12 @@
int demo_protocols[] =
{ 66, 67, 68, 0 };
+@@ -2367,7 +2360,7 @@
+ // cvar and command buffer management
+ Com_ParseCommandLine( commandLine );
+
+-// Swap_Init ();
++ Swap_Init ();
+ Cbuf_Init ();
+
+ Com_InitZoneMemory();
diff --git a/games/quake3/files/patch-code-qcommon-files.c b/games/quake3/files/patch-code-qcommon-files.c
index fcff4d19cad7..b77b82587ef8 100644
--- a/games/quake3/files/patch-code-qcommon-files.c
+++ b/games/quake3/files/patch-code-qcommon-files.c
@@ -1,5 +1,5 @@
---- code/qcommon/files.c.orig Thu May 25 16:39:34 2006
-+++ code/qcommon/files.c Thu May 25 16:41:43 2006
+--- ./code/qcommon/files.c.orig Wed May 31 18:55:11 2006
++++ ./code/qcommon/files.c Wed May 31 18:55:13 2006
@@ -2763,6 +2763,7 @@
if (fs_basepath->string[0]) {
FS_AddGameDirectory( fs_basepath->string, gameName );
diff --git a/games/quake3/files/patch-code-qcommon-vm.c b/games/quake3/files/patch-code-qcommon-vm.c
index e6a62c38cc82..c14ba68f4e92 100644
--- a/games/quake3/files/patch-code-qcommon-vm.c
+++ b/games/quake3/files/patch-code-qcommon-vm.c
@@ -1,5 +1,14 @@
---- code/qcommon/vm.c.orig Sat May 27 14:56:20 2006
-+++ code/qcommon/vm.c Sat May 27 15:40:59 2006
+--- ./code/qcommon/vm.c.orig Wed May 31 18:55:11 2006
++++ ./code/qcommon/vm.c Wed May 31 19:08:19 2006
+@@ -225,7 +225,7 @@
+ return;
+ }
+
+- COM_StripExtension( vm->name, name );
++ COM_StripExtension( vm->name, name, sizeof(name) );
+ Com_sprintf( symbols, sizeof( symbols ), "vm/%s.map", name );
+ len = FS_ReadFile( symbols, (void **)&mapfile );
+ if ( !mapfile ) {
@@ -826,7 +826,7 @@
diff --git a/games/quake3/files/patch-code-renderer-tr_bsp.c b/games/quake3/files/patch-code-renderer-tr_bsp.c
new file mode 100644
index 000000000000..15cd58695076
--- /dev/null
+++ b/games/quake3/files/patch-code-renderer-tr_bsp.c
@@ -0,0 +1,11 @@
+--- ./code/renderer/tr_bsp.c.orig Wed May 31 18:55:11 2006
++++ ./code/renderer/tr_bsp.c Wed May 31 19:09:13 2006
+@@ -1820,7 +1820,7 @@
+ Q_strncpyz( s_worldData.name, name, sizeof( s_worldData.name ) );
+
+ Q_strncpyz( s_worldData.baseName, COM_SkipPath( s_worldData.name ), sizeof( s_worldData.name ) );
+- COM_StripExtension( s_worldData.baseName, s_worldData.baseName );
++ COM_StripExtension( s_worldData.baseName, s_worldData.baseName , sizeof(s_worldData.baseName));
+
+ startMarker = ri.Hunk_Alloc(0, h_low);
+ c_gridVerts = 0;
diff --git a/games/quake3/files/patch-code-renderer-tr_shader.c b/games/quake3/files/patch-code-renderer-tr_shader.c
new file mode 100644
index 000000000000..5f1f308afe4f
--- /dev/null
+++ b/games/quake3/files/patch-code-renderer-tr_shader.c
@@ -0,0 +1,29 @@
+--- ./code/renderer/tr_shader.c.orig Wed May 31 18:55:11 2006
++++ ./code/renderer/tr_shader.c Wed May 31 19:09:58 2006
+@@ -92,7 +92,7 @@
+
+ // remap all the shaders with the given name
+ // even tho they might have different lightmaps
+- COM_StripExtension( shaderName, strippedName );
++ COM_StripExtension( shaderName, strippedName, sizeof(strippedName));
+ hash = generateHashValue(strippedName, FILE_HASH_SIZE);
+ for (sh = hashTable[hash]; sh; sh = sh->next) {
+ if (Q_stricmp(sh->name, strippedName) == 0) {
+@@ -2351,7 +2351,7 @@
+ return tr.defaultShader;
+ }
+
+- COM_StripExtension( name, strippedName );
++ COM_StripExtension( name, strippedName, sizeof(strippedName) );
+
+ hash = generateHashValue(strippedName, FILE_HASH_SIZE);
+
+@@ -2419,7 +2419,7 @@
+ lightmapIndex = LIGHTMAP_BY_VERTEX;
+ }
+
+- COM_StripExtension( name, strippedName );
++ COM_StripExtension( name, strippedName, sizeof(strippedName) );
+
+ hash = generateHashValue(strippedName, FILE_HASH_SIZE);
+
diff --git a/games/quake3/files/patch-code-server-sv_client.c b/games/quake3/files/patch-code-server-sv_client.c
new file mode 100644
index 000000000000..e9f0c9662dfb
--- /dev/null
+++ b/games/quake3/files/patch-code-server-sv_client.c
@@ -0,0 +1,80 @@
+--- code/server/sv_client.c.orig Wed May 31 23:38:47 2006
++++ code/server/sv_client.c Wed May 31 23:40:24 2006
+@@ -756,28 +756,58 @@
+ int curindex;
+ int rate;
+ int blockspersnap;
+- int idPack, missionPack;
++ int idPack, missionPack, unreferenced = 1;
+ char errorMessage[1024];
++ char pakbuf[MAX_OSPATH], *pakptr;
++ const char *referencedPaks;
++ int numRefPaks;
+
+ if (!*cl->downloadName)
+ return; // Nothing being downloaded
+
+ if (!cl->download) {
+- // We open the file here
++ // Chop off filename extension.
++ Com_sprintf(pakbuf, sizeof(pakbuf), "%s", cl->downloadName);
++ pakptr = Q_strrchr(pakbuf, '.');
+
+- Com_Printf( "clientDownload: %d : begining \"%s\"\n", cl - svs.clients, cl->downloadName );
++ if (pakptr) {
++ *pakptr = '\0';
+
+- missionPack = FS_idPak(cl->downloadName, "missionpack");
+- idPack = missionPack || FS_idPak(cl->downloadName, "baseq3");
++ // Check for pk3 filename extension
++ if (!Q_stricmp(pakptr + 1, "pk3")) {
++ referencedPaks = FS_ReferencedPakNames();
+
+- if ( !sv_allowDownload->integer || idPack ||
++ // Check whether the file appears in the list of referenced
++ // paks to prevent downloading of arbitrary files.
++ Cmd_TokenizeString(referencedPaks);
++ numRefPaks = Cmd_Argc();
++
++ for (curindex = 0; curindex < numRefPaks; curindex++) {
++ if (!FS_FilenameCompare(Cmd_Argv(curindex), pakbuf)) {
++ unreferenced = 0;
++
++ // now that we know the file is referenced,
++ // check whether it's legal to download it.
++ missionPack = FS_idPak(pakbuf, "missionpack");
++ idPack = missionPack || FS_idPak(pakbuf, BASEGAME);
++
++ break;
++ }
++ }
++ }
++ }
++
++ // We open the file here
++ if ( !sv_allowDownload->integer || idPack || unreferenced ||
+ ( cl->downloadSize = FS_SV_FOpenFileRead( cl->downloadName, &cl->download ) ) <= 0 ) {
+ // cannot auto-download file
+- if (idPack) {
++ if (unreferenced) {
++ Com_sprintf(errorMessage, sizeof(errorMessage), "File \"%s\" is not referenced and cannot be downloaded.", cl->downloadName);
++ } else if (idPack) {
+ Com_Printf("clientDownload: %d : \"%s\" cannot download id pk3 files\n", cl - svs.clients, cl->downloadName);
+ if (missionPack) {
+ Com_sprintf(errorMessage, sizeof(errorMessage), "Cannot autodownload Team Arena file \"%s\"\n"
+- "The Team Arena mission pack can be found in your local game store.", cl->downloadName);
++ "The Team Arena mission pack can be found in your local game store.", cl->downloadName);
+ }
+ else {
+ Com_sprintf(errorMessage, sizeof(errorMessage), "Cannot autodownload id pk3 file \"%s\"", cl->downloadName);
+@@ -808,7 +838,9 @@
+ *cl->downloadName = 0;
+ return;
+ }
+-
++
++ Com_Printf( "clientDownload: %d : beginning \"%s\"\n", cl - svs.clients, cl->downloadName );
++
+ // Init
+ cl->downloadCurrentBlock = cl->downloadClientBlock = cl->downloadXmitBlock = 0;
+ cl->downloadCount = 0;
diff --git a/games/quake3/files/patch-code-ui-ui_main.c b/games/quake3/files/patch-code-ui-ui_main.c
new file mode 100644
index 000000000000..c480b68fd78a
--- /dev/null
+++ b/games/quake3/files/patch-code-ui-ui_main.c
@@ -0,0 +1,11 @@
+--- ./code/ui/ui_main.c.orig Wed May 31 18:55:11 2006
++++ ./code/ui/ui_main.c Wed May 31 19:10:12 2006
+@@ -4988,7 +4988,7 @@
+ {
+ filelen = strlen(fileptr);
+
+- COM_StripExtension(fileptr,skinname);
++ COM_StripExtension(fileptr, skinname, sizeof(skinname));
+
+ // look for icon_????
+ if (Q_stricmpn(skinname, "icon_", 5) == 0 && !(Q_stricmp(skinname,"icon_blue") == 0 || Q_stricmp(skinname,"icon_red") == 0))
diff --git a/games/quake3/files/patch-code-ui-ui_players.c b/games/quake3/files/patch-code-ui-ui_players.c
new file mode 100644
index 000000000000..d1be1bf702c3
--- /dev/null
+++ b/games/quake3/files/patch-code-ui-ui_players.c
@@ -0,0 +1,18 @@
+--- ./code/ui/ui_players.c.orig Wed May 31 18:55:11 2006
++++ ./code/ui/ui_players.c Wed May 31 19:10:27 2006
+@@ -90,13 +90,13 @@
+
+ if ( weaponNum == WP_MACHINEGUN || weaponNum == WP_GAUNTLET || weaponNum == WP_BFG ) {
+ strcpy( path, item->world_model[0] );
+- COM_StripExtension( path, path );
++ COM_StripExtension( path, path, sizeof(path) );
+ strcat( path, "_barrel.md3" );
+ pi->barrelModel = trap_R_RegisterModel( path );
+ }
+
+ strcpy( path, item->world_model[0] );
+- COM_StripExtension( path, path );
++ COM_StripExtension( path, path, sizeof(path) );
+ strcat( path, "_flash.md3" );
+ pi->flashModel = trap_R_RegisterModel( path );
+
diff --git a/games/quake3/files/patch-code-unix-Makefile b/games/quake3/files/patch-code-unix-Makefile
index 9b6a16757899..6d2d8b31dc2c 100644
--- a/games/quake3/files/patch-code-unix-Makefile
+++ b/games/quake3/files/patch-code-unix-Makefile
@@ -1,5 +1,5 @@
---- code/unix/Makefile.orig Thu May 25 16:59:37 2006
-+++ code/unix/Makefile Thu May 25 17:04:46 2006
+--- ./code/unix/Makefile.orig Wed May 31 18:55:11 2006
++++ ./code/unix/Makefile Wed May 31 18:55:13 2006
@@ -19,6 +19,7 @@
PLATFORM=$(shell uname|tr A-Z a-z)
@@ -67,8 +67,14 @@
GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
ifeq ($(ARCH),axp)
-@@ -199,31 +200,27 @@
+@@ -197,33 +198,35 @@
+ ifeq ($(PLATFORM),freebsd)
+
++ifeq ($(ARCH),powerpc)
++ARCH=ppc
++endif
++
GLIBC= #libc is irrelevant
-ifneq (,$(findstring alpha,$(shell uname -m)))
@@ -108,7 +114,9 @@
-CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi )
-RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -pipe -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing - fstrength-reduce
+ifneq ($(ARCH),i386)
++ ifneq ($(ARCH),ppc)
+DLL_ONLY=true
++ endif
+endif
+
+ifeq ($(DLL_ONLY),true)
@@ -116,7 +124,7 @@
endif
LIBEXT=a
-@@ -235,25 +232,37 @@
+@@ -235,25 +238,37 @@
ARFLAGS=ar rv
RANLIB=ranlib
@@ -169,7 +177,7 @@
endif
else # ifeq freebsd
-@@ -283,7 +292,7 @@
+@@ -283,7 +298,7 @@
ARFLAGS=ar rv
RANLIB=ranlib
@@ -178,7 +186,7 @@
GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
TARGETS=$(B)/sgiquake3 \
-@@ -310,9 +319,9 @@
+@@ -310,9 +325,9 @@
RANLIB=ranlib
ifeq ($(PLATFORM),freebsd)
@@ -190,7 +198,7 @@
endif # ifeq freebsd
TARGETS=\
-@@ -348,7 +357,7 @@
+@@ -348,7 +363,7 @@
$(MAKE) targets B=$(BR) CFLAGS="$(RELEASE_CFLAGS)"
#Build both debug and release builds
@@ -199,7 +207,7 @@
targets:makedirs $(TARGETS)
-@@ -516,20 +525,6 @@
+@@ -516,20 +531,6 @@
$(B)/client/unix_net.o \
$(B)/client/unix_shared.o \
\
@@ -220,7 +228,7 @@
# $(B)/client/q_parse.o \
# $(B)/client/math_quaternion.o \
# $(B)/client/util_str.o \
-@@ -541,7 +536,9 @@
+@@ -541,7 +542,9 @@
# $(B)/client/q_shared.o \
ifeq ($(ARCH),i386)
@@ -231,12 +239,15 @@
endif
ifeq ($(ARCH),ppc)
-@@ -559,10 +556,24 @@
+@@ -559,10 +562,24 @@
$(B)/client/linux_qgl.o \
$(B)/client/linux_glimp.o \
$(B)/client/linux_snd.o \
+ $(B)/client/linux_signals.o \
-+ $(B)/client/snd_mixa.o \
+ $(B)/client/snd_mixa.o \
+- $(B)/client/matha.o \
+- $(B)/client/ftol.o \
+- $(B)/client/snapvector.o
+ $(B)/client/matha.o
+
+ Q3POBJ_SMP=\
@@ -245,10 +256,7 @@
+ $(B)/client/linux_glimp_smp.o \
+ $(B)/client/linux_snd.o \
+ $(B)/client/linux_signals.o \
- $(B)/client/snd_mixa.o \
-- $(B)/client/matha.o \
-- $(B)/client/ftol.o \
-- $(B)/client/snapvector.o
++ $(B)/client/snd_mixa.o \
+ $(B)/client/matha.o
+
+ ifeq ($(ARCH),i386)
@@ -259,7 +267,7 @@
else
ifeq ($(PLATFORM),irix)
Q3POBJ=\
-@@ -578,7 +589,6 @@
+@@ -578,7 +595,6 @@
$(B)/client/linux_common.o \
$(B)/client/linux_qgl.o \
$(B)/client/linux_glimp.o \
@@ -267,7 +275,7 @@
$(B)/client/linux_snd.o \
$(B)/client/snd_mixa.o \
$(B)/client/matha.o \
-@@ -587,7 +597,6 @@
+@@ -587,7 +603,6 @@
$(B)/client/linux_common.o \
$(B)/client/linux_qgl.o \
$(B)/client/linux_glimp_smp.o \
@@ -275,7 +283,7 @@
$(B)/client/linux_snd.o \
$(B)/client/snd_mixa.o \
$(B)/client/matha.o
-@@ -602,12 +611,12 @@
+@@ -602,12 +617,12 @@
endif #FreeBSD
endif #IRIX
@@ -290,7 +298,7 @@
$(CC) -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(GLLDFLAGS) \
$(THREAD_LDFLAGS) $(LDFLAGS)
-@@ -754,10 +763,10 @@
+@@ -754,10 +769,10 @@
$(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC)
$(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) $(GL_CFLAGS)
$(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC) $(GL_CFLAGS)
@@ -302,7 +310,7 @@
$(B)/client/snd_mixa.o : $(UDIR)/snd_mixa.s; $(DO_AS)
$(B)/client/matha.o : $(UDIR)/matha.s; $(DO_AS)
-@@ -912,13 +921,17 @@
+@@ -912,13 +927,17 @@
$(B)/ded/unix_main.o \
$(B)/ded/unix_net.o \
$(B)/ded/unix_shared.o \
@@ -321,7 +329,7 @@
endif
ifeq ($(ARCH),ppc)
-@@ -927,7 +940,7 @@
+@@ -927,7 +946,7 @@
endif
endif
@@ -330,7 +338,7 @@
$(CC) -o $@ $(Q3DOBJ) $(LDFLAGS)
$(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC)
-@@ -988,6 +1001,7 @@
+@@ -988,6 +1007,7 @@
$(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC)
$(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC)
$(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC)
@@ -338,7 +346,7 @@
$(B)/ded/null_client.o : $(NDIR)/null_client.c; $(DO_DED_CC)
$(B)/ded/null_input.o : $(NDIR)/null_input.c; $(DO_DED_CC)
$(B)/ded/null_snddma.o : $(NDIR)/null_snddma.c; $(DO_DED_CC)
-@@ -1068,7 +1082,7 @@
+@@ -1068,7 +1088,7 @@
$(B)/baseq3/cgame/q_math.o \
$(B)/baseq3/cgame/q_shared.o
@@ -347,7 +355,7 @@
$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
$(B)/baseq3/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC)
-@@ -1128,7 +1142,7 @@
+@@ -1128,7 +1148,7 @@
$(B)/missionpack/cgame/q_shared.o \
$(B)/missionpack/cgame/ui_shared.o
@@ -356,7 +364,7 @@
$(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
$(B)/missionpack/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) -DMISSIONPACK
-@@ -1200,7 +1214,7 @@
+@@ -1200,7 +1220,7 @@
$(B)/baseq3/game/q_math.o \
$(B)/baseq3/game/q_shared.o
@@ -365,7 +373,7 @@
$(CC) $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
$(B)/baseq3/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC)
-@@ -1278,7 +1292,7 @@
+@@ -1278,7 +1298,7 @@
$(B)/missionpack/game/q_math.o \
$(B)/missionpack/game/q_shared.o
@@ -374,7 +382,7 @@
$(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
$(B)/missionpack/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC) -DMISSIONPACK
-@@ -1367,7 +1381,7 @@
+@@ -1367,7 +1387,7 @@
$(B)/baseq3/ui/q_math.o \
$(B)/baseq3/ui/q_shared.o
@@ -383,7 +391,7 @@
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
$(B)/baseq3/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC)
-@@ -1410,7 +1424,7 @@
+@@ -1410,7 +1430,7 @@
$(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC)
$(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC)
$(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC)
@@ -392,7 +400,7 @@
$(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC)
# bk001205 - these wre the only SHLIB compiles in 1.17
-@@ -1450,7 +1464,7 @@
+@@ -1450,7 +1470,7 @@
# $(B)/missionpack/ui/q_math.o \
# $(B)/missionpack/ui/q_shared.o
@@ -401,7 +409,7 @@
$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
$(B)/missionpack/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_SHLIB_CC) -DMISSIONPACK
-@@ -1613,23 +1627,8 @@
+@@ -1613,23 +1633,8 @@
$(B)/q3static/unix_net.o \
$(B)/q3static/unix_shared.o \
\
@@ -425,7 +433,7 @@
$(B)/q3static/linux_snd.o \
$(B)/q3static/snd_mixa.o \
$(B)/q3static/matha.o
-@@ -1779,7 +1778,6 @@
+@@ -1779,7 +1784,6 @@
$(B)/q3static/unix_net.o : $(UDIR)/unix_net.c; $(DO_CC) -DQ3_STATIC
$(B)/q3static/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_CC) -DQ3_STATIC
$(B)/q3static/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) -DQ3_STATIC
@@ -433,7 +441,7 @@
$(B)/q3static/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) -DQ3_STATIC
$(B)/q3static/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) -DQ3_STATIC
$(B)/q3static/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -DQ3_STATIC
-@@ -2020,7 +2018,7 @@
+@@ -2020,7 +2024,7 @@
@@ -442,7 +450,7 @@
$(CC) $(CFLAGS) -o $@ $(Q3SOBJ) $(GLLDFLAGS) $(LDFLAGS)
-@@ -2059,9 +2057,9 @@
+@@ -2059,9 +2063,9 @@
copyfiles:
-mkdirhier $(COPYDIR)
diff --git a/games/quake3/files/patch-code-unix-linux_common.c b/games/quake3/files/patch-code-unix-linux_common.c
deleted file mode 100644
index a03c4f64ece7..000000000000
--- a/games/quake3/files/patch-code-unix-linux_common.c
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -ruN ./code/unix/linux_common.c ../quake3-1.32b-BUILT/./code/unix/linux_common.c
---- ./code/unix/linux_common.c Tue Aug 16 02:10:07 2005
-+++ ../quake3-1.32b-BUILT/./code/unix/linux_common.c Tue Aug 23 13:38:35 2005
-@@ -33,6 +33,7 @@
- #include <unistd.h> // AH - for size_t
- #include <string.h>
-
-+
- // bk001207 - we need something under Linux, too. Mac?
- #if 1 // defined(C_ONLY) // bk010102 - dedicated?
- void Com_Memcpy (void* dest, const void* src, const size_t count) {
-@@ -340,5 +341,6 @@
- break;
- }
- }
-+
-
- #endif
diff --git a/games/quake3/files/patch-code-unix-linux_glimp.c b/games/quake3/files/patch-code-unix-linux_glimp.c
deleted file mode 100644
index e4c4654000b4..000000000000
--- a/games/quake3/files/patch-code-unix-linux_glimp.c
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ruN ./code/unix/linux_glimp.c ../quake3-1.32b-BUILT/./code/unix/linux_glimp.c
---- ./code/unix/linux_glimp.c Tue Aug 16 02:10:07 2005
-+++ ../quake3-1.32b-BUILT/./code/unix/linux_glimp.c Mon Aug 22 22:11:16 2005
-@@ -1774,7 +1774,5 @@
- // bk010216 - added stubs for non-Linux UNIXes here
- // FIXME - use NO_JOYSTICK or something else generic
-
--#if defined( __FreeBSD__ ) // rb010123
- void IN_StartupJoystick( void ) {}
- void IN_JoyMove( void ) {}
--#endif
diff --git a/games/quake3/files/patch-code-unix-unix_main.c b/games/quake3/files/patch-code-unix-unix_main.c
index 093aff871d16..4ffa7d4132d5 100644
--- a/games/quake3/files/patch-code-unix-unix_main.c
+++ b/games/quake3/files/patch-code-unix-unix_main.c
@@ -1,5 +1,5 @@
---- code/unix/unix_main.c.orig Thu May 25 16:59:37 2006
-+++ code/unix/unix_main.c Thu May 25 17:00:58 2006
+--- ./code/unix/unix_main.c.orig Wed May 31 18:55:12 2006
++++ ./code/unix/unix_main.c Wed May 31 18:55:13 2006
@@ -707,12 +707,12 @@
{
void *libHandle;
diff --git a/games/quake3/files/patch-code-unix-unix_shared.c b/games/quake3/files/patch-code-unix-unix_shared.c
index e30407e90ca2..e49922a8ee1e 100644
--- a/games/quake3/files/patch-code-unix-unix_shared.c
+++ b/games/quake3/files/patch-code-unix-unix_shared.c
@@ -1,5 +1,5 @@
---- code/unix/unix_shared.c.orig Thu May 25 14:38:44 2006
-+++ code/unix/unix_shared.c Thu May 25 14:41:26 2006
+--- ./code/unix/unix_shared.c.orig Wed May 31 18:55:12 2006
++++ ./code/unix/unix_shared.c Wed May 31 18:55:13 2006
@@ -38,7 +38,7 @@
static char cdPath[MAX_OSPATH];