### this file is sourced not run
PKGVER=1.1.6
PKGBUILD=1
PKGARCH=i686

# source: BLFS svn 2018-5-27
TARBALL=alsa-lib-$PKGVER.tar.bz2
MD5SUM=2f981a8f7897c59ec2ddc44916d33788
SRC_URL=ftp://ftp.alsa-project.org/pub/lib/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="alsa-lib32: alsa-lib32 $PKGVER (ALSA core sound library)  
alsa-lib32:  
alsa-lib32: The ALSA Library package contains the ALSA library used by programs 
alsa-lib32: (including ALSA Utilities) requiring access to the ALSA sound 
alsa-lib32: interface.  
alsa-lib32: 
alsa-lib32: This contains 32-bit version of the library.
alsa-lib32: 
alsa-lib32: 
alsa-lib32: 
alsa-lib32: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/alsa* &&

	# selected upstream patches up to 2 Nov 2018
	# note1: 9bb985c must be applied together with b420056
	# note2: alsa-lib 1.1.7 is bad. Skip to 1.1.8 next time.
	for p in 23a20cd 4740dd9 ad5aea8 6f134a8 9fc2489 2c04ea1 b0fc685 \
			 1714332 a849163 7c5c050 \
			 9bb985c b420056 ;
	do
		patch -Np 1 -i ../pkg/upstream/commit-$p || return 1
	done
}

### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-python --disable-thread-safety"
	pkg_build_autoconf && 
	pkg_build_slackdesc
}
