From eb25a799342188e1a477f78a1352660762ad8522 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mar 18 2019 18:11:45 +0000 Subject: add backported upstream patch to fix support for gexiv2 >= 0.11 --- diff --git a/00-gexiv2-011-support.patch b/00-gexiv2-011-support.patch new file mode 100644 index 0000000..7055c90 --- /dev/null +++ b/00-gexiv2-011-support.patch @@ -0,0 +1,56 @@ +From 47ebe2dc1aa6780f3a47ef1d5800bef33521b966 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Mon, 18 Mar 2019 19:01:37 +0100 +Subject: [PATCH] meson: add detect when building against gexiv2 >= 0.11 + +--- + meson.build | 4 ++++ + src/photos/PhotoMetadata.vala | 8 ++++++++ + 2 files changed, 12 insertions(+) + +diff --git a/meson.build b/meson.build +index 9621691..f6a62fd 100644 +--- a/meson.build ++++ b/meson.build +@@ -51,6 +51,10 @@ lconv_dep = meson.get_compiler('vala').find_library('LConv', dirs: join_paths(me + linux_dep = meson.get_compiler('vala').find_library('linux') + config_dep = meson.get_compiler('vala').find_library('config', dirs: join_paths(meson.current_source_dir(), 'vapi')) + ++if gexiv2_dep.version().version_compare('>= 0.11') ++ add_global_arguments(['--define=GEXIV2_0_11'], language : 'vala') ++endif ++ + vapi_include = include_directories('./vapi') + + dependencies = [ +diff --git a/src/photos/PhotoMetadata.vala b/src/photos/PhotoMetadata.vala +index 340bae5..ab8c76b 100644 +--- a/src/photos/PhotoMetadata.vala ++++ b/src/photos/PhotoMetadata.vala +@@ -174,7 +174,11 @@ public class PhotoMetadata : MediaMetadata { + exiv2 = new GExiv2.Metadata (); + exif = null; + ++#if GEXIV2_0_11 ++ exiv2.open_buf (buffer[0:length]); ++#else + exiv2.open_buf (buffer, length); ++#endif + exif = Exif.Data.new_from_data (buffer, length); + source_name = "".printf (length); + } +@@ -188,7 +192,11 @@ public class PhotoMetadata : MediaMetadata { + exiv2 = new GExiv2.Metadata (); + exif = null; + ++#if GEXIV2_0_11 ++ exiv2.from_app1_segment (buffer[0:length]); ++#else + exiv2.from_app1_segment (buffer, length); ++#endif + exif = Exif.Data.new_from_data (buffer, length); + source_name = "".printf (length); + } +-- +2.20.1 + diff --git a/elementary-photos.rpmlintrc b/elementary-photos.rpmlintrc new file mode 100644 index 0000000..f3b69fe --- /dev/null +++ b/elementary-photos.rpmlintrc @@ -0,0 +1,6 @@ +# false positives +addFilter("E: invalid-lc-messages-dir /usr/share/locale/bh*") +addFilter("E: invalid-lc-messages-dir /usr/share/locale/mo*") + +# don't care about manpages +addFilter("W: no-manual-page-for-binary io.elementary.appcenter*") diff --git a/elementary-photos.spec b/elementary-photos.spec index 0245599..1545a6a 100644 --- a/elementary-photos.spec +++ b/elementary-photos.spec @@ -6,12 +6,15 @@ Name: elementary-photos Summary: Photo manager and viewer from elementary Version: 2.6.2 -Release: 2%{?dist} +Release: 3%{?dist} License: LGPLv2+ URL: https://github.com/elementary/%{srcname} Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# Backport of upstream patch to fix support for gexiv2 >= 0.11 +Patch0: 00-gexiv2-011-support.patch + BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: libappstream-glib @@ -99,6 +102,9 @@ appstream-util validate-relax --nonet \ %changelog +* Mon Mar 18 2019 Fabio Valentini - 2.6.2-3 +- Add backported upstream patch to fix building with gexiv2 >= 0.11. + * Thu Jan 31 2019 Fedora Release Engineering - 2.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild