Update to 1.9.2 (#961876).

- Modernize spec file.
- Makefile.am handles mmx and sse flags well, so no need patch 01 and sed anymore.
- Patch 02 disabled, I hope we already have asm fixed on X86_64.
This commit is contained in:
Sérgio M. Basto 2016-02-12 18:44:06 +00:00
parent f34c25a9c2
commit 0b214c350c
4 changed files with 25 additions and 48 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
soundtouch-1.4.0.tar.gz
/soundtouch-1.9.2.tar.gz

View File

@ -1,14 +0,0 @@
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:

View File

@ -1,15 +1,14 @@
Name: soundtouch
Version: 1.4.0
Release: 14%{?dist}
Version: 1.9.2
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: 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++
BuildRequires: autoconf automake libtool
%description
SoundTouch is a LGPL-licensed open-source audio processing library for
@ -35,72 +34,57 @@ Libraries, include files, etc you can use to develop soundtouch applications.
%prep
%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.*
autoreconf -iv
#why not in x86_64
#patch0 -p1
# 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
# cleanup a bit
chmod -x README.html source/SoundTouch/RateTransposer.cpp
sed -i 's|\r||g' README.html source/SoundTouch/RateTransposer.cpp
%build
%configure --disable-dependency-tracking --disable-static --enable-shared
# Don't use rpath!
# Don't use rpath!
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}
make V=1 %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT%{_libdir}/*.la
make install DESTDIR=%{buildroot}
rm %{buildroot}%{_libdir}/*.la
# remove redundant installed docs
rm -rf $RPM_BUILD_ROOT%{_prefix}/doc/%{name}
rm -rf %%{_prefix}/doc/%{name}
# 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
ln -s soundtouch-1.4.pc %{buildroot}%{_libdir}/pkgconfig/libSoundTouch.pc
ln -s soundtouch-1.4.pc %{buildroot}%{_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
# this with our own version which contains only the bare minimum:
cat %{buildroot}%{_includedir}/soundtouch/soundtouch_config.h
echo '#define FLOAT_SAMPLES 1' \
> $RPM_BUILD_ROOT%{_includedir}/soundtouch/soundtouch_config.h
%clean
rm -rf $RPM_BUILD_ROOT
> %{buildroot}%{_includedir}/soundtouch/soundtouch_config.h
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING.TXT README.html
%{_bindir}/soundstretch
%{_libdir}/lib*.so.*
%files devel
%defattr(-,root,root,-)
%{_libdir}/lib*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}/%{name}
@ -108,6 +92,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Feb 09 2016 Sérgio Basto <sergio@serjux.com> - 1.9.2-1
- Update to 1.9.2 (#961876).
- Modernize spec file.
- Makefile.am handles mmx and sse flags well, so no need patch 01 and sed anymore.
- Patch 02 disabled, I hope we already have asm fixed on X86_64.
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View File

@ -1 +1 @@
fc4bb10401624899efe4fb554d4fd3ed soundtouch-1.4.0.tar.gz
2d1ab4abb54640e8e308e36e309c94a6 soundtouch-1.9.2.tar.gz