# Maintainer: Developer <dev@opalos.org>
# Maintainer: Developer <dev@opalos.org>

pkgname=libisl
pkgver=%version%
pkgrel=%release%
pkgdesc='Library for manipulating sets and relations of integer points bounded by linear constraints'
arch=('x86_64')
url='https://libisl.sourceforge.io'
license=('MIT')
depends=('gmp')
provides=('isl' 'libisl.so')
replaces=('isl')
options=(staticlibs)
source=("https://libisl.sourceforge.io/isl-${pkgver}.tar.xz")
b2sums=('2cfe2e0774a991d2385e66f58490c5454382cabc82d74eb4bbe5a603293b7bdc34ca3b087f0884f9da319c447747edc76275ecaf2f171237939f9c7d3c52ced7')

build() {
  cd "${srcdir}"/${pkgname#lib}-${pkgver}
  ./configure --prefix=/usr
  make
}

check() {
  cd "${srcdir}"/${pkgname#lib}-${pkgver}
  make check || true
}

package() {
  cd "${srcdir}"/${pkgname#lib}-${pkgver}

  make DESTDIR="${pkgdir}" install

  install -dm755 "${pkgdir}"/usr/share/gdb/auto-load/usr/lib/
  mv "${pkgdir}"/usr/lib/libisl.so.*-gdb.py "${pkgdir}"/usr/share/gdb/auto-load/usr/lib/

  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
