pkgname=tcl
pkgver=8.6.13
pkgrel=2
arch=('armv7h' 'aarch64')
license=('unknown')
source=("$pkgname$pkgver-src.tar.gz"
"$pkgname$pkgver-html.tar.gz")
depends=(glibc)
build() {
cd "$pkgname$pkgver"
SRCDIR=$(pwd)
cd unix
./configure --prefix=/usr \
--mandir=/usr/share/man
make
sed -e "s|$SRCDIR/unix|/usr/lib|" \
-e "s|$SRCDIR|/usr/include|" \
-i tclConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/tdbc1.1.5|/usr/lib/tdbc1.1.5|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.5/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.5/library|/usr/lib/tcl8.6|" \
-e "s|$SRCDIR/pkgs/tdbc1.1.5|/usr/include|" \
-i pkgs/tdbc1.1.5/tdbcConfig.sh
sed -e "s|$SRCDIR/unix/pkgs/itcl4.2.3|/usr/lib/itcl4.2.3|" \
-e "s|$SRCDIR/pkgs/itcl4.2.3/generic|/usr/include|" \
-e "s|$SRCDIR/pkgs/itcl4.2.3|/usr/include|" \
-i pkgs/itcl4.2.3/itclConfig.sh
unset SRCDIR
}
package() {
cd "$pkgname$pkgver"
cd unix
make DESTDIR="$pkgdir/" install
chmod -v u+w "$pkgdir"/usr/lib/libtcl8.6.so
make -j1 DESTDIR="$pkgdir/" install-private-headers
ln -sfv tclsh8.6 "$pkgdir"/usr/bin/tclsh
mv "$pkgdir"/usr/share/man/man3/{Thread,Tcl_Thread}.3
cd ..
mkdir -v -p "$pkgdir"/usr/share/doc/tcl-8.6.13
cp -v -r ./html/* "$pkgdir"/usr/share/doc/tcl-8.6.13
# somehow tcl leaks sqlite things outside...
rm -f "${pkgdir}"/usr/bin/sqlite3_analyzer
rm -f "${pkgdir}"/usr/share/man/mann/sqlite3.n
}
sha256sums=('43a1fae7412f61ff11de2cfd05d28cfc3a73762f354a417c62370a54e2caf066'
'6df28699d3b4d1c235282e61f2a9ba6a814652432f3f79534088261504e653ee')