summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2022-05-25 00:49:37 -0400
committerGitHub <noreply@github.com>2022-05-24 22:49:37 -0600
commit93649f6b685bdb469839a8e4764b0f6a3d5cae4d (patch)
tree6ea9b5ffee688b6a36747a4f941882618c1b9d43
parentd367f1e7870b7227699a9a861bf09547e11a85ae (diff)
downloadspack-93649f6b685bdb469839a8e4764b0f6a3d5cae4d.tar.gz
spack-93649f6b685bdb469839a8e4764b0f6a3d5cae4d.tar.bz2
spack-93649f6b685bdb469839a8e4764b0f6a3d5cae4d.tar.xz
spack-93649f6b685bdb469839a8e4764b0f6a3d5cae4d.zip
silo: Fix HDF5 1.13 API breakage (#30786)
-rw-r--r--var/spack/repos/builtin/packages/silo/hdf5-113.patch40
-rw-r--r--var/spack/repos/builtin/packages/silo/package.py6
2 files changed, 44 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/silo/hdf5-113.patch b/var/spack/repos/builtin/packages/silo/hdf5-113.patch
new file mode 100644
index 0000000000..b71bd8526b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/silo/hdf5-113.patch
@@ -0,0 +1,40 @@
+From 5dc160c7ae489b8181874dccf7ce3b8089c128f5 Mon Sep 17 00:00:00 2001
+From: Chuck Atkins <chuck.atkins@kitware.com>
+Date: Tue, 24 May 2022 10:57:29 -0400
+Subject: [PATCH] hdf5: Support the API changes in >= 1.13
+
+---
+ src/hdf5_drv/H5FDsilo.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/hdf5_drv/H5FDsilo.c b/src/hdf5_drv/H5FDsilo.c
+index f454045..74594c1 100644
+--- a/src/hdf5_drv/H5FDsilo.c
++++ b/src/hdf5_drv/H5FDsilo.c
+@@ -550,6 +550,12 @@ typedef struct H5FD_class_t {
+ #endif
+
+ static const H5FD_class_t H5FD_silo_g = {
++#if HDF5_VERSION_GE(1,13,2) && defined(H5FD_CLASS_VERSION)
++ H5FD_CLASS_VERSION, /*version */
++#endif
++#if HDF5_VERSION_GE(1,13,0)
++ 512, /*value */
++#endif
+ "silo", /*name */
+ MAXADDR, /*maxaddr */
+ H5F_CLOSE_WEAK, /* fc_degree */
+@@ -583,6 +589,10 @@ static const H5FD_class_t H5FD_silo_g = {
+ H5FD_silo_truncate, /*truncate */
+ NULL, /*lock */
+ NULL, /*unlock */
++#if HDF5_VERSION_GE(1,13,0)
++ NULL, /*del */
++ NULL, /*ctl */
++#endif
+ H5FD_FLMAP_SINGLE /*fl_map */
+ };
+
+--
+2.36.1
+
diff --git a/var/spack/repos/builtin/packages/silo/package.py b/var/spack/repos/builtin/packages/silo/package.py
index b28fd3686b..7bfbc1a96a 100644
--- a/var/spack/repos/builtin/packages/silo/package.py
+++ b/var/spack/repos/builtin/packages/silo/package.py
@@ -68,8 +68,10 @@ class Silo(AutotoolsPackage):
# autoconf-archive in 2011
patch('configure-AX_CHECK_COMPILE_FLAG.patch')
- # API changes in 1.13 cause breakage
- conflicts('hdf5@1.13:', when='+hdf5')
+ # API changes in hdf5-1.13 cause breakage
+ # See https://github.com/LLNL/Silo/pull/260
+ patch('hdf5-113.patch', when='@4.11: +hdf5 ^hdf5@1.13:')
+ conflicts('hdf5@1.13:', when='@:4.10.2-bsd')
# hzip and fpzip are not available in the BSD releases
conflicts('+hzip', when="@4.10.2-bsd,4.11-bsd")