summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-11-27 00:50:50 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-11-27 01:12:47 +0100
commit87724dc6e1a9e45bd820535078a4d07c963257f0 (patch)
treea97806987023113d3b8c8bf27138f963b561cb46 /media-libs/vigra/files/vigra-1.11.1-python3.7.patch
parentmedia-libs/vigra: Fix build with sphinx-2 (diff)
downloadgentoo-87724dc6e1a9e45bd820535078a4d07c963257f0.tar.gz
gentoo-87724dc6e1a9e45bd820535078a4d07c963257f0.tar.bz2
gentoo-87724dc6e1a9e45bd820535078a4d07c963257f0.zip
media-libs/vigra: Fix cmake module install dir, backport python3_7
Use shipped documentation as building fails right now. Closes: https://bugs.gentoo.org/701208 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-libs/vigra/files/vigra-1.11.1-python3.7.patch')
-rw-r--r--media-libs/vigra/files/vigra-1.11.1-python3.7.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/media-libs/vigra/files/vigra-1.11.1-python3.7.patch b/media-libs/vigra/files/vigra-1.11.1-python3.7.patch
new file mode 100644
index 000000000000..2e6cd3469f8e
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.11.1-python3.7.patch
@@ -0,0 +1,30 @@
+From a6fa62663c6a6b752ed0707e95f643e25867a0f9 Mon Sep 17 00:00:00 2001
+From: John Kirkham <kirkhamj@janelia.hhmi.org>
+Date: Fri, 19 Oct 2018 11:32:42 -0400
+Subject: [PATCH] Receive `const char *` from `PyUnicode_AsUTF8`
+
+In Python 3.7, `PyUnicode_AsUTF8` was changed to return a `const char *`
+instead of a `char *`. This broke VIGRA as we were accepting a `char *`
+in this case instead. Fortunately we do not need it to be mutable for
+our use case. So just type the variable storing the result from
+`PyUnicode_AsUTF8` as a `const char *`. Should still work on older
+Python 3 versions that return `char *` as well.
+
+ref: https://bugs.python.org/issue28769
+---
+ vigranumpy/src/core/vigranumpycore.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vigranumpy/src/core/vigranumpycore.cxx b/vigranumpy/src/core/vigranumpycore.cxx
+index ec38d3636..c81c6ae52 100644
+--- a/vigranumpy/src/core/vigranumpycore.cxx
++++ b/vigranumpy/src/core/vigranumpycore.cxx
+@@ -61,7 +61,7 @@ UInt32 pychecksum(python::str const & s)
+ return checksum(data, size);
+ #else
+ Py_ssize_t size = 0;
+- char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
++ const char * data = PyUnicode_AsUTF8AndSize(s.ptr(), &size);
+ return checksum(data, size);
+ #endif
+ }