From 854846e872145ea73a37ade1aa4e46fa9f73ce2b Mon Sep 17 00:00:00 2001 From: Thomas Woerner Date: Sep 02 2008 14:58:48 +0000 Subject: - dropped pulseaudio hack (rhbz#448270) - pulseaudio is now used by default - simplified spec file for new architecture support (rhbz#433618) --- diff --git a/SDL-1.2.12-preferalsa.patch b/SDL-1.2.12-preferalsa.patch deleted file mode 100644 index 7d8ee75..0000000 --- a/SDL-1.2.12-preferalsa.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff -up SDL-1.2.12/src/audio/SDL_audio.c.preferalsa SDL-1.2.12/src/audio/SDL_audio.c ---- SDL-1.2.12/src/audio/SDL_audio.c.preferalsa 2007-08-27 18:15:34.000000000 +0200 -+++ SDL-1.2.12/src/audio/SDL_audio.c 2007-08-27 18:16:23.000000000 +0200 -@@ -36,6 +36,15 @@ - - /* Available audio drivers */ - static AudioBootStrap *bootstrap[] = { -+#if SDL_AUDIO_DRIVER_ALSA -+ &ALSA_bootstrap, -+#endif -+#if SDL_AUDIO_DRIVER_ARTS -+ &ARTS_bootstrap, -+#endif -+#if SDL_AUDIO_DRIVER_ESD -+ &ESD_bootstrap, -+#endif - #if SDL_AUDIO_DRIVER_BSD - &BSD_AUDIO_bootstrap, - #endif -@@ -43,9 +52,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 -@@ -58,12 +64,6 @@ static AudioBootStrap *bootstrap[] = { - #if SDL_AUDIO_DRIVER_DMEDIA - &DMEDIA_bootstrap, - #endif --#if SDL_AUDIO_DRIVER_ARTS -- &ARTS_bootstrap, --#endif --#if SDL_AUDIO_DRIVER_ESD -- &ESD_bootstrap, --#endif - #if SDL_AUDIO_DRIVER_NAS - &NAS_bootstrap, - #endif diff --git a/SDL-1.2.13-audiodriver.patch b/SDL-1.2.13-audiodriver.patch new file mode 100644 index 0000000..204e5e6 --- /dev/null +++ b/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.spec b/SDL.spec index 49b6444..3435ffa 100644 --- a/SDL.spec +++ b/SDL.spec @@ -1,24 +1,18 @@ Summary: A cross-platform multimedia library Name: SDL Version: 1.2.13 -Release: 5%{?dist} +Release: 6%{?dist} Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz Source1: SDL_config.h -# Temporary hack: Use pulseaudio via esd so SDL apps don't lock up when they -# attempt to use ALSA via pulseaudio. This will be removed when... -# 1) SDL's pulseaudio support is working natively without problems -# 2) it conditionally switches to pulseaudio or ALSA automatically -Source2: SDL_pulseaudio_hack.csh -Source3: SDL_pulseaudio_hack.sh Patch0: SDL-1.2.10-byteorder.patch Patch17: SDL-1.2.13-libdir.patch -Patch19: SDL-1.2.12-preferalsa.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 URL: http://www.libsdl.org/ License: LGPLv2+ @@ -74,13 +68,13 @@ static SDL applications. %setup -q %patch0 -p1 -b .byteorder %patch17 -p1 -b .libdir -%patch19 -p1 -b .preferalsa %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 aclocal @@ -104,27 +98,12 @@ make install DESTDIR=%{buildroot} # Rename SDL_config.h to SDL_config-.h to avoid file conflicts on # multilib systems and install SDL_config.h wrapper -basearch=%{_arch} -# always use i386 for iX86 -%ifarch %{ix86} -basearch=i386 -%endif -# always use arm for arm* -%ifarch %{arm} -basearch=arm -%endif -# Rename SDL_config.h -mv %{buildroot}/%{_includedir}/SDL/SDL_config.h %{buildroot}/%{_includedir}/SDL/SDL_config-${basearch}.h +mv %{buildroot}/%{_includedir}/SDL/SDL_config.h %{buildroot}/%{_includedir}/SDL/SDL_config-%{_arch}.h install -m644 %{SOURCE1} %{buildroot}/%{_includedir}/SDL/SDL_config.h # remove libtool .la file rm -f %{buildroot}%{_libdir}/*.la -# Temporary SDL pulseaudio hack -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/ -install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/ -install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d/ - %clean rm -rf %{buildroot} @@ -136,8 +115,6 @@ rm -rf %{buildroot} %defattr(-,root,root) %doc README-SDL.txt COPYING CREDITS BUGS %{_libdir}/lib*.so.* -# Temporary SDL pulseaudio hack -%{_sysconfdir}/profile.d/* %files devel %defattr(-,root,root) @@ -155,6 +132,11 @@ rm -rf %{buildroot} %{_libdir}/lib*.a %changelog +* Tue Sep 2 2008 Thomas Woerner 1.2.13-6 +- dropped pulseaudio hack (rhbz#448270) +- pulseaudio is now used by default +- simplified spec file for new architecture support (rhbz#433618) + * Mon Jul 14 2008 Tom "spot" Callaway 1.2.13-5 - fix license tag diff --git a/SDL_pulseaudio_hack.csh b/SDL_pulseaudio_hack.csh deleted file mode 100755 index 17a8dd6..0000000 --- a/SDL_pulseaudio_hack.csh +++ /dev/null @@ -1,3 +0,0 @@ -# Temporary hack until SDL directly supports pulseaudio -# If alsa-plugins-pulseaudio is installed, force SDL to output sound to esd -if ( -e /usr/lib/alsa-lib/libasound_module_pcm_pulse.so || -e /usr/lib64/alsa-lib/libasound_module_pcm_pulse.so ) setenv SDL_AUDIODRIVER esd diff --git a/SDL_pulseaudio_hack.sh b/SDL_pulseaudio_hack.sh deleted file mode 100755 index d781a82..0000000 --- a/SDL_pulseaudio_hack.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Temporary hack until SDL directly supports pulseaudio -# If alsa-plugins-pulseaudio is installed, force SDL to output sound to esd -[ -e /usr/lib/alsa-lib/libasound_module_pcm_pulse.so -o -e /usr/lib64/alsa-lib/libasound_module_pcm_pulse.so ] && export SDL_AUDIODRIVER=esd