public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/anarchy:master commit in: media-libs/vigra/files/, media-libs/vigra/
@ 2011-04-10 14:47 Jory Pratt
  0 siblings, 0 replies; only message in thread
From: Jory Pratt @ 2011-04-10 14:47 UTC (permalink / raw
  To: gentoo-commits

commit:     f0565be5dec646e1720eae6d8ec3f132cc61f206
Author:     Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 10 14:41:05 2011 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Sun Apr 10 14:41:05 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/anarchy.git;a=commit;h=f0565be5

add gcc-4.6 support for vigra

---
 media-libs/vigra/Manifest                        |    6 ++
 media-libs/vigra/files/1.7.1-automagicness.patch |   53 ++++++++++++++++
 media-libs/vigra/files/1.7.1-hdf5.patch          |   35 +++++++++++
 media-libs/vigra/files/1.7.1-png-1.5.patch       |   36 +++++++++++
 media-libs/vigra/files/vigra-1.7.1-gcc46.patch   |   10 +++
 media-libs/vigra/vigra-1.7.1.ebuild              |   70 ++++++++++++++++++++++
 6 files changed, 210 insertions(+), 0 deletions(-)

diff --git a/media-libs/vigra/Manifest b/media-libs/vigra/Manifest
new file mode 100644
index 0000000..5c56652
--- /dev/null
+++ b/media-libs/vigra/Manifest
@@ -0,0 +1,6 @@
+AUX 1.7.1-automagicness.patch 1608 RMD160 caa7ccad70104818b326b40c02e3f35797de4b10 SHA1 fbb5b7843c17a8a5f55db13d458eef444cc5adbe SHA256 8d6d73ff40155cd34eff25ff8f32c8bd25f32d63264548b3262fb8b788526957
+AUX 1.7.1-hdf5.patch 1290 RMD160 c9dd4347ce5f289fe0389a0ab1b8f55f102b3d87 SHA1 16d7596331f0a3836e286265377a3907f7cdd9b8 SHA256 ec366d57999b7353fd57c9095c4bf88323639195ba5edd6c67a0ebb7b42a50f0
+AUX 1.7.1-png-1.5.patch 1259 RMD160 782a8a41a8a6bc5433c98ef39a190bfe1eb7d57a SHA1 15370e3151eb84281b35d2bac97054662dc2bab9 SHA256 28e1fa88143bdda03dadde5dfa43e1c86e38e338907e12d0e7cb23d5c6b85c68
+AUX vigra-1.7.1-gcc46.patch 276 RMD160 f828fbc62d4dcd2125ea7850c51ee5503c2025f0 SHA1 9608a6a313dc2fa1a26adb6d0439d422307890c5 SHA256 d495cd36fc37de7997e2791dfd5259195f1bda424a9195064b70f9920b77a6c7
+DIST vigra-1.7.1-src.tar.gz 28481160 RMD160 67a27b11f3d844b01fd8f2b0d2fe761099f8170b SHA1 f90f54da31a6544057c25df7dbcc6954604de079 SHA256 4fe9052085330300f8c8564021b67fc2c5d534132ef29e781d839feb5d5c0ec2
+EBUILD vigra-1.7.1.ebuild 1949 RMD160 ad23a7a542020ba07fa883e1f3ba61a14a36f4a6 SHA1 075eb871b16e27d1fe296ab6ead6ce6fc502e90c SHA256 52855083b5352e5fbd47fcdab330d54cb299eab06e0131b393071fe9f69ccfb1

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 0000000..e2a518c
--- /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 0000000..b930656
--- /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/files/1.7.1-png-1.5.patch b/media-libs/vigra/files/1.7.1-png-1.5.patch
new file mode 100644
index 0000000..3fe6448
--- /dev/null
+++ b/media-libs/vigra/files/1.7.1-png-1.5.patch
@@ -0,0 +1,36 @@
+
+# HG changeset patch
+# User Ullrich Koethe <ullrich.koethe@iwr.uni-heidelberg.de>
+# Date 1299851742 -3600
+# Node ID c3a55cf81b34ae5e71e14b1dc90ece7e646a02dd
+# Parent  90494fd71974b95c61181a47580f4d1f02642723
+update for libpng 1.5 (fix by Mark Brand, mingw-cross-env)
+
+diff -r 90494fd71974 -r c3a55cf81b34 src/impex/png.cxx
+--- a/src/impex/png.cxx	Thu Mar 10 18:47:50 2011 +0100
++++ b/src/impex/png.cxx	Fri Mar 11 14:55:42 2011 +0100
+@@ -320,7 +320,11 @@
+ #if (PNG_LIBPNG_VER > 10008) && defined(PNG_READ_iCCP_SUPPORTED)
+         char * dummyName;
+         int dummyCompType;
++#if (PNG_LIBPNG_VER < 10500)
+         char * profilePtr;
++#else
++        png_byte * profilePtr;
++#endif
+         png_uint_32 profileLen;
+         if (png_get_valid( png, info, PNG_INFO_iCCP )) {
+             png_get_iCCP(png, info, &dummyName, &dummyCompType, &profilePtr, &profileLen) ;
+@@ -593,7 +597,11 @@
+         // set icc profile
+         if (iccProfile.size() > 0) {
+             png_set_iCCP(png, info, (png_charp)("icc"), 0,
++#if (PNG_LIBPNG_VER < 10500)
+                          (png_charp)iccProfile.begin(), (png_uint_32)iccProfile.size());
++#else
++                         (png_byte*)iccProfile.begin(), (png_uint_32)iccProfile.size());
++#endif
+         }
+ #endif
+ 
+

diff --git a/media-libs/vigra/files/vigra-1.7.1-gcc46.patch b/media-libs/vigra/files/vigra-1.7.1-gcc46.patch
new file mode 100644
index 0000000..9ff02ff
--- /dev/null
+++ b/media-libs/vigra/files/vigra-1.7.1-gcc46.patch
@@ -0,0 +1,10 @@
+--- a/include/vigra/sifImport.hxx	2011-04-10 09:36:12.735845000 -0500
++++ b/include/vigra/sifImport.hxx	2011-04-10 09:36:41.805845002 -0500
+@@ -58,6 +58,7 @@
+ #include <cstring>
+ #include <vector> 
+ #include "vigra/multi_array.hxx"
++#include <cstddef>
+ 
+ namespace vigra {
+  

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 0000000..57e57b2
--- /dev/null
+++ b/media-libs/vigra/vigra-1.7.1.ebuild
@@ -0,0 +1,70 @@
+# 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.3 2011/04/05 18:50:52 scarabeus Exp $
+
+EAPI=4
+
+MY_P=${P}-src
+inherit base cmake-utils multilib
+
+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-png-1.5.patch"
+	"${FILESDIR}/1.7.1-automagicness.patch"
+	"${FILESDIR}/1.7.1-hdf5.patch"
+	"${FILESDIR}/${PN}-1.7.1-gcc46.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}/
+}



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-10 14:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 14:47 [gentoo-commits] dev/anarchy:master commit in: media-libs/vigra/files/, media-libs/vigra/ Jory Pratt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox