diff options
author | 2011-09-04 15:54:01 +0000 | |
---|---|---|
committer | 2011-09-04 15:54:01 +0000 | |
commit | a1f70e93374f3bc6621ce3e0f74a517df91c7a7b (patch) | |
tree | 8e07eadf6a7e2e09a3c85c7925c7f1b948e47b87 /media-libs/vigra | |
parent | Add automagic graphite2 to harddep, i wont rewrite this mess. (diff) | |
download | historical-a1f70e93374f3bc6621ce3e0f74a517df91c7a7b.tar.gz historical-a1f70e93374f3bc6621ce3e0f74a517df91c7a7b.tar.bz2 historical-a1f70e93374f3bc6621ce3e0f74a517df91c7a7b.zip |
Try to consolidate python test and doc useflags by REQUIRED_USE usage. Add patches where needed...
Package-Manager: portage-2.2.0_alpha53/cvs/Linux x86_64
Diffstat (limited to 'media-libs/vigra')
-rw-r--r-- | media-libs/vigra/ChangeLog | 9 | ||||
-rw-r--r-- | media-libs/vigra/files/1.7.1-fix-nosetest.patch | 26 | ||||
-rw-r--r-- | media-libs/vigra/files/1.7.1-fix-tests.patch | 11 | ||||
-rw-r--r-- | media-libs/vigra/files/1.7.1-numpy_doc.patch | 27 | ||||
-rw-r--r-- | media-libs/vigra/vigra-1.6.0-r1.ebuild | 80 | ||||
-rw-r--r-- | media-libs/vigra/vigra-1.7.1.ebuild | 31 |
6 files changed, 95 insertions, 89 deletions
diff --git a/media-libs/vigra/ChangeLog b/media-libs/vigra/ChangeLog index 6864dfd2dd4e..b7bffc65ca79 100644 --- a/media-libs/vigra/ChangeLog +++ b/media-libs/vigra/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for media-libs/vigra # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/vigra/ChangeLog,v 1.32 2011/08/06 10:14:44 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/vigra/ChangeLog,v 1.33 2011/09/04 15:54:00 scarabeus Exp $ + + 04 Sep 2011; Tomáš Chvátal <scarabeus@gentoo.org> + +files/1.7.1-fix-nosetest.patch, -vigra-1.6.0-r1.ebuild, + +files/1.7.1-fix-tests.patch, vigra-1.7.1.ebuild, + +files/1.7.1-numpy_doc.patch: + Try to consolidate python test and doc useflags by REQUIRED_USE usage. Add + patches where needed... 06 Aug 2011; Tomáš Chvátal <scarabeus@gentoo.org> files/1.7.1-gcc4.6.patch: diff --git a/media-libs/vigra/files/1.7.1-fix-nosetest.patch b/media-libs/vigra/files/1.7.1-fix-nosetest.patch new file mode 100644 index 000000000000..b75b8698e403 --- /dev/null +++ b/media-libs/vigra/files/1.7.1-fix-nosetest.patch @@ -0,0 +1,26 @@ +diff --git a/include/vigra/noise_normalization.hxx b/include/vigra/noise_normalization.hxx +index 8758cde..344a601 100644 +--- a/include/vigra/noise_normalization.hxx ++++ b/include/vigra/noise_normalization.hxx +@@ -583,6 +583,9 @@ void noiseVarianceListMedianCut(Vector1 const & noise, Vector2 & clusters, + for(unsigned int k=0; k < clusters.size(); ++k) + { + int k1 = clusters[k][0], k2 = clusters[k][1]-1; ++ ++#if 0 // turned the "internal error" in a postcondition message ++ // for the most likely case + std::string message("noiseVarianceListMedianCut(): internal error ("); + message += std::string("k: ") + asString(k) + ", "; + message += std::string("k1: ") + asString(k1) + ", "; +@@ -590,6 +593,11 @@ void noiseVarianceListMedianCut(Vector1 const & noise, Vector2 & clusters, + message += std::string("noise.size(): ") + asString(noise.size()) + ", "; + message += std::string("clusters.size(): ") + asString(clusters.size()) + ")."; + vigra_invariant(k1 >= 0 && k1 < (int)noise.size() && k2 >= 0 && k2 < (int)noise.size(), message.c_str()); ++#endif ++ ++ vigra_postcondition(k1 >= 0 && k1 < (int)noise.size() && ++ k2 >= 0 && k2 < (int)noise.size(), ++ "noiseVarianceClustering(): Unable to find homogeneous regions."); + + double diff = noise[k2][0] - noise[k1][0]; + if(diff > diffMax) diff --git a/media-libs/vigra/files/1.7.1-fix-tests.patch b/media-libs/vigra/files/1.7.1-fix-tests.patch new file mode 100644 index 000000000000..5f236f76f9ac --- /dev/null +++ b/media-libs/vigra/files/1.7.1-fix-tests.patch @@ -0,0 +1,11 @@ +diff -urN vigra-1.7.1.old/test/utilities/test.cxx vigra-1.7.1/test/utilities/test.cxx +--- vigra-1.7.1.old/test/utilities/test.cxx 2011-09-04 17:13:53.362610527 +0200 ++++ vigra-1.7.1/test/utilities/test.cxx 2011-09-04 17:27:55.772600423 +0200 +@@ -33,6 +33,7 @@ + /* */ + /************************************************************************/ + ++#include <cstddef> + #include <iostream> + #include <iterator> + #include "unittest.hxx" diff --git a/media-libs/vigra/files/1.7.1-numpy_doc.patch b/media-libs/vigra/files/1.7.1-numpy_doc.patch new file mode 100644 index 000000000000..b112395e8a6b --- /dev/null +++ b/media-libs/vigra/files/1.7.1-numpy_doc.patch @@ -0,0 +1,27 @@ +diff -urN vigra-1.7.1.old/vigranumpy/docsrc/CMakeLists.txt vigra-1.7.1/vigranumpy/docsrc/CMakeLists.txt +--- vigra-1.7.1.old/vigranumpy/docsrc/CMakeLists.txt 2011-09-04 17:13:53.362610527 +0200 ++++ vigra-1.7.1/vigranumpy/docsrc/CMakeLists.txt 2011-09-04 17:18:03.282607530 +0200 +@@ -1,4 +1,4 @@ +-IF(PYTHON_SPHINX) ++IF(PYTHON_SPHINX AND ENABLE_DOC) + # vigranumpy documentation generation using sphinx + IF(DEFINED VIGRANUMPY_DOCDIR) + MESSAGE(SEND_ERROR "VIGRANUMPY_DOCDIR already defined! Please delete from Cache.") +@@ -33,7 +33,7 @@ + ${VIGRANUMPY_DOCDIR} + COMMENT "Generating vigranumpy documentation") + +-ELSE(PYTHON_SPHINX) ++ELSE(PYTHON_SPHINX AND ENABLE_DOC) + # no vigranumpy documentation if sphinx not available + ADD_CUSTOM_TARGET (doc_python + ${CMAKE_COMMAND} -E echo +@@ -41,7 +41,7 @@ + "(sphinx-build not found)" + VERBATIM) + +-ENDIF(PYTHON_SPHINX) ++ENDIF(PYTHON_SPHINX AND ENABLE_DOC) + + ADD_DEPENDENCIES(doc_python vigranumpy) + ADD_DEPENDENCIES(doc_python doc_cpp) diff --git a/media-libs/vigra/vigra-1.6.0-r1.ebuild b/media-libs/vigra/vigra-1.6.0-r1.ebuild deleted file mode 100644 index a59e60bb941b..000000000000 --- a/media-libs/vigra/vigra-1.6.0-r1.ebuild +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 1999-2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/vigra/vigra-1.6.0-r1.ebuild,v 1.2 2010/11/07 19:33:53 anarchy Exp $ - -EAPI=2 - -inherit eutils multilib toolchain-funcs - -DESCRIPTION="C++ computer vision library with emphasize on customizable algorithms and data structures" -HOMEPAGE="http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/" -SRC_URI="http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/${P/-}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="doc fftw jpeg png tiff zlib test" - -RDEPEND="png? ( media-libs/libpng ) - tiff? ( media-libs/tiff ) - jpeg? ( virtual/jpeg ) - fftw? ( >=sci-libs/fftw-3 )" -DEPEND="${RDEPEND} - dev-util/pkgconfig" - -S="${WORKDIR}/${P/-}" - -MY_DOCDIR="usr/share/doc/${PF}" - -pkg_setup() { - tc-export CC CXX - local flag - export usefail="" - if use test - then - for flag in png tiff jpeg fftw - do - use $flag || usefail="$usefail $flag" - done - - if [[ -n "$usefail" ]] - then - elog "USE=test enabled but the following use-flags are disabled:" - elog "${usefail# }" - elog "Tests will be skipped, please enable the other use-flags." - fi - fi -} - -src_prepare() { - epatch "${FILESDIR}/${P}-gcc44.patch" \ - "${FILESDIR}"/${P}-ldflags.patch - sed -i \ - -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:g' \ - src/impex/png.cxx || die -} - -src_configure() { - ./configure \ - --docdir="${D}/${MY_DOCDIR}" \ - --prefix=/usr \ - $(use_with png) \ - $(use_with tiff) \ - $(use_with jpeg) \ - $(use_with zlib) \ - $(use_with fftw) \ - || die "configure failed" -} - -src_test() { - if [[ -z "${usefail}" ]] - then - default - fi -} - -src_install() { - emake libdir="${D}/usr/$(get_libdir)" prefix="${D}/usr" install || die "emake install failed" - use doc || rm -Rf "${D}/${MY_DOCDIR}" - dodoc README.txt -} diff --git a/media-libs/vigra/vigra-1.7.1.ebuild b/media-libs/vigra/vigra-1.7.1.ebuild index a321bdf8acf1..b901bb0644de 100644 --- a/media-libs/vigra/vigra-1.7.1.ebuild +++ b/media-libs/vigra/vigra-1.7.1.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/vigra/vigra-1.7.1.ebuild,v 1.5 2011/07/29 11:49:33 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/vigra/vigra-1.7.1.ebuild,v 1.6 2011/09/04 15:54:00 scarabeus Exp $ -EAPI=3 +EAPI=4 MY_P=${P}-src inherit base cmake-utils multilib @@ -14,19 +14,26 @@ SRC_URI="http://hci.iwr.uni-heidelberg.de/vigra/${MY_P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="doc fftw hdf5 jpeg png test tiff" +IUSE="doc +fftw +hdf5 +jpeg +png +python test +tiff" RDEPEND=" dev-libs/boost fftw? ( >=sci-libs/fftw-3 ) - hdf5? ( sci-libs/hdf5[-mpi] ) + hdf5? ( sci-libs/hdf5 ) jpeg? ( virtual/jpeg ) png? ( media-libs/libpng ) + python? ( + || ( dev-lang/python:2.6 dev-lang/python:2.7 ) + ) tiff? ( media-libs/tiff ) " DEPEND="${RDEPEND} doc? ( app-doc/doxygen + python? ( dev-python/sphinx ) + ) + test? ( + python? ( dev-python/nose ) ) " @@ -35,17 +42,25 @@ PATCHES=( "${FILESDIR}/1.7.1-automagicness.patch" "${FILESDIR}/1.7.1-hdf5.patch" "${FILESDIR}/1.7.1-gcc4.6.patch" + "${FILESDIR}/1.7.1-numpy_doc.patch" + "${FILESDIR}/1.7.1-fix-tests.patch" + "${FILESDIR}/1.7.1-fix-nosetest.patch" ) -# Restrict tests due to miscompilations -RESTRICT="test" +REQUIRED_USE=" + doc? ( hdf5 fftw ) + python? ( hdf5 ) + test? ( hdf5 python fftw ) +" + +CMAKE_IN_SOURCE_BUILD=1 src_configure() { local libdir=$(get_libdir) # required for ddocdir _check_build_dir init - # vigranumpy needs python so i can't test + # vigranumpy needs python and if enabled it ooms # doc needs doxygen and python # walgrind no use for us since we restrict test # $(cmake-utils_use_with valgrind VALGRIND) @@ -54,7 +69,7 @@ src_configure() { "-DLIBDIR_SUFFIX=${libdir/lib}" "-DDOCINSTALL=share/doc/${PF}" "-DWITH_VALGRIND=OFF" - "-DWITH_VIGRANUMPY=OFF" + $(cmake-utils_use_with python VIGRANUMPY) $(cmake-utils_use_enable doc DOC) $(cmake-utils_use_with png) $(cmake-utils_use_with jpeg) |