diff options
Diffstat (limited to 'extra/soundtouch')
-rw-r--r-- | extra/soundtouch/PKGBUILD | 44 | ||||
-rw-r--r-- | extra/soundtouch/disable-mmx.patch | 36 |
2 files changed, 66 insertions, 14 deletions
diff --git a/extra/soundtouch/PKGBUILD b/extra/soundtouch/PKGBUILD index 5a016aa63..3de1063b2 100644 --- a/extra/soundtouch/PKGBUILD +++ b/extra/soundtouch/PKGBUILD @@ -7,30 +7,46 @@ pkgname=soundtouch pkgver=1.5.0 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') options=('!libtool') source=(http://www.surina.net/soundtouch/${pkgname}-${pkgver}.tar.gz soundtouch-1.4.0-mmx-sse-compile-fix.patch - soundtouch-1.4.0-x86_64-asm-broken.patch) -md5sums=('5456481d8707d2a2c27466ea64a099cb' 'f0204136c90ce4f6d4761073151eb4dc'\ - '0d856bb5b519b18c6ba3a2e1770bdfd2') -sha1sums=('c3e73419acec242a49a408b78c55883def937fc0' '39815091c4cb1817f8a56b8fb29fa684984514d1'\ - '95282cca856b3b8645fadb530ce5eb892074f193') + soundtouch-1.4.0-x86_64-asm-broken.patch + disable-mmx.patch) +md5sums=('5456481d8707d2a2c27466ea64a099cb' + 'f0204136c90ce4f6d4761073151eb4dc' + '0d856bb5b519b18c6ba3a2e1770bdfd2' + '3a5097f2a65ec9bd5f733f9935cd498b') +sha1sums=('c3e73419acec242a49a408b78c55883def937fc0' + '39815091c4cb1817f8a56b8fb29fa684984514d1' + '95282cca856b3b8645fadb530ce5eb892074f193' + '92d7851d1992a592dab5490f18c072df943afdda') build() { cd "${srcdir}/${pkgname}" - patch -Np1 -i "${srcdir}/soundtouch-1.4.0-mmx-sse-compile-fix.patch" || return 1 - patch -Np1 -i "${srcdir}/soundtouch-1.4.0-x86_64-asm-broken.patch" || return 1 - if [ "${CARCH}" = "x86_64" ]; then - ./configure --prefix=/usr --enable-shared --with-pic || return 1 - else - ./configure --prefix=/usr --enable-shared || return 1 + patch -Np1 -i "${srcdir}/soundtouch-1.4.0-mmx-sse-compile-fix.patch" + patch -Np1 -i "${srcdir}/soundtouch-1.4.0-x86_64-asm-broken.patch" + + if [ "${CARCH}" = "mips64el" ]; then + patch -Np1 -i "${srcdir}/disable-mmx.patch" fi - make || return 1 - make DESTDIR="${pkgdir}" pkgdocdir=/usr/share/doc/soundtouch install || return 1 + + case $CARCH in + i686) + ./configure --prefix=/usr --enable-shared + ;; + x86_64) + ./configure --prefix=/usr --enable-shared --with-pic + ;; + mips64el) + ./configure --prefix=/usr --enable-shared --with-pic + ;; + esac + make + make DESTDIR="${pkgdir}" pkgdocdir=/usr/share/doc/soundtouch install # Upstream changed pkgconfig filename ln -sf soundtouch-1.4.pc "${pkgdir}/usr/lib/pkgconfig/soundtouch-1.0.pc" || return 1 } diff --git a/extra/soundtouch/disable-mmx.patch b/extra/soundtouch/disable-mmx.patch new file mode 100644 index 000000000..7be579c43 --- /dev/null +++ b/extra/soundtouch/disable-mmx.patch @@ -0,0 +1,36 @@ +--- soundtouch/source/SoundTouch/Makefile.in~ 2011-07-04 15:26:59.621763536 -0300 ++++ soundtouch/source/SoundTouch/Makefile.in 2011-07-04 15:27:29.404648895 -0300 +@@ -59,7 +59,7 @@ libLTLIBRARIES_INSTALL = $(INSTALL) + LTLIBRARIES = $(lib_LTLIBRARIES) + libSoundTouch_la_LIBADD = + am_libSoundTouch_la_OBJECTS = AAFilter.lo FIRFilter.lo \ +- FIFOSampleBuffer.lo mmx_optimized.lo sse_optimized.lo \ ++ FIFOSampleBuffer.lo \ + RateTransposer.lo SoundTouch.lo TDStretch.lo \ + cpu_detect_x86_gcc.lo BPMDetect.lo PeakFinder.lo + libSoundTouch_la_OBJECTS = $(am_libSoundTouch_la_OBJECTS) +@@ -206,14 +206,12 @@ EXTRA_DIST = 3dnow_win.cpp cpu_detect_x8 + noinst_HEADERS = AAFilter.h cpu_detect.h cpu_detect_x86_gcc.cpp FIRFilter.h RateTransposer.h TDStretch.h PeakFinder.h + 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 cpu_detect_x86_gcc.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 + all: all-am + + .SUFFIXES: +@@ -292,8 +290,6 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SoundTouch.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TDStretch.Plo@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu_detect_x86_gcc.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmx_optimized.Plo@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sse_optimized.Plo@am__quote@ + + .cpp.o: + @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |