From 4473f8ede4716e334a71e398ff36949d5670ed18 Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Mon, 1 Jul 2019 22:34:50 +0300 Subject: [PATCH] libwayland: drop libxkbcommon dependency + add fallback if XDG_RUNTIME_DIR is not set --- x11-packages/libwayland/build.sh | 4 +- x11-packages/libwayland/xdg-runtime-dir.patch | 46 +++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 x11-packages/libwayland/xdg-runtime-dir.patch diff --git a/x11-packages/libwayland/build.sh b/x11-packages/libwayland/build.sh index c0e4def42..c5edab17e 100644 --- a/x11-packages/libwayland/build.sh +++ b/x11-packages/libwayland/build.sh @@ -3,10 +3,10 @@ TERMUX_PKG_DESCRIPTION="Wayland protocol library" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="Leonid Plyushch " TERMUX_PKG_VERSION=1.17.0 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://wayland.freedesktop.org/releases/wayland-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4 -TERMUX_PKG_DEPENDS="libandroid-support, libffi, libxml2, libexpat, libxkbcommon" +TERMUX_PKG_DEPENDS="libandroid-support, libffi, libxml2, libexpat" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-documentation --with-host-scanner" termux_step_pre_configure() { diff --git a/x11-packages/libwayland/xdg-runtime-dir.patch b/x11-packages/libwayland/xdg-runtime-dir.patch new file mode 100644 index 000000000..208f65dd6 --- /dev/null +++ b/x11-packages/libwayland/xdg-runtime-dir.patch @@ -0,0 +1,46 @@ +diff -uNr wayland-1.17.0/cursor/os-compatibility.c wayland-1.17.0.mod/cursor/os-compatibility.c +--- wayland-1.17.0/cursor/os-compatibility.c 2019-03-21 02:55:25.000000000 +0200 ++++ wayland-1.17.0.mod/cursor/os-compatibility.c 2019-07-01 22:32:38.256153848 +0300 +@@ -111,8 +111,7 @@ + + path = getenv("XDG_RUNTIME_DIR"); + if (!path) { +- errno = ENOENT; +- return -1; ++ path = "@TERMUX_PREFIX@/tmp"; + } + + name = malloc(strlen(path) + sizeof(template)); +diff -uNr wayland-1.17.0/src/wayland-client.c wayland-1.17.0.mod/src/wayland-client.c +--- wayland-1.17.0/src/wayland-client.c 2019-03-21 02:55:25.000000000 +0200 ++++ wayland-1.17.0.mod/src/wayland-client.c 2019-07-01 22:33:25.633279646 +0300 +@@ -962,11 +962,7 @@ + + runtime_dir = getenv("XDG_RUNTIME_DIR"); + if (!runtime_dir && !path_is_absolute) { +- wl_log("error: XDG_RUNTIME_DIR not set in the environment.\n"); +- /* to prevent programs reporting +- * "failed to create display: Success" */ +- errno = ENOENT; +- return -1; ++ runtime_dir = "@TERMUX_PREFIX@/tmp"; + } + + fd = wl_os_socket_cloexec(PF_LOCAL, SOCK_STREAM, 0); +diff -uNr wayland-1.17.0/src/wayland-server.c wayland-1.17.0.mod/src/wayland-server.c +--- wayland-1.17.0/src/wayland-server.c 2019-03-21 02:55:25.000000000 +0200 ++++ wayland-1.17.0.mod/src/wayland-server.c 2019-07-01 22:34:05.100325582 +0300 +@@ -1427,12 +1427,7 @@ + + runtime_dir = getenv("XDG_RUNTIME_DIR"); + if (!runtime_dir) { +- wl_log("error: XDG_RUNTIME_DIR not set in the environment\n"); +- +- /* to prevent programs reporting +- * "failed to add socket: Success" */ +- errno = ENOENT; +- return -1; ++ runtime_dir = "@TERMUX_PREFIX@/tmp"; + } + + s->addr.sun_family = AF_LOCAL;