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

TARBALL=libtool-2.4.2.tar.xz
MD5SUM=2ec8997e0c07249eb4cbd072417d70fe 
SRC_URL=http://distro.ibiblio.org/fatdog/source/710/clfs-packages-3.0.0.tar
BUNDLE=clfs-packages-3.0.0.tar

SLACKREQ=
SLACKDESC='libtool: libtool 2.4.2 (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='/lib64 /usr/lib64 /usr/local/lib64 /opt/lib64'" > config.cache &&
	CC="gcc ${BUILD64}" ./configure --prefix=/usr \
	   --libdir=/usr/lib64 --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 
}
 

