# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: tikysal <tikysal@gmail.com>
# Derived from Daniel Ehlers'

pkgname=coin-or-coinutils
pkgver=2.11.12
pkgrel=1
pkgdesc='COIN-OR collection of utility classes'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://github.com/coin-or/CoinUtils'
license=(EPL-2.0)
depends=(blas
         bzip2
         coin-or-data-sample
         gcc-libs
         glibc
         glpk
         lapack
         zlib)
makedepends=(doxygen
             gcc-fortran
             git)
groups=(coin-or)
source=(git+https://github.com/coin-or/CoinUtils#tag=releases/$pkgver)
sha256sums=('eb3ef8bfbf913a0af35915c49410182be5a7e21e17754295eb4a3c23762706ba')

build() {
  cd CoinUtils
  ./configure \
    --prefix=/usr \
    --with-blas-lib='-lblas' \
    --with-lapack-lib='-llapack' \
    --with-glpk-lib='-lglpk' \
    --enable-dependency-linking
  make
}

check() {
  cd CoinUtils
  make test
}

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