PKGBUILDs/community/sundials/PKGBUILD

44 lines
1.2 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>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set SUNDIALS_INDEX_TYPE for 32-bit ARM
pkgname=sundials
2020-01-11 19:20:22 +00:00
pkgver=5.1.0
2019-10-23 00:22:51 +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-01-11 19:20:22 +00:00
sha256sums=('fb22d14fad42203809dc46d046b001149ec4e901b23882bd4a80619157fd9b21')
2019-03-01 02:34:16 +00:00
prepare() {
mkdir -p build
}
build() {
cd build
[[ $CARCH != "aarch64" ]] && CONFIG="-DSUNDIALS_INDEX_TYPE=int32_t"
cmake ../$pkgname-$pkgver \
-DCMAKE_INSTALL_PREFIX=/usr \
-DMPI_ENABLE=ON \
-DPTHREAD_ENABLE=ON \
-DOPENMP_ENABLE=ON \
-DF77_INTERFACE_ENABLE=ON \
-DKLU_ENABLE=ON \
-DKLU_LIBRARY_DIR=/usr/lib \
-DEXAMPLES_INSTALL_PATH=/usr/share/sundials/examples $CONFIG
make
}
package() {
cd build
make DESTDIR="$pkgdir" install
install -Dm644 "$srcdir"/$pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
}