# Maintainer: Antonio Rojas <arojas@archlinux.org>

pkgname=latte-integrale
pkgver=1.7.5
pkgrel=3
pkgdesc="Computer software dedicated to the problems of counting lattice points and integration inside convex polytopes"
arch=(x86_64)
url="https://www.math.ucdavis.edu/~latte/"
license=(GPL)
depends=(4ti2 ntl cddlib lidia)
source=("https://github.com/latte-int/latte/releases/download/version_${pkgver//./_}/latte-int-$pkgver.tar.gz")
sha256sums=('733139f206518d0a20f42d1e280428be901f7d29189b2c7845382cbd538953de')

build() {
  cd latte-int-$pkgver

  ./configure --prefix=/usr --enable-shared --with-ntl=/usr
  make
}

package() {
  cd latte-int-$pkgver
  make DESTDIR="$pkgdir" install

# Fix conflicts with LLVM
  mv "$pkgdir"/usr/bin/{count,latte-count}
}

