petsc: when hdf5 depends on zlib - petsc+hdf5 should also be configur… (#6189)

* petsc: when hdf5 depends on zlib - petsc+hdf5 should also be configured with zlib

* petsc: fix dependency [of zlib to be on hdf5 - and not on petsc]

* petsc: use the fact that hdf5/package.py has a hard dependency on zlib [so no need to check for this dependency in code]

recommended-by: @davydden

* petsc: change hdf5 dependency to 'hdf5+hl' as petsc configure is looing for -lhdf5_hl

https://github.com/spack/spack/issues/5846
This commit is contained in:
Satish Balay 2017-11-09 13:34:59 -06:00 committed by Todd Gamblin
parent 8d512ce9ae
commit 2b07379831

View File

@ -113,7 +113,8 @@ class Petsc(Package):
depends_on('metis@5:~int64+real64', when='+metis~int64+double')
depends_on('metis@5:+int64', when='+metis+int64~double')
depends_on('hdf5+mpi', when='+hdf5+mpi')
depends_on('hdf5+mpi+hl', when='+hdf5+mpi')
depends_on('zlib', when='+hdf5')
depends_on('parmetis', when='+metis+mpi')
# Hypre does not support complex numbers.
# Also PETSc prefer to build it without internal superlu, likely due to
@ -211,7 +212,7 @@ def install(self, spec, prefix):
# Activates library support if needed
for library in ('metis', 'boost', 'hdf5', 'hypre', 'parmetis',
'mumps', 'trilinos'):
'mumps', 'trilinos', 'zlib'):
options.append(
'--with-{library}={value}'.format(
library=library, value=('1' if library in spec else '0'))