### this file is sourced not run
PKGVER=0.18.2
PKGBUILD=1

TARBALL=cloog-$PKGVER.tar.gz
MD5SUM=69116aa6cd5e73f6b688d871875e1292
SRC_URL=http://distro.ibiblio.org/fatdog/source/710/clfs-packages-3.0.0.tar
BUNDLE=clfs-packages-3.0.0.tar

SLACKREQ=
SLACKDESC="libcloog: libcloog $PKGVER (Z-polyhedra library)  
libcloog:  
libcloog: CLooG is a library to generate code for scanning Z-polyhedra. In 
libcloog: other words, it finds code that reaches each integral point of one 
libcloog: or more parameterized polyhedra. GCC links with this library in 
libcloog: order to enable the new loop generation code known as Graphite.  
libcloog: 
libcloog: 
libcloog: 
libcloog: 
libcloog: 
"


### 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
### default pkg_package
### build
pkg_build() {
	cd /tmp/cloog*

	CC="gcc -isystem /usr/include ${BUILD64}" \
	LDFLAGS="-Wl,-rpath-link,/usr/lib64:/lib64 ${BUILD64}" \
	  ./configure --prefix=/usr --libdir=/usr/lib64 --with-isl=system &&
  	  
	sed -i '/cmake/d' Makefile &&
	make $MAKEFLAGS &&
	make install &&
	
	pkg_build_slackdesc
}
