summaryrefslogtreecommitdiff
path: root/extra/soundtouch/PKGBUILD
blob: 3de1063b2c8741866302f23e5f0e770c324ecb6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# $Id: PKGBUILD 67310 2010-02-06 08:17:47Z eric $
# Maintainer: Eric Belanger <eric@archlinux.org>
# Contributor: Jaroslaw Swierczynski <swiergot@juvepoland.com>
# Contributor: Raymano <re1212122000@yahoo.com>

pkgname=soundtouch
pkgver=1.5.0
pkgrel=1
pkgdesc="An audio processing library"
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
        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"
  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

  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
}