diff options
-rw-r--r-- | var/spack/repos/builtin/packages/ncview/package.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/var/spack/repos/builtin/packages/ncview/package.py b/var/spack/repos/builtin/packages/ncview/package.py index b396868c8d..9d2b39fbc3 100644 --- a/var/spack/repos/builtin/packages/ncview/package.py +++ b/var/spack/repos/builtin/packages/ncview/package.py @@ -20,12 +20,13 @@ class Ncview(AutotoolsPackage): depends_on("libpng") depends_on("libxaw") - def configure_args(self): - spec = self.spec - - config_args = [] - - if spec.satisfies("^netcdf-c+mpi"): - config_args.append("CC={0}".format(spec["mpi"].mpicc)) - - return config_args + def patch(self): + # Disable the netcdf-c compiler check, save and restore the + # modification timestamp of the file to prevent autoreconf. + patched_file = "configure" + with keep_modification_time(patched_file): + filter_file( + "if test x\$CC_TEST_SAME != x\$NETCDF_CC_TEST_SAME; then", # noqa: W605 + "if false; then", + patched_file, + ) |