summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com>2023-01-23 21:22:21 -0600
committerGitHub <noreply@github.com>2023-01-23 19:22:21 -0800
commitcd2d6a6397a34244ee9af3f102be801cd0f14d84 (patch)
tree33ed2e28a875b8584d309ff2e76336efdeeb26f9
parentc5086a5d0efe5686f978887205ea50763f7389da (diff)
downloadspack-cd2d6a6397a34244ee9af3f102be801cd0f14d84.tar.gz
spack-cd2d6a6397a34244ee9af3f102be801cd0f14d84.tar.bz2
spack-cd2d6a6397a34244ee9af3f102be801cd0f14d84.tar.xz
spack-cd2d6a6397a34244ee9af3f102be801cd0f14d84.zip
ParaView/VTK: Patch xdmf2 for HDF5 1.13 (#33930)
* ParaView/VTK: Patch xdmf2 for HDF5 1.13 * Meson: update meson build system for 0.64 * ParaView: Change HDF5 1.13 patch to 1.13.1/2 patchs * Mesa: Remove legacy mesa option from meson_args * Use append to assemble meson args
-rw-r--r--lib/spack/spack/build_systems/meson.py6
-rw-r--r--var/spack/repos/builtin/packages/mesa/package.py5
-rw-r--r--var/spack/repos/builtin/packages/paraview/package.py5
-rw-r--r--var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.1.patch61
-rw-r--r--var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.2.patch36
-rw-r--r--var/spack/repos/builtin/packages/vtk/package.py4
-rw-r--r--var/spack/repos/builtin/packages/vtk/xdmf2-hdf51.13.2.patch36
7 files changed, 151 insertions, 2 deletions
diff --git a/lib/spack/spack/build_systems/meson.py b/lib/spack/spack/build_systems/meson.py
index d059d50cc3..65e0e7ad4f 100644
--- a/lib/spack/spack/build_systems/meson.py
+++ b/lib/spack/spack/build_systems/meson.py
@@ -120,6 +120,7 @@ class MesonBuilder(BaseBuilder):
of package writers.
"""
# standard Meson arguments
+
std_meson_args = MesonBuilder.std_args(self.pkg)
std_meson_args += getattr(self, "meson_flag_args", [])
return std_meson_args
@@ -182,7 +183,10 @@ class MesonBuilder(BaseBuilder):
def meson(self, pkg, spec, prefix):
"""Run ``meson`` in the build directory"""
- options = [os.path.abspath(self.root_mesonlists_dir)]
+ options = []
+ if self.spec["meson"].satisfies("@0.64:"):
+ options.append("setup")
+ options.append(os.path.abspath(self.root_mesonlists_dir))
options += self.std_meson_args
options += self.meson_args()
with fs.working_dir(self.build_directory, create=True):
diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py
index a7212d969a..f0f1f5244d 100644
--- a/var/spack/repos/builtin/packages/mesa/package.py
+++ b/var/spack/repos/builtin/packages/mesa/package.py
@@ -118,6 +118,7 @@ class Mesa(MesonPackage):
depends_on("libllvm@6:")
depends_on("libllvm@:11", when="@:20")
depends_on("libllvm@:12", when="@:21")
+
depends_on("libx11", when="+glx")
depends_on("libxcb", when="+glx")
depends_on("libxext", when="+glx")
@@ -202,8 +203,10 @@ class MesonBuilder(spack.build_systems.meson.MesonBuilder):
"-Dbuild-tests=false",
"-Dglvnd=false",
]
- if spec.satisfies("@:22.2"):
+ # gallium-xvmc was removed in @main and @2.23:
+ if self.spec.satisfies("@:22.2"):
args.append("-Dgallium-xvmc=disabled")
+
args_platforms = []
args_gallium_drivers = ["swrast"]
args_dri_drivers = []
diff --git a/var/spack/repos/builtin/packages/paraview/package.py b/var/spack/repos/builtin/packages/paraview/package.py
index 05f5652c90..436d328eb8 100644
--- a/var/spack/repos/builtin/packages/paraview/package.py
+++ b/var/spack/repos/builtin/packages/paraview/package.py
@@ -268,6 +268,11 @@ class Paraview(CMakePackage, CudaPackage, ROCmPackage):
# intel oneapi doesn't compile some code in catalyst
patch("catalyst-etc_oneapi_fix.patch", when="@5.10.0:5.10.1%oneapi")
+ # Patch for paraview 5.10: +hdf5 ^hdf5@1.13.2:
+ # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9690
+ patch("vtk-xdmf2-hdf51.13.1.patch", when="@5.10.0:5.10 +hdf5")
+ patch("vtk-xdmf2-hdf51.13.2.patch", when="@5.10: +hdf5")
+
@property
def generator(self):
# https://gitlab.kitware.com/paraview/paraview/-/issues/21223
diff --git a/var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.1.patch b/var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.1.patch
new file mode 100644
index 0000000000..bfeeb9c032
--- /dev/null
+++ b/var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.1.patch
@@ -0,0 +1,61 @@
+From 3a536a3c6b949cb1c9dd147c3a395c3ff31856e8 Mon Sep 17 00:00:00 2001
+From: Ben Boeckel <ben.boeckel@kitware.com>
+Date: Thu, 14 Apr 2022 12:53:36 -0400
+Subject: [PATCH 1/6] xdmf2: install `XdmfExport.h`
+
+---
+ VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeLists.txt b/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeLists.txt
+index 274dbc4423c..a47bf4ee4d9 100644
+--- a/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeLists.txt
++++ b/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/CMakeLists.txt
+@@ -276,6 +276,7 @@ vtk_module_add_module(VTK::xdmf2
+ ${XdmfModelSource}
+ SOURCES ${XdmfExtraSource}
+ HEADERS Xdmf.h
++ XdmfExport.h
+ "${CMAKE_CURRENT_BINARY_DIR}/XdmfConfig.h"
+ HEADERS_SUBDIR "vtkxdmf2/libsrc")
+ set_target_properties(xdmf2
+--
+GitLab
+
+
+From 1456c9e6ab2b244d225dcfc0a7f985933c09d5f3 Mon Sep 17 00:00:00 2001
+From: Ben Boeckel <ben.boeckel@kitware.com>
+Date: Thu, 14 Apr 2022 15:20:13 -0400
+Subject: [PATCH 6/6] xdmf2: support HDF5 1.13.1
+
+---
+ VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx b/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
+index 6a4966bb231..1a412b56d02 100644
+--- a/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
++++ b/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
+@@ -156,6 +156,9 @@ static herr_t H5FD_dsm_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, hadd
+ }
+
+ static const H5FD_class_t H5FD_dsm_g = {
++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=13))
++ H5_VFD_RESERVED + 0xd3f2, /*value */
++#endif
+ "dsm", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_WEAK, /*fc_degree */
+@@ -193,6 +196,10 @@ static const H5FD_class_t H5FD_dsm_g = {
+ #endif
+ NULL, /*lock */
+ NULL, /*unlock */
++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=13))
++ NULL, /*del */
++ NULL, /*ctl */
++#endif
+ H5FD_FLMAP_SINGLE /*fl_map */
+ };
+
+--
+GitLab
diff --git a/var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.2.patch b/var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.2.patch
new file mode 100644
index 0000000000..5418667138
--- /dev/null
+++ b/var/spack/repos/builtin/packages/paraview/vtk-xdmf2-hdf51.13.2.patch
@@ -0,0 +1,36 @@
+From 2cc0d020359f714587d14b2f25a2c5f235f829c9 Mon Sep 17 00:00:00 2001
+From: Ryan Krattiger <ryan.krattiger@kitware.com>
+Date: Tue, 15 Nov 2022 15:00:36 -0600
+Subject: [PATCH] Xdmf2: Update HDF5 driver for 1.13.2
+
+---
+ VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx b/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
+index 1a412b56d02..ff4427d0265 100644
+--- a/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
++++ b/VTK/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx
+@@ -157,6 +157,7 @@ static herr_t H5FD_dsm_write(H5FD_t *_file, H5FD_mem_t type, hid_t fapl_id, hadd
+
+ static const H5FD_class_t H5FD_dsm_g = {
+ #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=13))
++ 0, /*version */
+ H5_VFD_RESERVED + 0xd3f2, /*value */
+ #endif
+ "dsm", /*name */
+@@ -190,6 +191,12 @@ static const H5FD_class_t H5FD_dsm_g = {
+ NULL, /*get_handle */
+ H5FD_dsm_read, /*read */
+ H5FD_dsm_write, /*write */
++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=13))
++ NULL, /*read_vector */
++ NULL, /*write_vector */
++ NULL, /*read_selection */
++ NULL, /*write_selection */
++#endif
+ NULL, /*flush */
+ #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8))
+ NULL, /* truncate */
+--
+GitLab
diff --git a/var/spack/repos/builtin/packages/vtk/package.py b/var/spack/repos/builtin/packages/vtk/package.py
index 998d0c6973..21818044b3 100644
--- a/var/spack/repos/builtin/packages/vtk/package.py
+++ b/var/spack/repos/builtin/packages/vtk/package.py
@@ -55,6 +55,10 @@ class Vtk(CMakePackage):
sha256="0546696bd02f3a99fccb9b7c49533377bf8179df16d901cefe5abf251173716d",
)
+ # Patch for paraview 5.10: +hdf5 ^hdf5@1.13.2:
+ # https://gitlab.kitware.com/vtk/vtk/-/merge_requests/9690
+ patch("xdmf2-hdf51.13.2.patch", when="@9:9.2 +xdmf")
+
# We cannot build with both osmesa and qt in spack
conflicts("+osmesa", when="+qt")
diff --git a/var/spack/repos/builtin/packages/vtk/xdmf2-hdf51.13.2.patch b/var/spack/repos/builtin/packages/vtk/xdmf2-hdf51.13.2.patch
new file mode 100644
index 0000000000..07f0dbe5e6
--- /dev/null
+++ b/var/spack/repos/builtin/packages/vtk/xdmf2-hdf51.13.2.patch
@@ -0,0 +1,36 @@
+--- a/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx 2022-11-15 15:37:37.242113202 -0600
++++ b/ThirdParty/xdmf2/vtkxdmf2/libsrc/XdmfH5Driver.cxx 2022-11-15 14:51:30.849230122 -0600
+@@ -156,6 +156,10 @@
+ }
+
+ static const H5FD_class_t H5FD_dsm_g = {
++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=13))
++ 0, /*version */
++ H5_VFD_RESERVED + 0xd3f2, /*value */
++#endif
+ "dsm", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_WEAK, /*fc_degree */
+@@ -187,12 +191,22 @@
+ NULL, /*get_handle */
+ H5FD_dsm_read, /*read */
+ H5FD_dsm_write, /*write */
++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=13))
++ NULL, /*read_vector */
++ NULL, /*write_vector */
++ NULL, /*read_selection */
++ NULL, /*write_selection */
++#endif
+ NULL, /*flush */
+ #if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=8))
+ NULL, /* truncate */
+ #endif
+ NULL, /*lock */
+ NULL, /*unlock */
++#if (H5_VERS_MAJOR>1)||((H5_VERS_MAJOR==1)&&(H5_VERS_MINOR>=13))
++ NULL, /*del */
++ NULL, /*ctl */
++#endif
+ H5FD_FLMAP_SINGLE /*fl_map */
+ };
+