summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--test_optdepends.sh10
3 files changed, 13 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9212c15aa11a..01963acd4e72 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -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
diff --git a/PKGBUILD b/PKGBUILD
index b0b922ab1621..2055a088ffc8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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