diff options
author | Lucas Heitzmann Gabrielli | 2018-06-25 08:22:19 -0300 |
---|---|---|
committer | Lucas Heitzmann Gabrielli | 2018-06-25 08:22:19 -0300 |
commit | bdb8b80604aa1e8d53747f7ca072720b775bd0f7 (patch) | |
tree | 537c1e2d8b3a565ae7d5bb116faf12c7944226ab | |
parent | 12e02458042e082d98003252f6da43fec2ced273 (diff) | |
download | aur-bdb8b80604aa1e8d53747f7ca072720b775bd0f7.tar.gz |
Added min HYPRE version
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | test_optdepends.sh | 10 |
3 files changed, 13 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = petsc pkgdesc = Portable, extensible toolkit for scientific computation pkgver = 3.9.2 - pkgrel = 2 + pkgrel = 3 url = https://www.mcs.anl.gov/petsc/ install = petsc.install arch = i686 @@ -29,7 +29,7 @@ pkgbase = petsc source = http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.9.2.tar.gz source = test_optdepends.sh sha256sums = ab396ae5dbfff808df1b5648f5ce30f3021ec70faec3d5cd63df324d416ac6ac - sha256sums = c7b0d839c43bbae0405b8b007588debcd0da526e9a999c5933278d347a0900e2 + sha256sums = dc5ac9fe550250480dcb97bc4c6b0671296ec1e8794e92fe244785b4d7d3668e pkgname = petsc @@ -3,7 +3,7 @@ # Contributor: Lucas H. Gabrielli <heitzmann at gmail dot com> pkgname=petsc pkgver=3.9.2 -pkgrel=2 +pkgrel=3 _config=linux-c-opt # if --with-debugging=yes is set then PETSC_ARCH is automatically set to #"linux-c-debug" for some things, so the _config should be changed too @@ -31,7 +31,7 @@ install=petsc.install source=(http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/${pkgname}-${pkgver/_/-}.tar.gz test_optdepends.sh) sha256sums=('ab396ae5dbfff808df1b5648f5ce30f3021ec70faec3d5cd63df324d416ac6ac' - 'c7b0d839c43bbae0405b8b007588debcd0da526e9a999c5933278d347a0900e2') + 'dc5ac9fe550250480dcb97bc4c6b0671296ec1e8794e92fe244785b4d7d3668e') _install_dir=/opt/petsc/${_config} _petsc_arch="arch-${_config}" diff --git a/test_optdepends.sh b/test_optdepends.sh index c82eec8c5b14..bbb44536ca44 100644 --- a/test_optdepends.sh +++ b/test_optdepends.sh @@ -11,7 +11,15 @@ CONFOPTS="" # Add hypre support if [ -f "/usr/lib/libHYPRE.so" ]; then - CONFOPTS="${CONFOPTS} --with-hypre=1" + VERSION_MIN=2.14.2 + VERSION=$(readlink -f '/usr/lib/libHYPRE.so' | sed 's/^.*\.so\.') + + if [ "$VERSION_MIN" = "$(printf '%s\n' "$VERSION_MIN" "$VERSION" | sort -V | head -n1)" ]; then + CONFOPTS="${CONFOPTS} --with-hypre=1" + else + (>&2 echo "WARNING: COMPILING PETSc WITHOUT HYPRE.") + (>&2 echo "HYPRE $VERSION FOUND BUT AT LEAST $VERSION_MIN IS REQUIRED.") + fi fi # Add mumps support |