View | Details | Raw Unified | Return to bug 97930
Collapse All | Expand All

(-)Makefile (-27 / +76 lines)
Lines 7-63 Link Here
7
7
8
PORTNAME=	quake3
8
PORTNAME=	quake3
9
PORTVERSION=	1.32b
9
PORTVERSION=	1.32b
10
PORTREVISION=	4
10
PORTREVISION=	5
11
CATEGORIES=	games
11
CATEGORIES=	games
12
MASTER_SITES=	${MASTER_SITE_IDSOFTWARE:S|$|source/|} \
12
MASTER_SITES=	http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \
13
		http://www.proarena.com/p/ftpx/x8524/quake_3_arena/ \
14
		http://www.planetgargoyle.com/ \
13
		http://www.planetgargoyle.com/ \
15
		http://www.teamdarkside.net/ \
14
		http://www.teamdarkside.net/ \
16
		http://0day.icculus.org/mirrors/quake3/ \
15
		http://0day.icculus.org/mirrors/quake3/ \
17
		http://www.olpainless.net/files/
16
		http://www.olpainless.net/files/ \
17
		${MASTER_SITE_IDSOFTWARE:S|$|source/|}
18
DISTFILES=	${DISTNAME}-source${EXTRACT_SUFX}
18
DISTFILES=	${DISTNAME}-source${EXTRACT_SUFX}
19
19
20
MAINTAINER=	shirshegsm@gmail.com
20
MAINTAINER=	shirshegsm@gmail.com
21
COMMENT=	Quake III Arena -- first person shooter (native build)
21
COMMENT=	Quake III Arena -- first person shooter (native build)
22
22
23
BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
24
25
USE_ZIP=	yes
23
USE_ZIP=	yes
26
USE_CRLF=	yes
24
USE_DOS2UNIX=	yes
27
USE_GMAKE=	yes
25
USE_GMAKE=	yes
28
USE_PERL5_BUILD=yes
29
USE_GL=		yes
30
USE_GCC=	3.2+
26
USE_GCC=	3.2+
27
BUILD_WRKSRC=	${WRKSRC}/code/unix
28
29
OPTIONS=	CLIENT "Build client" on \
30
		DEDICATED "Build dedicated server" on \
31
		GAMELIBS "Build game libraries (mandatory on !i386)" off \
32
		OPTIMIZED_CFLAGS "Enable compilation optimizations" on \
33
		SMP "Build SMP (threaded) client" on
34
35
MAKE_ENV=	LIBDIR="${LIBDIR}" DLL_ONLY=true
36
PLIST_SUB=	LIBDIR="${LIBDIR:S/${PREFIX}\///}"
31
37
32
PLIST_FILES=	bin/q3ded bin/quake3
38
LIBDIR=		${PREFIX}/lib/${PORTNAME}
33
39
34
.include <bsd.port.pre.mk>
40
.include <bsd.port.pre.mk>
35
41
36
# Anyone to play with this on !i386
42
.if defined(WITHOUT_CLIENT) && defined(WITHOUT_DEDICATED) \
37
.if ${ARCH} != "i386"
43
    && defined(WITHOUT_SMP)
38
BROKEN=		"Does not compile on !i386 (feel free to submit fixes)"
44
IGNORE=		needs at least one of CLIENT, DEDICATED and SMP options
39
.endif
45
.endif
40
46
41
.if ${PERL_LEVEL} < 500600
47
.if ${ARCH} == "i386"
42
BUILD_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/Digest/MD5.pm:${PORTSDIR}/security/p5-Digest-MD5
48
BUILD_DEPENDS=	nasm:${PORTSDIR}/devel/nasm
43
.endif
49
.endif
44
50
45
post-patch:
51
.if !defined(WITHOUT_CLIENT) && !defined(WITHOUT_SMP)
46
	@${REINPLACE_CMD} -e 's|%%Q3DIR%%|"${Q3DIR}"|' \
52
USE_GL=		yes
47
		${WRKSRC}/code/unix/unix_shared.c
53
.endif
48
	@${REINPLACE_CMD} -e 's|botlib.log|/dev/null|' ${WRKSRC}/code/botlib/be_interface.c
54
55
.if !defined(WITHOUT_CLIENT)
56
MAKE_ENV+=	CLIENT=YES
57
PLIST_SUB+=	CLIENT=""
58
Q3BIN+=		quake3
59
.else
60
PLIST_SUB+=	CLIENT="@comment "
61
.endif
62
63
.if !defined(WITHOUT_DEDICATED)
64
MAKE_ENV+=	DEDICATED=YES
65
PLIST_SUB+=	DEDICATED=""
66
Q3BIN+=		q3ded
67
.else
68
PLIST_SUB+=	DEDICATED="@comment "
69
.endif
70
71
.if defined(WITH_GAMELIBS) || ${ARCH} != "i386"
72
MAKE_ENV+=	GAMELIBS=YES
73
PLIST_SUB+=	GAMELIBS=""
74
.else
75
PLIST_SUB+=	GAMELIBS="@comment "
76
.endif
49
77
50
pre-build:
78
.if !defined(WITHOUT_OPTIMIZED_CFLAGS)
51
	${MKDIR} ${WRKSRC}/lcc/build
79
MAKE_ENV+=	OPTIMIZED_CFLAGS=YES
80
.endif
52
81
53
do-build:
82
.if !defined(WITHOUT_SMP)
54
	cd ${WRKSRC}/code && ${MAKE_ENV} ${PERL} unix/cons
83
MAKE_ENV+=	SMP=YES \
84
		PTHREAD_LIBS="${PTHREAD_LIBS}"
85
PLIST_SUB+=	SMP=""
86
Q3BIN+=		quake3-smp
87
.else
88
PLIST_SUB+=	SMP="@comment "
89
.endif
90
91
post-patch:
92
	@${REINPLACE_CMD} -e 's|botlib\.log|/dev/null|' \
93
		${WRKSRC}/code/botlib/be_interface.c
94
	@${REINPLACE_CMD} -e \
95
		's|//[[:blank:]]*\(Swap_Init[[:blank:]]*();\)|\1|' \
96
		${WRKSRC}/code/botlib/be_interface.c \
97
		${WRKSRC}/code/qcommon/common.c \
98
		${WRKSRC}/code/renderer/tr_init.c
55
99
56
do-install:
100
do-install:
57
	${INSTALL_PROGRAM} ${WRKSRC}/code/install/linuxq3ded \
101
.for bin in ${Q3BIN}
58
		${PREFIX}/bin/q3ded
102
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${bin} ${PREFIX}/bin
59
	${INSTALL_PROGRAM} ${WRKSRC}/code/install/linuxquake3 \
103
.endfor
60
		${PREFIX}/bin/quake3
104
.if defined(WITH_GAMELIBS) || ${ARCH} != "i386"
105
.for dir in baseq3 missionpack
106
	${MKDIR} ${LIBDIR}/${dir}
107
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/${dir}/*.so ${LIBDIR}/${dir}
108
.endfor
109
.endif
61
110
62
.include "${.CURDIR}/../quake3-data/Makefile.include"
111
.include "${.CURDIR}/../quake3-data/Makefile.include"
63
.include <bsd.port.post.mk>
112
.include <bsd.port.post.mk>
(-)pkg-plist (+12 lines)
Added Link Here
1
%%DEDICATED%%bin/q3ded
2
%%CLIENT%%bin/quake3
3
%%SMP%%bin/quake3-smp
4
%%GAMELIBS%%%%LIBDIR%%/baseq3/cgame.so
5
%%GAMELIBS%%%%LIBDIR%%/baseq3/qagame.so
6
%%GAMELIBS%%%%LIBDIR%%/baseq3/ui.so
7
%%GAMELIBS%%%%LIBDIR%%/missionpack/cgame.so
8
%%GAMELIBS%%%%LIBDIR%%/missionpack/qagame.so
9
%%GAMELIBS%%%%LIBDIR%%/missionpack/ui.so
10
%%GAMELIBS%%@dirrm %%LIBDIR%%/missionpack
11
%%GAMELIBS%%@dirrm %%LIBDIR%%/baseq3
12
%%GAMELIBS%%@dirrm %%LIBDIR%%
(-)files/patch-code-Construct (-69 lines)
Removed Link Here
1
--- code/Construct.orig	Mon Aug 15 20:56:27 2005
2
+++ code/Construct	Wed Nov 23 10:37:04 2005
3
@@ -19,8 +19,8 @@
4
 use Cons_gcc;
5
 
6
 # defaults
7
-$config = 'debug';
8
-$do_smp = 1;
9
+$config = 'release';
10
+$do_smp = 0;
11
 $do_masterserver = 0;
12
 $do_authserver = 0;
13
 $do_authport = 0;
14
@@ -32,8 +32,8 @@
15
 $DO_WIN32 = 0;
16
 $NO_VM = 0;
17
 $NO_SO = 0;
18
-$CC='gcc';
19
-$CXX='g++';
20
+$CC=$ENV{CC};
21
+$CXX=$ENV{CXX};
22
 
23
 # detect an sdk build (don't attempt client build and other things)
24
 if ( -r 'unix/Conscript-client' )
25
@@ -63,9 +63,9 @@
26
 else
27
 {
28
 	# libc .. do the little magic!
29
-	$libc_cmd = '/lib/libc.so.6 |grep "GNU C "|grep version|awk -F "version " \'{ print $2 }\'|cut -b -3';
30
-	$libc = `$libc_cmd`;
31
-	chop ($libc);
32
+	# $libc_cmd = '/lib/libc.so.6 |grep "GNU C "|grep version|awk -F "version " \'{ print $2 }\'|cut -b -3';
33
+	# $libc = `$libc_cmd`;
34
+	# chop ($libc);
35
 }
36
 
37
 if ($DO_WIN32 eq 1)
38
@@ -227,7 +227,7 @@
39
 # build the config directory
40
 $CONFIG_DIR = $config . '-' . $cpu . '-' . $OS . '-' . $libc;
41
 
42
-$COMMON_CFLAGS = '-pipe -fsigned-char ';
43
+$COMMON_CFLAGS = '-pipe -fsigned-char -I/usr/local/include -L/usr/local/lib -I/usr/X11R6/include -L/usr/X11R6/lib ';
44
 
45
 if ($config eq 'debug')
46
 {
47
@@ -237,7 +237,7 @@
48
 }
49
 else
50
 {
51
-  $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 ';
52
+  $BASE_CFLAGS = $COMMON_CFLAGS . '-DNDEBUG -O6 -fomit-frame-pointer -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce ';
53
 	$BSPC_BASE_CFLAGS = $BASE_CFLAGS . '-DLINUX -DBSPC -Dstricmp=strcasecmp ';
54
 }
55
 
56
@@ -287,11 +287,11 @@
57
   system("mkdir qvmtools 2>/dev/null");
58
   if (@_[0] eq 'q3lcc')
59
   {
60
-    system("cd ../lcc ; make all ; cp /tmp/lcc ../code/qvmtools/q3lcc ; cp /tmp/rcc ../code/qvmtools/q3rcc ; cp /tmp/cpp ../code/qvmtools/q3cpp");
61
+    system("cd ../lcc ; gmake all ; cp ../lcc/build/lcc ../code/qvmtools/q3lcc ; cp ../lcc/build/rcc ../code/qvmtools/q3rcc ; cp ../lcc/build/cpp ../code/qvmtools/q3cpp");
62
   }
63
   elsif (@_[0] eq 'q3asm')
64
   {
65
-    system("cd ../q3asm ; make ; cp q3asm ../code/qvmtools");
66
+    system("cd ../q3asm ; gmake ; cp q3asm ../code/qvmtools");
67
   }
68
   else
69
   {
(-)files/patch-code-botlib-linux-i386.mak (-12 lines)
Removed Link Here
1
diff -ruN ./code/botlib/linux-i386.mak ../quake3-1.32b-BUILT/./code/botlib/linux-i386.mak
2
--- ./code/botlib/linux-i386.mak	Wed May 23 15:07:59 2001
3
+++ ../quake3-1.32b-BUILT/./code/botlib/linux-i386.mak	Mon Aug 22 20:55:02 2005
4
@@ -14,7 +14,7 @@
5
 #use these when debugging 
6
 #CFLAGS=$(BASE_CFLAGS) -g
7
 
8
-LDFLAGS=-ldl -lm
9
+LDFLAGS=-lm
10
 SHLIBEXT=so
11
 SHLIBCFLAGS=-fPIC
12
 SHLIBLDFLAGS=-shared
(-)files/patch-code-bspc-Conscript (-12 lines)
Removed Link Here
1
diff -ruN ./code/bspc/Conscript ../quake3-1.32b-BUILT/./code/bspc/Conscript
2
--- ./code/bspc/Conscript	Tue Aug 16 01:47:07 2005
3
+++ ../quake3-1.32b-BUILT/./code/bspc/Conscript	Mon Aug 22 20:54:27 2005
4
@@ -67,7 +67,7 @@
5
   CXX => $CXX,
6
   LINK => $LINK,
7
   CFLAGS => $BSPC_BASE_CFLAGS,
8
-  LIBS => '-ldl -lm -lpthread'
9
+  LIBS => '-lm -lpthread'
10
 );
11
 
12
 Program $env 'bspc', @$BSPC_REF;
(-)files/patch-code-bspc-Makefile (-12 lines)
Removed Link Here
1
diff -ruN ./code/bspc/Makefile ../quake3-1.32b-BUILT/./code/bspc/Makefile
2
--- ./code/bspc/Makefile	Wed May 23 15:07:59 2001
3
+++ ../quake3-1.32b-BUILT/./code/bspc/Makefile	Mon Aug 22 20:54:39 2005
4
@@ -18,7 +18,7 @@
5
 #use these when debugging 
6
 #CFLAGS=$(BASE_CFLAGS) -g
7
 
8
-LDFLAGS=-ldl -lm -lpthread
9
+LDFLAGS=-lm -lpthread
10
 
11
 DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
12
 
(-)files/patch-code-bspc-linux-i386.mak (-12 lines)
Removed Link Here
1
diff -ruN ./code/bspc/linux-i386.mak ../quake3-1.32b-BUILT/./code/bspc/linux-i386.mak
2
--- ./code/bspc/linux-i386.mak	Wed May 23 15:07:59 2001
3
+++ ../quake3-1.32b-BUILT/./code/bspc/linux-i386.mak	Mon Aug 22 20:54:48 2005
4
@@ -14,7 +14,7 @@
5
 #use these when debugging 
6
 #CFLAGS=$(BASE_CFLAGS) -g
7
 
8
-LDFLAGS=-ldl -lm -lpthread
9
+LDFLAGS=-lm -lpthread
10
 
11
 DO_CC=$(CC) $(CFLAGS) -o $@ -c $<
12
 
(-)files/patch-code-cgame-Conscript (-12 lines)
Removed Link Here
1
diff -ruN ./code/cgame/Conscript ../quake3-1.32b-BUILT/./code/cgame/Conscript
2
--- ./code/cgame/Conscript	Sun Jan 19 18:03:48 2003
3
+++ ../quake3-1.32b-BUILT/./code/cgame/Conscript	Mon Aug 22 20:54:15 2005
4
@@ -22,7 +22,7 @@
5
   LINK => $LINK,
6
 	ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} },
7
   CFLAGS => $BASE_CFLAGS . '-fPIC',
8
-  LDFLAGS => '-shared -ldl -lm'
9
+  LDFLAGS => '-shared -lm'
10
 );
11
 
12
 # for TA, use -DMISSIONPACK
(-)files/patch-code-client-cl_ui.c (+11 lines)
Added Link Here
1
--- code/client/cl_ui.c.orig	Thu May 25 15:41:27 2006
2
+++ code/client/cl_ui.c	Thu May 25 15:46:39 2006
3
@@ -1166,7 +1166,7 @@
4
 		// init for this gamestate
5
 		VM_Call( uivm, UI_INIT, (cls.state >= CA_AUTHORIZING && cls.state < CA_ACTIVE));
6
 	}
7
-	else if (v != UI_API_VERSION) {
8
+	else if (v != 0 && v != UI_API_VERSION) {
9
 		Com_Error( ERR_DROP, "User Interface is version %d, expected %d", v, UI_API_VERSION );
10
 		cls.uiStarted = qfalse;
11
 	}
(-)files/patch-code-game-Conscript (-12 lines)
Removed Link Here
1
diff -ruN ./code/game/Conscript ../quake3-1.32b-BUILT/./code/game/Conscript
2
--- ./code/game/Conscript	Sun Jan 19 18:03:48 2003
3
+++ ../quake3-1.32b-BUILT/./code/game/Conscript	Mon Aug 22 20:54:04 2005
4
@@ -21,7 +21,7 @@
5
   LINK => $LINK,
6
 	ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} },
7
   CFLAGS => $BASE_CFLAGS . '-fPIC',
8
-  LDFLAGS => '-shared -ldl -lm'
9
+  LDFLAGS => '-shared -lm'
10
 );
11
 
12
 # for TA, use -DMISSIONPACK
(-)files/patch-code-game-q_shared.c (+99 lines)
Added Link Here
1
--- code/game/q_shared.c.orig	Thu May 25 13:42:26 2006
2
+++ code/game/q_shared.c	Thu May 25 13:44:30 2006
3
@@ -99,29 +99,29 @@
4
 
5
 ============================================================================
6
 */
7
-/*
8
+
9
 // can't just use function pointers, or dll linkage can
10
 // mess up when qcommon is included in multiple places
11
-static short	(*_BigShort) (short l);
12
-static short	(*_LittleShort) (short l);
13
-static int		(*_BigLong) (int l);
14
-static int		(*_LittleLong) (int l);
15
+static int16_t	(*_BigShort) (int16_t l);
16
+static int16_t	(*_LittleShort) (int16_t l);
17
+static int32_t		(*_BigLong) (int32_t l);
18
+static int32_t		(*_LittleLong) (int32_t l);
19
 static qint64	(*_BigLong64) (qint64 l);
20
 static qint64	(*_LittleLong64) (qint64 l);
21
 static float	(*_BigFloat) (const float *l);
22
 static float	(*_LittleFloat) (const float *l);
23
 
24
-short	BigShort(short l){return _BigShort(l);}
25
-short	LittleShort(short l) {return _LittleShort(l);}
26
-int		BigLong (int l) {return _BigLong(l);}
27
-int		LittleLong (int l) {return _LittleLong(l);}
28
-qint64 	BigLong64 (qint64 l) {return _BigLong64(l);}
29
-qint64 	LittleLong64 (qint64 l) {return _LittleLong64(l);}
30
-float	BigFloat (const float *l) {return _BigFloat(l);}
31
-float	LittleFloat (const float *l) {return _LittleFloat(l);}
32
-*/
33
+int16_t	BigShort(int16_t l){return _BigShort(l);}
34
+int16_t	LittleShort(int16_t l) {return _LittleShort(l);}
35
+int32_t	BigLong (int32_t l) {return _BigLong(l);}
36
+int32_t	LittleLong (int32_t l) {return _LittleLong(l);}
37
+qint64	BigLong64 (qint64 l) {return _BigLong64(l);}
38
+qint64	LittleLong64 (qint64 l) {return _LittleLong64(l);}
39
+float	BigFloat (float l) {return _BigFloat(&l);}
40
+float	LittleFloat (float l) {return _LittleFloat(&l);}
41
 
42
-short   ShortSwap (short l)
43
+
44
+int16_t	ShortSwap (int16_t l)
45
 {
46
 	byte    b1,b2;
47
 
48
@@ -131,12 +131,12 @@
49
 	return (b1<<8) + b2;
50
 }
51
 
52
-short	ShortNoSwap (short l)
53
+int16_t	ShortNoSwap (int16_t l)
54
 {
55
 	return l;
56
 }
57
 
58
-int    LongSwap (int l)
59
+int32_t	LongSwap (int32_t l)
60
 {
61
 	byte    b1,b2,b3,b4;
62
 
63
@@ -145,15 +145,15 @@
64
 	b3 = (l>>16)&255;
65
 	b4 = (l>>24)&255;
66
 
67
-	return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
68
+	return ((int32_t)b1<<24) + ((int32_t)b2<<16) + ((int32_t)b3<<8) + b4;
69
 }
70
 
71
-int	LongNoSwap (int l)
72
+int32_t	LongNoSwap (int32_t l)
73
 {
74
 	return l;
75
 }
76
 
77
-qint64 Long64Swap (qint64 ll)
78
+qint64	Long64Swap (qint64 ll)
79
 {
80
 	qint64	result;
81
 
82
@@ -199,7 +199,7 @@
83
 Swap_Init
84
 ================
85
 */
86
-/*
87
+
88
 void Swap_Init (void)
89
 {
90
 	byte	swaptest[2] = {1,0};
91
@@ -229,7 +229,7 @@
92
 	}
93
 
94
 }
95
-*/
96
+
97
 
98
 /*
99
 ============================================================================
(-)files/patch-code-game-q_shared.h (-4 / +120 lines)
Lines 1-7 Link Here
1
diff -ruN ./code/game/q_shared.h ../quake3-1.32b-BUILT/./code/game/q_shared.h
1
--- code/game/q_shared.h.orig	Thu May 25 13:26:31 2006
2
--- ./code/game/q_shared.h	Tue Aug 16 02:10:07 2005
2
+++ code/game/q_shared.h	Thu May 25 13:26:58 2006
3
+++ ../quake3-1.32b-BUILT/./code/game/q_shared.h	Tue Aug 23 14:16:34 2005
3
@@ -150,12 +150,14 @@
4
@@ -452,13 +452,9 @@
4
 
5
 #define ID_INLINE __inline 
6
 
7
+#if 0
8
 static ID_INLINE short BigShort( short l) { return ShortSwap(l); }
9
 #define LittleShort
10
 static ID_INLINE int BigLong(int l) { LongSwap(l); }
11
 #define LittleLong
12
 static ID_INLINE float BigFloat(const float *l) { FloatSwap(l); }
13
 #define LittleFloat
14
+#endif
15
 
16
 #define	PATH_SEP '\\'
17
 
18
@@ -206,12 +208,14 @@
19
     return fi;
20
 }
21
 
22
+#if 0
23
 #define BigShort
24
 static inline short LittleShort(short l) { return ShortSwap(l); }
25
 #define BigLong
26
 static inline int LittleLong (int l) { return LongSwap(l); }
27
 #define BigFloat
28
 static inline float LittleFloat (const float l) { return FloatSwap(&l); }
29
+#endif
30
 
31
 #endif
32
 
33
@@ -229,12 +233,14 @@
34
 
35
 void Sys_PumpEvents( void );
36
 
37
+#if 0
38
 #define BigShort
39
 static inline short LittleShort(short l) { return ShortSwap(l); }
40
 #define BigLong
41
 static inline int LittleLong (int l) { return LongSwap(l); }
42
 #define BigFloat
43
 static inline float LittleFloat (const float l) { return FloatSwap(&l); }
44
+#endif
45
 
46
 #endif
47
 
48
@@ -268,6 +274,7 @@
49
 #define	BOTLIB_HARD_LINKED
50
 #endif
51
 
52
+#if 0
53
 #if !idppc
54
 inline static short BigShort( short l) { return ShortSwap(l); }
55
 #define LittleShort
56
@@ -283,6 +290,7 @@
57
 #define BigFloat
58
 inline static float LittleFloat (const float *l) { return FloatSwap(l); }
59
 #endif
60
+#endif
61
 
62
 #endif
63
 
64
@@ -302,10 +310,18 @@
65
 #define CPUSTRING       "freebsd-other"
66
 #endif
67
 
68
+#include <machine/param.h>
69
+#if __FreeBSD_version < 500000
70
+#include <inttypes.h>
71
+#else
72
+#include <stdint.h>
73
+#endif
74
+
75
 #define	PATH_SEP '/'
76
 
77
 // bk010116 - omitted Q3STATIC (see Linux above), broken target
78
 
79
+#if 0
80
 #if !idppc
81
 static short BigShort( short l) { return ShortSwap(l); }
82
 #define LittleShort
83
@@ -321,6 +337,7 @@
84
 #define BigFloat
85
 static float LittleFloat (const float *l) { return FloatSwap(l); }
86
 #endif
87
+#endif
88
 
89
 #endif
90
 
91
@@ -452,13 +469,9 @@
5
 void *Hunk_Alloc( int size, ha_pref preference );
92
 void *Hunk_Alloc( int size, ha_pref preference );
6
 #endif
93
 #endif
7
 
94
 
Lines 15-17 Link Here
15
 
102
 
16
 #if !( defined __VECTORC )
103
 #if !( defined __VECTORC )
17
 void Com_Memset (void* dest, const int val, const size_t count);
104
 void Com_Memset (void* dest, const int val, const size_t count);
105
@@ -888,18 +901,18 @@
106
 } qint64;
107
 
108
 //=============================================
109
-/*
110
-short	BigShort(short l);
111
-short	LittleShort(short l);
112
-int		BigLong (int l);
113
-int		LittleLong (int l);
114
-qint64  BigLong64 (qint64 l);
115
-qint64  LittleLong64 (qint64 l);
116
-float	BigFloat (const float *l);
117
-float	LittleFloat (const float *l);
118
+
119
+int16_t	BigShort(int16_t l);
120
+int16_t	LittleShort(int16_t l);
121
+int32_t	BigLong (int32_t l);
122
+int32_t	LittleLong (int32_t l);
123
+qint64		BigLong64 (qint64 l);
124
+qint64		LittleLong64 (qint64 l);
125
+float	BigFloat (float l);
126
+float	LittleFloat (float l);
127
 
128
 void	Swap_Init (void);
129
-*/
130
+
131
 char	* QDECL va(char *format, ...);
132
 
133
 //=============================================
(-)files/patch-code-q3_ui-Conscript (-12 lines)
Removed Link Here
1
diff -ruN ./code/q3_ui/Conscript ../quake3-1.32b-BUILT/./code/q3_ui/Conscript
2
--- ./code/q3_ui/Conscript	Sun Jan 19 18:03:48 2003
3
+++ ../quake3-1.32b-BUILT/./code/q3_ui/Conscript	Mon Aug 22 20:56:57 2005
4
@@ -16,7 +16,7 @@
5
   LINK => $LINK,
6
 	ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} },
7
   CFLAGS => $BASE_CFLAGS . '-fPIC',
8
-  LDFLAGS => '-shared -ldl -lm'
9
+  LDFLAGS => '-shared -lm'
10
 );
11
 
12
 # qvm building
(-)files/patch-code-qcommon-files.c (+26 lines)
Added Link Here
1
--- code/qcommon/files.c.orig	Thu May 25 16:39:34 2006
2
+++ code/qcommon/files.c	Thu May 25 16:41:43 2006
3
@@ -2763,6 +2763,7 @@
4
 	if (fs_basepath->string[0]) {
5
 		FS_AddGameDirectory( fs_basepath->string, gameName );
6
 	}
7
+	FS_AddGameDirectory( LIBDIR, gameName );
8
   // fs_homepath is somewhat particular to *nix systems, only add if relevant
9
   // NOTE: same filtering below for mods and basegame
10
 	if (fs_basepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) {
11
@@ -2777,6 +2778,7 @@
12
 		if (fs_basepath->string[0]) {
13
 			FS_AddGameDirectory(fs_basepath->string, fs_basegame->string);
14
 		}
15
+		FS_AddGameDirectory(LIBDIR, fs_basegame->string);
16
 		if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) {
17
 			FS_AddGameDirectory(fs_homepath->string, fs_basegame->string);
18
 		}
19
@@ -2790,6 +2792,7 @@
20
 		if (fs_basepath->string[0]) {
21
 			FS_AddGameDirectory(fs_basepath->string, fs_gamedirvar->string);
22
 		}
23
+		FS_AddGameDirectory(LIBDIR, fs_gamedirvar->string);
24
 		if (fs_homepath->string[0] && Q_stricmp(fs_homepath->string,fs_basepath->string)) {
25
 			FS_AddGameDirectory(fs_homepath->string, fs_gamedirvar->string);
26
 		}
(-)files/patch-code-qcommon-vm.c (+20 lines)
Added Link Here
1
--- code/qcommon/vm.c.orig	Thu May 25 16:59:36 2006
2
+++ code/qcommon/vm.c	Thu May 25 17:08:51 2006
3
@@ -478,7 +478,7 @@
4
 		}
5
 	}
6
 
7
-	if ( interpret == VMI_NATIVE ) {
8
+	if ( 1 ) {
9
 		// try to load as a system dll
10
 		Com_Printf( "Loading dll file %s.\n", vm->name );
11
 		vm->dllHandle = Sys_LoadDll( module, vm->fqpath , &vm->entryPoint, VM_DllSyscall );
12
@@ -826,7 +826,7 @@
13
 
14
 
15
 
16
-#ifdef oDLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
17
+#ifdef DLL_ONLY // bk010215 - for DLL_ONLY dedicated servers/builds w/o VM
18
 int	VM_CallCompiled( vm_t *vm, int *args ) {
19
   return(0); 
20
 }
(-)files/patch-code-ui-Conscript (-12 lines)
Removed Link Here
1
diff -ruN ./code/ui/Conscript ../quake3-1.32b-BUILT/./code/ui/Conscript
2
--- ./code/ui/Conscript	Sun Jan 19 18:03:48 2003
3
+++ ../quake3-1.32b-BUILT/./code/ui/Conscript	Mon Aug 22 20:53:50 2005
4
@@ -16,7 +16,7 @@
5
   LINK => $LINK,
6
 	ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} },
7
   CFLAGS => $BASE_CFLAGS . '-DMISSIONPACK -fPIC',
8
-  LDFLAGS => '-shared -ldl -lm'
9
+  LDFLAGS => '-shared -lm'
10
 );
11
 
12
 # qvm building
(-)files/patch-code-unix-Conscript-client (-20 lines)
Removed Link Here
1
diff -ruN ./code/unix/Conscript-client ../quake3-1.32b-BUILT/./code/unix/Conscript-client
2
--- ./code/unix/Conscript-client	Mon Aug 15 23:56:27 2005
3
+++ ../quake3-1.32b-BUILT/./code/unix/Conscript-client	Mon Aug 22 21:55:50 2005
4
@@ -153,7 +153,7 @@
5
   . $BUILD_DIR . '/unix/asmlib.a '
6
   . $BUILD_DIR . '/unix/inlinelib.a '
7
 	. $BASE_LDFLAGS
8
-  . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -ldl -lm'
9
+  . '-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -lm'
10
 );
11
 
12
 @RENDERER_FILES = qw(
13
@@ -231,7 +231,6 @@
14
   ../unix/linux_common.c
15
   ../unix/linux_qgl.c   
16
   ../unix/linux_glimp.c   
17
-  ../unix/linux_joystick.c  
18
   ../unix/linux_snd.c 
19
 	../unix/linux_signals.c
20
   );
(-)files/patch-code-unix-Conscript-dedicated (-12 lines)
Removed Link Here
1
diff -ruN ./code/unix/Conscript-dedicated ../quake3-1.32b-BUILT/./code/unix/Conscript-dedicated
2
--- ./code/unix/Conscript-dedicated	Mon Aug 15 23:56:27 2005
3
+++ ../quake3-1.32b-BUILT/./code/unix/Conscript-dedicated	Mon Aug 22 20:52:42 2005
4
@@ -63,7 +63,7 @@
5
 	ENV => { PATH => $ENV{PATH}, HOME => $ENV{HOME} },
6
   # FIXME TTimo I'm not sure about what C_ONLY is for
7
   CFLAGS => $BASE_CFLAGS . '-DC_ONLY',
8
-  LDFLAGS => '-ldl -lm',
9
+  LDFLAGS => '-lm',
10
   LIBS => ' ' 
11
   . $BUILD_DIR . '/unix/botlib.a '
12
   . $BUILD_DIR . '/unix/asmlib.a '
(-)files/patch-code-unix-Makefile (-18 / +376 lines)
Lines 1-6 Link Here
1
--- code/unix/Makefile.orig	Sun May  5 07:21:10 2002
1
--- code/unix/Makefile.orig	Thu May 25 16:59:37 2006
2
+++ code/unix/Makefile	Sun Nov 20 18:48:48 2005
2
+++ code/unix/Makefile	Thu May 25 17:04:46 2006
3
@@ -136,7 +136,7 @@
3
@@ -19,6 +19,7 @@
4
 
5
 PLATFORM=$(shell uname|tr A-Z a-z)
6
 PLATFORM_RELEASE=$(shell uname -r)
7
+ARCH=$(shell uname -m)
8
 
9
 ###
10
 ### These paths are where you probably want to change things
11
@@ -34,7 +35,7 @@
12
 
13
 # Build name
14
 # BUILD_NAME=$(BUILD_NAME)
15
-BUILD_NAME=quake3.x86
16
+BUILD_NAME=quake3
17
 
18
 
19
 
20
@@ -46,8 +47,8 @@
21
 
22
 BASEQ3_DIR=$(BDIR)/baseq3
23
 
24
-BD=debug$(ARCH)$(GLIBC)
25
-BR=release$(ARCH)$(GLIBC)
26
+BD=debug
27
+BR=release
28
 CDIR=$(MOUNT_DIR)/client
29
 SDIR=$(MOUNT_DIR)/server
30
 RDIR=$(MOUNT_DIR)/renderer
31
@@ -76,7 +77,7 @@
32
 #############################################################################
33
 
34
 ## Defaults
35
-DLL_ONLY=false
36
+DLL_ONLY?=false
37
 # bk010215 - TODO - add all defaults / kill Ryan
38
 
39
 
40
@@ -136,7 +137,7 @@
4
     ifeq ($(ARCH),ppc)
41
     ifeq ($(ARCH),ppc)
5
       NEWPGCC=/loki/global/ppc/bin/gcc
42
       NEWPGCC=/loki/global/ppc/bin/gcc
6
       CC=$(NEWPGCC)
43
       CC=$(NEWPGCC)
Lines 9-15 Link Here
9
     else
46
     else
10
       #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205
47
       #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc # bk001205
11
       #NEWPGCC=/loki/global/x86/bin/gcc
48
       #NEWPGCC=/loki/global/x86/bin/gcc
12
@@ -146,9 +146,9 @@
49
@@ -146,9 +147,9 @@
13
 # TTimo: legacy RELEASE_CFLAGS
50
 # TTimo: legacy RELEASE_CFLAGS
14
 # NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box
51
 # NOTE: the -fomit-frame-pointer option leads to an unstable binary on my test box if it was built on the main box
15
 #   but building on the Mdk 7.2 baseline seems to work
52
 #   but building on the Mdk 7.2 baseline seems to work
Lines 21-27 Link Here
21
     endif
58
     endif
22
   endif
59
   endif
23
 
60
 
24
@@ -162,7 +162,7 @@
61
@@ -162,7 +163,7 @@
25
   RANLIB=ranlib
62
   RANLIB=ranlib
26
 
63
 
27
   THREAD_LDFLAGS=-lpthread
64
   THREAD_LDFLAGS=-lpthread
Lines 30-45 Link Here
30
   GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
67
   GLLDFLAGS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm
31
 
68
 
32
   ifeq ($(ARCH),axp)
69
   ifeq ($(ARCH),axp)
33
@@ -223,7 +223,7 @@
70
@@ -199,31 +200,27 @@
34
 #NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc
71
 
35
 NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc
72
 GLIBC= #libc is irrelevant
36
 CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi )
73
 
74
-ifneq (,$(findstring alpha,$(shell uname -m)))
75
-ARCH=axp
76
-RPMARCH=alpha
77
-VENDOR=dec
78
-else #default to i386
79
-ARCH=i386
80
-RPMARCH=i386
81
-VENDOR=unknown
82
-endif #alpha test
83
+BASE_CFLAGS = $(CFLAGS) -DDATADIR='\"$(Q3DIR)\"' -DLIBDIR='\"$(LIBDIR)\"' -pipe
84
 
85
+GL_CFLAGS = -I$(X11BASE)/include
86
 
87
-BASE_CFLAGS =  -pipe
88
+DEBUG_CFLAGS=$(BASE_CFLAGS) -g  -Wall -Werror
89
+RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG
90
 
91
-GL_CFLAGS = -I$(MESADIR)/include -I/usr/X11R6/include
92
+ifdef OPTIMIZED_CFLAGS
93
+  ifeq ($(ARCH),i386)
94
+RELEASE_CFLAGS+=-O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
95
+  else
96
+RELEASE_CFLAGS+=-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
97
+  endif
98
+endif
99
 
100
-DEBUG_CFLAGS=$(BASE_CFLAGS) -g  -Wall -Werror
101
-ifeq ($(ARCH),axp)
102
-CC=pgcc
103
-RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations
104
-else
105
-#NEWPGCC=/loki/global/x86/bin/gcc # raistlin012301
106
-#NEWPGCC=/usr/local/gcc-2.95.2/bin/gcc
107
-NEWPGCC=/home/raistllin/src/gcc/build/install/bin/gcc
108
-CC=$(shell if [ -f $(NEWPGCC) ]; then echo $(NEWPGCC); else echo pgcc; fi )
37
-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
109
-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
38
+RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -fomit-frame-pointer -pipe -ffast-math -falign-loops=2 -falign-jumps=2 -falign-functions=2 -fno-strict-aliasing - fstrength-reduce
110
+ifneq ($(ARCH),i386)
111
+DLL_ONLY=true
112
+endif
113
+
114
+ifeq ($(DLL_ONLY),true)
115
+BASE_CFLAGS += -DDLL_ONLY
39
 endif
116
 endif
40
 
117
 
41
 LIBEXT=a
118
 LIBEXT=a
42
@@ -283,7 +283,7 @@
119
@@ -235,25 +232,37 @@
120
 ARFLAGS=ar rv
121
 RANLIB=ranlib
122
 
123
-THREAD_LDFLAGS=-lpthread
124
+THREAD_LDFLAGS=$(PTHREAD_LIBS)
125
 # don't need -ldl (FreeBSD)
126
-LDFLAGS=-lm
127
+LDFLAGS+=-lm
128
 #GLLDFLAGS=-L/usr/X11R6/lib -L$(MESADIR)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
129
 #GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
130
-GLLDFLAGS=-L/usr/X11R6/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
131
+GLLDFLAGS=-L$(X11BASE)/lib -lGL -lX11 -lXext -lXxf86dga -lXxf86vm
132
 
133
-ifeq ($(ARCH),axp)
134
-TARGETS=\
135
-        $(B)/$(PLATFORM)q3ded
136
-else
137
-TARGETS=\
138
-	$(B)/$(PLATFORM)quake3 \
139
-	$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) \
140
-	$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) \
141
-	$(B)/baseq3/ui$(ARCH).$(SHLIBEXT)     \
142
-	$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) \
143
-	$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) \
144
-	$(B)/missionpack/ui$(ARCH).$(SHLIBEXT)
145
+ifdef CLIENT
146
+TARGETS+=$(B)/quake3
147
+endif
148
+
149
+ifdef DEDICATED
150
+TARGETS+=$(B)/q3ded
151
+endif
152
+
153
+ifdef SMP
154
+TARGETS+=$(B)/quake3-smp
155
+endif
156
+
157
+ifeq ($(DLL_ONLY),true)
158
+GAMELIBS=yes
159
+endif
160
+
161
+ifdef GAMELIBS
162
+TARGETS+=\
163
+	$(B)/baseq3/cgame.$(SHLIBEXT) \
164
+	$(B)/baseq3/qagame.$(SHLIBEXT) \
165
+	$(B)/baseq3/ui.$(SHLIBEXT) \
166
+	$(B)/missionpack/cgame.$(SHLIBEXT) \
167
+	$(B)/missionpack/qagame.$(SHLIBEXT) \
168
+	$(B)/missionpack/ui.$(SHLIBEXT)
169
 endif
170
 
171
 else # ifeq freebsd
172
@@ -283,7 +292,7 @@
43
 ARFLAGS=ar rv
173
 ARFLAGS=ar rv
44
 RANLIB=ranlib
174
 RANLIB=ranlib
45
 
175
 
Lines 48-63 Link Here
48
 GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
178
 GLLDFLAGS=-L/usr/X11/lib -lGL -lX11 -lXext -lm
49
 
179
 
50
 TARGETS=$(B)/sgiquake3 \
180
 TARGETS=$(B)/sgiquake3 \
51
@@ -312,7 +312,7 @@
181
@@ -310,9 +319,9 @@
182
 RANLIB=ranlib
183
 
52
 ifeq ($(PLATFORM),freebsd)
184
 ifeq ($(PLATFORM),freebsd)
53
 LDFLAGS=-lm
185
-LDFLAGS=-lm
186
+LDFLAGS+=-lm
54
 else
187
 else
55
-LDFLAGS=-ldl -lm
188
-LDFLAGS=-ldl -lm
56
+LDFLAGS=-lm
189
+LDFLAGS=-lm
57
 endif # ifeq freebsd
190
 endif # ifeq freebsd
58
 
191
 
59
 TARGETS=\
192
 TARGETS=\
60
@@ -578,7 +578,6 @@
193
@@ -348,7 +357,7 @@
194
 	$(MAKE)  targets B=$(BR) CFLAGS="$(RELEASE_CFLAGS)"
195
 
196
 #Build both debug and release builds
197
-all:build_debug build_release
198
+all:build_release
199
 
200
 targets:makedirs $(TARGETS)
201
 
202
@@ -516,20 +525,6 @@
203
 	$(B)/client/unix_net.o \
204
 	$(B)/client/unix_shared.o \
205
 	\
206
-	$(B)/client/ahoptim.o  \
207
-	$(B)/client/autohint.o \
208
-	$(B)/client/ftbase.o   \
209
-	$(B)/client/ftdebug.o  \
210
-	$(B)/client/ftglyph.o  \
211
-	$(B)/client/ftinit.o   \
212
-	$(B)/client/ftmm.o     \
213
-	$(B)/client/ftsystem.o \
214
-	$(B)/client/raster1.o  \
215
-	$(B)/client/sfnt.o     \
216
-	$(B)/client/sfobjs.o   \
217
-	$(B)/client/smooth.o   \
218
-	$(B)/client/truetype.o
219
-#	\
220
 #	$(B)/client/q_parse.o \
221
 #	$(B)/client/math_quaternion.o \
222
 #	$(B)/client/util_str.o \
223
@@ -541,7 +536,9 @@
224
 #	$(B)/client/q_shared.o \
225
 
226
     ifeq ($(ARCH),i386)
227
-	  Q3OBJ += $(B)/client/vm_x86.o
228
+      ifeq ($(DLL_ONLY),false)
229
+	Q3OBJ += $(B)/client/vm_x86.o
230
+      endif
231
     endif
232
 
233
     ifeq ($(ARCH),ppc)
234
@@ -559,10 +556,24 @@
235
 		$(B)/client/linux_qgl.o \
236
 		$(B)/client/linux_glimp.o \
237
 		$(B)/client/linux_snd.o \
238
+		$(B)/client/linux_signals.o \
239
+		$(B)/client/snd_mixa.o \
240
+		$(B)/client/matha.o
241
+
242
+	Q3POBJ_SMP=\
243
+		$(B)/client/linux_common.o \
244
+		$(B)/client/linux_qgl.o \
245
+		$(B)/client/linux_glimp_smp.o \
246
+		$(B)/client/linux_snd.o \
247
+		$(B)/client/linux_signals.o \
248
 		$(B)/client/snd_mixa.o \
249
-		$(B)/client/matha.o   \
250
-		$(B)/client/ftol.o \
251
-		$(B)/client/snapvector.o
252
+		$(B)/client/matha.o
253
+
254
+    ifeq ($(ARCH),i386)
255
+		Q3POBJ += $(B)/client/ftol.o $(B)/client/snapvector.o
256
+		Q3POBJ_SMP += $(B)/client/ftol.o $(B)/client/snapvector.o
257
+    endif
258
+
259
 else
260
 ifeq ($(PLATFORM),irix)
261
 	Q3POBJ=\
262
@@ -578,7 +589,6 @@
61
 		$(B)/client/linux_common.o \
263
 		$(B)/client/linux_common.o \
62
 		$(B)/client/linux_qgl.o \
264
 		$(B)/client/linux_qgl.o \
63
 		$(B)/client/linux_glimp.o \
265
 		$(B)/client/linux_glimp.o \
Lines 65-71 Link Here
65
 		$(B)/client/linux_snd.o \
267
 		$(B)/client/linux_snd.o \
66
 		$(B)/client/snd_mixa.o \
268
 		$(B)/client/snd_mixa.o \
67
 		$(B)/client/matha.o \
269
 		$(B)/client/matha.o \
68
@@ -587,7 +586,6 @@
270
@@ -587,7 +597,6 @@
69
 		$(B)/client/linux_common.o \
271
 		$(B)/client/linux_common.o \
70
 		$(B)/client/linux_qgl.o \
272
 		$(B)/client/linux_qgl.o \
71
 		$(B)/client/linux_glimp_smp.o \
273
 		$(B)/client/linux_glimp_smp.o \
Lines 73-79 Link Here
73
 		$(B)/client/linux_snd.o \
275
 		$(B)/client/linux_snd.o \
74
 		$(B)/client/snd_mixa.o \
276
 		$(B)/client/snd_mixa.o \
75
 		$(B)/client/matha.o
277
 		$(B)/client/matha.o
76
@@ -754,7 +752,6 @@
278
@@ -602,12 +611,12 @@
279
 endif #FreeBSD
280
 endif #IRIX
281
 
282
-$(B)/$(PLATFORM)quake3 : $(Q3OBJ) $(Q3POBJ)
283
+$(B)/quake3 : $(Q3OBJ) $(Q3POBJ)
284
 	$(CC)  -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) 
285
 # TTimo: splines code requires C++ linking, but splines have not been officially included in the codebase
286
 #	$(CXX)  -o $@ $(Q3OBJ) $(Q3POBJ) $(GLLDFLAGS) $(LDFLAGS) 
287
 
288
-$(B)/$(PLATFORM)quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP)
289
+$(B)/quake3-smp : $(Q3OBJ) $(Q3POBJ_SMP)
290
 	$(CC)  -o $@ $(Q3OBJ) $(Q3POBJ_SMP) $(GLLDFLAGS) \
291
 		$(THREAD_LDFLAGS) $(LDFLAGS) 
292
 
293
@@ -754,10 +763,10 @@
77
 $(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC)
294
 $(B)/client/linux_common.o : $(UDIR)/linux_common.c; $(DO_CC)
78
 $(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC)  $(GL_CFLAGS) 
295
 $(B)/client/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC)  $(GL_CFLAGS) 
79
 $(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC)  $(GL_CFLAGS) 
296
 $(B)/client/linux_glimp_smp.o : $(UDIR)/linux_glimp.c; $(DO_SMP_CC)  $(GL_CFLAGS) 
Lines 81-95 Link Here
81
 $(B)/client/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC)  $(GL_CFLAGS) 
298
 $(B)/client/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC)  $(GL_CFLAGS) 
82
 $(B)/client/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) 
299
 $(B)/client/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) 
83
 $(B)/client/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) 
300
 $(B)/client/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) 
84
@@ -1629,7 +1626,6 @@
301
+$(B)/client/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_CC) $(GL_CFLAGS)
302
 $(B)/client/snd_mixa.o : $(UDIR)/snd_mixa.s; $(DO_AS) 
303
 $(B)/client/matha.o : $(UDIR)/matha.s; $(DO_AS) 
304
 
305
@@ -912,13 +921,17 @@
306
 	$(B)/ded/unix_main.o \
307
 	$(B)/ded/unix_net.o \
308
 	$(B)/ded/unix_shared.o \
309
+	$(B)/ded/linux_signals.o \
310
 	\
311
 	$(B)/ded/null_client.o \
312
 	$(B)/ded/null_input.o \
313
 	$(B)/ded/null_snddma.o
314
 
315
 ifeq ($(ARCH),i386)
316
-  Q3DOBJ += $(B)/ded/vm_x86.o $(B)/ded/ftol.o $(B)/ded/snapvector.o
317
+  Q3DOBJ += $(B)/ded/ftol.o $(B)/ded/snapvector.o
318
+  ifeq ($(DLL_ONLY),false)
319
+  Q3DOBJ += $(B)/ded/vm_x86.o
320
+  endif
321
 endif
322
 
323
 ifeq ($(ARCH),ppc)
324
@@ -927,7 +940,7 @@
325
   endif
326
 endif
327
 
328
-$(B)/$(PLATFORM)q3ded : $(Q3DOBJ)
329
+$(B)/q3ded : $(Q3DOBJ)
330
 	$(CC)  -o $@ $(Q3DOBJ) $(LDFLAGS)
331
 
332
 $(B)/ded/sv_bot.o : $(SDIR)/sv_bot.c; $(DO_DED_CC) 
333
@@ -988,6 +1001,7 @@
334
 $(B)/ded/unix_main.o : $(UDIR)/unix_main.c; $(DO_DED_CC) 
335
 $(B)/ded/unix_net.o : $(UDIR)/unix_net.c; $(DO_DED_CC) 
336
 $(B)/ded/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_DED_CC) 
337
+$(B)/ded/linux_signals.o : $(UDIR)/linux_signals.c; $(DO_DED_CC)
338
 $(B)/ded/null_client.o : $(NDIR)/null_client.c; $(DO_DED_CC) 
339
 $(B)/ded/null_input.o : $(NDIR)/null_input.c; $(DO_DED_CC) 
340
 $(B)/ded/null_snddma.o : $(NDIR)/null_snddma.c; $(DO_DED_CC) 
341
@@ -1068,7 +1082,7 @@
342
 	$(B)/baseq3/cgame/q_math.o \
343
 	$(B)/baseq3/cgame/q_shared.o
344
 
345
-$(B)/baseq3/cgame$(ARCH).$(SHLIBEXT) : $(Q3CGOBJ)
346
+$(B)/baseq3/cgame.$(SHLIBEXT) : $(Q3CGOBJ)
347
 	$(CC)  $(SHLIBLDFLAGS) -o $@ $(Q3CGOBJ)
348
 
349
 $(B)/baseq3/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC)         
350
@@ -1128,7 +1142,7 @@
351
 	$(B)/missionpack/cgame/q_shared.o \
352
 	$(B)/missionpack/cgame/ui_shared.o
353
 
354
-$(B)/missionpack/cgame$(ARCH).$(SHLIBEXT) : $(MPCGOBJ)
355
+$(B)/missionpack/cgame.$(SHLIBEXT) : $(MPCGOBJ)
356
 	$(CC) $(SHLIBLDFLAGS) -o $@ $(MPCGOBJ)
357
 
358
 $(B)/missionpack/cgame/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC)     -DMISSIONPACK 
359
@@ -1200,7 +1214,7 @@
360
 	$(B)/baseq3/game/q_math.o \
361
 	$(B)/baseq3/game/q_shared.o
362
 
363
-$(B)/baseq3/qagame$(ARCH).$(SHLIBEXT) : $(Q3GOBJ)
364
+$(B)/baseq3/qagame.$(SHLIBEXT) : $(Q3GOBJ)
365
 	$(CC)  $(SHLIBLDFLAGS) -o $@ $(Q3GOBJ)
366
 
367
 $(B)/baseq3/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC)     
368
@@ -1278,7 +1292,7 @@
369
 	$(B)/missionpack/game/q_math.o \
370
 	$(B)/missionpack/game/q_shared.o
371
 
372
-$(B)/missionpack/qagame$(ARCH).$(SHLIBEXT) : $(MPGOBJ)
373
+$(B)/missionpack/qagame.$(SHLIBEXT) : $(MPGOBJ)
374
 	$(CC) $(SHLIBLDFLAGS) -o $@ $(MPGOBJ)
375
 
376
 $(B)/missionpack/game/ai_chat.o : $(GDIR)/ai_chat.c; $(DO_SHLIB_CC)    -DMISSIONPACK 
377
@@ -1367,7 +1381,7 @@
378
         $(B)/baseq3/ui/q_math.o \
379
         $(B)/baseq3/ui/q_shared.o
380
 
381
-$(B)/baseq3/ui$(ARCH).$(SHLIBEXT) : $(Q3UIOBJ)
382
+$(B)/baseq3/ui.$(SHLIBEXT) : $(Q3UIOBJ)
383
 	$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3UIOBJ)
384
 
385
 $(B)/baseq3/ui/bg_misc.o : $(GDIR)/bg_misc.c; $(DO_SHLIB_CC) 
386
@@ -1410,7 +1424,7 @@
387
 $(B)/baseq3/ui/ui_startserver.o : $(Q3UIDIR)/ui_startserver.c; $(DO_SHLIB_CC) 
388
 $(B)/baseq3/ui/ui_team.o : $(Q3UIDIR)/ui_team.c; $(DO_SHLIB_CC) 
389
 $(B)/baseq3/ui/ui_teamorders.o : $(Q3UIDIR)/ui_teamorders.c; $(DO_SHLIB_CC) 
390
-$(B)/baseq3/ui/ui_syscalls.o : $(Q3UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) 
391
+$(B)/baseq3/ui/ui_syscalls.o : $(UIDIR)/ui_syscalls.c; $(DO_SHLIB_CC) 
392
 $(B)/baseq3/ui/ui_video.o : $(Q3UIDIR)/ui_video.c; $(DO_SHLIB_CC) 
393
 
394
 # bk001205 - these wre the only SHLIB compiles in 1.17
395
@@ -1450,7 +1464,7 @@
396
 #	$(B)/missionpack/ui/q_math.o \
397
 #	$(B)/missionpack/ui/q_shared.o
398
 
399
-$(B)/missionpack/ui$(ARCH).$(SHLIBEXT) : $(MPUIOBJ)
400
+$(B)/missionpack/ui.$(SHLIBEXT) : $(MPUIOBJ)
401
 	$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(MPUIOBJ)
402
 
403
 $(B)/missionpack/ui/ui_atoms.o : $(UIDIR)/ui_atoms.c; $(DO_SHLIB_CC)  -DMISSIONPACK  
404
@@ -1613,23 +1627,8 @@
405
 	$(B)/q3static/unix_net.o \
406
 	$(B)/q3static/unix_shared.o \
85
 	\
407
 	\
408
-	$(B)/q3static/ahoptim.o  \
409
-	$(B)/q3static/autohint.o \
410
-	$(B)/q3static/ftbase.o   \
411
-	$(B)/q3static/ftdebug.o  \
412
-	$(B)/q3static/ftglyph.o  \
413
-	$(B)/q3static/ftinit.o   \
414
-	$(B)/q3static/ftmm.o     \
415
-	$(B)/q3static/ftsystem.o \
416
-	$(B)/q3static/raster1.o  \
417
-	$(B)/q3static/sfnt.o     \
418
-	$(B)/q3static/sfobjs.o   \
419
-	$(B)/q3static/smooth.o   \
420
-	$(B)/q3static/truetype.o \
421
-	\
86
 	$(B)/q3static/linux_qgl.o \
422
 	$(B)/q3static/linux_qgl.o \
87
 	$(B)/q3static/linux_glimp.o \
423
 	$(B)/q3static/linux_glimp.o \
88
-	$(B)/q3static/linux_joystick.o \
424
-	$(B)/q3static/linux_joystick.o \
89
 	$(B)/q3static/linux_snd.o \
425
 	$(B)/q3static/linux_snd.o \
90
 	$(B)/q3static/snd_mixa.o \
426
 	$(B)/q3static/snd_mixa.o \
91
 	$(B)/q3static/matha.o
427
 	$(B)/q3static/matha.o
92
@@ -1779,7 +1775,6 @@
428
@@ -1779,7 +1778,6 @@
93
 $(B)/q3static/unix_net.o : $(UDIR)/unix_net.c; $(DO_CC) -DQ3_STATIC 
429
 $(B)/q3static/unix_net.o : $(UDIR)/unix_net.c; $(DO_CC) -DQ3_STATIC 
94
 $(B)/q3static/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_CC) -DQ3_STATIC 
430
 $(B)/q3static/unix_shared.o : $(UDIR)/unix_shared.c; $(DO_CC) -DQ3_STATIC 
95
 $(B)/q3static/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) -DQ3_STATIC 
431
 $(B)/q3static/linux_glimp.o : $(UDIR)/linux_glimp.c; $(DO_CC) -DQ3_STATIC 
Lines 97-99 Link Here
97
 $(B)/q3static/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) -DQ3_STATIC 
433
 $(B)/q3static/linux_qgl.o : $(UDIR)/linux_qgl.c; $(DO_CC) -DQ3_STATIC 
98
 $(B)/q3static/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) -DQ3_STATIC 
434
 $(B)/q3static/linux_input.o : $(UDIR)/linux_input.c; $(DO_CC) -DQ3_STATIC 
99
 $(B)/q3static/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -DQ3_STATIC 
435
 $(B)/q3static/linux_snd.o : $(UDIR)/linux_snd.c; $(DO_CC) -DQ3_STATIC 
436
@@ -2020,7 +2018,7 @@
437
 
438
 
439
 
440
-$(B)/$(PLATFORM)q3static : $(Q3SOBJ) 
441
+$(B)/q3static : $(Q3SOBJ) 
442
 	$(CC) $(CFLAGS) -o $@ $(Q3SOBJ)  $(GLLDFLAGS) $(LDFLAGS) 
443
 
444
 
445
@@ -2059,9 +2057,9 @@
446
 
447
 copyfiles:
448
 	-mkdirhier $(COPYDIR)
449
-	cp $(BR)/linuxquake3 $(COPYDIR)/quake3.x86
450
-	strip $(COPYDIR)/quake3.x86
451
-	chmod 755 $(COPYDIR)/quake3.x86
452
+	cp $(BR)/linuxquake3 $(COPYDIR)/quake3
453
+	strip $(COPYDIR)/quake3
454
+	chmod 755 $(COPYDIR)/quake3
455
 	cp $(BR)/linuxq3ded $(COPYDIR)/q3ded
456
 	strip $(COPYDIR)/q3ded
457
 	chmod 755 $(COPYDIR)/q3ded
(-)files/patch-code-unix-cons (-27 lines)
Removed Link Here
1
--- code/unix/cons.orig	Fri Jun 14 13:01:32 2002
2
+++ code/unix/cons	Wed Nov 23 10:32:49 2005
3
@@ -271,11 +271,11 @@
4
      # Defaults for a typical (?) UNIX platform.
5
      # Your mileage may vary.
6
      'unix' => [
7
-		'CC'             => 'cc',
8
-		'CFLAGS'         => '',
9
+		'CC'             => $ENV{CC},
10
+		'CFLAGS'         => $ENV{CFLAGS},
11
 		'CCCOM'          => '%CC %CFLAGS %_IFLAGS -c %< -o %>',
12
-		'CXX'            => '%CC',
13
-		'CXXFLAGS'       => '%CFLAGS',
14
+		'CXX'            => $ENV{CXX},
15
+		'CXXFLAGS'       => $ENV{CXXFLAGS},
16
 		'CXXCOM'         => '%CXX %CXXFLAGS %_IFLAGS -c %< -o %>',
17
 		'INCDIRPREFIX'   => '-I',
18
 		'INCDIRSUFFIX'   => '',
19
@@ -294,7 +294,7 @@
20
 		'LD'             => 'ld',
21
 		'LDFLAGS'        => '',
22
 		'PREFLIB'        => 'lib',
23
-		'ENV'            => { 'PATH' => '/bin:/usr/bin' },
24
+		'ENV'            => { 'PATH' => '/bin:/usr/bin:/usr/local/bin' },
25
 		],
26
      );
27
 
(-)files/patch-code-unix-unix_main.c (+58 lines)
Added Link Here
1
--- code/unix/unix_main.c.orig	Thu May 25 16:59:37 2006
2
+++ code/unix/unix_main.c	Thu May 25 17:00:58 2006
3
@@ -707,12 +707,12 @@
4
 {
5
   void *libHandle;
6
   void  (*dllEntry)( int (*syscallptr)(int, ...) );
7
-  char  curpath[MAX_OSPATH];
8
   char  fname[MAX_OSPATH];
9
   char  *basepath;
10
   char  *homepath;
11
   char  *pwdpath;
12
   char  *gamedir;
13
+  char  *libdir = LIBDIR;
14
   char  *fn;
15
   const char*  err = NULL;
16
 	
17
@@ -721,18 +721,7 @@
18
   // bk001206 - let's have some paranoia
19
   assert( name );
20
 
21
-  getcwd(curpath, sizeof(curpath));
22
-#if defined __i386__
23
-  snprintf (fname, sizeof(fname), "%si386.so", name);
24
-#elif defined __powerpc__   //rcg010207 - PPC support.
25
-  snprintf (fname, sizeof(fname), "%sppc.so", name);
26
-#elif defined __axp__
27
-  snprintf (fname, sizeof(fname), "%saxp.so", name);
28
-#elif defined __mips__
29
-  snprintf (fname, sizeof(fname), "%smips.so", name);
30
-#else
31
-#error Unknown arch
32
-#endif
33
+  snprintf (fname, sizeof(fname), "%s.so", name);
34
 
35
 // bk001129 - was RTLD_LAZY 
36
 #define Q_RTLD    RTLD_NOW
37
@@ -742,10 +731,19 @@
38
   homepath = Cvar_VariableString( "fs_homepath" );
39
   gamedir = Cvar_VariableString( "fs_game" );
40
 
41
-  // pwdpath
42
-  fn = FS_BuildOSPath( pwdpath, gamedir, fname );
43
+  // libdir
44
+  fn = FS_BuildOSPath( libdir, gamedir, fname );
45
   Com_Printf( "Sys_LoadDll(%s)... \n", fn );
46
   libHandle = dlopen( fn, Q_RTLD );
47
+
48
+  // pwdpath
49
+  if ( !libHandle )
50
+  {
51
+    Com_Printf( "Sys_LoadDll(%s) failed:\n\"%s\"\n", fn, dlerror() );
52
+    fn = FS_BuildOSPath( pwdpath, gamedir, fname );
53
+    Com_Printf( "Sys_LoadDll(%s)... \n", fn );
54
+    libHandle = dlopen( fn, Q_RTLD );
55
+  }
56
 
57
   if ( !libHandle )
58
   {
(-)files/patch-code-unix-unix_shared.c (-5 / +9 lines)
Lines 1-11 Link Here
1
--- code/unix/unix_shared.c.orig	Mon Aug 15 20:10:07 2005
1
--- code/unix/unix_shared.c.orig	Thu May 25 14:38:44 2006
2
+++ code/unix/unix_shared.c	Sun Nov 20 18:41:22 2005
2
+++ code/unix/unix_shared.c	Thu May 25 14:41:26 2006
3
@@ -38,7 +38,7 @@
3
@@ -38,7 +38,7 @@
4
 static char cdPath[MAX_OSPATH];
4
 static char cdPath[MAX_OSPATH];
5
 
5
 
6
 // Used to determine local installation path
6
 // Used to determine local installation path
7
-static char installPath[MAX_OSPATH];
7
-static char installPath[MAX_OSPATH];
8
+static char installPath[MAX_OSPATH] = %%Q3DIR%%;
8
+static char installPath[MAX_OSPATH] = DATADIR;
9
 
9
 
10
 // Used to determine where to store user-specific files
10
 // Used to determine where to store user-specific files
11
 static char homePath[MAX_OSPATH];
11
 static char homePath[MAX_OSPATH];
Lines 34-40 Link Here
34
 
34
 
35
 	// test the wrap issue
35
 	// test the wrap issue
36
 #if 0	
36
 #if 0	
37
@@ -136,7 +140,7 @@
37
@@ -136,10 +140,10 @@
38
 
38
 
39
 	return ret;
39
 	return ret;
40
 }
40
 }
Lines 42-45 Link Here
42
+// #endif
42
+// #endif
43
 
43
 
44
 //#if 0 // bk001215 - see snapvector.nasm for replacement
44
 //#if 0 // bk001215 - see snapvector.nasm for replacement
45
 #if (defined __APPLE__) // rcg010206 - using this for PPC builds...
45
-#if (defined __APPLE__) // rcg010206 - using this for PPC builds...
46
+#ifndef __i386__ // rcg010206 - using this for PPC builds...
47
 long fastftol( float f ) { // bk001213 - from win32/win_shared.c
48
   //static int tmp;
49
   //	__asm fld f
(-)files/patch-lcc-custom.mk (-6 lines)
Removed Link Here
1
diff -ruN ./lcc/custom.mk ../quake3-1.32b-BUILT/./lcc/custom.mk
2
--- ./lcc/custom.mk	Wed Oct 17 23:53:10 2001
3
+++ ../quake3-1.32b-BUILT/./lcc/custom.mk	Mon Aug 22 20:50:29 2005
4
@@ -1 +1 @@
5
-BUILDDIR=/tmp
6
+BUILDDIR=./build
(-)files/patch-lcc-makefile (-12 lines)
Removed Link Here
1
diff -ruN ./lcc/makefile ../quake3-1.32b-BUILT/./lcc/makefile
2
--- ./lcc/makefile	Wed Oct 17 23:53:10 2001
3
+++ ../quake3-1.32b-BUILT/./lcc/makefile	Mon Aug 22 20:59:15 2005
4
@@ -136,7 +136,7 @@
5
 
6
 $Blcc$E:	$Blcc$O $Bhost$O;	$(LD) $(LDFLAGS) -o $@ $Blcc$O $Bhost$O 
7
 
8
-SYSTEM=$(shell cc -print-search-dirs | head -n 1 | cut -b 10-)
9
+SYSTEM=/usr/lib
10
 
11
 $Blcc$O:	etc/lcc.c;	$(CC) $(CFLAGS) -c -DTEMPDIR=\"$(TEMPDIR)\" -o $@ etc/lcc.c
12
 $Bhost$O:	$(HOSTFILE);	$(CC) $(CFLAGS) -c -DSYSTEM=\"$(SYSTEM)\" -o $@ $(HOSTFILE)

Return to bug 97930