commit:     3dd93a7a38060e8ad8af83b4037f333c60c6ebfb
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 21 04:16:37 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 21 04:16:37 2022 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=3dd93a7a

kde-apps/kleopatra: backport build fix w/ gpgme 1.18.0

Closes: https://bugs.gentoo.org/865903
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/kleopatra-22.08.0-fix-gpgme-1.18.0.patch | 62 ++++++++++++++++++++++
 kde-apps/kleopatra/kleopatra-22.08.0.ebuild        |  4 ++
 2 files changed, 66 insertions(+)

diff --git a/kde-apps/kleopatra/files/kleopatra-22.08.0-fix-gpgme-1.18.0.patch 
b/kde-apps/kleopatra/files/kleopatra-22.08.0-fix-gpgme-1.18.0.patch
new file mode 100644
index 0000000000..bc9dadbcd3
--- /dev/null
+++ b/kde-apps/kleopatra/files/kleopatra-22.08.0-fix-gpgme-1.18.0.patch
@@ -0,0 +1,62 @@
+https://invent.kde.org/pim/kleopatra/-/commit/a3684049dd4f0d2d47dcc6605ff31ce753254ef9
+https://bugs.gentoo.org/865903
+https://bugs.kde.org/show_bug.cgi?id=458044
+
+From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <d...@ingo-kloecker.de>
+Date: Fri, 19 Aug 2022 13:43:41 +0200
+Subject: [PATCH] Use ReceiveKeysJob for refreshing OpenPGP keys
+
+This refreshes the OpenPGP key from the configured key server.
+
+GnuPG-bug-id: 5903
+
+CHANGELOG: Fix building against QGpgME 1.18.0
+BUG: 458044
+FIXED-IN: 22.08.1
+
+(cherry picked from commit 87d8b00d4b2286489d5fadc9cfa07f1d721cdfe3)
+--- a/src/commands/refreshcertificatecommand.cpp
++++ b/src/commands/refreshcertificatecommand.cpp
+@@ -19,7 +19,7 @@
+ #include <QGpgME/Protocol>
+ #ifdef QGPGME_SUPPORTS_KEY_REFRESH
+ #include <QGpgME/RefreshKeysJob>
+-#include <QGpgME/RefreshOpenPGPKeysJob>
++#include <QGpgME/ReceiveKeysJob>
+ #endif
+ 
+ #include <gpgme++/importresult.h>
+@@ -44,7 +44,7 @@ public:
+     void cancel();
+ 
+ #ifdef QGPGME_SUPPORTS_KEY_REFRESH
+-    std::unique_ptr<QGpgME::RefreshOpenPGPKeysJob> startOpenPGPJob();
++    std::unique_ptr<QGpgME::ReceiveKeysJob> startOpenPGPJob();
+     std::unique_ptr<QGpgME::RefreshKeysJob> startSMIMEJob();
+ #endif
+     void onOpenPGPJobResult(const ImportResult &result);
+@@ -136,19 +136,19 @@ void RefreshCertificateCommand::Private::cancel()
+ }
+ 
+ #ifdef QGPGME_SUPPORTS_KEY_REFRESH
+-std::unique_ptr<QGpgME::RefreshOpenPGPKeysJob> 
RefreshCertificateCommand::Private::startOpenPGPJob()
++std::unique_ptr<QGpgME::ReceiveKeysJob> 
RefreshCertificateCommand::Private::startOpenPGPJob()
+ {
+-    std::unique_ptr<QGpgME::RefreshOpenPGPKeysJob> 
refreshJob{QGpgME::openpgp()->refreshOpenPGPKeysJob()};
++    std::unique_ptr<QGpgME::ReceiveKeysJob> 
refreshJob{QGpgME::openpgp()->receiveKeysJob()};
+     Q_ASSERT(refreshJob);
+ 
+-    connect(refreshJob.get(), &QGpgME::RefreshOpenPGPKeysJob::result,
++    connect(refreshJob.get(), &QGpgME::ReceiveKeysJob::result,
+             q, [this](const GpgME::ImportResult &result) {
+                 onOpenPGPJobResult(result);
+             });
+     connect(refreshJob.get(), &QGpgME::Job::progress,
+             q, &Command::progress);
+ 
+-    const GpgME::Error err = refreshJob->start({key});
++    const GpgME::Error err = 
refreshJob->start({QString::fromLatin1(key.primaryFingerprint())});
+     if (err) {
+         showError(err);
+         return {};
+GitLab

diff --git a/kde-apps/kleopatra/kleopatra-22.08.0.ebuild 
b/kde-apps/kleopatra/kleopatra-22.08.0.ebuild
index 9a811c96d9..6846e3672e 100644
--- a/kde-apps/kleopatra/kleopatra-22.08.0.ebuild
+++ b/kde-apps/kleopatra/kleopatra-22.08.0.ebuild
@@ -57,6 +57,10 @@ RDEPEND="${DEPEND}
        app-crypt/paperkey
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-fix-gpgme-1.18.0.patch
+)
+
 src_configure() {
        local mycmakeargs=(
                $(cmake_use_find_package pim KF5IdentityManagement)

Reply via email to