diff options
author | Samuli Suominen <ssuominen@gentoo.org> | 2010-12-21 14:55:04 +0000 |
---|---|---|
committer | Samuli Suominen <ssuominen@gentoo.org> | 2010-12-21 14:55:04 +0000 |
commit | 30d23afee0bdf80b501c7ae93aae42354d86b0db (patch) | |
tree | 81d1855d57a7cd0d86d714ea42ebb5ee55109222 | |
parent | Version bump, bug #349093 (diff) | |
download | gentoo-2-30d23afee0bdf80b501c7ae93aae42354d86b0db.tar.gz gentoo-2-30d23afee0bdf80b501c7ae93aae42354d86b0db.tar.bz2 gentoo-2-30d23afee0bdf80b501c7ae93aae42354d86b0db.zip |
Fix compability with exiv2 >= 0.21 API wrt #349160 by Alexandre Rostovtsev.
(Portage version: 2.2.0_alpha9/cvs/Linux x86_64)
-rw-r--r-- | media-gfx/gthumb/ChangeLog | 6 | ||||
-rw-r--r-- | media-gfx/gthumb/files/gthumb-2.12.1-new-exiv2.patch | 64 | ||||
-rw-r--r-- | media-gfx/gthumb/gthumb-2.12.1.ebuild | 6 |
3 files changed, 73 insertions, 3 deletions
diff --git a/media-gfx/gthumb/ChangeLog b/media-gfx/gthumb/ChangeLog index 43a89fce5d11..65a0051119b9 100644 --- a/media-gfx/gthumb/ChangeLog +++ b/media-gfx/gthumb/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for media-gfx/gthumb # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/gthumb/ChangeLog,v 1.120 2010/12/15 22:20:48 eva Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gthumb/ChangeLog,v 1.121 2010/12/21 14:55:04 ssuominen Exp $ + + 21 Dec 2010; Samuli Suominen <ssuominen@gentoo.org> gthumb-2.12.1.ebuild, + +files/gthumb-2.12.1-new-exiv2.patch: + Fix compability with exiv2 >= 0.21 API wrt #349160 by Alexandre Rostovtsev. 15 Dec 2010; Gilles Dartiguelongue <eva@gentoo.org> gthumb-2.12.1.ebuild: Fix sed expression with USE=debug. diff --git a/media-gfx/gthumb/files/gthumb-2.12.1-new-exiv2.patch b/media-gfx/gthumb/files/gthumb-2.12.1-new-exiv2.patch new file mode 100644 index 000000000000..e8499b269cbc --- /dev/null +++ b/media-gfx/gthumb/files/gthumb-2.12.1-new-exiv2.patch @@ -0,0 +1,64 @@ +From 1834cea61050e476e97e3831538169a40af8a72f Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev <tetromino@gmail.com> +Date: Mon, 20 Dec 2010 03:19:12 +0000 +Subject: Enable building with exiv2-0.21 (#349150) + +Due to API changes in exiv2-0.21 (see +http://dev.exiv2.org/issues/show/0000721), gthumb with exiv2 support +enabled fails to compile. This patch updates gthumb to allow compilation +with both exiv2-0.20 and 0.21. Since ifd IDs are no longer part of the +public API, the patch uses group names instead (which works with +exiv2-0.20 as well, modulo the fact that 0.21 has isMakerGroup() instead +of isMakerIfd() in 0.20). +In addition, instead of numeric comparison with ids1Id (which wouldn't +work with exiv2-0.21 in any case), isMakerGroup()/isMakerIfd() are now +used to determine whether or not a tag is a MakerNote. + +Signed-off-by: Alexandre Rostovtsev <tetromino@gmail.com> +--- +diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp +index 780bf29..f24b50d 100644 +--- a/extensions/exiv2_tools/exiv2-utils.cpp ++++ b/extensions/exiv2_tools/exiv2-utils.cpp +@@ -497,19 +497,19 @@ set_attributes_from_tagsets (GFileInfo *info) + static const char * + get_exif_default_category (const Exiv2::Exifdatum &md) + { ++#if EXIV2_TEST_VERSION(0, 21, 0) ++ if (Exiv2::ExifTags::isMakerGroup(md.groupName())) ++#else + if (Exiv2::ExifTags::isMakerIfd(md.ifdId())) ++#endif + return "Exif::MakerNotes"; + +- switch (md.ifdId()) { +- case Exiv2::ifd1Id: ++ if (md.groupName().compare("Thumbnail") == 0) + return "Exif::Thumbnail"; +- case Exiv2::gpsIfdId: ++ else if (md.groupName().compare("GPSInfo") == 0) + return "Exif::GPS"; +- case Exiv2::iopIfdId: ++ else if (md.groupName().compare("Iop") == 0) + return "Exif::Versions"; +- default: +- break; +- } + + return "Exif::Other"; + } +@@ -531,7 +531,11 @@ exiv2_read_metadata (Exiv2::Image::AutoPtr image, + stringstream description; + if (! md->tagLabel().empty()) + description << md->tagLabel(); +- else if (md->ifdId () > Exiv2::ifd1Id) ++#if EXIV2_TEST_VERSION(0, 21, 0) ++ else if (Exiv2::ExifTags::isMakerGroup(md->groupName())) ++#else ++ else if (Exiv2::ExifTags::isMakerIfd(md->ifdId())) ++#endif + // Must be a MakerNote - include group name + description << md->groupName() << "." << md->tagName(); + else +-- +cgit v0.8.3.1 diff --git a/media-gfx/gthumb/gthumb-2.12.1.ebuild b/media-gfx/gthumb/gthumb-2.12.1.ebuild index d9a41fcbb931..6bee38a2f804 100644 --- a/media-gfx/gthumb/gthumb-2.12.1.ebuild +++ b/media-gfx/gthumb/gthumb-2.12.1.ebuild @@ -1,11 +1,11 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/gthumb/gthumb-2.12.1.ebuild,v 1.2 2010/12/15 22:20:48 eva Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-gfx/gthumb/gthumb-2.12.1.ebuild,v 1.3 2010/12/21 14:55:04 ssuominen Exp $ EAPI="3" GCONF_DEBUG="yes" -inherit gnome2 +inherit eutils gnome2 DESCRIPTION="Image viewer and browser for Gnome" HOMEPAGE="http://gthumb.sourceforge.net" @@ -67,6 +67,8 @@ src_prepare() { # Remove unwanted CFLAGS added with USE=debug sed 's/CFLAGS="$CFLAGS -g -O0 -DDEBUG"//' -i configure.ac configure || die + + epatch "${FILESDIR}"/${P}-new-exiv2.patch } src_install() { |