# Template file for 'txr'
pkgname=txr
version=198
revision=1
build_style=configure
hostmakedepends="bison flex"
short_desc="Programming language for convenient data munging"
maintainer="Oliver Kiddle <okiddle@yahoo.co.uk>"
license="BSD-2-Clause"
homepage="http://www.nongnu.org/txr/"
distfiles="http://www.kylheku.com/cgit/txr/snapshot/${pkgname}-${version}.tar.bz2"
checksum=82f53cd14b2cd60a9d0faed49ca14d42f5e212d2f05310c54b8a041a9d28ebf4
make_check_target=tests

if [ "$CROSS_BUILD" ]; then
	hostmakedepends+=" txr"
fi

do_configure() {
	./configure --prefix=/usr --ccname="${CC}" \
		--platform-cflags="${CFLAGS}" \
		--platform-ldflags="${LDFLAGS}"
	if [ "$CROSS_BUILD" ]; then
		sed -i 's#^TXR :=.*#TXR = /usr/bin/txr#' Makefile
	fi
}

pre_check() {
	rm -rf tests/017
}

post_install() {
	vlicense LICENSE
}
