# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=creduce
pkgver=2.7.0
pkgrel=0
pkgdesc="A C/C++ program reducer"
url="http://embed.cs.utah.edu/creduce/"
arch="all !x86"
license="custom"
# util-linux provides lscpu
depends="clang indent perl perl-exporter-lite perl-file-which
	perl-getopt-tabular perl-regexp-common perl-sys-cpu perl-term-readkey
	util-linux"
makedepends="clang-dev clang-static flex llvm-dev zlib-dev"
source="http://embed.cs.utah.edu/creduce/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	CC=clang CXX=clang++ ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libexecdir=/usr/lib/$pkgname
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="0ded47fdb4303d84619d63fbedd7bc12141b4857679dda8438683199dbdc98b985f848e797b9dc25a31dda591ee54bcb94580285890b23495fcf151aa3636226  creduce-2.7.0.tar.gz"
