summaryrefslogtreecommitdiff
path: root/kde-plasma/discover
diff options
context:
space:
mode:
Diffstat (limited to 'kde-plasma/discover')
-rw-r--r--kde-plasma/discover/Manifest3
-rw-r--r--kde-plasma/discover/discover-5.21.4.ebuild5
-rw-r--r--kde-plasma/discover/files/discover-5.21.4-glib-2.68.patch240
3 files changed, 246 insertions, 2 deletions
diff --git a/kde-plasma/discover/Manifest b/kde-plasma/discover/Manifest
index cbe8e25c9ec5..4a4e823f2181 100644
--- a/kde-plasma/discover/Manifest
+++ b/kde-plasma/discover/Manifest
@@ -1,7 +1,8 @@
AUX discover-5.20.5-CVE-2021-28117.patch 1434 BLAKE2B c31d0032cdfe3f8d96ad5e7f736c92c2dfcd6cc8e2b8c9b9e90a4a3d41159d961b80427d14ff6a22caa06e6dbdc17535be6243180d439e04879bbd957309859c SHA512 1059cce1be5f8f24a4345488c60decb2e4782fdc11f02ef625111164b6f8b32343528282ec4d03a015e36aa076cd6f9fcfa24e9b7d5c02fe25295cf03c7511a3
+AUX discover-5.21.4-glib-2.68.patch 8595 BLAKE2B 57f85d519becf704b33e4e32ca44d68e4604e7133484a597a499a65f55d4ec1d98ca8f1ab46c1d34876902cc7c79fc866704015c9933933910a321113c14adbe SHA512 27dbfb51b54842354f93d9fd1eaa2523998363f6c6e4de8ac89e47a9216e8c7ebb59de559d5123f8dcccbbe08da8dec7614c4ff54538a793988489cc757b47a3
AUX discover-5.21.4-missing-link.patch 2141 BLAKE2B 23b81f9f4e0daa05183ed3a31e98d8c1f3ac3ecfdb08511c3fb14bbf726a14086c5c834d3c7b7cc3f575500eb86f4cc85e141c48361597329a62c47c45807956 SHA512 f8201dad0e00e1a36338ab9dc956cd1baa7268ce4dd23c3d2b5a7ba9c9922da216697115396b7c32c3656faa60a107da62343af3b7a250d64e6d51c43768a9ae
DIST discover-5.20.5.tar.xz 10305280 BLAKE2B fe47718014d420947c1509577e28ec642ccdc975d2b9fa6d2000bfd190880aff4fa1f2ca4597a77980995209847647cc5fb5963bb1c0a88a8010fc1b198c49b7 SHA512 e33f1027a09c8c7733c0b9da81ee82f0c90237c736435ad93cfdb127d79e0ddee0d4d8214774032c81a4078613d278688f0fddbf287aa03a5192cfcdb1eeffa7
DIST discover-5.21.4.tar.xz 8425820 BLAKE2B ebaa1742e2f4571530aa47f1c82f56f53992fb1ee1b96467cae2a71c5ec43e2ad344c0157d8ea664e8d9d3727a2b61407a904e28935dbe47f70a72514f854645 SHA512 8389cc2328935fc6556e47d4221ee2c2a7122dd4d9bb78cb61073832304438be7598f122d6838964ac5b01c9f33d8bd94809087c3b64381a2c83099a641a346e
EBUILD discover-5.20.5-r1.ebuild 2156 BLAKE2B c42d272b725c7aa53583682394dc7be444145cde58f67c25ec1cf7857c5d402609d53fd13a53faab01b84e119007db5791859a2131927449c24a33236ec8a46f SHA512 59c70091143747bb0fc150e16c8aa46a5a0a464761abeccadda0e315d977d51bf99e4fd196084cf51a854d95ae943fe9cce2ae02ed04997c9a887909d0e26e5b
-EBUILD discover-5.21.4.ebuild 2284 BLAKE2B c08b37b3fa5b49f6bc57362d4f24e39f354249fd91d7fde2bcf34a7c87bd16a0de16b2c7e7075f93af591670dc9cbe6188138a4120d7fedc4b02557a3e648675 SHA512 b55aa627427be6deb6f2ad334df49cd4f4c7efeb7fc3454c8800c69e98956e55905b7b087344354fc09dde2b7d7352d2e42eee6eec1ad4a4ce21608abc47204b
+EBUILD discover-5.21.4.ebuild 2334 BLAKE2B db9278fee6635fa2ea6e5be06e2783fb19d3075a9004db279e79c069500651192637d4788e20a18fb64446378a50971928f4fd8e3c91a4990dd0410f06ee1743 SHA512 e51f79fc731bd66576e9f054c6e3841709d211e3199923f5dc3acd6a58a01e355e7e5c396f5c79ba48205f90fbf90d6fc060e95ba7e4fd91e66bfffb7f71e01f
MISC metadata.xml 468 BLAKE2B cd98862045ebe78aecaf3dc74526afd4ff2bd377816993e2a0aa4d61cd4f14f7b3e5779d5892244233cbef03b9aba6404aa9fe9aa161f2fc868e369df6ea626f SHA512 a8807c50a9ab4b8e9fe2876fe159a3880bbaeb36a84ad7e7fed55cf6367b1c17ed7e0af135a579685bd4a5d8b550f38b240ac31c00e463befc22de35fd67b2ff
diff --git a/kde-plasma/discover/discover-5.21.4.ebuild b/kde-plasma/discover/discover-5.21.4.ebuild
index 2c50bd9597f0..e32fb61e4cdb 100644
--- a/kde-plasma/discover/discover-5.21.4.ebuild
+++ b/kde-plasma/discover/discover-5.21.4.ebuild
@@ -56,7 +56,10 @@ RDEPEND="${DEPEND}
>=kde-frameworks/kirigami-${KFMIN}:5
"
-PATCHES=( "${FILESDIR}/${P}-missing-link.patch" ) # bug 785457
+PATCHES=(
+ "${FILESDIR}/${P}-missing-link.patch" # bug 785457
+ "${FILESDIR}/${P}-glib-2.68.patch" # bug 787155
+)
src_prepare() {
ecm_src_prepare
diff --git a/kde-plasma/discover/files/discover-5.21.4-glib-2.68.patch b/kde-plasma/discover/files/discover-5.21.4-glib-2.68.patch
new file mode 100644
index 000000000000..903b4b8ff30c
--- /dev/null
+++ b/kde-plasma/discover/files/discover-5.21.4-glib-2.68.patch
@@ -0,0 +1,240 @@
+From 12f83062b01d5ba946e6f98503b72d4e58721aa4 Mon Sep 17 00:00:00 2001
+From: Aleix Pol Gonzalez <aleixpol@kde.org>
+Date: Tue, 6 Apr 2021 23:54:52 +0000
+Subject: [PATCH] Only wrap flatpak.h includes in extern "C" with older
+ versions
+
+Seems to be the only way to be compatible backwards and forwards.
+---
+ CMakeLists.txt | 1 -
+ .../backends/FlatpakBackend/CMakeLists.txt | 6 ++++++
+ .../backends/FlatpakBackend/FlatpakBackend.h | 4 +---
+ .../FlatpakBackend/FlatpakFetchDataJob.h | 4 +---
+ .../FlatpakBackend/FlatpakJobTransaction.cpp | 3 ---
+ .../FlatpakBackend/FlatpakJobTransaction.h | 4 +---
+ .../backends/FlatpakBackend/FlatpakNotifier.h | 4 +---
+ .../backends/FlatpakBackend/FlatpakResource.h | 4 +---
+ .../FlatpakBackend/FlatpakSourcesBackend.h | 4 +---
+ .../FlatpakBackend/FlatpakTransactionThread.h | 4 +---
+ .../backends/FlatpakBackend/flatpak-helper.h | 18 ++++++++++++++++++
+ .../backends/FwupdBackend/CMakeLists.txt | 3 +++
+ .../backends/FwupdBackend/FwupdBackend.h | 5 +++++
+ 13 files changed, 39 insertions(+), 25 deletions(-)
+ create mode 100644 libdiscover/backends/FlatpakBackend/flatpak-helper.h
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 889ded6c..a531d4de 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -37,7 +37,6 @@ pkg_check_modules(Fwupd IMPORTED_TARGET fwupd>=1.5.0)
+ pkg_check_modules(Markdown IMPORTED_TARGET libmarkdown)
+ find_package(KUserFeedback)
+
+-
+ if(NOT CMAKE_VERSION VERSION_LESS "3.10.0")
+ # CMake 3.9+ warns about automoc on files without Q_OBJECT, and doesn't know about other macros.
+ # 3.10+ lets us provide more macro names that require automoc.
+diff --git a/libdiscover/backends/FlatpakBackend/CMakeLists.txt b/libdiscover/backends/FlatpakBackend/CMakeLists.txt
+index 49ac1085..65ba622a 100644
+--- a/libdiscover/backends/FlatpakBackend/CMakeLists.txt
++++ b/libdiscover/backends/FlatpakBackend/CMakeLists.txt
+@@ -23,8 +23,14 @@ add_library(FlatpakNotifier MODULE FlatpakNotifier.cpp)
+ target_link_libraries(FlatpakNotifier Discover::Notifiers Qt5::Concurrent PkgConfig::Flatpak)
+ set_target_properties(FlatpakNotifier PROPERTIES INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR}/plasma-discover)
+
++if (Flatpak_VERSION VERSION_LESS 1.10.2)
++ target_compile_definitions(flatpak-backend PRIVATE -DFLATPAK_EXTERNC_REQUIRED)
++ target_compile_definitions(FlatpakNotifier PRIVATE -DFLATPAK_EXTERNC_REQUIRED)
++endif()
++
+ install(TARGETS FlatpakNotifier DESTINATION ${PLUGIN_INSTALL_DIR}/discover-notifier)
+ install(PROGRAMS org.kde.discover-flatpak.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} )
++
+ install(FILES org.kde.discover.flatpak.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
+
+ ecm_install_icons(
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakBackend.h b/libdiscover/backends/FlatpakBackend/FlatpakBackend.h
+index 3b71344f..f0234cc7 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakBackend.h
++++ b/libdiscover/backends/FlatpakBackend/FlatpakBackend.h
+@@ -18,9 +18,7 @@
+
+ #include <AppStreamQt/component.h>
+
+-extern "C" {
+-#include <flatpak.h>
+-}
++#include "flatpak-helper.h"
+
+ class FlatpakSourcesBackend;
+ class StandardBackendUpdater;
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakFetchDataJob.h b/libdiscover/backends/FlatpakBackend/FlatpakFetchDataJob.h
+index b9aaf80e..d63fd1bc 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakFetchDataJob.h
++++ b/libdiscover/backends/FlatpakBackend/FlatpakFetchDataJob.h
+@@ -8,10 +8,8 @@
+ #define FLATPAKFETCHDATAJOB_H
+
+ #include <QByteArray>
+-extern "C" {
+-#include <flatpak.h>
++#include "flatpak-helper.h"
+ #include <glib.h>
+-}
+
+ class FlatpakResource;
+
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp b/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
+index 9499c566..37adb046 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
++++ b/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.cpp
+@@ -13,9 +13,6 @@
+ #include <QDebug>
+ #include <QTimer>
+
+-extern "C" {
+-}
+-
+ FlatpakJobTransaction::FlatpakJobTransaction(FlatpakResource *app, Role role, bool delayStart)
+ : Transaction(app->backend(), app, role, {})
+ , m_app(app)
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h b/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h
+index ea2aafaa..0e4423ef 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h
++++ b/libdiscover/backends/FlatpakBackend/FlatpakJobTransaction.h
+@@ -10,12 +10,10 @@
+
+ #include <Transaction/Transaction.h>
+ #include <QPointer>
++#include "flatpak-helper.h"
+
+-extern "C" {
+-#include <flatpak.h>
+ #include <gio/gio.h>
+ #include <glib.h>
+-}
+
+ class FlatpakResource;
+ class FlatpakTransactionThread;
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakNotifier.h b/libdiscover/backends/FlatpakBackend/FlatpakNotifier.h
+index fa358802..a0deb83a 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakNotifier.h
++++ b/libdiscover/backends/FlatpakBackend/FlatpakNotifier.h
+@@ -10,9 +10,7 @@
+ #include <BackendNotifierModule.h>
+ #include <functional>
+
+-extern "C" {
+-#include <flatpak.h>
+-}
++#include "flatpak-helper.h"
+
+ class FlatpakNotifier : public BackendNotifierModule
+ {
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakResource.h b/libdiscover/backends/FlatpakBackend/FlatpakResource.h
+index 880b494b..253062db 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakResource.h
++++ b/libdiscover/backends/FlatpakBackend/FlatpakResource.h
+@@ -11,9 +11,7 @@
+
+ #include <resources/AbstractResource.h>
+
+-extern "C" {
+-#include <flatpak.h>
+-}
++#include "flatpak-helper.h"
+
+ #include <AppStreamQt/component.h>
+
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.h b/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.h
+index b2a6c7c2..df356337 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.h
++++ b/libdiscover/backends/FlatpakBackend/FlatpakSourcesBackend.h
+@@ -13,9 +13,7 @@
+ #include <QStack>
+ #include <functional>
+
+-extern "C" {
+-#include <flatpak.h>
+-}
++#include "flatpak-helper.h"
+
+ class FlatpakResource;
+ class FlatpakSourcesBackend : public AbstractSourcesBackend
+diff --git a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
+index b8eef827..24718f9a 100644
+--- a/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
++++ b/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h
+@@ -7,11 +7,9 @@
+ #ifndef FLATPAKTRANSACTIONTHREAD_H
+ #define FLATPAKTRANSACTIONTHREAD_H
+
+-extern "C" {
+-#include <flatpak.h>
++#include "flatpak-helper.h"
+ #include <gio/gio.h>
+ #include <glib.h>
+-}
+
+ #include <Transaction/Transaction.h>
+ #include <QThread>
+diff --git a/libdiscover/backends/FlatpakBackend/flatpak-helper.h b/libdiscover/backends/FlatpakBackend/flatpak-helper.h
+new file mode 100644
+index 00000000..f42eee46
+--- /dev/null
++++ b/libdiscover/backends/FlatpakBackend/flatpak-helper.h
+@@ -0,0 +1,18 @@
++/*
++ * SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez <aleixpol@kde.org>
++ *
++ * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
++ */
++
++#ifndef FLATPAK_HELPER
++#define FLATPAK_HELPER
++
++#ifdef FLATPAK_EXTERNC_REQUIRED
++extern "C" {
++#endif
++#include <flatpak.h>
++#ifdef FLATPAK_EXTERNC_REQUIRED
++}
++#endif
++
++#endif
+diff --git a/libdiscover/backends/FwupdBackend/CMakeLists.txt b/libdiscover/backends/FwupdBackend/CMakeLists.txt
+index a018f175..59c36a8d 100644
+--- a/libdiscover/backends/FwupdBackend/CMakeLists.txt
++++ b/libdiscover/backends/FwupdBackend/CMakeLists.txt
+@@ -9,6 +9,9 @@ set(fwupd-backend_SRCS
+
+ add_library(fwupd-backend MODULE ${fwupd-backend_SRCS})
+ target_link_libraries(fwupd-backend Qt5::Core KF5::CoreAddons KF5::ConfigCore Discover::Common PkgConfig::Fwupd)
++if (Fwupd_VERSION VERSION_LESS 1.5.8)
++ target_compile_definitions(fwupd-backend PRIVATE -DFWUPD_EXTERNC_REQUIRED)
++endif()
+
+ install(TARGETS fwupd-backend DESTINATION ${PLUGIN_INSTALL_DIR}/discover)
+
+diff --git a/libdiscover/backends/FwupdBackend/FwupdBackend.h b/libdiscover/backends/FwupdBackend/FwupdBackend.h
+index c886384e..7b1ff180 100644
+--- a/libdiscover/backends/FwupdBackend/FwupdBackend.h
++++ b/libdiscover/backends/FwupdBackend/FwupdBackend.h
+@@ -25,9 +25,14 @@
+ #include <QCryptographicHash>
+ #include <QMap>
+
++#ifdef FWUPD_EXTERNC_REQUIRED
+ extern "C" {
++#endif
++
+ #include <fwupd.h>
++#ifdef FWUPD_EXTERNC_REQUIRED
+ }
++#endif
+ #include <glib-2.0/glib-object.h>
+
+ class QAction;
+--
+GitLab
+