ncview: bypass compiler check against netcdf-c compiler (#34580)

This commit is contained in:
Dom Heinzeller 2023-01-17 01:30:52 -07:00 committed by GitHub
parent 3161784e9a
commit dbd425f0f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,12 +20,13 @@ class Ncview(AutotoolsPackage):
depends_on("libpng") depends_on("libpng")
depends_on("libxaw") depends_on("libxaw")
def configure_args(self): def patch(self):
spec = self.spec # Disable the netcdf-c compiler check, save and restore the
# modification timestamp of the file to prevent autoreconf.
config_args = [] patched_file = "configure"
with keep_modification_time(patched_file):
if spec.satisfies("^netcdf-c+mpi"): filter_file(
config_args.append("CC={0}".format(spec["mpi"].mpicc)) "if test x\$CC_TEST_SAME != x\$NETCDF_CC_TEST_SAME; then", # noqa: W605
"if false; then",
return config_args patched_file,
)