Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kinfocenter/files/, kde-plasma/kinfocenter/
Date: Wed, 16 Jan 2019 08:17:25
Message-Id: 1547626616.b5c1bb46080526515247b5184547a9360cefd6bd.asturm@gentoo
1 commit: b5c1bb46080526515247b5184547a9360cefd6bd
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 13 22:18:23 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 16 08:16:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5c1bb46
7
8 kde-plasma/kinfocenter: Fix USB device IDs w/ correct path to hwids
9
10 See also: https://bugs.kde.org/show_bug.cgi?id=402949
11 Thanks-to: Alexandre Ferreira <alexandref75 <AT> gmail.com>
12 Closes: https://bugs.gentoo.org/675350
13 Package-Manager: Portage-2.3.55, Repoman-2.3.12
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 .../files/kinfocenter-5.14.5-hwids.patch | 52 ++++++++++
17 .../kinfocenter/kinfocenter-5.14.5-r1.ebuild | 105 +++++++++++++++++++++
18 2 files changed, 157 insertions(+)
19
20 diff --git a/kde-plasma/kinfocenter/files/kinfocenter-5.14.5-hwids.patch b/kde-plasma/kinfocenter/files/kinfocenter-5.14.5-hwids.patch
21 new file mode 100644
22 index 00000000000..a29f71f7786
23 --- /dev/null
24 +++ b/kde-plasma/kinfocenter/files/kinfocenter-5.14.5-hwids.patch
25 @@ -0,0 +1,52 @@
26 +From e556c25c888a6e16e818945ac5bc81e455ddd4bc Mon Sep 17 00:00:00 2001
27 +From: Alexandre Ferreira <alexandref75@×××××.com>
28 +Date: Tue, 15 Jan 2019 13:29:25 +0000
29 +Subject: Fix USB view
30 +
31 +Summary:
32 +Fix
33 +BUG: 402949
34 +
35 +Reviewers: #plasma, cfeck, davidedmundson
36 +
37 +Reviewed By: #plasma, davidedmundson
38 +
39 +Subscribers: asturmlechner, davidedmundson, plasma-devel
40 +
41 +Tags: #plasma
42 +
43 +Differential Revision: https://phabricator.kde.org/D18032
44 +---
45 + Modules/usbview/usbdb.cpp | 3 +++
46 + Modules/usbview/usbdevices.cpp | 2 +-
47 + 2 files changed, 4 insertions(+), 1 deletion(-)
48 +
49 +diff --git a/Modules/usbview/usbdb.cpp b/Modules/usbview/usbdb.cpp
50 +index 2c62f16..e68d5c0 100644
51 +--- a/Modules/usbview/usbdb.cpp
52 ++++ b/Modules/usbview/usbdb.cpp
53 +@@ -21,6 +21,9 @@
54 + USBDB::USBDB() {
55 + QString db = QStringLiteral("/usr/share/hwdata/usb.ids"); /* on Fedora and Arch*/
56 + if (!QFile::exists(db)) {
57 ++ db = QStringLiteral("/usr/share/misc/usb.ids"); /* on Gentoo */
58 ++ }
59 ++ if (!QFile::exists(db)) {
60 + //cannot use locate(AppDataLocation) as the app is kinfocenter
61 + db = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kcmusb"), QStandardPaths::LocateDirectory);
62 + if (!db.isEmpty())
63 +diff --git a/Modules/usbview/usbdevices.cpp b/Modules/usbview/usbdevices.cpp
64 +index 1fb32e7..7b6fe1c 100644
65 +--- a/Modules/usbview/usbdevices.cpp
66 ++++ b/Modules/usbview/usbdevices.cpp
67 +@@ -103,7 +103,7 @@ void USBDevice::parseSysDir(int bus, int parent, int level, const QString& dname
68 + continue;
69 +
70 + USBDevice* dev = new USBDevice();
71 +- dev->parseSysDir(bus, ++level, _device, dname + QLatin1Char('/') + *it);
72 ++ dev->parseSysDir(bus, _device, ++level, dname + QLatin1Char('/') + *it);
73 + }
74 + }
75 +
76 +--
77 +cgit v1.1
78
79 diff --git a/kde-plasma/kinfocenter/kinfocenter-5.14.5-r1.ebuild b/kde-plasma/kinfocenter/kinfocenter-5.14.5-r1.ebuild
80 new file mode 100644
81 index 00000000000..6523f277be2
82 --- /dev/null
83 +++ b/kde-plasma/kinfocenter/kinfocenter-5.14.5-r1.ebuild
84 @@ -0,0 +1,105 @@
85 +# Copyright 1999-2019 Gentoo Authors
86 +# Distributed under the terms of the GNU General Public License v2
87 +
88 +EAPI=6
89 +
90 +KDE_HANDBOOK="true"
91 +inherit kde5
92 +
93 +DESCRIPTION="Utility providing information about the computer hardware"
94 +HOMEPAGE="https://www.kde.org/applications/system/kinfocenter/"
95 +SRC_URI+=" https://www.gentoo.org/assets/img/logo/gentoo-3d-small.png -> glogo-small.png"
96 +KEYWORDS="~amd64 ~arm ~x86"
97 +IUSE="gles2 ieee1394 +opengl +pci wayland"
98 +
99 +REQUIRED_USE="wayland? ( || ( gles2 opengl ) )"
100 +
101 +COMMON_DEPEND="
102 + $(add_frameworks_dep kcmutils)
103 + $(add_frameworks_dep kcompletion)
104 + $(add_frameworks_dep kconfig)
105 + $(add_frameworks_dep kconfigwidgets)
106 + $(add_frameworks_dep kcoreaddons)
107 + $(add_frameworks_dep kcrash)
108 + $(add_frameworks_dep kdbusaddons)
109 + $(add_frameworks_dep kdeclarative)
110 + $(add_frameworks_dep ki18n)
111 + $(add_frameworks_dep kiconthemes)
112 + $(add_frameworks_dep kio)
113 + $(add_frameworks_dep kpackage)
114 + $(add_frameworks_dep kservice)
115 + $(add_frameworks_dep kwidgetsaddons)
116 + $(add_frameworks_dep kxmlgui)
117 + $(add_frameworks_dep solid)
118 + $(add_qt_dep qtdbus)
119 + $(add_qt_dep qtdeclarative)
120 + $(add_qt_dep qtgui)
121 + $(add_qt_dep qtwidgets)
122 + sys-apps/hwids[pci,usb]
123 + x11-libs/libX11
124 + ieee1394? ( sys-libs/libraw1394 )
125 + opengl? (
126 + $(add_qt_dep qtgui 'gles2=')
127 + media-libs/mesa[gles2?]
128 + !gles2? ( media-libs/glu )
129 + )
130 + pci? ( sys-apps/pciutils )
131 + wayland? (
132 + $(add_frameworks_dep kwayland)
133 + media-libs/mesa[egl]
134 + )
135 +"
136 +DEPEND="${COMMON_DEPEND}
137 + $(add_frameworks_dep plasma)
138 +"
139 +RDEPEND="${COMMON_DEPEND}
140 + $(add_plasma_dep kde-cli-tools)
141 + $(add_qt_dep qtquickcontrols)
142 + !kde-apps/kcontrol:4
143 + !kde-misc/about-distro
144 + !kde-plasma/kinfocenter:4
145 +"
146 +
147 +PATCHES=( "${FILESDIR}/${P}-hwids.patch" )
148 +
149 +src_configure() {
150 + local mycmakeargs=(
151 + $(cmake-utils_use_find_package ieee1394 RAW1394)
152 + $(cmake-utils_use_find_package pci PCIUTILS)
153 + $(cmake-utils_use_find_package wayland EGL)
154 + $(cmake-utils_use_find_package wayland KF5Wayland)
155 + )
156 +
157 + if has_version "dev-qt/qtgui[gles2]"; then
158 + mycmakeargs+=( $(cmake-utils_use_find_package gles2 OpenGLES) )
159 + else
160 + mycmakeargs+=( $(cmake-utils_use_find_package opengl OpenGL) )
161 + fi
162 +
163 + kde5_src_configure
164 +}
165 +
166 +src_install() {
167 + kde5_src_install
168 +
169 + rm -r "${D}"/usr/share/kcmusb || die
170 +
171 + insinto /etc/xdg
172 + doins "${FILESDIR}"/kcm-about-distrorc
173 +
174 + insinto /usr/share/${PN}
175 + doins "${DISTDIR}"/glogo-small.png
176 +}
177 +
178 +pkg_postinst() {
179 + kde5_pkg_postinst
180 +
181 + if [[ -z "${REPLACING_VERSIONS}" ]]; then
182 + if ! has_version "net-fs/nfs-utils"; then
183 + elog "Installing net-fs/nfs-utils will enable the NFS information module."
184 + fi
185 + if ! has_version "net-fs/samba"; then
186 + elog "Installing net-fs/samba will enable the Samba status information module."
187 + fi
188 + fi
189 +}