summaryrefslogtreecommitdiff
path: root/media-libs/vigra
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /media-libs/vigra
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'media-libs/vigra')
-rw-r--r--media-libs/vigra/Manifest9
-rw-r--r--media-libs/vigra/files/vigra-1.11.1-boost-python.patch22
-rw-r--r--media-libs/vigra/files/vigra-1.11.1-cmake-module-dir.patch17
-rw-r--r--media-libs/vigra/files/vigra-1.11.1-python3.7.patch30
-rw-r--r--media-libs/vigra/files/vigra-1.11.1-sphinx.ext.pngmath.patch27
-rw-r--r--media-libs/vigra/vigra-1.11.1-r2.ebuild10
-rw-r--r--media-libs/vigra/vigra-1.11.1-r3.ebuild155
-rw-r--r--media-libs/vigra/vigra-9999.ebuild39
8 files changed, 292 insertions, 17 deletions
diff --git a/media-libs/vigra/Manifest b/media-libs/vigra/Manifest
index 35cedbbd4e5e..d9b23bf7f1e8 100644
--- a/media-libs/vigra/Manifest
+++ b/media-libs/vigra/Manifest
@@ -1,6 +1,11 @@
+AUX vigra-1.11.1-boost-python.patch 930 BLAKE2B dc791871c9a51bd98a7666c64733d7929147f54433ff140cc255e0b4a6c2ff0be9905e82a628a91d6ff9c2674d76422d0d97a2a149be22ae7a95c943fb10d76a SHA512 246596b5ea323d2e69489646afa3574fc385dc88e0a0e936b1fc508b58943d25c41e466e182aec8d8ca5793d88af7471bfcbf1ac9eb55ac034b6906c7b82d62a
+AUX vigra-1.11.1-cmake-module-dir.patch 673 BLAKE2B 9dcd11f5754c59bee64d4a4ead62da0e0cb5cde74923871a377ca06a0f639be3a63d6b1769258d09da474e4110ad499a5402660912d8bb07ac0d5bbe199bc36c SHA512 9ab597ea7413d276b22d3cc46ac4179748b98bbaaa44234f71145d69e987b5162d38f87c3317d9bb863cabbcef7c1f3d77f727d19576df7892b2df7272055ce4
AUX vigra-1.11.1-fix-incorrect-template-parameter-type.patch 7890 BLAKE2B 523eec06ad9a5ef07d852e6ec8633ed480a82224a16a3028ae7f35b31518f537af94a4fa0b90ff52dc8400649928526ad391b4731aeaa948622c186d72e0a2e9 SHA512 7ea26793457eabced61470c4b25b5409cbc961443639d6c126ea479727884baf1c8b3c9808e126ae11b43675de75c510c4272e8c51fd4df111c75e88d1b24b33
AUX vigra-1.11.1-lib_suffix.patch 1032 BLAKE2B ce1b73b89c4d10c3b2ef3185a3c9a7ca791f58efe85eb205bb5f4e638ddc18d171bb7f4a9487670bb1a276c998f0e5096e2efa4fee0f167907d3d02df01bcb42 SHA512 c1cb242eb2ebdf398c81e16acc5a493312b310836caa7f25717dd20d23e885800beeef9ca0589c75ec3a0bd1ba2d879b1e999094cfef3956134e0d6d13f25d0f
+AUX vigra-1.11.1-python3.7.patch 1254 BLAKE2B 24e23db29992efa86154edb402e250c782160ba5208fd7b2dd1c1eb0526b51633014cd488b5f8abd808bb2fc54b20866111281447fc45683d70a9a8bd93f0854 SHA512 9cbaacf2b6e3bd892b930c48d2371fe96b9cfecc69c8d0c982972c412f1157a73648672f42e73df1cd5ce0753c69907faaca38e35bdd54952a753af7054e17fe
+AUX vigra-1.11.1-sphinx.ext.pngmath.patch 1411 BLAKE2B 6ffdd2f40ac982d693a6e71a89754d453202ba70e6ae65b3b45d64add3d2cc7a9710773e94b0604cb67dadb53ea27912ccce7fe844e6264f7c989bb96149cbcc SHA512 4e0ade84985ecc9c7c45afd949671b9cbc041db486c29732b17c1b62eadfdf6e299396a18686c03c3ed4e2b3ac6d830a8e224c56e3b8d20361c2f5e5fcc14650
DIST vigra-1.11.1-src.tar.gz 55119047 BLAKE2B c67dc61515075843faacb4ee054f3e28b4edd033dc6cb89d3c591827309eafa697b839ca85ff7c68d6aff9d7e08b1d3db73d50e6c3b065a5210b64a90e242444 SHA512 9c1638d626d658fa4b13069e5850b628d91db02bb18b8a9f0a4642fee501ede8a6f4f267d79ca5cd5baf3991e704163345cd18ab7919ff2a93db6bd496096de3
-EBUILD vigra-1.11.1-r2.ebuild 3617 BLAKE2B 0fd6ace945e05d9d155f7eaa6f2d0f8f73a64e5b72e2e0ab6467e8af983f9d02f524d4ed96d0f811989dcf92b3fa97f9bb42bbf64a434fa8beffc1abe50afbe3 SHA512 b7793841d2b02ef95207aea37370a654c570bae3be099eb8871f4194f4845bda6112de9c8a488191745bfee8b9913c4d1c42605ac535f1199d308cbc2f4266b5
-EBUILD vigra-9999.ebuild 3428 BLAKE2B 9fac09906787ac8702282205b4a1ebea4bb08787993e065d3333968c4754e0de41366109fbe431ecb4ab64c325ca3f25151c7f3bc88381c746ba6496f6bdc974 SHA512 cfca4d6d34b67b2aa860ddd2a8c1eb6e6451fd3b24bff341332e18ab20da2e1b2f537b962fa739985d74b8c8a8d10bbd701fd09f1f3432c77a9b83ba2b9bff46
+EBUILD vigra-1.11.1-r2.ebuild 3819 BLAKE2B 583c605773456bc4cc866548bb8ac584a72e8d3619d829446b824b2ca426e1a260e0bf05911b53ac5816e91a55a812e49080c9a464b4540b0433122b78d4b9db SHA512 f8bce7ed99e4c1662b2242c0a251e8654260ff92ea52a0d67bdf8e8456bc4f07225bd92667a888fc2cb6c4ede387f07a51084c8d2e9b7d46453dabd519acc456
+EBUILD vigra-1.11.1-r3.ebuild 3553 BLAKE2B 96598be9b6e1ab1d2b883e769e1dc6e30d426ec5b90fc91209d30bf68925c59b69c461c627c4faa843860ca10349bd8d5b3ac0cee383178c6d584464595bef1c SHA512 6ca93606b50d6bbde4712192ab86260d5c8c5014b39a02984b17000d4906b5ca4fa552bb68b7253b617a99cb05c5351e1d482af6e7081d9126e4a8662a4f6160
+EBUILD vigra-9999.ebuild 3905 BLAKE2B 5df7ecdb49b73ebd5885fe959265306ae4c7cd3eca7c9002c373dba19dbd84bf483b13fcb9eb41e4f367f75492d26686d6d15faf18602bffe16f23a18ea62b58 SHA512 715d241d3fe38f88010c2604321dd7a77d920c1df9ff795ad0b6fca82b445c279a4585398fbe6913235ff18b9506bd7b8a868f02dc66a39102546cdbeb8942d2
MISC metadata.xml 413 BLAKE2B 985f005fa338d566dddb20126e0a83cb8e9ec5aa4ac9ed2d5ec6a42743eeb92f521375b74f8caaa94500c42450d68d0a4bf5c036c9a2909e13c922f50896824a SHA512 e5c2a32f7495cfceffc8da8464131b918134b7255fbcde9a10175a24698f5a6aff17630436935c6cda7d8a3cd8b182c299845a24528f3a9c40dff1022dce4f71
diff --git a/media-libs/vigra/files/vigra-1.11.1-boost-python.patch b/media-libs/vigra/files/vigra-1.11.1-boost-python.patch
new file mode 100644
index 000000000000..ffa3334f873a
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.11.1-boost-python.patch
@@ -0,0 +1,22 @@
+From 32ce9bc334580de7df3a97b106189145744e3726 Mon Sep 17 00:00:00 2001
+From: Ullrich Koethe <ullrich.koethe@iwr.uni-heidelberg.de>
+Date: Tue, 16 Oct 2018 19:10:56 +0200
+Subject: [PATCH] cmake: add boost_python${MAJOR}${MINOR} (fixes #445)
+
+---
+ config/FindVIGRANUMPY_DEPENDENCIES.cmake | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/config/FindVIGRANUMPY_DEPENDENCIES.cmake b/config/FindVIGRANUMPY_DEPENDENCIES.cmake
+index f6f9d563b..47cf4237c 100644
+--- a/config/FindVIGRANUMPY_DEPENDENCIES.cmake
++++ b/config/FindVIGRANUMPY_DEPENDENCIES.cmake
+@@ -115,6 +115,8 @@ IF(PYTHONINTERP_FOUND)
+ boost_python-${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}
+ # Mac with Python 3
+ boost_python${PYTHON_VERSION_MAJOR}
++ # conda-forge
++ boost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}
+ # default
+ boost_python)
+
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
+ }
diff --git a/media-libs/vigra/files/vigra-1.11.1-sphinx.ext.pngmath.patch b/media-libs/vigra/files/vigra-1.11.1-sphinx.ext.pngmath.patch
new file mode 100644
index 000000000000..fc265763f6ad
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.11.1-sphinx.ext.pngmath.patch
@@ -0,0 +1,27 @@
+Description: Replace sphinx.ext.pngmath by sphinx.ext.imgmath to build with sphinx 1.8
+Bug-Debian: https://bugs.debian.org/923467
+Author: Andreas Tille <tille@debian.org>
+Last-Update: Fri, 08 Mar 2019 18:38:02 +0100
+
+--- a/vigranumpy/docsrc/conf.py.cmake2.in
++++ b/vigranumpy/docsrc/conf.py.cmake2.in
+@@ -59,7 +59,7 @@ os.environ['PATH'] = os.pathsep.join([vi
+
+ # Add any Sphinx extension module names here, as strings. They can be extensions
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath']
++extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.imgmath']
+
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
+--- a/vigranumpy/docsrc/conf.py.in
++++ b/vigranumpy/docsrc/conf.py.in
+@@ -58,7 +58,7 @@ os.environ['PATH'] = os.pathsep.join([vi
+
+ # Add any Sphinx extension module names here, as strings. They can be extensions
+ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.pngmath']
++extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.imgmath']
+
+ # Add any paths that contain templates here, relative to this directory.
+ templates_path = ['_templates']
diff --git a/media-libs/vigra/vigra-1.11.1-r2.ebuild b/media-libs/vigra/vigra-1.11.1-r2.ebuild
index d959cda3ae24..757fe839d198 100644
--- a/media-libs/vigra/vigra-1.11.1-r2.ebuild
+++ b/media-libs/vigra/vigra-1.11.1-r2.ebuild
@@ -25,14 +25,14 @@ SLOT="0"
IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind +zlib"
REQUIRED_USE="
- doc? ( hdf5 fftw )
+ 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[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1.3-r5
)
test? (
>=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}]
@@ -64,8 +64,12 @@ RDEPEND="${DEPEND}"
RESTRICT="test"
PATCHES=(
+ # git master
"${FILESDIR}/${P}-fix-incorrect-template-parameter-type.patch"
+ "${FILESDIR}/${P}-boost-python.patch"
+ # TODO: upstream
"${FILESDIR}/${P}-lib_suffix.patch"
+ "${FILESDIR}/${P}-sphinx.ext.pngmath.patch" # thanks to Debian; bug 678308
)
pkg_setup() {
@@ -97,6 +101,8 @@ src_prepare() {
# Don't use python_fix_shebang because we can't put this behind USE="python"
sed -i -e '/env/s:python:python2:' config/vigra-config.in || die
+
+ use test || cmake_comment_add_subdirectory test
}
src_configure() {
diff --git a/media-libs/vigra/vigra-1.11.1-r3.ebuild b/media-libs/vigra/vigra-1.11.1-r3.ebuild
new file mode 100644
index 000000000000..d38b643763a9
--- /dev/null
+++ b/media-libs/vigra/vigra-1.11.1-r3.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_REQ_USE="threads(+),xml"
+inherit cmake-utils python-r1
+
+DESCRIPTION="C++ computer vision library emphasizing customizable algorithms and structures"
+HOMEPAGE="https://ukoethe.github.io/vigra/"
+
+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-${PV//\./-}/${P}-src.tar.gz"
+ KEYWORDS="~amd64 ~arm64 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind +zlib"
+
+REQUIRED_USE="
+ python? ( hdf5 ${PYTHON_REQUIRED_USE} )
+ test? ( hdf5 python fftw )"
+
+BDEPEND="
+ test? (
+ >=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}]
+ valgrind? ( dev-util/valgrind )
+ )
+"
+# runtime dependency on python is required by the vigra-config script
+DEPEND="
+ fftw? ( sci-libs/fftw:3.0 )
+ hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi=] )
+ jpeg? ( virtual/jpeg:0 )
+ openexr? (
+ media-libs/ilmbase:=
+ media-libs/openexr:=
+ )
+ png? ( media-libs/libpng:0= )
+ python? (
+ ${PYTHON_DEPS}
+ dev-libs/boost:=[python?,${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+ tiff? ( media-libs/tiff:0= )
+ zlib? ( sys-libs/zlib )
+"
+RDEPEND="${PYTHON_DEPS}
+ ${DEPEND}
+"
+
+# Severely broken, also disabled in Fedora, bugs #390447, #653442
+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}/${P}-lib_suffix.patch"
+ "${FILESDIR}/${P}-cmake-module-dir.patch"
+ "${FILESDIR}/${P}-sphinx.ext.pngmath.patch" # thanks to Debian; bug 678308
+)
+
+pkg_setup() {
+ use python && python_setup
+}
+
+src_prepare() {
+ vigra_disable() {
+ if ! use ${1}; then
+ sed -e "/^VIGRA_FIND_PACKAGE.*${2:-$1}/Is/^/#disabled by USE=${1}: /" \
+ -i CMakeLists.txt || die "failed to disable ${1}"
+ fi
+ }
+
+ cmake-utils_src_prepare
+
+ vigra_disable fftw fftw3
+ vigra_disable fftw fftw3f
+ vigra_disable jpeg
+ vigra_disable png
+ vigra_disable tiff
+ vigra_disable zlib
+
+ # 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
+
+ if ! use test; then
+ cmake_comment_add_subdirectory test
+ sed -e "/ADD_SUBDIRECTORY.*test/s/^/#DONT /" -i vigranumpy/CMakeLists.txt || die
+ fi
+}
+
+src_configure() {
+ vigra_configure() {
+ local mycmakeargs=(
+ -DAUTOEXEC_TESTS=OFF
+ -DDOCINSTALL="share/doc/${PF}/html"
+ -DWITH_HDF5=$(usex hdf5)
+ -DWITH_OPENEXR=$(usex openexr)
+ -DWITH_VALGRIND=$(usex valgrind)
+ -DWITH_VIGRANUMPY=$(usex python)
+ )
+ cmake-utils_src_configure
+ }
+
+ if use python; then
+ python_foreach_impl vigra_configure
+ else
+ vigra_configure
+ fi
+}
+
+src_compile() {
+ local VIGRA_BUILD_DIR
+ vigra_compile() {
+ cmake-utils_src_compile
+ VIGRA_BUILD_DIR="${BUILD_DIR}"
+ }
+ if use python; then
+ python_foreach_impl vigra_compile
+ else
+ vigra_compile
+ fi
+}
+
+src_install() {
+ if use python; then
+ python_foreach_impl cmake-utils_src_install
+ python_optimize
+ else
+ cmake-utils_src_install
+ fi
+}
+
+src_test() {
+ # perhaps disable tests (see #390447)
+ vigra_test() {
+ PYTHONPATH="${BUILD_DIR}/vigranumpy/vigra" cmake-utils_src_test
+ }
+ if use python; then
+ python_foreach_impl vigra_test
+ else
+ vigra_test
+ fi
+}
diff --git a/media-libs/vigra/vigra-9999.ebuild b/media-libs/vigra/vigra-9999.ebuild
index fb010ab449ce..289fe0492523 100644
--- a/media-libs/vigra/vigra-9999.ebuild
+++ b/media-libs/vigra/vigra-9999.ebuild
@@ -3,10 +3,8 @@
EAPI=7
-MY_P="${P}-src"
-MY_V="${PV//\./-}"
-PYTHON_COMPAT=( python2_7 python3_6 )
-PYTHON_REQ_USE="threads,xml"
+PYTHON_COMPAT=( python3_{6,7} )
+PYTHON_REQ_USE="threads(+),xml"
inherit cmake-utils python-r1
DESCRIPTION="C++ computer vision library emphasizing customizable algorithms and structures"
@@ -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,45 +23,51 @@ SLOT="0"
IUSE="doc +fftw +hdf5 +jpeg mpi openexr +png +python test +tiff valgrind +zlib"
REQUIRED_USE="
- doc? ( hdf5 fftw )
+ 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[${PYTHON_USEDEP}]
+ >=dev-python/sphinx-1.1.3-r5
)
test? (
>=dev-python/nose-1.1.2-r1[${PYTHON_USEDEP}]
valgrind? ( dev-util/valgrind )
)
"
-# runtime dependency on python:2.7 is required by the vigra-config script
+# runtime dependency on python is required by the vigra-config script
DEPEND="
- dev-lang/python:2.7
fftw? ( sci-libs/fftw:3.0 )
hdf5? ( >=sci-libs/hdf5-1.8.0:=[mpi=] )
jpeg? ( virtual/jpeg:0 )
openexr? (
- media-libs/openexr:=
media-libs/ilmbase:=
+ media-libs/openexr:=
)
png? ( media-libs/libpng:0= )
python? (
+ ${PYTHON_DEPS}
dev-libs/boost:=[python?,${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
- ${PYTHON_DEPS}
)
tiff? ( media-libs/tiff:0= )
zlib? ( sys-libs/zlib )
"
-RDEPEND="${DEPEND}"
+RDEPEND="${PYTHON_DEPS}
+ ${DEPEND}
+"
# Severely broken, also disabled in Fedora, bugs #390447, #653442
RESTRICT="test"
-PATCHES=( "${FILESDIR}/${PN}-1.11.1-lib_suffix.patch" )
+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
+)
pkg_setup() {
if use python || use doc; then
@@ -91,6 +95,14 @@ src_prepare() {
vigra_disable png
vigra_disable tiff
vigra_disable zlib
+
+ # 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
+
+ if ! use test; then
+ cmake_comment_add_subdirectory test
+ sed -e "/ADD_SUBDIRECTORY.*test/s/^/#DONT /" -i vigranumpy/CMakeLists.txt || die
+ fi
}
src_configure() {
@@ -130,6 +142,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