forked from pool/discover
Accepting request 883640 from KDE:Frameworks5
OBS-URL: https://build.opensuse.org/request/show/883640 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/discover?expand=0&rev=92
This commit is contained in:
commit
098f4de75a
240
0001-Only-wrap-flatpak.h-includes-in-extern-C-with-older-.patch
Normal file
240
0001-Only-wrap-flatpak.h-includes-in-extern-C-with-older-.patch
Normal file
@ -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;
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ddea3878522968a8e6d923ea7749cee77ad7ba1edfb3f37091bb12c933ec139c
|
||||
size 8425596
|
@ -1,11 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAABCgAdFiEELR1bBYg1d4fenuIl7JTRj38FmX4FAmBQocMACgkQ7JTRj38F
|
||||
mX7oogf/d81MO815S0QsuPPMacmG7KaIDnDMU39xwVwHpg7yKFVZWImgh++qrK24
|
||||
qdyWbwW4gQoojN/cRljXwDKnP7SWZLJHWwJXTCN81j4mXfX5OJQPLfLi+f5EK0vV
|
||||
J7DOO/gilhZNayvQ0ttmZATB04N+XtAe+Q/97ekg0F0bPhg2d/tdtFTS1/t+EO9j
|
||||
dYNVSAuE/0GoDVENwjAfj5vYWzoVB1nF+OMj2XeYA+zegRGQ7qHNQp3uZZMaXzzV
|
||||
E6p22z/KNC4C4Hm0WiRR93JeV00iWmgLnZVOjcHWq0FXKMT81rZCc0SQTWovBTWp
|
||||
wuIg5HgBN8GjQD79F/RYVl/NNE1EZg==
|
||||
=C2XE
|
||||
-----END PGP SIGNATURE-----
|
3
discover-5.21.4.tar.xz
Normal file
3
discover-5.21.4.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6064cffde175ca7aae3a709025aee94fbddecf505115cb7d506f0ae79dda70b8
|
||||
size 8425820
|
11
discover-5.21.4.tar.xz.sig
Normal file
11
discover-5.21.4.tar.xz.sig
Normal file
@ -0,0 +1,11 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAABCgAdFiEELR1bBYg1d4fenuIl7JTRj38FmX4FAmBsUTsACgkQ7JTRj38F
|
||||
mX6hQQf/RHFI7Iq6j1FSgQ5dxyHhPE2ZZvS8DAiZmYsqWKAzEx9f9wX6vmNC0AhK
|
||||
gZdT5rbGpqznj7ENeBAh+ejyuqPan+Hm0tMh59l0kTkxOC/mqXQf6MuZQHh93C9R
|
||||
QsmxqB7fuYRXouGAIxxO/L+nHXas5p2Z+S7/rQ5Ri90jyWgUgDSstHnleDlMpCi6
|
||||
IdA2vi7f6Z1HacD3+xUpwBSJaj4QMluWwJzMxOwu/d2UMoZ2I3vKgU9cwkBcCTXE
|
||||
Il7eYh9RZT137fwScV3m6DC21u7Az5O7SzDGr+BZrm8Kr17rJjG8wCd4rG0Z9j/Q
|
||||
hfw3I/ZSMA2eEb9q3rajxfwY2UUguQ==
|
||||
=C/Vz
|
||||
-----END PGP SIGNATURE-----
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 7 09:57:56 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Add patch to fix build with glib >= 2.68.0:
|
||||
* 0001-Only-wrap-flatpak.h-includes-in-extern-C-with-older-.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 6 14:00:36 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
- Update to 5.21.4
|
||||
* New bugfix release
|
||||
* For more details please see:
|
||||
* https://kde.org/announcements/plasma/5/5.21.4
|
||||
- No code changes since 5.21.3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 16 13:55:22 UTC 2021 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
%global have_fwupd (0%{?suse_version} > 1500 || 0%{?sle_version} >= 150300)
|
||||
|
||||
Name: discover
|
||||
Version: 5.21.3
|
||||
Version: 5.21.4
|
||||
Release: 0
|
||||
Summary: Software store for the KDE Plasma desktop
|
||||
License: GPL-2.0-only AND GPL-3.0-only AND GPL-3.0-or-later
|
||||
@ -34,6 +34,8 @@ Source2: plasma.keyring
|
||||
%endif
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch1: 0001-Warning-for-FlatHub.patch
|
||||
# PATCH-FIX-UPSTREAM
|
||||
Patch2: 0001-Only-wrap-flatpak.h-includes-in-extern-C-with-older-.patch
|
||||
BuildRequires: cmake >= 2.8.12
|
||||
BuildRequires: extra-cmake-modules
|
||||
BuildRequires: flatpak-devel
|
||||
|
Loading…
Reference in New Issue
Block a user