From 95bc67744593e59f1a11ccb4133e7e89ac044ed8 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Wed, 6 Nov 2019 18:13:21 +0100 Subject: cdo: Fix with_or_without calls (#13614) netcdf has been renamed to netcdf-c and udunits2 has been renamed to udunits. --- var/spack/repos/builtin/packages/cdo/package.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/cdo/package.py b/var/spack/repos/builtin/packages/cdo/package.py index 0c0692852a..5a584e5e86 100644 --- a/var/spack/repos/builtin/packages/cdo/package.py +++ b/var/spack/repos/builtin/packages/cdo/package.py @@ -79,7 +79,9 @@ class Cdo(AutotoolsPackage): msg='GCC 9 changed OpenMP data sharing behavior') def configure_args(self): - config_args = self.with_or_without('netcdf', activation_value='prefix') + config_args = self.with_or_without( + 'netcdf', + activation_value=lambda x: self.spec['netcdf-c'].prefix) if self.spec.variants['grib2'].value == 'eccodes': config_args.append('--with-eccodes=' + @@ -108,8 +110,9 @@ class Cdo(AutotoolsPackage): config_args += self.with_or_without('hdf5', activation_value='prefix') - config_args += self.with_or_without('udunits2', - activation_value='prefix') + config_args += self.with_or_without( + 'udunits2', + activation_value=lambda x: self.spec['udunits'].prefix) config_args += self.with_or_without('libxml2', activation_value='prefix') -- cgit v1.2.3-70-g09d2