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

TARBALL=mpc-1.0.2.tar.gz
MD5SUM=68fadff3358fb3e7976c7a398a0af4c3
SRC_URL=http://distro.ibiblio.org/fatdog/source/710/clfs-packages-3.0.0.tar
BUNDLE=clfs-packages-3.0.0.tar

SLACKREQ=libmpfr
SLACKDESC='libmpc: libmpc 1.0.2 (Multiprecision Complex Library)  
libmpc:  
libmpc: Gnu Mpc is a C library for the arithmetic of complex numbers with 
libmpc: arbitrarily high precision and correct rounding of the result. It extends 
libmpc: the principles of the IEEE-754 standard for fixed precision real floating 
libmpc: point numbers to complex numbers, providing well-defined semantics for 
libmpc: every operation. At the same time, speed of operation at high precision 
libmpc: is a major design goal. This package is needed by GCC (GNU C Compiler).  
libmpc: 
libmpc: 
libmpc:
'


### 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/mpc*
	
	CC="gcc -isystem /usr/include ${BUILD64}" \
	LDFLAGS="-Wl,-rpath-link,/usr/lib64:/lib64 ${BUILD64}" \
	  ./configure --prefix=/usr --libdir=/usr/lib64 \
	  --docdir=/usr/share/doc/mpc-1.0.2	&&
	make $MAKEFLAGS && make html &&
	make install && make install-html &&
	
	pkg_build_slackdesc
}
