cruxports/sundials/Pkgfile

32 lines
883 B
Plaintext
Raw Normal View History

2022-02-05 15:39:19 -05:00
# Description: suite of nonlinear differential/algebraic equation solvers
# URL: https://computation.llnl.gov/casc/sundials/
# Maintainer: John McQuah, jmcquah at disroot dot org
2022-04-26 07:51:12 -04:00
# Depends on: suitesparse
2022-02-05 15:39:19 -05:00
name=sundials
version=5.8.0
release=1
source=(https://github.com/LLNL/sundials/releases/download/v$version/$name-$version.tar.gz
sundials-fix-cmake-targets.patch)
build() {
cd $name-$version
patch -p1 < $SRC/sundials-fix-cmake-targets.patch
cd -
cmake -B build -S $name-$version \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS="${CFLAGS} -fPIC -fcommon" \
-DENABLE_PTHREAD=ON \
-DENABLE_OPENMP=ON \
-DBUILD_FORTRAN77_INTERFACE=ON \
-DENABLE_KLU=ON \
-DKLU_LIBRARY_DIR=/usr/lib \
-DEXAMPLES_INSTALL=OFF
cmake --build build
DESTDIR=$PKG cmake --install build
rm $PKG/usr/include/sundials/{LICENSE,NOTICE}
}