[neon/extras/krename/Neon/release] debian: build with exiv2 0.28.0+
Pino Toscano
null at kde.org
Wed Sep 4 10:35:08 BST 2024
Git commit 16a85e45d9e22d54a1e790f079afbe9db06b1af4 by Pino Toscano.
Committed on 17/11/2023 at 11:35.
Pushed by jriddell into branch 'Neon/release'.
build with exiv2 0.28.0+
- backport upstream commit e7dd767a9a1068ee1fe1502c4d619b57d3b12add
- bump libexiv2-dev B-D
M +5 -0 debian/changelog
M +1 -1 debian/control
A +1 -0 debian/patches/series
A +89 -0 debian/patches/upstream_Fix-build-with-exiv2-0.28-raise-minimum-to-0.27.patch
https://invent.kde.org/neon/extras/krename/-/commit/16a85e45d9e22d54a1e790f079afbe9db06b1af4
diff --git a/debian/changelog b/debian/changelog
index f76ed16..2bc41ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,10 @@
krename (5.0.2-2) UNRELEASED; urgency=medium
+ [ Pino Toscano ]
+ * Backport upstream commit e7dd767a9a1068ee1fe1502c4d619b57d3b12add to build
+ with exiv2 0.28.0+; patch
+ upstream_Fix-build-with-exiv2-0.28-raise-minimum-to-0.27.patch
+ - bump the libexiv2-dev build dependency to 0.27.0 accordingly
-- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org> Fri, 17 Nov 2023 12:33:38 +0100
diff --git a/debian/control b/debian/control
index f34504a..96a3d26 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends: cmake (>= 3.7~),
debhelper-compat (= 13),
extra-cmake-modules,
gettext,
- libexiv2-dev,
+ libexiv2-dev (>= 0.27.0~),
libfreetype-dev,
libkf5completion-dev,
libkf5config-dev,
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7b1ddd0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+upstream_Fix-build-with-exiv2-0.28-raise-minimum-to-0.27.patch
diff --git a/debian/patches/upstream_Fix-build-with-exiv2-0.28-raise-minimum-to-0.27.patch b/debian/patches/upstream_Fix-build-with-exiv2-0.28-raise-minimum-to-0.27.patch
new file mode 100644
index 0000000..92b9bb3
--- /dev/null
+++ b/debian/patches/upstream_Fix-build-with-exiv2-0.28-raise-minimum-to-0.27.patch
@@ -0,0 +1,89 @@
+From e7dd767a9a1068ee1fe1502c4d619b57d3b12add Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm at gentoo.org>
+Date: Fri, 26 May 2023 23:23:10 +0200
+Subject: [PATCH] Fix build with >=exiv2-0.28, raise minimum to 0.27
+
+- enables use of EXIV2_TEST_VERSION macro
+- exiv2 headers cleanup
+
+Signed-off-by: Andreas Sturmlechner <asturm at gentoo.org>
+---
+ CMakeLists.txt | 6 +-----
+ config-krename.h.cmake | 3 ---
+ src/exiv2plugin.cpp | 17 +++++------------
+ 3 files changed, 6 insertions(+), 20 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0bda8ac..72e7297 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -56,13 +56,9 @@ set_package_properties(Taglib PROPERTIES
+ TYPE OPTIONAL)
+
+ # Find exiv2
+-find_package(LibExiv2 0.13) # AccessMode was added in 0.13
++find_package(LibExiv2 0.27) # EXIV2_TEST_VERSION was added in 0.27
+ set_package_properties(LibExiv2 PROPERTIES TYPE OPTIONAL)
+
+-if (LibExiv2_VERSION VERSION_GREATER_EQUAL "0.27")
+- set(HAVE_LIBEXIV2_0_27 TRUE)
+-endif()
+-
+ # Find podofo
+ find_package(PoDoFo)
+ set_package_properties(PoDoFo PROPERTIES
+diff --git a/config-krename.h.cmake b/config-krename.h.cmake
+index 76c3d30..862e40b 100644
+--- a/config-krename.h.cmake
++++ b/config-krename.h.cmake
+@@ -6,9 +6,6 @@
+ /* have Exiv2 */
+ #cmakedefine01 HAVE_EXIV2
+
+-/* Defined if we have libexiv2 >= 0.27 */
+-#cmakedefine HAVE_LIBEXIV2_0_27
+-
+ /* have PoDoFo */
+ #cmakedefine01 HAVE_PODOFO
+
+diff --git a/src/exiv2plugin.cpp b/src/exiv2plugin.cpp
+index 5694d8c..25e8869 100644
+--- a/src/exiv2plugin.cpp
++++ b/src/exiv2plugin.cpp
+@@ -3,20 +3,9 @@
+
+ #include "exiv2plugin.h"
+
+-#include "../config-krename.h"
+-
+ #include <KLocalizedString>
+
+-#include <exiv2/error.hpp>
+-#include <exiv2/exif.hpp>
+-#include <exiv2/image.hpp>
+-#include <exiv2/iptc.hpp>
+-#ifdef HAVE_LIBEXIV2_0_27
+- #include <exiv2/xmp_exiv2.hpp>
+-#else
+- #include <exiv2/xmp.hpp>
+-#endif
+-#include <exiv2/tags.hpp>
++#include <exiv2/exiv2.hpp>
+
+ #include "batchrenamer.h"
+ #include "tokenhelpdialog.h"
+@@ -381,7 +370,11 @@ QString Exiv2Plugin::processFile(BatchRenamer *b, int index, const QString &file
+ std::string strFilename(asc.constData(), asc.length());
+
+ try {
++#if EXIV2_TEST_VERSION(0,28,0)
++ Image::UniquePtr image = Exiv2::ImageFactory::open(strFilename);
++#else
+ Image::AutoPtr image = Exiv2::ImageFactory::open(strFilename);
++#endif
+ if (image.get() != nullptr && image->good()) {
+ image->readMetadata();
+
+--
+2.42.0
+
More information about the Neon-commits
mailing list