#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=soundtouch
pkgver=1.6.0
pkgrel=1rl
source=("http://www.surina.net/soundtouch/soundtouch-$pkgver.tar.gz" \
	"soundtouch-1.4.0-mmx-sse-compile-fix.patch" \
	"soundtouch-1.4.0-x86_64-asm-broken.patch" \
	"01_remove_sse.patch")
docs=("readme.html" "copying.txt")
url=http://www.surina.net/soundtouch/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"soundtouch (sound processing library)"
"SoundTouch is an open-source audio processing library for changing the"
"tempo, Pitch and Playback Rates of audio streams or files."
)


build() {
	cd $startdir/src/$pkgname

	patch -p1 --ignore-whitespace -i "$startdir/src/01_remove_sse.patch" || exit 1
#	patch -p1 < ../01_remove_sse.patch || exit 1

#	patch -p1 < $startdir/src/soundtouch-1.4.0-mmx-sse-compile-fix.patch || exit 1
#	patch -p1 < $startdir/src/soundtouch-1.4.0-x86_64-asm-broken.patch || exit 1

	./bootstrap
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc --disable-static --enable-shared 
	make || return 1
	make install DESTDIR=$startdir/pkg
	rm -rf $startdir/pkg/usr/doc/soundtouch
}