grads: fix libpng and g2c deps (#43909)

* grads: fix libpng and g2c deps
* Update package.py
* [@spackbot] updating style on behalf of AlexanderRichert-NOAA
This commit is contained in:
Alex Richert 2024-05-02 10:42:15 -06:00 committed by GitHub
parent e37870ff43
commit dea44bad8b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,10 +63,14 @@ def url_for_version(self, version):
return url.format(version.up_to(2), version) return url.format(version.up_to(2), version)
# Name of grib2 C library has changed in recent versions # Name of grib2 C library has changed in recent versions
with when("+grib2"):
def patch(self): def patch(self):
if self.spec.satisfies("@:2.2.2"):
filter_file("png15", "png", "configure")
if self.spec.satisfies("+grib2"):
filter_file("grib2c", "g2c", "configure") 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): def setup_build_environment(self, env):
env.set("SUPPLIBS", "/") env.set("SUPPLIBS", "/")