diff options
author | Alexander Leidinger <netchild@FreeBSD.org> | 2003-01-31 09:28:49 +0000 |
---|---|---|
committer | Alexander Leidinger <netchild@FreeBSD.org> | 2003-01-31 09:28:49 +0000 |
commit | 50ff37052c005c45ea6deeb329ffbb297855a7ec (patch) | |
tree | 0a8f86095a756bd7ecb898cec5404fed277ed68f /games/quakeforge/files | |
parent | 2314294cfdf6f0e974dbebc65dfeabdd493fb927 (diff) |
Notes
Diffstat (limited to 'games/quakeforge/files')
-rw-r--r-- | games/quakeforge/files/patch-aa | 171 | ||||
-rw-r--r-- | games/quakeforge/files/patch-ab | 51 | ||||
-rw-r--r-- | games/quakeforge/files/patch-ac | 52 | ||||
-rw-r--r-- | games/quakeforge/files/patch-ad | 53 | ||||
-rw-r--r-- | games/quakeforge/files/patch-ae | 13 | ||||
-rw-r--r-- | games/quakeforge/files/patch-af | 11 | ||||
-rw-r--r-- | games/quakeforge/files/patch-common_cd__sdl.c | 14 | ||||
-rw-r--r-- | games/quakeforge/files/patch-common_vid__sdl.c | 14 | ||||
-rw-r--r-- | games/quakeforge/files/patch-gl-snd | 31 |
9 files changed, 73 insertions, 337 deletions
diff --git a/games/quakeforge/files/patch-aa b/games/quakeforge/files/patch-aa index 5ff35452191a..0d8d5e12344a 100644 --- a/games/quakeforge/files/patch-aa +++ b/games/quakeforge/files/patch-aa @@ -1,164 +1,11 @@ ---- common/snd_oss.c.orig Wed Jan 19 13:01:04 2000 -+++ common/snd_oss.c Thu Mar 30 17:41:06 2000 -@@ -22,6 +22,7 @@ - #include "quakedef.h" +--- libs/audio/renderer/Makefile.in.orig Wed Nov 13 20:21:33 2002 ++++ libs/audio/renderer/Makefile.in Wed Nov 13 20:22:16 2002 +@@ -206,7 +206,7 @@ + AUTOMAKE_OPTIONS = foreign - #include <stdio.h> -+#ifndef SDL - #include <stdlib.h> - #ifdef HAVE_UNISTD_H - #include <unistd.h> -@@ -50,9 +51,30 @@ - static int snd_inited; + AM_CFLAGS = @PREFER_PIC@ +-INCLUDES = -I$(top_srcdir)/include ++INCLUDES = -I$(top_srcdir)/include $(VORBIS_CFLAGS) $(OGG_CFLAGS) + plugin_version = 1:0:0 - static int tryrates[] = { 11025, 22051, 44100, 8000 }; -+#else /* SDL */ -+#include "SDL_audio.h" -+#include "SDL_byteorder.h" -+ -+static dma_t the_shm; -+static int snd_inited; -+ -+extern int desired_speed; -+extern int desired_bits; -+ -+static void paint_audio(void *unused, Uint8 *stream, int len) -+{ -+ if ( shm ) { -+ shm->buffer = stream; -+ shm->samplepos += len/(shm->samplebits/8); -+ // Check for samplepos overflow? -+ S_PaintChannels (shm->samplepos); -+ } -+} -+#endif /*SDL */ - - qboolean SNDDMA_Init(void) - { -+#ifndef SDL - - int rc; - int fmt; -@@ -147,7 +169,7 @@ - // memory map the dma buffer - - shm->buffer = (unsigned char *) mmap(NULL, info.fragstotal -- * info.fragsize, PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0); -+ * info.fragsize, PROT_READ | PROT_WRITE, MAP_FILE|MAP_SHARED, audio_fd, 0); - - if (shm->buffer == MAP_FAILED) - { -@@ -240,11 +262,87 @@ - snd_inited = 1; - return 1; - -+#else /* SDL */ -+ -+ SDL_AudioSpec desired, obtained; -+ -+ snd_inited = 0; -+ -+ /* Set up the desired format */ -+ desired.freq = desired_speed; -+ switch (desired_bits) { -+ case 8: -+ desired.format = AUDIO_U8; -+ break; -+ case 16: -+ if ( SDL_BYTEORDER == SDL_BIG_ENDIAN ) -+ desired.format = AUDIO_S16MSB; -+ else -+ desired.format = AUDIO_S16LSB; -+ break; -+ default: -+ Con_Printf("Unknown number of audio bits: %d\n", -+ desired_bits); -+ return 0; -+ } -+ desired.channels = 2; -+ desired.samples = 512; -+ desired.callback = paint_audio; -+ -+ /* Open the audio device */ -+ if ( SDL_OpenAudio(&desired, &obtained) < 0 ) { -+ Con_Printf("Couldn't open SDL audio: %s\n", SDL_GetError()); -+ return 0; -+ } -+ -+ /* Make sure we can support the audio format */ -+ switch (obtained.format) { -+ case AUDIO_U8: -+ /* Supported */ -+ break; -+ case AUDIO_S16LSB: -+ case AUDIO_S16MSB: -+ if ( ((obtained.format == AUDIO_S16LSB) && -+ (SDL_BYTEORDER == SDL_LIL_ENDIAN)) || -+ ((obtained.format == AUDIO_S16MSB) && -+ (SDL_BYTEORDER == SDL_BIG_ENDIAN)) ) { -+ /* Supported */ -+ break; -+ } -+ /* Unsupported, fall through */; -+ default: -+ /* Not supported -- force SDL to do our bidding */ -+ SDL_CloseAudio(); -+ if ( SDL_OpenAudio(&desired, NULL) < 0 ) { -+ Con_Printf("Couldn't open SDL audio: %s\n", -+ SDL_GetError()); -+ return 0; -+ } -+ memcpy(&obtained, &desired, sizeof(desired)); -+ break; -+ } -+ SDL_PauseAudio(0); -+ -+ /* Fill the audio DMA information block */ -+ shm = &the_shm; -+ shm->splitbuffer = 0; -+ shm->samplebits = (obtained.format & 0xFF); -+ shm->speed = obtained.freq; -+ shm->channels = obtained.channels; -+ shm->samples = obtained.samples*shm->channels; -+ shm->samplepos = 0; -+ shm->submission_chunk = 1; -+ shm->buffer = NULL; -+ -+ snd_inited = 1; -+ return 1; -+#endif /* SDL */ - } - - int SNDDMA_GetDMAPos(void) - { - -+#ifndef SDL - struct count_info count; - - if (!snd_inited) return 0; -@@ -260,6 +358,7 @@ - // shm->samplepos = (count.bytes / (shm->samplebits / 8)) & (shm->samples-1); - // fprintf(stderr, "%d \r", count.ptr); - shm->samplepos = count.ptr / (shm->samplebits / 8); -+#endif /* SDL */ - - return shm->samplepos; - -@@ -267,11 +366,17 @@ - - void SNDDMA_Shutdown(void) - { -+ - if (snd_inited) - { -+#ifndef SDL - close(audio_fd); -+#else /* SDL */ -+ SDL_CloseAudio(); -+#endif - snd_inited = 0; - } -+ - } - - /* + plugin_PROGRAMS = @SND_REND_TARGETS@ diff --git a/games/quakeforge/files/patch-ab b/games/quakeforge/files/patch-ab index 00d831f65b03..57a656c45c55 100644 --- a/games/quakeforge/files/patch-ab +++ b/games/quakeforge/files/patch-ab @@ -1,32 +1,19 @@ - -$FreeBSD$ - ---- configure.in.orig Sun Feb 27 13:26:03 2000 -+++ configure.in Wed Apr 17 17:43:43 2002 -@@ -210,7 +210,7 @@ - fi - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $SDL_CFLAGS" -- AC_CHECK_HEADER(SDL/SDL.h, HAS_SDL=yes, HAS_SDL=no) -+ AC_CHECK_HEADER(SDL.h, HAS_SDL=yes, HAS_SDL=no) - CPPFLAGS="$save_CPPFLAGS" - fi - -@@ -335,7 +335,7 @@ - dnl Make sure -lpthread works (for SDL) - if test "x$HAS_SDL" = xyes; then - AC_CHECK_LIB(pthread, pthread_exit ,SDL_LIBS="$SDL_LIBS -lpthread" -- HAS_SDL=yes, HAS_SDL=no, [$SDL_LIBS]) -+ HAS_SDL=yes, HAS_SDL=yes, [$SDL_LIBS]) - fi - if test "x$HAS_SDL" != xyes; then - SDL_CFLAGS="" SDL_LIBS="" -@@ -343,7 +343,7 @@ - - dnl Make sure -lSDL works - if test "x$HAS_SDL" = xyes; then -- AC_CHECK_LIB(SDL, SDL_Init, SDL_LIBS="$SDL_LIBS -lSDL" -+ AC_CHECK_LIB(SDL-1.1, SDL_Init, SDL_LIBS="$SDL_LIBS" - HAS_SDL=yes, HAS_SDL=no, [$SDL_LIBS]) - fi - if test "x$HAS_SDL" != xyes; then +--- libs/util/quakeio.c.orig 16 Oct 2002 04:59:34 -0000 1.18 ++++ libs/util/quakeio.c 24 Oct 2002 22:36:15 -0000 1.19 +@@ -425,8 +425,14 @@ + res = fseek (file->file, offset, whence); + break; + case SEEK_END: +- res = fseek (file->file, +- file->start + file->size - offset, SEEK_SET); ++ if (file->size == -1) { ++ // we don't know the size (due to writing) so punt and ++ // pass on the request as-is ++ res = fseek (file->file, offset, SEEK_END); ++ } else { ++ res = fseek (file->file, ++ file->start + file->size - offset, SEEK_SET); ++ } + break; + default: + errno = EINVAL; diff --git a/games/quakeforge/files/patch-ac b/games/quakeforge/files/patch-ac index 46711cfe434c..42773123b4e4 100644 --- a/games/quakeforge/files/patch-ac +++ b/games/quakeforge/files/patch-ac @@ -1,42 +1,10 @@ ---- uquake/Makefile.in.orig Wed Jan 19 03:24:41 2000 -+++ uquake/Makefile.in Wed Apr 19 12:15:39 2000 -@@ -282,10 +282,13 @@ - $(COMMON_DIR)/@X11_VID_SRC@ - $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< - -+$(BUILD_DIR)/soft/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c -+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< -+ - $(X11QUAKE): soft_DIR $(BUILD_DIR)/../$(X11QUAKE) - - $(BUILD_DIR)/../$(X11QUAKE): $(ALL_X11_OBJS) -- $(CC) $(CFLAGS) $(ALL_X11_OBJS) $(X11_LDFLAGS) $(LDFLAGS) $(LIBS) \ -+ $(CC) $(CFLAGS) $(ALL_X11_OBJS) $(X11_LDFLAGS) $(SDL_LDFLAGS) $(LDFLAGS) $(LIBS) \ - -o $(BUILD_DIR)/../$(X11QUAKE) - - endif -@@ -358,6 +361,9 @@ - $(BUILD_DIR)/soft/cd_sdl.@OBJEXT@: $(COMMON_DIR)/cd_sdl.c - $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< - -+$(BUILD_DIR)/soft/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c -+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< -+ - $(SDLQUAKE): soft_DIR $(BUILD_DIR)/../$(SDLQUAKE) - - $(BUILD_DIR)/../$(SDLQUAKE): $(ALL_SDL_OBJS) -@@ -438,10 +444,13 @@ - $(BUILD_DIR)/gl/dga_check.@OBJEXT@: $(COMMON_DIR)/dga_check.c - $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< - -+$(BUILD_DIR)/soft/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c -+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< -+ - $(GLQUAKE): gl_DIR $(BUILD_DIR)/../$(GLQUAKE) - - $(BUILD_DIR)/../$(GLQUAKE): $(ALL_GL_OBJS) -- $(CC) $(CFLAGS) $(ALL_GL_OBJS) $(GL_LDFLAGS) $(LDFLAGS) $(LIBS) \ -+ $(CC) $(CFLAGS) $(ALL_GL_OBJS) $(GL_LDFLAGS) $(SDL_LDFLAGS) $(LDFLAGS) $(LIBS) \ - -o $(BUILD_DIR)/../$(GLQUAKE) - - endif +--- libs/audio/renderer/Makefile.am.orig Wed Nov 13 21:30:38 2002 ++++ libs/audio/renderer/Makefile.am Wed Nov 13 21:30:47 2002 +@@ -1,6 +1,6 @@ + AUTOMAKE_OPTIONS= foreign + +-AM_CFLAGS= @PREFER_PIC@ ++AM_CFLAGS= @PREFER_PIC@ @VORBIS_CFLAGS@ + INCLUDES= -I$(top_srcdir)/include + plugin_version= 1:0:0 + plugin_ldflags= @plugin_ldflags@ diff --git a/games/quakeforge/files/patch-ad b/games/quakeforge/files/patch-ad index 97f9a2db692b..83da6b11792a 100644 --- a/games/quakeforge/files/patch-ad +++ b/games/quakeforge/files/patch-ad @@ -1,42 +1,11 @@ ---- qw_client/Makefile.in.orig Wed Jan 19 03:24:41 2000 -+++ qw_client/Makefile.in Wed Apr 19 12:14:39 2000 -@@ -277,10 +277,13 @@ - $(COMMON_DIR)/@X11_VID_SRC@ - $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< - -+$(BUILD_DIR)/soft/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c -+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< -+ - $(X11QUAKE): soft_DIR $(BUILD_DIR)/../$(X11QUAKE) - - $(BUILD_DIR)/../$(X11QUAKE): $(ALL_X11_OBJS) -- $(CC) $(CFLAGS) $(ALL_X11_OBJS) $(X11_LDFLAGS) $(LDFLAGS) $(LIBS) \ -+ $(CC) $(CFLAGS) $(ALL_X11_OBJS) $(X11_LDFLAGS) $(SDL_LDFLAGS) $(LDFLAGS) $(LIBS) \ - -o $(BUILD_DIR)/../$(X11QUAKE) - - endif -@@ -353,6 +356,9 @@ - $(BUILD_DIR)/soft/cd_sdl.@OBJEXT@: $(COMMON_DIR)/cd_sdl.c - $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< - -+$(BUILD_DIR)/soft/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c -+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< -+ - $(SDLQUAKE): soft_DIR $(BUILD_DIR)/../$(SDLQUAKE) - - $(BUILD_DIR)/../$(SDLQUAKE): $(ALL_SDL_OBJS) -@@ -402,10 +408,13 @@ - $(BUILD_DIR)/gl/dga_check.@OBJEXT@: $(COMMON_DIR)/dga_check.c - $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< - -+$(BUILD_DIR)/soft/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c -+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< -+ - $(GLQUAKE): gl_DIR $(BUILD_DIR)/../$(GLQUAKE) - - $(BUILD_DIR)/../$(GLQUAKE): $(ALL_GL_OBJS) -- $(CC) $(CFLAGS) $(ALL_GL_OBJS) $(GL_LDFLAGS) $(LDFLAGS) $(LIBS) \ -+ $(CC) $(CFLAGS) $(ALL_GL_OBJS) $(GL_LDFLAGS) $(SDL_LDFLAGS) $(LDFLAGS) $(LIBS) \ - -o $(BUILD_DIR)/../$(GLQUAKE) - - endif +--- libs/audio/targets/snd_oss.c.orig Wed Nov 13 22:21:14 2002 ++++ libs/audio/targets/snd_oss.c Wed Nov 13 22:19:08 2002 +@@ -252,7 +252,7 @@ + if (mmaped_io) { // memory map the dma buffer + shm->buffer = (unsigned char *) mmap + (NULL, info.fragstotal * info.fragsize, +-#if (defined(BSD)) // workaround for BSD OSS quirk ++#if (defined(__FreeBSD__) && (__FreeBSD_version < 500000)) // workaround for BSD OSS quirk + PROT_READ | PROT_WRITE, + #else + PROT_WRITE, diff --git a/games/quakeforge/files/patch-ae b/games/quakeforge/files/patch-ae new file mode 100644 index 000000000000..3ebeacd18bb0 --- /dev/null +++ b/games/quakeforge/files/patch-ae @@ -0,0 +1,13 @@ +--- libs/video/targets/vid_svgalib.c.orig Mon Jan 13 20:14:39 2003 ++++ libs/video/targets/vid_svgalib.c Mon Jan 13 20:24:38 2003 +@@ -641,4 +641,10 @@ + { + asm ("outb %b0, %w1" : :"a"(val), "d"(port)); + } ++#elif defined(__FreeBSD__) ++static inline void ++outb (unsigned char value, unsigned short port) ++{ ++ __asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "d" (port)); ++} + #endif diff --git a/games/quakeforge/files/patch-af b/games/quakeforge/files/patch-af new file mode 100644 index 000000000000..3f628413c8ed --- /dev/null +++ b/games/quakeforge/files/patch-af @@ -0,0 +1,11 @@ +--- configure.orig Mon Jan 6 17:45:41 2003 ++++ configure Mon Jan 6 17:46:42 2003 +@@ -15588,7 +15588,7 @@ + no_sdl=yes + else + SDL_CFLAGS=`$SDL_CONFIG $sdlconf_args --cflags` +- SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` ++ SDL_LIBS=`$SDL_CONFIG $sdlconf_args --libs` # | sed 's/-lc_r/-pthread/'` + + sdl_major_version=`$SDL_CONFIG $sdl_args --version | \ + sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` diff --git a/games/quakeforge/files/patch-common_cd__sdl.c b/games/quakeforge/files/patch-common_cd__sdl.c deleted file mode 100644 index 4936a2d47ad6..000000000000 --- a/games/quakeforge/files/patch-common_cd__sdl.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- common/cd_sdl.c 2001/01/24 21:40:56 1.1 -+++ common/cd_sdl.c 2001/01/24 21:41:17 -@@ -24,7 +24,7 @@ - // of podged this together from the SDL headers, and the other cd-rom code. - // -- Mark Baker <homer1@together.net> - --#include <SDL/SDL.h> -+#include <SDL.h> - - #include "quakedef.h" - diff --git a/games/quakeforge/files/patch-common_vid__sdl.c b/games/quakeforge/files/patch-common_vid__sdl.c deleted file mode 100644 index ade3933985e5..000000000000 --- a/games/quakeforge/files/patch-common_vid__sdl.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- common/vid_sdl.c 2001/01/24 21:40:56 1.1 -+++ common/vid_sdl.c 2001/01/24 21:41:25 -@@ -21,7 +21,7 @@ - */ - // vid_sdl.h -- sdl video driver - --#include <SDL/SDL.h> -+#include <SDL.h> - #include "quakedef.h" - #include "d_local.h" - diff --git a/games/quakeforge/files/patch-gl-snd b/games/quakeforge/files/patch-gl-snd deleted file mode 100644 index 7f87b060eadc..000000000000 --- a/games/quakeforge/files/patch-gl-snd +++ /dev/null @@ -1,31 +0,0 @@ ---- uquake/Makefile.in.orig2 Tue May 14 21:27:45 2002 -+++ uquake/Makefile.in Wed May 15 15:09:43 2002 -@@ -203,6 +203,9 @@ - CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \ - $(CL_ADDITIONAL_GENERAL_SRC) $(SND_SRC) r_part.c - -+SDL_CFLAGS = @SDL_CFLAGS@ -DSDL -+SDL_LDFLAGS = @SDL_LIBS@ -+ - - ######################################################################## - # -@@ -352,9 +355,6 @@ - ALL_SDL_OBJS = $(patsubst %,$(BUILD_DIR)/soft/%,$(addsuffix .@OBJEXT@,\ - $(basename $(ALL_SDL_SRC) .c .s))) - --SDL_CFLAGS = @SDL_CFLAGS@ -DSDL --SDL_LDFLAGS = @SDL_LIBS@ -- - $(BUILD_DIR)/soft/vid_sdl.@OBJEXT@: $(COMMON_DIR)/vid_sdl.c - $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< - -@@ -447,7 +444,7 @@ - $(BUILD_DIR)/gl/dga_check.@OBJEXT@: $(COMMON_DIR)/dga_check.c - $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< - --$(BUILD_DIR)/soft/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c -+$(BUILD_DIR)/gl/snd_oss.@OBJEXT@: $(COMMON_DIR)/snd_oss.c - $(CC) $(CFLAGS) $(SDL_CFLAGS) -o $@ -c $< - - $(GLQUAKE): gl_DIR $(BUILD_DIR)/../$(GLQUAKE) |