Compare commits
No commits in common. "rawhide" and "f39" have entirely different histories.
2 changed files with 2 additions and 103 deletions
|
|
@ -1,100 +0,0 @@
|
|||
From 8767bc47c2cc9591745ee2b3214fff38eaab114f Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
||||
Date: Sat, 11 Nov 2023 18:17:04 +0100
|
||||
Subject: [PATCH] Fix build with >=exiv2-0.28.0, raise minimum to 0.27.0
|
||||
|
||||
- enables use of EXIV2_TEST_VERSION macro
|
||||
- add compatibility for exiv2-0.28.0
|
||||
---
|
||||
meson.build | 2 +-
|
||||
src/uni-exiv2.cpp | 21 +++++++++++++++------
|
||||
2 files changed, 16 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 8f91fb5..9ef9f09 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -28,7 +28,7 @@ viewnior_deps = [
|
||||
dependency('gio-2.0', version: glib_ver),
|
||||
dependency('shared-mime-info', version: '>= 0.20'),
|
||||
dependency('gdk-pixbuf-2.0', version: '>= 0.21'),
|
||||
- dependency('exiv2', version: '>= 0.21'),
|
||||
+ dependency('exiv2', version: '>= 0.27'),
|
||||
]
|
||||
#
|
||||
|
||||
diff --git a/src/uni-exiv2.cpp b/src/uni-exiv2.cpp
|
||||
index 0d14b9f..d03edd7 100644
|
||||
--- a/src/uni-exiv2.cpp
|
||||
+++ b/src/uni-exiv2.cpp
|
||||
@@ -22,12 +22,21 @@
|
||||
|
||||
#include <exiv2/exiv2.hpp>
|
||||
#include <iostream>
|
||||
+#include <memory>
|
||||
|
||||
#include "uni-exiv2.hpp"
|
||||
|
||||
+#if EXIV2_TEST_VERSION(0,28,0)
|
||||
+ typedef Exiv2::Error Exiv2Error;
|
||||
+ typedef Exiv2::Image::UniquePtr ImagePtr;
|
||||
+#else
|
||||
+ typedef Exiv2::AnyError Exiv2Error;
|
||||
+ typedef Exiv2::Image::AutoPtr ImagePtr;
|
||||
+#endif
|
||||
+
|
||||
#define ARRAY_SIZE(array) (sizeof array/sizeof(array[0]))
|
||||
|
||||
-static Exiv2::Image::AutoPtr cached_image;
|
||||
+static ImagePtr cached_image;
|
||||
|
||||
extern "C"
|
||||
void
|
||||
@@ -35,7 +44,7 @@ uni_read_exiv2_map(const char *uri, void (*callback)(const char*, const char*, v
|
||||
{
|
||||
Exiv2::LogMsg::setLevel(Exiv2::LogMsg::mute);
|
||||
try {
|
||||
- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(uri);
|
||||
+ ImagePtr image = Exiv2::ImageFactory::open(uri);
|
||||
if ( image.get() == 0 ) {
|
||||
return;
|
||||
}
|
||||
@@ -80,7 +89,7 @@ uni_read_exiv2_map(const char *uri, void (*callback)(const char*, const char*, v
|
||||
}
|
||||
}
|
||||
}
|
||||
- } catch (Exiv2::AnyError& e) {
|
||||
+ } catch (Exiv2Error& e) {
|
||||
std::cerr << "Exiv2: '" << e << "'\n";
|
||||
}
|
||||
}
|
||||
@@ -103,7 +112,7 @@ uni_read_exiv2_to_cache(const char *uri)
|
||||
}
|
||||
|
||||
cached_image->readMetadata();
|
||||
- } catch (Exiv2::AnyError& e) {
|
||||
+ } catch (Exiv2Error& e) {
|
||||
std::cerr << "Exiv2: '" << e << "'\n";
|
||||
}
|
||||
|
||||
@@ -121,7 +130,7 @@ uni_write_exiv2_from_cache(const char *uri)
|
||||
}
|
||||
|
||||
try {
|
||||
- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(uri);
|
||||
+ ImagePtr image = Exiv2::ImageFactory::open(uri);
|
||||
if ( image.get() == 0 ) {
|
||||
return 2;
|
||||
}
|
||||
@@ -133,7 +142,7 @@ uni_write_exiv2_from_cache(const char *uri)
|
||||
cached_image.reset(NULL);
|
||||
|
||||
return 0;
|
||||
- } catch (Exiv2::AnyError& e) {
|
||||
+ } catch (Exiv2Error& e) {
|
||||
std::cerr << "Exiv2: '" << e << "'\n";
|
||||
}
|
||||
|
||||
--
|
||||
2.41.0
|
||||
|
||||
|
|
@ -3,10 +3,9 @@ Version: 1.8
|
|||
Release: %autorelease
|
||||
Summary: Elegant image viewer
|
||||
|
||||
License: GPL-3.0-or-later
|
||||
License: GPLv3+
|
||||
URL: http://siyanpanayotov.com/project/viewnior/
|
||||
Source: https://github.com/hellosiyan/Viewnior/archive/%{name}-%{version}.tar.gz
|
||||
Patch: 0001-Fix-build-with-exiv2-0.28.0-raise-minimum-to-0.27.0.patch
|
||||
Source0: https://github.com/hellosiyan/Viewnior/archive/%{name}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: pkgconfig(gtk+-2.0) >= 2.20
|
||||
BuildRequires: pkgconfig(glib-2.0) >= 2.32
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue