PKGBUILDs/community/sundials/PKGBUILD

37 lines
1.1 KiB
Bash
Raw Normal View History

2019-03-01 02:34:16 +00:00
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Elmar Klausmeier <Elmar.Klausmeier@gmail.com>
2020-11-04 17:26:33 +00:00
# remove when bumped upstream
2019-03-01 02:34:16 +00:00
pkgname=sundials
2020-11-03 14:51:44 +00:00
pkgver=5.5.0
2020-04-01 23:43:21 +00:00
pkgrel=1
2019-03-01 02:34:16 +00:00
pkgdesc="Suite of nonlinear differential/algebraic equation solvers"
arch=(x86_64)
url="https://computation.llnl.gov/casc/sundials/main.html"
license=(BSD)
depends=(openmpi suitesparse)
makedepends=(cmake gcc-fortran python)
source=("https://computation.llnl.gov/projects/sundials/download/$pkgname-$pkgver.tar.gz")
2020-11-03 14:51:44 +00:00
sha256sums=('2a755e89aab96d2ff096a4e30bf00bb162e80be20e9e99f424dccfb249098237')
2019-03-01 02:34:16 +00:00
build() {
2020-05-21 23:48:41 +00:00
cmake -B build -S $pkgname-$pkgver \
2019-03-01 02:34:16 +00:00
-DCMAKE_INSTALL_PREFIX=/usr \
2020-05-21 23:48:41 +00:00
-DCMAKE_C_FLAGS="${CFLAGS} -fPIC -fcommon" \
2019-03-01 02:34:16 +00:00
-DMPI_ENABLE=ON \
-DPTHREAD_ENABLE=ON \
-DOPENMP_ENABLE=ON \
-DF77_INTERFACE_ENABLE=ON \
-DKLU_ENABLE=ON \
-DKLU_LIBRARY_DIR=/usr/lib \
2020-11-04 17:26:33 +00:00
-DEXAMPLES_INSTALL_PATH=/usr/share/sundials/examples
2020-05-21 23:48:41 +00:00
cmake --build build
2019-03-01 02:34:16 +00:00
}
package() {
2020-05-21 23:48:41 +00:00
DESTDIR="$pkgdir" cmake --install build
2019-03-01 02:34:16 +00:00
2020-05-21 23:48:41 +00:00
install -Dm644 $pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
2019-03-01 02:34:16 +00:00
}