!11 fix build with exiv2 0.27.5

From: @wk333
Reviewed-by: @yanan-rock
Signed-off-by: @yanan-rock
This commit is contained in:
openeuler-ci-bot 2021-12-01 12:56:32 +00:00 committed by Gitee
commit 9070d4a5c5
2 changed files with 47 additions and 2 deletions

View File

@ -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 <exiv2/image.hpp>
-#include <exiv2/exif.hpp>
+#include <exiv2/exiv2.hpp>
#include <iostream>
#include <iomanip>
@@ -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 */

View File

@ -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 <wangkai385@huawei.com> - 3.30.0-4
- fix build with exiv2 0.27.5
* Tue May 18 2021 lin.zhang <lin.zhang@turbolinux.com.cn> - 3.30.0-3
- add BuildRequires gcc gcc-c++