diff --git a/x11-packages/xwayland/build.sh b/x11-packages/xwayland/build.sh index ee61b7856..bfd1fce5c 100644 --- a/x11-packages/xwayland/build.sh +++ b/x11-packages/xwayland/build.sh @@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://xorg.freedesktop.org/wiki/ TERMUX_PKG_DESCRIPTION="Wayland X11 server" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="Leonid Plyushch " -TERMUX_PKG_VERSION=1.20.3 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_VERSION=1.20.5 TERMUX_PKG_SRCURL=https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-${TERMUX_PKG_VERSION}.tar.bz2 -TERMUX_PKG_SHA256=1b3ce466c12cacbe2252b3ad5b0ed561972eef9d09e75900d65fb1e21f9201de +TERMUX_PKG_SHA256=a81d8243f37e75a03d4f8c55f96d0bc25802be6ec45c3bfa5cb614c6d01bac9d TERMUX_PKG_DEPENDS="libandroid-shmem, libdrm, libpciaccess, libpixman, libx11, libxau, libxfont2, libxinerama, libxkbfile, libxshmfence, mesa, openssl, xkeyboard-config, xorg-xkbcomp, libwayland, libwayland-protocols, libepoxy" TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" diff --git a/x11-packages/xwayland/kd.patch b/x11-packages/xwayland/kd.patch deleted file mode 100644 index f15ece9ac..000000000 --- a/x11-packages/xwayland/kd.patch +++ /dev/null @@ -1,25 +0,0 @@ -+++ ./hw/xfree86/os-support/xf86_OSlib.h 2017-12-20 22:32:33.000000000 +0200 -@@ -132,7 +132,11 @@ - #if !defined(__sun) - #include - #endif -+#ifdef __ANDROID__ -+#include -+#else - #include -+#endif - #include - - extern _X_HIDDEN void xf86VTAcquire(int); -@@ -195,7 +199,11 @@ - #include - #ifdef __linux__ - #define HAS_USL_VTS -+#ifdef __ANDROID__ -+#include -+#else - #include -+#endif - #include - #define LDGMAP GIO_SCRNMAP - #define LDSMAP PIO_SCRNMAP diff --git a/x11-packages/xwayland/linux_noop.patch b/x11-packages/xwayland/linux_noop.patch deleted file mode 100644 index c21e98fef..000000000 --- a/x11-packages/xwayland/linux_noop.patch +++ /dev/null @@ -1,10 +0,0 @@ -+++ ./hw/xfree86/os-support/linux/Makefile.am 2018-11-21 22:50:02.949575248 +0200 -@@ -18,7 +18,7 @@ - XORG_CFLAGS += $(DBUS_CFLAGS) - endif - --liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \ -+liblinux_la_SOURCES = linux.h lnx_init.c $(srcdir)/../shared/ioperm_noop.c $(srcdir)/../shared/platform_noop.c \ - lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \ - $(srcdir)/../shared/VTsw_usl.c \ - $(srcdir)/../shared/posix_tty.c \ diff --git a/x11-packages/xwayland/platform_noop.c.patch b/x11-packages/xwayland/platform_noop.c.patch deleted file mode 100644 index cf3d7e6d3..000000000 --- a/x11-packages/xwayland/platform_noop.c.patch +++ /dev/null @@ -1,36 +0,0 @@ -+++ ./hw/xfree86/os-support/shared/platform_noop.c 2018-11-22 02:41:02.516704523 +0200 -@@ -0,0 +1,34 @@ -+ -+#ifdef HAVE_XORG_CONFIG_H -+#include -+#endif -+ -+/* noop platform device support */ -+#include "xf86_OSproc.h" -+#include "xf86OSpriv.h" -+ -+#include "xf86.h" -+ -+/***************************************************************************/ -+/* Video Memory Mapping section */ -+/***************************************************************************/ -+ -+void -+xf86OSInitVidMem(VidMemInfoPtr pVidMem) -+{ -+ pVidMem->initialised = TRUE; -+} -+ -+#ifdef XSERVER_PLATFORM_BUS -+#include "xf86platformBus.h" -+Bool -+xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid) -+{ -+ return FALSE; -+} -+ -+void xf86PlatformDeviceProbe(struct OdevAttributes *attribs) -+{ -+ -+} -+#endif diff --git a/x11-packages/xwayland/xf86AutoConfig.c.patch b/x11-packages/xwayland/xf86AutoConfig.c.patch deleted file mode 100644 index 4a5113133..000000000 --- a/x11-packages/xwayland/xf86AutoConfig.c.patch +++ /dev/null @@ -1,10 +0,0 @@ -+++ ./hw/xfree86/common/xf86AutoConfig.c -@@ -294,7 +294,7 @@ - xf86PciMatchDriver(md); - #endif - --#if defined(__linux__) -+#if defined(__linux__) && !defined(__ANDROID__) - xf86AddMatchedDriver(md, "modesetting"); - #endif - diff --git a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_common_compiler.h.patch b/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_common_compiler.h.patch deleted file mode 100644 index 46ed95dde..000000000 --- a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_common_compiler.h.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -uNr xorg-server-1.20.1/hw/xfree86/common/compiler.h xorg-server-1.20.1.mod/hw/xfree86/common/compiler.h ---- xorg-server-1.20.1/hw/xfree86/common/compiler.h 2018-08-07 19:31:02.000000000 +0300 -+++ xorg-server-1.20.1.mod/hw/xfree86/common/compiler.h 2018-10-08 21:07:16.804247702 +0300 -@@ -518,7 +518,7 @@ - barrier(); - } - --#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) -+#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) || defined(__ANDROID__) - #if defined(__arm32__) || defined(__mips64) - #define PORT_SIZE long - #else -@@ -758,7 +758,7 @@ - return xf86ReadMmio32Le((void *) ioBase, port); - } - --#elif defined(__arm__) && defined(__linux__) -+#elif defined(__arm__) && defined(__linux__) && !defined(__ANDROID__) - - /* for Linux on ARM, we use the LIBC inx/outx routines */ - /* note that the appropriate setup via "ioperm" needs to be done */ diff --git a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_common_xf86Config.c.patch b/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_common_xf86Config.c.patch deleted file mode 100644 index 7b459ac65..000000000 --- a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_common_xf86Config.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr xorg-server-1.20.1/hw/xfree86/common/xf86Config.c xorg-server-1.20.1.mod/hw/xfree86/common/xf86Config.c ---- xorg-server-1.20.1/hw/xfree86/common/xf86Config.c 2018-08-07 19:31:02.000000000 +0300 -+++ xorg-server-1.20.1.mod/hw/xfree86/common/xf86Config.c 2018-10-08 21:07:16.807582583 +0300 -@@ -106,7 +106,7 @@ - #define SYS_CONFIGDIRPATH "%D/X11/%X" - #endif - #ifndef PROJECTROOT --#define PROJECTROOT "/usr/X11R6" -+#define PROJECTROOT "/data/data/com.termux/files/usr/X11R6" - #endif - - static ModuleDefault ModuleDefaults[] = { diff --git a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_os-support_linux_lnx_acpi.c.patch b/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_os-support_linux_lnx_acpi.c.patch deleted file mode 100644 index b6dff7c5a..000000000 --- a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_os-support_linux_lnx_acpi.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_acpi.c xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_acpi.c ---- xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_acpi.c 2018-08-07 19:31:03.000000000 +0300 -+++ xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_acpi.c 2018-10-08 21:07:16.807582583 +0300 -@@ -15,7 +15,7 @@ - #include - #include - --#define ACPI_SOCKET "/var/run/acpid.socket" -+#define ACPI_SOCKET "/data/data/com.termux/files/usr/var/run/acpid.socket" - - #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 - #define ACPI_VIDEO_NOTIFY_PROBE 0x81 diff --git a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_os-support_linux_lnx_kmod.c.patch b/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_os-support_linux_lnx_kmod.c.patch deleted file mode 100644 index b70001f67..000000000 --- a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_os-support_linux_lnx_kmod.c.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -uNr xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_kmod.c xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_kmod.c ---- xorg-server-1.20.1/hw/xfree86/os-support/linux/lnx_kmod.c 2018-08-07 19:31:03.000000000 +0300 -+++ xorg-server-1.20.1.mod/hw/xfree86/os-support/linux/lnx_kmod.c 2018-10-08 21:07:16.810917466 +0300 -@@ -68,14 +68,6 @@ - */ - switch (pid = fork()) { - case 0: /* child */ -- /* change real/effective user ID to 0/0 as we need to -- * preinstall agpgart module for some DRM modules -- */ -- if (setreuid(0, 0)) { -- xf86Msg(X_WARNING, "LoadKernelModule: " -- "Setting of real/effective user Id to 0/0 failed"); -- } -- setenv("PATH", "/sbin", 1); - execl(mpPath, "modprobe", modName, NULL); - xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno)); - exit(EXIT_FAILURE); /* if we get here the child's exec failed */ diff --git a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_parser_scan.c.patch b/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_parser_scan.c.patch deleted file mode 100644 index 00f53c55a..000000000 --- a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_parser_scan.c.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -uNr xorg-server-1.20.1/hw/xfree86/parser/scan.c xorg-server-1.20.1.mod/hw/xfree86/parser/scan.c ---- xorg-server-1.20.1/hw/xfree86/parser/scan.c 2018-08-07 19:31:03.000000000 +0300 -+++ xorg-server-1.20.1.mod/hw/xfree86/parser/scan.c 2018-10-08 21:07:16.814252348 +0300 -@@ -873,13 +873,13 @@ - */ - - #ifndef DEFAULT_CONF_PATH --#define DEFAULT_CONF_PATH "/etc/X11/%S," \ -+#define DEFAULT_CONF_PATH "@TERMUX_PREFIX@/etc/X11/%S," \ - "%P/etc/X11/%S," \ -- "/etc/X11/%G," \ -+ "@TERMUX_PREFIX@/etc/X11/%G," \ - "%P/etc/X11/%G," \ -- "/etc/X11/%X-%M," \ -- "/etc/X11/%X," \ -- "/etc/%X," \ -+ "@TERMUX_PREFIX@/etc/X11/%X-%M," \ -+ "@TERMUX_PREFIX@/etc/X11/%X," \ -+ "@TERMUX_PREFIX@/etc/%X," \ - "%P/etc/X11/%X.%H," \ - "%P/etc/X11/%X-%M," \ - "%P/etc/X11/%X," \ diff --git a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_parser_write.c.patch b/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_parser_write.c.patch deleted file mode 100644 index f43508a3a..000000000 --- a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_parser_write.c.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff -uNr xorg-server-1.20.1/hw/xfree86/parser/write.c xorg-server-1.20.1.mod/hw/xfree86/parser/write.c ---- xorg-server-1.20.1/hw/xfree86/parser/write.c 2018-08-07 19:31:03.000000000 +0300 -+++ xorg-server-1.20.1.mod/hw/xfree86/parser/write.c 2018-10-08 21:07:16.817587230 +0300 -@@ -129,64 +129,5 @@ - int - xf86writeConfigFile(const char *filename, XF86ConfigPtr cptr) - { --#ifndef HAS_NO_UIDS -- int ret; -- -- if (getuid() != geteuid()) { -- --#if !defined(HAS_SAVED_IDS_AND_SETEUID) -- int pid, p; -- int status; -- void (*csig) (int); -- -- /* Need to fork to change ruid without loosing euid */ -- csig = OsSignal(SIGCHLD, SIG_DFL); -- switch ((pid = fork())) { -- case -1: -- ErrorF("xf86writeConfigFile(): fork failed (%s)\n", -- strerror(errno)); -- return 0; -- case 0: /* child */ -- if (setuid(getuid()) == -1) -- FatalError("xf86writeConfigFile(): " -- "setuid failed(%s)\n", strerror(errno)); -- ret = doWriteConfigFile(filename, cptr); -- exit(ret); -- break; -- default: /* parent */ -- do { -- p = waitpid(pid, &status, 0); -- } while (p == -1 && errno == EINTR); -- } -- OsSignal(SIGCHLD, csig); -- if (p != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0) -- return 1; /* success */ -- else -- return 0; -- --#else /* HAS_SAVED_IDS_AND_SETEUID */ -- int ruid, euid; -- -- ruid = getuid(); -- euid = geteuid(); -- -- if (seteuid(ruid) == -1) { -- ErrorF("xf86writeConfigFile(): seteuid(%d) failed (%s)\n", -- ruid, strerror(errno)); -- return 0; -- } -- ret = doWriteConfigFile(filename, cptr); -- -- if (seteuid(euid) == -1) { -- ErrorF("xf86writeConfigFile(): seteuid(%d) failed (%s)\n", -- euid, strerror(errno)); -- } -- return ret; -- --#endif /* HAS_SAVED_IDS_AND_SETEUID */ -- -- } -- else --#endif /* !HAS_NO_UIDS */ -- return doWriteConfigFile(filename, cptr); -+ return doWriteConfigFile(filename, cptr); - } diff --git a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_xorg-wrapper.c.patch b/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_xorg-wrapper.c.patch deleted file mode 100644 index 73293e19a..000000000 --- a/x11-packages/xwayland/xorg-server-1.20.1_hw_xfree86_xorg-wrapper.c.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -uNr xorg-server-1.20.1/hw/xfree86/xorg-wrapper.c xorg-server-1.20.1.mod/hw/xfree86/xorg-wrapper.c ---- xorg-server-1.20.1/hw/xfree86/xorg-wrapper.c 2018-08-07 19:31:04.000000000 +0300 -+++ xorg-server-1.20.1.mod/hw/xfree86/xorg-wrapper.c 2018-10-08 21:07:16.817587230 +0300 -@@ -251,23 +251,6 @@ - } - #endif - -- /* If we've found cards, and all cards support kms, drop root rights */ -- if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) { -- gid_t realgid = getgid(); -- uid_t realuid = getuid(); -- -- if (setresgid(-1, realgid, realgid) != 0) { -- fprintf(stderr, "%s: Could not drop setgid privileges: %s\n", -- progname, strerror(errno)); -- exit(1); -- } -- if (setresuid(-1, realuid, realuid) != 0) { -- fprintf(stderr, "%s: Could not drop setuid privileges: %s\n", -- progname, strerror(errno)); -- exit(1); -- } -- } -- - snprintf(buf, sizeof(buf), "%s/Xorg", SUID_WRAPPER_DIR); - - /* Check if the server is executable by our real uid */