summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Lipsa <dan.lipsa@kitware.com>2024-05-21 11:05:32 -0400
committerGitHub <noreply@github.com>2024-05-21 11:05:32 -0400
commit4bf5cc9a9a0517110e9a5517fb75b9184ea74855 (patch)
tree65fd4771909bd87d423ddccac6c1a2c0a269cf79
parent08834e2b0358b58d84b4716473cbe902d4de8db1 (diff)
downloadspack-4bf5cc9a9a0517110e9a5517fb75b9184ea74855.tar.gz
spack-4bf5cc9a9a0517110e9a5517fb75b9184ea74855.tar.bz2
spack-4bf5cc9a9a0517110e9a5517fb75b9184ea74855.tar.xz
spack-4bf5cc9a9a0517110e9a5517fb75b9184ea74855.zip
Paraview on windows: Use htf5::hdf5 (#44161)
* Use hdf5::hdf5 on Windows from Paraview CMake This patch is already applied on VTK 9 or greater. * Add comments stating that vtk and paraview patches are the same and should be modified in concert.
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py3
-rw-r--r--var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch14
-rw-r--r--var/spack/repos/builtin/packages/vtk/package.py2
3 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 2c5882e2a9..d9482a5c51 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -307,6 +307,9 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9690
patch("vtk-xdmf2-hdf51.13.1.patch", when="@5.8:5.10")
patch("vtk-xdmf2-hdf51.13.2.patch", when="@5.8:5.11.0")
+ # a patch with the same name is also applied to vtk
+ # the two patches are the same but for the path to the files they patch
+ patch("vtk_alias_hdf5.patch", when="@5.9.0: platform=windows")
# Fix VTK to work with external freetype using CONFIG mode for find_package
patch("FindFreetype.cmake.patch", when="@5.10.1:")
diff --git a/var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch b/var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch
new file mode 100644
index 0000000000..a580debfa1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/paraview/vtk_alias_hdf5.patch
@@ -0,0 +1,14 @@
+diff --git a/CMake/patches/99/FindHDF5.cmake b/CMake/patches/99/FindHDF5.cmake
+index b54877d519..adf5d84430 100644
+--- a/VTK/CMake/patches/99/FindHDF5.cmake
++++ b/VTK/CMake/patches/99/FindHDF5.cmake
+@@ -1150,6 +1150,9 @@ if (HDF5_FOUND)
+ endif ()
+ endif ()
+ endforeach ()
++ if(NOT TARGET "hdf5")
++ add_library(hdf5 ALIAS hdf5::hdf5)
++ endif()
+ unset(hdf5_lang)
+
+ if (HDF5_DIFF_EXECUTABLE AND NOT TARGET hdf5::h5diff)
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py
index 6ba0bb3f4d..e540e394af 100644
--- a/var/spack/repos/builtin/packages/vtk/package.py
+++ b/var/spack/repos/builtin/packages/vtk/package.py
@@ -124,6 +124,8 @@ class Vtk(CMakePackage):
patch("vtk_movie_link_ogg.patch", when="@8.2")
patch("vtk_use_sqlite_name_vtk_expects.patch", when="@8.2")
patch("vtk_proj_include_no_strict.patch", when="@9: platform=windows")
+ # a patch with the same name is also applied to paraview
+ # the two patches are the same but for the path to the files they patch
patch("vtk_alias_hdf5.patch", when="@9: platform=windows")
patch("vtk_findproj_config.patch", when="platform=windows")
with when("~osmesa"):