libxkbcommon: corrected optional dependency for x11 support

This commit is contained in:
Tim Biermann 2023-07-29 22:12:55 +02:00
parent 237fc29dbe
commit dcde082cbf
Signed by: tb
GPG Key ID: 42F8B4E30B673606
3 changed files with 6 additions and 63 deletions

View File

@ -1,5 +1,5 @@
untrusted comment: verify with /etc/ports/opt.pub
RWSE3ohX2g5d/Wel+qr5S+AwzvEIrDTbL6/NUZZmpXSHdcf5UYzepj+I22wFYU2kG6IPdWcuTznWy+96+jdQ8FYzjGC6o6I37wk=
SHA256 (Pkgfile) = 04e2ebffa0f2ae8b309cfda58e048c5e6c9ed798fc2d14686cd8b2314685082f
RWSE3ohX2g5d/esMvR4hhfgku6ZVYLYQQOT3rC9N/1Z81dKkLRdzT+VlVoSW7sLzkM2yoO1lscbU2EgMh7G+maMFLuCW9jAf0gc=
SHA256 (Pkgfile) = 02b79cda1179fa54f5fb20fad5914a709a5410c9c3fc12af3547b08b6e675d25
SHA256 (.footprint) = 2d0d51a2acd64ab484c99366fe2e2840acf0ffcb21b75366b8d9f6745f5abb4b
SHA256 (xkbcommon-1.5.0.tar.gz) = 053e6a6a2c3179eba20c3ada827fb8833a6663b7ffd278fdb8530c3cbf924780

View File

@ -1,57 +0,0 @@
From 320f56d2a4a31026e5c8d3b60303af98bf885e1b Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Sun, 4 Sep 2022 00:51:07 +0200
Subject: [PATCH] interactive-wayland: Fix interface versioning
We need to request the lower version of the interface versions we
support and the server supports, not the higher version.
Using the higher version caused crashes due to unbound callbacks on
GNOME, which supports a higher version of `xdg_wm_base`.
---
tools/interactive-wayland.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/interactive-wayland.c b/tools/interactive-wayland.c
index d23432d4..890680f5 100644
--- a/tools/interactive-wayland.c
+++ b/tools/interactive-wayland.c
@@ -42,7 +42,7 @@
#include "xdg-shell-client-protocol.h"
#include <wayland-util.h>
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
struct interactive_dpy {
struct wl_display *dpy;
@@ -557,7 +557,7 @@ seat_create(struct interactive_dpy *inter, struct wl_registry *registry,
seat->global_name = name;
seat->inter = inter;
seat->wl_seat = wl_registry_bind(registry, name, &wl_seat_interface,
- MAX(version, 5));
+ MIN(version, 5));
wl_seat_add_listener(seat->wl_seat, &seat_listener, seat);
ret = asprintf(&seat->name_str, "seat:%d",
wl_proxy_get_id((struct wl_proxy *) seat->wl_seat));
@@ -607,17 +607,17 @@ registry_global(void *data, struct wl_registry *registry, uint32_t name,
else if (strcmp(interface, "xdg_wm_base") == 0) {
inter->shell = wl_registry_bind(registry, name,
&xdg_wm_base_interface,
- MAX(version, 2));
+ MIN(version, 2));
xdg_wm_base_add_listener(inter->shell, &shell_listener, inter);
}
else if (strcmp(interface, "wl_compositor") == 0) {
inter->compositor = wl_registry_bind(registry, name,
&wl_compositor_interface,
- MAX(version, 1));
+ MIN(version, 1));
}
else if (strcmp(interface, "wl_shm") == 0) {
inter->shm = wl_registry_bind(registry, name, &wl_shm_interface,
- MAX(version, 1));
+ MIN(version, 1));
}
}

View File

@ -1,17 +1,17 @@
# Description: A library to handle keyboard descriptions.
# URL: https://xkbcommon.org/
# Maintainer: Danny Rawlins, crux at romster dot me
# Maintainer: CRUX System Team, core-ports at crux dot nu
# Depends on: libxml2
# Optional: wayland-protocols xorg-server
# Optional: wayland-protocols xkeyboard-config
name=libxkbcommon
version=1.5.0
release=2
release=3
source=(https://github.com/xkbcommon/libxkbcommon/archive/xkbcommon-$version.tar.gz)
build() {
prt-get isinst wayland-protocols || PKGMK_XKBCOMMON+=' -D enable-wayland=false'
prt-get isinst xorg-server || PKGMK_XKBCOMMON+=' -D enable-x11=false'
prt-get isinst xkeyboard-config || PKGMK_XKBCOMMON+=' -D enable-x11=false'
meson setup build libxkbcommon-xkbcommon-$version $PKGMK_XKBCOMMON \
--prefix=/usr \