From 9f8e40e95c84409328ee94dc51150cbedf53316a Mon Sep 17 00:00:00 2001 From: Tom Payerle Date: Sat, 5 Jun 2021 07:44:49 -0400 Subject: [PATCH] hdf-eos5: Fix issue when linking against hdf5+szip (#23411) (#23412) * hdf-eos5: Fix issue when linking against hdf5+szip (#23411) Should fix issue #23411 when linking against hdf5+szip Also fix bug if hdf5 does not depend on zlib Reluctantly added payerle as a maintainer --- var/spack/repos/builtin/packages/hdf-eos5/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hdf-eos5/package.py b/var/spack/repos/builtin/packages/hdf-eos5/package.py index 18fb5f288a..4e10b79615 100644 --- a/var/spack/repos/builtin/packages/hdf-eos5/package.py +++ b/var/spack/repos/builtin/packages/hdf-eos5/package.py @@ -46,6 +46,8 @@ class HdfEos5(AutotoolsPackage): conflicts('~static', when='~shared', msg='At least one of +static or +shared must be set') + maintainers = ['payerle'] + # Build dependencies depends_on('hdf5+hl') @@ -92,7 +94,10 @@ def configure_args(self): # Provide config args for dependencies extra_args.append('--with-hdf5={0}'.format(self.spec['hdf5'].prefix)) - if self.spec['zlib']: + if 'szip' in self.spec: + extra_args.append('--with-szlib={0}'.format( + self.spec['libszip'].prefix)) + if 'zlib' in self.spec: extra_args.append('--with-zlib={0}'.format( self.spec['zlib'].prefix))