ncview: bypass compiler check against netcdf-c compiler (#34580)
This commit is contained in:
parent
3161784e9a
commit
dbd425f0f8
1 changed files with 10 additions and 9 deletions
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue