# Contributor: Shannon Noe <snoe925@gmail.com>
# Maintainer: rubicon <rubicon@mailo.com>
pkgname=tclx
pkgver=8.6.3
pkgrel=0
pkgdesc="TclX extension to Tcl"
url="https://github.com/flightaware/tclx"
arch="all"
license="BSD"
depends="tcl"
depends_dev="tcl-dev"
makedepends="$depends_dev"
checkdepends="bash"
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/flightaware/tclx/archive/v$pkgver.tar.gz
	process-test.patch
	"

build() {
	local _64bit="--disable-64bit"
	case "$CARCH" in
	x86_64) _64bit="--enable-64bit";;
	esac
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-threads \
		$_64bit
	make
}

check() {
	make test TESTFLAGS="-verbose pbtels"
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

sha512sums="
680b8916ccb5725ed173b45549c94e7b1e17c4e5cf700c3991d2791b9f299660e94c880401dccfbff7ca630036c0781c41a9692c2d8ead2e7ad880e2e05a69e7  tclx-8.6.3.tar.gz
54044611c72f0355bd906f78327605b9f350e265a185478d2e77a32a2b00ef532da8395f7571b470fc9e066ec424b18d295b1b5245e3da64dac0cf57b57f1fd1  process-test.patch
"
