diff options
Diffstat (limited to 'extra/soundtouch')
-rw-r--r-- | extra/soundtouch/PKGBUILD | 12 | ||||
-rw-r--r-- | extra/soundtouch/disable-mmx.patch | 115 |
2 files changed, 124 insertions, 3 deletions
diff --git a/extra/soundtouch/PKGBUILD b/extra/soundtouch/PKGBUILD index 40b2c87a4..3036fbba6 100644 --- a/extra/soundtouch/PKGBUILD +++ b/extra/soundtouch/PKGBUILD @@ -5,7 +5,7 @@ pkgname=soundtouch pkgver=1.7.1 pkgrel=1 pkgdesc="An audio processing library" -arch=('i686' 'x86_64') +arch=('i686' 'x86_64' 'mips64el') url="http://www.surina.net/soundtouch/" license=('LGPL') depends=('gcc-libs') @@ -15,10 +15,16 @@ sha1sums=('8b1a461754853f9c7328571449b7f9b8bd578a89') build() { cd "${srcdir}/${pkgname}" - [ "${CARCH}" = "x86_64" ] && CONFIGFLAG="--with-pic" sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.ac ./bootstrap - ./configure --prefix=/usr --enable-shared ${CONFIGFLAG} + case $CARCH in + i686) + ./configure --prefix=/usr --enable-shared + ;; + *) + ./configure --prefix=/usr --enable-shared --with-pic + ;; + esac make } diff --git a/extra/soundtouch/disable-mmx.patch b/extra/soundtouch/disable-mmx.patch new file mode 100644 index 000000000..11987059c --- /dev/null +++ b/extra/soundtouch/disable-mmx.patch @@ -0,0 +1,115 @@ +diff -ru soundtouch.orig/source/SoundStretch/Makefile.am soundtouch/source/SoundStretch/Makefile.am +--- soundtouch.orig/source/SoundStretch/Makefile.am 2012-02-22 20:51:33.240941439 +0100 ++++ soundtouch/source/SoundStretch/Makefile.am 2012-02-22 20:52:25.936309597 +0100 +@@ -43,11 +43,5 @@ + ## linker.
+ soundstretch_LDADD=../SoundTouch/libSoundTouch.la -lm
+
+-## linker flags
+-soundstretch_LDFLAGS=-s
+-
+-## additional compiler flags
+-soundstretch_CXXFLAGS=-O3
+-
+ #clean-local:
+ # -rm -f additional-files-to-remove-on-make-clean
+diff -ru soundtouch.orig/source/SoundTouch/FIRFilter.cpp soundtouch/source/SoundTouch/FIRFilter.cpp +--- soundtouch.orig/source/SoundTouch/FIRFilter.cpp 2012-02-22 20:51:33.277196949 +0100 ++++ soundtouch/source/SoundTouch/FIRFilter.cpp 2012-02-22 21:00:18.591437748 +0100 +@@ -229,32 +229,6 @@ +
+ FIRFilter * FIRFilter::newInstance()
+ {
+- uint uExtensions;
+-
+- uExtensions = detectCPUextensions();
+-
+- // Check if MMX/SSE instruction set extensions supported by CPU
+-
+-#ifdef SOUNDTOUCH_ALLOW_MMX
+- // MMX routines available only with integer sample types
+- if (uExtensions & SUPPORT_MMX)
+- {
+- return ::new FIRFilterMMX;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_MMX
+-
+-#ifdef SOUNDTOUCH_ALLOW_SSE
+- if (uExtensions & SUPPORT_SSE)
+- {
+- // SSE support
+- return ::new FIRFilterSSE;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_SSE
+-
+- {
+- // ISA optimizations not supported, use plain C version
+- return ::new FIRFilter;
+- }
++ // ISA optimizations not supported, use plain C version
++ return ::new FIRFilter;
+ }
+diff -ru soundtouch.orig/source/SoundTouch/Makefile.am soundtouch/source/SoundTouch/Makefile.am +--- soundtouch.orig/source/SoundTouch/Makefile.am 2012-02-22 20:51:33.269140169 +0100 ++++ soundtouch/source/SoundTouch/Makefile.am 2012-02-22 20:53:39.136212215 +0100 +@@ -30,16 +30,13 @@ +
+ lib_LTLIBRARIES=libSoundTouch.la
+ #
+-libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp mmx_optimized.cpp sse_optimized.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp cpu_detect_x86_gcc.cpp BPMDetect.cpp PeakFinder.cpp
++libSoundTouch_la_SOURCES=AAFilter.cpp FIRFilter.cpp FIFOSampleBuffer.cpp RateTransposer.cpp SoundTouch.cpp TDStretch.cpp BPMDetect.cpp PeakFinder.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 = -fcheck-new -I../../include
+-mmx_optimized.lo : AM_CXXFLAGS = -mmmx -fcheck-new -I../../include
+-sse_optimized.lo : AM_CXXFLAGS = -msse -fcheck-new -I../../include
+-
+
+ # other linking flags to add
+ # noinst_LTLIBRARIES = libSoundTouchOpt.la
+diff -ru soundtouch.orig/source/SoundTouch/TDStretch.cpp soundtouch/source/SoundTouch/TDStretch.cpp +--- soundtouch.orig/source/SoundTouch/TDStretch.cpp 2012-02-22 20:51:33.269140169 +0100 ++++ soundtouch/source/SoundTouch/TDStretch.cpp 2012-02-22 20:59:57.756604035 +0100 +@@ -738,35 +738,8 @@ +
+ TDStretch * TDStretch::newInstance()
+ {
+- uint uExtensions;
+-
+- uExtensions = detectCPUextensions();
+-
+- // Check if MMX/SSE instruction set extensions supported by CPU
+-
+-#ifdef SOUNDTOUCH_ALLOW_MMX
+- // MMX routines available only with integer sample types
+- if (uExtensions & SUPPORT_MMX)
+- {
+- return ::new TDStretchMMX;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_MMX
+-
+-
+-#ifdef SOUNDTOUCH_ALLOW_SSE
+- if (uExtensions & SUPPORT_SSE)
+- {
+- // SSE support
+- return ::new TDStretchSSE;
+- }
+- else
+-#endif // SOUNDTOUCH_ALLOW_SSE
+-
+- {
+- // ISA optimizations not supported, use plain C version
+- return ::new TDStretch;
+- }
++ // ISA optimizations not supported, use plain C version
++ return ::new TDStretch;
+ }
+
+
|