git » coin-or-mp.git » main » tree

[main] / PKGBUILD

# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andreas Radke <andyrtr@archlinux.org>
# Contributor: spider-mario <spidermario@free.fr>
# Contributor: Daniel Ehlers <danielehlers@mindeye.net>

pkgname=coin-or-mp
pkgver=1.8.4
pkgrel=6
pkgdesc='C-API library that supports most of the functionality of CLP (Coin LP), CBC (Coin Branch-and-Cut), and CGL (Cut Generation Library) projects'
arch=(x86_64 'armv7h')
url='https://projects.coin-or.org/CoinMP'
license=(EPL)
groups=(coin-or)
depends=(coin-or-cbc
         coin-or-cgl
         coin-or-clp
         coin-or-coinutils
         gcc-libs
         glibc)
source=(https://www.coin-or.org/download/source/CoinMP/CoinMP-$pkgver.tgz)
sha256sums=('3459fb0ccbdd39342744684338984ac4cc153fb0434f4cae8cf74bd67490a38d')

build() {
  cd CoinMP-$pkgver/CoinMP
  export CXXFLAGS+=" -Wp,-U_GLIBCXX_ASSERTIONS"
  ./configure --prefix=/usr \
              --with-osi-lib="$(pkg-config --libs osi)" \
              --with-osi-incdir="/usr/include/coin/" \
              --with-clp-lib="$(pkg-config --libs clp)" \
              --with-clp-incdir="/usr/include/coin/" \
              --with-cgl-lib="$(pkg-config --libs cgl)" \
              --with-cgl-incdir="/usr/include/coin/" \
              --with-cbc-lib="$(pkg-config --libs cbc)" \
              --with-cbc-incdir="/usr/include/coin/" \
              --with-coinutils-lib="$(pkg-config --libs coinutils)" \
              --with-coinutils-incdir="/usr/include/coin/"
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool # Fix overlinking
  make
}


# A test segfaulted, but i don't have good debug setup on the builder...
# so we will see if an application segfaults on the target, and then fix it, lol.
#check() {
#  cd CoinMP-$pkgver/CoinMP
#  make test
#}

package() {
  cd CoinMP-$pkgver/CoinMP

  make DESTDIR="$pkgdir" install
  rm -rf "$pkgdir"/sources
}