From e4b1c6586039a2e421955379ba0d661e1f8cf64c Mon Sep 17 00:00:00 2001 From: wk333 <13474090681@163.com> Date: Wed, 1 Dec 2021 19:30:37 +0800 Subject: [PATCH] fix build with exiv2 0.27.5 --- fix-build-with-exiv2-0.27.5.patch | 41 +++++++++++++++++++++++++++++++ gnome-color-manager.spec | 8 ++++-- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 fix-build-with-exiv2-0.27.5.patch diff --git a/fix-build-with-exiv2-0.27.5.patch b/fix-build-with-exiv2-0.27.5.patch new file mode 100644 index 0000000..00878bc --- /dev/null +++ b/fix-build-with-exiv2-0.27.5.patch @@ -0,0 +1,41 @@ +Patch kindly borrowed from Mageia. + +https://gitlab.gnome.org/GNOME/gnome-color-manager/issues/4 + +diff -Nru a/src/gcm-helper-exiv.cpp b/src/gcm-helper-exiv.cpp +--- a/src/gcm-helper-exiv.cpp 2018-09-04 13:50:05.000000000 +0200 ++++ b/src/gcm-helper-exiv.cpp 2018-12-31 15:39:52.288495398 +0100 +@@ -19,8 +19,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +-#include +-#include ++#include + #include + #include + +@@ -51,7 +50,11 @@ + if (argc == 2) + filename = argv[1]; + if (filename.empty()) ++#if EXIV2_TEST_VERSION(0,27,0) ++ 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 +63,11 @@ + if (exifData.empty()) { + std::string error(argv[1]); + error += ": No Exif data found in the file"; ++#if EXIV2_TEST_VERSION(0,27,0) ++ throw Exiv2::Error(Exiv2::kerErrorMessage, error); ++#else + throw Exiv2::Error(1, error); ++#endif + } + + /* try to find make, model and serial number */ diff --git a/gnome-color-manager.spec b/gnome-color-manager.spec index aae47c2..5b20c4d 100644 --- a/gnome-color-manager.spec +++ b/gnome-color-manager.spec @@ -1,10 +1,11 @@ Name: gnome-color-manager Version: 3.30.0 -Release: 3 +Release: 4 Summary: GNOME color management tools License: GPLv2+ URL: http://mail.gnome.org/mailman/listinfo/gnome-color-manager-list Source0: http://download.gnome.org/sources/gnome-color-manager/3.30/gnome-color-manager-%{version}.tar.xz +Patch1: fix-build-with-exiv2-0.27.5.patch BuildRequires: gtk3-devel >= 3.0.0 desktop-file-utils gettext lcms2-devel libtiff-devel libexif-devel BuildRequires: exiv2-devel libcanberra-devel glib2-devel >= 2.25.9-2 docbook-utils colord-devel >= 0.1.12 BuildRequires: colord-gtk-devel >= 0.1.22 itstool meson vte291-devel @@ -26,7 +27,7 @@ Requires: gnome-color-manager = %{version}-%{release} Documentation for gnome-color-manager. %prep -%autosetup -n gnome-color-manager-%{version} +%autosetup -n gnome-color-manager-%{version} -p1 %build %meson %meson_build @@ -49,6 +50,9 @@ Documentation for gnome-color-manager. %{_mandir}/man1/*.1* %changelog +* Wed Dec 01 2021 wangkai - 3.30.0-4 +- fix build with exiv2 0.27.5 + * Tue May 18 2021 lin.zhang - 3.30.0-3 - add BuildRequires gcc gcc-c++