### this file is sourced not run
PKGVER=2.4.6
PKGBUILD=1
PKGARCH=x86_64

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

SLACKREQ=
SLACKDESC="libtool: libtool $PKGVER (generic library support)  
libtool:  
libtool: The Libtool package contains the GNU generic library support script. 
libtool: It wraps the complexity of using shared libraries in a consistent, 
libtool: portable interface.  
libtool: 
libtool: 
libtool: 
libtool: 
libtool: 
libtool:
"


### 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/libtool* &&
	
	echo "lt_cv_sys_dlsearch_path='/$LIBDIR /usr/$LIBDIR /usr/local/$LIBDIR /opt/$LIBDIR'" > config.cache &&
	CC="gcc ${BUILD64}" ./configure --prefix=/usr --libdir=/usr/$LIBDIR --cache-file=config.cache &&
	make $MAKEFLAGS && make install &&
	pkg_build_slackdesc &&
	
	# libtool isn't multilib aware, so wrap it
	mv -v /usr/bin/libtool{,-64} &&
	ln -sv multiarch_wrapper /usr/bin/libtool 
}
 

