# Contributor: Anil Madhavapeddy <anil@recoil.org>
# Maintainer: Anil Madhavapeddy <anil@recoil.org>
pkgname=gringo
pkgver=4.5.4
pkgrel=1
pkgdesc="Grounder to translate user-provided logic programs"
url="https://potassco.org/"
arch="all"
license="LGPL-3.0"
depends=""
makedepends="re2c scons bison python2"
install=""
subpackages=""
source="https://downloads.sourceforge.net/project/potassco/gringo/${pkgver}/gringo-${pkgver}-source.tar.gz
	010_include_cmath.patch
	"
builddir="$srcdir"/$pkgname-$pkgver-source

build() {
	cd "$builddir"
	scons --build-dir=release gringo clingo reify || return 1
}

package() {
	cd "$builddir"
	for i in gringo clingo reify; do
		install -Dm755 "build/release/$i" "$pkgdir/usr/bin/$i" || return 1
	done
}

sha512sums="0b227f5a639eda512382b4b17adcacb394e010a7297c7cac379ee08679ce60299c6091f272472f376c40f935e8e956b181af83b5bc0a12d881a5bd7211b1dcf7  gringo-4.5.4-source.tar.gz
426b9d578bfa3a8b10963f5084b2f9879c20b9843795518c484335e51c5de2b62b8d69fb96be829c015511d30d428af1ef3cdfa0b9cc3cfb1fac2581eb60f236  010_include_cmath.patch"
