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

# CLFS 3.0.0
TARBALL=tcl8.6.1-src.tar.gz
MD5SUM=aae4b701ee527c6e4e1a6f9c7399882e 
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-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
}


