libwayland: drop libxkbcommon dependency + add fallback if XDG_RUNTIME_DIR is not set

This commit is contained in:
Leonid Pliushch 2019-07-01 22:34:50 +03:00 committed by Yaksh Bariya
parent 98718c7491
commit 4473f8ede4
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
2 changed files with 48 additions and 2 deletions

View File

@ -3,10 +3,10 @@ TERMUX_PKG_DESCRIPTION="Wayland protocol library"
TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>" TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com>"
TERMUX_PKG_VERSION=1.17.0 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_SRCURL=https://wayland.freedesktop.org/releases/wayland-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=72aa11b8ac6e22f4777302c9251e8fec7655dc22f9d94ee676c6b276f95f91a4 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_PKG_EXTRA_CONFIGURE_ARGS="--disable-documentation --with-host-scanner"
termux_step_pre_configure() { termux_step_pre_configure() {

View File

@ -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;