From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1125589-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 67015138334 for <garchives@archives.gentoo.org>; Wed, 27 Nov 2019 00:13:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B629E09D6; Wed, 27 Nov 2019 00:13:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4D2D6E09D6 for <gentoo-commits@lists.gentoo.org>; Wed, 27 Nov 2019 00:13:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 249B434D44F for <gentoo-commits@lists.gentoo.org>; Wed, 27 Nov 2019 00:13:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 055A28C6 for <gentoo-commits@lists.gentoo.org>; Wed, 27 Nov 2019 00:13:08 +0000 (UTC) From: "Andreas Sturmlechner" <asturm@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org> Message-ID: <1574813567.87724dc6e1a9e45bd820535078a4d07c963257f0.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/vigra/files/, media-libs/vigra/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/vigra/files/vigra-1.11.1-cmake-module-dir.patch media-libs/vigra/files/vigra-1.11.1-python3.7.patch media-libs/vigra/vigra-1.11.1-r3.ebuild media-libs/vigra/vigra-9999.ebuild X-VCS-Directories: media-libs/vigra/ media-libs/vigra/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 87724dc6e1a9e45bd820535078a4d07c963257f0 X-VCS-Branch: master Date: Wed, 27 Nov 2019 00:13:08 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f4455280-8daf-481a-b7ff-8d46a2e48144 X-Archives-Hash: 7e805b2ae6cd817c64eff923c826ef2e commit: 87724dc6e1a9e45bd820535078a4d07c963257f0 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> AuthorDate: Tue Nov 26 23:50:50 2019 +0000 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> CommitDate: Wed Nov 27 00:12:47 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87724dc6 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 <AT> gentoo.org> .../files/vigra-1.11.1-cmake-module-dir.patch | 17 ++++++++++ .../vigra/files/vigra-1.11.1-python3.7.patch | 30 +++++++++++++++++ .../{vigra-9999.ebuild => vigra-1.11.1-r3.ebuild} | 38 +++++++--------------- media-libs/vigra/vigra-9999.ebuild | 6 ++-- 4 files changed, 61 insertions(+), 30 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 00000000000..cfc56b34722 --- /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 00000000000..2e6cd3469f8 --- /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 + } diff --git a/media-libs/vigra/vigra-9999.ebuild b/media-libs/vigra/vigra-1.11.1-r3.ebuild similarity index 80% copy from media-libs/vigra/vigra-9999.ebuild copy to media-libs/vigra/vigra-1.11.1-r3.ebuild index 6d9d2266b16..f2b096eaf51 100644 --- a/media-libs/vigra/vigra-9999.ebuild +++ b/media-libs/vigra/vigra-1.11.1-r3.ebuild @@ -3,8 +3,6 @@ EAPI=7 -MY_P="${P}-src" -MY_V="${PV//\./-}" PYTHON_COMPAT=( python3_{6,7} ) PYTHON_REQ_USE="threads(+),xml" inherit cmake-utils python-r1 @@ -16,7 +14,7 @@ if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://github.com/ukoethe/${PN}.git" inherit git-r3 else - SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${MY_V}/${MY_P}.tar.gz" + SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${PV//\./-}/${P}-src.tar.gz" KEYWORDS="~amd64 ~arm64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" fi @@ -25,15 +23,10 @@ SLOT="0" IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind +zlib" REQUIRED_USE=" - doc? ( hdf5 fftw ${PYTHON_REQUIRED_USE} ) python? ( hdf5 ${PYTHON_REQUIRED_USE} ) test? ( hdf5 python fftw )" BDEPEND=" - doc? ( - app-doc/doxygen - >=dev-python/sphinx-1.1.3-r5 - ) test? ( >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}] valgrind? ( dev-util/valgrind ) @@ -65,15 +58,18 @@ RDEPEND="${PYTHON_DEPS} RESTRICT="test" PATCHES=( + # git master + "${FILESDIR}/${P}-fix-incorrect-template-parameter-type.patch" + "${FILESDIR}/${P}-boost-python.patch" + "${FILESDIR}/${P}-python3.7.patch" # bug 701208 # TODO: upstream - "${FILESDIR}/${PN}-1.11.1-lib_suffix.patch" - "${FILESDIR}/${PN}-1.11.1-sphinx.ext.pngmath.patch" # thanks to Debian; bug 678308 + "${FILESDIR}/${P}-lib_suffix.patch" + "${FILESDIR}/${P}-cmake-module-dir.patch" + "${FILESDIR}/${P}-sphinx.ext.pngmath.patch" # thanks to Debian; bug 678308 ) pkg_setup() { - if use python || use doc; then - python_setup - fi + use python && python_setup } src_prepare() { @@ -86,10 +82,6 @@ src_prepare() { cmake-utils_src_prepare - if [[ ${PV} != *9999 ]]; then - rm -r doc || die "failed to remove shipped docs" - fi - vigra_disable fftw fftw3 vigra_disable fftw fftw3f vigra_disable jpeg @@ -100,6 +92,7 @@ src_prepare() { # Don't use python_fix_shebang because we can't put this behind USE="python" sed -i -e '/env/s:python:python3:' config/vigra-config.in || die + use doc || cmake_comment_add_subdirectory docsrc use test || cmake_comment_add_subdirectory test } @@ -107,8 +100,7 @@ src_configure() { vigra_configure() { local mycmakeargs=( -DAUTOEXEC_TESTS=OFF - -DDOCDIR="${BUILD_DIR}/doc" - -DDOCINSTALL="share/doc/${PF}" + -DDOCINSTALL="share/doc/${PF}/html" -DWITH_HDF5=$(usex hdf5) -DWITH_OPENEXR=$(usex openexr) -DWITH_VALGRIND=$(usex valgrind) @@ -120,8 +112,6 @@ src_configure() { if use python; then python_foreach_impl vigra_configure else - # required for docdir - _cmake_check_build_dir init vigra_configure fi } @@ -137,12 +127,6 @@ src_compile() { else vigra_compile fi - - if use doc; then - einfo "Generating Documentation" - # use build dir from last compile command - VARTEXFONTS="${T}/fonts" BUILD_DIR="${VIGRA_BUILD_DIR}" cmake-utils_src_make doc - fi } src_install() { diff --git a/media-libs/vigra/vigra-9999.ebuild b/media-libs/vigra/vigra-9999.ebuild index 6d9d2266b16..c1094b89265 100644 --- a/media-libs/vigra/vigra-9999.ebuild +++ b/media-libs/vigra/vigra-9999.ebuild @@ -3,8 +3,6 @@ EAPI=7 -MY_P="${P}-src" -MY_V="${PV//\./-}" PYTHON_COMPAT=( python3_{6,7} ) PYTHON_REQ_USE="threads(+),xml" inherit cmake-utils python-r1 @@ -16,7 +14,7 @@ if [[ ${PV} == *9999 ]] ; then EGIT_REPO_URI="https://github.com/ukoethe/${PN}.git" inherit git-r3 else - SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${MY_V}/${MY_P}.tar.gz" + SRC_URI="https://github.com/ukoethe/${PN}/releases/download/Version-${PV//\./-}/${P}-src.tar.gz" KEYWORDS="~amd64 ~arm64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" fi @@ -67,6 +65,7 @@ RESTRICT="test" PATCHES=( # TODO: upstream "${FILESDIR}/${PN}-1.11.1-lib_suffix.patch" + "${FILESDIR}/${PN}-1.11.1-cmake-module-dir.patch" "${FILESDIR}/${PN}-1.11.1-sphinx.ext.pngmath.patch" # thanks to Debian; bug 678308 ) @@ -140,6 +139,7 @@ src_compile() { if use doc; then einfo "Generating Documentation" + doxygen -u ${VIGRA_BUILD_DIR}/docsrc/Doxyfile 2>/dev/null || die # use build dir from last compile command VARTEXFONTS="${T}/fonts" BUILD_DIR="${VIGRA_BUILD_DIR}" cmake-utils_src_make doc fi