diff --git a/.cvsignore b/.cvsignore index ca26e9e..12e4770 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -soundtouch-missing-autoxxx-files.tar.gz -soundtouch-1.3.1.tar.gz +soundtouch-1.4.0.tar.gz diff --git a/soundtouch-1.3.1-gcc43.patch b/soundtouch-1.3.1-gcc43.patch deleted file mode 100644 index 0560c15..0000000 --- a/soundtouch-1.3.1-gcc43.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up soundtouch-1.3.1/source/example/SoundStretch/WavFile.cpp~ soundtouch-1.3.1/source/example/SoundStretch/WavFile.cpp ---- soundtouch-1.3.1/source/example/SoundStretch/WavFile.cpp~ 2008-01-11 22:21:43.000000000 +0100 -+++ soundtouch-1.3.1/source/example/SoundStretch/WavFile.cpp 2008-01-11 22:21:43.000000000 +0100 -@@ -48,6 +48,7 @@ - #include - #include - #include -+#include - #include - #include - diff --git a/soundtouch-1.4.0-mmx-sse-compile-fix.patch b/soundtouch-1.4.0-mmx-sse-compile-fix.patch new file mode 100644 index 0000000..4369b17 --- /dev/null +++ b/soundtouch-1.4.0-mmx-sse-compile-fix.patch @@ -0,0 +1,14 @@ +diff -up soundtouch/source/SoundTouch/Makefile.in~ soundtouch/source/SoundTouch/Makefile.in +--- soundtouch/source/SoundTouch/Makefile.in~ 2009-02-15 11:21:36.000000000 +0100 ++++ soundtouch/source/SoundTouch/Makefile.in 2009-02-15 11:23:30.000000000 +0100 +@@ -209,7 +209,9 @@ libSoundTouch_la_SOURCES = AAFilter.cpp + # Note by authore: '-msse2' might not work in non-X86 compilations. If someone can + # fix this script to automatically check for CPU architecture, please submit a patch + # to me. +-AM_CXXFLAGS = -O3 -msse2 -fcheck-new -I../../include ++AM_CXXFLAGS = -fcheck-new -I../../include ++mmx_optimized.lo : AM_CXXFLAGS = -mmmx -fcheck-new -I../../include ++sse_optimized.lo : AM_CXXFLAGS = -msse -fcheck-new -I../../include + all: all-am + + .SUFFIXES: diff --git a/soundtouch-1.4.0-x86_64-asm-broken.patch b/soundtouch-1.4.0-x86_64-asm-broken.patch new file mode 100644 index 0000000..4c777d6 --- /dev/null +++ b/soundtouch-1.4.0-x86_64-asm-broken.patch @@ -0,0 +1,12 @@ +diff -up soundtouch/include/STTypes.h~ soundtouch/include/STTypes.h +--- soundtouch/include/STTypes.h~ 2009-01-25 17:32:53.000000000 +0100 ++++ soundtouch/include/STTypes.h 2009-02-14 22:22:37.000000000 +0100 +@@ -87,7 +87,7 @@ namespace soundtouch + + #endif + +- #if (WIN32 || __i386__ || __x86_64__) ++ #if (WIN32 || __i386__) + /// Define this to allow X86-specific assembler/intrinsic optimizations. + /// Notice that library contains also usual C++ versions of each of these + /// these routines, so if you're having difficulties getting the optimized diff --git a/soundtouch.spec b/soundtouch.spec index 844f443..c33c5ba 100644 --- a/soundtouch.spec +++ b/soundtouch.spec @@ -1,15 +1,15 @@ Name: soundtouch -Version: 1.3.1 -Release: 11%{?dist} +Version: 1.4.0 +Release: 1%{?dist} Summary: Audio Processing library for changing Tempo, Pitch and Playback Rates License: LGPLv2+ Group: System Environment/Libraries URL: http://www.surina.net/soundtouch/ -Source0: %{name}-%{version}.tar.gz -Source1: soundtouch-missing-autoxxx-files.tar.gz -Patch0: soundtouch-1.3.1-gcc43.patch +Source0: http://www.surina.net/soundtouch/%{name}-%{version}.tar.gz +Patch0: soundtouch-1.4.0-x86_64-asm-broken.patch +Patch1: soundtouch-1.4.0-mmx-sse-compile-fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: gcc-c++ libtool +BuildRequires: gcc-c++ %description SoundTouch is a LGPL-licensed open-source audio processing library for @@ -34,22 +34,26 @@ Libraries, include files, etc you can use to develop soundtouch applications. %prep -%setup -q -a 1 +%setup -q -n %{name} %patch0 -p1 +# soundtouch contains mmx / sse versions of the stretching algorithm. +# to compile these -msse / -mmmx is needed. In x86 we make sure with this patch +# the needed -msse / -mmmx only gets passed when compiling the relevant +# object files so that these instructions do not get used in other object +# files. On non x86 we simply sed the -msse2 out of the original makefiles +%ifarch %{ix86} +%patch1 -p1 +%else +sed -i 's|-O3 -msse2||' source/SoundTouch/Makefile.* +%endif +sed -i 's|-O3||' source/SoundStretch/Makefile.* # set correct version for .so build %define ltversion %(echo %{version} | tr '.' ':') sed -i 's/-rpath $(libdir)/-rpath $(libdir) -version-number %{ltversion}/' \ source/SoundTouch/Makefile.in -# force use of our CFLAGS -%ifarch %{ix86} -sed -i 's|-O3 -msse|$(CFLAGS) -msse|' source/SoundTouch/Makefile.* -%else -sed -i 's|-O3 -msse|$(CFLAGS)|' source/SoundTouch/Makefile.* -%endif -sed -i 's|-O3|$(CFLAGS)|' source/example/*/Makefile.* # cleanup a bit chmod -x README.html source/SoundTouch/RateTransposer.cpp -sed -i 's|\r||g' README.html COPYING.TXT source/SoundTouch/RateTransposer.cpp +sed -i 's|\r||g' README.html source/SoundTouch/RateTransposer.cpp %build @@ -68,10 +72,10 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la # remove redundant installed docs rm -rf $RPM_BUILD_ROOT%{_prefix}/doc/%{name} -# some soundtouch using packages expect the pkgconfig to be called -# libSoundTouch instead of soundtouch-1.0, probably it used to be called -# libSoundTouch in the past, so lets provide a compat symlink for these: -ln -s soundtouch-1.0.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libSoundTouch.pc +# pkgconfig compat links for compat with older (API compatible) releases +# dunno why upstream keeps changing the pkgconfig name +ln -s soundtouch-1.4.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libSoundTouch.pc +ln -s soundtouch-1.4.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/soundtouch-1.0.pc # soundtouch installs an autoheader generated header file which could very # well conflict with other autoheader generated header files, so we override @@ -104,6 +108,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Feb 14 2009 Hans de Goede 1.4.0-1 +- New upstream release 1.4.0 + * Sat Dec 20 2008 Hans de Goede 1.3.1-11 - Fix compilation with libtool 2.x diff --git a/sources b/sources index dce72ab..bec9804 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -06e29b338534f3e0409944a41c3567eb soundtouch-missing-autoxxx-files.tar.gz -5e0185e81dbba2f2eed8581b7664ab04 soundtouch-1.3.1.tar.gz +fc4bb10401624899efe4fb554d4fd3ed soundtouch-1.4.0.tar.gz