bufr: add 12.1.0 (#45459)
This commit is contained in:
		| @@ -17,12 +17,13 @@ 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.1.0.tar.gz" | ||||
|     git = "https://github.com/NOAA-EMC/NCEPLIBS-bufr" | ||||
| 
 | ||||
|     maintainers("AlexanderRichert-NOAA", "edwardhartnett", "Hang-Lei-NOAA", "jbathegit") | ||||
| 
 | ||||
|     version("develop", branch="develop") | ||||
|     version("12.1.0", sha256="b5eae61b50d4132b2933b6e6dfc607e5392727cdc4f46ec7a94a19109d91dcf3") | ||||
|     version("12.0.1", sha256="525f26238dba6511a453fc71cecc05f59e4800a603de2abbbbfb8cbb5adf5708") | ||||
|     version("12.0.0", sha256="d01c02ea8e100e51fd150ff1c4a1192ca54538474acb1b7f7a36e8aeab76ee75") | ||||
|     version("11.7.1", sha256="6533ce6eaa6b02c0cb5424cfbc086ab120ccebac3894980a4daafd4dfadd71f8") | ||||
| @@ -31,8 +32,8 @@ class Bufr(CMakePackage): | ||||
|     version("11.5.0", sha256="d154839e29ef1fe82e58cf20232e9f8a4f0610f0e8b6a394b7ca052e58f97f43") | ||||
|     version("11.4.0", sha256="946482405e675b99e8e0c221d137768f246076f5e9ba92eed6cae47fb68b7a26") | ||||
| 
 | ||||
|     depends_on("c", type="build")  # generated | ||||
|     depends_on("fortran", type="build")  # generated | ||||
|     depends_on("c", type="build") | ||||
|     depends_on("fortran", type="build") | ||||
| 
 | ||||
|     # 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") | ||||
| @@ -41,8 +42,10 @@ class Bufr(CMakePackage): | ||||
|     # Patch to identify Python version correctly | ||||
|     patch("python-version.patch", when="@11.5:12.0.0 +python") | ||||
| 
 | ||||
|     variant("python", default=False, description="Enable Python interface?") | ||||
|     variant("python", default=False, description="Enable Python interface") | ||||
|     variant("shared", default=True, description="Build shared libraries", when="@11.5:") | ||||
|     variant("test_files", default="none", description="Path to test files") | ||||
|     variant("utils", default=True, description="Build utilities", when="@12.1:") | ||||
| 
 | ||||
|     extends("python", when="+python") | ||||
| 
 | ||||
| @@ -52,6 +55,8 @@ class Bufr(CMakePackage): | ||||
|     depends_on("py-pip", type="build", when="+python") | ||||
|     depends_on("py-wheel", type="build", when="+python") | ||||
| 
 | ||||
|     conflicts("%oneapi@:2024.1", msg="Requires oneapi 2024.2 or later") | ||||
| 
 | ||||
|     def url_for_version(self, version): | ||||
|         pre = "bufr_" if version < Version("12.0.1") else "" | ||||
|         return ( | ||||
| @@ -68,8 +73,13 @@ def cmake_args(self): | ||||
|             self.define_from_variant("ENABLE_PYTHON", "python"), | ||||
|             self.define_from_variant("BUILD_SHARED_LIBS", "shared"), | ||||
|             self.define("BUILD_TESTS", self.run_tests), | ||||
|             self.define("BUILD_TESTING", self.run_tests), | ||||
|             self.define_from_variant("BUILD_UTILS", "utils"), | ||||
|         ] | ||||
| 
 | ||||
|         if not self.spec.satisfies("test_files=none"): | ||||
|             args.append(self.define_from_variant("TEST_FILE_DIR", "test_files")) | ||||
| 
 | ||||
|         return args | ||||
| 
 | ||||
|     def flag_handler(self, name, flags): | ||||
| @@ -119,6 +129,5 @@ def setup_run_environment(self, env): | ||||
|             self._setup_bufr_environment(env, suffix) | ||||
| 
 | ||||
|     def check(self): | ||||
|         if self.spec.satisfies("~python"): | ||||
|         with working_dir(self.builder.build_directory): | ||||
|             make("test") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alex Richert
					Alex Richert