spherepack: fix url, checksum, add flags (#46525)

This commit is contained in:
Wouter Deconinck 2024-09-26 03:21:19 -05:00 committed by GitHub
parent e2aa11518a
commit 6872da419d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,14 +10,16 @@
class Spherepack(Package):
"""SPHEREPACK - A Package for Modeling Geophysical Processes"""
homepage = "https://www2.cisl.ucar.edu/resources/legacy/spherepack"
url = "https://www2.cisl.ucar.edu/sites/default/files/spherepack3.2.tar"
homepage = "https://github.com/NCAR/NCAR-Classic-Libraries-for-Geophysics"
url = "https://github.com/NCAR/NCAR-Classic-Libraries-for-Geophysics/raw/refs/heads/main/SpherePack/spherepack3.2.tar.gz"
version("3.2", sha256="d58ef8cbc45cf2ad24f73a9f73f5f9d4fbe03cd9e2e7722e526fffb68be581ba")
version("3.2", sha256="7f5497e77101a4423cee887294f873048f6ff6bc8d0e908c8a89ece677ee19ea")
depends_on("fortran", type="build")
def install(self, spec, prefix):
if self.compiler.fc is None:
raise InstallError("SPHEREPACK requires a Fortran 90 compiler")
make("MAKE=make", "F90=f90 -O2", "AR=ar", "libspherepack")
make("MAKE=make", "F90=f90 -O2", "AR=ar", "testspherepack")
make("MAKE=make", "F90=f90 -O2 -fallow-argument-mismatch", "AR=ar", "libspherepack")
make("MAKE=make", "F90=f90 -O2 -fallow-argument-mismatch", "AR=ar", "testspherepack")
install_tree("lib", prefix.lib)