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

# CLFS 3.0.0 updated to LFS 8.2
TARBALL=tcl${PKGVER}-src.tar.gz
MD5SUM=81656d3367af032e0ae6157eff134f89
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKREQ=
SLACKDESC="tools-tcl: tools-tcl $PKGVER (Build-system tcl)  
tools-tcl:  
tools-tcl: The Tcl package contains the Tool Command Language, a robust 
tools-tcl: general-purpose scripting language.  
tools-tcl: 
tools-tcl: This is the CLFS /tools package, part of the build system, 
tools-tcl: and not for general use. 
tools-tcl: 
tools-tcl: DO NOT INSTALL THIS PACKAGE unless you know what you're doing.
tools-tcl: 
tools-tcl: 
"

### 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/tcl*
	sed -i s/500/5000/ generic/regc_nfa.c &&
	
	cd unix &&
	CC="gcc ${BUILD64}" ./configure --prefix=/tools --libdir=/tools/lib64 &&
	make $MAKEFLAGS && make install && make install-private-headers &&
	ln -sv tclsh8.6 /tools/bin/tclsh &&

	pkg_build_slackdesc
}


