1 |
commit: 0a1c3e816e104ea1e0833fd1c8cc2f529c879469 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 1 14:32:20 2022 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 1 14:32:39 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a1c3e81 |
7 |
|
8 |
dev-python/h5py: Backport -Wincompatible-function-pointer-types fix |
9 |
|
10 |
Closes: https://bugs.gentoo.org/883813 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
dev-python/h5py/files/h5py-3.7.0-types.patch | 36 ++++++++++++++++++++++++++++ |
14 |
dev-python/h5py/h5py-3.7.0.ebuild | 4 ++++ |
15 |
2 files changed, 40 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/h5py/files/h5py-3.7.0-types.patch b/dev-python/h5py/files/h5py-3.7.0-types.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..47058879445f |
20 |
--- /dev/null |
21 |
+++ b/dev-python/h5py/files/h5py-3.7.0-types.patch |
22 |
@@ -0,0 +1,36 @@ |
23 |
+From 873077a5b132c4294f0ea6af2eb29d61352c6688 Mon Sep 17 00:00:00 2001 |
24 |
+From: Gyeongjae Choi <def6488@×××××.com> |
25 |
+Date: Fri, 2 Sep 2022 07:54:44 +0000 |
26 |
+Subject: [PATCH] Fix incompatible pointer type |
27 |
+ |
28 |
+--- |
29 |
+ h5py/_errors.pxd | 2 +- |
30 |
+ h5py/_errors.pyx | 2 +- |
31 |
+ 2 files changed, 2 insertions(+), 2 deletions(-) |
32 |
+ |
33 |
+diff --git a/h5py/_errors.pxd b/h5py/_errors.pxd |
34 |
+index 13b299e27..e7791a6bd 100644 |
35 |
+--- a/h5py/_errors.pxd |
36 |
++++ b/h5py/_errors.pxd |
37 |
+@@ -412,7 +412,7 @@ cdef extern from "hdf5.h": |
38 |
+ |
39 |
+ herr_t H5Eprint(hid_t estack_id, void *stream) |
40 |
+ |
41 |
+- ctypedef herr_t (*H5E_walk_t)(int n, H5E_error_t *err_desc, void* client_data) |
42 |
++ ctypedef herr_t (*H5E_walk_t)(unsigned int n, const H5E_error_t *err_desc, void* client_data) |
43 |
+ herr_t H5Ewalk(hid_t estack_id, H5E_direction_t direction, H5E_walk_t func, void* client_data) |
44 |
+ |
45 |
+ # --- Functions for managing the HDF5 error callback mechanism --- |
46 |
+diff --git a/h5py/_errors.pyx b/h5py/_errors.pyx |
47 |
+index 612052fb2..ca7b1c48c 100644 |
48 |
+--- a/h5py/_errors.pyx |
49 |
++++ b/h5py/_errors.pyx |
50 |
+@@ -94,7 +94,7 @@ cdef struct err_data_t: |
51 |
+ H5E_error_t err |
52 |
+ int n |
53 |
+ |
54 |
+-cdef herr_t walk_cb(int n, H5E_error_t *desc, void *e) nogil: |
55 |
++cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) nogil: |
56 |
+ |
57 |
+ cdef err_data_t *ee = <err_data_t*>e |
58 |
+ |
59 |
|
60 |
diff --git a/dev-python/h5py/h5py-3.7.0.ebuild b/dev-python/h5py/h5py-3.7.0.ebuild |
61 |
index 4181426a752b..69050a69bde6 100644 |
62 |
--- a/dev-python/h5py/h5py-3.7.0.ebuild |
63 |
+++ b/dev-python/h5py/h5py-3.7.0.ebuild |
64 |
@@ -52,6 +52,10 @@ distutils_enable_sphinx docs \ |
65 |
#} |
66 |
|
67 |
python_prepare_all() { |
68 |
+ local PATCHES=( |
69 |
+ "${FILESDIR}"/${P}-types.patch |
70 |
+ ) |
71 |
+ |
72 |
# avoid pytest-mpi dep, we do not use mpi anyway |
73 |
sed -i -e 's:pytest-mpi::' pytest.ini || die |
74 |
distutils-r1_python_prepare_all |