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

TARBALL=mpc-$PKGVER.tar.gz
MD5SUM=5c9bc658c9fd0f940e8e3e0f09530c62
BUNDLE=fatdog-base-11.3.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/900/$BUNDLE

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


### 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 usr/share
}

### build
pkg_build() {
	cd /tmp/mpc*
	
	CC="gcc -isystem /usr/include ${BUILD32}" \
	LDFLAGS="-Wl,-rpath-link,/usr/lib:/lib ${BUILD32}" \
	  ./configure --prefix=/usr --host=${CLFS_TARGET32} &&
	  
	make $MAKEFLAGS && make install &&
	
	pkg_build_slackdesc
}
