[packages/libsbsms2] - libsbsms 2.0.x, API/ABI incompatible with 1.7.x
qboosh
qboosh at pld-linux.org
Sat Jun 22 11:02:56 CEST 2013
commit 888ffc3616fad429258c04198e4890f8af8f3542
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Jun 22 11:02:29 2013 +0200
- libsbsms 2.0.x, API/ABI incompatible with 1.7.x
libsbsms-am.patch | 14 +++---
libsbsms-gcc.patch | 55 +++++++--------------
libsbsms-link.patch | 22 ++++++---
libsbsms-mad.patch | 14 ------
libsbsms-opts.patch | 64 ++++++++++++++-----------
libsbsms.spec => libsbsms2.spec | 103 ++++++++++++++++++++--------------------
6 files changed, 127 insertions(+), 145 deletions(-)
---
diff --git a/libsbsms.spec b/libsbsms2.spec
similarity index 54%
rename from libsbsms.spec
rename to libsbsms2.spec
index ce3da3c..0bb2a35 100644
--- a/libsbsms.spec
+++ b/libsbsms2.spec
@@ -1,31 +1,33 @@
#
# Conditional build:
-%bcond_without wx # wxWidgets-based player
+%bcond_with sse # use SSE optimizations
#
+%ifarch pentium3 pentium4 %{x8664}
+%define with_sse 1
+%endif
Summary: C++ library for high quality time stretching and pitch scaling
Summary(pl.UTF-8): Biblioteka C++ do wysokiej jakości zmiany szybkości i wysokości dźwięku
-Name: libsbsms
-Version: 1.7.0
-Release: 3
+Name: libsbsms2
+Version: 2.0.1
+Release: 1
License: GPL v2
Group: Libraries
-Source0: http://downloads.sourceforge.net/sbsms/%{name}-%{version}.tar.gz
-# Source0-md5: 6a6d1549fe4c4c7de8bfff5ce13bdece
-Patch0: %{name}-opts.patch
-Patch1: %{name}-gcc.patch
-Patch2: %{name}-link.patch
-Patch3: %{name}-mad.patch
-Patch4: %{name}-am.patch
+Source0: http://downloads.sourceforge.net/sbsms/libsbsms-%{version}.tar.gz
+# Source0-md5: 409fb6f4f64e48ff1a7bc18621b952fb
+Patch0: libsbsms-opts.patch
+Patch1: libsbsms-gcc.patch
+Patch2: libsbsms-link.patch
+Patch3: libsbsms-am.patch
URL: http://sbsms.sourceforge.net/
BuildRequires: autoconf
BuildRequires: automake >= 1.5
BuildRequires: libmad-devel
BuildRequires: libsndfile-devel >= 1.0.2
BuildRequires: libstdc++-devel
-BuildRequires: libtool
-BuildRequires: portaudio-devel >= 19
+BuildRequires: libtool >= 2:2
BuildRequires: pkgconfig
-%{?with_wx:BuildRequires: wxGTK2-unicode-devel >= 2.8}
+# because of sbsms tool
+Conflicts: libsbsms < 2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -37,72 +39,73 @@ libsbsms to biblioteka do wysokiej jakości modyfikowania szybkości i
wysokości dźwięku. Wykorzystuje modelowanie sinusoidalne.
%package devel
-Summary: Header files for libsbsms library
-Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libsbsms
+Summary: Header files for libsbsms 2 library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libsbsms 2
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libstdc++-devel
+Conflicts: libsbsms-devel < 2
%description devel
-Header files for libsbsms library.
+Header files for libsbsms 2 library.
%description devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki libsbsms.
+Pliki nagłówkowe biblioteki libsbsms 2.
%package static
-Summary: Static libsbsms library
-Summary(pl.UTF-8): Statyczna biblioteka libsbsms
+Summary: Static libsbsms 2 library
+Summary(pl.UTF-8): Statyczna biblioteka libsbsms 2
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
+Conflicts: libsbsms-static < 2
%description static
-Static libsbsms library.
+Static libsbsms 2 library.
%description static -l pl.UTF-8
-Statyczna biblioteka libsbsms.
-
-%package wx
-Summary: wxWidgets-based player
-Summary(pl.UTF-8): Odtwarzacz oparty na wxWidgets
-Group: X11/Applications/Sound
-Requires: %{name} = %{version}-%{release}
-
-%description wx
-wxWidgets-based player utilizing libsbsms.
-
-%description wx -l pl.UTF-8
-Oparty na wxWidgets odtwarzacz wykorzystujący libsbsms.
+Statyczna biblioteka libsbsms 2.
%prep
-%setup -q
+%setup -q -n libsbsms-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
%build
%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
- WX_CONFIG=/usr/bin/wx-gtk2-unicode-config \
- --enable-mp3 \
--enable-multithreaded \
- --enable-portaudio \
- --enable-sndfile \
--enable-shared \
- %{?with_wx:--enable-wx}
+ %{!?with-sse:--disable-sse}
%{__make}
+cd test
+%{__libtoolize}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+%configure \
+ SBSMS_CFLAGS="-I$(pwd)/../include" \
+ SBSMS_LIBS="-L$(pwd)/../src/.libs -lsbsms" \
+ --enable-shared
+
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+%{__make} -C test install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%{__sed} -i -e 's,-L[^ "]*/\.libs *,,g' $RPM_BUILD_ROOT%{_libdir}/libsbsmsx.la
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -111,25 +114,23 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README TODO
+%doc AUTHORS README TODO
%attr(755,root,root) %{_bindir}/sbsms
-%attr(755,root,root) %{_bindir}/sbsmsplay
%attr(755,root,root) %{_libdir}/libsbsms.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsbsms.so.1
+%attr(755,root,root) %ghost %{_libdir}/libsbsms.so.0
+%attr(755,root,root) %{_libdir}/libsbsmsx.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libsbsmsx.so.0
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libsbsms.so
+%attr(755,root,root) %{_libdir}/libsbsmsx.so
%{_libdir}/libsbsms.la
+%{_libdir}/libsbsmsx.la
%{_includedir}/sbsms.h
%{_pkgconfigdir}/sbsms.pc
%files static
%defattr(644,root,root,755)
%{_libdir}/libsbsms.a
-
-%if %{with wx}
-%files wx
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/wxsbsmsplayer
-%endif
+%{_libdir}/libsbsmsx.a
diff --git a/libsbsms-am.patch b/libsbsms-am.patch
index 28a7af7..45847d5 100644
--- a/libsbsms-am.patch
+++ b/libsbsms-am.patch
@@ -1,11 +1,11 @@
---- libsbsms-1.7.0/configure.in.orig 2013-06-22 07:31:24.387541446 +0200
-+++ libsbsms-1.7.0/configure.in 2013-06-22 07:31:59.647540006 +0200
-@@ -8,7 +8,7 @@
- LIBSBSMS_RELEASE_BUILD=0
+--- libsbsms-2.0.1/configure.in.orig 2013-06-22 08:23:08.697411171 +0200
++++ libsbsms-2.0.1/configure.in 2013-06-22 08:30:40.487392120 +0200
+@@ -13,7 +13,7 @@
+ LIBSBSMS_RELEASE_BUILD=1
AC_CONFIG_SRCDIR([src/sbsms.cpp])
AC_CANONICAL_TARGET([])
-AM_CONFIG_HEADER(src/config.h)
-+AC_CONFIG_HEADER(src/config.h)
- m4_include([m4/ac_c99_func_lrint.m4])
- m4_include([m4/ac_c99_func_lrintf.m4])
++AC_CONFIG_HEADERS([src/config.h])
+
+ AC_DISABLE_SHARED dnl allows for optimizations
diff --git a/libsbsms-gcc.patch b/libsbsms-gcc.patch
index 302972a..d9cb6c0 100644
--- a/libsbsms-gcc.patch
+++ b/libsbsms-gcc.patch
@@ -9,44 +9,23 @@
using namespace std;
namespace _sbsms_ {
---- libsbsms-1.7.0/src/grain.cpp.orig 2008-11-07 01:10:27.000000000 +0100
-+++ libsbsms-1.7.0/src/grain.cpp 2011-05-06 21:40:29.936386047 +0200
-@@ -4,6 +4,8 @@
- #include "defs.h"
- #include "real.h"
-
-+#include <cstdlib>
-+#include <cstring>
- #include <map>
- using namespace std;
- using namespace _sbsms_;
---- libsbsms-1.7.0/src/convert.cpp.orig 2008-11-13 06:34:52.000000000 +0100
-+++ libsbsms-1.7.0/src/convert.cpp 2011-05-06 22:41:05.309841105 +0200
-@@ -143,7 +143,7 @@
- si.rs = resampler;
- sbsmser = sbsms_create(&samplesCB,&stretchCBLinear,&ratioCBLinear,channels,quality,bPreAnalyze,!bAnalyzeOnly);
- }
--
-+ long samplesOut;
- if(bPreAnalyze && !bSynthesizeOnly) {
- #ifdef BWAV
- decoderPre = import(filenameIn);
-@@ -174,7 +174,7 @@
- stretch2 = 1.0/stretch0;
- else
- stretch2 = log(stretch1/stretch0)/(stretch1-stretch0);
-- long samplesOut = samplesToProcess * stretch2;
-+ samplesOut = samplesToProcess * stretch2;
- si.samplesToProcess = samplesToProcess;
- si.samplesToGenerate = samplesOut;
- si.stretch0 = stretch0;
---- libsbsms-1.7.0/src/mp3.cpp.orig 2008-11-02 02:58:36.000000000 +0100
-+++ libsbsms-1.7.0/src/mp3.cpp 2011-05-08 07:43:28.443823757 +0200
-@@ -7,6 +7,7 @@
- #include "import.h"
- #include "audiobuffer.h"
-
-+#include <cstring>
+--- libsbsms-2.0.1/test/src/mp3.cpp.orig 2012-07-06 08:17:37.000000000 +0200
++++ libsbsms-2.0.1/test/src/mp3.cpp 2013-06-22 09:36:26.733893269 +0200
+@@ -6,6 +6,7 @@
+ #include <sys/stat.h>
#include <iostream>
#include <fstream>
++#include <cstring>
+ #include <assert.h>
+ enum {
+--- libsbsms-2.0.1/test/src/convert.cpp.orig 2012-07-06 08:17:37.000000000 +0200
++++ libsbsms-2.0.1/test/src/convert.cpp 2013-06-22 10:10:28.343807591 +0200
+@@ -5,6 +5,7 @@
+ #include "mp3.h"
+ #include "real.h"
+ #include <stdlib.h>
++#include <string.h>
+ #include <algorithm>
+ #include "import.h"
+ using namespace std;
diff --git a/libsbsms-link.patch b/libsbsms-link.patch
index 7ea36ed..f38f0f0 100644
--- a/libsbsms-link.patch
+++ b/libsbsms-link.patch
@@ -1,10 +1,18 @@
---- libsbsms-1.7.0/src/Makefile.am.orig 2011-05-08 07:43:46.687157704 +0200
-+++ libsbsms-1.7.0/src/Makefile.am 2011-05-08 07:50:51.983838611 +0200
-@@ -7,6 +7,7 @@
- libsbsms_la_SOURCES = pitch.cpp peak.cpp sms.cpp track.cpp trackpoint.cpp utils.cpp audio.cpp resample.cpp sbsms.cpp fft.cpp grain.cpp buffer.cpp subband.cpp audio.h buffer.h fft.h utils.h defs.h peak.h trackpoint.h grain.h pitch.h real.h resample.h ../include/sbsms.h sms.h subband.h track.h
+--- libsbsms-2.0.1/src/Makefile.am.orig 2013-06-09 06:47:10.148461222 +0200
++++ libsbsms-2.0.1/src/Makefile.am 2013-06-09 06:53:36.198453175 +0200
+@@ -4,4 +4,5 @@
+ libsbsmsinclude_HEADERS = ../include/sbsms.h
- libsbsms_la_LDFLAGS = -version-info @SHARED_VERSION_INFO@ @SHLIB_VERSION_ARG@
+ lib_LTLIBRARIES = libsbsms.la
+libsbsms_la_LIBADD = -lpthread
+ libsbsms_la_SOURCES = sms.cpp track.cpp trackpoint.cpp resample.cpp sbsms.cpp fft.cpp grain.cpp buffer.cpp subband.cpp dBTable.cpp buffer.h fft.h sse.h utils.h trackpoint.h grain.h real.h synthTable.h dBTable.h sincCoeffs.h ../include/sbsms.h sms.h subband.h track.h slide.cpp
+--- libsbsms-2.0.1/test/src/Makefile.am.orig 2012-07-06 08:17:37.000000000 +0200
++++ libsbsms-2.0.1/test/src/Makefile.am 2013-06-22 10:31:03.160422438 +0200
+@@ -3,6 +3,7 @@
+ lib_LTLIBRARIES = libsbsmsx.la
+
+ libsbsmsx_la_SOURCES = mp3.cpp mp3.h mp3tech.cpp mp3tech.h import.cpp import.h pcm.cpp pcm.h convert.cpp convert.h audiobuffer.cpp audiobuffer.h
++libsbsmsx_la_LIBADD = $(SBSMS_LIBS) $(SNDFILE_LIBS) $(MAD_LIBS)
+
+ bin_PROGRAMS = sbsms
- if ENABLE_PORTAUDIO
- if ENABLE_WX
diff --git a/libsbsms-mad.patch b/libsbsms-mad.patch
deleted file mode 100644
index 8ce3c46..0000000
--- a/libsbsms-mad.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- libsbsms-1.7.0/src/mp3.cpp.orig 2011-05-08 13:43:54.403499365 +0200
-+++ libsbsms-1.7.0/src/mp3.cpp 2011-05-08 13:53:57.467865794 +0200
-@@ -127,9 +127,9 @@
- struct mad_stream *stream,
- struct mad_frame *frame)
- {
-- fprintf(stderr, "decoding error 0x%04x (%s) at stream frame %u\n",
-+ fprintf(stderr, "decoding error 0x%04x (%s) at stream frame offset %u\n",
- stream->error, mad_stream_errorstr(stream),
-- (unsigned int)stream->this_frame );
-+ (unsigned int)(stream->buffer - stream->this_frame));
-
- /* return MAD_FLOW_BREAK here to stop decoding (and propagate an error) */
- return MAD_FLOW_CONTINUE;
diff --git a/libsbsms-opts.patch b/libsbsms-opts.patch
index 538c99b..1d3fdfb 100644
--- a/libsbsms-opts.patch
+++ b/libsbsms-opts.patch
@@ -1,34 +1,42 @@
---- libsbsms-1.7.0/src/Makefile.am.orig 2008-11-01 20:38:37.000000000 +0100
-+++ libsbsms-1.7.0/src/Makefile.am 2011-05-06 20:14:24.326213083 +0200
-@@ -1,4 +1,4 @@
--AM_CXXFLAGS = -fasm-blocks -funroll-loops -I../include -fstrict-aliasing $(SNDFILE_CFLAGS) $(PORTAUDIO_CFLAGS) $(WX_CFLAGS)
-+AM_CXXFLAGS = -I../include -fstrict-aliasing $(SNDFILE_CFLAGS) $(PORTAUDIO_CFLAGS) $(WX_CFLAGS)
+--- libsbsms-2.0.0/configure.in.orig 2011-07-02 08:01:36.000000000 +0200
++++ libsbsms-2.0.0/configure.in 2011-07-10 14:54:00.955720515 +0200
+@@ -82,9 +82,9 @@
+ fi
- libsbsmsincludedir = $(includedir)
- libsbsmsinclude_HEADERS = ../include/sbsms.h
---- libsbsms-1.7.0/configure.in.orig 2008-11-02 20:10:12.000000000 +0100
-+++ libsbsms-1.7.0/configure.in 2011-05-06 20:15:04.196214418 +0200
-@@ -118,14 +118,6 @@ else
+ if test x$enable_debug = xyes; then
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -g -O3"
++ SBSMS_CFLAGS="$SBSMS_CFLAGS -g"
+ else
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -O3 -fomit-frame-pointer"
++ SBSMS_CFLAGS="$SBSMS_CFLAGS -fomit-frame-pointer"
fi
- AM_CONDITIONAL(ENABLE_PORTAUDIO, test x$enable_portaudio = xyes)
--CXXFLAGS=`echo $CXXFLAGS | sed -e "s/-g//" -e "s/-O2//"`
--
--if test x$enable_debug = xyes; then
-- CXXFLAGS="$CXXFLAGS -g -O0"
--else
-- CXXFLAGS="$CXXFLAGS -O3 -fomit-frame-pointer"
+ if test x$enable_multithreaded = xyes; then
+--- libsbsms-2.0.1/test/configure.in.orig 2012-07-06 08:17:37.000000000 +0200
++++ libsbsms-2.0.1/test/configure.in 2013-06-22 09:29:18.797244562 +0200
+@@ -59,22 +59,12 @@
+
+ AC_ARG_ENABLE(universal_binary,[ --enable-universal_binary enable universal binary build: (default: disable)],[enable_universal_binary=$enableval],[enable_universal_binary=no])
+
+-SBSMS_CFLAGS="-ffast-math"
++CFLAGS="$CFLAGS -ffast-math"
+
+ if test x$enable_debug = xyes; then
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -g -O3"
++ CFLAGS="$CFLAGS -g"
+ else
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -O3 -fomit-frame-pointer"
-fi
-
- if test x$enable_static = xyes; then
- CXXFLAGS="$CXXFLAGS"
- else
-@@ -156,7 +156,7 @@
- if test x$enable_wx = xyes; then
+-if test x$enable_universal_binary = xyes; then
+- case "$target_os" in
+- darwin*)
+- SBSMS_CFLAGS="$SBSMS_CFLAGS -mmacosx-version-min=10.4 -arch i386 -arch ppc -Xarch_i386 -DARCHI386 -Xarch_ppc -DARCHPPC -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+- ;;
+- *)
+- ;;
+- esac
++ CFLAGS="$CFLAGS -fomit-frame-pointer"
+ fi
- wxconfigargs=""
-- if test x$enable_static = xyes; then
-+ if test x$enable_wx_static = xyes; then
- wxconfigargs="$wxconfigargs --static=yes"
- else
- wxconfigargs="$wxconfigargs --static=no"
+ PKG_CHECK_MODULES(SBSMS, sbsms >= 2.0.0, ac_cv_sbsms=1, ac_cv_sbsms=0)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libsbsms2.git/commitdiff/888ffc3616fad429258c04198e4890f8af8f3542
More information about the pld-cvs-commit
mailing list