Fix the build with exiv2 0.27
https://gitlab.gnome.org/GNOME/gnome-color-manager/merge_requests/1
This commit is contained in:
parent
d887e29d37
commit
5e9c2419cc
53
gnome-color-manager-exiv2-0.27.patch
Normal file
53
gnome-color-manager-exiv2-0.27.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 6ef6bf5e3909531b874f86cb95381fa0668cf90b Mon Sep 17 00:00:00 2001
|
||||
From: Ting-Wei Lan <lantw@src.gnome.org>
|
||||
Date: Sun, 18 Nov 2018 14:09:08 +0800
|
||||
Subject: [PATCH] Fix build with Exiv2 0.27
|
||||
|
||||
The first parameter of Exiv2::Error has changed from an int to an
|
||||
Exiv2::ErrorCode enum.
|
||||
---
|
||||
src/gcm-helper-exiv.cpp | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/src/gcm-helper-exiv.cpp b/src/gcm-helper-exiv.cpp
|
||||
index 9854e79..ffbc82c 100644
|
||||
--- a/src/gcm-helper-exiv.cpp
|
||||
+++ b/src/gcm-helper-exiv.cpp
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
+#if EXIV2_MAJOR_VERSION >= 1 || (EXIV2_MAJOR_VERSION == 0 && EXIV2_MINOR_VERSION >= 27)
|
||||
+#define HAVE_EXIV2_ERROR_CODE
|
||||
+#endif
|
||||
+
|
||||
int
|
||||
main (int argc, char* const argv[])
|
||||
{
|
||||
@@ -51,7 +55,11 @@ main (int argc, char* const argv[])
|
||||
if (argc == 2)
|
||||
filename = argv[1];
|
||||
if (filename.empty())
|
||||
+#ifdef HAVE_EXIV2_ERROR_CODE
|
||||
+ throw Exiv2::Error(Exiv2::kerErrorMessage, "No filename specified");
|
||||
+#else
|
||||
throw Exiv2::Error(1, "No filename specified");
|
||||
+#endif
|
||||
image = Exiv2::ImageFactory::open(filename);
|
||||
image->readMetadata();
|
||||
|
||||
@@ -60,7 +68,11 @@ main (int argc, char* const argv[])
|
||||
if (exifData.empty()) {
|
||||
std::string error(argv[1]);
|
||||
error += ": No Exif data found in the file";
|
||||
+#ifdef HAVE_EXIV2_ERROR_CODE
|
||||
+ throw Exiv2::Error(Exiv2::kerErrorMessage, error);
|
||||
+#else
|
||||
throw Exiv2::Error(1, error);
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* try to find make, model and serial number */
|
||||
--
|
||||
2.18.1
|
||||
|
@ -7,6 +7,10 @@ License: GPLv2+
|
||||
URL: http://mail.gnome.org/mailman/listinfo/gnome-color-manager-list
|
||||
Source0: http://download.gnome.org/sources/gnome-color-manager/3.30/%{name}-%{version}.tar.xz
|
||||
|
||||
# Fix the build with exiv2 0.27
|
||||
# https://gitlab.gnome.org/GNOME/gnome-color-manager/merge_requests/1
|
||||
Patch0: gnome-color-manager-exiv2-0.27.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: gtk3-devel >= 3.0.0
|
||||
@ -42,7 +46,7 @@ gnome-color-manager is a session framework that makes it easy to manage, install
|
||||
and generate color profiles in the GNOME desktop.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%meson
|
||||
|
Loading…
Reference in New Issue
Block a user