1 |
commit: fa0507b627f2509fbe56f5aeb94c433a98886912 |
2 |
Author: Jimi Huotari <chiitoo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 28 22:53:26 2018 +0000 |
4 |
Commit: Jimi Huotari <chiitoo <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 28 23:05:14 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=fa0507b6 |
7 |
|
8 |
lxqt-base/lxqt-config: make touchpad config/dependencies optional |
9 |
|
10 |
Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
12 |
|
13 |
...lxqt-config-0.14.0-make-touchpad-optional.patch | 202 +++++++++++++++++++++ |
14 |
lxqt-base/lxqt-config/lxqt-config-9999.ebuild | 15 +- |
15 |
lxqt-base/lxqt-config/metadata.xml | 1 + |
16 |
3 files changed, 217 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/lxqt-base/lxqt-config/files/lxqt-config-0.14.0-make-touchpad-optional.patch b/lxqt-base/lxqt-config/files/lxqt-config-0.14.0-make-touchpad-optional.patch |
19 |
new file mode 100644 |
20 |
index 00000000..5d2674f2 |
21 |
--- /dev/null |
22 |
+++ b/lxqt-base/lxqt-config/files/lxqt-config-0.14.0-make-touchpad-optional.patch |
23 |
@@ -0,0 +1,202 @@ |
24 |
+From 8219e93d5733d6c8e98028e6f21468f568d9848d Mon Sep 17 00:00:00 2001 |
25 |
+From: Jimi Huotari <chiitoo@g.o> |
26 |
+Date: Sun, 23 Dec 2018 23:30:57 +0200 |
27 |
+Subject: [PATCH] lxqt-config-input: make touchpad settings/dependencies |
28 |
+ optional |
29 |
+ |
30 |
+--- |
31 |
+ lxqt-config-input/CMakeLists.txt | 73 ++++++++++++++++++++----- |
32 |
+ lxqt-config-input/lxqt-config-input.cpp | 10 ++++ |
33 |
+ lxqt-config-input/touchpad-config.h.in | 1 + |
34 |
+ 3 files changed, 71 insertions(+), 13 deletions(-) |
35 |
+ create mode 100644 lxqt-config-input/touchpad-config.h.in |
36 |
+ |
37 |
+diff --git a/lxqt-config-input/CMakeLists.txt b/lxqt-config-input/CMakeLists.txt |
38 |
+index a315e71..2d87a17 100644 |
39 |
+--- a/lxqt-config-input/CMakeLists.txt |
40 |
++++ b/lxqt-config-input/CMakeLists.txt |
41 |
+@@ -1,24 +1,46 @@ |
42 |
+ project(lxqt-config-input) |
43 |
+ |
44 |
++option(WITH_TOUCHPAD "Build touchpad settings" ON) |
45 |
++ |
46 |
+ find_package(X11 REQUIRED) |
47 |
+-find_package(PkgConfig REQUIRED) |
48 |
+-pkg_check_modules(XORG_LIBINPUT REQUIRED xorg-libinput) |
49 |
+-pkg_check_modules(XORG_XI REQUIRED xi) |
50 |
+-pkg_check_modules(LIBUDEV REQUIRED libudev) |
51 |
+ |
52 |
+-include_directories( |
53 |
++if (WITH_TOUCHPAD) |
54 |
++ find_package(PkgConfig REQUIRED) |
55 |
++ pkg_check_modules(XORG_LIBINPUT REQUIRED xorg-libinput) |
56 |
++ pkg_check_modules(XORG_XI REQUIRED xi) |
57 |
++ pkg_check_modules(LIBUDEV REQUIRED libudev) |
58 |
++endif () |
59 |
++ |
60 |
++set(lxqt-config-input_INCS |
61 |
+ ${X11_INCLUDE_DIR} |
62 |
+- ${XORG_LIBINPUT_INCLUDE_DIRS} |
63 |
++ ${CMAKE_CURRENT_BINARY_DIR} |
64 |
+ "${CMAKE_CURRENT_SOURCE_DIR}/../liblxqt-config-cursor" |
65 |
+ ) |
66 |
+ |
67 |
++if (WITH_TOUCHPAD) |
68 |
++ set(lxqt-config-input_INCS |
69 |
++ ${lxqt-config-input_INCS} |
70 |
++ ${XORG_LIBINPUT_INCLUDE_DIRS} |
71 |
++ ) |
72 |
++endif () |
73 |
++ |
74 |
++include_directories( |
75 |
++ ${lxqt-config-input_INCS} |
76 |
++) |
77 |
++ |
78 |
++# "${CMAKE_CURRENT_SOURCE_DIR}/touchpad-config.h.in" |
79 |
++configure_file( |
80 |
++ "${CMAKE_CURRENT_SOURCE_DIR}/touchpad-config.h.in" |
81 |
++ "${CMAKE_CURRENT_SOURCE_DIR}/touchpad-config.h" |
82 |
++ @ONLY |
83 |
++) |
84 |
++ |
85 |
+ set(lxqt-config-input_HDRS |
86 |
+ keyboardconfig.h |
87 |
+ mouseconfig.h |
88 |
+ mouseconfig.h |
89 |
+ keyboardlayoutconfig.h |
90 |
+ selectkeyboardlayoutdialog.h |
91 |
+- touchpadconfig.h |
92 |
+ ) |
93 |
+ |
94 |
+ set(lxqt-config-input_SRCS |
95 |
+@@ -27,8 +49,6 @@ set(lxqt-config-input_SRCS |
96 |
+ mouseconfig.cpp |
97 |
+ keyboardlayoutconfig.cpp |
98 |
+ selectkeyboardlayoutdialog.cpp |
99 |
+- touchpadconfig.cpp |
100 |
+- touchpaddevice.cpp |
101 |
+ ) |
102 |
+ |
103 |
+ set(lxqt-config-input_UIS |
104 |
+@@ -36,9 +56,26 @@ set(lxqt-config-input_UIS |
105 |
+ keyboardconfig.ui |
106 |
+ keyboardlayoutconfig.ui |
107 |
+ selectkeyboardlayoutdialog.ui |
108 |
+- touchpadconfig.ui |
109 |
+ ) |
110 |
+ |
111 |
++if (WITH_TOUCHPAD) |
112 |
++ set(lxqt-config-input_HDRS |
113 |
++ ${lxqt-config-input_HDRS} |
114 |
++ touchpadconfig.h |
115 |
++ ) |
116 |
++ |
117 |
++ set(lxqt-config-input_SRCS |
118 |
++ ${lxqt-config-input_SRCS} |
119 |
++ touchpadconfig.cpp |
120 |
++ touchpaddevice.cpp |
121 |
++ ) |
122 |
++ |
123 |
++ set(lxqt-config-input_UIS |
124 |
++ ${lxqt-config-input_UIS} |
125 |
++ touchpadconfig.ui |
126 |
++ ) |
127 |
++endif () |
128 |
++ |
129 |
+ # Translations ********************************** |
130 |
+ lxqt_translate_ts(QM_FILES |
131 |
+ UPDATE_TRANSLATIONS |
132 |
+@@ -67,14 +104,24 @@ add_executable(lxqt-config-input |
133 |
+ ${QM_LOADER} |
134 |
+ ) |
135 |
+ |
136 |
+-target_link_libraries(lxqt-config-input |
137 |
++set(lxqt-config-input_TLBS |
138 |
+ Qt5::Widgets |
139 |
+ Qt5::X11Extras |
140 |
+ ${X11_LIBRARIES} |
141 |
+- ${X11_Xinput_LIB} |
142 |
+ lxqt |
143 |
+ lxqt-config-cursor |
144 |
+- udev |
145 |
++) |
146 |
++ |
147 |
++if (WITH_TOUCHPAD) |
148 |
++ set(lxqt-config-input_TLBS |
149 |
++ ${lxqt-config-input_TLBS} |
150 |
++ ${X11_Xinput_LIB} |
151 |
++ udev |
152 |
++ ) |
153 |
++endif () |
154 |
++ |
155 |
++target_link_libraries(lxqt-config-input |
156 |
++ ${lxqt-config-input_TLBS} |
157 |
+ ) |
158 |
+ |
159 |
+ set_target_properties(lxqt-config-input |
160 |
+diff --git a/lxqt-config-input/lxqt-config-input.cpp b/lxqt-config-input/lxqt-config-input.cpp |
161 |
+index 9aa3134..ec7fa73 100644 |
162 |
+--- a/lxqt-config-input/lxqt-config-input.cpp |
163 |
++++ b/lxqt-config-input/lxqt-config-input.cpp |
164 |
+@@ -25,8 +25,12 @@ |
165 |
+ #include "keyboardconfig.h" |
166 |
+ #include "../liblxqt-config-cursor/selectwnd.h" |
167 |
+ #include "keyboardlayoutconfig.h" |
168 |
++#include "touchpad-config.h" |
169 |
++ |
170 |
++#ifdef WITH_TOUCHPAD |
171 |
+ #include "touchpadconfig.h" |
172 |
+ #include "touchpaddevice.h" |
173 |
++#endif |
174 |
+ |
175 |
+ int main(int argc, char** argv) { |
176 |
+ LXQt::SingleApplication app(argc, argv); |
177 |
+@@ -41,9 +45,11 @@ int main(int argc, char** argv) { |
178 |
+ app.setApplicationVersion(VERINFO); |
179 |
+ |
180 |
+ dlgOptions.setCommandLine(&parser); |
181 |
++#ifdef WITH_TOUCHPAD |
182 |
+ QCommandLineOption loadOption("load-touchpad", |
183 |
+ app.tr("Load last touchpad settings.")); |
184 |
+ parser.addOption(loadOption); |
185 |
++#endif |
186 |
+ parser.addVersionOption(); |
187 |
+ parser.addHelpOption(); |
188 |
+ parser.process(app); |
189 |
+@@ -54,11 +60,13 @@ int main(int argc, char** argv) { |
190 |
+ configName = "session"; |
191 |
+ LXQt::Settings settings(configName); |
192 |
+ |
193 |
++#ifdef WITH_TOUCHPAD |
194 |
+ bool loadLastTouchpadSettings = parser.isSet(loadOption); |
195 |
+ if (loadLastTouchpadSettings) { |
196 |
+ TouchpadDevice::loadSettings(&settings); |
197 |
+ return 0; |
198 |
+ } |
199 |
++#endif |
200 |
+ |
201 |
+ LXQt::ConfigDialog dlg(QObject::tr("Keyboard and Mouse Settings"), &settings); |
202 |
+ app.setActivationWindow(&dlg); |
203 |
+@@ -80,10 +88,12 @@ int main(int argc, char** argv) { |
204 |
+ dlg.addPage(keyboardLayoutConfig, QObject::tr("Keyboard Layout"), "input-keyboard"); |
205 |
+ QObject::connect(&dlg, SIGNAL(reset()), keyboardLayoutConfig, SLOT(reset())); |
206 |
+ |
207 |
++#ifdef WITH_TOUCHPAD |
208 |
+ TouchpadConfig* touchpadConfig = new TouchpadConfig(&settings, &dlg); |
209 |
+ dlg.addPage(touchpadConfig, QObject::tr("Mouse and Touchpad"), "input-tablet"); |
210 |
+ QObject::connect(&dlg, &LXQt::ConfigDialog::reset, |
211 |
+ touchpadConfig, &TouchpadConfig::reset); |
212 |
++#endif |
213 |
+ |
214 |
+ dlg.setWindowIcon(QIcon::fromTheme("input-keyboard")); |
215 |
+ |
216 |
+diff --git a/lxqt-config-input/touchpad-config.h.in b/lxqt-config-input/touchpad-config.h.in |
217 |
+new file mode 100644 |
218 |
+index 0000000..d5bdab6 |
219 |
+--- /dev/null |
220 |
++++ b/lxqt-config-input/touchpad-config.h.in |
221 |
+@@ -0,0 +1 @@ |
222 |
++#cmakedefine WITH_TOUCHPAD @WITH_TOUCHPAD@ |
223 |
+-- |
224 |
+2.20.1 |
225 |
+ |
226 |
|
227 |
diff --git a/lxqt-base/lxqt-config/lxqt-config-9999.ebuild b/lxqt-base/lxqt-config/lxqt-config-9999.ebuild |
228 |
index c206dbd1..c3c4c117 100644 |
229 |
--- a/lxqt-base/lxqt-config/lxqt-config-9999.ebuild |
230 |
+++ b/lxqt-base/lxqt-config/lxqt-config-9999.ebuild |
231 |
@@ -18,7 +18,7 @@ fi |
232 |
|
233 |
LICENSE="GPL-2 GPL-2+ GPL-3 LGPL-2 LGPL-2+ LGPL-2.1+ WTFPL-2" |
234 |
SLOT="0" |
235 |
-IUSE="+monitor" |
236 |
+IUSE="+monitor +touchpad" |
237 |
|
238 |
RDEPEND=" |
239 |
>=dev-libs/libqtxdg-3.0.0 |
240 |
@@ -37,16 +37,24 @@ RDEPEND=" |
241 |
x11-libs/libXcursor |
242 |
x11-libs/libXfixes |
243 |
monitor? ( kde-plasma/libkscreen:5= ) |
244 |
+ touchpad? ( |
245 |
+ virtual/libudev |
246 |
+ x11-drivers/xf86-input-libinput |
247 |
+ x11-libs/libXext |
248 |
+ ) |
249 |
" |
250 |
DEPEND="${DEPEND} |
251 |
dev-qt/linguist-tools:5 |
252 |
>=dev-util/lxqt-build-tools-0.5.0 |
253 |
" |
254 |
|
255 |
+PATCHES="${FILESDIR}/${PN}-0.14.0-make-touchpad-optional.patch" |
256 |
+ |
257 |
src_configure() { |
258 |
local mycmakeargs=( |
259 |
-DPULL_TRANSLATIONS=OFF |
260 |
-DWITH_MONITOR="$(usex monitor)" |
261 |
+ -DWITH_TOUCHPAD="$(usex touchpad)" |
262 |
) |
263 |
cmake-utils_src_configure |
264 |
} |
265 |
@@ -58,6 +66,11 @@ src_install() { |
266 |
|
267 |
pkg_postinst() { |
268 |
gnome2_icon_cache_update |
269 |
+ |
270 |
+ if ! use touchpad; then |
271 |
+ ewarn "Please do not report issues to upstream, if they are caused by" |
272 |
+ ewarn "USE=\"-touchpad\", as upstream does not support such a build." |
273 |
+ fi |
274 |
} |
275 |
|
276 |
pkg_postrm() { |
277 |
|
278 |
diff --git a/lxqt-base/lxqt-config/metadata.xml b/lxqt-base/lxqt-config/metadata.xml |
279 |
index d6f2207d..d9098239 100644 |
280 |
--- a/lxqt-base/lxqt-config/metadata.xml |
281 |
+++ b/lxqt-base/lxqt-config/metadata.xml |
282 |
@@ -10,5 +10,6 @@ |
283 |
</upstream> |
284 |
<use> |
285 |
<flag name="monitor" restrict=">=lxqt-base/lxqt-config-0.13.0">Build monitor settings tool</flag> |
286 |
+ <flag name="touchpad" restrict=">=lxqt-base/lxqt-config-0.13.0">Build touchpad settings tool</flag> |
287 |
</use> |
288 |
</pkgmetadata> |