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

TARBALL=isl-$PKGVER.tar.xz
MD5SUM=1ae893020fa078531e6158cb243880a5
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKREQ=
SLACKDESC="libisl32: libisl32 $PKGVER (Sets library)  
libisl32:  
libisl32: ISL is a library for manipulating sets and relations of integer 
libisl32: points bounded by linear constraints. . Needed by gcc for 
libisl32: optimisations.  
libisl32: 
libisl32: This is 32-bit version of the libisl library.
libisl32: 
libisl32: 
libisl32: 
libisl32:  
"


### override download for LFS sources bundle
# $1-src-dir $2-tarball 
pkg_download() {
	echo downloading $BUNDLE for $TARBALL
	wget -P $1 $SRC_URL
	tar -xf $1/$BUNDLE --strip-components=1 -C $1 
	rm $1/$BUNDLE
}

### default pkg_prepare

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

### build
pkg_build() {
	cd /tmp/isl*

	CC="gcc -isystem /usr/include ${BUILD32}" \
	LDFLAGS="-Wl,-rpath-link,/usr/lib:/lib ${BUILD32}" \
	  ./configure --prefix=/usr --host=${CLFS_TARGET32} &&
	  
	make $MAKEFLAGS &&
	make install &&
	
	mkdir -pv /usr/share/gdb/auto-load/usr/lib &&
	mv -v /usr/lib/libisl*gdb.py /usr/share/gdb/auto-load/usr/lib &&

	pkg_build_slackdesc
}
