diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2019-11-27 00:50:50 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2019-11-27 01:12:47 +0100 |
commit | 87724dc6e1a9e45bd820535078a4d07c963257f0 (patch) | |
tree | a97806987023113d3b8c8bf27138f963b561cb46 /media-libs/vigra/files | |
parent | media-libs/vigra: Fix build with sphinx-2 (diff) | |
download | gentoo-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')
-rw-r--r-- | media-libs/vigra/files/vigra-1.11.1-cmake-module-dir.patch | 17 | ||||
-rw-r--r-- | media-libs/vigra/files/vigra-1.11.1-python3.7.patch | 30 |
2 files changed, 47 insertions, 0 deletions
diff --git a/media-libs/vigra/files/vigra-1.11.1-cmake-module-dir.patch b/media-libs/vigra/files/vigra-1.11.1-cmake-module-dir.patch new file mode 100644 index 000000000000..cfc56b34722f --- /dev/null +++ b/media-libs/vigra/files/vigra-1.11.1-cmake-module-dir.patch @@ -0,0 +1,17 @@ +CMake modules must be in cmake subdir. + +--- a/CMakeLists.txt 2017-05-19 17:01:08.000000000 +0200 ++++ b/CMakeLists.txt 2019-11-26 23:50:40.660462479 +0100 +@@ -368,10 +368,10 @@ + + # export targets: + INSTALL(EXPORT vigra-targets +- DESTINATION lib${LIB_SUFFIX}/vigra) ++ DESTINATION lib${LIB_SUFFIX}/cmake/vigra) + INSTALL(FILES ${PROJECT_BINARY_DIR}/lib/vigra/CMake/VigraConfig.cmake + ${PROJECT_BINARY_DIR}/lib/vigra/CMake/VigraConfigVersion.cmake +- DESTINATION lib${LIB_SUFFIX}/vigra) ++ DESTINATION lib${LIB_SUFFIX}/cmake/vigra) + EXPORT(TARGETS vigraimpex FILE vigra-targets.cmake) + + ################################################## 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 + } |