1 |
commit: 030a7a33700436a2febb9bfa382a4db519362975 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 7 19:38:13 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 7 19:56:44 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=030a7a33 |
7 |
|
8 |
kde-plasma/plasma-desktop: Add FindXorgServer.cmake module |
9 |
|
10 |
Update override-include-dirs.patch to cover the new module. |
11 |
|
12 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
13 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
14 |
|
15 |
.../plasma-desktop-5.18.5-findxorgserver.patch | 130 +++++++++++++++++++++ |
16 |
...sma-desktop-5.18.5-override-include-dirs.patch} | 35 +++++- |
17 |
.../plasma-desktop/plasma-desktop-5.18.5.ebuild | 4 +- |
18 |
3 files changed, 162 insertions(+), 7 deletions(-) |
19 |
|
20 |
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.5-findxorgserver.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.5-findxorgserver.patch |
21 |
new file mode 100644 |
22 |
index 00000000000..115d52423fb |
23 |
--- /dev/null |
24 |
+++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.5-findxorgserver.patch |
25 |
@@ -0,0 +1,130 @@ |
26 |
+From 82e7a6b68d81ca2be0fdc3fc13cd5ca5f5e03e81 Mon Sep 17 00:00:00 2001 |
27 |
+From: Andreas Sturmlechner <asturm@g.o> |
28 |
+Date: Thu, 7 May 2020 16:18:13 +0200 |
29 |
+Subject: [PATCH] Add FindXorgServer.cmake and use it for touchpad KCM |
30 |
+ |
31 |
+Summary: |
32 |
+x11 backend of the touchpad KCM uses xserver-properties.h that is part of |
33 |
+xorg-server package. As XORG_INCLUDE_DIRS seems to be empty, so far, it was |
34 |
+relying on Synaptics_INCLUDE_DIRS implicitly and worked only if the header |
35 |
+happened to be in the same directory as Synaptics' which is the case most of |
36 |
+the time. |
37 |
+ |
38 |
+FindXorgServer.cmake is just a copy of FindXorgLibinput, adapted accordingly. |
39 |
+ |
40 |
+Test Plan: |
41 |
+Pointed Synaptics_INCLUDE_DIRS somewhere else than /usr/include/xorg and build |
42 |
+succeeded. |
43 |
+ |
44 |
+Reviewers: #plasma, zzag |
45 |
+ |
46 |
+Reviewed By: #plasma, zzag |
47 |
+ |
48 |
+Subscribers: broulik, plasma-devel |
49 |
+ |
50 |
+Tags: #plasma |
51 |
+ |
52 |
+Differential Revision: https://phabricator.kde.org/D29514 |
53 |
+--- |
54 |
+ CMakeLists.txt | 4 +++ |
55 |
+ cmake/modules/FindXorgServer.cmake | 45 ++++++++++++++++++++++++++++++ |
56 |
+ kcms/CMakeLists.txt | 2 +- |
57 |
+ kcms/touchpad/src/backends/x11.cmake | 2 +- |
58 |
+ 4 files changed, 51 insertions(+), 2 deletions(-) |
59 |
+ create mode 100644 cmake/modules/FindXorgServer.cmake |
60 |
+ |
61 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
62 |
+index fbdd95433..64e8bbd60 100644 |
63 |
+--- a/CMakeLists.txt |
64 |
++++ b/CMakeLists.txt |
65 |
+@@ -133,6 +133,10 @@ find_package(Synaptics) |
66 |
+ set_package_properties(Synaptics PROPERTIES TYPE OPTIONAL) |
67 |
+ add_feature_info("Synaptics" SYNAPTICS_FOUND "Synaptics libraries needed for touchpad KCM") |
68 |
+ |
69 |
++find_package(XorgServer) |
70 |
++set_package_properties(XorgServer PROPERTIES TYPE OPTIONAL) |
71 |
++add_feature_info("XorgServer" XORGSERVER_FOUND "XServer header needed for touchpad KCM (X11 backend)") |
72 |
++ |
73 |
+ find_package(XorgLibinput) |
74 |
+ set_package_properties(XorgLibinput PROPERTIES TYPE OPTIONAL) |
75 |
+ add_feature_info("XorgLibinput" XORGLIBINPUT_FOUND "Libinput driver headers needed for mouse and touchpad KCM") |
76 |
+diff --git a/cmake/modules/FindXorgServer.cmake b/cmake/modules/FindXorgServer.cmake |
77 |
+new file mode 100644 |
78 |
+index 000000000..5248c6d25 |
79 |
+--- /dev/null |
80 |
++++ b/cmake/modules/FindXorgServer.cmake |
81 |
+@@ -0,0 +1,45 @@ |
82 |
++# - Find xorg-server's headers. |
83 |
++# This module defines the following variables: |
84 |
++# |
85 |
++# XORGSERVER_FOUND - true if xserver was found |
86 |
++# XORGSERVER_INCLUDE_DIRS - include path for xserver |
87 |
++# There are no libraries, just a header file |
88 |
++# |
89 |
++# Copyright (c) 2020 Andreas Sturmlechner <asturm@g.o> |
90 |
++# |
91 |
++# Redistribution and use in source and binary forms, with or without |
92 |
++# modification, are permitted provided that the following conditions |
93 |
++# are met: |
94 |
++# 1. Redistributions of source code must retain the above copyright |
95 |
++# notice, this list of conditions and the following disclaimer. |
96 |
++# 2. Redistributions in binary form must reproduce the above copyright |
97 |
++# notice, this list of conditions and the following disclaimer in the |
98 |
++# documentation and/or other materials provided with the distribution. |
99 |
++# 3. Neither the name of the University nor the names of its contributors |
100 |
++# may be used to endorse or promote products derived from this software |
101 |
++# without specific prior written permission. |
102 |
++# |
103 |
++# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
104 |
++# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
105 |
++# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
106 |
++# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
107 |
++# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
108 |
++# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
109 |
++# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
110 |
++# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
111 |
++# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
112 |
++# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
113 |
++# SUCH DAMAGE. |
114 |
++ |
115 |
++find_package(PkgConfig) |
116 |
++pkg_check_modules(PC_XORGSERVER xorg-server) |
117 |
++ |
118 |
++find_path(XORGSERVER_INCLUDE_DIRS |
119 |
++ NAMES xserver-properties.h |
120 |
++ HINTS ${PC_XORGSERVER_INCLUDE_DIRS} ${PC_XORGSERVER_INCLUDEDIR} |
121 |
++) |
122 |
++ |
123 |
++include(FindPackageHandleStandardArgs) |
124 |
++find_package_handle_standard_args(XORGSERVER REQUIRED_VARS XORGSERVER_INCLUDE_DIRS) |
125 |
++ |
126 |
++mark_as_advanced(XORGSERVER_INCLUDE_DIRS) |
127 |
+diff --git a/kcms/CMakeLists.txt b/kcms/CMakeLists.txt |
128 |
+index 7ab966e8e..ce730f537 100644 |
129 |
+--- a/kcms/CMakeLists.txt |
130 |
++++ b/kcms/CMakeLists.txt |
131 |
+@@ -58,7 +58,7 @@ if(X11_Xcursor_FOUND) |
132 |
+ add_subdirectory(cursortheme) |
133 |
+ endif() |
134 |
+ |
135 |
+-if (SYNAPTICS_FOUND AND X11_Xinput_FOUND) |
136 |
++if (XORGSERVER_FOUND AND SYNAPTICS_FOUND AND X11_Xinput_FOUND) |
137 |
+ add_subdirectory(touchpad) |
138 |
+ endif() |
139 |
+ |
140 |
+diff --git a/kcms/touchpad/src/backends/x11.cmake b/kcms/touchpad/src/backends/x11.cmake |
141 |
+index 9248eff7c..8a584e939 100644 |
142 |
+--- a/kcms/touchpad/src/backends/x11.cmake |
143 |
++++ b/kcms/touchpad/src/backends/x11.cmake |
144 |
+@@ -11,7 +11,7 @@ endif() |
145 |
+ include_directories(${X11_Xinput_INCLUDE_PATH} |
146 |
+ ${X11_X11_INCLUDE_PATH} |
147 |
+ ${Synaptics_INCLUDE_DIRS} |
148 |
+- ${XORG_INCLUDE_DIRS} |
149 |
++ ${XORGSERVER_INCLUDE_DIRS} |
150 |
+ ) |
151 |
+ |
152 |
+ SET(backend_SRCS |
153 |
+-- |
154 |
+2.26.2 |
155 |
+ |
156 |
|
157 |
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.4.1-override-include-dirs.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.5-override-include-dirs.patch |
158 |
similarity index 71% |
159 |
rename from kde-plasma/plasma-desktop/files/plasma-desktop-5.18.4.1-override-include-dirs.patch |
160 |
rename to kde-plasma/plasma-desktop/files/plasma-desktop-5.18.5-override-include-dirs.patch |
161 |
index 3118913e08d..ffbf2b64429 100644 |
162 |
--- a/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.4.1-override-include-dirs.patch |
163 |
+++ b/kde-plasma/plasma-desktop/files/plasma-desktop-5.18.5-override-include-dirs.patch |
164 |
@@ -1,19 +1,19 @@ |
165 |
-From b11915786a97f55074b7bfe4eec6f3c5cc08ae78 Mon Sep 17 00:00:00 2001 |
166 |
+From 6971b5eac2088d263527b2b4a85bb08b1a2dc792 Mon Sep 17 00:00:00 2001 |
167 |
From: Andreas Sturmlechner <asturm@g.o> |
168 |
Date: Mon, 6 Apr 2020 00:41:07 +0200 |
169 |
-Subject: [PATCH 1/2] cmake modules: Allow include dir overrides for various |
170 |
- input drivers |
171 |
+Subject: [PATCH] cmake modules: Allow include dir overrides for various input |
172 |
+ drivers |
173 |
|
174 |
FindEvdev - evdev-properties.h |
175 |
FindSynaptics - synaptics-properties.h |
176 |
FindXorgLibinput - libinput-properties.h |
177 |
- |
178 |
-Hint: Dependency for touchpad (Synaptics): xserver-properties.h (xorg-server) |
179 |
+FindXorgServer - xserver-properties.h |
180 |
--- |
181 |
cmake/modules/FindEvdev.cmake | 4 ++++ |
182 |
cmake/modules/FindSynaptics.cmake | 4 ++++ |
183 |
cmake/modules/FindXorgLibinput.cmake | 4 ++++ |
184 |
- 3 files changed, 12 insertions(+) |
185 |
+ cmake/modules/FindXorgServer.cmake | 4 ++++ |
186 |
+ 4 files changed, 16 insertions(+) |
187 |
|
188 |
diff --git a/cmake/modules/FindEvdev.cmake b/cmake/modules/FindEvdev.cmake |
189 |
index 153128a90..c19c31a96 100644 |
190 |
@@ -81,5 +81,28 @@ index 1550751ae..5b7af5e79 100644 |
191 |
include(FindPackageHandleStandardArgs) |
192 |
find_package_handle_standard_args(XorgLibinput REQUIRED_VARS XORGLIBINPUT_INCLUDE_DIRS) |
193 |
|
194 |
+diff --git a/cmake/modules/FindXorgServer.cmake b/cmake/modules/FindXorgServer.cmake |
195 |
+index 5248c6d25..9de16dba0 100644 |
196 |
+--- a/cmake/modules/FindXorgServer.cmake |
197 |
++++ b/cmake/modules/FindXorgServer.cmake |
198 |
+@@ -31,6 +31,8 @@ |
199 |
+ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
200 |
+ # SUCH DAMAGE. |
201 |
+ |
202 |
++if(NOT XORGSERVER_INCLUDE_DIRS) |
203 |
++ |
204 |
+ find_package(PkgConfig) |
205 |
+ pkg_check_modules(PC_XORGSERVER xorg-server) |
206 |
+ |
207 |
+@@ -39,6 +41,8 @@ find_path(XORGSERVER_INCLUDE_DIRS |
208 |
+ HINTS ${PC_XORGSERVER_INCLUDE_DIRS} ${PC_XORGSERVER_INCLUDEDIR} |
209 |
+ ) |
210 |
+ |
211 |
++endif() |
212 |
++ |
213 |
+ include(FindPackageHandleStandardArgs) |
214 |
+ find_package_handle_standard_args(XORGSERVER REQUIRED_VARS XORGSERVER_INCLUDE_DIRS) |
215 |
+ |
216 |
-- |
217 |
2.26.2 |
218 |
+ |
219 |
|
220 |
diff --git a/kde-plasma/plasma-desktop/plasma-desktop-5.18.5.ebuild b/kde-plasma/plasma-desktop/plasma-desktop-5.18.5.ebuild |
221 |
index bd37d0f65a0..2560f8c7928 100644 |
222 |
--- a/kde-plasma/plasma-desktop/plasma-desktop-5.18.5.ebuild |
223 |
+++ b/kde-plasma/plasma-desktop/plasma-desktop-5.18.5.ebuild |
224 |
@@ -127,8 +127,9 @@ RDEPEND="${COMMON_DEPEND} |
225 |
" |
226 |
|
227 |
PATCHES=( |
228 |
- "${FILESDIR}/${PN}-5.18.4.1-override-include-dirs.patch" # downstream patch |
229 |
"${FILESDIR}/${PN}-5.18.4.1-synaptics-header.patch" # in Plasma/5.19 |
230 |
+ "${FILESDIR}/${P}-findxorgserver.patch" # in Plasma/5.19 |
231 |
+ "${FILESDIR}/${P}-override-include-dirs.patch" # downstream patch |
232 |
) |
233 |
|
234 |
src_unpack() { |
235 |
@@ -149,6 +150,7 @@ src_configure() { |
236 |
$(cmake_use_find_package fontconfig Fontconfig) |
237 |
-DEvdev_INCLUDE_DIRS="${WORKDIR}"/include |
238 |
-DXORGLIBINPUT_INCLUDE_DIRS="${WORKDIR}"/include |
239 |
+ -DXORGSERVER_INCLUDE_DIRS="${WORKDIR}"/include |
240 |
-DSynaptics_INCLUDE_DIRS="${WORKDIR}"/include |
241 |
$(cmake_use_find_package ibus IBus) |
242 |
$(cmake_use_find_package scim SCIM) |