git: c5e900b61362 - main - games/quake3: Remove expired port

From: Muhammad Moinur Rahman <bofh_at_FreeBSD.org>
Date: Sun, 31 Dec 2023 00:08:07 UTC
The branch main has been updated by bofh:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c5e900b613623469d2a95bba6a6919b21e7d5dce

commit c5e900b613623469d2a95bba6a6919b21e7d5dce
Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
AuthorDate: 2023-12-29 22:49:29 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2023-12-31 00:06:24 +0000

    games/quake3: Remove expired port
    
    2023-12-31 games/quake3: BROKEN for more than 4 years on all supported versions after the EOL of 12
---
 MOVED                                              |   1 +
 games/Makefile                                     |   1 -
 games/quake3/Makefile                              | 121 ------
 games/quake3/distinfo                              |   2 -
 games/quake3/files/patch-code-Construct            |  11 -
 .../quake3/files/patch-code-botlib-linux-i386.mak  |  11 -
 games/quake3/files/patch-code-bspc-Makefile        |  11 -
 games/quake3/files/patch-code-bspc-linux-i386.mak  |  11 -
 games/quake3/files/patch-code-cgame-cg_weapons.c   |  23 -
 games/quake3/files/patch-code-client-cl_ui.c       |  11 -
 games/quake3/files/patch-code-game-q_shared.c      | 126 ------
 games/quake3/files/patch-code-game-q_shared.h      | 142 ------
 .../quake3/files/patch-code-q3_ui-ui_playermodel.c |  11 -
 games/quake3/files/patch-code-q3_ui-ui_players.c   |  18 -
 .../quake3/files/patch-code-q3_ui-ui_saveconfig.c  |  11 -
 games/quake3/files/patch-code-qcommon-common.c     |  28 --
 games/quake3/files/patch-code-qcommon-files.c      |  35 --
 games/quake3/files/patch-code-qcommon-vm.c         |  20 -
 games/quake3/files/patch-code-qcommon-vm_x86.c     |  11 -
 games/quake3/files/patch-code-renderer-tr_bsp.c    |  11 -
 games/quake3/files/patch-code-renderer-tr_shader.c |  29 --
 games/quake3/files/patch-code-server-sv_client.c   |  80 ----
 games/quake3/files/patch-code-ui-ui_main.c         |  11 -
 games/quake3/files/patch-code-ui-ui_players.c      |  18 -
 games/quake3/files/patch-code-unix-Makefile        | 477 ---------------------
 games/quake3/files/patch-code-unix-unix_main.c     |  58 ---
 games/quake3/files/patch-code-unix-unix_shared.c   |  49 ---
 games/quake3/pkg-descr                             |  13 -
 games/quake3/pkg-plist                             |   9 -
 29 files changed, 1 insertion(+), 1359 deletions(-)

diff --git a/MOVED b/MOVED
index 1c5529149562..536df3105025 100644
--- a/MOVED
+++ b/MOVED
@@ -8236,3 +8236,4 @@ dns/updatedd||2023-12-31|Has expired: Last release in 2006 and upstream is dead.
 multimedia/ppm2fli||2023-12-31|Has expired: BROKEN on all supported versions after the EOL of 12
 www/drupal9||2023-12-31|Has expired: Upstream EOL reaches on 2023-11-01
 net/asterisk16|asterisk18|2023-12-31|Has expired: Upstream EOL reaches on 2023-10-09
+games/quake3||2023-12-31|Has expired: BROKEN for more than 4 years on all supported versions after the EOL of 12
diff --git a/games/Makefile b/games/Makefile
index a253996fa0d0..0e0e20fee09f 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -829,7 +829,6 @@
     SUBDIR += quake2-xatrix
     SUBDIR += quake2lnx
     SUBDIR += quake2max
-    SUBDIR += quake3
     SUBDIR += quake3-data
     SUBDIR += quake3-excessive
     SUBDIR += quake3-osp
diff --git a/games/quake3/Makefile b/games/quake3/Makefile
deleted file mode 100644
index 3ea1aa7195fc..000000000000
--- a/games/quake3/Makefile
+++ /dev/null
@@ -1,121 +0,0 @@
-PORTNAME=	quake3
-PORTVERSION=	1.32c
-PORTREVISION=	6
-CATEGORIES=	games
-MASTER_SITES=	ftp://mancubus.net/pub/idgames/idstuff/source/ \
-		http://ftp.mancubus.net/pub/idgames/idstuff/source/ \
-		http://www.gamers.org/pub/idgames/idstuff/source/ \
-		IDSOFTWARE/source/
-DISTNAME=	${PORTNAME}-${REALVERSION}-source
-
-MAINTAINER=	shirshegsm@gmail.com
-COMMENT=	Quake III Arena -- first person shooter (native build)
-WWW=		http://www.idsoftware.com/games/quake/quake3-arena/
-
-DEPRECATED=	BROKEN for more than 4 years on all supported versions after the EOL of 12
-EXPIRATION_DATE=	2023-12-31
-BROKEN_FreeBSD_13=	ld: error: duplicate symbol: re
-BROKEN_FreeBSD_14=	ld: error: duplicate symbol: re
-
-USES=		dos2unix gmake zip
-ONLY_FOR_ARCHS=	i386
-ONLY_FOR_ARCHS_REASON=	does not run properly; try games/ioquake3
-WRKSRC=		${WRKDIR}/${PORTNAME}-${REALVERSION}
-BUILD_WRKSRC=	${WRKSRC}/code/unix
-MAKE_JOBS_UNSAFE=	yes
-
-OPTIONS_DEFINE=	GAMELIBS OPTIMIZED_CFLAGS
-OPTIONS_MULTI=	FLAVOR
-OPTIONS_MULTI_FLAVOR=	CLIENT DEDICATED THREADS
-FLAVOR_DESC=	Executable Selection
-CLIENT_DESC=	Build client
-DEDICATED_DESC=	Build dedicated server
-GAMELIBS_DESC=	Build game libraries (when not mandatory)
-
-OPTIONS_DEFAULT=	CLIENT DEDICATED OPTIMIZED_CFLAGS THREADS
-
-MAKE_ENV=	LIBDIR="${LIBDIR}"
-PLIST_SUB=	LIBDIR="${LIBDIR:S/${PREFIX}\///}"
-
-LIBDIR=		${PREFIX}/lib/${PORTNAME}
-REALVERSION=	1.32b
-VM_ARCHS=	i386 powerpc
-
-.include <bsd.port.options.mk>
-
-.if ${ARCH} == "i386"
-BUILD_DEPENDS+=	nasm:devel/nasm
-.endif
-
-.for i in ${ARCH}
-.   if ${VM_ARCHS:M${i}} != ""
-HAVE_VM_COMPILED=	yes
-.   endif
-.endfor
-
-.if !defined(HAVE_VM_COMPILED)
-MAKE_ENV+=	DLL_ONLY=true
-.endif
-
-.if ${PORT_OPTIONS:MCLIENT} || ${PORT_OPTIONS:MTHREADS}
-USES+=		gl xorg
-USE_GL=		glu
-USE_XORG=	xxf86dga xxf86vm
-.endif
-
-.if ${PORT_OPTIONS:MCLIENT}
-MAKE_ENV+=	CLIENT=YES
-PLIST_SUB+=	CLIENT=""
-Q3BIN+=		quake3
-.else
-PLIST_SUB+=	CLIENT="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MDEDICATED}
-MAKE_ENV+=	DEDICATED=YES
-PLIST_SUB+=	DEDICATED=""
-Q3BIN+=		q3ded
-.else
-PLIST_SUB+=	DEDICATED="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED)
-MAKE_ENV+=	GAMELIBS=YES
-PLIST_SUB+=	GAMELIBS=""
-.else
-PLIST_SUB+=	GAMELIBS="@comment "
-.endif
-
-.if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS}
-MAKE_ENV+=	OPTIMIZED_CFLAGS=YES
-.endif
-
-.if ${PORT_OPTIONS:MTHREADS}
-MAKE_ENV+=	SMP=YES
-PLIST_SUB+=	SMP=""
-Q3BIN+=		quake3-smp
-.else
-PLIST_SUB+=	SMP="@comment "
-.endif
-
-post-patch:
-	@${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \
-		${WRKSRC}/code/botlib/be_interface.c
-	@${REINPLACE_CMD} -e \
-		's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \
-		${WRKSRC}/code/botlib/be_interface.c \
-		${WRKSRC}/code/renderer/tr_init.c
-
-do-install:
-.for bin in ${Q3BIN}
-	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${STAGEDIR}${PREFIX}/bin
-.endfor
-.if ${PORT_OPTIONS:MGAMELIBS} || !defined(HAVE_VM_COMPILED)
-.for dir in baseq3 missionpack
-	${MKDIR} ${STAGEDIR}${LIBDIR}/${dir}
-	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${STAGEDIR}${LIBDIR}/${dir}
-.endfor
-.endif
-
-.include "${.CURDIR}/../quake3-data/Makefile.include"
-.include <bsd.port.mk>
diff --git a/games/quake3/distinfo b/games/quake3/distinfo
deleted file mode 100644
index 303ede22ede0..000000000000
--- a/games/quake3/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (quake3-1.32b-source.zip) = 74d42070eea4c7ce47955d831327e70f480c493172b485bf7dd1a58838e92fab
-SIZE (quake3-1.32b-source.zip) = 5724791
diff --git a/games/quake3/files/patch-code-Construct b/games/quake3/files/patch-code-Construct
deleted file mode 100644
index dc06efb802d4..000000000000
--- a/games/quake3/files/patch-code-Construct
+++ /dev/null
@@ -1,11 +0,0 @@
---- code/Construct.orig	2013-10-18 02:05:36.000000000 +0300
-+++ code/Construct	2013-10-18 02:05:53.000000000 +0300
-@@ -237,7 +237,7 @@
- }
- else
- {
--  $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O6 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce ';
-+  $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O2 -mcpu=pentiumpro -march=pentium -fomit-frame-pointer -ffast-math -malign-loops=2 -malign-jumps=2 -malign-functions=2 -fno-strict-aliasing -fstrength-reduce ';
- 	$BSPC_BASE_CFLAGS = $BASE_CFLAGS . '-DLINUX -DBSPC -Dstricmp=strcasecmp ';
- }
- 
diff --git a/games/quake3/files/patch-code-botlib-linux-i386.mak b/games/quake3/files/patch-code-botlib-linux-i386.mak
deleted file mode 100644
index c4bf258b38aa..000000000000
--- a/games/quake3/files/patch-code-botlib-linux-i386.mak
+++ /dev/null
@@ -1,11 +0,0 @@
---- code/botlib/linux-i386.mak.orig	2013-10-18 02:02:20.000000000 +0300
-+++ code/botlib/linux-i386.mak	2013-10-18 02:02:35.000000000 +0300
-@@ -8,7 +8,7 @@
- BASE_CFLAGS=-Dstricmp=strcasecmp
- 
- #use these cflags to optimize it
--CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
-+CFLAGS=$(BASE_CFLAGS) -m486 -O2 -ffast-math -funroll-loops \
- 	-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
- 	-malign-jumps=2 -malign-functions=2
- #use these when debugging 
diff --git a/games/quake3/files/patch-code-bspc-Makefile b/games/quake3/files/patch-code-bspc-Makefile
deleted file mode 100644
index f3944ebdbe65..000000000000
--- a/games/quake3/files/patch-code-bspc-Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
---- code/bspc/Makefile.orig	2013-10-18 02:04:52.000000000 +0300
-+++ code/bspc/Makefile	2013-10-18 02:05:03.000000000 +0300
-@@ -12,7 +12,7 @@
- BASE_CFLAGS=-Dstricmp=strcasecmp
- 
- #use these cflags to optimize it
--CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
-+CFLAGS=$(BASE_CFLAGS) -m486 -O2 -ffast-math -funroll-loops \
- 	-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
- 	-malign-jumps=2 -malign-functions=2 -DLINUX -DBSPC
- #use these when debugging 
diff --git a/games/quake3/files/patch-code-bspc-linux-i386.mak b/games/quake3/files/patch-code-bspc-linux-i386.mak
deleted file mode 100644
index 1b0e21df708e..000000000000
--- a/games/quake3/files/patch-code-bspc-linux-i386.mak
+++ /dev/null
@@ -1,11 +0,0 @@
---- code/bspc/linux-i386.mak.orig	2013-10-18 02:04:04.000000000 +0300
-+++ code/bspc/linux-i386.mak	2013-10-18 02:04:18.000000000 +0300
-@@ -8,7 +8,7 @@
- BASE_CFLAGS=-Dstricmp=strcasecmp
- 
- #use these cflags to optimize it
--CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \
-+CFLAGS=$(BASE_CFLAGS) -m486 -O2 -ffast-math -funroll-loops \
- 	-fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \
- 	-malign-jumps=2 -malign-functions=2 -DLINUX -DBSPC
- #use these when debugging 
diff --git a/games/quake3/files/patch-code-cgame-cg_weapons.c b/games/quake3/files/patch-code-cgame-cg_weapons.c
deleted file mode 100644
index 4064c095e1d0..000000000000
--- a/games/quake3/files/patch-code-cgame-cg_weapons.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- ./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
deleted file mode 100644
index be618fb8922e..000000000000
--- a/games/quake3/files/patch-code-client-cl_ui.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./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));
- 	}
--	else if (v != UI_API_VERSION) {
-+	else if (v != 0 && v != UI_API_VERSION) {
- 		Com_Error( ERR_DROP, "User Interface is version %d, expected %d", v, UI_API_VERSION );
- 		cls.uiStarted = qfalse;
- 	}
diff --git a/games/quake3/files/patch-code-game-q_shared.c b/games/quake3/files/patch-code-game-q_shared.c
deleted file mode 100644
index 1047fa8aead0..000000000000
--- a/games/quake3/files/patch-code-game-q_shared.c
+++ /dev/null
@@ -1,126 +0,0 @@
---- ./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 @@
- 
- ============================================================================
- */
--/*
-+
- // can't just use function pointers, or dll linkage can
- // mess up when qcommon is included in multiple places
--static short	(*_BigShort) (short l);
--static short	(*_LittleShort) (short l);
--static int		(*_BigLong) (int l);
--static int		(*_LittleLong) (int l);
-+static int16_t	(*_BigShort) (int16_t l);
-+static int16_t	(*_LittleShort) (int16_t l);
-+static int32_t		(*_BigLong) (int32_t l);
-+static int32_t		(*_LittleLong) (int32_t l);
- static qint64	(*_BigLong64) (qint64 l);
- static qint64	(*_LittleLong64) (qint64 l);
- static float	(*_BigFloat) (const float *l);
- static float	(*_LittleFloat) (const float *l);
- 
--short	BigShort(short l){return _BigShort(l);}
--short	LittleShort(short l) {return _LittleShort(l);}
--int		BigLong (int l) {return _BigLong(l);}
--int		LittleLong (int l) {return _LittleLong(l);}
--qint64 	BigLong64 (qint64 l) {return _BigLong64(l);}
--qint64 	LittleLong64 (qint64 l) {return _LittleLong64(l);}
--float	BigFloat (const float *l) {return _BigFloat(l);}
--float	LittleFloat (const float *l) {return _LittleFloat(l);}
--*/
-+int16_t	BigShort(int16_t l){return _BigShort(l);}
-+int16_t	LittleShort(int16_t l) {return _LittleShort(l);}
-+int32_t	BigLong (int32_t l) {return _BigLong(l);}
-+int32_t	LittleLong (int32_t l) {return _LittleLong(l);}
-+qint64	BigLong64 (qint64 l) {return _BigLong64(l);}
-+qint64	LittleLong64 (qint64 l) {return _LittleLong64(l);}
-+float	BigFloat (float l) {return _BigFloat(&l);}
-+float	LittleFloat (float l) {return _LittleFloat(&l);}
- 
--short   ShortSwap (short l)
-+
-+int16_t	ShortSwap (int16_t l)
- {
- 	byte    b1,b2;
- 
-@@ -131,12 +138,12 @@
- 	return (b1<<8) + b2;
- }
- 
--short	ShortNoSwap (short l)
-+int16_t	ShortNoSwap (int16_t l)
- {
- 	return l;
- }
- 
--int    LongSwap (int l)
-+int32_t	LongSwap (int32_t l)
- {
- 	byte    b1,b2,b3,b4;
- 
-@@ -145,15 +152,15 @@
- 	b3 = (l>>16)&255;
- 	b4 = (l>>24)&255;
- 
--	return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
-+	return ((int32_t)b1<<24) + ((int32_t)b2<<16) + ((int32_t)b3<<8) + b4;
- }
- 
--int	LongNoSwap (int l)
-+int32_t	LongNoSwap (int32_t l)
- {
- 	return l;
- }
- 
--qint64 Long64Swap (qint64 ll)
-+qint64	Long64Swap (qint64 ll)
- {
- 	qint64	result;
- 
-@@ -199,7 +206,7 @@
- Swap_Init
- ================
- */
--/*
-+
- void Swap_Init (void)
- {
- 	byte	swaptest[2] = {1,0};
-@@ -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
deleted file mode 100644
index 6b614d628405..000000000000
--- a/games/quake3/files/patch-code-game-q_shared.h
+++ /dev/null
@@ -1,142 +0,0 @@
---- ./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 
- 
-+#if 0
- static ID_INLINE short BigShort( short l) { return ShortSwap(l); }
- #define LittleShort
- static ID_INLINE int BigLong(int l) { LongSwap(l); }
- #define LittleLong
- static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); }
- #define LittleFloat
-+#endif
- 
- #define	PATH_SEP '\\'
- 
-@@ -206,12 +208,14 @@
-     return fi;
- }
- 
-+#if 0
- #define BigShort
- static inline short LittleShort(short l) { return ShortSwap(l); }
- #define BigLong
- static inline int LittleLong (int l) { return LongSwap(l); }
- #define BigFloat
- static inline float LittleFloat (const float l) { return FloatSwap(&l); }
-+#endif
- 
- #endif
- 
-@@ -229,12 +233,14 @@
- 
- void Sys_PumpEvents( void );
- 
-+#if 0
- #define BigShort
- static inline short LittleShort(short l) { return ShortSwap(l); }
- #define BigLong
- static inline int LittleLong (int l) { return LongSwap(l); }
- #define BigFloat
- static inline float LittleFloat (const float l) { return FloatSwap(&l); }
-+#endif
- 
- #endif
- 
-@@ -268,6 +274,7 @@
- #define	BOTLIB_HARD_LINKED
- #endif
- 
-+#if 0
- #if !idppc
- inline static short BigShort( short l) { return ShortSwap(l); }
- #define LittleShort
-@@ -283,6 +290,7 @@
- #define BigFloat
- inline static float LittleFloat (const float *l) { return FloatSwap(l); }
- #endif
-+#endif
- 
- #endif
- 
-@@ -302,10 +310,18 @@
- #define CPUSTRING       "freebsd-other"
- #endif
- 
-+#include <machine/param.h>
-+#if __FreeBSD_version < 500000
-+#include <inttypes.h>
-+#else
-+#include <stdint.h>
-+#endif
-+
- #define	PATH_SEP '/'
- 
- // bk010116 - omitted Q3STATIC (see Linux above), broken target
- 
-+#if 0
- #if !idppc
- static short BigShort( short l) { return ShortSwap(l); }
- #define LittleShort
-@@ -321,6 +337,7 @@
- #define BigFloat
- static float LittleFloat (const float *l) { return FloatSwap(l); }
- #endif
-+#endif
- 
- #endif
- 
-@@ -452,13 +469,9 @@
- void *Hunk_Alloc( int size, ha_pref preference );
- #endif
- 
--#ifdef __linux__
- // https://zerowing.idsoftware.com/bugzilla/show_bug.cgi?id=371
- // custom Snd_Memset implementation for glibc memset bug workaround
- void Snd_Memset (void* dest, const int val, const size_t count);
--#else
--#define Snd_Memset Com_Memset
--#endif
- 
- #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;
- 
- //=============================================
--/*
--short	BigShort(short l);
--short	LittleShort(short l);
--int		BigLong (int l);
--int		LittleLong (int l);
--qint64  BigLong64 (qint64 l);
--qint64  LittleLong64 (qint64 l);
--float	BigFloat (const float *l);
--float	LittleFloat (const float *l);
-+
-+int16_t	BigShort(int16_t l);
-+int16_t	LittleShort(int16_t l);
-+int32_t	BigLong (int32_t l);
-+int32_t	LittleLong (int32_t l);
-+qint64		BigLong64 (qint64 l);
-+qint64		LittleLong64 (qint64 l);
-+float	BigFloat (float l);
-+float	LittleFloat (float l);
- 
- void	Swap_Init (void);
--*/
-+
- char	* QDECL va(char *format, ...);
- 
- //=============================================
diff --git a/games/quake3/files/patch-code-q3_ui-ui_playermodel.c b/games/quake3/files/patch-code-q3_ui-ui_playermodel.c
deleted file mode 100644
index de2905949fdf..000000000000
--- a/games/quake3/files/patch-code-q3_ui-ui_playermodel.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./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
deleted file mode 100644
index 1bd082902c13..000000000000
--- a/games/quake3/files/patch-code-q3_ui-ui_players.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- ./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
deleted file mode 100644
index b02d32f04f5c..000000000000
--- a/games/quake3/files/patch-code-q3_ui-ui_saveconfig.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./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
deleted file mode 100644
index ee3d83c93876..000000000000
--- a/games/quake3/files/patch-code-qcommon-common.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- ./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 <netinet/in.h>
--#else
--#if defined(MACOS_X)
-+#include <sys/types.h>
- #include <netinet/in.h>
--#else
--#include <winsock.h>
--#endif
--#endif
- 
- 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
deleted file mode 100644
index 43a683782977..000000000000
--- a/games/quake3/files/patch-code-qcommon-files.c
+++ /dev/null
@@ -1,35 +0,0 @@
---- code/qcommon/files.c.orig	Fri Jan 26 19:58:26 2007
-+++ code/qcommon/files.c	Fri Jan 26 20:07:18 2007
-@@ -2503,7 +2503,7 @@
- 		sorted[i] = pakfiles[i];
- 	}
- 
--	qsort( sorted, numfiles, 4, paksort );
-+	qsort( sorted, numfiles, sizeof(sorted[0]), paksort );
- 
- 	for ( i = 0 ; i < numfiles ; i++ ) {
- 		pakfile = FS_BuildOSPath( path, dir, sorted[i] );
-@@ -2763,6 +2763,7 @@
- 	if (fs_basepath->string[0]) {
- 		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)) {
-@@ -2777,6 +2778,7 @@
- 		if (fs_basepath->string[0]) {
- 			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);
- 		}
-@@ -2790,6 +2792,7 @@
- 		if (fs_basepath->string[0]) {
- 			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/quake3/files/patch-code-qcommon-vm.c b/games/quake3/files/patch-code-qcommon-vm.c
deleted file mode 100644
index c14ba68f4e92..000000000000
--- a/games/quake3/files/patch-code-qcommon-vm.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- ./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 @@
- 
- 
- 
--#ifdef oDLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
-+#ifdef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
- int	VM_CallCompiled( vm_t *vm, int *args ) {
-   return(0); 
- }
diff --git a/games/quake3/files/patch-code-qcommon-vm_x86.c b/games/quake3/files/patch-code-qcommon-vm_x86.c
deleted file mode 100644
index e333be546668..000000000000
--- a/games/quake3/files/patch-code-qcommon-vm_x86.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- code/qcommon/vm_x86.c.orig	2013-10-18 02:26:13.000000000 +0300
-+++ code/qcommon/vm_x86.c	2013-10-18 02:26:30.000000000 +0300
-@@ -84,7 +84,7 @@
- #endif // !_WIN32
- 
- 
--static	int		callMask = 0; // bk001213 - init
-+static	int __attribute__((used))		callMask = 0; // bk001213 - init
- 
- static	int	instruction, pass;
- static	int	lastConst = 0;
diff --git a/games/quake3/files/patch-code-renderer-tr_bsp.c b/games/quake3/files/patch-code-renderer-tr_bsp.c
deleted file mode 100644
index 15cd58695076..000000000000
--- a/games/quake3/files/patch-code-renderer-tr_bsp.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./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
deleted file mode 100644
index 5f1f308afe4f..000000000000
--- a/games/quake3/files/patch-code-renderer-tr_shader.c
+++ /dev/null
@@ -1,29 +0,0 @@
---- ./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
deleted file mode 100644
index e9f0c9662dfb..000000000000
--- a/games/quake3/files/patch-code-server-sv_client.c
+++ /dev/null
@@ -1,80 +0,0 @@
---- 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
deleted file mode 100644
index c480b68fd78a..000000000000
--- a/games/quake3/files/patch-code-ui-ui_main.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./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
deleted file mode 100644
index d1be1bf702c3..000000000000
--- a/games/quake3/files/patch-code-ui-ui_players.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- ./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
deleted file mode 100644
index 21f7925e16bd..000000000000
--- a/games/quake3/files/patch-code-unix-Makefile
+++ /dev/null
@@ -1,477 +0,0 @@
---- code/unix/Makefile.orig	2013-10-18 02:01:30.000000000 +0300
-+++ code/unix/Makefile	2013-10-18 02:07:18.000000000 +0300
-@@ -34,7 +34,7 @@
- 
- # Build name
- # BUILD_NAME=$(BUILD_NAME)
--BUILD_NAME=quake3.x86
-+BUILD_NAME=quake3
- 
- 
- 
-@@ -46,8 +46,8 @@
- 
- BASEQ3_DIR=$(BDIR)/baseq3
- 
--BD=debug$(ARCH)$(GLIBC)
--BR=release$(ARCH)$(GLIBC)
-+BD=debug
-+BR=release
- CDIR=$(MOUNT_DIR)/client
- SDIR=$(MOUNT_DIR)/server
- RDIR=$(MOUNT_DIR)/renderer
-@@ -76,7 +76,7 @@
- #############################################################################
- 
- ## Defaults
--DLL_ONLY=false
-+DLL_ONLY?=false
- # bk010215 - TODO - add all defaults / kill Ryan
- 
*** 600 LINES SKIPPED ***