]> git.pld-linux.org Git - packages/gnome-color-manager.git/blame - exiv2-0.27.patch
- up to 3.30
[packages/gnome-color-manager.git] / exiv2-0.27.patch
CommitLineData
bc1a1802
JR
1From 6ef6bf5e3909531b874f86cb95381fa0668cf90b Mon Sep 17 00:00:00 2001
2From: Ting-Wei Lan <lantw@src.gnome.org>
3Date: Sun, 18 Nov 2018 14:09:08 +0800
4Subject: [PATCH] Fix build with Exiv2 0.27
5
6The first parameter of Exiv2::Error has changed from an int to an
7Exiv2::ErrorCode enum.
8---
9 src/gcm-helper-exiv.cpp | 12 ++++++++++++
10 1 file changed, 12 insertions(+)
11
12diff --git a/src/gcm-helper-exiv.cpp b/src/gcm-helper-exiv.cpp
13index 9854e79..ffbc82c 100644
14--- a/src/gcm-helper-exiv.cpp
15+++ b/src/gcm-helper-exiv.cpp
16@@ -24,6 +24,10 @@
17 #include <iostream>
18 #include <iomanip>
19
20+#if EXIV2_MAJOR_VERSION >= 1 || (EXIV2_MAJOR_VERSION == 0 && EXIV2_MINOR_VERSION >= 27)
21+#define HAVE_EXIV2_ERROR_CODE
22+#endif
23+
24 int
25 main (int argc, char* const argv[])
26 {
27@@ -51,7 +55,11 @@ main (int argc, char* const argv[])
28 if (argc == 2)
29 filename = argv[1];
30 if (filename.empty())
31+#ifdef HAVE_EXIV2_ERROR_CODE
32+ throw Exiv2::Error(Exiv2::kerErrorMessage, "No filename specified");
33+#else
34 throw Exiv2::Error(1, "No filename specified");
35+#endif
36 image = Exiv2::ImageFactory::open(filename);
37 image->readMetadata();
38
39@@ -60,7 +68,11 @@ main (int argc, char* const argv[])
40 if (exifData.empty()) {
41 std::string error(argv[1]);
42 error += ": No Exif data found in the file";
43+#ifdef HAVE_EXIV2_ERROR_CODE
44+ throw Exiv2::Error(Exiv2::kerErrorMessage, error);
45+#else
46 throw Exiv2::Error(1, error);
47+#endif
48 }
49
50 /* try to find make, model and serial number */
51--
522.18.1
53
This page took 0.057256 seconds and 4 git commands to generate.