Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] libX11: patch for new symbols
@ 2021-07-27  9:41 dkwo
  2021-07-27 14:02 ` ericonr
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dkwo @ 2021-07-27  9:41 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

There is a new pull request by dkwo against master on the void-packages repository

https://github.com/dkwo/void-packages xfix
https://github.com/void-linux/void-packages/pull/32216

libX11: patch for new symbols
Apply upstream merge request to handle the new _EVDEVK xorgproto symbols,
so that xkbcomp does not generate hundreds of warnings.
See https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/79

This works for me, and it fixes 
https://github.com/void-linux/void-packages/issues/31870

A patch file from https://github.com/void-linux/void-packages/pull/32216.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xfix-32216.patch --]
[-- Type: text/x-diff, Size: 2842 bytes --]

From ceade2dae2e32313a420c33e8535bdb73181c1b1 Mon Sep 17 00:00:00 2001
From: dkwo <nicolopiazzalunga@gmail.com>
Date: Tue, 27 Jul 2021 11:36:40 +0200
Subject: [PATCH] libX11: patch for new symbols

Apply upstream merge request to handle the new _EVDEVK xorgproto symbols,
so that xkbcomp does not generate hundreds of warnings.
See https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/79
---
 .../handle_new_xorgproto_symbols.patch        | 42 +++++++++++++++++++
 srcpkgs/libX11/template                       |  2 +-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/libX11/patches/handle_new_xorgproto_symbols.patch

diff --git a/srcpkgs/libX11/patches/handle_new_xorgproto_symbols.patch b/srcpkgs/libX11/patches/handle_new_xorgproto_symbols.patch
new file mode 100644
index 000000000000..630d748009e5
--- /dev/null
+++ b/srcpkgs/libX11/patches/handle_new_xorgproto_symbols.patch
@@ -0,0 +1,42 @@
+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/srcpkgs/libX11/template b/srcpkgs/libX11/template
index fa008a24b734..202fcdb18432 100644
--- a/srcpkgs/libX11/template
+++ b/srcpkgs/libX11/template
@@ -1,7 +1,7 @@
 # Template file for 'libX11'
 pkgname=libX11
 version=1.7.2
-revision=2
+revision=3
 build_style=gnu-configure
 configure_args="--enable-ipv6 --enable-xlocaledir --without-xmlto
  --enable-static --enable-malloc0returnsnull"

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-31  2:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-27  9:41 [PR PATCH] libX11: patch for new symbols dkwo
2021-07-27 14:02 ` ericonr
2021-07-27 14:14 ` dkwo
2021-07-28  3:30 ` ericonr
2021-07-28 15:26 ` dkwo
2021-07-31  2:14 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).