From ca0147880351d60cd538b9227899c2c10739e040de9a7f40a641e05139d7a192 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Thu, 9 Feb 2023 08:10:42 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kaidan?expand=0&rev=18 --- 0001-Support-ZXing-2.0.patch | 31 +++++++++++++++++++++++++++++++ kaidan.changes | 6 ++++++ kaidan.spec | 5 +++-- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 0001-Support-ZXing-2.0.patch diff --git a/0001-Support-ZXing-2.0.patch b/0001-Support-ZXing-2.0.patch new file mode 100644 index 0000000..b4e20db --- /dev/null +++ b/0001-Support-ZXing-2.0.patch @@ -0,0 +1,31 @@ +From c92fe3125c08e61b454b41f151b435a6a9e6da4b Mon Sep 17 00:00:00 2001 +From: Volker Krause +Date: Wed, 4 Jan 2023 17:28:31 +0100 +Subject: [PATCH] Support ZXing 2.0 + +An alternative approach going forward might be replacing the entire direct +ZXing use and video stream processing by KF::Prison. Avoids duplicated +maintenance, but adds a new dependency. +--- + src/QrCodeDecoder.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/QrCodeDecoder.cpp b/src/QrCodeDecoder.cpp +index a7b0cf5..86d1e7b 100644 +--- a/src/QrCodeDecoder.cpp ++++ b/src/QrCodeDecoder.cpp +@@ -90,7 +90,11 @@ void QrCodeDecoder::decodeImage(const QImage &image) + // If a QR code could be found and decoded, emit a signal with the decoded string. + // Otherwise, emit a signal for failed decoding. + if (result.isValid()) ++#if ZXING_VERSION < QT_VERSION_CHECK(2, 0, 0) + emit decodingSucceeded(QString::fromStdString(TextUtfEncoding::ToUtf8(result.text()))); ++#else ++ emit decodingSucceeded(QString::fromStdString(result.text())); ++#endif + else + emit decodingFailed(); + } +-- +2.39.1 + diff --git a/kaidan.changes b/kaidan.changes index 873dbb4..6575bc1 100644 --- a/kaidan.changes +++ b/kaidan.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 9 08:09:58 UTC 2023 - Christophe Marin + +- Add patch to fix build with ZXing >= 2.0: + * 0001-Support-ZXing-2.0.patch + ------------------------------------------------------------------- Fri Oct 1 16:00:38 UTC 2021 - Enrico Belleri diff --git a/kaidan.spec b/kaidan.spec index cd9a95f..e47c434 100644 --- a/kaidan.spec +++ b/kaidan.spec @@ -1,7 +1,7 @@ # # spec file for package kaidan # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,11 +21,12 @@ Version: 0.8.0 Release: 0 Summary: A XMPP client based on KDE Framework License: GPL-3.0-or-later AND SUSE-GPL-3.0+-with-openssl-exception AND MIT AND AML AND CC-BY-SA-4.0 -Group: Productivity/Networking/Instant Messenger URL: https://www.kaidan.im Source0: https://download.kde.org/unstable/%{name}/%{version}/%{name}-%{version}.tar.xz Source1: https://download.kde.org/unstable/%{name}/%{version}/%{name}-%{version}.tar.xz.sig Source2: kaidan.keyring +# PATCH-FIX-UPSTREAM +Patch0: 0001-Support-ZXing-2.0.patch BuildRequires: cmake >= 3.3 BuildRequires: extra-cmake-modules >= 5.40.0 BuildRequires: update-desktop-files