Skip to content

Commit

Permalink
Merge pull request #331 from climbfuji/feature/bufr-12.0.01-rel151
Browse files Browse the repository at this point in the history
release/1.5.1: cherry-pick [email protected] PR from jcsda_emc_spack_stack
  • Loading branch information
climbfuji authored Oct 2, 2023
2 parents 8672dc2 + 4e24028 commit 8296fcf
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions var/spack/repos/builtin/packages/bufr/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,33 @@ class Bufr(CMakePackage):
"""

homepage = "https://noaa-emc.github.io/NCEPLIBS-bufr"
url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/bufr_v11.5.0.tar.gz"
url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags/v12.0.1.tar.gz"

maintainers("t-brown", "AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit")

version("12.0.1", sha256="525f26238dba6511a453fc71cecc05f59e4800a603de2abbbbfb8cbb5adf5708")
version("12.0.0", sha256="d01c02ea8e100e51fd150ff1c4a1192ca54538474acb1b7f7a36e8aeab76ee75")
version("11.7.1", sha256="6533ce6eaa6b02c0cb5424cfbc086ab120ccebac3894980a4daafd4dfadd71f8")
version("11.7.0", sha256="6a76ae8e7682bbc790321bf80c2f9417775c5b01a5c4f10763df92e01b20b9ca")
version("11.6.0", sha256="af4c04e0b394aa9b5f411ec5c8055888619c724768b3094727e8bb7d3ea34a54")
version("11.5.0", sha256="d154839e29ef1fe82e58cf20232e9f8a4f0610f0e8b6a394b7ca052e58f97f43")
version("11.4.0", sha256="946482405e675b99e8e0c221d137768f246076f5e9ba92eed6cae47fb68b7a26")

# tar file name depends on version
def url_for_version(self, version):
url = "https://github.com/NOAA-EMC/NCEPLIBS-bufr/archive/refs/tags"
if version >= Version("12.0.1"):
url += "/v{0}.tar.gz".format(version)
else:
url += "/bufr_v{0}.tar.gz".format(version)
return url

# Patch to not add "-c" to ranlib flags when using llvm-ranlib on Apple systems
patch("cmakelists-apple-llvm-ranlib.patch", when="@11.5.0:11.6.0")
# C test does not explicity link to -lm causing DSO error when building shared libs
patch("c-tests-libm.patch", when="@11.5.0:11.7.0")
# Patch to identify Python version correctly
patch("python-version.patch", when="+python")
patch("python-version.patch", when="+python @:12.0.0")

variant("python", default=False, description="Enable Python interface?")
variant("shared", default=True, description="Build shared libraries", when="@11.5:")
Expand Down

0 comments on commit 8296fcf

Please sign in to comment.