summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-06-24 07:35:40 +0100
committerSam James <sam@gentoo.org>2022-06-25 00:01:42 +0100
commitf944309d71a76746425bb339d9cdbdf960c855d2 (patch)
tree134c5fe79207b8669c986a2b470607e8b1a18349 /dev-python/shiboken2
parentgames-rpg/pokete: Drop unused pygobject dependency (diff)
downloadgentoo-f944309d71a76746425bb339d9cdbdf960c855d2.tar.gz
gentoo-f944309d71a76746425bb339d9cdbdf960c855d2.tar.bz2
gentoo-f944309d71a76746425bb339d9cdbdf960c855d2.zip
dev-python/shiboken2: fix build w/ numpy 1.23
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/shiboken2')
-rw-r--r--dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch28
-rw-r--r--dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild6
2 files changed, 33 insertions, 1 deletions
diff --git a/dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch b/dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch
new file mode 100644
index 000000000000..6cd9feab800b
--- /dev/null
+++ b/dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch
@@ -0,0 +1,28 @@
+Backport of https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=1422cf4a7f277fb13fd209f24a90d6c02641497d.
+
+From 1422cf4a7f277fb13fd209f24a90d6c02641497d Mon Sep 17 00:00:00 2001
+From: Friedemann Kleint <Friedemann.Kleint@qt.io>
+Date: Thu, 23 Jun 2022 10:44:01 +0200
+Subject: libshiboken: Fix build with numpy 1.23.0
+
+Pick-to: 6.3 6.2 5.15
+Change-Id: I885c332d6c948820140946c73ae1926e88834143
+Reviewed-by: Christian Tismer <tismer@stackless.com>
+--- a/libshiboken/sbknumpyarrayconverter.cpp
++++ b/libshiboken/sbknumpyarrayconverter.cpp
+@@ -116,8 +116,13 @@ std::ostream &operator<<(std::ostream &str, PyArrayObject *o)
+ str << " NPY_ARRAY_NOTSWAPPED";
+ if ((flags & NPY_ARRAY_WRITEABLE) != 0)
+ str << " NPY_ARRAY_WRITEABLE";
+- if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0)
+- str << " NPY_ARRAY_UPDATEIFCOPY";
++#if NPY_VERSION >= 0x00000010 // NPY_1_23_API_VERSION
++ if ((flags & NPY_ARRAY_WRITEBACKIFCOPY) != 0)
++ str << " NPY_ARRAY_WRITEBACKIFCOPY";
++#else
++ if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0)
++ str << " NPY_ARRAY_UPDATEIFCOPY";
++#endif
+ } else {
+ str << '0';
+ }
diff --git a/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild b/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild
index 594d5f6bf09f..c8e150bc7ed5 100644
--- a/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild
+++ b/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild
@@ -60,7 +60,11 @@ DEPEND="${RDEPEND}
"
DOCS=( AUTHORS )
-PATCHES=( "${FILESDIR}/${P}-python310.patch" )
+
+PATCHES=(
+ "${FILESDIR}/${P}-python310.patch"
+ "${FILESDIR}/${P}-numpy-1.23.patch"
+)
# Ensure the path returned by get_llvm_prefix() contains clang as well.
llvm_check_deps() {