From 553284e0d7e31872f5570a4191a4232a3d299f4a Mon Sep 17 00:00:00 2001 From: Daniel Rosen Date: Tue, 18 Aug 2026 00:34:16 -0600 Subject: [PATCH 1/5] parallelio: add patch for LibFind.cmake (Upstream PR 3840) * parallelio: add patch for libfind * support libraries installed through apt into lib/CMAKE_LIBRARY_ARCHITECTURE * parallelio: add new versions, cleanup patch * add versions 2.6.7, 2.6.9, 2.6.10 * add comment for cmake-libfind-arch.patch and apply to more versions --- .../parallelio/cmake-libfind-arch.patch | 40 +++++++++++++++++++ .../builtin/packages/parallelio/package.py | 13 ++++++ 2 files changed, 53 insertions(+) create mode 100644 repos/spack_repo/builtin/packages/parallelio/cmake-libfind-arch.patch diff --git a/repos/spack_repo/builtin/packages/parallelio/cmake-libfind-arch.patch b/repos/spack_repo/builtin/packages/parallelio/cmake-libfind-arch.patch new file mode 100644 index 00000000000..cf2fe2e3463 --- /dev/null +++ b/repos/spack_repo/builtin/packages/parallelio/cmake-libfind-arch.patch @@ -0,0 +1,40 @@ +--- a/cmake/LibFind.cmake ++++ b/cmake/LibFind.cmake +@@ -254,7 +254,7 @@ function (find_package_component PKG) + find_library (${PKGCOMP}_LIBRARY + NAMES ${${PKGCOMP}_LIBRARY_NAMES} + PATHS ${${PKGCOMP}_PREFIX} +- PATH_SUFFIXES lib ++ PATH_SUFFIXES lib lib/${CMAKE_LIBRARY_ARCHITECTURE} + NO_DEFAULT_PATH) + + # If found, check if library is static or dynamic +@@ -266,7 +266,7 @@ function (find_package_component PKG) + find_shared_library (${PKGCOMP}_SHARED_LIBRARY + NAMES ${${PKGCOMP}_LIBRARY_NAMES} + PATHS ${${PKGCOMP}_PREFIX} +- PATH_SUFFIXES lib ++ PATH_SUFFIXES lib lib/${CMAKE_LIBRARY_ARCHITECTURE} + NO_DEFAULT_PATH) + if (${PKGCOMP}_SHARED_LIBRARY) + set (${PKGCOMP}_LIBRARY ${${PKGCOMP}_SHARED_LIBRARY}) +@@ -278,7 +278,7 @@ function (find_package_component PKG) + find_static_library (${PKGCOMP}_STATIC_LIBRARY + NAMES ${${PKGCOMP}_LIBRARY_NAMES} + PATHS ${${PKGCOMP}_PREFIX} +- PATH_SUFFIXES lib ++ PATH_SUFFIXES lib lib/${CMAKE_LIBRARY_ARCHITECTURE} + NO_DEFAULT_PATH) + if (${PKGCOMP}_STATIC_LIBRARY) + set (${PKGCOMP}_LIBRARY ${${PKGCOMP}_STATIC_LIBRARY}) +@@ -307,7 +307,9 @@ function (find_package_component PKG) + mark_as_advanced (${PKGCOMP}_INCLUDE_DIR ${PKGCOMP}_LIBRARY) + + # HACK For bug in CMake v3.0: +- set (${PKGCOMP}_FOUND ${${PKGCOMPUP}_FOUND}) ++ if (NOT DEFINED ${PKGCOMP}_FOUND AND DEFINED ${PKGCOMPUP}_FOUND) ++ set (${PKGCOMP}_FOUND ${${PKGCOMPUP}_FOUND}) ++ endif () + + # Set return variables + if (${PKGCOMP}_FOUND) diff --git a/repos/spack_repo/builtin/packages/parallelio/package.py b/repos/spack_repo/builtin/packages/parallelio/package.py index 0f2463fede1..0758df5ecac 100644 --- a/repos/spack_repo/builtin/packages/parallelio/package.py +++ b/repos/spack_repo/builtin/packages/parallelio/package.py @@ -20,7 +20,10 @@ class Parallelio(CMakePackage): license("Apache-2.0") + version("2.6.10", sha256="a65bd3c75f5ee6e8c4c5b922b9c6fa2598af9586468d8dbf51caf010261b4128") + version("2.6.9", sha256="22f34258f0e8b9e8271383bc7c6c657f4bbee560d33f87e3c0db53e0da8c8f3b") version("2.6.8", sha256="ed6c92129b8a5e2d77587fd9656abc0aa7cf82a26a5ad21f8c6a9a79afa2c301") + version("2.6.7", sha256="b346592cb24bf5f98583574c0679020ef3026005cd8f3efa87545d0982581037") version("2.6.6", sha256="e32e018a521d38c9424940c7cfa7e9b1931b605f3511ee7ab3a718b69faeeb04") version("2.6.5", sha256="6ae51aa3f76e597a3a840a292ae14eca21359b1a4ea75e476a93aa2088c0677a") version("2.6.4", sha256="cba53e4ca62ff76195b6f76374fbd1530fba18649c975ae2628ddec7fe55fb31") @@ -54,6 +57,10 @@ class Parallelio(CMakePackage): # netcdf4 filters are only available with the parallel build of netcdf. patch("pio_260.patch", when="@2.6.0") + # This patch enhances searchability for dependencies installed externally, such as + # libraries installed via apt in usr/lib/. + patch("cmake-libfind-arch.patch", when="@2.6.0:2.6.9") + depends_on("c", type="build") # generated depends_on("cxx", type="build") # generated depends_on("fortran", type="build") # generated @@ -67,6 +74,12 @@ class Parallelio(CMakePackage): depends_on("parallel-netcdf", type="link", when="+pnetcdf") depends_on("netcdf-c ~parallel-netcdf", type="link", when="~pnetcdf") + conflicts( + "^netcdf-c@4.9.3:", + when="@:2.6.4", + msg="netcdf-c@4.9.3+ is incompatible with parallelio versions prior to 2.6.5", + ) + resource( name="genf90", git="https://github.com/PARALLELIO/genf90.git", From 8557415432cee0b8ffb2f6c8fad9b3366a2bfb76 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Tue, 18 Aug 2026 10:46:06 -0400 Subject: [PATCH 2/5] parallelio: skip RPATHs with NAG (Upstream PR 6064) --- repos/spack_repo/builtin/packages/parallelio/package.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/spack_repo/builtin/packages/parallelio/package.py b/repos/spack_repo/builtin/packages/parallelio/package.py index 0758df5ecac..51df3ca51f1 100644 --- a/repos/spack_repo/builtin/packages/parallelio/package.py +++ b/repos/spack_repo/builtin/packages/parallelio/package.py @@ -118,6 +118,9 @@ def cmake_args(self): define("PIO_ENABLE_EXAMPLES", False), define_from_variant("WITH_PNETCDF", "pnetcdf"), ] + if spec.satisfies("%nag"): + # NAG cannot pass Spack's padded build rpath through its linker. + args.append(define("CMAKE_SKIP_RPATH", True)) if spec.satisfies("+ncint"): args.extend([define("PIO_ENABLE_NETCDF_INTEGRATION", True)]) if spec.satisfies("+pnetcdf"): From 3e8c76ea40ac2d0008f7648c13bea6833cd53e53 Mon Sep 17 00:00:00 2001 From: Matt Thompson Date: Tue, 1 Sep 2026 14:17:00 -0400 Subject: [PATCH 3/5] parallelio: add pkgconfig build dependency (Upstream PR 6289) --- repos/spack_repo/builtin/packages/parallelio/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/repos/spack_repo/builtin/packages/parallelio/package.py b/repos/spack_repo/builtin/packages/parallelio/package.py index 51df3ca51f1..8f81ec25dc7 100644 --- a/repos/spack_repo/builtin/packages/parallelio/package.py +++ b/repos/spack_repo/builtin/packages/parallelio/package.py @@ -66,6 +66,7 @@ class Parallelio(CMakePackage): depends_on("fortran", type="build") # generated depends_on("cmake@3.7:", type="build") + depends_on("pkgconfig", type="build", when="@2.6.9:") depends_on("mpi", when="+mpi") depends_on("mpi-serial", when="~mpi") depends_on("netcdf-c +mpi", type="link", when="+mpi") From 482f5af13899dd99bdc46df181f7cf851de8e0bc Mon Sep 17 00:00:00 2001 From: Harshula Jayasuriya Date: Mon, 28 Sep 2026 06:42:27 +1000 Subject: [PATCH 4/5] py-pyyaml: +libyaml requires c (Upstream PR 6630) Signed-off-by: Harshula Jayasuriya --- repos/spack_repo/builtin/packages/py_pyyaml/package.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/repos/spack_repo/builtin/packages/py_pyyaml/package.py b/repos/spack_repo/builtin/packages/py_pyyaml/package.py index fcb78ed70ad..18d6170d08a 100644 --- a/repos/spack_repo/builtin/packages/py_pyyaml/package.py +++ b/repos/spack_repo/builtin/packages/py_pyyaml/package.py @@ -38,14 +38,17 @@ class PyPyyaml(PythonPackage): variant("libyaml", default=True, description="Use libYAML bindings") + with when("+libyaml"): + depends_on("c", type="build") + depends_on("libyaml", type="link") + depends_on("py-cython", when="@6:", type="build") + depends_on("python@2.7,3.5:", type=("build", "link", "run")) depends_on("python@3.6:", when="@6:", type=("build", "link", "run")) - depends_on("libyaml", when="+libyaml", type="link") # setuptools versions are not documented upstream, the when= constraint # should probably be set to a lower version. depends_on("py-setuptools@62:", type="build", when="@6.0.3:") depends_on("py-setuptools", type="build") - depends_on("py-cython", when="@6:+libyaml", type="build") # Includes "longintrepr.h" instead of Python.h conflicts("^python@3.11:", when="@:5.3") From e0840540e6306d7f1d0793c9744e35210f6a1643 Mon Sep 17 00:00:00 2001 From: Rafael Soutelino Date: Sun, 12 Jul 2026 02:33:49 +1200 Subject: [PATCH 5/5] roms: Add all test cases and custom application support (Upstream PR 3794) --- .../builtin/packages/roms/package.py | 75 ++++++++++++++++++- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/repos/spack_repo/builtin/packages/roms/package.py b/repos/spack_repo/builtin/packages/roms/package.py index 19f0535243b..06a72cc0e7a 100644 --- a/repos/spack_repo/builtin/packages/roms/package.py +++ b/repos/spack_repo/builtin/packages/roms/package.py @@ -34,9 +34,51 @@ class Roms(MakefilePackage): "roms_application", default="benchmark", description="Makefile to include its associated header file", - values=("upwelling", "benchmark"), + values=( + "basin", + "benchmark", + "bio_toy", + "bl_test", + "canyon", + "channel", + "channel_neck", + "coupling_test", + "damee_4", + "dogbone", + "double_gyre", + "estuary_test", + "flt_test", + "grav_adj", + "inlet_test", + "kelvin", + "lab_canyon", + "lake_jersey", + "lake_signell", + "lmd_test", + "mixed_layer", + "overflow", + "riverplume1", + "riverplume2", + "seamount", + "sed_test1", + "sed_toy", + "shoreface", + "soliton", + "test_chan", + "test_head", + "upwelling", + "wc13", + "weddell", + "windbasin", + "none", + ), multi=False, ) + variant( + "custom_application", + default="none", + description="Path to custom application header file (use roms_application=none with this)", + ) variant( "debug", default=False, @@ -57,6 +99,23 @@ class Roms(MakefilePackage): # Note: you cannot set USE_OpenMP and USE_MPI at the same time conflicts("+mpi+openmp") + @run_before("edit") + def validate_application_config(self): + """Validate application configuration before starting build""" + custom_app = self.spec.variants["custom_application"].value + roms_app = self.spec.variants["roms_application"].value + + # Validate that custom_application and roms_application are not both set + if custom_app != "none" and roms_app != "none": + raise InstallError( + "Cannot specify both custom_application and a built-in roms_application. " + "Set roms_application=none when using custom_application." + ) + + # Validate the custom header file exists + if custom_app != "none" and not os.path.isfile(custom_app): + raise InstallError("Custom application header file not found: {0}".format(custom_app)) + def _copy_arch_file(self, lib): """AOCC compiler takes gfortran's makefile as reference""" copy( @@ -112,7 +171,19 @@ def edit(self, spec, prefix): makefile = FileFilter("makefile") - app_type = self.selected_roms_application + # Handle custom application header file + custom_app = self.spec.variants["custom_application"].value + + if custom_app != "none": + # Extract application name from filename (remove .h extension) + custom_app_name = os.path.splitext(os.path.basename(custom_app))[0] + + # Copy custom header to ROMS/Include directory + copy(custom_app, join_path("ROMS", "Include", "{0}.h".format(custom_app_name))) + + app_type = custom_app_name + else: + app_type = self.selected_roms_application makefile.filter( r"ROMS_APPLICATION.*?=.*", "ROMS_APPLICATION = {0}".format(app_type.upper())