1 |
commit: a6a4c43375a224af0462e0a67b5c2f033f80d260 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 27 11:38:08 2018 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 27 11:38:08 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6a4c433 |
7 |
|
8 |
kde-plasma/plasma-pa: Don't depend on gconf anymore. |
9 |
|
10 |
Done through backported upstream patch. |
11 |
|
12 |
Bug: https://bugs.gentoo.org/658660 |
13 |
Package-Manager: Portage-2.3.43, Repoman-2.3.10 |
14 |
|
15 |
.../files/plasma-pa-5.13.3-optional_gconf.patch | 280 +++++++++++++++++++++ |
16 |
kde-plasma/plasma-pa/plasma-pa-5.13.3-r1.ebuild | 32 +++ |
17 |
2 files changed, 312 insertions(+) |
18 |
|
19 |
diff --git a/kde-plasma/plasma-pa/files/plasma-pa-5.13.3-optional_gconf.patch b/kde-plasma/plasma-pa/files/plasma-pa-5.13.3-optional_gconf.patch |
20 |
new file mode 100644 |
21 |
index 00000000000..f14fd180c24 |
22 |
--- /dev/null |
23 |
+++ b/kde-plasma/plasma-pa/files/plasma-pa-5.13.3-optional_gconf.patch |
24 |
@@ -0,0 +1,280 @@ |
25 |
+From c9fae1fb3f8e8a820fd480ce227d7fabf87bd045 Mon Sep 17 00:00:00 2001 |
26 |
+From: David Rosca <nowrep@×××××.com> |
27 |
+Date: Tue, 26 Jun 2018 10:56:04 +0200 |
28 |
+Subject: [PATCH] Make GConf optional dependency |
29 |
+ |
30 |
+When building without GConf, Advanded Output Configuration will be hidden in KCM. |
31 |
+ |
32 |
+BUG: 386665 |
33 |
+FIXED-IN: 5.13.4 |
34 |
+ |
35 |
+Differential Revision: https://phabricator.kde.org/D13734 |
36 |
+--- |
37 |
+ CMakeLists.txt | 9 ++++-- |
38 |
+ config.h.cmake | 3 ++ |
39 |
+ src/CMakeLists.txt | 18 ++++++++---- |
40 |
+ src/kcm/package/contents/ui/Advanced.qml | 5 +++- |
41 |
+ src/modulemanager.cpp | 47 ++++++++++++++++++++++++++------ |
42 |
+ src/modulemanager.h | 3 ++ |
43 |
+ 6 files changed, 68 insertions(+), 17 deletions(-) |
44 |
+ create mode 100644 config.h.cmake |
45 |
+ |
46 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
47 |
+index e494ced..2505696 100644 |
48 |
+--- a/CMakeLists.txt |
49 |
++++ b/CMakeLists.txt |
50 |
+@@ -19,8 +19,11 @@ include(KDECompilerSettings NO_POLICY_SCOPE) |
51 |
+ include(ECMOptionalAddSubdirectory) |
52 |
+ |
53 |
+ include(FindPkgConfig) |
54 |
+-pkg_check_modules(GCONF REQUIRED gconf-2.0) |
55 |
+-pkg_check_modules(GOBJECT REQUIRED gobject-2.0) |
56 |
++pkg_check_modules(GCONF gconf-2.0) |
57 |
++pkg_check_modules(GOBJECT gobject-2.0) |
58 |
++if (GCONF_FOUND AND GOBJECT_FOUND) |
59 |
++ set(HAVE_GCONF TRUE) |
60 |
++endif() |
61 |
+ |
62 |
+ find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS |
63 |
+ Core |
64 |
+@@ -41,6 +44,8 @@ find_package(PulseAudio 5.0.0 REQUIRED) |
65 |
+ find_package(Canberra REQUIRED) |
66 |
+ find_package(GLIB2 REQUIRED) |
67 |
+ |
68 |
++configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) |
69 |
++ |
70 |
+ add_subdirectory(applet) |
71 |
+ add_subdirectory(src) |
72 |
+ add_subdirectory(data) |
73 |
+diff --git a/config.h.cmake b/config.h.cmake |
74 |
+new file mode 100644 |
75 |
+index 0000000..1643e50 |
76 |
+--- /dev/null |
77 |
++++ b/config.h.cmake |
78 |
+@@ -0,0 +1,3 @@ |
79 |
++/* config.h. Generated by cmake from config.h.cmake */ |
80 |
++ |
81 |
++#cmakedefine01 HAVE_GCONF |
82 |
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt |
83 |
+index e6cddfc..09d108c 100644 |
84 |
+--- a/src/CMakeLists.txt |
85 |
++++ b/src/CMakeLists.txt |
86 |
+@@ -1,5 +1,4 @@ |
87 |
+-include_directories(${PULSEAUDIO_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR} ${GCONF_INCLUDE_DIRS} |
88 |
+- ${GOBJECT_INCLUDE_DIRS}) |
89 |
++include_directories(${PULSEAUDIO_INCLUDE_DIR} ${GLIB2_INCLUDE_DIR}) |
90 |
+ |
91 |
+ set(cpp_SRCS |
92 |
+ card.cpp |
93 |
+@@ -15,7 +14,6 @@ set(cpp_SRCS |
94 |
+ sink.cpp |
95 |
+ sinkinput.cpp |
96 |
+ modulemanager.cpp |
97 |
+- gconfitem.cpp |
98 |
+ source.cpp |
99 |
+ sourceoutput.cpp |
100 |
+ stream.cpp |
101 |
+@@ -38,6 +36,11 @@ set(qml_SRCS |
102 |
+ set_property(SOURCE qml/dbus/osdService.xml APPEND PROPERTY CLASSNAME OsdServiceInterface) |
103 |
+ qt5_add_dbus_interface(dbus_SRCS qml/dbus/osdService.xml osdservice) |
104 |
+ |
105 |
++if (HAVE_GCONF) |
106 |
++ include_directories(${GCONF_INCLUDE_DIRS} ${GOBJECT_INCLUDE_DIRS}) |
107 |
++ set(cpp_SRCS ${cpp_SRCS} gconfitem.cpp) |
108 |
++endif() |
109 |
++ |
110 |
+ add_library(plasma-volume-declarative SHARED ${dbus_SRCS} ${cpp_SRCS} ${qml_SRCS}) |
111 |
+ target_link_libraries(plasma-volume-declarative |
112 |
+ Qt5::Core |
113 |
+@@ -47,11 +50,16 @@ target_link_libraries(plasma-volume-declarative |
114 |
+ KF5::GlobalAccel |
115 |
+ ${PULSEAUDIO_LIBRARY} |
116 |
+ ${PULSEAUDIO_MAINLOOP_LIBRARY} |
117 |
+- ${GCONF_LDFLAGS} |
118 |
+- ${GOBJECT_LDFLAGS} |
119 |
+ ${CANBERRA_LIBRARIES} |
120 |
+ ) |
121 |
+ |
122 |
++if (HAVE_GCONF) |
123 |
++ target_link_libraries(plasma-volume-declarative |
124 |
++ ${GCONF_LDFLAGS} |
125 |
++ ${GOBJECT_LDFLAGS} |
126 |
++ ) |
127 |
++endif() |
128 |
++ |
129 |
+ set(PRIVATE_QML_INSTALL_DIR ${QML_INSTALL_DIR}/org/kde/plasma/private/volume) |
130 |
+ install(TARGETS plasma-volume-declarative DESTINATION ${PRIVATE_QML_INSTALL_DIR}) |
131 |
+ install(FILES ${qml_SRCS} DESTINATION ${PRIVATE_QML_INSTALL_DIR}) |
132 |
+diff --git a/src/kcm/package/contents/ui/Advanced.qml b/src/kcm/package/contents/ui/Advanced.qml |
133 |
+index b305cf1..0cd9eb9 100644 |
134 |
+--- a/src/kcm/package/contents/ui/Advanced.qml |
135 |
++++ b/src/kcm/package/contents/ui/Advanced.qml |
136 |
+@@ -56,6 +56,7 @@ ScrollView { |
137 |
+ Header { |
138 |
+ Layout.fillWidth: true |
139 |
+ text: i18n("Advanced Output Configuration") |
140 |
++ visible: moduleManager.settingsSupported |
141 |
+ } |
142 |
+ |
143 |
+ ModuleManager { |
144 |
+@@ -71,6 +72,7 @@ ScrollView { |
145 |
+ checked: moduleManager.combineSinks |
146 |
+ onCheckedChanged: moduleManager.combineSinks = checked; |
147 |
+ enabled: moduleManager.loadedModules.indexOf("module-gconf") != -1 |
148 |
++ visible: moduleManager.settingsSupported |
149 |
+ } |
150 |
+ |
151 |
+ CheckBox { |
152 |
+@@ -81,6 +83,7 @@ ScrollView { |
153 |
+ checked: moduleManager.switchOnConnect |
154 |
+ onCheckedChanged: moduleManager.switchOnConnect = checked; |
155 |
+ enabled: moduleManager.loadedModules.indexOf("module-gconf") != -1 |
156 |
++ visible: moduleManager.settingsSupported |
157 |
+ } |
158 |
+ |
159 |
+ Label { |
160 |
+@@ -88,7 +91,7 @@ ScrollView { |
161 |
+ enabled: false |
162 |
+ font.italic: true |
163 |
+ text: i18n("Requires 'module-gconf' PulseAudio module") |
164 |
+- visible: moduleManager.loadedModules.indexOf("module-gconf") == -1 |
165 |
++ visible: moduleManager.settingsSupported && moduleManager.loadedModules.indexOf("module-gconf") == -1 |
166 |
+ } |
167 |
+ } |
168 |
+ } |
169 |
+diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp |
170 |
+index 635adc8..5245ac5 100644 |
171 |
+--- a/src/modulemanager.cpp |
172 |
++++ b/src/modulemanager.cpp |
173 |
+@@ -21,20 +21,22 @@ |
174 |
+ |
175 |
+ #include "modulemanager.h" |
176 |
+ #include "module.h" |
177 |
++#include "../config.h" |
178 |
+ |
179 |
++#if HAVE_GCONF |
180 |
++#include "gconfitem.h" |
181 |
+ #define PA_GCONF_ROOT "/system/pulseaudio" |
182 |
+ #define PA_GCONF_PATH_MODULES PA_GCONF_ROOT"/modules" |
183 |
+- |
184 |
+-#include "gconfitem.h" |
185 |
++#endif |
186 |
+ |
187 |
+ #include <QTimer> |
188 |
+ |
189 |
+ namespace QPulseAudio |
190 |
+ { |
191 |
+ |
192 |
++#if HAVE_GCONF |
193 |
+ class GConfModule : public GConfItem |
194 |
+ { |
195 |
+- Q_OBJECT |
196 |
+ public: |
197 |
+ GConfModule(const QString &configName, const QString &moduleName, QObject *parent); |
198 |
+ bool isEnabled() const; |
199 |
+@@ -67,17 +69,21 @@ void GConfModule::setEnabled(bool enabled, const QVariant &args) |
200 |
+ } |
201 |
+ set(QStringLiteral("locked"), false); |
202 |
+ } |
203 |
++#endif |
204 |
+ |
205 |
+ |
206 |
+ ModuleManager::ModuleManager(QObject *parent) : |
207 |
+- QObject(parent), |
208 |
+- m_combineSinks(new GConfModule(QStringLiteral("combine"), QStringLiteral("module-combine"), this)), |
209 |
+- m_switchOnConnect(new GConfModule(QStringLiteral("switch-on-connect"), QStringLiteral("module-switch-on-connect"), this)), |
210 |
+- m_deviceManager(new GConfModule(QStringLiteral("device-manager"), QStringLiteral("module-device-manager"), this)) |
211 |
++ QObject(parent) |
212 |
+ { |
213 |
++#if HAVE_GCONF |
214 |
++ m_combineSinks = new GConfModule(QStringLiteral("combine"), QStringLiteral("module-combine"), this); |
215 |
++ m_switchOnConnect = new GConfModule(QStringLiteral("switch-on-connect"), QStringLiteral("module-switch-on-connect"), this); |
216 |
++ m_deviceManager = new GConfModule(QStringLiteral("device-manager"), QStringLiteral("module-device-manager"), this); |
217 |
++ |
218 |
+ connect(m_combineSinks, &GConfItem::subtreeChanged, this, &ModuleManager::combineSinksChanged); |
219 |
+ connect(m_switchOnConnect, &GConfItem::subtreeChanged, this, &ModuleManager::switchOnConnectChanged); |
220 |
+ connect(m_deviceManager, &GConfItem::subtreeChanged, this, &ModuleManager::switchOnConnectChanged); |
221 |
++#endif |
222 |
+ |
223 |
+ QTimer *updateModulesTimer = new QTimer(this); |
224 |
+ updateModulesTimer->setInterval(500); |
225 |
+@@ -92,14 +98,31 @@ ModuleManager::~ModuleManager() |
226 |
+ { |
227 |
+ }; |
228 |
+ |
229 |
++bool ModuleManager::settingsSupported() const |
230 |
++{ |
231 |
++#if HAVE_GCONF |
232 |
++ return true; |
233 |
++#else |
234 |
++ return false; |
235 |
++#endif |
236 |
++} |
237 |
++ |
238 |
+ bool ModuleManager::combineSinks() const |
239 |
+ { |
240 |
++#if HAVE_GCONF |
241 |
+ return m_combineSinks->isEnabled(); |
242 |
++#else |
243 |
++ return false; |
244 |
++#endif |
245 |
+ } |
246 |
+ |
247 |
+ void ModuleManager::setCombineSinks(bool combineSinks) |
248 |
+ { |
249 |
++#if HAVE_GCONF |
250 |
+ m_combineSinks->setEnabled(combineSinks); |
251 |
++#else |
252 |
++ Q_UNUSED(combineSinks) |
253 |
++#endif |
254 |
+ } |
255 |
+ |
256 |
+ bool ModuleManager::switchOnConnect() const |
257 |
+@@ -109,13 +132,21 @@ bool ModuleManager::switchOnConnect() const |
258 |
+ //Note on the first run m_deviceManager will appear to be disabled even though it's actually running |
259 |
+ //because there is no gconf entry, however m_switchOnConnect will only exist if set by Plasma PA |
260 |
+ //hence only check this entry |
261 |
++#if HAVE_GCONF |
262 |
+ return m_switchOnConnect->isEnabled() ; |
263 |
++#else |
264 |
++ return false; |
265 |
++#endif |
266 |
+ } |
267 |
+ |
268 |
+ void ModuleManager::setSwitchOnConnect(bool switchOnConnect) |
269 |
+ { |
270 |
++#if HAVE_GCONF |
271 |
+ m_deviceManager->setEnabled(!switchOnConnect); |
272 |
+ m_switchOnConnect->setEnabled(switchOnConnect); |
273 |
++#else |
274 |
++ Q_UNUSED(switchOnConnect) |
275 |
++#endif |
276 |
+ } |
277 |
+ |
278 |
+ QStringList ModuleManager::loadedModules() const |
279 |
+@@ -134,5 +165,3 @@ void ModuleManager::updateLoadedModules() |
280 |
+ } |
281 |
+ |
282 |
+ } |
283 |
+- |
284 |
+-#include "modulemanager.moc" |
285 |
+diff --git a/src/modulemanager.h b/src/modulemanager.h |
286 |
+index b8fcd0b..8108fe0 100644 |
287 |
+--- a/src/modulemanager.h |
288 |
++++ b/src/modulemanager.h |
289 |
+@@ -38,12 +38,15 @@ class GConfModule; |
290 |
+ class ModuleManager : public QObject |
291 |
+ { |
292 |
+ Q_OBJECT |
293 |
++ Q_PROPERTY(bool settingsSupported READ settingsSupported CONSTANT) |
294 |
+ Q_PROPERTY(bool combineSinks READ combineSinks WRITE setCombineSinks NOTIFY combineSinksChanged) |
295 |
+ Q_PROPERTY(bool switchOnConnect READ switchOnConnect WRITE setSwitchOnConnect NOTIFY switchOnConnectChanged) |
296 |
+ Q_PROPERTY(QStringList loadedModules READ loadedModules NOTIFY loadedModulesChanged) |
297 |
+ public: |
298 |
+ ModuleManager(QObject *parent = nullptr); |
299 |
+ ~ModuleManager(); |
300 |
++ |
301 |
++ bool settingsSupported() const; |
302 |
+ bool combineSinks() const; |
303 |
+ void setCombineSinks(bool combineSinks); |
304 |
+ bool switchOnConnect() const; |
305 |
|
306 |
diff --git a/kde-plasma/plasma-pa/plasma-pa-5.13.3-r1.ebuild b/kde-plasma/plasma-pa/plasma-pa-5.13.3-r1.ebuild |
307 |
new file mode 100644 |
308 |
index 00000000000..12b95df456c |
309 |
--- /dev/null |
310 |
+++ b/kde-plasma/plasma-pa/plasma-pa-5.13.3-r1.ebuild |
311 |
@@ -0,0 +1,32 @@ |
312 |
+# Copyright 1999-2018 Gentoo Foundation |
313 |
+# Distributed under the terms of the GNU General Public License v2 |
314 |
+ |
315 |
+EAPI=6 |
316 |
+ |
317 |
+KDE_HANDBOOK="forceoptional" |
318 |
+inherit kde5 |
319 |
+ |
320 |
+DESCRIPTION="Plasma applet for audio volume management using PulseAudio" |
321 |
+KEYWORDS="~amd64 ~arm ~x86" |
322 |
+IUSE="" |
323 |
+ |
324 |
+DEPEND=" |
325 |
+ $(add_frameworks_dep kcoreaddons) |
326 |
+ $(add_frameworks_dep kdeclarative) |
327 |
+ $(add_frameworks_dep kglobalaccel) |
328 |
+ $(add_frameworks_dep ki18n) |
329 |
+ $(add_frameworks_dep plasma) |
330 |
+ $(add_qt_dep qtdbus) |
331 |
+ $(add_qt_dep qtdeclarative) |
332 |
+ $(add_qt_dep qtgui) |
333 |
+ $(add_qt_dep qtwidgets) |
334 |
+ media-libs/libcanberra |
335 |
+ media-sound/pulseaudio |
336 |
+" |
337 |
+ |
338 |
+RDEPEND="${DEPEND}" |
339 |
+ |
340 |
+PATCHES=( |
341 |
+ "${FILESDIR}/${P}-wrong-port-avail.patch" |
342 |
+ "${FILESDIR}/${P}-optional_gconf.patch" |
343 |
+) |