From f6a8ae230e79bc8f1b336adce2ba007033989580 Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Sun, 29 Oct 2017 14:39:51 +0100 Subject: [PATCH] dealii: remove bzip2 dependency for newer versions (#6022) --- .../repos/builtin/packages/dealii/package.py | 15 ++++++++++----- 1 file 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 @@ def cmake_args(self): '-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 @@ def cmake_args(self): '-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'):