summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/dealii/package.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py
index 43fd884dad..9e37fda924 100644
--- a/var/spack/repos/builtin/packages/dealii/package.py
+++ b/var/spack/repos/builtin/packages/dealii/package.py
@@ -111,7 +111,8 @@ class Dealii(CMakePackage):
when='@8.5.0:~mpi+python')
depends_on("boost@1.59.0:1.63,1.66:+thread+system+serialization+iostreams+mpi+python",
when='@8.5.0:+mpi+python')
- depends_on("bzip2")
+ # bzip2 is not needed since 9.0
+ depends_on("bzip2", when='@:8.99')
depends_on("lapack")
depends_on("muparser")
depends_on("suite-sparse")
@@ -174,10 +175,6 @@ class Dealii(CMakePackage):
'-DDEAL_II_COMPONENT_EXAMPLES=ON',
'-DDEAL_II_WITH_THREADS:BOOL=ON',
'-DBOOST_DIR=%s' % spec['boost'].prefix,
- # Cmake may still pick up system's bzip2, fix this:
- '-DBZIP2_FOUND=true',
- '-DBZIP2_INCLUDE_DIRS=%s' % spec['bzip2'].prefix.include,
- '-DBZIP2_LIBRARIES=%s' % spec['bzip2'].libs.joined(';'),
# CMake's FindBlas/Lapack may pickup system's blas/lapack instead
# of Spack's. Be more specific to avoid this.
# Note that both lapack and blas are provided in -DLAPACK_XYZ.
@@ -191,6 +188,14 @@ class Dealii(CMakePackage):
'-DZLIB_DIR=%s' % spec['zlib'].prefix
])
+ if spec.satisfies('@:8.99'):
+ options.extend([
+ # Cmake may still pick up system's bzip2, fix this:
+ '-DBZIP2_FOUND=true',
+ '-DBZIP2_INCLUDE_DIRS=%s' % spec['bzip2'].prefix.include,
+ '-DBZIP2_LIBRARIES=%s' % spec['bzip2'].libs.joined(';')
+ ])
+
# Set recommended flags for maximum (matrix-free) performance, see
# https://groups.google.com/forum/?fromgroups#!topic/dealii/3Yjy8CBIrgU
if spec.satisfies('%gcc'):