From 911d7dd5e585d1599b21fb6e09b4eccb182b51bc Mon Sep 17 00:00:00 2001
From: Bart Ribbers <bribbers@disroot.org>
Date: Wed, 24 Jun 2020 11:57:19 +0200
Subject: [PATCH] community/bluedevil: backport fix for KDE bug 422684

---
 community/bluedevil/APKBUILD         |  9 ++--
 community/bluedevil/fix-422684.patch | 63 ++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 3 deletions(-)
 create mode 100644 community/bluedevil/fix-422684.patch

diff --git a/community/bluedevil/APKBUILD b/community/bluedevil/APKBUILD
index e90107ba069e..f7292b699b0d 100644
--- a/community/bluedevil/APKBUILD
+++ b/community/bluedevil/APKBUILD
@@ -2,14 +2,16 @@
 # Maintainer: Bart Ribbers <bribbers@disroot.org>
 pkgname=bluedevil
 pkgver=5.19.2
-pkgrel=0
+pkgrel=1
 pkgdesc="Integrate the Bluetooth technology within KDE workspace and applications"
 arch="all !armhf" # armhf blocked by qt5-qtdeclarative
 url="https://www.kde.org/workspaces/plasmadesktop/"
 license="GPL-2.0-or-later AND LGPL-2.0-or-later AND (LGPL-2.1-only OR LGPL-3.0-only)"
 depends="kded bluez"
 makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtdeclarative-dev kcoreaddons-dev kwidgetsaddons-dev kdbusaddons-dev knotifications-dev kwindowsystem-dev kiconthemes-dev plasma-framework-dev ki18n-dev kio-dev bluez-qt-dev kded-dev kded shared-mime-info"
-source="https://download.kde.org/stable/plasma/$pkgver/bluedevil-$pkgver.tar.xz"
+source="https://download.kde.org/stable/plasma/$pkgver/bluedevil-$pkgver.tar.xz
+	fix-422684.patch
+	"
 subpackages="$pkgname-lang"
 
 build() {
@@ -29,4 +31,5 @@ package() {
 	DESTDIR="$pkgdir" cmake --build build --target install
 }
 
-sha512sums="827dc9ecc04ee8d385ff2c3eee2e8dce47551cd73ac82c2e8a050c596df2ea2657dcff3632f4bc2c7a1d993d61544ec3e42c307dd9f2bd06032cf265b51ed868  bluedevil-5.19.2.tar.xz"
+sha512sums="827dc9ecc04ee8d385ff2c3eee2e8dce47551cd73ac82c2e8a050c596df2ea2657dcff3632f4bc2c7a1d993d61544ec3e42c307dd9f2bd06032cf265b51ed868  bluedevil-5.19.2.tar.xz
+7b56d2868225def41002b402b315dd29917a192647dec6db64bc2519530823fbc08a129dad24370ba948c986c1fc67ac0f7fc1b441ddab0f6d952adadcfb8a6c  fix-422684.patch"
diff --git a/community/bluedevil/fix-422684.patch b/community/bluedevil/fix-422684.patch
new file mode 100644
index 000000000000..9f0bae598409
--- /dev/null
+++ b/community/bluedevil/fix-422684.patch
@@ -0,0 +1,63 @@
+Requested upstream to backport to fix KDE bug 422684
+https://bugs.kde.org/show_bug.cgi?id=422684
+
+This has been merged upstream and will not be necessary in the next full
+Plasma release
+
+From 161c1b92bced7996e92026ff9ae503593f6590f6 Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Sun, 14 Jun 2020 09:10:38 -0600
+Subject: [PATCH] Port applet to use PlasmaExtras.PlaceholderMessage
+
+The Kirigami version uses QQC2 elements which don't respect the plasma
+theme and color scheme, leading to thing slooking out of place
+especially when using a dark color theme or scheme.
+
+Depends on https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/13
+---
+ CMakeLists.txt                                        | 6 ------
+ src/applet/package/contents/ui/FullRepresentation.qml | 4 +---
+ 2 files changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d9067851..5ddce978 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -33,12 +33,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+ find_package(KDED ${KF5_MIN_VERSION} REQUIRED)
+ find_package(SharedMimeInfo REQUIRED)
+ 
+-find_package(KF5Kirigami2 ${KF5_MIN_VERSION} CONFIG)
+-set_package_properties(KF5Kirigami2 PROPERTIES
+-    DESCRIPTION "A QtQuick based components set"
+-    TYPE RUNTIME
+-)
+-
+ include(KDEInstallDirs)
+ include(KDECMakeSettings)
+ include(KDECompilerSettings NO_POLICY_SCOPE)
+diff --git a/src/applet/package/contents/ui/FullRepresentation.qml b/src/applet/package/contents/ui/FullRepresentation.qml
+index 5bd32f15..e77bf295 100644
+--- a/src/applet/package/contents/ui/FullRepresentation.qml
++++ b/src/applet/package/contents/ui/FullRepresentation.qml
+@@ -27,8 +27,6 @@ import org.kde.plasma.components 2.0 as PlasmaComponents
+ import org.kde.plasma.components 3.0 as PlasmaComponents3
+ import org.kde.plasma.private.bluetooth 1.0 as PlasmaBt
+ 
+-import org.kde.kirigami 2.12 as Kirigami
+-
+ PlasmaComponents3.Page {
+ 
+     Action {
+@@ -99,7 +97,7 @@ PlasmaComponents3.Page {
+         // Not inside the ListView because we want the listview to be hidden
+         // when Bluetooth is disabled, yet still show an "Enable Bluetooth"
+         // message
+-        Kirigami.PlaceholderMessage {
++        PlasmaExtras.PlaceholderMessage {
+             anchors.centerIn: parent
+             anchors.left: parent.left
+             anchors.right: parent.right
+-- 
+GitLab
+
-- 
GitLab