[gthumb] - Rebuilt against new exiv2 - Added upstream patch for changed API in exiv2-0.21

chkr chkr at fedoraproject.org
Sun Jan 2 16:54:01 UTC 2011


commit 642eba9e2a0e439f1151da2b3c9f1f473d338fe6
Author: Christian Krause <chkr at fedoraproject.org>
Date:   Sun Jan 2 17:53:49 2011 +0100

    - Rebuilt against new exiv2
    - Added upstream patch for changed API in exiv2-0.21

 0001-Enable-building-with-exiv2-0.21-349150.patch |   68 +++++++++++++++++++++
 gthumb.spec                                       |    8 ++-
 2 files changed, 74 insertions(+), 2 deletions(-)
---
diff --git a/0001-Enable-building-with-exiv2-0.21-349150.patch b/0001-Enable-building-with-exiv2-0.21-349150.patch
new file mode 100644
index 0000000..165787a
--- /dev/null
+++ b/0001-Enable-building-with-exiv2-0.21-349150.patch
@@ -0,0 +1,68 @@
+From 1834cea61050e476e97e3831538169a40af8a72f Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino at gmail.com>
+Date: Sun, 19 Dec 2010 22:19:12 -0500
+Subject: [PATCH] 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 at gmail.com>
+---
+ extensions/exiv2_tools/exiv2-utils.cpp |   20 ++++++++++++--------
+ 1 files changed, 12 insertions(+), 8 deletions(-)
+
+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
+-- 
+1.7.2.3
+
diff --git a/gthumb.spec b/gthumb.spec
index 1062148..227fbd9 100644
--- a/gthumb.spec
+++ b/gthumb.spec
@@ -10,6 +10,8 @@ Patch1: 0001-correctly-activate-the-default-extensions-when-start.patch
 Patch2: 0002-Compile-with-fPIC-DPIC.patch
 # http://git.gnome.org/browse/gthumb/commit/?h=gthumb-2-12&id=cc1ac5ee3a1f27040d310c24f55f6b76514f519c
 Patch3: 0003-fixed-crash-on-thumbnail-generation.patch
+# http://git.gnome.org/browse/gthumb/commit/?h=gthumb-2-12&id=1834cea61050e476e97e3831538169a40af8a72f
+Patch4: 0001-Enable-building-with-exiv2-0.21-349150.patch
 License: GPLv2+
 Group: User Interface/X
 
@@ -61,6 +63,7 @@ package.
 %patch1 -p1 -b default_extensions
 %patch2 -p1 -b compile_with_fpic
 %patch3 -p1 -b thumbnail_crash
+%patch4 -p1 -b exiv2-0.21
 
 # force regeneration
 rm -f extensions/importer/gth-import-enum-types.[hc]
@@ -127,8 +130,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || :
 %{_datadir}/aclocal/*
 
 %changelog
-* Sun Jan 02 2011 Rex Dieter <rdieter at fedoraproject.org> - 2.12.1-3
-- rebuild (exiv2)
+* Sun Jan 02 2011 Christian Krause <chkr at fedoraproject.org> - 2.12.1-3
+- Rebuilt against new exiv2
+- Added upstream patch for changed API in exiv2-0.21
 
 * Tue Dec 14 2010 Christian Krause <chkr at fedoraproject.org> - 2.12.1-2
 - Temporarily disable usage of brasero to avoid mixed linkage of


More information about the scm-commits mailing list