# Maintainer: Antonio Rojas # Contributor: spider-mario # Contributor: Daniel Ehlers pkgname=coin-or-cbc pkgver=2.10.10 pkgrel=1 pkgdesc='COIN-OR branch-and-cut mixed integer programming solver' arch=(x86_64) url='https://github.com/coin-or/Cbc' license=(EPL) groups=(coin-or) depends=(coin-or-cgl) makedepends=(nauty) source=($pkgname-$pkgver.tar.gz::https://github.com/coin-or/Cbc/archive/refs/tags/releases/$pkgver.tar.gz) sha256sums=('f394efecccc40a51bf79fba2c2af0bc92561f3e6b8b6e4c6e36d5e70986f734f') build() { cd Cbc-releases-$pkgver ./configure --prefix=/usr \ --enable-cbc-parallel \ --with-nauty-lib=/usr/lib/libnauty.a --with-nauty-incdir=/usr/include/nauty sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } check() { cd Cbc-releases-$pkgver/Cbc make test } package() { cd Cbc-releases-$pkgver make DESTDIR="$pkgdir" install # Remove nauty from linker flags in pc file, it is statically compiled sed -e 's|/usr/lib/libnauty.a||' -i "$pkgdir"/usr/lib/pkgconfig/cbc.pc }