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

(-)Makefile (-15 / +18 lines)
Lines 19-51 Link Here
19
LIB_DEPENDS=	png.5:${PORTSDIR}/graphics/png
19
LIB_DEPENDS=	png.5:${PORTSDIR}/graphics/png
20
20
21
USE_ZIP=	yes
21
USE_ZIP=	yes
22
USE_DOS2UNIX=	yes
22
USE_GMAKE=	yes
23
USE_GMAKE=	yes
23
USE_GL=		yes
24
USE_GL=		yes
24
USE_SDL=	yes
25
USE_SDL=	yes
25
ONLY_FOR_ARCHS=	i386
26
26
27
DATADIR=	${Q1DIR}
27
OPTIONS=	X86_ASM "Enable use of x86 assembly code" on
28
28
29
WRKSRC=		${WRKDIR}/${PORTNAME}_0
29
WRKSRC=		${WRKDIR}/${PORTNAME}_0
30
BUILD_WRKSRC=	${WRKSRC}/linux
30
BUILD_WRKSRC=	${WRKSRC}/linux
31
MAKE_ENV=	DATADIR="${DATADIR}" \
31
MAKEFILE=	Makefile.i386linux
32
		PTHREAD_LIBS="${PTHREAD_LIBS}" \
32
MAKE_ENV=	PTHREAD_LIBS="${PTHREAD_LIBS}"
33
		SDL_CONFIG="${SDL_CONFIG}"
34
33
35
.include "${.CURDIR}/../quake-data/Makefile.include"
34
.include <bsd.port.pre.mk>
36
35
37
pre-patch:
36
.if !defined(WITHOUT_X86_ASM)
38
	@${REINPLACE_CMD} -e "s|$$(${PRINTF} '\r')||g" `${FIND} ${WRKSRC} -type f`
37
MAKE_ENV+=	USE_ASM=1
38
.endif
39
39
40
pre-build:
40
pre-build:
41
	@${LN} -sf ${WRKSRC}/linux/Makefile.i386linux ${WRKSRC}/linux/Makefile
41
	@cd ${BUILD_WRKSRC} && ${LN} -sf Makefile.i386linux Makefile
42
42
43
do-install:
43
do-install:
44
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/debugi386.glibc/bin/${PORTNAME}.run \
44
	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/release/bin/${PORTNAME} \
45
		${PREFIX}/bin/${PORTNAME}
45
		${PREFIX}/bin
46
	@${MKDIR} ${DATADIR}
46
	@${MKDIR} ${Q1DIR}/${PORTNAME}
47
	@${MKDIR} ${DATADIR}/${PORTNAME}
47
	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/Pak0.pak ${Q1DIR}/${PORTNAME}
48
	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}/Pak0.pak ${DATADIR}/${PORTNAME}
49
.ifndef (NOPORTDOCS)
48
.ifndef (NOPORTDOCS)
50
	@${MKDIR} ${DOCSDIR}
49
	@${MKDIR} ${DOCSDIR}
51
	${TR} -d '\r' <${WRKDIR}/Tenebrae_Readme.txt \
50
	${TR} -d '\r' <${WRKDIR}/Tenebrae_Readme.txt \
Lines 53-58 Link Here
53
.endif
52
.endif
54
53
55
post-install:
54
post-install:
55
	@${ECHO_CMD}
56
	@${CAT} ${PKGMESSAGE}
56
	@${CAT} ${PKGMESSAGE}
57
	@${ECHO_CMD}
58
59
.include "${.CURDIR}/../quake-data/Makefile.include"
57
60
58
.include <bsd.port.mk>
61
.include <bsd.port.post.mk>
(-)pkg-message (-4 / +11 lines)
Lines 1-4 Link Here
1
*******************************************************************************
1
==============================================================================
2
* Tenebrae Quake requires data files (id1 directory) from original game.
2
3
* Before running Tenebrae install them using games/quake-data port.
3
Tenebrae has been installed.
4
*******************************************************************************
4
5
If you hace sound problems try running it with the parameter
6
"-sndspeed <speed>", where "<speed>" could be 22050 or 44100 for example.
7
8
If you have rendering problems with water try to set the variable "r_novis" to
9
the value "1".
10
11
==============================================================================
(-)pkg-plist (-2 / +2 lines)
Lines 1-5 Link Here
1
bin/tenebrae
1
bin/tenebrae
2
%%DATADIR%%/tenebrae/Pak0.pak
2
%%Q1DIR%%/tenebrae/Pak0.pak
3
@dirrm %%DATADIR%%/tenebrae
3
@dirrm %%Q1DIR%%/tenebrae
4
%%PORTDOCS%%%%DOCSDIR%%/Tenebrae_Readme.txt
4
%%PORTDOCS%%%%DOCSDIR%%/Tenebrae_Readme.txt
5
%%PORTDOCS%%@dirrm %%DOCSDIR%%
5
%%PORTDOCS%%@dirrm %%DOCSDIR%%
(-)files/patch-cd__linux.c (-184 lines)
Removed Link Here
1
--- cd_linux.c.orig	Sun Mar 14 12:11:16 2004
2
+++ cd_linux.c	Sun Mar 14 12:24:07 2004
3
@@ -31,7 +31,7 @@
4
 #include <time.h>
5
 #include <errno.h>
6
 
7
-#include <linux/cdrom.h>
8
+#include <sys/cdio.h>
9
 
10
 #include "quakedef.h"
11
 
12
@@ -54,8 +54,8 @@
13
 	if (cdfile == -1 || !enabled)
14
 		return; // no cd init'd
15
 
16
-	if ( ioctl(cdfile, CDROMEJECT) == -1 ) 
17
-		Con_DPrintf("ioctl cdromeject failed\n");
18
+	if ( ioctl(cdfile, CDIOCEJECT) == -1 ) 
19
+		Con_DPrintf("ioctl CDIOCEJECT failed\n");
20
 }
21
 
22
 
23
@@ -64,30 +64,30 @@
24
 	if (cdfile == -1 || !enabled)
25
 		return; // no cd init'd
26
 
27
-	if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 ) 
28
-		Con_DPrintf("ioctl cdromclosetray failed\n");
29
+	if ( ioctl(cdfile, CDIOCCLOSE) == -1 ) 
30
+		Con_DPrintf("ioctl CDIOCCLOSE failed\n");
31
 }
32
 
33
 static int CDAudio_GetAudioDiskInfo(void)
34
 {
35
-	struct cdrom_tochdr tochdr;
36
+	struct ioc_toc_header tochdr;
37
 
38
 	cdValid = false;
39
 
40
-	if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 ) 
41
+	if ( ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1 ) 
42
     {
43
-      Con_DPrintf("ioctl cdromreadtochdr failed\n");
44
+      Con_DPrintf("ioctl CDIOREADTOCHEADER failed\n");
45
 	  return -1;
46
     }
47
 
48
-	if (tochdr.cdth_trk0 < 1)
49
+	if (tochdr.starting_track < 1)
50
 	{
51
 		Con_DPrintf("CDAudio: no music tracks\n");
52
 		return -1;
53
 	}
54
 
55
 	cdValid = true;
56
-	maxTrack = tochdr.cdth_trk1;
57
+	maxTrack = tochdr.ending_track;
58
 
59
 	return 0;
60
 }
61
@@ -95,8 +95,8 @@
62
 
63
 void CDAudio_Play(byte track, qboolean looping)
64
 {
65
-	struct cdrom_tocentry entry;
66
-	struct cdrom_ti ti;
67
+        struct ioc_read_toc_single_entry entry;
68
+        struct ioc_play_track ti;
69
 
70
 	if (cdfile == -1 || !enabled)
71
 		return;
72
@@ -115,7 +115,7 @@
73
 		Con_DPrintf("CDAudio: Bad track number %u.\n", track);
74
 		return;
75
 	}
76
-
77
+/*
78
 	// don't try to play a non-audio track
79
 	entry.cdte_track = track;
80
 	entry.cdte_format = CDROM_MSF;
81
@@ -129,7 +129,7 @@
82
 		Con_Printf("CDAudio: track %i is not audio\n", track);
83
 		return;
84
 	}
85
-
86
+*/
87
 	if (playing)
88
 	{
89
 		if (playTrack == track)
90
@@ -137,19 +137,19 @@
91
 		CDAudio_Stop();
92
 	}
93
 
94
-	ti.cdti_trk0 = track;
95
-	ti.cdti_trk1 = track;
96
-	ti.cdti_ind0 = 1;
97
-	ti.cdti_ind1 = 99;
98
-
99
-	if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 ) 
100
+        ti.start_track = track;
101
+        ti.end_track = track;
102
+        ti.start_index = 1;
103
+        ti.end_index = 99;
104
+        
105
+	if ( ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1 ) 
106
     {
107
-		Con_DPrintf("ioctl cdromplaytrkind failed\n");
108
+		Con_DPrintf("ioctl CDIOCPLAYTRACKS failed\n");
109
 		return;
110
     }
111
 
112
-	if ( ioctl(cdfile, CDROMRESUME) == -1 ) 
113
-		Con_DPrintf("ioctl cdromresume failed\n");
114
+	if ( ioctl(cdfile, CDIOCRESUME) == -1 ) 
115
+		Con_DPrintf("ioctl CDIOCRESUME failed\n");
116
 
117
 	playLooping = looping;
118
 	playTrack = track;
119
@@ -168,8 +168,8 @@
120
 	if (!playing)
121
 		return;
122
 
123
-	if ( ioctl(cdfile, CDROMSTOP) == -1 )
124
-		Con_DPrintf("ioctl cdromstop failed (%d)\n", errno);
125
+	if ( ioctl(cdfile, CDIOCSTOP) == -1 )
126
+		Con_DPrintf("ioctl CDIOCSTOP failed (%d)\n", errno);
127
 
128
 	wasPlaying = false;
129
 	playing = false;
130
@@ -183,8 +183,8 @@
131
 	if (!playing)
132
 		return;
133
 
134
-	if ( ioctl(cdfile, CDROMPAUSE) == -1 ) 
135
-		Con_DPrintf("ioctl cdrompause failed\n");
136
+	if ( ioctl(cdfile, CDIOCPAUSE) == -1 ) 
137
+		Con_DPrintf("ioctl CDIOCPAUSE failed\n");
138
 
139
 	wasPlaying = playing;
140
 	playing = false;
141
@@ -202,8 +202,8 @@
142
 	if (!wasPlaying)
143
 		return;
144
 	
145
-	if ( ioctl(cdfile, CDROMRESUME) == -1 ) 
146
-		Con_DPrintf("ioctl cdromresume failed\n");
147
+	if ( ioctl(cdfile, CDIOCRESUME) == -1 ) 
148
+		Con_DPrintf("ioctl CDIOCRESUME failed\n");
149
 	playing = true;
150
 }
151
 
152
@@ -327,7 +327,8 @@
153
 
154
 void CDAudio_Update(void)
155
 {
156
-	struct cdrom_subchnl subchnl;
157
+        struct ioc_read_subchannel subchnl;
158
+        struct cd_sub_channel_info data;
159
 	static time_t lastchk;
160
 
161
 	if (!enabled)
162
@@ -351,14 +352,17 @@
163
 
164
 	if (playing && lastchk < time(NULL)) {
165
 		lastchk = time(NULL) + 2; //two seconds between chks
166
-		subchnl.cdsc_format = CDROM_MSF;
167
-		if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 ) {
168
-			Con_DPrintf("ioctl cdromsubchnl failed\n");
169
+                subchnl.data = &data;
170
+                subchnl.data_len = sizeof(data);
171
+                subchnl.address_format = CD_MSF_FORMAT;
172
+                subchnl.data_format = CD_CURRENT_POSITION;
173
+		if (ioctl(cdfile, CDIOCREADSUBCHANNEL, (char*) &subchnl) == -1 ) {
174
+			Con_DPrintf("ioctl CDIOCREADSUBCHANNEL failed\n");
175
 			playing = false;
176
 			return;
177
 		}
178
-		if (subchnl.cdsc_audiostatus != CDROM_AUDIO_PLAY &&
179
-			subchnl.cdsc_audiostatus != CDROM_AUDIO_PAUSED) {
180
+		if (subchnl.data->header.audio_status != CD_AS_PLAY_IN_PROGRESS &&
181
+			subchnl.data->header.audio_status != CD_AS_PLAY_PAUSED) {
182
 			playing = false;
183
 			if (playLooping)
184
 				CDAudio_Play(playTrack, true);
(-)files/patch-cd_linux.c (+184 lines)
Added Link Here
1
--- ./cd_linux.c.orig	Sat Jun 10 12:08:13 2006
2
+++ ./cd_linux.c	Sat Jun 10 12:08:13 2006
3
@@ -31,7 +31,7 @@
4
 #include <time.h>
5
 #include <errno.h>
6
 
7
-#include <linux/cdrom.h>
8
+#include <sys/cdio.h>
9
 
10
 #include "quakedef.h"
11
 
12
@@ -54,8 +54,8 @@
13
 	if (cdfile == -1 || !enabled)
14
 		return; // no cd init'd
15
 
16
-	if ( ioctl(cdfile, CDROMEJECT) == -1 ) 
17
-		Con_DPrintf("ioctl cdromeject failed\n");
18
+	if ( ioctl(cdfile, CDIOCEJECT) == -1 ) 
19
+		Con_DPrintf("ioctl CDIOCEJECT failed\n");
20
 }
21
 
22
 
23
@@ -64,30 +64,30 @@
24
 	if (cdfile == -1 || !enabled)
25
 		return; // no cd init'd
26
 
27
-	if ( ioctl(cdfile, CDROMCLOSETRAY) == -1 ) 
28
-		Con_DPrintf("ioctl cdromclosetray failed\n");
29
+	if ( ioctl(cdfile, CDIOCCLOSE) == -1 ) 
30
+		Con_DPrintf("ioctl CDIOCCLOSE failed\n");
31
 }
32
 
33
 static int CDAudio_GetAudioDiskInfo(void)
34
 {
35
-	struct cdrom_tochdr tochdr;
36
+	struct ioc_toc_header tochdr;
37
 
38
 	cdValid = false;
39
 
40
-	if ( ioctl(cdfile, CDROMREADTOCHDR, &tochdr) == -1 ) 
41
+	if ( ioctl(cdfile, CDIOREADTOCHEADER, &tochdr) == -1 ) 
42
     {
43
-      Con_DPrintf("ioctl cdromreadtochdr failed\n");
44
+      Con_DPrintf("ioctl CDIOREADTOCHEADER failed\n");
45
 	  return -1;
46
     }
47
 
48
-	if (tochdr.cdth_trk0 < 1)
49
+	if (tochdr.starting_track < 1)
50
 	{
51
 		Con_DPrintf("CDAudio: no music tracks\n");
52
 		return -1;
53
 	}
54
 
55
 	cdValid = true;
56
-	maxTrack = tochdr.cdth_trk1;
57
+	maxTrack = tochdr.ending_track;
58
 
59
 	return 0;
60
 }
61
@@ -95,8 +95,8 @@
62
 
63
 void CDAudio_Play(byte track, qboolean looping)
64
 {
65
-	struct cdrom_tocentry entry;
66
-	struct cdrom_ti ti;
67
+        struct ioc_read_toc_single_entry entry;
68
+        struct ioc_play_track ti;
69
 
70
 	if (cdfile == -1 || !enabled)
71
 		return;
72
@@ -115,7 +115,7 @@
73
 		Con_DPrintf("CDAudio: Bad track number %u.\n", track);
74
 		return;
75
 	}
76
-
77
+/*
78
 	// don't try to play a non-audio track
79
 	entry.cdte_track = track;
80
 	entry.cdte_format = CDROM_MSF;
81
@@ -129,7 +129,7 @@
82
 		Con_Printf("CDAudio: track %i is not audio\n", track);
83
 		return;
84
 	}
85
-
86
+*/
87
 	if (playing)
88
 	{
89
 		if (playTrack == track)
90
@@ -137,19 +137,19 @@
91
 		CDAudio_Stop();
92
 	}
93
 
94
-	ti.cdti_trk0 = track;
95
-	ti.cdti_trk1 = track;
96
-	ti.cdti_ind0 = 1;
97
-	ti.cdti_ind1 = 99;
98
-
99
-	if ( ioctl(cdfile, CDROMPLAYTRKIND, &ti) == -1 ) 
100
+        ti.start_track = track;
101
+        ti.end_track = track;
102
+        ti.start_index = 1;
103
+        ti.end_index = 99;
104
+        
105
+	if ( ioctl(cdfile, CDIOCPLAYTRACKS, &ti) == -1 ) 
106
     {
107
-		Con_DPrintf("ioctl cdromplaytrkind failed\n");
108
+		Con_DPrintf("ioctl CDIOCPLAYTRACKS failed\n");
109
 		return;
110
     }
111
 
112
-	if ( ioctl(cdfile, CDROMRESUME) == -1 ) 
113
-		Con_DPrintf("ioctl cdromresume failed\n");
114
+	if ( ioctl(cdfile, CDIOCRESUME) == -1 ) 
115
+		Con_DPrintf("ioctl CDIOCRESUME failed\n");
116
 
117
 	playLooping = looping;
118
 	playTrack = track;
119
@@ -168,8 +168,8 @@
120
 	if (!playing)
121
 		return;
122
 
123
-	if ( ioctl(cdfile, CDROMSTOP) == -1 )
124
-		Con_DPrintf("ioctl cdromstop failed (%d)\n", errno);
125
+	if ( ioctl(cdfile, CDIOCSTOP) == -1 )
126
+		Con_DPrintf("ioctl CDIOCSTOP failed (%d)\n", errno);
127
 
128
 	wasPlaying = false;
129
 	playing = false;
130
@@ -183,8 +183,8 @@
131
 	if (!playing)
132
 		return;
133
 
134
-	if ( ioctl(cdfile, CDROMPAUSE) == -1 ) 
135
-		Con_DPrintf("ioctl cdrompause failed\n");
136
+	if ( ioctl(cdfile, CDIOCPAUSE) == -1 ) 
137
+		Con_DPrintf("ioctl CDIOCPAUSE failed\n");
138
 
139
 	wasPlaying = playing;
140
 	playing = false;
141
@@ -202,8 +202,8 @@
142
 	if (!wasPlaying)
143
 		return;
144
 	
145
-	if ( ioctl(cdfile, CDROMRESUME) == -1 ) 
146
-		Con_DPrintf("ioctl cdromresume failed\n");
147
+	if ( ioctl(cdfile, CDIOCRESUME) == -1 ) 
148
+		Con_DPrintf("ioctl CDIOCRESUME failed\n");
149
 	playing = true;
150
 }
151
 
152
@@ -327,7 +327,8 @@
153
 
154
 void CDAudio_Update(void)
155
 {
156
-	struct cdrom_subchnl subchnl;
157
+        struct ioc_read_subchannel subchnl;
158
+        struct cd_sub_channel_info data;
159
 	static time_t lastchk;
160
 
161
 	if (!enabled)
162
@@ -351,14 +352,17 @@
163
 
164
 	if (playing && lastchk < time(NULL)) {
165
 		lastchk = time(NULL) + 2; //two seconds between chks
166
-		subchnl.cdsc_format = CDROM_MSF;
167
-		if (ioctl(cdfile, CDROMSUBCHNL, &subchnl) == -1 ) {
168
-			Con_DPrintf("ioctl cdromsubchnl failed\n");
169
+                subchnl.data = &data;
170
+                subchnl.data_len = sizeof(data);
171
+                subchnl.address_format = CD_MSF_FORMAT;
172
+                subchnl.data_format = CD_CURRENT_POSITION;
173
+		if (ioctl(cdfile, CDIOCREADSUBCHANNEL, (char*) &subchnl) == -1 ) {
174
+			Con_DPrintf("ioctl CDIOCREADSUBCHANNEL failed\n");
175
 			playing = false;
176
 			return;
177
 		}
178
-		if (subchnl.cdsc_audiostatus != CDROM_AUDIO_PLAY &&
179
-			subchnl.cdsc_audiostatus != CDROM_AUDIO_PAUSED) {
180
+		if (subchnl.data->header.audio_status != CD_AS_PLAY_IN_PROGRESS &&
181
+			subchnl.data->header.audio_status != CD_AS_PLAY_PAUSED) {
182
 			playing = false;
183
 			if (playLooping)
184
 				CDAudio_Play(playTrack, true);
(-)files/patch-common.c (-3 / +5 lines)
Lines 1-11 Link Here
1
--- common.c.orig	Sun Mar 14 13:16:07 2004
1
--- ./common.c.orig	Sat Jun 10 12:08:13 2006
2
+++ common.c	Sun Mar 14 13:17:40 2004
2
+++ ./common.c	Sat Jun 10 12:08:13 2006
3
@@ -2221,6 +2221,8 @@
3
@@ -2221,7 +2221,10 @@
4
 		if ((userdir[j-1] == '\\') || (userdir[j-1] == '/'))
4
 		if ((userdir[j-1] == '\\') || (userdir[j-1] == '/'))
5
 			userdir[j-1] = 0;
5
 			userdir[j-1] = 0;
6
 	}
6
 	}
7
+
7
+
8
+	strncpy (com_prefdir, userdir, j);
8
+	strncpy (com_prefdir, userdir, j);
9
 	COM_AddGameFS (userdir);
9
 	COM_AddGameFS (userdir);
10
+	Sys_mkdir(com_gamedir);
10
 #endif
11
 #endif
11
 
12
 
13
 
(-)files/patch-common.h (-2 / +2 lines)
Lines 1-5 Link Here
1
--- common.h.orig	Sun Mar 14 13:19:04 2004
1
--- ./common.h.orig	Sat Jun 10 12:08:13 2006
2
+++ common.h	Sun Mar 14 13:19:50 2004
2
+++ ./common.h	Sat Jun 10 12:08:13 2006
3
@@ -169,6 +169,10 @@
3
@@ -169,6 +169,10 @@
4
 
4
 
5
 extern	char	com_gamedir[MAX_OSPATH];
5
 extern	char	com_gamedir[MAX_OSPATH];
(-)files/patch-gl__common.c (-16 lines)
Removed Link Here
1
--- gl_common.c.orig	Sun Mar 14 12:33:12 2004
2
+++ gl_common.c	Sun Mar 14 12:35:26 2004
3
@@ -248,11 +248,11 @@
4
      if (!strstr(gl_extensions, "GL_ARB_texture_env_dot3")) {
5
           Sys_Error ("ARB_texture_env_dot3 not found.\nProbably your 3d-card is not supported.\n");
6
      }
7
-
8
+#if 0
9
      if (!strstr(gl_extensions, "GL_ARB_texture_cube_map")) {
10
           Sys_Error ("ARB_texture_cube_map not found.\nProbably your 3d-card is not supported.\n");
11
      }
12
-
13
+#endif
14
      //Just spit a warning user prob has gl-1.2 or something
15
      if (!strstr(gl_extensions, "GL_SGI_texture_edge_clamp") &&
16
          !strstr(gl_extensions, "GL_EXT_texture_edge_clamp")) {
(-)files/patch-gl__vidlinuxglx.c (-10 lines)
Removed Link Here
1
--- gl_vidlinuxglx.c.orig	Sun Mar 14 12:27:06 2004
2
+++ gl_vidlinuxglx.c	Sun Mar 14 12:27:21 2004
3
@@ -20,7 +20,6 @@
4
 #include <termios.h>
5
 #include <sys/ioctl.h>
6
 #include <sys/stat.h>
7
-#include <sys/vt.h>
8
 #include <stdarg.h>
9
 #include <stdio.h>
10
 #include <signal.h>
(-)files/patch-gl_common.c (+16 lines)
Added Link Here
1
--- ./gl_common.c.orig	Sat Jun 10 12:08:13 2006
2
+++ ./gl_common.c	Sat Jun 10 12:08:13 2006
3
@@ -248,11 +248,11 @@
4
      if (!strstr(gl_extensions, "GL_ARB_texture_env_dot3")) {
5
           Sys_Error ("ARB_texture_env_dot3 not found.\nProbably your 3d-card is not supported.\n");
6
      }
7
-
8
+#if 0
9
      if (!strstr(gl_extensions, "GL_ARB_texture_cube_map")) {
10
           Sys_Error ("ARB_texture_cube_map not found.\nProbably your 3d-card is not supported.\n");
11
      }
12
-
13
+#endif
14
      //Just spit a warning user prob has gl-1.2 or something
15
      if (!strstr(gl_extensions, "GL_SGI_texture_edge_clamp") &&
16
          !strstr(gl_extensions, "GL_EXT_texture_edge_clamp")) {
(-)files/patch-gl_vidlinuxglx.c (+19 lines)
Added Link Here
1
--- ./gl_vidlinuxglx.c.orig	Sat Jun 10 12:08:13 2006
2
+++ ./gl_vidlinuxglx.c	Sat Jun 10 12:08:13 2006
3
@@ -20,7 +20,6 @@
4
 #include <termios.h>
5
 #include <sys/ioctl.h>
6
 #include <sys/stat.h>
7
-#include <sys/vt.h>
8
 #include <stdarg.h>
9
 #include <stdio.h>
10
 #include <signal.h>
11
@@ -339,8 +338,6 @@
12
 				{
13
 					mx += ((int)event.xmotion.x - mwx) * 2;
14
 					my += ((int)event.xmotion.y - mwy) * 2;
15
-					mwx = event.xmotion.x;
16
-					mwy = event.xmotion.y;
17
 
18
 					if (mx || my)
19
 						dowarp = true;
(-)files/patch-glquake.h (-5 / +2 lines)
Lines 1-8 Link Here
1
1
--- ./glquake.h.orig	Sat Jun 10 12:08:13 2006
2
$FreeBSD: ports/games/tenebrae/files/patch-glquake.h,v 1.1 2004/12/14 23:17:28 lesi Exp $
2
+++ ./glquake.h	Sat Jun 10 12:08:13 2006
3
4
--- glquake.h.orig
5
+++ glquake.h
6
@@ -419,8 +419,8 @@
3
@@ -419,8 +419,8 @@
7
 void R_TranslatePlayerSkin (int playernum);
4
 void R_TranslatePlayerSkin (int playernum);
8
 void GL_Bind (int texnum);
5
 void GL_Bind (int texnum);
(-)files/patch-linux_Makefile.i386linux (-80 lines)
Removed Link Here
1
--- linux/Makefile.i386linux.orig	Sun Mar 14 15:07:08 2004
2
+++ linux/Makefile.i386linux	Sun Mar 14 17:54:02 2004
3
@@ -18,30 +18,30 @@
4
 
5
 MOUNT_DIR     = ../
6
 
7
-MASTER_DIR    = /usr/local/share/games/quake
8
+MASTER_DIR    = ${DATADIR}
9
 
10
 BUILD_DEBUG_DIR = debug$(ARCH)$(GLIBC)
11
 BUILD_RELEASE_DIR = release$(ARCH)$(GLIBC)
12
 
13
-LEX           = /usr/bin/flex -i -Cfr
14
-CC            = /usr/bin/gcc
15
+LEX           ?= /usr/bin/flex -i -Cfr
16
+#CC            = /usr/bin/gcc
17
 
18
-X11_LIBS      = -L/usr/X11R6/lib -lpthread -lX11 -lXext -lXxf86dga -lXxf86vm
19
+X11_LIBS      = -L${X11BASE}/lib ${PTHREAD_LIBS} -lX11 -lXext -lXxf86dga -lXxf86vm
20
 
21
 # to enable OpenGL code in source 
22
-OPENGL_CFLAGS = -D__glx__ -DGLQUAKE
23
+OPENGL_CFLAGS = -D__glx__ -DGLQUAKE -I${X11BASE}/include
24
 OPENGL_LIBS   = -lGL -lGLU
25
 
26
-PNG_LIBS      = -lpng -lz
27
+PNG_LIBS      = -L${LOCALBASE}/lib -lpng -lz
28
 
29
 #OPENAL_LIBS   = -lopenal 
30
-#OPENAL_CFLAGS = -DOPENAL -I/usr/local/include/AL
31
+#OPENAL_CFLAGS = -DOPENAL -I${LOCALBASE}/include/AL
32
 
33
-BASE_CFLAGS   = -DBASEDIR="$(MASTER_DIR)" -DUSERPREF_DIR $(OPENGL_CFLAGS) $(OPENAL_CFLAGS) -I$(MOUNT_DIR)
34
-RELEASE_CFLAGS = $(BASE_CFLAGS) -mpentiumpro -O6 -ffast-math -funroll-loops \
35
+BASE_CFLAGS   = -DBASEDIR="$(MASTER_DIR)" -DUSERPREF_DIR $(OPENGL_CFLAGS) $(OPENAL_CFLAGS) -I$(MOUNT_DIR) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags`
36
+RELEASE_CFLAGS = $(BASE_CFLAGS) -ffast-math -funroll-loops \
37
 	-fomit-frame-pointer -fexpensive-optimizations
38
 DEBUG_CFLAGS  = $(BASE_CFLAGS) -g 
39
-LDFLAGS       = -lm -ldl $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS) 
40
+LDFLAGS       = -lm $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS) `${SDL_CONFIG} --libs`
41
 
42
 DO_GL_CC      = $(CC) $(CFLAGS) -o $@ -c $<
43
 DO_GL_AS      = $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
44
@@ -57,15 +57,15 @@
45
 	@-mkdir -p $(BUILD_DEBUG_DIR) \
46
 		$(BUILD_DEBUG_DIR)/bin \
47
 		$(BUILD_DEBUG_DIR)/glquake
48
-	$(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
49
+	$(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS+="$(DEBUG_CFLAGS)"
50
 
51
 build_release:
52
 	@-mkdir -p $(BUILD_RELEASE_DIR) \
53
 		$(BUILD_RELEASE_DIR)/bin \
54
 		$(BUILD_RELEASE_DIR)/glquake
55
-	$(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
56
+	$(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS+="$(RELEASE_CFLAGS)"
57
 
58
-all: build_debug build_release
59
+all: build_debug
60
 
61
 targets: $(TARGETS)
62
 
63
@@ -143,7 +143,7 @@
64
 	$(BUILDDIR)/glquake/snd_dma.o \
65
 	$(BUILDDIR)/glquake/snd_mem.o \
66
 	$(BUILDDIR)/glquake/snd_mix.o \
67
-	$(BUILDDIR)/glquake/snd_linux.o \
68
+	$(BUILDDIR)/glquake/snd_sdl.o \
69
 	$(BUILDDIR)/glquake/gl_vidlinuxglx.o \
70
 	$(BUILDDIR)/glquake/math.o \
71
 	$(BUILDDIR)/glquake/worlda.o \
72
@@ -361,7 +361,7 @@
73
 $(BUILDDIR)/glquake/snd_mix.o :      $(MOUNT_DIR)/snd_mix.c
74
 	$(DO_GL_CC)
75
 
76
-$(BUILDDIR)/glquake/snd_linux.o :    $(MOUNT_DIR)/snd_linux.c
77
+$(BUILDDIR)/glquake/snd_sdl.o :    $(MOUNT_DIR)/snd_sdl.c
78
 	$(DO_GL_CC)
79
 
80
 $(BUILDDIR)/glquake/math.o :         $(MOUNT_DIR)/math.s
(-)files/patch-linux__Makefile.i386linux (+108 lines)
Added Link Here
1
--- ./linux/Makefile.i386linux.orig	Sat Jun 10 12:08:13 2006
2
+++ ./linux/Makefile.i386linux	Sat Jun 10 12:12:17 2006
3
@@ -18,56 +18,60 @@
4
 
5
 MOUNT_DIR     = ../
6
 
7
-MASTER_DIR    = /usr/local/share/games/quake
8
+MASTER_DIR    = ${Q1DIR}
9
 
10
 BUILD_DEBUG_DIR = debug$(ARCH)$(GLIBC)
11
-BUILD_RELEASE_DIR = release$(ARCH)$(GLIBC)
12
+BUILD_RELEASE_DIR = release
13
 
14
-LEX           = /usr/bin/flex -i -Cfr
15
-CC            = /usr/bin/gcc
16
+LEX           ?= /usr/bin/flex -i -Cfr
17
+#CC            = /usr/bin/gcc
18
 
19
-X11_LIBS      = -L/usr/X11R6/lib -lpthread -lX11 -lXext -lXxf86dga -lXxf86vm
20
+X11_LIBS      = -L${X11BASE}/lib -lX11 -lXext -lXxf86dga -lXxf86vm
21
 
22
 # to enable OpenGL code in source 
23
-OPENGL_CFLAGS = -D__glx__ -DGLQUAKE
24
+OPENGL_CFLAGS = -D__glx__ -DGLQUAKE -I${X11BASE}/include
25
 OPENGL_LIBS   = -lGL -lGLU
26
 
27
-PNG_LIBS      = -lpng -lz
28
+PNG_LIBS      = -L${LOCALBASE}/lib -lpng -lz
29
 
30
 #OPENAL_LIBS   = -lopenal 
31
-#OPENAL_CFLAGS = -DOPENAL -I/usr/local/include/AL
32
+#OPENAL_CFLAGS = -DOPENAL -I${LOCALBASE}/include/AL
33
 
34
-BASE_CFLAGS   = -DBASEDIR="$(MASTER_DIR)" -DUSERPREF_DIR $(OPENGL_CFLAGS) $(OPENAL_CFLAGS) -I$(MOUNT_DIR)
35
-RELEASE_CFLAGS = $(BASE_CFLAGS) -mpentiumpro -O6 -ffast-math -funroll-loops \
36
+BASE_CFLAGS   = -DBASEDIR="$(MASTER_DIR)" -DUSERPREF_DIR $(OPENGL_CFLAGS) $(OPENAL_CFLAGS) -I$(MOUNT_DIR) -I${LOCALBASE}/include `${SDL_CONFIG} --cflags`
37
+RELEASE_CFLAGS = $(BASE_CFLAGS) -ffast-math -funroll-loops \
38
 	-fomit-frame-pointer -fexpensive-optimizations
39
 DEBUG_CFLAGS  = $(BASE_CFLAGS) -g 
40
-LDFLAGS       = -lm -ldl $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS) 
41
+LDFLAGS       += -lm $(X11_LIBS) $(OPENGL_LIBS) $(PNG_LIBS) $(OPENAL_LIBS) `${SDL_CONFIG} --libs`
42
 
43
 DO_GL_CC      = $(CC) $(CFLAGS) -o $@ -c $<
44
 DO_GL_AS      = $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $<
45
 DO_LEX        = $(LEX) -o$@ $< 
46
 
47
+ifdef USE_ASM
48
+BASE_CFLAGS += -DUSE_ASM
49
+endif
50
+
51
 #############################################################################
52
 # SETUP AND BUILD
53
 #############################################################################
54
 
55
-TARGETS=$(BUILDDIR)/bin/tenebrae.run
56
+TARGETS=$(BUILDDIR)/bin/tenebrae
57
+
58
+all: build_release
59
+
60
+targets: $(TARGETS)
61
 
62
 build_debug:
63
 	@-mkdir -p $(BUILD_DEBUG_DIR) \
64
 		$(BUILD_DEBUG_DIR)/bin \
65
 		$(BUILD_DEBUG_DIR)/glquake
66
-	$(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS="$(DEBUG_CFLAGS)"
67
+	$(MAKE) targets BUILDDIR=$(BUILD_DEBUG_DIR) CFLAGS+="$(DEBUG_CFLAGS)"
68
 
69
 build_release:
70
 	@-mkdir -p $(BUILD_RELEASE_DIR) \
71
 		$(BUILD_RELEASE_DIR)/bin \
72
 		$(BUILD_RELEASE_DIR)/glquake
73
-	$(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS="$(RELEASE_CFLAGS)"
74
-
75
-all: build_debug build_release
76
-
77
-targets: $(TARGETS)
78
+	$(MAKE) targets BUILDDIR=$(BUILD_RELEASE_DIR) CFLAGS+="$(RELEASE_CFLAGS)"
79
 
80
 #############################################################################
81
 # GLQuake
82
@@ -143,7 +147,7 @@
83
 	$(BUILDDIR)/glquake/snd_dma.o \
84
 	$(BUILDDIR)/glquake/snd_mem.o \
85
 	$(BUILDDIR)/glquake/snd_mix.o \
86
-	$(BUILDDIR)/glquake/snd_linux.o \
87
+	$(BUILDDIR)/glquake/snd_sdl.o \
88
 	$(BUILDDIR)/glquake/gl_vidlinuxglx.o \
89
 	$(BUILDDIR)/glquake/math.o \
90
 	$(BUILDDIR)/glquake/worlda.o \
91
@@ -154,7 +158,7 @@
92
 	$(BUILDDIR)/glquake/te_scripts.o 
93
 
94
 
95
-$(BUILDDIR)/bin/tenebrae.run : $(GLQUAKE_OBJS)
96
+$(BUILDDIR)/bin/tenebrae : $(GLQUAKE_OBJS)
97
 	$(CC) $(CFLAGS) -o $@ $(GLQUAKE_OBJS) $(LDFLAGS)
98
 
99
 $(BUILDDIR)/glquake/cl_demo.o :      $(MOUNT_DIR)/cl_demo.c
100
@@ -361,7 +365,7 @@
101
 $(BUILDDIR)/glquake/snd_mix.o :      $(MOUNT_DIR)/snd_mix.c
102
 	$(DO_GL_CC)
103
 
104
-$(BUILDDIR)/glquake/snd_linux.o :    $(MOUNT_DIR)/snd_linux.c
105
+$(BUILDDIR)/glquake/snd_sdl.o :    $(MOUNT_DIR)/snd_sdl.c
106
 	$(DO_GL_CC)
107
 
108
 $(BUILDDIR)/glquake/math.o :         $(MOUNT_DIR)/math.s
(-)files/patch-net.h (-2 / +2 lines)
Lines 1-5 Link Here
1
--- net.h.orig	Wed Mar 17 10:25:22 2004
1
--- ./net.h.orig	Sat Jun 10 12:08:13 2006
2
+++ net.h	Wed Mar 17 10:25:37 2004
2
+++ ./net.h	Sat Jun 10 12:08:13 2006
3
@@ -239,7 +239,7 @@
3
@@ -239,7 +239,7 @@
4
 extern int hostCacheCount;
4
 extern int hostCacheCount;
5
 extern hostcache_t hostcache[HOSTCACHESIZE];
5
 extern hostcache_t hostcache[HOSTCACHESIZE];
(-)files/patch-quakeasm.h (+11 lines)
Added Link Here
1
--- ./quakeasm.h.orig	Sat Jun 10 12:08:13 2006
2
+++ ./quakeasm.h	Sat Jun 10 12:08:13 2006
3
@@ -31,7 +31,7 @@
4
 
5
 #endif
6
 
7
-#ifdef __i386__
8
+#if defined(__i386__) && defined(USE_ASM)
9
 #define id386	1
10
 #else
11
 #define id386	0
(-)files/patch-quakedef.h (+14 lines)
Added Link Here
1
--- ./quakedef.h.orig	Sat Jun 10 12:08:13 2006
2
+++ ./quakedef.h	Sat Jun 10 12:08:13 2006
3
@@ -74,11 +74,6 @@
4
 
5
 #endif
6
 
7
-//PENTA: win32 we use assembler
8
-#if defined(_WIN32) || defined __glx__
9
-#define USE_ASM 1
10
-#endif
11
-
12
 #if defined(__i386__) && defined(USE_ASM)
13
 #define id386	1
14
 #else
(-)files/patch-snd__linux.c (-11 lines)
Removed Link Here
1
--- snd_linux.c.orig	Sun Mar 14 12:25:10 2004
2
+++ snd_linux.c	Sun Mar 14 12:25:46 2004
3
@@ -25,7 +25,7 @@
4
 #include <sys/mman.h>
5
 #include <sys/shm.h>
6
 #include <sys/wait.h>
7
-#include <linux/soundcard.h>
8
+#include <sys/soundcard.h>
9
 #include <stdio.h>
10
 #include "quakedef.h"
11
 
(-)files/patch-snd__sdl.c (-15 lines)
Removed Link Here
1
--- snd_sdl.c.orig	Sun Mar 14 17:59:19 2004
2
+++ snd_sdl.c	Sun Mar 14 17:59:35 2004
3
@@ -119,3 +119,12 @@
4
 	}
5
 }
6
 
7
+/*
8
+==============
9
+SNDDMA_Submit
10
+Send sound to device if buffer isn't really the dma buffer
11
+===============
12
+*/
13
+void SNDDMA_Submit(void)
14
+{
15
+}
(-)files/patch-snd_sdl.c (+24 lines)
Added Link Here
1
--- ./snd_sdl.c.orig	Sat Jun 10 12:08:13 2006
2
+++ ./snd_sdl.c	Sat Jun 10 12:08:13 2006
3
@@ -94,7 +94,7 @@
4
 	shm = &the_shm;
5
 	shm->splitbuffer = 0;
6
 	shm->samplebits = (obtained.format & 0xFF);
7
-        shm->speed = obtained.freq;
8
+        shm->speed = desired.freq;
9
         shm->channels = obtained.channels;
10
 	shm->samples = obtained.samples*shm->channels;
11
 	shm->samplepos = 0;
12
@@ -119,3 +119,12 @@
13
 	}
14
 }
15
 
16
+/*
17
+==============
18
+SNDDMA_Submit
19
+Send sound to device if buffer isn't really the dma buffer
20
+===============
21
+*/
22
+void SNDDMA_Submit(void)
23
+{
24
+}
(-)files/patch-sys__uxfindfirst.c (-11 lines)
Removed Link Here
1
--- sys_uxfindfirst.c.orig	Sun Mar 14 15:00:09 2004
2
+++ sys_uxfindfirst.c	Sun Mar 14 15:06:52 2004
3
@@ -36,7 +36,7 @@
4
 #include "quakedef.h"
5
 #include <errno.h>
6
 
7
-#if !defined(__GLIBC__)
8
+#if !defined(__GLIBC__) && !defined(__FreeBSD__)
9
 
10
 #include <dirent.h>
11
 #include <fnmatch.h>
(-)files/patch-sys_dosa.s (+15 lines)
Added Link Here
1
--- ./sys_dosa.s.orig	Sat Jun 10 12:08:13 2006
2
+++ ./sys_dosa.s	Sat Jun 10 12:08:13 2006
3
@@ -5,6 +5,7 @@
4
 #include "asm_i386.h"
5
 #include "quakeasm.h"
6
 
7
+#if id386
8
 
9
 	.data
10
 
11
@@ -93,3 +94,4 @@
12
 
13
 	ret
14
 
15
+#endif
(-)files/patch-sys_linux.c (+11 lines)
Added Link Here
1
--- ./sys_linux.c.orig	Sat Jun 10 12:08:13 2006
2
+++ ./sys_linux.c	Sat Jun 10 12:08:13 2006
3
@@ -27,7 +27,7 @@
4
 // user preference directory
5
 
6
 #if defined (USERPREF_DIR)
7
-char *prefdir=  ".quake";
8
+char *prefdir=  ".tenebrae";
9
 #endif
10
 
11
 #if defined (BASEDIR)
(-)files/patch-sys_uxfindfirst.c (+11 lines)
Added Link Here
1
--- ./sys_uxfindfirst.c.orig	Sat Jun 10 12:08:13 2006
2
+++ ./sys_uxfindfirst.c	Sat Jun 10 12:08:13 2006
3
@@ -36,7 +36,7 @@
4
 #include "quakedef.h"
5
 #include <errno.h>
6
 
7
-#if !defined(__GLIBC__)
8
+#if !defined(__GLIBC__) && !defined(__FreeBSD__)
9
 
10
 #include <dirent.h>
11
 #include <fnmatch.h>

Return to bug 98783