Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/shiboken2/, dev-python/shiboken2/files/
Date: Fri, 24 Jun 2022 23:02:04
Message-Id: 1656111702.f944309d71a76746425bb339d9cdbdf960c855d2.sam@gentoo
1 commit: f944309d71a76746425bb339d9cdbdf960c855d2
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 24 06:35:40 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 24 23:01:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f944309d
7
8 dev-python/shiboken2: fix build w/ numpy 1.23
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../files/shiboken2-5.15.2-numpy-1.23.patch | 28 ++++++++++++++++++++++
13 dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild | 6 ++++-
14 2 files changed, 33 insertions(+), 1 deletion(-)
15
16 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
17 new file mode 100644
18 index 000000000000..6cd9feab800b
19 --- /dev/null
20 +++ b/dev-python/shiboken2/files/shiboken2-5.15.2-numpy-1.23.patch
21 @@ -0,0 +1,28 @@
22 +Backport of https://code.qt.io/cgit/pyside/pyside-setup.git/commit/?id=1422cf4a7f277fb13fd209f24a90d6c02641497d.
23 +
24 +From 1422cf4a7f277fb13fd209f24a90d6c02641497d Mon Sep 17 00:00:00 2001
25 +From: Friedemann Kleint <Friedemann.Kleint@××.io>
26 +Date: Thu, 23 Jun 2022 10:44:01 +0200
27 +Subject: libshiboken: Fix build with numpy 1.23.0
28 +
29 +Pick-to: 6.3 6.2 5.15
30 +Change-Id: I885c332d6c948820140946c73ae1926e88834143
31 +Reviewed-by: Christian Tismer <tismer@×××××××××.com>
32 +--- a/libshiboken/sbknumpyarrayconverter.cpp
33 ++++ b/libshiboken/sbknumpyarrayconverter.cpp
34 +@@ -116,8 +116,13 @@ std::ostream &operator<<(std::ostream &str, PyArrayObject *o)
35 + str << " NPY_ARRAY_NOTSWAPPED";
36 + if ((flags & NPY_ARRAY_WRITEABLE) != 0)
37 + str << " NPY_ARRAY_WRITEABLE";
38 +- if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0)
39 +- str << " NPY_ARRAY_UPDATEIFCOPY";
40 ++#if NPY_VERSION >= 0x00000010 // NPY_1_23_API_VERSION
41 ++ if ((flags & NPY_ARRAY_WRITEBACKIFCOPY) != 0)
42 ++ str << " NPY_ARRAY_WRITEBACKIFCOPY";
43 ++#else
44 ++ if ((flags & NPY_ARRAY_UPDATEIFCOPY) != 0)
45 ++ str << " NPY_ARRAY_UPDATEIFCOPY";
46 ++#endif
47 + } else {
48 + str << '0';
49 + }
50
51 diff --git a/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild b/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild
52 index 594d5f6bf09f..c8e150bc7ed5 100644
53 --- a/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild
54 +++ b/dev-python/shiboken2/shiboken2-5.15.2-r1.ebuild
55 @@ -60,7 +60,11 @@ DEPEND="${RDEPEND}
56 "
57
58 DOCS=( AUTHORS )
59 -PATCHES=( "${FILESDIR}/${P}-python310.patch" )
60 +
61 +PATCHES=(
62 + "${FILESDIR}/${P}-python310.patch"
63 + "${FILESDIR}/${P}-numpy-1.23.patch"
64 +)
65
66 # Ensure the path returned by get_llvm_prefix() contains clang as well.
67 llvm_check_deps() {