### this file is sourced not run
PKGVER=5.20.0

# CLFS 3.0.0
TARBALL=perl-5.20.0.tar.bz2 
MD5SUM=20cbecd4e9e880ee7a50a136c8b1484e
SRC_URL=http://distro.ibiblio.org/fatdog/source/710/clfs-packages-3.0.0.tar
BUNDLE=clfs-packages-3.0.0.tar

SLACKREQ=
SLACKDESC="tools-perl: tools-perl $PKGVER (Build-system perl)  
tools-perl:  
tools-perl: The Perl package contains the Practical Extraction and Report 
tools-perl: Language.  
tools-perl: 
tools-perl: This is the CLFS /tools package, part of the build system, 
tools-perl: and not for general use. 
tools-perl: 
tools-perl: DO NOT INSTALL THIS PACKAGE unless you know what you're doing.
tools-perl: 
tools-perl: 
"

### 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/perl*
	
	sed -i 's@/usr/include@/tools/include@g' ext/Errno/Errno_pm.PL &&
	./configure.gnu --prefix=/tools  -Dcc="gcc ${BUILD32}" &&
	make $MAKEFLAGS && make install &&
	ln -sfv /tools/bin/perl /usr/bin &&

	pkg_build_slackdesc
}


