summaryrefslogtreecommitdiff
path: root/system/tcl/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 23:28:58 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-15 23:28:58 -0500
commitef1e4350517ea6c690e54fae2a8a1ce1184fa6b1 (patch)
tree8cbbe7ceed17a05c5ceda8a0b69d233defcf2297 /system/tcl/APKBUILD
parentde24d0a46986d9103dd6c5dc90983402368d6b09 (diff)
downloadpackages-ef1e4350517ea6c690e54fae2a8a1ce1184fa6b1.tar.gz
packages-ef1e4350517ea6c690e54fae2a8a1ce1184fa6b1.tar.bz2
packages-ef1e4350517ea6c690e54fae2a8a1ce1184fa6b1.tar.xz
packages-ef1e4350517ea6c690e54fae2a8a1ce1184fa6b1.zip
system/tcl: bring in for expect
Diffstat (limited to 'system/tcl/APKBUILD')
-rw-r--r--system/tcl/APKBUILD80
1 files changed, 80 insertions, 0 deletions
diff --git a/system/tcl/APKBUILD b/system/tcl/APKBUILD
new file mode 100644
index 000000000..4e2769d35
--- /dev/null
+++ b/system/tcl/APKBUILD
@@ -0,0 +1,80 @@
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Maintainer:
+pkgname=tcl
+pkgver=8.6.8
+pkgrel=0
+pkgdesc="The Tcl scripting language"
+url="http://tcl.sourceforge.net/"
+arch="all"
+license="TCL"
+depends=""
+depends_dev="tcl"
+makedepends="zlib-dev sqlite-dev"
+subpackages="$pkgname-doc $pkgname-dev"
+source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname$pkgver-src.tar.gz
+ tcl-stat64.patch
+ "
+
+_major=${pkgver%.*}
+builddir="$srcdir"/tcl${pkgver}/unix
+
+prepare() {
+ cd "$srcdir"/tcl${pkgver}
+ for i in $source; do
+ case $i in
+ *.patch) msg "$i"; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ rm -r pkgs/sqlite3*
+}
+
+build() {
+ local _64bit="--disable-64bit"
+ case "$CARCH" in
+ x86_64) _64bit="--enable-64bit";;
+ esac
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --with-system-sqlite \
+ $_64bit
+ make
+}
+
+package() {
+ cd "$builddir"
+ export LD_LIBRARY_PATH="$_builddir"
+ make -j1 INSTALL_ROOT="${pkgdir}" install install-private-headers
+
+ ln -sf tclsh${_major} "${pkgdir}"/usr/bin/tclsh
+ install -Dm644 ../license.terms ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+
+ # remove buildroot traces
+ find "$pkgdir" -name '*Config.sh' | xargs sed -i -e "s#${srcdir}#/usr/src#"
+}
+
+check() {
+ cd "$builddir"
+
+ # thread-4.5 and thread-5* is suppressed because it tests UB
+ # http* is suppressed because it tries to do network i/o
+ # unixInit-3* is suppressed due to hardcoded locale assumptions
+ make test TESTFLAGS="-verbose pbtels -skip 'thread-4.5 thread-5* http* unixInit-3*'"
+}
+
+dev() {
+ default_dev
+ cd $pkgdir
+ for i in $(find . -name '*.c' -o -name '*Config.sh'); do
+ mkdir -p "$subpkgdir"/${i%/*}
+ mv $i "$subpkgdir"/${i%/*}/ || return 1
+ done
+}
+
+sha512sums="14fb8fd880ecedda61119556f404fa1da34146f82dbf771be2ab322c6c575a898e194016dc3300f6764008d8f3bf59b07e31723bf8a3aafdcee6b4ef7667b18e tcl8.6.8-src.tar.gz
+cd52cbe80fd2be227c9018dbe38fa0888302293402e7a57f2e231c195b7c1902f1b58bc87d19c9d123915ca757e871abf084c0ef23b1a7f187bc03ba93904cc2 tcl-stat64.patch"