summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-03-31 18:25:59 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-03-31 18:25:59 +0000
commit0e799f2f57c85425b97594df944fa6295c11494b (patch)
tree6e21f292f8a94c01ad7f35bb4937c7addb435f16 /media-libs/vigra
parentAdd ~mips keyword (diff)
downloadgentoo-2-0e799f2f57c85425b97594df944fa6295c11494b.tar.gz
gentoo-2-0e799f2f57c85425b97594df944fa6295c11494b.tar.bz2
gentoo-2-0e799f2f57c85425b97594df944fa6295c11494b.zip
Version bump. This version uses cmake to built itself. Per bug #316549.
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64)
Diffstat (limited to 'media-libs/vigra')
-rw-r--r--media-libs/vigra/ChangeLog11
-rw-r--r--media-libs/vigra/files/1.7.1-automagicness.patch53
-rw-r--r--media-libs/vigra/files/1.7.1-hdf5.patch35
-rw-r--r--media-libs/vigra/vigra-1.7.1.ebuild68
4 files changed, 165 insertions, 2 deletions
diff --git a/media-libs/vigra/ChangeLog b/media-libs/vigra/ChangeLog
index 8bb5fbf2823d..661a8e96cebf 100644
--- a/media-libs/vigra/ChangeLog
+++ b/media-libs/vigra/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-libs/vigra
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/vigra/ChangeLog,v 1.27 2010/11/07 19:33:53 anarchy Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/vigra/ChangeLog,v 1.28 2011/03/31 18:25:59 scarabeus Exp $
+
+*vigra-1.7.1 (31 Mar 2011)
+
+ 31 Mar 2011; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/1.7.1-automagicness.patch, +files/1.7.1-hdf5.patch,
+ +vigra-1.7.1.ebuild:
+ Version bump. This version uses cmake to built itself. Per bug #316549.
07 Nov 2010; Jory A. Pratt <anarchy@gentoo.org> vigra-1.6.0.ebuild,
vigra-1.6.0-r1.ebuild:
diff --git a/media-libs/vigra/files/1.7.1-automagicness.patch b/media-libs/vigra/files/1.7.1-automagicness.patch
new file mode 100644
index 000000000000..e2a518c45e03
--- /dev/null
+++ b/media-libs/vigra/files/1.7.1-automagicness.patch
@@ -0,0 +1,53 @@
+diff -urN vigra-1.7.1.old/CMakeLists.txt vigra-1.7.1/CMakeLists.txt
+--- vigra-1.7.1.old/CMakeLists.txt 2011-03-31 19:32:42.000000000 +0200
++++ vigra-1.7.1/CMakeLists.txt 2011-03-31 19:39:51.000000000 +0200
+@@ -38,16 +38,32 @@
+ ##################################################
+
+ INCLUDE(VigraFindPackage)
+-VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
+-VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
+-VIGRA_FIND_PACKAGE(PNG)
+-VIGRA_FIND_PACKAGE(FFTW3 NAMES libfftw3-3)
++
++option(WITH_TIFF "Enable tiff support" ON)
++option(WITH_JPEG "Enable jpeg support" ON)
++option(WITH_PNG "Enable png support" ON)
++option(WITH_FFTW3 "Enable fftw support" ON)
++option(ENABLE_DOC "Build documentation" ON)
++if(WITH_TIFF)
++ VIGRA_FIND_PACKAGE(TIFF NAMES libtiff)
++endif()
++if(WITH_JPEG)
++ VIGRA_FIND_PACKAGE(JPEG NAMES libjpeg)
++endif()
++if(WITH_PNG)
++ VIGRA_FIND_PACKAGE(PNG)
++endif()
++if(WITH_FFTW3)
++ VIGRA_FIND_PACKAGE(FFTW3 NAMES libfftw3-3)
++endif()
+ IF(WITH_HDF5)
+ VIGRA_FIND_PACKAGE(HDF5)
+ ENDIF()
+
+-FIND_PACKAGE(Doxygen)
+-FIND_PACKAGE(PythonInterp)
++IF(ENABLE_DOC)
++ FIND_PACKAGE(Doxygen)
++ FIND_PACKAGE(PythonInterp)
++ENDIF()
+
+ IF(WITH_VIGRANUMPY)
+ FIND_PACKAGE( VIGRANUMPY_DEPENDENCIES )
+@@ -267,10 +283,4 @@
+ MESSAGE( STATUS " vigranumpy will NOT be installed" )
+ ENDIF()
+
+-IF(NOT TIFF_FOUND OR NOT JPEG_FOUND OR NOT PNG_FOUND OR NOT FFTW3_FOUND OR
+- NOT HDF5_FOUND OR NOT VIGRANUMPY_DEPENDENCIES_FOUND)
+- MESSAGE( STATUS "" )
+- MESSAGE( STATUS "Consider setting DEPENDENCY_SEARCH_PREFIX to find missing libraries" )
+-ENDIF()
+-
+ MESSAGE( STATUS "---------------------------------------------------------" )
diff --git a/media-libs/vigra/files/1.7.1-hdf5.patch b/media-libs/vigra/files/1.7.1-hdf5.patch
new file mode 100644
index 000000000000..b930656a0e97
--- /dev/null
+++ b/media-libs/vigra/files/1.7.1-hdf5.patch
@@ -0,0 +1,35 @@
+diff -urN vigra-1.7.1.old/include/vigra/random_forest/rf_visitors.hxx vigra-1.7.1/include/vigra/random_forest/rf_visitors.hxx
+--- vigra-1.7.1.old/include/vigra/random_forest/rf_visitors.hxx 2011-03-31 19:32:42.000000000 +0200
++++ vigra-1.7.1/include/vigra/random_forest/rf_visitors.hxx 2011-03-31 20:15:28.000000000 +0200
+@@ -860,6 +860,7 @@
+ ArrayVector< int> indices;
+ OOB_Error() : VisitorBase(), oob_breiman(0.0) {}
+
++#ifdef HasHDF5
+ void save(std::string filen, std::string pathn)
+ {
+ if(*(pathn.end()-1) != '/')
+@@ -869,6 +870,7 @@
+ temp[0] = oob_breiman;
+ writeHDF5(filename, (pathn + "breiman_error").c_str(), temp);
+ }
++#endif // HasHDF5
+ // negative value if sample was ib, number indicates how often.
+ // value >=0 if sample was oob, 0 means fail 1, corrrect
+
+@@ -1056,6 +1058,7 @@
+
+ /** save to HDF5 file
+ */
++#ifdef HasHDF5
+ void save(std::string filen, std::string pathn)
+ {
+ if(*(pathn.end()-1) != '/')
+@@ -1074,6 +1077,7 @@
+ temp[0] = oob_per_tree2;
+ writeHDF5(filename, (pathn + "ulli_error").c_str(), temp);
+ }
++#endif // HasHDF5
+ // negative value if sample was ib, number indicates how often.
+ // value >=0 if sample was oob, 0 means fail 1, corrrect
+
diff --git a/media-libs/vigra/vigra-1.7.1.ebuild b/media-libs/vigra/vigra-1.7.1.ebuild
new file mode 100644
index 000000000000..1eac44fe7f02
--- /dev/null
+++ b/media-libs/vigra/vigra-1.7.1.ebuild
@@ -0,0 +1,68 @@
+# 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.1 2011/03/31 18:25:59 scarabeus Exp $
+
+EAPI=4
+
+MY_P=${P}-src
+inherit base cmake-utils
+
+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/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="doc fftw hdf5 jpeg png test tiff"
+
+RDEPEND="
+ dev-libs/boost
+ png? ( media-libs/libpng )
+ tiff? ( media-libs/tiff )
+ jpeg? ( virtual/jpeg )
+ hdf5? ( sci-libs/hdf5 )
+ fftw? ( >=sci-libs/fftw-3 )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/1.7.1-automagicness.patch"
+ "${FILESDIR}/1.7.1-hdf5.patch"
+)
+
+# Tests fail because they have hardcoded dependencies on those
+# optional in source so restrict them for now.
+# Possibly could be fixed and sent upstream
+RESTRICT="test"
+
+src_configure() {
+ local libdir=$(get_libdir)
+
+ # vigranumpy needs python so i can't test
+ # doc needs doxygen and python
+ # walgrind no use for us since we restrict test
+ # $(cmake-utils_use_with valgrind VALGRIND)
+ local mycmakeargs=(
+ "-DLIBDIR_SUFFIX=${libdir/lib}"
+ "-DDOCINSTALL=share/doc/${PF}"
+ "-DENABLE_DOC=OFF"
+ "-DWITH_VIGRANUMPY=OFF"
+ $(cmake-utils_use_with png)
+ $(cmake-utils_use_with jpeg)
+ $(cmake-utils_use_with tiff)
+ $(cmake-utils_use_with fftw FFTW3)
+ $(cmake-utils_use_with hdf5)
+ $(cmake-utils_use_build test TESTING)
+ $(cmake-utils_use test CREATE_CTEST_TARGETS)
+ $(cmake-utils_use test AUTOBUILD_TESTS)
+ )
+
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+
+ # drop useless cmake files from libdir
+ rm -rf ${ED}/usr/$(get_libdir)/${PN}/
+}