From f3325bfce54b0a3ff2d6b80341dd0dd83adc2d7b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] Added SDL (for aliguori) --- .hgignore | 1 + SDL/SDL-1.2.10-byteorder.patch | 21 ++++++ SDL/SDL-1.2.10-libdir.patch | 64 ++++++++++++++++++ SDL/SDL-1.2.10-pagesize.patch | 63 ++++++++++++++++++ SDL/SDL-1.2.11-dynamic-esd.patch | 19 ++++++ SDL/SDL-1.2.11-fixman.patch | 10 +++ SDL/SDL-1.2.12-disable_yasm.patch | 11 ++++ SDL/SDL-1.2.12-multilib.patch | 25 +++++++ SDL/SDL-1.2.12-x11dyn64.patch | 13 ++++ SDL/SDL-1.2.13-audiodriver.patch | 29 ++++++++ SDL/SDL-1.2.13-dynamic-pulse.patch | 40 +++++++++++ SDL/SDL-1.2.13-libdir.patch | 66 +++++++++++++++++++ SDL/SDL-1.2.13-pulse-rework.patch | 132 +++++++++++++++++++++++++++++++++++++ SDL/mingw32-SDL.spec | 101 ++++++++++++++++++++++++++++ 14 files changed, 595 insertions(+) create mode 100644 SDL/SDL-1.2.10-byteorder.patch create mode 100644 SDL/SDL-1.2.10-libdir.patch create mode 100644 SDL/SDL-1.2.10-pagesize.patch create mode 100644 SDL/SDL-1.2.11-dynamic-esd.patch create mode 100644 SDL/SDL-1.2.11-fixman.patch create mode 100644 SDL/SDL-1.2.12-disable_yasm.patch create mode 100644 SDL/SDL-1.2.12-multilib.patch create mode 100644 SDL/SDL-1.2.12-x11dyn64.patch create mode 100644 SDL/SDL-1.2.13-audiodriver.patch create mode 100644 SDL/SDL-1.2.13-dynamic-pulse.patch create mode 100644 SDL/SDL-1.2.13-libdir.patch create mode 100644 SDL/SDL-1.2.13-pulse-rework.patch create mode 100644 SDL/mingw32-SDL.spec diff --git a/.hgignore b/.hgignore index 002bd69..1f723fa 100644 --- a/.hgignore +++ b/.hgignore @@ -3,6 +3,7 @@ syntax: glob *~ buildall.log +SDL/SDL-1.2.13.tar.gz atk/atk-1.23.5.tar.bz2 atk/atk-1.24.0.tar.bz2 binutils/binutils-2.18.50-20080109-2-src.tar.gz diff --git a/SDL/SDL-1.2.10-byteorder.patch b/SDL/SDL-1.2.10-byteorder.patch new file mode 100644 index 0000000..64273e5 --- /dev/null +++ b/SDL/SDL-1.2.10-byteorder.patch @@ -0,0 +1,21 @@ +--- SDL-1.2.10/include/SDL_endian.h.byteorder 2006-05-01 10:02:59.000000000 +0200 ++++ SDL-1.2.10/include/SDL_endian.h 2006-05-19 11:53:07.000000000 +0200 +@@ -32,6 +32,10 @@ + #define SDL_BIG_ENDIAN 4321 + + #ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */ ++#ifdef __linux__ ++#include ++#define SDL_BYTEORDER __BYTE_ORDER ++#else /* __linux __ */ + #if defined(__hppa__) || \ + defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \ + (defined(__MIPS__) && defined(__MISPEB__)) || \ +@@ -41,6 +45,7 @@ + #else + #define SDL_BYTEORDER SDL_LIL_ENDIAN + #endif ++#endif /* __linux __ */ + #endif /* !SDL_BYTEORDER */ + + diff --git a/SDL/SDL-1.2.10-libdir.patch b/SDL/SDL-1.2.10-libdir.patch new file mode 100644 index 0000000..27efa6a --- /dev/null +++ b/SDL/SDL-1.2.10-libdir.patch @@ -0,0 +1,64 @@ +--- SDL-1.2.10/configure.in.libdir 2006-05-17 05:16:07.000000000 +0200 ++++ SDL-1.2.10/configure.in 2006-05-19 11:05:42.000000000 +0200 +@@ -324,12 +324,13 @@ + AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]), + , enable_alsa_shared=yes) + if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then +- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/lib $ALSA_LIBS" +- elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/lib $ALSA_LIBS" +- elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS" ++ pfx=${libdir##*/} ++ if test "x`ls /${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/local/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/local/${pfx} $ALSA_LIBS" + fi + fi + alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'` +@@ -480,7 +481,8 @@ + AC_ARG_ENABLE(arts-shared, + AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]), + , enable_arts_shared=yes) +- arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*" ++ pfx=${libdir##*/} ++ arts_lib_spec="$ARTS_PREFIX/${pfx}/libartsc.so.*" + arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` + echo "-- $arts_lib_spec -> $arts_lib" + +--- SDL-1.2.10/configure.libdir 2006-05-17 08:53:45.000000000 +0200 ++++ SDL-1.2.10/configure 2006-05-19 11:06:08.000000000 +0200 +@@ -24063,12 +24063,13 @@ + enable_alsa_shared=yes + fi; + if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then +- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/lib $ALSA_LIBS" +- elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/lib $ALSA_LIBS" +- elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS" ++ pfx=${libdir##*/} ++ if test "x`ls /${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/local/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/local/${pfx} $ALSA_LIBS" + fi + fi + alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libasound.so.*/'` +@@ -24704,7 +24705,8 @@ + else + enable_arts_shared=yes + fi; +- arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*" ++ pfx=${libdir##*/} ++ arts_lib_spec="$ARTS_PREFIX/${pfx}/libartsc.so.*" + arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` + echo "-- $arts_lib_spec -> $arts_lib" + diff --git a/SDL/SDL-1.2.10-pagesize.patch b/SDL/SDL-1.2.10-pagesize.patch new file mode 100644 index 0000000..8ef3ee5 --- /dev/null +++ b/SDL/SDL-1.2.10-pagesize.patch @@ -0,0 +1,63 @@ +--- SDL-1.2.10/src/video/ps2gs/SDL_gsyuv.c.pagesize 2006-05-17 05:16:07.000000000 +0200 ++++ SDL-1.2.10/src/video/ps2gs/SDL_gsyuv.c 2006-05-22 16:15:46.000000000 +0200 +@@ -27,7 +27,8 @@ + #include + #include + #include +-#include /* For definition of PAGE_SIZE */ ++/* There is no PAGE_SIZE define anymore, use sysconf from unistd.h instead */ ++#include + + #include "SDL_video.h" + #include "SDL_gsyuv_c.h" +@@ -180,7 +181,7 @@ + + /* Allocate a DMA area for pixel conversion */ + bpp = this->screen->format->BytesPerPixel; +- map_offset = (mapped_len + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); ++ map_offset = (mapped_len + ((int)sysconf(_SC_PAGE_SIZE) - 1)) & ~((int)sysconf(_SC_PAGE_SIZE) - 1); + hwdata->dma_len = hwdata->macroblocks * (16 * 16 + 8 * 8 + 8 * 8) + + width * height * bpp + + hwdata->macroblocks * (16 * sizeof(long long)) + +--- SDL-1.2.10/src/video/Xext/Xxf86dga/XF86DGA.c.pagesize 2006-05-01 10:02:47.000000000 +0200 ++++ SDL-1.2.10/src/video/Xext/Xxf86dga/XF86DGA.c 2006-05-22 16:15:25.000000000 +0200 +@@ -18,7 +18,6 @@ + #define HAS_MMAP_ANON + #include + #include +-#include /* PAGE_SIZE */ + #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ + #define HAS_GETPAGESIZE + #endif /* linux */ +@@ -491,10 +490,6 @@ + if (pagesize == -1) + pagesize = getpagesize(); + #endif +-#ifdef PAGE_SIZE +- if (pagesize == -1) +- pagesize = PAGE_SIZE; +-#endif + if (pagesize == -1) + pagesize = 4096; + +--- SDL-1.2.10/src/video/fbcon/SDL_fbvideo.c.pagesize 2006-05-17 05:16:07.000000000 +0200 ++++ SDL-1.2.10/src/video/fbcon/SDL_fbvideo.c 2006-05-22 16:16:05.000000000 +0200 +@@ -29,7 +29,8 @@ + #include + #include + #include +-#include /* For definition of PAGE_SIZE */ ++/* There is no PAGE_SIZE define anymore, use sysconf from unistd.h instead */ ++#include + #include + + #include "SDL_video.h" +@@ -547,7 +548,7 @@ + + /* Memory map the device, compensating for buggy PPC mmap() */ + mapped_offset = (((long)finfo.smem_start) - +- (((long)finfo.smem_start)&~(PAGE_SIZE-1))); ++ (((long)finfo.smem_start)&~((int)sysconf(_SC_PAGE_SIZE)-1))); + mapped_memlen = finfo.smem_len+mapped_offset; + mapped_mem = do_mmap(NULL, mapped_memlen, + PROT_READ|PROT_WRITE, MAP_SHARED, console_fd, 0); diff --git a/SDL/SDL-1.2.11-dynamic-esd.patch b/SDL/SDL-1.2.11-dynamic-esd.patch new file mode 100644 index 0000000..d63958b --- /dev/null +++ b/SDL/SDL-1.2.11-dynamic-esd.patch @@ -0,0 +1,19 @@ +--- SDL-1.2.11/configure.in.dynamic-esd 2007-03-19 17:44:47.000000000 +0100 ++++ SDL-1.2.11/configure.in 2007-03-19 17:44:47.000000000 +0100 +@@ -430,6 +430,16 @@ + AC_ARG_ENABLE(esd-shared, + AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [[default=yes]]]), + , enable_esd_shared=yes) ++ if test "x`echo $ESD_LIBS | grep -- -L`" = "x"; then ++ pfx=${libdir##*/} ++ if test "x`ls /${pfx}/libesd.so.* 2> /dev/null`" != "x"; then ++ ESD_LIBS="-L/${pfx} $ESD_LIBS" ++ elif test "x`ls /usr/${pfx}/libesd.so.* 2> /dev/null`" != "x"; then ++ ESD_LIBS="-L/usr/${pfx} $ESD_LIBS" ++ elif test "x`ls /usr/local/${pfx}/libesd.so.* 2> /dev/null`" != "x"; then ++ ESD_LIBS="-L/usr/local/${pfx} $ESD_LIBS" ++ fi ++ fi + esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'` + esd_lib=`ls -- $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` + echo "-- $esd_lib_spec -> $esd_lib" diff --git a/SDL/SDL-1.2.11-fixman.patch b/SDL/SDL-1.2.11-fixman.patch new file mode 100644 index 0000000..e8ecdf7 --- /dev/null +++ b/SDL/SDL-1.2.11-fixman.patch @@ -0,0 +1,10 @@ +--- SDL-1.2.11/docs/man3/SDL_ListModes.3.fixman 2007-03-19 18:01:29.000000000 +0100 ++++ SDL-1.2.11/docs/man3/SDL_ListModes.3 2007-03-19 18:01:34.000000000 +0100 +@@ -1,6 +1,6 @@ + .TH "SDL_ListModes" "3" "Tue 11 Sep 2001, 23:01" "SDL" "SDL API Reference" + .SH "NAME" +-SDL_ListModes\- Returns a pointer to an array of available screen dimensions for the given format and video flags ++SDL_ListModes \- Returns a pointer to an array of available screen dimensions for the given format and video flags + .SH "SYNOPSIS" + .PP + \fB#include "SDL\&.h" diff --git a/SDL/SDL-1.2.12-disable_yasm.patch b/SDL/SDL-1.2.12-disable_yasm.patch new file mode 100644 index 0000000..2f9f977 --- /dev/null +++ b/SDL/SDL-1.2.12-disable_yasm.patch @@ -0,0 +1,11 @@ +diff -up SDL-1.2.12/configure.in.disable_yasm SDL-1.2.12/configure.in +--- SDL-1.2.12/configure.in.disable_yasm 2007-08-27 18:24:44.000000000 +0200 ++++ SDL-1.2.12/configure.in 2007-08-27 18:25:04.000000000 +0200 +@@ -715,7 +715,6 @@ AC_HELP_STRING([--enable-nasm], [use nas + esac + fi + +- AC_PATH_PROG(NASM, yasm) + echo "%ifidn __OUTPUT_FORMAT__,elf" > unquoted-sections + echo "section .note.GNU-stack noalloc noexec nowrite progbits" >> unquoted-sections + echo "%endif" >> unquoted-sections diff --git a/SDL/SDL-1.2.12-multilib.patch b/SDL/SDL-1.2.12-multilib.patch new file mode 100644 index 0000000..29e6319 --- /dev/null +++ b/SDL/SDL-1.2.12-multilib.patch @@ -0,0 +1,25 @@ +diff -up SDL-1.2.12/sdl-config.in.multilib SDL-1.2.12/sdl-config.in +--- SDL-1.2.12/sdl-config.in.multilib 2007-07-20 07:52:45.000000000 +0200 ++++ SDL-1.2.12/sdl-config.in 2007-11-06 17:07:25.000000000 +0100 +@@ -3,7 +3,6 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + exec_prefix_set=no +-libdir=@libdir@ + + @ENABLE_STATIC_FALSE@usage="\ + @ENABLE_STATIC_FALSE@Usage: sdl-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]" +@@ -45,11 +44,11 @@ while test $# -gt 0; do + echo -I@includedir@/SDL @SDL_CFLAGS@ + ;; + @ENABLE_SHARED_TRUE@ --libs) +-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ ++@ENABLE_SHARED_TRUE@ echo @SDL_RLD_FLAGS@ @SDL_LIBS@ + @ENABLE_SHARED_TRUE@ ;; + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) +-@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ ++@ENABLE_STATIC_TRUE@ echo @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ + @ENABLE_STATIC_TRUE@ ;; + *) + echo "${usage}" 1>&2 diff --git a/SDL/SDL-1.2.12-x11dyn64.patch b/SDL/SDL-1.2.12-x11dyn64.patch new file mode 100644 index 0000000..6b6d9fe --- /dev/null +++ b/SDL/SDL-1.2.12-x11dyn64.patch @@ -0,0 +1,13 @@ +diff -up SDL-1.2.12/configure.in.x11dyn64 SDL-1.2.12/configure.in +--- SDL-1.2.12/configure.in.x11dyn64 2007-08-27 18:18:28.000000000 +0200 ++++ SDL-1.2.12/configure.in 2007-08-27 18:20:48.000000000 +0200 +@@ -950,7 +950,8 @@ AC_HELP_STRING([--enable-x11-shared], [d + ;; + *) + x11_lib_path=[`echo $X_LIBS | sed 's/.*-L\([^ ]*\).*/\1/'`] +- for path in $x11_lib_path /usr/lib /usr/X11/lib /usr/X11R6/lib; do ++ pfx=${libdir##*/} ++ for path in $x11_lib_path /usr/${pfx} /usr/lib /usr/X11/lib /usr/X11R6/lib; do + if test "x$x11_lib" = "x"; then + x11_lib=[`ls -- $path/libX11.so.[0-9] 2>/dev/null | sort -r | sed 's/.*\/\(.*\)/\1/; q'`] + if test "x$x11_lib" = "x"; then diff --git a/SDL/SDL-1.2.13-audiodriver.patch b/SDL/SDL-1.2.13-audiodriver.patch new file mode 100644 index 0000000..204e5e6 --- /dev/null +++ b/SDL/SDL-1.2.13-audiodriver.patch @@ -0,0 +1,29 @@ +diff -up SDL-1.2.13/src/audio/SDL_audio.c.audiodriver SDL-1.2.13/src/audio/SDL_audio.c +--- SDL-1.2.13/src/audio/SDL_audio.c.audiodriver 2007-12-31 05:47:59.000000000 +0100 ++++ SDL-1.2.13/src/audio/SDL_audio.c 2008-09-01 14:53:58.000000000 +0200 +@@ -36,6 +36,12 @@ + + /* Available audio drivers */ + static AudioBootStrap *bootstrap[] = { ++#if SDL_AUDIO_DRIVER_PULSE ++ &PULSE_bootstrap, ++#endif ++#if SDL_AUDIO_DRIVER_ALSA ++ &ALSA_bootstrap, ++#endif + #if SDL_AUDIO_DRIVER_BSD + &BSD_AUDIO_bootstrap, + #endif +@@ -43,12 +49,6 @@ static AudioBootStrap *bootstrap[] = { + &DSP_bootstrap, + &DMA_bootstrap, + #endif +-#if SDL_AUDIO_DRIVER_ALSA +- &ALSA_bootstrap, +-#endif +-#if SDL_AUDIO_DRIVER_PULSE +- &PULSE_bootstrap, +-#endif + #if SDL_AUDIO_DRIVER_QNXNTO + &QNXNTOAUDIO_bootstrap, + #endif diff --git a/SDL/SDL-1.2.13-dynamic-pulse.patch b/SDL/SDL-1.2.13-dynamic-pulse.patch new file mode 100644 index 0000000..9e222c7 --- /dev/null +++ b/SDL/SDL-1.2.13-dynamic-pulse.patch @@ -0,0 +1,40 @@ +diff -up SDL-1.2.13/configure.in.dynamic-pulse SDL-1.2.13/configure.in +--- SDL-1.2.13/configure.in.dynamic-pulse 2008-01-07 12:31:57.000000000 +0100 ++++ SDL-1.2.13/configure.in 2008-01-07 12:32:02.000000000 +0100 +@@ -500,14 +510,15 @@ AC_HELP_STRING([--enable-pulseaudio], [u + if test x$audio_pulse = xyes; then + AC_ARG_ENABLE(pulseaudio-shared, + AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]), +- , enable_pulse_shared=yes) ++ , enable_pulseaudio_shared=yes) + if test "x`echo $PULSE_LIBS | grep -- -L`" = "x"; then +- if test "x`ls /lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then +- PULSE_LIBS="-L/lib $PULSE_LIBS" +- elif test "x`ls /usr/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then +- PULSE_LIBS="-L/usr/lib $PULSE_LIBS" +- elif test "x`ls /usr/local/lib/libpulse-simple.so.* 2> /dev/null`" != "x"; then +- PULSE_LIBS="-L/usr/local/lib $PULSE_LIBS" ++ pfx=${libdir##*/} ++ if test "x`ls /${pfx}/libpulse-simple.so.* 2> /dev/null`" != "x"; then ++ PULSE_LIBS="-L/${pfx} $PULSE_LIBS" ++ elif test "x`ls /usr/${pfx}/libpulse-simple.so.* 2> /dev/null`" != "x"; then ++ PULSE_LIBS="-L/usr/${pfx} $PULSE_LIBS" ++ elif test "x`ls /usr/local/${pfx}/libpulse-simple.so.* 2> /dev/null`" != "x"; then ++ PULSE_LIBS="-L/usr/local/${pfx} $PULSE_LIBS" + fi + fi + pulse_lib_spec=`echo $PULSE_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libpulse-simple.so.*/'` +@@ -518,11 +529,11 @@ AC_HELP_STRING([--enable-pulseaudio-shar + SOURCES="$SOURCES $srcdir/src/audio/pulse/*.c" + EXTRA_CFLAGS="$EXTRA_CFLAGS $PULSE_CFLAGS" + if test x$have_loadso != xyes && \ +- test x$enable_pulse_shared = xyes; then ++ test x$enable_pulseaudio_shared = xyes; then + AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic PulseAudio loading]) + fi + if test x$have_loadso = xyes && \ +- test x$enable_pulse_shared = xyes && test x$pulse_lib != x; then ++ test x$enable_pulseaudio_shared = xyes && test x$pulse_lib != x; then + AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_PULSE_DYNAMIC, "$pulse_lib") + else + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PULSE_LIBS" diff --git a/SDL/SDL-1.2.13-libdir.patch b/SDL/SDL-1.2.13-libdir.patch new file mode 100644 index 0000000..be23609 --- /dev/null +++ b/SDL/SDL-1.2.13-libdir.patch @@ -0,0 +1,66 @@ +diff -up SDL-1.2.13/configure.in.libdir SDL-1.2.13/configure.in +--- SDL-1.2.13/configure.in.libdir 2007-12-31 05:48:39.000000000 +0100 ++++ SDL-1.2.13/configure.in 2008-01-07 11:56:10.000000000 +0100 +@@ -348,12 +348,13 @@ AC_HELP_STRING([--enable-alsa], [support + AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]), + , enable_alsa_shared=yes) + if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then +- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/lib $ALSA_LIBS" +- elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/lib $ALSA_LIBS" +- elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS" ++ pfx=${libdir##*/} ++ if test "x`ls /${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/local/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/local/${pfx} $ALSA_LIBS" + fi + fi + alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'` +@@ -561,7 +572,8 @@ AC_HELP_STRING([--enable-arts], [support + AC_ARG_ENABLE(arts-shared, + AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]), + , enable_arts_shared=yes) +- arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*" ++ pfx=${libdir##*/} ++ arts_lib_spec="$ARTS_PREFIX/${pfx}/libartsc.so.*" + arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` + echo "-- $arts_lib_spec -> $arts_lib" + +diff -up SDL-1.2.13/configure.libdir SDL-1.2.13/configure +--- SDL-1.2.13/configure.libdir 2007-12-31 06:09:39.000000000 +0100 ++++ SDL-1.2.13/configure 2008-01-07 12:01:32.000000000 +0100 +@@ -24888,12 +24888,13 @@ else + fi + + if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then +- if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/lib $ALSA_LIBS" +- elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/lib $ALSA_LIBS" +- elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then +- ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS" ++ pfx=${libdir##*/} ++ if test "x`ls /${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/${pfx} $ALSA_LIBS" ++ elif test "x`ls /usr/local/${pfx}/libasound.so.* 2> /dev/null`" != "x"; then ++ ALSA_LIBS="-L/usr/local/${pfx} $ALSA_LIBS" + fi + fi + alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([^ ]*\).*/\1\/libasound.so.*/'` +@@ -25643,7 +25634,8 @@ else + enable_arts_shared=yes + fi + +- arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*" ++ pfx=${libdir##*/} ++ arts_lib_spec="$ARTS_PREFIX/${pfx}/libartsc.so.*" + arts_lib=`ls -- $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'` + echo "-- $arts_lib_spec -> $arts_lib" + diff --git a/SDL/SDL-1.2.13-pulse-rework.patch b/SDL/SDL-1.2.13-pulse-rework.patch new file mode 100644 index 0000000..ce8d0e8 --- /dev/null +++ b/SDL/SDL-1.2.13-pulse-rework.patch @@ -0,0 +1,132 @@ +--- SDL-1.2.13/src/audio/pulse/SDL_pulseaudio.c 2007-12-31 05:47:58.000000000 +0100 ++++ SDL-1.2.13.lennart/src/audio/pulse/SDL_pulseaudio.c 2008-03-31 16:09:05.000000000 +0200 +@@ -1,3 +1,4 @@ ++/* -*- Mode: C; c-basic-offset: 8; indent-tabs-mode: t -*- */ + /* + SDL - Simple DirectMedia Layer + Copyright (C) 1997-2007 Sam Lantinga +@@ -18,7 +19,7 @@ + + Stéphan Kochen + stephan@kochen.nl +- ++ + Based on parts of the ALSA and ESounD output drivers. + */ + #include "SDL_config.h" +@@ -78,14 +79,14 @@ static int (*SDL_NAME(pa_simple_write))( + pa_simple *s, + const void *data, + size_t length, +- int *error ++ int *error + ); + static pa_channel_map* (*SDL_NAME(pa_channel_map_init_auto))( + pa_channel_map *m, + unsigned channels, + pa_channel_map_def_t def + ); +- ++ + + static struct { + const char *name; +@@ -158,16 +159,16 @@ static int Audio_Available(void) + if ( LoadPulseLibrary() < 0 ) { + return available; + } +- ++ + /* Connect with a dummy format. */ + paspec.format = PA_SAMPLE_U8; + paspec.rate = 11025; + paspec.channels = 1; + connection = SDL_NAME(pa_simple_new)( +- SDL_getenv("PASERVER"), /* server */ ++ NULL, /* server */ + "Test stream", /* application name */ + PA_STREAM_PLAYBACK, /* playback mode */ +- SDL_getenv("PADEVICE"), /* device on the server */ ++ NULL, /* device on the server */ + "Simple DirectMedia Layer", /* stream description */ + &paspec, /* sample format spec */ + NULL, /* channel map */ +@@ -178,7 +179,7 @@ static int Audio_Available(void) + available = 1; + SDL_NAME(pa_simple_free)(connection); + } +- ++ + UnloadPulseLibrary(); + return(available); + } +@@ -233,7 +234,7 @@ static void PULSE_WaitAudio(_THIS) + { + /* Check to see if the thread-parent process is still alive */ + { static int cnt = 0; +- /* Note that this only works with thread implementations ++ /* Note that this only works with thread implementations + that use a different process id for each thread. + */ + if (parent && (((++cnt)%10) == 0)) { /* Check every 10 loops */ +@@ -302,7 +303,7 @@ static int PULSE_OpenAudio(_THIS, SDL_Au + pa_sample_spec paspec; + pa_buffer_attr paattr; + pa_channel_map pacmap; +- ++ + paspec.format = PA_SAMPLE_INVALID; + for ( test_format = SDL_FirstAudioFormat(spec->format); test_format; ) { + switch ( test_format ) { +@@ -324,7 +325,7 @@ static int PULSE_OpenAudio(_THIS, SDL_Au + return(-1); + } + spec->format = test_format; +- ++ + paspec.channels = spec->channels; + paspec.rate = spec->freq; + +@@ -338,25 +339,24 @@ static int PULSE_OpenAudio(_THIS, SDL_Au + return(-1); + } + SDL_memset(mixbuf, spec->silence, spec->size); +- ++ + /* Reduced prebuffering compared to the defaults. */ +- paattr.tlength = mixlen; ++ paattr.tlength = mixlen*2; + paattr.minreq = mixlen; +- paattr.fragsize = mixlen; +- paattr.prebuf = mixlen; +- paattr.maxlength = mixlen * 4; +- ++ paattr.prebuf = mixlen*2; ++ paattr.maxlength = mixlen*2; ++ + /* The SDL ALSA output hints us that we use Windows' channel mapping */ + /* http://bugzilla.libsdl.org/show_bug.cgi?id=110 */ + SDL_NAME(pa_channel_map_init_auto)( + &pacmap, spec->channels, PA_CHANNEL_MAP_WAVEEX); +- ++ + /* Connect to the PulseAudio server */ + stream = SDL_NAME(pa_simple_new)( +- SDL_getenv("PASERVER"), /* server */ ++ NULL, /* server */ + get_progname(), /* application name */ + PA_STREAM_PLAYBACK, /* playback mode */ +- SDL_getenv("PADEVICE"), /* device on the server */ ++ NULL, /* device on the server */ + "Simple DirectMedia Layer", /* stream description */ + &paspec, /* sample format spec */ + &pacmap, /* channel map */ +@@ -371,7 +371,6 @@ static int PULSE_OpenAudio(_THIS, SDL_Au + + /* Get the parent process id (we're the parent of the audio thread) */ + parent = getpid(); +- ++ + return(0); + } +- diff --git a/SDL/mingw32-SDL.spec b/SDL/mingw32-SDL.spec new file mode 100644 index 0000000..f8db37a --- /dev/null +++ b/SDL/mingw32-SDL.spec @@ -0,0 +1,101 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-SDL +Version: 1.2.13 +Release: 1%{?dist} +Summary: MinGW Windows port of SDL cross-platform multimedia library + +License: LGPLv2+ +Group: Development/Libraries +URL: http://www.libsdl.org/ +Source0: http://www.libsdl.org/release/SDL-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +# Patches from native version. +Patch0: SDL-1.2.10-byteorder.patch +Patch17: SDL-1.2.13-libdir.patch +Patch21: SDL-1.2.12-multilib.patch +Patch23: SDL-1.2.11-dynamic-esd.patch +Patch24: SDL-1.2.12-x11dyn64.patch +Patch25: SDL-1.2.12-disable_yasm.patch +Patch26: SDL-1.2.13-dynamic-pulse.patch +Patch27: SDL-1.2.13-pulse-rework.patch +Patch28: SDL-1.2.13-audiodriver.patch + +BuildRequires: mingw32-filesystem >= 30 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils + +#%ifarch %{ix86} +#BuildRequires: nasm +#%endif + + +%description +Simple DirectMedia Layer (SDL) is a cross-platform multimedia library +designed to provide fast access to the graphics frame buffer and audio +device. + + +%prep +%setup -q -n SDL-%{version} +%patch0 -p1 -b .byteorder +%patch17 -p1 -b .libdir +%patch21 -p1 -b .multilib +%patch23 -p1 -b .dynamic-esd +%patch24 -p1 -b .x11dyn64 +%patch25 -p1 -b .disable_yasm +%patch26 -p1 -b .dynamic-pulse +%patch27 -p1 -b .pulse-rework +%patch28 -p1 -b .audiodriver + + +%build +%{_mingw32_configure} \ + --disable-video-svga --disable-video-ggi --disable-video-aalib \ + --disable-debug \ + --enable-sdl-dlopen \ + --enable-dlopen \ + --enable-arts-shared \ + --enable-esd-shared \ + --enable-pulseaudio-shared \ + --enable-alsa \ + --disable-rpath + +make + + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +# Remove static libraries but DON'T remove *.dll.a files. +rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libSDL.a +rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libSDLmain.a + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%{_mingw32_bindir}/SDL.dll +%{_mingw32_bindir}/sdl-config +%{_mingw32_libdir}/libSDL.dll.a +%{_mingw32_libdir}/libSDL.la +%{_mingw32_libdir}/pkgconfig/sdl.pc +%{_mingw32_datadir}/aclocal/sdl.m4 +%{_mingw32_mandir}/man3/*.3* +%{_mingw32_includedir}/SDL + + +%changelog +* Fri Oct 24 2008 Richard W.M. Jones - 1.2.13-1 +- Initial RPM release. -- 1.8.3.1