1 |
commit: 350ea3e89d0e87e35a3a4b5f2ce92b55aae9d226 |
2 |
Author: Bernd Waibel <waebbl-gentoo <AT> posteo <DOT> net> |
3 |
AuthorDate: Tue Aug 24 15:45:11 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 25 06:13:24 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=350ea3e8 |
7 |
|
8 |
sci-libs/med: fix build against hdf5-1.12 |
9 |
|
10 |
Thanks to Alexandre Ferreira for providing the patch. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/809008 |
13 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
14 |
Signed-off-by: Bernd Waibel <waebbl-gentoo <AT> posteo.net> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/22096 |
16 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
17 |
|
18 |
.../med-4.1.0-0003-build-against-hdf5-1.12.patch | 117 +++++++++++++++++++++ |
19 |
sci-libs/med/med-4.1.0.ebuild | 6 +- |
20 |
2 files changed, 121 insertions(+), 2 deletions(-) |
21 |
|
22 |
diff --git a/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch b/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch |
23 |
new file mode 100644 |
24 |
index 00000000000..46d7ed21af8 |
25 |
--- /dev/null |
26 |
+++ b/sci-libs/med/files/med-4.1.0-0003-build-against-hdf5-1.12.patch |
27 |
@@ -0,0 +1,117 @@ |
28 |
+From 5c9c1ce9911290283d39e16b1ed4c1d4ea5a5678 Mon Sep 17 00:00:00 2001 |
29 |
+From: Bernd Waibel <waebbl-gentoo@××××××.net> |
30 |
+Date: Tue, 24 Aug 2021 08:32:13 +0200 |
31 |
+Subject: [PATCH] build against hdf5-1.12 |
32 |
+ |
33 |
+Signed-off-by: Bernd Waibel <waebbl-gentoo@××××××.net> |
34 |
+--- |
35 |
+ config/cmake_files/medMacros.cmake | 4 ++-- |
36 |
+ src/ci/MEDfileCompatibility.c | 2 +- |
37 |
+ src/hdfi/_MEDfileCreate.c | 2 +- |
38 |
+ src/hdfi/_MEDfileOpen.c | 2 +- |
39 |
+ src/hdfi/_MEDmemFileOpen.c | 2 +- |
40 |
+ src/hdfi/_MEDparFileCreate.c | 2 +- |
41 |
+ src/hdfi/_MEDparFileOpen.c | 2 +- |
42 |
+ 7 files changed, 8 insertions(+), 8 deletions(-) |
43 |
+ |
44 |
+diff --git a/config/cmake_files/medMacros.cmake b/config/cmake_files/medMacros.cmake |
45 |
+index 957c59b..d73c7af 100644 |
46 |
+--- a/config/cmake_files/medMacros.cmake |
47 |
++++ b/config/cmake_files/medMacros.cmake |
48 |
+@@ -447,13 +447,13 @@ MACRO(MED_FIND_HDF5) |
49 |
+ ## |
50 |
+ ## Requires 1.10.x version |
51 |
+ ## |
52 |
+- IF (NOT HDF_VERSION_MAJOR_REF EQUAL 1 OR NOT HDF_VERSION_MINOR_REF EQUAL 10 OR NOT HDF_VERSION_RELEASE_REF GREATER 1) |
53 |
++ IF(HDF5_VERSION VERSION_LESS 1.10.2) |
54 |
+ MESSAGE(FATAL_ERROR "HDF5 version is ${HDF_VERSION_REF}. Only versions >= 1.10.2 are supported.") |
55 |
+ ENDIF() |
56 |
+ ## |
57 |
+ ## |
58 |
+ |
59 |
+- ADD_DEFINITIONS(-DH5_USE_16_API) |
60 |
++ ADD_DEFINITIONS(-DH5_USE_18_API -DH5_USE_16_API) |
61 |
+ IF(WIN32 AND MEDFILE_BUILD_SHARED_LIBS) |
62 |
+ ADD_DEFINITIONS(-D_HDF5USEDLL_ -DH5_BUILT_AS_DYNAMIC_LIB=1) |
63 |
+ ENDIF() |
64 |
+diff --git a/src/ci/MEDfileCompatibility.c b/src/ci/MEDfileCompatibility.c |
65 |
+index 1d6cabf..43b5b50 100644 |
66 |
+--- a/src/ci/MEDfileCompatibility.c |
67 |
++++ b/src/ci/MEDfileCompatibility.c |
68 |
+@@ -113,7 +113,7 @@ MEDfileCompatibility(const char* const filename, |
69 |
+ #if MED_NUM_MAJEUR != 4 |
70 |
+ #error "Don't forget to update the test version here when you change the major version of the library !" |
71 |
+ #endif |
72 |
+-#if H5_VERS_MINOR > 10 |
73 |
++#if H5_VERS_MINOR > 12 |
74 |
+ #error "Don't forget to check the compatibility version of the library, depending on the internal hdf model choice !" |
75 |
+ #error "Cf. _MEDfileCreate ..." |
76 |
+ #endif |
77 |
+diff --git a/src/hdfi/_MEDfileCreate.c b/src/hdfi/_MEDfileCreate.c |
78 |
+index 4bc9551..b670c92 100644 |
79 |
+--- a/src/hdfi/_MEDfileCreate.c |
80 |
++++ b/src/hdfi/_MEDfileCreate.c |
81 |
+@@ -159,7 +159,7 @@ med_idt _MEDfileCreate(const char * const filename, const med_access_mode access |
82 |
+ * En HDF5-1.10.0p1 cela n'a aucun effet ! |
83 |
+ * Un test autoconf permet de fixer un intervalle de version HDF à MED. |
84 |
+ */ |
85 |
+-#if H5_VERS_MINOR > 10 |
86 |
++#if H5_VERS_MINOR > 12 |
87 |
+ #error "Don't forget to change the compatibility version of the library !" |
88 |
+ #endif |
89 |
+ |
90 |
+diff --git a/src/hdfi/_MEDfileOpen.c b/src/hdfi/_MEDfileOpen.c |
91 |
+index 8ace00e..ebd875b 100644 |
92 |
+--- a/src/hdfi/_MEDfileOpen.c |
93 |
++++ b/src/hdfi/_MEDfileOpen.c |
94 |
+@@ -72,7 +72,7 @@ med_idt _MEDfileOpen(const char * const filename,const med_access_mode accessmod |
95 |
+ |
96 |
+ • The creation order tracking property, H5P_CRT_ORDER_TRACKED, has been set in the group creation property list (see H5Pset_link_creation_order). |
97 |
+ */ |
98 |
+-#if H5_VERS_MINOR > 10 |
99 |
++#if H5_VERS_MINOR > 12 |
100 |
+ #error "Don't forget to change the compatibility version of the library !" |
101 |
+ #endif |
102 |
+ /* L'avantage de bloquer le modèle interne HDF5 |
103 |
+diff --git a/src/hdfi/_MEDmemFileOpen.c b/src/hdfi/_MEDmemFileOpen.c |
104 |
+index ae92ba7..4a929ff 100644 |
105 |
+--- a/src/hdfi/_MEDmemFileOpen.c |
106 |
++++ b/src/hdfi/_MEDmemFileOpen.c |
107 |
+@@ -434,7 +434,7 @@ med_idt _MEDmemFileOpen(const char * const filename, med_memfile * const memfile |
108 |
+ goto ERROR; |
109 |
+ } |
110 |
+ |
111 |
+-#if H5_VERS_MINOR > 10 |
112 |
++#if H5_VERS_MINOR > 12 |
113 |
+ #error "Don't forget to change the compatibility version of the library !" |
114 |
+ #endif |
115 |
+ if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18) ) { |
116 |
+diff --git a/src/hdfi/_MEDparFileCreate.c b/src/hdfi/_MEDparFileCreate.c |
117 |
+index f0b77be..b7d1b78 100644 |
118 |
+--- a/src/hdfi/_MEDparFileCreate.c |
119 |
++++ b/src/hdfi/_MEDparFileCreate.c |
120 |
+@@ -64,7 +64,7 @@ med_idt _MEDparFileCreate(const char * const filename, const med_access_mode acc |
121 |
+ * En HDF5-1.10.0p1 cela n'a aucun effet ! |
122 |
+ * Un test autoconf permet de fixer un intervalle de version HDF à MED. |
123 |
+ */ |
124 |
+-#if H5_VERS_MINOR > 10 |
125 |
++#if H5_VERS_MINOR > 12 |
126 |
+ #error "Don't forget to change the compatibility version of the library !" |
127 |
+ #endif |
128 |
+ |
129 |
+diff --git a/src/hdfi/_MEDparFileOpen.c b/src/hdfi/_MEDparFileOpen.c |
130 |
+index 0a9700d..4933692 100644 |
131 |
+--- a/src/hdfi/_MEDparFileOpen.c |
132 |
++++ b/src/hdfi/_MEDparFileOpen.c |
133 |
+@@ -55,7 +55,7 @@ med_idt _MEDparFileOpen(const char * const filename,const med_access_mode access |
134 |
+ MED_ERR_(_fid,MED_ERR_INIT,MED_ERR_PROPERTY,MED_ERR_PARALLEL_MSG); |
135 |
+ goto ERROR; |
136 |
+ } |
137 |
+-#if H5_VERS_MINOR > 10 |
138 |
++#if H5_VERS_MINOR > 12 |
139 |
+ #error "Don't forget to change the compatibility version of the library !" |
140 |
+ #endif |
141 |
+ if ( H5Pset_libver_bounds( _fapl, H5F_LIBVER_18, H5F_LIBVER_18 ) ) { |
142 |
+-- |
143 |
+2.32.0 |
144 |
+ |
145 |
|
146 |
diff --git a/sci-libs/med/med-4.1.0.ebuild b/sci-libs/med/med-4.1.0.ebuild |
147 |
index ab5056e4a4d..ec6eef42dc1 100644 |
148 |
--- a/sci-libs/med/med-4.1.0.ebuild |
149 |
+++ b/sci-libs/med/med-4.1.0.ebuild |
150 |
@@ -1,11 +1,11 @@ |
151 |
-# Copyright 1999-2020 Gentoo Authors |
152 |
+# Copyright 1999-2021 Gentoo Authors |
153 |
# Distributed under the terms of the GNU General Public License v2 |
154 |
|
155 |
EAPI=7 |
156 |
|
157 |
FORTRAN_NEEDED=fortran |
158 |
|
159 |
-PYTHON_COMPAT=( python3_{7..9} ) |
160 |
+PYTHON_COMPAT=( python3_{8..10} ) |
161 |
|
162 |
inherit cmake fortran-2 python-single-r1 |
163 |
|
164 |
@@ -30,9 +30,11 @@ RDEPEND=" |
165 |
DEPEND="${RDEPEND}" |
166 |
BDEPEND="python? ( >=dev-lang/swig-3.0.8 )" |
167 |
|
168 |
+# "${FILESDIR}/${P}-0003-fix-hdf5-version-check.patch" |
169 |
PATCHES=( |
170 |
"${FILESDIR}/${P}-0001-Gentoo-specific-Adjust-install-path-for-build-dir.patch" |
171 |
"${FILESDIR}/${P}-0002-Re-add-option-for-building-Fortran-library.patch" |
172 |
+ "${FILESDIR}/${P}-0003-build-against-hdf5-1.12.patch" |
173 |
) |
174 |
|
175 |
DOCS=( AUTHORS ChangeLog NEWS README README.CMAKE TODO ) |