aboutsummaryrefslogtreecommitdiff
path: root/games/vavoom/files
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2004-11-10 16:00:00 +0000
committerVolker Stolz <vs@FreeBSD.org>2004-11-10 16:00:00 +0000
commit5a4a7ccf230edd87442868816049f03f15f85286 (patch)
treea9a448c7729ba6d51783d59b10ca5ecab8865a62 /games/vavoom/files
parent72d4b805f87511c57a10791747e6b2cef781de18 (diff)
downloadports-5a4a7ccf230edd87442868816049f03f15f85286.tar.gz
ports-5a4a7ccf230edd87442868816049f03f15f85286.zip
Notes
Diffstat (limited to 'games/vavoom/files')
-rw-r--r--games/vavoom/files/patch-Makefile34
-rw-r--r--games/vavoom/files/patch-source-s_sdl.cpp150
-rw-r--r--games/vavoom/files/patch-utils_acc_Makefile21
-rw-r--r--games/vavoom/files/patch-utils_acc_misc.c11
-rw-r--r--games/vavoom/files/patch-utils_acc_token.c11
-rw-r--r--games/vavoom/files/patch-utils_glbsp_Plugin.mak24
-rw-r--r--games/vavoom/files/patch-utils_glvis_Makefile31
-rw-r--r--games/vavoom/files/patch-utils_vcc_Makefile41
-rw-r--r--games/vavoom/files/patch-utils_vlumpy_Makefile24
9 files changed, 183 insertions, 164 deletions
diff --git a/games/vavoom/files/patch-Makefile b/games/vavoom/files/patch-Makefile
index 08e1e9ed0e98..9906f395f472 100644
--- a/games/vavoom/files/patch-Makefile
+++ b/games/vavoom/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Fri Dec 19 20:00:14 2003
-+++ Makefile Fri Jan 23 16:41:34 2004
+--- Makefile.orig
++++ Makefile
@@ -8,7 +8,7 @@
#DEBUG = 1
@@ -9,7 +9,7 @@
# Uncomment to compile without OpenGL driver
#NOGL = 1
-@@ -70,7 +70,7 @@
+@@ -73,7 +73,7 @@
obj/sys_i386.o \
obj/sys_sdl.o
GL_SYS_OBJ = obj/gl_sdl.o
@@ -18,7 +18,7 @@
else
#-- Linux with Allegro --
SYS_OBJS = \
-@@ -214,7 +214,7 @@
+@@ -213,7 +213,7 @@
ifdef MESAGL
LIBS := -lMesaGL $(LIBS)
else
@@ -27,18 +27,24 @@
endif
endif
-@@ -308,8 +308,8 @@
+@@ -317,11 +317,11 @@
# ---------------------------------------
--C_ARGS = -c -W -Wall -march=pentiumpro -ffast-math
--CPP_ARGS = -c -W -Wall -march=pentiumpro -ffast-math
+-ARCH ?= -march=pentiumpro
+-export ARCH
+-C_ARGS = -c -W -Wall $(ARCH) -ffast-math
+-CPP_ARGS = -c -W -Wall $(ARCH) -ffast-math
+-ASM_ARGS = -c -W -Wall $(ARCH) -x assembler-with-cpp
++#ARCH ?= -march=pentiumpro
++#export ARCH
+C_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
-+CPP_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
- ASM_ARGS = -c -W -Wall -x assembler-with-cpp
++CPP_ARGS = -c ${CXXFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -ffast-math
++ASM_ARGS = -c ${CFLAGS} -I${X11BASE}/include `${SDL_CONFIG} --cflags` -W -Wall -x assembler-with-cpp
LINK_ARGS = -Wall
-@@ -337,7 +337,7 @@
+ ifdef DEBUG
+@@ -348,7 +348,7 @@
exe: Vavoom$(EXE)
Vavoom$(EXE): $(OBJ_FILES) $(LIB_FILES)
@@ -47,7 +53,7 @@
suid:
chown root.root Vavoom
-@@ -347,13 +347,13 @@
+@@ -358,13 +358,13 @@
addr2line -e Vavoom -f < crash.txt >> basev/debug.txt
obj/%.o : source/%.c
@@ -64,7 +70,7 @@
# ---------------------------------------
-@@ -370,16 +370,16 @@
+@@ -381,16 +381,16 @@
svexe: VavoomSV$(EXE)
VavoomSV$(EXE): $(SV_OBJ_FILES)
@@ -85,7 +91,7 @@
# ---------------------------------------
-@@ -415,11 +415,11 @@
+@@ -433,11 +433,11 @@
# ---------------------------------------
ifndef INSTALL
@@ -99,7 +105,7 @@
endif
ifndef INSTALL_GROUP
-@@ -511,8 +511,8 @@
+@@ -529,8 +529,8 @@
asm: $(ASM_FILES)
source/%.asm : source/%.s source/asm_i386.h source/gas2tasm.exe
diff --git a/games/vavoom/files/patch-source-s_sdl.cpp b/games/vavoom/files/patch-source-s_sdl.cpp
deleted file mode 100644
index 8a8c16414181..000000000000
--- a/games/vavoom/files/patch-source-s_sdl.cpp
+++ /dev/null
@@ -1,150 +0,0 @@
---- source/s_sdl.cpp.orig Sat Mar 8 14:08:04 2003
-+++ source/s_sdl.cpp Wed Jan 21 15:41:52 2004
-@@ -82,8 +82,8 @@
-
- IMPLEMENT_CLASS(VDefaultSoundDevice);
-
--static TCvarI mix_frequency ("mix_frequency", "22050", CVAR_ARCHIVE);
--static TCvarI mix_bits ("mix_bits", "16", CVAR_ARCHIVE);
-+static TCvarI mix_frequency ("mix_frequency", "44100", CVAR_ARCHIVE);
-+static TCvarI mix_bits ("mix_bits", "8", CVAR_ARCHIVE);
- static TCvarI mix_channels ("mix_channels", "2", CVAR_ARCHIVE);
-
- static TCvarI mix_chunksize ("mix_chunksize", "4096", CVAR_ARCHIVE);
-@@ -107,6 +107,8 @@
- static TVec listener_forward;
- static TVec listener_right;
- static TVec listener_up;
-+
-+SDL_AudioCVT wavecvt;
-
- // CODE --------------------------------------------------------------------
-
-@@ -337,6 +339,12 @@
- mix_bits = fmt & 0xFF;
- mix_channels = ch;
-
-+ if (SDL_BuildAudioCVT(&wavecvt, AUDIO_S8, 2, 4096,
-+ fmt, mix_channels, mix_frequency) == -1) {
-+ Sys_Error("SDL_BuildAudioCVT: failed.\n");
-+ return;
-+ }
-+
- channels = Z_CNew<channel_t>(mix_voices);
- for (i = 0; i < mix_voices; i++)
- {
-@@ -425,13 +433,23 @@
- return;
- }
-
-- // copy the lump to a SDL_Mixer chunk...
-- chunk = Mix_LoadRAW_RW(SDL_RWFromMem((void*)S_sfx[sound_id].data,
-- S_sfx[sound_id].len), 0, S_sfx[sound_id].freq, AUDIO_U8, 1);
-- if (chunk == NULL)
-- Sys_Error("Mix_LoadRAW_RW() failed!\n");
-- voice = Mix_LoadChannel(-1, chunk, 0);
--
-+ wavecvt.len = S_sfx[sound_id].len;
-+ wavecvt.buf = (Uint8*)malloc(wavecvt.len*wavecvt.len_mult);
-+ memcpy(wavecvt.buf, S_sfx[sound_id].data, S_sfx[sound_id].len);
-+
-+ if (SDL_ConvertAudio(&wavecvt) == -1) {
-+ Sys_Error("SDL_ConvertAudio: error during conversion\n");
-+ return;
-+ }
-+
-+ // copy the lump to a SDL_Mixer chunk...
-+ chunk = Mix_QuickLoad_RAW((Uint8*)wavecvt.buf,
-+ wavecvt.len*wavecvt.len_mult);
-+ if (chunk == NULL)
-+ Sys_Error("Mix_QuickLoad_RAW() failed!\n");
-+
-+ voice = Mix_PlayChannel(-1, chunk, 0);
-+
- if (voice < 0)
- {
- S_DoneWithLump(sound_id);
-@@ -448,9 +466,6 @@
- pitch = CalcPitch(S_sfx[sound_id].freq, sound_id);
- #warning how to set the pitch? (CS)
-
-- // ready to go...
-- Mix_Play(voice);
--
- channels[chan].origin_id = origin_id;
- channels[chan].origin = origin;
- channels[chan].channel = channel;
-@@ -501,22 +516,28 @@
- return;
- }
-
-- // copy the lump to a SDL_Mixer chunk...
-- chunk = Mix_LoadRAW_RW(SDL_RWFromMem((void*)S_VoiceInfo.data,
-- S_VoiceInfo.len), 0, S_VoiceInfo.freq, AUDIO_U8, 1);
-- if (chunk == NULL)
-- Sys_Error("Mix_LoadRAW_RW() failed!\n");
-- voice = Mix_LoadChannel(-1, chunk, 0);
--
-+ wavecvt.len = S_sfx[VOICE_SOUND_ID].len;
-+ wavecvt.buf = (Uint8*)malloc(wavecvt.len*wavecvt.len_mult);
-+ memcpy(wavecvt.buf, S_sfx[VOICE_SOUND_ID].data, S_sfx[VOICE_SOUND_ID].len);
-+
-+ if (SDL_ConvertAudio(&wavecvt) == -1) {
-+ Sys_Error("SDL_ConvertAudio: error during conversion\n");
-+ return;
-+ }
-+ // copy the lump to a SDL_Mixer chunk...
-+ chunk = Mix_QuickLoad_RAW((Uint8*)wavecvt.buf,
-+ wavecvt.len*wavecvt.len_mult);
-+ if (chunk == NULL)
-+ Sys_Error("Mix_QuickLoad_RAW() failed!\n");
-+
-+ voice = Mix_PlayChannel(-1, chunk, 0);
-+
- if (voice < 0)
- {
- S_DoneWithLump(VOICE_SOUND_ID);
- return;
- }
-
-- // ready to go...
-- Mix_Play(voice);
--
- channels[chan].origin_id = 0;
- channels[chan].origin = TVec(0, 0, 0);
- channels[chan].channel = 1;
-@@ -558,19 +579,26 @@
- return;
- }
-
-- chunk = Mix_LoadRAW_RW(SDL_RWFromMem((void*)S_sfx[sound_id].data,
-- S_sfx[sound_id].len), 0, S_sfx[sound_id].freq, AUDIO_U8, 1);
-- if (chunk == NULL)
-- Sys_Error("Mix_LoadRAW_RW() failed!\n");
--
-- voice = Mix_LoadChannel(-1, chunk, 0);
-+ wavecvt.len = S_sfx[sound_id].len;
-+ wavecvt.buf = (Uint8*)malloc(wavecvt.len*wavecvt.len_mult);
-+ memcpy(wavecvt.buf, S_sfx[sound_id].data, S_sfx[sound_id].len);
-+
-+ if (SDL_ConvertAudio(&wavecvt) == -1) {
-+ Sys_Error("SDL_ConvertAudio: error during conversion\n");
-+ return;
-+ }
-+ // copy the lump to a SDL_Mixer chunk...
-+ chunk = Mix_QuickLoad_RAW((Uint8*)wavecvt.buf,
-+ wavecvt.len*wavecvt.len_mult);
-+ if (chunk == NULL)
-+ Sys_Error("Mix_QuickLoad_RAW() failed!\n");
-+
-+ voice = Mix_PlayChannel(-1, chunk, 0);
-
- if (voice < 0)
- {
- return;
- }
--
-- Mix_Play(voice);
-
- start = Sys_Time();
- while (1)
diff --git a/games/vavoom/files/patch-utils_acc_Makefile b/games/vavoom/files/patch-utils_acc_Makefile
new file mode 100644
index 000000000000..2c1dd8320db7
--- /dev/null
+++ b/games/vavoom/files/patch-utils_acc_Makefile
@@ -0,0 +1,21 @@
+--- utils/acc/Makefile.orig
++++ utils/acc/Makefile
+@@ -6,7 +6,7 @@
+ #LIBS=-lstdc++
+ endif
+
+-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
++CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
+
+ OBJS = \
+ acc.o \
+@@ -21,7 +21,7 @@
+ all: ../bin/acc$(EXE)
+
+ ../bin/acc$(EXE): $(OBJS)
+- gcc -s -o $@ $^ $(LIBS)
++ ${CC} -s -o $@ $^ $(LIBS)
+
+ %.o : %.c *.h
+- gcc $(CFLAGS) -c -o $@ $<
++ ${CC} $(CFLAGS) -c -o $@ $<
diff --git a/games/vavoom/files/patch-utils_acc_misc.c b/games/vavoom/files/patch-utils_acc_misc.c
new file mode 100644
index 000000000000..7b718c0a4802
--- /dev/null
+++ b/games/vavoom/files/patch-utils_acc_misc.c
@@ -0,0 +1,11 @@
+--- utils/acc/misc.c.orig
++++ utils/acc/misc.c
+@@ -12,7 +12,7 @@
+ #else
+ #include <fcntl.h>
+ #include <stdlib.h>
+-#ifndef __linux__
++#if !defined(__linux__) && !defined(__FreeBSD__)
+ #include <io.h>
+ #endif
+ #include <sys/stat.h>
diff --git a/games/vavoom/files/patch-utils_acc_token.c b/games/vavoom/files/patch-utils_acc_token.c
new file mode 100644
index 000000000000..6a23ff5f83ea
--- /dev/null
+++ b/games/vavoom/files/patch-utils_acc_token.c
@@ -0,0 +1,11 @@
+--- utils/acc/token.c.orig
++++ utils/acc/token.c
+@@ -10,7 +10,7 @@
+ #ifdef __NeXT__
+ #include <libc.h>
+ #else
+-#ifndef __linux__
++#if !defined(__linux__) && !defined(__FreeBSD__)
+ #include <io.h>
+ #endif
+ #include <fcntl.h>
diff --git a/games/vavoom/files/patch-utils_glbsp_Plugin.mak b/games/vavoom/files/patch-utils_glbsp_Plugin.mak
new file mode 100644
index 000000000000..d3c9c86b9d29
--- /dev/null
+++ b/games/vavoom/files/patch-utils_glbsp_Plugin.mak
@@ -0,0 +1,24 @@
+--- utils/glbsp/Plugin.mak.orig
++++ utils/glbsp/Plugin.mak
+@@ -6,9 +6,9 @@
+
+ OUTNAME=libglbsp.a
+
+-CC=gcc
+-CFLAGS=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
+-AR=ar rc
++#CC=gcc
++CFLAGS+=-O3 -Wall -DGLBSP_PLUGIN -DUNIX -DINLINE_G=inline
++#AR=ar rc
+ RANLIB=ranlib
+
+ OBJS=$(MAIN)/analyze.o \
+@@ -31,7 +31,7 @@
+ rm -f $(OUTNAME) $(MAIN)/*.o
+
+ $(OUTNAME): $(OBJS)
+- $(AR) $(OUTNAME) $(OBJS)
++ $(AR) rc $(OUTNAME) $(OBJS)
+ $(RANLIB) $(OUTNAME)
+
+ .PHONY: all clean
diff --git a/games/vavoom/files/patch-utils_glvis_Makefile b/games/vavoom/files/patch-utils_glvis_Makefile
new file mode 100644
index 000000000000..91379be99922
--- /dev/null
+++ b/games/vavoom/files/patch-utils_glvis_Makefile
@@ -0,0 +1,31 @@
+--- utils/glvis/Makefile.orig
++++ utils/glvis/Makefile
+@@ -6,7 +6,7 @@
+ LIBS=-lstdc++
+ endif
+
+-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
++CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
+ LIB_OBJS = cmdlib.o wadlib.o level.o flow.o
+ OBJS = glvis.o
+ LIBS += -lm
+@@ -14,15 +14,15 @@
+ all: ../bin/glvis$(EXE)
+
+ ../bin/glvis$(EXE): $(OBJS) libglvis.a
+- gcc -s -o $@ $^ $(LIBS)
++ ${CC} -s -o $@ $^ $(LIBS)
+
+ libglvis.a: $(LIB_OBJS)
+- ar rc $@ $^
++ ${AR} rc $@ $^
+ ranlib $@
+
+ %.o: %.cpp *.h ../common/*.h
+- gcc $(CFLAGS) -I../common -c -o $@ $<
++ ${CC} $(CFLAGS) -I../common -c -o $@ $<
+
+ %.o: ../common/%.cpp ../common/*.h
+- gcc $(CFLAGS) -c -o $@ $<
++ ${CC} $(CFLAGS) -c -o $@ $<
+
diff --git a/games/vavoom/files/patch-utils_vcc_Makefile b/games/vavoom/files/patch-utils_vcc_Makefile
new file mode 100644
index 000000000000..bc23615914af
--- /dev/null
+++ b/games/vavoom/files/patch-utils_vcc_Makefile
@@ -0,0 +1,41 @@
+--- utils/vcc/Makefile.orig
++++ utils/vcc/Makefile
+@@ -6,7 +6,7 @@
+ LIBS=-lstdc++
+ endif
+
+-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
++CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
+
+ OBJS = \
+ cmdlib.o \
+@@ -35,19 +35,23 @@
+
+ all: ../bin/vcc$(EXE)
+
+-../bin/vcc$(EXE): $(OBJS) vcpp/libcpp.a
+- gcc -s -o $@ $^ $(LIBS)
++../bin/vcc$(EXE): $(OBJS) clean_libcpp vcpp/libcpp.a
++ ${CC} -s -o $@ $(OBJS) vcpp/libcpp.a $(LIBS)
+
++.PHONY: all clean_libcpp
++clean_libcpp:
++ ${RM} -rf vcpp/*.o vcpp/libcpp.a
++
+ vcpp/libcpp.a: $(CPP_OBJS)
+- ar rc $@ $^
++ ${AR} rc $@ $^
+ ranlib $@
+
+ %.o : %.cpp vcc.h ../../source/progdefs.h ../common/cmdlib.h
+- gcc $(CFLAGS) -I../common -c -o $@ $<
++ ${CC} $(CFLAGS) -I../common -c -o $@ $<
+
+ %.o : ../common/%.cpp ../common/cmdlib.h
+- gcc $(CFLAGS) -c -o $@ $<
++ ${CC} $(CFLAGS) -c -o $@ $<
+
+ vcpp/%.o : vcpp/%.cpp vcpp/cpp.h
+- gcc $(CFLAGS) -c -o $@ $<
++ ${CC} $(CFLAGS) -c -o $@ $<
+
diff --git a/games/vavoom/files/patch-utils_vlumpy_Makefile b/games/vavoom/files/patch-utils_vlumpy_Makefile
new file mode 100644
index 000000000000..4a655ef59d3e
--- /dev/null
+++ b/games/vavoom/files/patch-utils_vlumpy_Makefile
@@ -0,0 +1,24 @@
+--- utils/vlumpy/Makefile.orig
++++ utils/vlumpy/Makefile
+@@ -6,17 +6,17 @@
+ LIBS=-lm -lstdc++
+ endif
+
+-CFLAGS = -Wall -O3 -ffast-math -fomit-frame-pointer -march=pentiumpro
++CFLAGS += -Wall -O3 -ffast-math -fomit-frame-pointer
+ OBJS = cmdlib.o imglib.o scrlib.o wadlib.o vlumpy.o
+
+ all: ../bin/vlumpy$(EXE)
+
+ ../bin/vlumpy$(EXE): $(OBJS)
+- gcc -s -o $@ $(OBJS) $(LIBS)
++ ${CC} -s -o $@ $(OBJS) $(LIBS)
+
+ %.o: %.cpp ../common/*.h
+- gcc $(CFLAGS) -I../common -c -o $@ $<
++ ${CC} $(CFLAGS) -I../common -c -o $@ $<
+
+ %.o: ../common/%.cpp ../common/*.h
+- gcc $(CFLAGS) -c -o $@ $<
++ ${CC} $(CFLAGS) -c -o $@ $<
+