aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-07-28 12:44:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-29 22:33:46 +0100
commitb63b6ceda629bd101b5889e61a27a6d99843460e (patch)
treec5fa53839a506fec8a92dffcbe928649f4ea8a97
parent354163db5588d87941f53a2763be62b2430cc1fc (diff)
downloadopenembedded-core-contrib-b63b6ceda629bd101b5889e61a27a6d99843460e.tar.gz
openembedded-core-contrib-b63b6ceda629bd101b5889e61a27a6d99843460e.tar.bz2
openembedded-core-contrib-b63b6ceda629bd101b5889e61a27a6d99843460e.zip
libx11: fix xkb compilation with _EVDEVK symbols
New xkeyboard-config writes defines that use _EVDEVK(), which makekeys can't parse. Take a patch from upstream to also parse these symbols. [ YOCTO #14489 ] Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11/keysym.patch46
-rw-r--r--meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb1
2 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-graphics/xorg-lib/libx11/keysym.patch b/meta/recipes-graphics/xorg-lib/libx11/keysym.patch
new file mode 100644
index 00000000000..f4d7419c02c
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/keysym.patch
@@ -0,0 +1,46 @@
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/79]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From e92efc63acd7b377faa9e534f4bf52aaa86be2a9 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer@who-t.net>
+Date: Tue, 27 Jul 2021 11:46:19 +1000
+Subject: [PATCH] makekeys: handle the new _EVDEVK xorgproto symbols
+
+These keys are all defined through a macro in the form:
+ #define XF86XK_BrightnessAuto _EVDEVK(0x0F4)
+
+The _EVDEVK macro is simply an offset of 0x10081000.
+Let's parse these lines correctly so those keysyms end up in our
+hashtables.
+
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+---
+ src/util/makekeys.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/util/makekeys.c b/src/util/makekeys.c
+index e847ef4c..4896cc53 100644
+--- a/src/util/makekeys.c
++++ b/src/util/makekeys.c
+@@ -78,6 +78,18 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix)
+ return 1;
+ }
+
++ /* See if we can parse one of the _EVDEVK symbols */
++ i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val);
++ if (i == 2 && (tmp = strstr(key, "XK_"))) {
++ memcpy(prefix, key, (size_t)(tmp - key));
++ prefix[tmp - key] = '\0';
++ tmp += 3;
++ memmove(key, tmp, strlen(tmp) + 1);
++
++ *val += 0x10081000;
++ return 1;
++ }
++
+ /* Now try to catch alias (XK_foo XK_bar) definitions, and resolve them
+ * immediately: if the target is in the form XF86XK_foo, we need to
+ * canonicalise this to XF86foo before we do the lookup. */
+--
+GitLab
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb b/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb
index 5d7e9e3783d..c9ddc12f089 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.7.2.bb
@@ -12,6 +12,7 @@ PE = "1"
SRC_URI += "file://Fix-hanging-issue-in-_XReply.patch \
file://disable_tests.patch \
+ file://keysym.patch \
"
SRC_URI[sha256sum] = "1cfa35e37aaabbe4792e9bb690468efefbfbf6b147d9c69d6f90d13c3092ea6c"