hdf5: add version 1.10.8 (#27613)
* Update hdf5/package.py to add HDF5 1.10.8 release and move preferred version from 1.10.7 to 1.10.8. * silo: versions before 4.11 conflict with hdf5 >= 1.10.8. * Add patch file for silo@4.11 with hdf5 1.10 >=1.10.8 and hdf5 1.12 >= 1.12.1.
This commit is contained in:
parent
40886599ce
commit
556565ca0d
3 changed files with 65 additions and 3 deletions
|
@ -17,7 +17,7 @@ class Hdf5(CMakePackage):
|
|||
"""
|
||||
|
||||
homepage = "https://portal.hdfgroup.org"
|
||||
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.7/src/hdf5-1.10.7.tar.gz"
|
||||
url = "https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.10/hdf5-1.10.8/src/hdf5-1.10.8.tar.gz"
|
||||
list_url = "https://support.hdfgroup.org/ftp/HDF5/releases"
|
||||
list_depth = 3
|
||||
git = "https://github.com/HDFGroup/hdf5.git"
|
||||
|
@ -40,7 +40,8 @@ class Hdf5(CMakePackage):
|
|||
# HDF5 1.12 broke API compatibility, so we currently prefer the latest
|
||||
# 1.10 release. packages that want later versions of HDF5 should specify,
|
||||
# e.g., depends_on("hdf5@1.12:") to get 1.12 or higher.
|
||||
version('1.10.7', sha256='7a1a0a54371275ce2dfc5cd093775bb025c365846512961e7e5ceaecb437ef15', preferred=True)
|
||||
version('1.10.8', sha256='d341b80d380dd763753a0ebe22915e11e87aac4e44a084a850646ff934d19c80', preferred=True)
|
||||
version('1.10.7', sha256='7a1a0a54371275ce2dfc5cd093775bb025c365846512961e7e5ceaecb437ef15')
|
||||
version('1.10.6', sha256='5f9a3ee85db4ea1d3b1fa9159352aebc2af72732fc2f58c96a3f0768dba0e9aa')
|
||||
version('1.10.5', sha256='6d4ce8bf902a97b050f6f491f4268634e252a63dadd6656a1a9be5b7b7726fa8')
|
||||
version('1.10.4', sha256='8f60dc4dd6ab5fcd23c750d1dc5bca3d0453bdce5c8cdaf0a4a61a9d1122adb2')
|
||||
|
|
58
var/spack/repos/builtin/packages/silo/H5EPR_SEMI_COLON.patch
Normal file
58
var/spack/repos/builtin/packages/silo/H5EPR_SEMI_COLON.patch
Normal file
|
@ -0,0 +1,58 @@
|
|||
diff --git a/src/hdf5_drv/H5FDsilo.c b/src/hdf5_drv/H5FDsilo.c
|
||||
--- a/src/hdf5_drv/H5FDsilo.c
|
||||
+++ b/src/hdf5_drv/H5FDsilo.c
|
||||
@@ -243,6 +243,12 @@
|
||||
return tmp;
|
||||
}
|
||||
|
||||
+#if HDF5_VERSION_GE(1,10,8)
|
||||
+#define H5EPR_SEMI_COLON ;
|
||||
+#else
|
||||
+#define H5EPR_SEMI_COLON
|
||||
+#endif
|
||||
+
|
||||
|
||||
#ifdef H5_HAVE_SNPRINTF
|
||||
#define H5E_PUSH_HELPER(Func,Cls,Maj,Min,Msg,Ret,Errno) \
|
||||
@@ -252,13 +258,13 @@
|
||||
snprintf(msg, sizeof(msg), Msg "(errno=%d, \"%s\")", \
|
||||
Errno, strerror(Errno)); \
|
||||
ret_value = Ret; \
|
||||
- H5Epush_ret(Func, Cls, Maj, Min, msg, Ret) \
|
||||
+ H5Epush_ret(Func, Cls, Maj, Min, msg, Ret) H5EPR_SEMI_COLON \
|
||||
}
|
||||
#else
|
||||
#define H5E_PUSH_HELPER(Func,Cls,Maj,Min,Msg,Ret,Errno) \
|
||||
{ \
|
||||
ret_value = Ret; \
|
||||
- H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret) \
|
||||
+ H5Epush_ret(Func, Cls, Maj, Min, Msg, Ret) H5EPR_SEMI_COLON \
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1355,7 +1368,7 @@
|
||||
assert(sizeof(hsize_t)<=8);
|
||||
memcpy(p, &file->block_size, sizeof(hsize_t));
|
||||
if (H5Tconvert(H5T_NATIVE_HSIZE, H5T_STD_U64LE, 1, buf+8, NULL, H5P_DEFAULT)<0)
|
||||
- H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
|
||||
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) H5EPR_SEMI_COLON
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1383,14 +1396,14 @@
|
||||
|
||||
/* Make sure the name/version number is correct */
|
||||
if (strcmp(name, "LLNLsilo"))
|
||||
- H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1)
|
||||
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "invalid silo superblock", -1) H5EPR_SEMI_COLON
|
||||
|
||||
buf += 8;
|
||||
/* Decode block size */
|
||||
assert(sizeof(hsize_t)<=8);
|
||||
memcpy(x, buf, 8);
|
||||
if (H5Tconvert(H5T_STD_U64LE, H5T_NATIVE_HSIZE, 1, x, NULL, H5P_DEFAULT)<0)
|
||||
- H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1)
|
||||
+ H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1) H5EPR_SEMI_COLON
|
||||
ap = (hsize_t*)x;
|
||||
/*file->block_size = *ap; ignore stored value for now */
|
||||
|
|
@ -44,7 +44,6 @@ class Silo(AutotoolsPackage):
|
|||
depends_on('automake', type='build', when='+shared')
|
||||
depends_on('libtool', type='build', when='+shared')
|
||||
depends_on('mpi', when='+mpi')
|
||||
depends_on('hdf5@:1.10', when='@:4.10.2+hdf5')
|
||||
depends_on('hdf5', when='+hdf5')
|
||||
depends_on('qt+gui~framework@4.8:4.9', when='+silex')
|
||||
depends_on('libx11', when='+silex')
|
||||
|
@ -55,7 +54,11 @@ class Silo(AutotoolsPackage):
|
|||
|
||||
patch('remove-mpiposix.patch', when='@4.8:4.10.2')
|
||||
patch('H5FD_class_t-terminate.patch', when='@:4.10.2 ^hdf5@1.10.0:')
|
||||
# H5EPR_SEMI_COLON.patch should be applied only to silo@4.11 when building
|
||||
# with hdf5@1.10.8 or later 1.10 or with hdf5@1.12.1 or later 1.12
|
||||
patch('H5EPR_SEMI_COLON.patch', when='@:4.11 ^hdf5@1.10.8:1.10,1.12.1:1.12')
|
||||
|
||||
conflicts('hdf5@1.10.8:', when="@:4.10.2")
|
||||
conflicts('+hzip', when="@4.11-bsd")
|
||||
conflicts('+fpzip', when="@4.11-bsd")
|
||||
conflicts('+hzip', when="@4.10.2-bsd")
|
||||
|
|
Loading…
Reference in a new issue