summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorDom Heinzeller <dom.heinzeller@icloud.com>2023-01-17 01:30:52 -0700
committerGitHub <noreply@github.com>2023-01-17 09:30:52 +0100
commitdbd425f0f83d4dcda8dd0e7c843ad15ba8ce261f (patch)
treeb93929882b0b69de87ab398a15e10c3800e0193c /var
parent3161784e9a3eb5f2c18468ab1bd3e747506e6e8a (diff)
downloadspack-dbd425f0f83d4dcda8dd0e7c843ad15ba8ce261f.tar.gz
spack-dbd425f0f83d4dcda8dd0e7c843ad15ba8ce261f.tar.bz2
spack-dbd425f0f83d4dcda8dd0e7c843ad15ba8ce261f.tar.xz
spack-dbd425f0f83d4dcda8dd0e7c843ad15ba8ce261f.zip
ncview: bypass compiler check against netcdf-c compiler (#34580)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ncview/package.py19
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,
+ )