From dea44bad8becc64a439b1fc0ee391a834cace85f Mon Sep 17 00:00:00 2001 From: Alex Richert Date: Thu, 2 May 2024 10:42:15 -0600 Subject: [PATCH] grads: fix libpng and g2c deps (#43909) * grads: fix libpng and g2c deps * Update package.py * [@spackbot] updating style on behalf of AlexanderRichert-NOAA --- var/spack/repos/builtin/packages/grads/package.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/grads/package.py b/var/spack/repos/builtin/packages/grads/package.py index 70146e6720..e384e1a88a 100644 --- a/var/spack/repos/builtin/packages/grads/package.py +++ b/var/spack/repos/builtin/packages/grads/package.py @@ -63,10 +63,14 @@ def url_for_version(self, version): return url.format(version.up_to(2), version) # Name of grib2 C library has changed in recent versions - with when("+grib2"): + def patch(self): + if self.spec.satisfies("@:2.2.2"): + filter_file("png15", "png", "configure") - def patch(self): + if self.spec.satisfies("+grib2"): filter_file("grib2c", "g2c", "configure") + if self.spec.satisfies("^g2c@1.8.0:"): + filter_file("G2_VERSION", "G2C_VERSION", "src/gacfg.c") def setup_build_environment(self, env): env.set("SUPPLIBS", "/")