From dd4fa1bae436e1d492dc353129ca88202330c748b6c27f443985c2f6cf159d7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Fri, 18 Jan 2019 18:27:36 +0000 Subject: [PATCH] Accepting request 666940 from GNOME:Next OBS-URL: https://build.opensuse.org/request/show/666940 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-color-manager?expand=0&rev=128 --- Fix-build-with-Exiv2-027.patch | 52 ++++++++++++++++++++++++++++++++++ gnome-color-manager.changes | 6 ++++ gnome-color-manager.spec | 5 +++- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 Fix-build-with-Exiv2-027.patch diff --git a/Fix-build-with-Exiv2-027.patch b/Fix-build-with-Exiv2-027.patch new file mode 100644 index 0000000..74a7b73 --- /dev/null +++ b/Fix-build-with-Exiv2-027.patch @@ -0,0 +1,52 @@ +From 6ef6bf5e3909531b874f86cb95381fa0668cf90b Mon Sep 17 00:00:00 2001 +From: Ting-Wei Lan +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 + #include + ++#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 diff --git a/gnome-color-manager.changes b/gnome-color-manager.changes index 021feff..b14a08d 100644 --- a/gnome-color-manager.changes +++ b/gnome-color-manager.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 18 10:03:39 UTC 2019 - bjorn.lie@gmail.com + +- Add Fix-build-with-Exiv2-027.patch: Fix build with Exiv2 0.27 + (glgo#GNOME/gnome-color-manager!1). + ------------------------------------------------------------------- Sat Sep 8 10:34:01 UTC 2018 - antoine.belvire@opensuse.org diff --git a/gnome-color-manager.spec b/gnome-color-manager.spec index 413ee9b..5a26516 100644 --- a/gnome-color-manager.spec +++ b/gnome-color-manager.spec @@ -25,6 +25,9 @@ License: GPL-2.0-or-later Group: System/GUI/GNOME URL: http://projects.gnome.org/gnome-color-manager Source: http://download.gnome.org/sources/gnome-color-manager/3.30/%{name}-%{version}.tar.xz +# PATCH-FIX-UPSTREAM Fix-build-with-Exiv2-027.patch -- Fix build with Exiv2 0.27 +Patch0: Fix-build-with-Exiv2-027.patch + BuildRequires: docbook-utils BuildRequires: gcc-c++ BuildRequires: libtiff-devel @@ -59,7 +62,7 @@ install and generate color profiles in the GNOME desktop. %lang_package %prep -%setup -q +%autosetup -p1 translation-update-upstream %build