summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-12-01 15:32:20 +0100
committerMichał Górny <mgorny@gentoo.org>2022-12-01 15:32:39 +0100
commit0a1c3e816e104ea1e0833fd1c8cc2f529c879469 (patch)
tree6da94e760d5e4b2e8c8444d521d555dc6b9e3aa2 /dev-python
parentdev-python/flask-babel: Fix doc dependencies (diff)
downloadgentoo-0a1c3e816e104ea1e0833fd1c8cc2f529c879469.tar.gz
gentoo-0a1c3e816e104ea1e0833fd1c8cc2f529c879469.tar.bz2
gentoo-0a1c3e816e104ea1e0833fd1c8cc2f529c879469.zip
dev-python/h5py: Backport -Wincompatible-function-pointer-types fix
Closes: https://bugs.gentoo.org/883813 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/h5py/files/h5py-3.7.0-types.patch36
-rw-r--r--dev-python/h5py/h5py-3.7.0.ebuild4
2 files changed, 40 insertions, 0 deletions
diff --git a/dev-python/h5py/files/h5py-3.7.0-types.patch b/dev-python/h5py/files/h5py-3.7.0-types.patch
new file mode 100644
index 000000000000..47058879445f
--- /dev/null
+++ b/dev-python/h5py/files/h5py-3.7.0-types.patch
@@ -0,0 +1,36 @@
+From 873077a5b132c4294f0ea6af2eb29d61352c6688 Mon Sep 17 00:00:00 2001
+From: Gyeongjae Choi <def6488@gmail.com>
+Date: Fri, 2 Sep 2022 07:54:44 +0000
+Subject: [PATCH] Fix incompatible pointer type
+
+---
+ h5py/_errors.pxd | 2 +-
+ h5py/_errors.pyx | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/h5py/_errors.pxd b/h5py/_errors.pxd
+index 13b299e27..e7791a6bd 100644
+--- a/h5py/_errors.pxd
++++ b/h5py/_errors.pxd
+@@ -412,7 +412,7 @@ cdef extern from "hdf5.h":
+
+ herr_t H5Eprint(hid_t estack_id, void *stream)
+
+- ctypedef herr_t (*H5E_walk_t)(int n, H5E_error_t *err_desc, void* client_data)
++ ctypedef herr_t (*H5E_walk_t)(unsigned int n, const H5E_error_t *err_desc, void* client_data)
+ herr_t H5Ewalk(hid_t estack_id, H5E_direction_t direction, H5E_walk_t func, void* client_data)
+
+ # --- Functions for managing the HDF5 error callback mechanism ---
+diff --git a/h5py/_errors.pyx b/h5py/_errors.pyx
+index 612052fb2..ca7b1c48c 100644
+--- a/h5py/_errors.pyx
++++ b/h5py/_errors.pyx
+@@ -94,7 +94,7 @@ cdef struct err_data_t:
+ H5E_error_t err
+ int n
+
+-cdef herr_t walk_cb(int n, H5E_error_t *desc, void *e) nogil:
++cdef herr_t walk_cb(unsigned int n, const H5E_error_t *desc, void *e) nogil:
+
+ cdef err_data_t *ee = <err_data_t*>e
+
diff --git a/dev-python/h5py/h5py-3.7.0.ebuild b/dev-python/h5py/h5py-3.7.0.ebuild
index 4181426a752b..69050a69bde6 100644
--- a/dev-python/h5py/h5py-3.7.0.ebuild
+++ b/dev-python/h5py/h5py-3.7.0.ebuild
@@ -52,6 +52,10 @@ distutils_enable_sphinx docs \
#}
python_prepare_all() {
+ local PATCHES=(
+ "${FILESDIR}"/${P}-types.patch
+ )
+
# avoid pytest-mpi dep, we do not use mpi anyway
sed -i -e 's:pytest-mpi::' pytest.ini || die
distutils-r1_python_prepare_all