From fbd3119de92702c174b24d2cd0b59d90d9551128a94898ae85255b3fa2db98d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Wed, 5 Jul 2023 15:50:02 +0000 Subject: [PATCH] Accepting request 1096980 from home:tux93:branches:GNOME:Apps - Add exiv_0-28.patch, fixing a bug with exiv2-0.28 and removing the version restriction OBS-URL: https://build.opensuse.org/request/show/1096980 OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/geeqie?expand=0&rev=53 --- exiv_0-28.patch | 151 ++++++++++++++++++++++++++++++++++++++++++++++++ geeqie.changes | 6 ++ geeqie.spec | 2 + 3 files changed, 159 insertions(+) create mode 100644 exiv_0-28.patch diff --git a/exiv_0-28.patch b/exiv_0-28.patch new file mode 100644 index 0000000..105dda6 --- /dev/null +++ b/exiv_0-28.patch @@ -0,0 +1,151 @@ +From c45cca777aa3477eaf297db99f337e18d9683c61 Mon Sep 17 00:00:00 2001 +From: Kevin Backhouse +Date: Wed, 21 Jun 2023 12:23:33 +0100 +Subject: [PATCH] Add ExifData as extra argument to + exif_item_get_data_as_text(). + +--- + src/advanced-exif.cc | 2 +- + src/exif-common.cc | 2 +- + src/exif.cc | 8 ++++---- + src/exif.h | 2 +- + src/exiv2.cc | 4 ++-- + 5 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/advanced-exif.cc b/src/advanced-exif.cc +index 79a54b12..e3d3067a 100644 +--- a/src/advanced-exif.cc ++++ b/src/advanced-exif.cc +@@ -120,7 +120,7 @@ static void advanced_exif_update(ExifWin *ew) + tag = g_strdup_printf("0x%04x", exif_item_get_tag_id(item)); + tag_name = exif_item_get_tag_name(item); + format = exif_item_get_format_name(item, TRUE); +- text = exif_item_get_data_as_text(item); ++ text = exif_item_get_data_as_text(item, exif); + utf8_text = utf8_validate_or_convert(text); + g_free(text); + elements = g_strdup_printf("%d", exif_item_get_elements(item)); +diff --git a/src/exif-common.cc b/src/exif-common.cc +index 6a4c9740..b6f07ca6 100644 +--- a/src/exif-common.cc ++++ b/src/exif-common.cc +@@ -995,7 +995,7 @@ gchar *exif_get_data_as_text(ExifData *exif, const gchar *key) + if (key_valid) return text; + + item = exif_get_item(exif, key); +- if (item) return exif_item_get_data_as_text(item); ++ if (item) return exif_item_get_data_as_text(item, exif); + + return nullptr; + } +diff --git a/src/exif.cc b/src/exif.cc +index 8708ff53..cda2cb1a 100644 +--- a/src/exif.cc ++++ b/src/exif.cc +@@ -1454,7 +1454,7 @@ gchar *exif_item_get_string(ExifItem *item, gint UNUSED(idx)) + return exif_item_get_data_as_text_full(item, METADATA_PLAIN); + } + +-gchar *exif_item_get_data_as_text(ExifItem *item) ++gchar *exif_item_get_data_as_text(ExifItem *item, ExifData *exif) + { + return exif_item_get_data_as_text_full(item, METADATA_FORMATTED); + } +@@ -1527,11 +1527,11 @@ gchar *exif_get_tag_description_by_key(const gchar *key) + return NULL; + } + +-static void exif_write_item(FILE *f, ExifItem *item) ++static void exif_write_item(FILE *f, ExifItem *item, ExifData *exif) + { + gchar *text; + +- text = exif_item_get_data_as_text(item); ++ text = exif_item_get_data_as_text(item, exif); + if (text) + { + gchar *tag = exif_item_get_tag_name(item); +@@ -1578,7 +1578,7 @@ void exif_write_data_list(ExifData *exif, FILE *f, gint human_readable_list) + item = (ExifItem*)(work->data); + work = work->next; + +- exif_write_item(f, item); ++ exif_write_item(f, item, exif); + } + } + g_fprintf(f, "----------------------------------------------------\n"); +diff --git a/src/exif.h b/src/exif.h +index fcc7d8f5..4b03c201 100644 +--- a/src/exif.h ++++ b/src/exif.h +@@ -136,7 +136,7 @@ gchar *exif_item_get_data(ExifItem *item, guint *data_len); + gchar *exif_item_get_description(ExifItem *item); + guint exif_item_get_format_id(ExifItem *item); + const gchar *exif_item_get_format_name(ExifItem *item, gboolean brief); +-gchar *exif_item_get_data_as_text(ExifItem *item); ++gchar *exif_item_get_data_as_text(ExifItem *item, ExifData *exif); + gint exif_item_get_integer(ExifItem *item, gint *value); + ExifRational *exif_item_get_rational(ExifItem *item, gint *sign, guint n); + +diff --git a/src/exiv2.cc b/src/exiv2.cc +index 33b779e7..dc62e8e0 100644 +--- a/src/exiv2.cc ++++ b/src/exiv2.cc +@@ -778,13 +778,13 @@ const char *exif_item_get_format_name(ExifItem *item, gboolean UNUSED(brief)) + } + + +-gchar *exif_item_get_data_as_text(ExifItem *item) ++gchar *exif_item_get_data_as_text(ExifItem *item, ExifData *exif) + { + try { + if (!item) return nullptr; + auto metadatum = reinterpret_cast(item); + #if EXIV2_TEST_VERSION(0,17,0) +- return utf8_validate_or_convert(metadatum->print().c_str()); ++ return utf8_validate_or_convert(metadatum->print(&exif->exifData()).c_str()); + #else + std::stringstream str; + Exiv2::Exifdatum *exifdatum; +From b04f7cd0546976dc4f7ea440648ac0eedd8df3ce Mon Sep 17 00:00:00 2001 +From: Colin Clark +Date: Wed, 21 Jun 2023 14:24:41 +0100 +Subject: [PATCH] Remove exiv2 0.28.0 restriction + +https://github.com/BestImageViewer/geeqie/pull/1119 + +The bug was fixed in the above commit. +--- + meson.build | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/meson.build b/meson.build +index a4cab49c..412399fe 100644 +--- a/meson.build ++++ b/meson.build +@@ -280,15 +280,7 @@ else + endif + + exiv2_dep = [] +-# See https://github.com/BestImageViewer/geeqie/issues/1090 +-# for the reason for 0.28.0 exclusion +-req_version = ['>=0.11', '!=0.28.0'] +- +-req_version_str = '' +-foreach req_version_str_ : req_version +- req_version_str += req_version_str_ +-endforeach +- ++req_version = '>=0.11' + option = get_option('exiv2') + if not option.disabled() + exiv2_dep = dependency('exiv2', version : req_version, required : get_option('exiv2')) +@@ -296,7 +288,7 @@ if not option.disabled() + conf_data.set('HAVE_EXIV2', 1) + summary({'exiv2' : ['image metadata processed by exiv2:', true]}, section : 'Configuration', bool_yn : true) + else +- summary({'exiv2' : ['exiv2 ' + req_version_str + ' not found - image data not processed by exiv2:', false]}, section : 'Configuration', bool_yn : true) ++ summary({'exiv2' : ['exiv2 ' + req_version + ' not found - image data not processed by exiv2:', false]}, section : 'Configuration', bool_yn : true) + endif + else + summary({'exiv2' : ['disabled - image data processed by exiv2:', false]}, section : 'Configuration', bool_yn : true) diff --git a/geeqie.changes b/geeqie.changes index 4ce8d2a..a239f88 100644 --- a/geeqie.changes +++ b/geeqie.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 5 15:21:33 UTC 2023 - Marcel Kuehlhorn + +- Add exiv_0-28.patch, fixing a bug with exiv2-0.28 and removing the + version restriction + ------------------------------------------------------------------- Wed Jun 21 16:05:29 UTC 2023 - Marcel Kuehlhorn diff --git a/geeqie.spec b/geeqie.spec index f9474c3..21baca8 100644 --- a/geeqie.spec +++ b/geeqie.spec @@ -26,6 +26,8 @@ URL: http://www.geeqie.org Source0: https://github.com/BestImageViewer/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz Source1: https://github.com/BestImageViewer/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc Source2: geeqie.keyring +# PATCH-FIX-UPSTREAM exiv_0-28.patch Fix an Issue with exiv2 0.28 +Patch0: exiv_0-28.patch BuildRequires: c++_compiler BuildRequires: docbook_4 BuildRequires: doxygen