1 |
commit: 5ef49fb17ef357eb022915082470ccbe8537b199 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Aug 1 19:25:59 2021 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Aug 1 19:32:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ef49fb1 |
7 |
|
8 |
kde-frameworks/solid: Backport upstream port to qstrcmp() |
9 |
|
10 |
Upstream commit e5964d13f36901e7768ca38064125a5c5c28a939 |
11 |
|
12 |
See also: https://mail.kde.org/pipermail/distributions/2021-July/001036.html |
13 |
|
14 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
.../solid/files/solid-5.84.0-qstrcmp.patch | 35 ++++++++++++++ |
18 |
kde-frameworks/solid/solid-5.84.0-r1.ebuild | 53 ++++++++++++++++++++++ |
19 |
2 files changed, 88 insertions(+) |
20 |
|
21 |
diff --git a/kde-frameworks/solid/files/solid-5.84.0-qstrcmp.patch b/kde-frameworks/solid/files/solid-5.84.0-qstrcmp.patch |
22 |
new file mode 100644 |
23 |
index 00000000000..bdba981b8ac |
24 |
--- /dev/null |
25 |
+++ b/kde-frameworks/solid/files/solid-5.84.0-qstrcmp.patch |
26 |
@@ -0,0 +1,35 @@ |
27 |
+From e5964d13f36901e7768ca38064125a5c5c28a939 Mon Sep 17 00:00:00 2001 |
28 |
+From: Ahmad Samir <a.samirh78@×××××.com> |
29 |
+Date: Thu, 22 Jul 2021 01:26:37 +0200 |
30 |
+Subject: [PATCH] Use qstrcmp instead of strcmp |
31 |
+ |
32 |
+qstrcmp can handle NULL args. |
33 |
+ |
34 |
+This fixes an issue on Slackware, which doesn't use systemd and /var/run |
35 |
+is a bind mount of /run, and for some reason mnt_fs_get_root(fs) would return |
36 |
+NULL, which led to crashes in dolphin and plasmashell, see: |
37 |
+https://invent.kde.org/frameworks/solid/-/commit/ef0b0dfa00b1de70c6d8e6913bbfdb79e7d3d1b6#note_276583 |
38 |
+--- |
39 |
+ src/solid/devices/backends/udisks2/udisksstorageaccess.cpp | 6 +++--- |
40 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
41 |
+ |
42 |
+diff --git a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp |
43 |
+index 1566787..35d1aa8 100644 |
44 |
+--- a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp |
45 |
++++ b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp |
46 |
+@@ -92,9 +92,9 @@ static QString baseMountPoint(const QByteArray &dev) |
47 |
+ const QByteArray devicePath = dev.endsWith('\x00') ? dev.chopped(1) : dev; |
48 |
+ |
49 |
+ while (mnt_table_next_fs(table, itr, &fs) == 0) { |
50 |
+- if (mnt_fs_get_srcpath(fs) == devicePath |
51 |
+- // Base mount point will have "/" as root fs |
52 |
+- && (strcmp(mnt_fs_get_root(fs), "/") == 0)) { |
53 |
++ if (mnt_fs_get_srcpath(fs) == devicePath // |
54 |
++ && (qstrcmp(mnt_fs_get_root(fs), "/") == 0) // Base mount point will have "/" as root fs |
55 |
++ ) { |
56 |
+ mountPoint = QFile::decodeName(mnt_fs_get_target(fs)); |
57 |
+ break; |
58 |
+ } |
59 |
+-- |
60 |
+GitLab |
61 |
+ |
62 |
|
63 |
diff --git a/kde-frameworks/solid/solid-5.84.0-r1.ebuild b/kde-frameworks/solid/solid-5.84.0-r1.ebuild |
64 |
new file mode 100644 |
65 |
index 00000000000..dfd61f86b42 |
66 |
--- /dev/null |
67 |
+++ b/kde-frameworks/solid/solid-5.84.0-r1.ebuild |
68 |
@@ -0,0 +1,53 @@ |
69 |
+# Copyright 1999-2021 Gentoo Authors |
70 |
+# Distributed under the terms of the GNU General Public License v2 |
71 |
+ |
72 |
+EAPI=7 |
73 |
+ |
74 |
+QTMIN=5.15.2 |
75 |
+VIRTUALX_REQUIRED="test" |
76 |
+inherit ecm kde.org optfeature |
77 |
+ |
78 |
+DESCRIPTION="Provider for platform independent hardware discovery, abstraction and management" |
79 |
+ |
80 |
+LICENSE="LGPL-2.1+" |
81 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" |
82 |
+IUSE="ios nls" |
83 |
+ |
84 |
+RDEPEND=" |
85 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
86 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
87 |
+ >=dev-qt/qtgui-${QTMIN}:5 |
88 |
+ >=dev-qt/qtxml-${QTMIN}:5 |
89 |
+ sys-apps/util-linux |
90 |
+ sys-fs/udisks:2 |
91 |
+ virtual/libudev:= |
92 |
+ ios? ( |
93 |
+ app-pda/libimobiledevice:= |
94 |
+ app-pda/libplist:= |
95 |
+ ) |
96 |
+" |
97 |
+DEPEND="${RDEPEND} |
98 |
+ test? ( >=dev-qt/qtconcurrent-${QTMIN}:5 ) |
99 |
+" |
100 |
+BDEPEND=" |
101 |
+ sys-devel/bison |
102 |
+ sys-devel/flex |
103 |
+ nls? ( >=dev-qt/linguist-tools-${QTMIN}:5 ) |
104 |
+" |
105 |
+ |
106 |
+PATCHES=( "${FILESDIR}/${P}-qstrcmp.patch" ) |
107 |
+ |
108 |
+src_configure() { |
109 |
+ local mycmakeargs=( |
110 |
+ $(cmake_use_find_package ios IMobileDevice) |
111 |
+ $(cmake_use_find_package ios PList) |
112 |
+ ) |
113 |
+ ecm_src_configure |
114 |
+} |
115 |
+ |
116 |
+pkg_postinst() { |
117 |
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then |
118 |
+ optfeature "media player devices support" app-misc/media-player-info |
119 |
+ fi |
120 |
+ ecm_pkg_postinst |
121 |
+} |