Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (a892d4beeaf0f104ad491e8c2af031fe36fbb3aa)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (a892d4beeaf0f104ad491e8c2af031fe36fbb3aa)
  • Date: Thu, 16 Oct 2025 12:44:33 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

graphics/viewnior/DETAILS |
4
graphics/viewnior/HISTORY |
6
graphics/viewnior/PRE_BUILD |
3
graphics/viewnior/patches/0001-change-exiv2-AutoPtr-to-unique_ptr.patch |
90 ++++++++++
graphics/viewnior/patches/0002-add-support-for-exiv-0.28.0-errors.patch |
59 ++++++
5 files changed, 160 insertions(+), 2 deletions(-)

New commits:
commit a892d4beeaf0f104ad491e8c2af031fe36fbb3aa
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

viewnior 1.8

diff --git a/graphics/viewnior/DETAILS b/graphics/viewnior/DETAILS
index 89e1ef8..5a07ec7 100755
--- a/graphics/viewnior/DETAILS
+++ b/graphics/viewnior/DETAILS
@@ -1,8 +1,8 @@
# Watch: https://github.com/hellosiyan/Viewnior/tags
/archive/refs/tags/viewnior-([0-9.]+)\.tar
. "$GRIMOIRE/MESON_FUNCTIONS"
SPELL=viewnior
- VERSION=1.7
-
SOURCE_HASH=sha512:5ba17d7b5ceeffa65b04213f179c1439b09ac44e412e0750dde159b118a714f28d3a290509a402b234e4e7ba5b185fc73eef65d418598f344911e4e2c1373fe5
+ VERSION=1.8
+
SOURCE_HASH=sha512:0f9698801172ef6b8f5df4132526b2e605e9aa9fd69cf41a091a3623de9b2e84ca857e625aaa9e83f29df318f70a13fb458bac0df11ae46837b78ef257a00bee
SOURCE=$SPELL-$VERSION.tar.gz
SOURCE_DIRECTORY=$BUILD_DIRECTORY/Viewnior-$SPELL-$VERSION
SOURCE_URL[0]="https://github.com/hellosiyan/Viewnior/archive/$SOURCE";
diff --git a/graphics/viewnior/HISTORY b/graphics/viewnior/HISTORY
index db9f4fb..74654ea 100644
--- a/graphics/viewnior/HISTORY
+++ b/graphics/viewnior/HISTORY
@@ -1,3 +1,9 @@
+2025-10-16 Ismael Luceno <ismael AT sourcemage.org>
+ * DETAILS: updated spell to 1.8
+ * PRE_BUILD, patches/0001-change-exiv2-AutoPtr-to-unique_ptr.patch,
+ patches/0002-add-support-for-exiv-0.28.0-errors.patch:
+ fixed build against exiv2 0.28+
+
2022-05-28 Florian Franzmann <bwlf AT bandrate.org>
* DEPENDS: use MESON_DEPENDS

diff --git a/graphics/viewnior/PRE_BUILD b/graphics/viewnior/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/graphics/viewnior/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git
a/graphics/viewnior/patches/0001-change-exiv2-AutoPtr-to-unique_ptr.patch
b/graphics/viewnior/patches/0001-change-exiv2-AutoPtr-to-unique_ptr.patch
new file mode 100644
index 0000000..f9d6611
--- /dev/null
+++ b/graphics/viewnior/patches/0001-change-exiv2-AutoPtr-to-unique_ptr.patch
@@ -0,0 +1,90 @@
+From b6bb81a1b46e911d15bbf9a730972523de177705 Mon Sep 17 00:00:00 2001
+From: tastytea <tastytea AT tastytea.de>
+Date: Tue, 16 May 2023 10:54:40 +0200
+Subject: [PATCH 1/2] change exiv2 AutoPtr to unique_ptr
+
+exiv2-0.28.0 removed Exiv2::Image::AutoPtr and added
+Exiv2::Image::UniquePtr instead. since it's a typedef for
+std::unique_ptr<Image>, i'm using that directly instead of adding a
+condition on the exiv2 version.
+
+Upstream-Status: Submitted [https://github.com/hellosiyan/Viewnior/pull/130]
+---
+ src/uni-exiv2.cpp | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/src/uni-exiv2.cpp b/src/uni-exiv2.cpp
+index 0d14b9f..77064c2 100644
+--- a/src/uni-exiv2.cpp
++++ b/src/uni-exiv2.cpp
+@@ -22,12 +22,13 @@
+
+ #include <exiv2/exiv2.hpp>
+ #include <iostream>
++#include <memory>
+
+ #include "uni-exiv2.hpp"
+
+ #define ARRAY_SIZE(array) (sizeof array/sizeof(array[0]))
+
+-static Exiv2::Image::AutoPtr cached_image;
++static std::unique_ptr<Exiv2::Image> cached_image;
+
+ extern "C"
+ void
+@@ -35,8 +36,8 @@ 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);
+- if ( image.get() == 0 ) {
++ std::unique_ptr<Exiv2::Image> image =
Exiv2::ImageFactory::open(uri);
++ if (image == nullptr) {
+ return;
+ }
+
+@@ -91,14 +92,14 @@ uni_read_exiv2_to_cache(const char *uri)
+ {
+ Exiv2::LogMsg::setLevel(Exiv2::LogMsg::mute);
+
+- if ( cached_image.get() != NULL ) {
++ if (cached_image != nullptr) {
+ cached_image->clearMetadata();
+- cached_image.reset(NULL);
++ cached_image.reset(nullptr);
+ }
+
+ try {
+ cached_image = Exiv2::ImageFactory::open(uri);
+- if ( cached_image.get() == 0 ) {
++ if (cached_image == nullptr) {
+ return 1;
+ }
+
+@@ -116,13 +117,13 @@ uni_write_exiv2_from_cache(const char *uri)
+ {
+ Exiv2::LogMsg::setLevel(Exiv2::LogMsg::mute);
+
+- if ( cached_image.get() == NULL ) {
++ if (cached_image == nullptr) {
+ return 1;
+ }
+
+ try {
+- Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(uri);
+- if ( image.get() == 0 ) {
++ std::unique_ptr<Exiv2::Image> image =
Exiv2::ImageFactory::open(uri);
++ if (image == nullptr) {
+ return 2;
+ }
+
+@@ -130,7 +131,7 @@ uni_write_exiv2_from_cache(const char *uri)
+ image->writeMetadata();
+
+ cached_image->clearMetadata();
+- cached_image.reset(NULL);
++ cached_image.reset(nullptr);
+
+ return 0;
+ } catch (Exiv2::AnyError& e) {
+
diff --git
a/graphics/viewnior/patches/0002-add-support-for-exiv-0.28.0-errors.patch
b/graphics/viewnior/patches/0002-add-support-for-exiv-0.28.0-errors.patch
new file mode 100644
index 0000000..5f98c13
--- /dev/null
+++ b/graphics/viewnior/patches/0002-add-support-for-exiv-0.28.0-errors.patch
@@ -0,0 +1,59 @@
+From 47d0b98cb46526aa8aa035bebcabc14a11fa57ee Mon Sep 17 00:00:00 2001
+From: tastytea <tastytea AT tastytea.de>
+Date: Tue, 16 May 2023 11:17:00 +0200
+Subject: [PATCH 2/2] add support for exiv-0.28.0 errors
+
+exiv2-0.28.0 changed Exiv2::AnyError to Exiv2::Error.
+
+Upstream-Status: Submitted [https://github.com/hellosiyan/Viewnior/pull/130]
+---
+ src/uni-exiv2.cpp | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/src/uni-exiv2.cpp b/src/uni-exiv2.cpp
+index 77064c2..567a50f 100644
+--- a/src/uni-exiv2.cpp
++++ b/src/uni-exiv2.cpp
+@@ -28,6 +28,15 @@
+
+ #define ARRAY_SIZE(array) (sizeof array/sizeof(array[0]))
+
++#define EXIV_ERROR Exiv2::AnyError
++#ifdef EXIV2_VERSION
++ #ifdef EXIV2_TEST_VERSION
++ #if EXIV2_TEST_VERSION(0,28,0)
++ #define EXIV_ERROR Exiv2::Error
++ #endif
++ #endif
++#endif
++
+ static std::unique_ptr<Exiv2::Image> cached_image;
+
+ extern "C"
+@@ -81,7 +90,7 @@ uni_read_exiv2_map(const char *uri, void (*callback)(const
char*, const char*, v
+ }
+ }
+ }
+- } catch (Exiv2::AnyError& e) {
++ } catch (EXIV_ERROR& e) {
+ std::cerr << "Exiv2: '" << e << "'\n";
+ }
+ }
+@@ -104,7 +113,7 @@ uni_read_exiv2_to_cache(const char *uri)
+ }
+
+ cached_image->readMetadata();
+- } catch (Exiv2::AnyError& e) {
++ } catch (EXIV_ERROR& e) {
+ std::cerr << "Exiv2: '" << e << "'\n";
+ }
+
+@@ -134,7 +143,7 @@ uni_write_exiv2_from_cache(const char *uri)
+ cached_image.reset(nullptr);
+
+ return 0;
+- } catch (Exiv2::AnyError& e) {
++ } catch (EXIV_ERROR& e) {
+ std::cerr << "Exiv2: '" << e << "'\n";
+ }
+


  • [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (a892d4beeaf0f104ad491e8c2af031fe36fbb3aa), Ismael Luceno, 10/16/2025

Archive powered by MHonArc 2.6.24.

Top of Page