commit: fb8397e1b09297f6255ae5d3867be60082317d3c Author: Dave Hughes <davidhughes205 <AT> gmail <DOT> com> AuthorDate: Thu Apr 29 19:11:09 2021 +0000 Commit: Dave Hughes <davidhughes205 <AT> gmail <DOT> com> CommitDate: Thu Apr 29 19:11:09 2021 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=fb8397e1
x11-base/xorg-server: sync with ::gentoo Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Dave Hughes <davidhughes205 <AT> gmail.com> x11-base/xorg-server/Manifest | 2 +- x11-base/xorg-server/files/xdm-setup.initd-1 | 3 +- x11-base/xorg-server/files/xdm.confd-4 | 2 +- x11-base/xorg-server/files/xdm.initd-11 | 3 +- .../files/xorg-server-1.17.4-arm-musl.patch | 20 --- .../xorg-server-1.20.11.fix-musl-input_event.patch | 43 +++++ ...ck-the-shm-dir-at-run-time-not-build-time.patch | 174 --------------------- ...1.20.4-shm-Use-memfd_create-when-possible.patch | 89 ----------- ...ndent-shm_tmpfile-to-follow-our-standards.patch | 72 --------- x11-base/xorg-server/metadata.xml | 4 +- ...er-1.20.5.ebuild => xorg-server-1.20.11.ebuild} | 96 ++++++------ 11 files changed, 101 insertions(+), 407 deletions(-) diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest index f978f86..fad1256 100644 --- a/x11-base/xorg-server/Manifest +++ b/x11-base/xorg-server/Manifest @@ -1 +1 @@ -DIST xorg-server-1.20.5.tar.bz2 6126757 BLAKE2B 2374c6f39acd80174d9cf9c15b6a75f420de3a9b7b51a41385a326fed106fc57fdc5a0a4a08beba36a8d65bff1c8c8d35bb50c73c5285ee206f3293a212369be SHA512 625f0626b122cf95600abe382c3217348999357a0e2d2443092f1b67cff1c98d7ef09303884ceaeac181e0555dc56b0d4d44bda45cc464dac2d9a50c5b32d631 +DIST xorg-server-1.20.11.tar.bz2 6476116 BLAKE2B 71ec31c4ed050a3e27fadd525f1039895e43571c04b0a1efa9b35fda318f17b3c89d403c914c591345e7d245a7ebbd6e0f206e4415c1d54f1368fb0735a3d7ef SHA512 1017015b9fd5d53788abe3641d877e6df8609841fa5c1847c0a5e133ddcc1b758a5d695304ebd36828099ec201a85b6b70b46f5ea4f81c5bd3a16fa6e175e3c2 diff --git a/x11-base/xorg-server/files/xdm-setup.initd-1 b/x11-base/xorg-server/files/xdm-setup.initd-1 index 917cd12..a9748a8 100644 --- a/x11-base/xorg-server/files/xdm-setup.initd-1 +++ b/x11-base/xorg-server/files/xdm-setup.initd-1 @@ -1,7 +1,6 @@ #!/sbin/openrc-run -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -# $Id$ depend() { need localmount diff --git a/x11-base/xorg-server/files/xdm.confd-4 b/x11-base/xorg-server/files/xdm.confd-4 index c82fece..880d463 100644 --- a/x11-base/xorg-server/files/xdm.confd-4 +++ b/x11-base/xorg-server/files/xdm.confd-4 @@ -5,6 +5,6 @@ # in your /etc/inittab file so that you don't get a dead keyboard. CHECKVT=7 -# What display manager do you use ? [ xdm | gdm | kdm | gpe | entrance ] +# What display manager do you use ? [ xdm | gdm | sddm | gpe | lightdm | entrance ] # NOTE: If this is set in /etc/rc.conf, that setting will override this one. DISPLAYMANAGER="xdm" diff --git a/x11-base/xorg-server/files/xdm.initd-11 b/x11-base/xorg-server/files/xdm.initd-11 index ce76c56..34b22be 100644 --- a/x11-base/xorg-server/files/xdm.initd-11 +++ b/x11-base/xorg-server/files/xdm.initd-11 @@ -1,7 +1,6 @@ #!/sbin/openrc-run -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License, v2 -# $Id$ # This is here to serve as a note to myself, and future developers. # diff --git a/x11-base/xorg-server/files/xorg-server-1.17.4-arm-musl.patch b/x11-base/xorg-server/files/xorg-server-1.17.4-arm-musl.patch deleted file mode 100644 index e661ae1..0000000 --- a/x11-base/xorg-server/files/xorg-server-1.17.4-arm-musl.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ./hw/xfree86/common/compiler.h.orig -+++ ./hw/xfree86/common/compiler.h -@@ -721,7 +721,7 @@ - :"r"(val), "r"(addr), "i"(ASI_PL)); - } - --#elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) -+#elif defined(__mips__) || (defined(__arm32__) && !defined(__GLIBC__)) - #if defined(__arm32__) || defined(__mips64) - #define PORT_SIZE long - #else -@@ -996,7 +996,7 @@ - return xf86ReadMmio32Le((void *) ioBase, port); - } - --#elif defined(__arm__) && defined(__linux__) -+#elif defined(__arm__) && defined(__GLIBC__) - - /* 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-base/xorg-server/files/xorg-server-1.20.11.fix-musl-input_event.patch b/x11-base/xorg-server/files/xorg-server-1.20.11.fix-musl-input_event.patch new file mode 100644 index 0000000..ec1ae8f --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.20.11.fix-musl-input_event.patch @@ -0,0 +1,43 @@ +Source: @pullmoll +Upstream: no +Reason: Gracefully handle transition to 64 bit time with musl-1.2.1 + +--- hw/dmx/input/usb-keyboard.c 2020-12-01 17:32:25.000000000 +0100 ++++ hw/dmx/input/usb-keyboard.c 2020-12-01 20:28:02.489695853 +0100 +@@ -278,8 +278,8 @@ + + gettimeofday(&tv, NULL); + for (i = 0; i < 5; i++) { +- event.time.tv_sec = tv.tv_sec; +- event.time.tv_usec = tv.tv_usec; ++ event.input_event_sec = tv.tv_sec; ++ event.input_event_usec = tv.tv_usec; + event.type = EV_LED; + if (i == 0) + led = 1; /* LED_CAPSL == 0x01 */ +--- hw/dmx/examples/ev.c 2020-12-01 17:32:25.000000000 +0100 ++++ hw/dmx/examples/ev.c 2020-12-01 20:31:24.585605950 +0100 +@@ -114,8 +114,8 @@ + if ((fd = open(name, O_RDWR, 0)) >= 0) { + printf("%s: open, fd = %d\n", name, fd); + for (i = 0; i < LED_MAX; i++) { +- event.time.tv_sec = time(0); +- event.time.tv_usec = 0; ++ event.input_event_sec = time(0); ++ event.input_event_usec = 0; + event.type = EV_LED; + event.code = i; + event.value = 0; +@@ -123,9 +123,10 @@ + } + + while ((rc = read(fd, &event, sizeof(event))) > 0) { ++ struct timeval t = {event.input_event_sec, event.input_event_usec}; + printf("%-24.24s.%06lu type 0x%04x; code 0x%04x;" + " value 0x%08x; ", +- ctime(&event.time.tv_sec), +- event.time.tv_usec, event.type, event.code, event.value); ++ ctime(&t.tv_sec), ++ t.tv_usec, event.type, event.code, event.value); + switch (event.type) { + case EV_KEY: diff --git a/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch b/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch deleted file mode 100644 index 54ed629..0000000 --- a/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch +++ /dev/null @@ -1,174 +0,0 @@ -From 19f6cb570becbc4e355807199c6e251fc7935132 Mon Sep 17 00:00:00 2001 -From: Eric Anholt <e...@anholt.net> -Date: Wed, 19 Sep 2018 13:28:06 -0700 -Subject: [PATCH xserver] shm: Pick the shm dir at run time, not build time. - -Prodding the builder's filesystem for tmp dirs doesn't necessarily -tell you anything about what the actual host's filesystem is going to -look like, so we should just try the dirs at runtime. - -Signed-off-by: Eric Anholt <e...@anholt.net> ---- - Xext/shm.c | 48 +++++++++++++++++++++++++---------------- - configure.ac | 43 ------------------------------------ - include/dix-config.h.in | 3 --- - include/meson.build | 5 ----- - 4 files changed, 29 insertions(+), 70 deletions(-) - -diff --git a/Xext/shm.c b/Xext/shm.c -index ed43b9202..2739a59e7 100644 ---- a/Xext/shm.c -+++ b/Xext/shm.c -@@ -1194,36 +1194,46 @@ ProcShmAttachFd(ClientPtr client) - static int - shm_tmpfile(void) - { --#ifdef SHMDIR -+ const char *shmdirs[] = { -+ "/run/shm", -+ "/var/tmp", -+ "/tmp", -+ }; - int fd; -- char template[] = SHMDIR "/shmfd-XXXXXX"; -+ - #ifdef O_TMPFILE -- fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); -- if (fd >= 0) { -- DebugF ("Using O_TMPFILE\n"); -- return fd; -+ for (int i = 0; i < ARRAY_SIZE(shmdirs); i++) { -+ fd = open(shmdirs[i], O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); -+ if (fd >= 0) { -+ DebugF ("Using O_TMPFILE\n"); -+ return fd; -+ } - } - ErrorF ("Not using O_TMPFILE\n"); - #endif -+ -+ for (int i = 0; i < ARRAY_SIZE(shmdirs); i++) { -+ char template[PATH_MAX]; -+ snprintf(template, ARRAY_SIZE(template), "%s/shmfd-XXXXXX", shmdirs[i]); - #ifdef HAVE_MKOSTEMP -- fd = mkostemp(template, O_CLOEXEC); -+ fd = mkostemp(template, O_CLOEXEC); - #else -- fd = mkstemp(template); -+ fd = mkstemp(template); - #endif -- if (fd < 0) -- return -1; -- unlink(template); -+ if (fd < 0) -+ continue; -+ unlink(template); - #ifndef HAVE_MKOSTEMP -- int flags = fcntl(fd, F_GETFD); -- if (flags != -1) { -- flags |= FD_CLOEXEC; -- (void) fcntl(fd, F_SETFD, &flags); -- } -+ int flags = fcntl(fd, F_GETFD); -+ if (flags != -1) { -+ flags |= FD_CLOEXEC; -+ (void) fcntl(fd, F_SETFD, &flags); -+ } - #endif -- return fd; --#else -+ return fd; -+ } -+ - return -1; --#endif - } - - static int -diff --git a/configure.ac b/configure.ac -index 359b62cb5..57a233102 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1115,49 +1115,6 @@ case "$DRI2,$HAVE_DRI2PROTO" in - esac - AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) - --dnl --dnl Locate a suitable tmp file system for creating shared memeory files --dnl -- --AC_ARG_WITH(shared-memory-dir, AS_HELP_STRING([--with-shared-memory-dir=PATH], [Path to directory in a world-writable temporary directory for anonymous shared memory (default: auto)]), --[], --[with_shared_memory_dir=yes]) -- --shmdirs="/run/shm /var/tmp /tmp" -- --case x"$with_shared_memory_dir" in --xyes) -- for dir in $shmdirs; do -- case x"$with_shared_memory_dir" in -- xyes) -- echo Checking temp dir "$dir" -- if test -d "$dir"; then -- with_shared_memory_dir="$dir" -- fi -- ;; -- esac -- done -- ;; --x/*) -- ;; --xno) -- ;; --*) -- AC_MSG_ERROR([Invalid directory specified for --with-shared-memory-dir: $with_shared_memory_dir]) -- ;; --esac -- --case x"$with_shared_memory_dir" in --xyes) -- AC_MSG_ERROR([No directory found for shared memory temp files.]) -- ;; --xno) -- ;; --*) -- AC_DEFINE_UNQUOTED(SHMDIR, ["$with_shared_memory_dir"], [Directory for shared memory temp files]) -- ;; --esac -- - AC_ARG_ENABLE(xtrans-send-fds, AS_HELP_STRING([--disable-xtrans-send-fds], [Use Xtrans support for fd passing (default: auto)]), [XTRANS_SEND_FDS=$enableval], [XTRANS_SEND_FDS=auto]) - - case "x$XTRANS_SEND_FDS" in -diff --git a/include/dix-config.h.in b/include/dix-config.h.in -index f8df86608..3bd22b8bb 100644 ---- a/include/dix-config.h.in -+++ b/include/dix-config.h.in -@@ -452,9 +452,6 @@ - /* Wrap SIGBUS to catch MIT-SHM faults */ - #undef BUSFAULT - --/* Directory for shared memory temp files */ --#undef SHMDIR -- - /* Don't let Xdefs.h define 'pointer' */ - #define _XTYPEDEF_POINTER 1 - -diff --git a/include/meson.build b/include/meson.build -index 4a0c12f5a..04c41e999 100644 ---- a/include/meson.build -+++ b/include/meson.build -@@ -91,11 +91,6 @@ conf_data.set('SYSTEMD_LOGIND', build_systemd_logind) - conf_data.set('NEED_DBUS', build_systemd_logind or build_hal) - conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd') - --# XXX: SHMDIR is weird in autoconf, probing the build system for --# various tmp directories. Could we replace it with C code at runtime --# that just uses whatever directory works? --conf_data.set_quoted('SHMDIR', '/tmp') -- - conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found()) - conf_data.set('WITH_LIBDRM', libdrm_dep.found()) - conf_data.set('GLAMOR_HAS_EGL_QUERY_DMABUF', --- -2.19.2 - diff --git a/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Use-memfd_create-when-possible.patch b/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Use-memfd_create-when-possible.patch deleted file mode 100644 index fce2594..0000000 --- a/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Use-memfd_create-when-possible.patch +++ /dev/null @@ -1,89 +0,0 @@ -From f6753c117ef0f83499d5e2d6dda226fec9ddf803 Mon Sep 17 00:00:00 2001 -From: Alexander Volkov <a.vol...@rusbitech.ru> -Date: Mon, 11 Feb 2019 18:54:10 +0300 -Subject: [PATCH xserver] shm: Use memfd_create when possible - -It doesn't require shared memory dir and thus allows -to avoid cases when this dir is detected incorrectly, -as in https://bugreports.qt.io/browse/QTBUG-71440 - -Signed-off-by: Alexander Volkov <a.vol...@rusbitech.ru> ---- - Xext/shm.c | 12 ++++++++++++ - configure.ac | 2 +- - include/dix-config.h.in | 3 +++ - include/meson.build | 1 + - 4 files changed, 17 insertions(+), 1 deletion(-) - -diff --git a/Xext/shm.c b/Xext/shm.c -index 2739a59e7..506fd4df1 100644 ---- a/Xext/shm.c -+++ b/Xext/shm.c -@@ -35,6 +35,9 @@ in this Software without prior written authorization from The Open Group. - #include <sys/types.h> - #include <sys/ipc.h> - #include <sys/shm.h> -+#ifdef HAVE_MEMFD_CREATE -+#include <sys/mman.h> -+#endif - #include <unistd.h> - #include <sys/stat.h> - #include <fcntl.h> -@@ -1201,6 +1204,15 @@ shm_tmpfile(void) - }; - int fd; - -+#ifdef HAVE_MEMFD_CREATE -+ fd = memfd_create("xorg", MFD_CLOEXEC|MFD_ALLOW_SEALING); -+ if (fd != -1) { -+ fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK); -+ DebugF ("Using memfd_create\n"); -+ return fd; -+ } -+#endif -+ - #ifdef O_TMPFILE - for (int i = 0; i < ARRAY_SIZE(shmdirs); i++) { - fd = open(shmdirs[i], O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); -diff --git a/configure.ac b/configure.ac -index 0ca96aeb8..79ff7fa64 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -159,7 +159,7 @@ dnl Checks for library functions. - AC_CHECK_FUNCS([backtrace geteuid getuid issetugid getresuid \ - getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \ - mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \ -- walkcontext setitimer poll epoll_create1 mkostemp]) -+ walkcontext setitimer poll epoll_create1 mkostemp memfd_create]) - AC_CONFIG_LIBOBJ_DIR([os]) - AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\ - timingsafe_memcmp]) -diff --git a/include/dix-config.h.in b/include/dix-config.h.in -index 855b3d50c..9eb1a924e 100644 ---- a/include/dix-config.h.in -+++ b/include/dix-config.h.in -@@ -128,6 +128,9 @@ - /* Define to 1 if you have the <linux/fb.h> header file. */ - #undef HAVE_LINUX_FB_H - -+/* Define to 1 if you have the `memfd_create' function. */ -+#undef HAVE_MEMFD_CREATE -+ - /* Define to 1 if you have the `mkostemp' function. */ - #undef HAVE_MKOSTEMP - -diff --git a/include/meson.build b/include/meson.build -index 04c41e999..bbd5a6690 100644 ---- a/include/meson.build -+++ b/include/meson.build -@@ -141,6 +141,7 @@ conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid')) - conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred')) - conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname')) - conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid')) -+conf_data.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create')) - conf_data.set('HAVE_MKOSTEMP', cc.has_function('mkostemp')) - conf_data.set('HAVE_MMAP', cc.has_function('mmap')) - conf_data.set('HAVE_POLL', cc.has_function('poll')) --- -2.19.2 - diff --git a/x11-base/xorg-server/files/xorg-server-1.20.4-shm-reindent-shm_tmpfile-to-follow-our-standards.patch b/x11-base/xorg-server/files/xorg-server-1.20.4-shm-reindent-shm_tmpfile-to-follow-our-standards.patch deleted file mode 100644 index 1ce9e13..0000000 --- a/x11-base/xorg-server/files/xorg-server-1.20.4-shm-reindent-shm_tmpfile-to-follow-our-standards.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 804a9b4f57107fa2d0ed1ae0becda5bebaffe6e1 Mon Sep 17 00:00:00 2001 -From: Eric Anholt <e...@anholt.net> -Date: Wed, 19 Sep 2018 13:20:12 -0700 -Subject: [PATCH xserver] shm: reindent shm_tmpfile to follow our standards. - -Signed-off-by: Eric Anholt <e...@anholt.net> ---- - Xext/shm.c | 40 ++++++++++++++++++++-------------------- - 1 file changed, 20 insertions(+), 20 deletions(-) - -diff --git a/Xext/shm.c b/Xext/shm.c -index 589ed0b4d..ed43b9202 100644 ---- a/Xext/shm.c -+++ b/Xext/shm.c -@@ -1195,34 +1195,34 @@ static int - shm_tmpfile(void) - { - #ifdef SHMDIR -- int fd; -- char template[] = SHMDIR "/shmfd-XXXXXX"; -+ int fd; -+ char template[] = SHMDIR "/shmfd-XXXXXX"; - #ifdef O_TMPFILE -- fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); -- if (fd >= 0) { -- DebugF ("Using O_TMPFILE\n"); -- return fd; -- } -- ErrorF ("Not using O_TMPFILE\n"); -+ fd = open(SHMDIR, O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); -+ if (fd >= 0) { -+ DebugF ("Using O_TMPFILE\n"); -+ return fd; -+ } -+ ErrorF ("Not using O_TMPFILE\n"); - #endif - #ifdef HAVE_MKOSTEMP -- fd = mkostemp(template, O_CLOEXEC); -+ fd = mkostemp(template, O_CLOEXEC); - #else -- fd = mkstemp(template); -+ fd = mkstemp(template); - #endif -- if (fd < 0) -- return -1; -- unlink(template); -+ if (fd < 0) -+ return -1; -+ unlink(template); - #ifndef HAVE_MKOSTEMP -- int flags = fcntl(fd, F_GETFD); -- if (flags != -1) { -- flags |= FD_CLOEXEC; -- (void) fcntl(fd, F_SETFD, &flags); -- } -+ int flags = fcntl(fd, F_GETFD); -+ if (flags != -1) { -+ flags |= FD_CLOEXEC; -+ (void) fcntl(fd, F_SETFD, &flags); -+ } - #endif -- return fd; -+ return fd; - #else -- return -1; -+ return -1; - #endif - } - --- -2.19.2 - diff --git a/x11-base/xorg-server/metadata.xml b/x11-base/xorg-server/metadata.xml index 74e5219..30e7cd9 100644 --- a/x11-base/xorg-server/metadata.xml +++ b/x11-base/xorg-server/metadata.xml @@ -7,12 +7,12 @@ </maintainer> <use> <flag name="dmx">Build the Distributed Multiheaded X server</flag> - <flag name="glamor">Enable Glamor OpenGL 2D acceleration</flag> + <flag name="elogind">Use elogind to get control over framebuffer when running as regular user</flag> <flag name="kdrive">Build the kdrive X servers</flag> <flag name="unwind">Enable libunwind usage for backtraces</flag> <flag name="xcsecurity">Build Security extension</flag> - <flag name="xnest">Build the Xnest server</flag> <flag name="xephyr">Build the Xephyr server</flag> + <flag name="xnest">Build the Xnest server</flag> <flag name="xorg">Build the Xorg X server (HIGHLY RECOMMENDED)</flag> <flag name="xvfb">Build the Xvfb server</flag> </use> diff --git a/x11-base/xorg-server/xorg-server-1.20.5.ebuild b/x11-base/xorg-server/xorg-server-1.20.11.ebuild similarity index 75% rename from x11-base/xorg-server/xorg-server-1.20.5.ebuild rename to x11-base/xorg-server/xorg-server-1.20.11.ebuild index dfc7110..a1a3a2f 100644 --- a/x11-base/xorg-server/xorg-server-1.20.5.ebuild +++ b/x11-base/xorg-server/xorg-server-1.20.11.ebuild @@ -1,23 +1,24 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 XORG_DOC=doc -XORG_EAUTORECONF="yes" -inherit xorg-3 multilib flag-o-matic +inherit xorg-3 multilib flag-o-matic toolchain-funcs EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git" DESCRIPTION="X.Org X servers" SLOT="0/${PV}" if [[ ${PV} != 9999* ]]; then - KEYWORDS="arm" + KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" fi IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb" -IUSE="${IUSE_SERVERS} debug elogind +glamor ipv6 libressl minimal selinux +suid systemd +udev unwind xcsecurity" +IUSE="${IUSE_SERVERS} debug +elogind ipv6 libressl minimal selinux suid systemd test +udev unwind xcsecurity" +RESTRICT="!test? ( test )" -CDEPEND=">=app-eselect/eselect-opengl-1.3.0 +CDEPEND=" + media-libs/libglvnd[X] !libressl? ( dev-libs/openssl:0= ) libressl? ( dev-libs/libressl:0= ) >=x11-apps/iceauth-1.0.2 @@ -32,7 +33,6 @@ CDEPEND=">=app-eselect/eselect-opengl-1.3.0 >=x11-libs/libxkbfile-1.0.4 >=x11-libs/libxshmfence-1.1 >=x11-libs/pixman-0.27.2 - >=x11-libs/xtrans-1.3.5 >=x11-misc/xbitmaps-1.0.1 >=x11-misc/xkeyboard-config-2.4.1-r3 dmx? ( @@ -48,11 +48,6 @@ CDEPEND=">=app-eselect/eselect-opengl-1.3.0 >=x11-libs/libXres-1.0.3 >=x11-libs/libXtst-1.0.99.2 ) - glamor? ( - media-libs/libepoxy[X] - >=media-libs/mesa-18[egl,gbm] - !x11-libs/glamor - ) kdrive? ( >=x11-libs/libXext-1.0.5 x11-libs/libXv @@ -68,14 +63,15 @@ CDEPEND=">=app-eselect/eselect-opengl-1.3.0 !minimal? ( >=x11-libs/libX11-1.1.5 >=x11-libs/libXext-1.0.5 - >=media-libs/mesa-18 + >=media-libs/mesa-18[X(+),egl,gbm] + >=media-libs/libepoxy-1.5.4[X,egl(+)] ) udev? ( virtual/libudev:= ) unwind? ( sys-libs/libunwind ) wayland? ( >=dev-libs/wayland-1.3.0 - media-libs/libepoxy - >=dev-libs/wayland-protocols-1.1 + >=media-libs/libepoxy-1.5.4[egl(+)] + >=dev-libs/wayland-protocols-1.18 ) >=x11-apps/xinit-1.3.3-r1 systemd? ( @@ -84,14 +80,14 @@ CDEPEND=">=app-eselect/eselect-opengl-1.3.0 ) elogind? ( sys-apps/dbus - sys-auth/elogind + sys-auth/elogind[pam] sys-auth/pambase[elogind] ) - " - + !!x11-drivers/nvidia-drivers[-libglvnd(+)] +" DEPEND="${CDEPEND} - sys-devel/flex >=x11-base/xorg-proto-2018.4 + >=x11-libs/xtrans-1.3.5 dmx? ( doc? ( || ( @@ -100,13 +96,16 @@ DEPEND="${CDEPEND} www-client/w3m ) ) - )" - + ) +" RDEPEND="${CDEPEND} + !systemd? ( gui-libs/display-manager-init ) selinux? ( sec-policy/selinux-xserver ) - !x11-drivers/xf86-video-modesetting " - +BDEPEND=" + sys-devel/flex + wayland? ( dev-util/wayland-scanner ) +" PDEPEND=" xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )" @@ -115,13 +114,10 @@ REQUIRED_USE="!minimal? ( ) elogind? ( udev ) ?? ( elogind systemd ) - minimal? ( !glamor !wayland ) + minimal? ( !wayland ) xephyr? ( kdrive )" UPSTREAMED_PATCHES=( - "${FILESDIR}"/${PN}-1.20.4-shm-reindent-shm_tmpfile-to-follow-our-standards.patch - "${FILESDIR}"/${PN}-1.20.4-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch - "${FILESDIR}"/${PN}-1.20.4-shm-Use-memfd_create-when-possible.patch ) PATCHES=( @@ -129,13 +125,13 @@ PATCHES=( "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch # needed for new eselect-opengl, bug #541232 "${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch - "${FILESDIR}"/${PN}-1.17.4-arm-musl.patch ) pkg_setup() { - if use wayland && ! use glamor; then + if use wayland && use minimal; then ewarn "glamor is necessary for acceleration under Xwayland." ewarn "Performance may be unacceptable without it." + ewarn "Build with USE=-minimal to enable glamor." fi # localstatedir is used for the log location; we need to override the default @@ -147,8 +143,8 @@ pkg_setup() { $(use_enable ipv6) $(use_enable debug) $(use_enable dmx) - $(use_enable glamor) $(use_enable kdrive) + $(use_enable test unit-tests) $(use_enable unwind libunwind) $(use_enable wayland xwayland) $(use_enable !minimal record) @@ -156,6 +152,7 @@ pkg_setup() { $(use_enable !minimal dri) $(use_enable !minimal dri2) $(use_enable !minimal dri3) + $(use_enable !minimal glamor) $(use_enable !minimal glx) $(use_enable xcsecurity) $(use_enable xephyr) @@ -165,10 +162,7 @@ pkg_setup() { $(use_enable udev config-udev) $(use_with doc doxygen) $(use_with doc xmlto) - $(usex !elogind $(use_enable systemd systemd-logind) '--enable-systemd-logind') $(use_with systemd systemd-daemon) - $(usex suid $(use_enable systemd suid-wrapper) '--disable-suid-wrapper') - $(usex suid $(use_enable !systemd install-setuid) '--disable-install-setuid') --enable-libdrm --sysconfdir="${EPREFIX}"/etc/X11 --localstatedir="${EPREFIX}"/var @@ -180,7 +174,32 @@ pkg_setup() { --without-fop --with-os-vendor=Gentoo --with-sha1=libcrypto + CPP="$(tc-getPROG CPP cpp)" ) + + if use systemd || use elogind; then + XORG_CONFIGURE_OPTIONS+=( + "--enable-systemd-logind" + "--disable-install-setuid" + "$(use_enable suid suid-wrapper)" + ) + else + XORG_CONFIGURE_OPTIONS+=( + "--disable-systemd-logind" + "--disable-suid-wrapper" + "$(use_enable suid install-setuid)" + ) + fi +} + +src_prepare() { + default + + if use elibc_musl ; then + eapply "${FILESDIR}"/xorg-server-1.20.11-fix-musl-input_event.patch + fi + + eapply_user } src_install() { @@ -193,10 +212,6 @@ src_install() { dodoc "${S}"/hw/xfree86/xorg.conf.example fi - newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup - newinitd "${FILESDIR}"/xdm.initd-11 xdm - newconfd "${FILESDIR}"/xdm.confd-4 xdm - # install the @x11-module-rebuild set for Portage insinto /usr/share/portage/config/sets newins "${FILESDIR}"/xorg-sets.conf xorg.conf @@ -204,13 +219,6 @@ src_install() { find "${ED}"/var -type d -empty -delete || die } -pkg_postinst() { - if ! use minimal; then - # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install) - eselect opengl set xorg-x11 --use-old - fi -} - pkg_postrm() { # Get rid of module dir to ensure opengl-update works properly if [[ -z ${REPLACED_BY_VERSION} && -e ${EROOT}/usr/$(get_libdir)/xorg/modules ]]; then