# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Tarn Burton <twburton at gmail dot com>

pkgname=normaliz
pkgver=3.9.1
pkgrel=1
pkgdesc='A tool for computations in affine monoids, vector configurations, lattice polytopes, and rational cones'
arch=(x86_64)
url='https://www.normaliz.uni-osnabrueck.de/'
license=(GPL)
depends=(e-antic)
makedepends=(nauty)
source=(https://github.com/Normaliz/Normaliz/releases/download/v$pkgver/Normaliz-$pkgver.tar.gz)
sha256sums=('ad5dbecc3ca3991bcd7b18774ebe2b68dae12ccca33c813ab29891beb85daa20')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  #https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
