# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: spider-mario <spidermario@free.fr>
# Contributor: Daniel Ehlers <danielehlers@mindeye.net>

pkgname=coin-or-cgl
pkgver=0.60.9
pkgrel=1
pkgdesc='COIN-OR Cut Generation Library'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://github.com/coin-or/Cgl'
license=(EPL-2.0)
groups=(coin-or)
depends=(coin-or-clp
         coin-or-coinutils
         coin-or-osi
         gcc-libs
         glibc)
makedepends=(git)
source=(git+https://github.com/coin-or/Cgl#tag=releases/$pkgver)
sha256sums=('b24a06071a18fd10bbda07b90aeb55a88863bd4c145240950869d527cc614097')

build() {
  cd Cgl
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool # Fix overlinking
  make
}

check() {
  cd Cgl
  make test
}

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