# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: josephgbr <rafael.f.f1@gmail.com>

pkgname=lib32-soundtouch
pkgver=2.1.2
pkgrel=1
pkgdesc='An audio processing library'
arch=(x86_64)
url='http://www.surina.net/soundtouch/'
license=(LGPL)
depends=(
  lib32-gcc-libs
  soundtouch
)
makedepends=(git)
source=(git+https://gitlab.com/soundtouch/soundtouch.git#tag=${pkgver})
sha256sums=(SKIP)

prepare() {
  cd soundtouch

  ./bootstrap
}

build() {
  cd soundtouch

  export CC='gcc -m32'
  export CXX='g++ -m32'
  export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'

  ./configure \
    --prefix='/usr' \
    --libdir='/usr/lib32' \
    --enable-shared
  make
}

package() {
  make DESTDIR="${pkgdir}" -C soundtouch install
  rm -rf "${pkgdir}"/usr/{bin,doc,include,share}
}

# vim: ts=2 sw=2 et:
