public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2019-02-28  5:47 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2019-02-28  5:47 UTC (permalink / raw
  To: gentoo-commits

commit:     4b03aab97013ea3cacb778956262dbf16e70fcdf
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 28 01:18:22 2019 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Feb 28 05:44:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b03aab9

x11-base/xorg-server: Version bump to 1.20.4

Closes: https://bugs.gentoo.org/677752
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-base/xorg-server/Manifest                      |   1 +
 ...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/xorg-server-1.20.4.ebuild     | 217 +++++++++++++++++++++
 5 files changed, 553 insertions(+)

diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index 4dc15913393..d0d520e0f00 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -1 +1,2 @@
 DIST xorg-server-1.20.3.tar.bz2 6205000 BLAKE2B 9fc8acf1812d0aa4800941dd1846060f91edf1e7ebc92b35e8c2028266d88d3ab3ba14e95f535e5ee41941f8e20769ee75723ba609f5653d4892f97bc5cf91c4 SHA512 ee44554f86df4297f54c5871fe7a18954eeef4338775a25f36d6577b279c4775f61128da71b86cfaeadcc080838d6749dede138d4db178866579da2056543fba
+DIST xorg-server-1.20.4.tar.bz2 6123780 BLAKE2B 224dda54f433315f6614cbee5bc54db91d9d9e190c06ac7f26e334b80b9d4a612ff4b2a4f10f50a6f928ecdbea40172d5578289fbf88411f006bcd473253b05d SHA512 f1c92ef6d7613e0636973d3395b48dfdad42230847ab1c8b1cea84647a968f649f9aba97bdb01c10ee8351cbe954d4e6ca4a0fc84bb8fa662d49c8ba2aee00a8

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
new file mode 100644
index 00000000000..54ed62935a6
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch
@@ -0,0 +1,174 @@
+From 19f6cb570becbc4e355807199c6e251fc7935132 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@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 <eric@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
new file mode 100644
index 00000000000..fce25944537
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.20.4-shm-Use-memfd_create-when-possible.patch
@@ -0,0 +1,89 @@
+From f6753c117ef0f83499d5e2d6dda226fec9ddf803 Mon Sep 17 00:00:00 2001
+From: Alexander Volkov <a.volkov@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.volkov@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
new file mode 100644
index 00000000000..1ce9e130794
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.20.4-shm-reindent-shm_tmpfile-to-follow-our-standards.patch
@@ -0,0 +1,72 @@
+From 804a9b4f57107fa2d0ed1ae0becda5bebaffe6e1 Mon Sep 17 00:00:00 2001
+From: Eric Anholt <eric@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 <eric@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/xorg-server-1.20.4.ebuild b/x11-base/xorg-server/xorg-server-1.20.4.ebuild
new file mode 100644
index 00000000000..73fb1dab471
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-1.20.4.ebuild
@@ -0,0 +1,217 @@
+# Copyright 1999-2019 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
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git"
+
+DESCRIPTION="X.Org X servers"
+SLOT="0/${PV}"
+if [[ ${PV} != 9999* ]]; then
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+
+IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} debug +glamor ipv6 libressl minimal selinux +suid systemd +udev unwind xcsecurity"
+
+CDEPEND=">=app-eselect/eselect-opengl-1.3.0
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:0= )
+	>=x11-apps/iceauth-1.0.2
+	>=x11-apps/rgb-1.0.3
+	>=x11-apps/xauth-1.0.3
+	x11-apps/xkbcomp
+	>=x11-libs/libdrm-2.4.89
+	>=x11-libs/libpciaccess-0.12.901
+	>=x11-libs/libXau-1.0.4
+	>=x11-libs/libXdmcp-1.0.2
+	>=x11-libs/libXfont2-2.0.1
+	>=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? (
+		x11-libs/libXt
+		>=x11-libs/libdmx-1.0.99.1
+		>=x11-libs/libX11-1.1.5
+		>=x11-libs/libXaw-1.0.4
+		>=x11-libs/libXext-1.0.99.4
+		>=x11-libs/libXfixes-5.0
+		>=x11-libs/libXi-1.2.99.1
+		>=x11-libs/libXmu-1.0.3
+		x11-libs/libXrender
+		>=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
+	)
+	xephyr? (
+		x11-libs/libxcb[xkb]
+		x11-libs/xcb-util
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	!minimal? (
+		>=x11-libs/libX11-1.1.5
+		>=x11-libs/libXext-1.0.5
+		>=media-libs/mesa-18
+	)
+	udev? ( virtual/libudev:= )
+	unwind? ( sys-libs/libunwind )
+	wayland? (
+		>=dev-libs/wayland-1.3.0
+		media-libs/libepoxy
+		>=dev-libs/wayland-protocols-1.1
+	)
+	>=x11-apps/xinit-1.3.3-r1
+	systemd? (
+		sys-apps/dbus
+		sys-apps/systemd
+	)"
+
+DEPEND="${CDEPEND}
+	sys-devel/flex
+	>=x11-base/xorg-proto-2018.3
+	dmx? (
+		doc? (
+			|| (
+				www-client/links
+				www-client/lynx
+				www-client/w3m
+			)
+		)
+	)"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-xserver )
+	!x11-drivers/xf86-video-modesetting
+"
+
+PDEPEND="
+	xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
+
+REQUIRED_USE="!minimal? (
+		|| ( ${IUSE_SERVERS} )
+	)
+	minimal? ( !glamor !wayland )
+	xephyr? ( kdrive )"
+
+UPSTREAMED_PATCHES=(
+	"${FILESDIR}"/${P}-shm-reindent-shm_tmpfile-to-follow-our-standards.patch
+	"${FILESDIR}"/${P}-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch
+	"${FILESDIR}"/${P}-shm-Use-memfd_create-when-possible.patch
+)
+
+PATCHES=(
+	"${UPSTREAMED_PATCHES[@]}"
+	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
+	# needed for new eselect-opengl, bug #541232
+	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
+)
+
+pkg_setup() {
+	if use wayland && ! use glamor; then
+		ewarn "glamor is necessary for acceleration under Xwayland."
+		ewarn "Performance may be unacceptable without it."
+	fi
+
+	# localstatedir is used for the log location; we need to override the default
+	#	from ebuild.sh
+	# sysconfdir is used for the xorg.conf location; same applies
+	# NOTE: fop is used for doc generating; and I have no idea if Gentoo
+	#	package it somewhere
+	XORG_CONFIGURE_OPTIONS=(
+		$(use_enable ipv6)
+		$(use_enable debug)
+		$(use_enable dmx)
+		$(use_enable glamor)
+		$(use_enable kdrive)
+		$(use_enable unwind libunwind)
+		$(use_enable wayland xwayland)
+		$(use_enable !minimal record)
+		$(use_enable !minimal xfree86-utils)
+		$(use_enable !minimal dri)
+		$(use_enable !minimal dri2)
+		$(use_enable !minimal dri3)
+		$(use_enable !minimal glx)
+		$(use_enable xcsecurity)
+		$(use_enable xephyr)
+		$(use_enable xnest)
+		$(use_enable xorg)
+		$(use_enable xvfb)
+		$(use_enable udev config-udev)
+		$(use_with doc doxygen)
+		$(use_with doc xmlto)
+		$(use_with systemd systemd-daemon)
+		$(use_enable systemd systemd-logind)
+		$(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
+		--with-fontrootdir="${EPREFIX}"/usr/share/fonts
+		--with-xkb-output="${EPREFIX}"/var/lib/xkb
+		--disable-config-hal
+		--disable-linux-acpi
+		--without-dtrace
+		--without-fop
+		--with-os-vendor=Gentoo
+		--with-sha1=libcrypto
+	)
+}
+
+src_install() {
+	default
+
+	server_based_install
+
+	if ! use minimal && use xorg; then
+		# Install xorg.conf.example into docs
+		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
+
+	find "${ED}"/var -type d -empty -delete || die
+}
+
+pkg_postinst() {
+	# sets up libGL and DRI2 symlinks if needed (ie, on a fresh install)
+	eselect opengl set xorg-x11 --use-old
+}
+
+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
+		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
+	fi
+}
+
+server_based_install() {
+	if ! use xorg; then
+		rm "${ED}"/usr/share/man/man1/Xserver.1x \
+			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
+			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
+			"${ED}"/usr/share/man/man1/Xserver.1x
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2024-11-06  1:22 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2024-11-06  1:22 UTC (permalink / raw
  To: gentoo-commits

commit:     d79b2d4b8afe72c02518708d428ec96fe80b3dd1
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  6 01:18:05 2024 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Nov  6 01:21:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d79b2d4b

x11-base/xorg-server: Drop old versions

Bug: https://bugs.gentoo.org/942465
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-base/xorg-server/Manifest                      |   1 -
 .../files/xorg-server-21.1.10-fix-c99-32bit.patch  |  54 ------
 x11-base/xorg-server/xorg-server-21.1.13-r1.ebuild | 197 ---------------------
 3 files changed, 252 deletions(-)

diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index 4567ea113627..fdfcb3be88cf 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -1,2 +1 @@
-DIST xorg-server-21.1.13.tar.xz 4963952 BLAKE2B f6b05439e54b9709ce7a5b5f3702053ebc586ac8f8976bb6de9955ab34eac7201e027e1076584cf5b6d8c2639703e3a908b9e38f5dc52d4897aac8650f462502 SHA512 a55fbeeed227c12c67f166f2c06a7f4f8d78feeea04c6e73509dbc723185fd0772349aa23f7c44cf0828ac0a0e2f9e4b26cffb220e6dfa7186d60f88b25ccaf1
 DIST xorg-server-21.1.14.tar.xz 5016608 BLAKE2B b64ff9bbcd1d1c632b588800acb1531d6295a52347294d323d684a7149a4f803fb38357a102d715525511c8bb8554daf2e71c28149ccb650b1c7c1990351f53e SHA512 833d36ca4a409363dc021a50702bc29dbb32d074de319d6910a158b6e4d8f51a20c3b0de0486d9613d4e526fe4fd60ca306b3c9fcce7d014ca8cc10185afd973

diff --git a/x11-base/xorg-server/files/xorg-server-21.1.10-fix-c99-32bit.patch b/x11-base/xorg-server/files/xorg-server-21.1.10-fix-c99-32bit.patch
deleted file mode 100644
index 40afef18cead..000000000000
--- a/x11-base/xorg-server/files/xorg-server-21.1.10-fix-c99-32bit.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-https://bugs.gentoo.org/925876
-https://gitlab.freedesktop.org/xorg/xserver/-/commit/e89edec497bac581ca9b614fb00c25365580f045
-
-From e89edec497bac581ca9b614fb00c25365580f045 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= <jexposit@redhat.com>
-Date: Fri, 19 Jan 2024 13:05:51 +0100
-Subject: [PATCH] ephyr: Fix incompatible pointer type build error
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fix a compilation error on 32 bits architectures with gcc 14:
-
-  ephyr_glamor_xv.c: In function ‘ephyr_glamor_xv_init’:
-  ephyr_glamor_xv.c:154:31: error: assignment to ‘SetPortAttributeFuncPtr’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int,  int,  void *)’} from incompatible pointer type ‘int (*)(KdScreenInfo *, Atom,  INT32,  void *)’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int,  long int,  void *)’} [-Wincompatible-pointer-types]
-    154 |     adaptor->SetPortAttribute = ephyr_glamor_xv_set_port_attribute;
-        |                               ^
-  ephyr_glamor_xv.c:155:31: error: assignment to ‘GetPortAttributeFuncPtr’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int,  int *, void *)’} from incompatible pointer type ‘int (*)(KdScreenInfo *, Atom,  INT32 *, void *)’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int,  long int *, void *)’} [-Wincompatible-pointer-types]
-    155 |     adaptor->GetPortAttribute = ephyr_glamor_xv_get_port_attribute;
-        |                               ^
-
-Build error logs:
-https://koji.fedoraproject.org/koji/taskinfo?taskID=111964273
-
-Signed-off-by: José Expósito <jexposit@redhat.com>
----
- hw/kdrive/ephyr/ephyr_glamor_xv.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/hw/kdrive/ephyr/ephyr_glamor_xv.c b/hw/kdrive/ephyr/ephyr_glamor_xv.c
-index 4dd15cf41..b5eae48c8 100644
---- a/hw/kdrive/ephyr/ephyr_glamor_xv.c
-+++ b/hw/kdrive/ephyr/ephyr_glamor_xv.c
-@@ -50,16 +50,16 @@ ephyr_glamor_xv_stop_video(KdScreenInfo *screen, void *data, Bool cleanup)
- 
- static int
- ephyr_glamor_xv_set_port_attribute(KdScreenInfo *screen,
--                                   Atom attribute, INT32 value, void *data)
-+                                   Atom attribute, int value, void *data)
- {
--    return glamor_xv_set_port_attribute(data, attribute, value);
-+    return glamor_xv_set_port_attribute(data, attribute, (INT32)value);
- }
- 
- static int
- ephyr_glamor_xv_get_port_attribute(KdScreenInfo *screen,
--                                   Atom attribute, INT32 *value, void *data)
-+                                   Atom attribute, int *value, void *data)
- {
--    return glamor_xv_get_port_attribute(data, attribute, value);
-+    return glamor_xv_get_port_attribute(data, attribute, (INT32 *)value);
- }
- 
- static void

diff --git a/x11-base/xorg-server/xorg-server-21.1.13-r1.ebuild b/x11-base/xorg-server/xorg-server-21.1.13-r1.ebuild
deleted file mode 100644
index 16599d733bf8..000000000000
--- a/x11-base/xorg-server/xorg-server-21.1.13-r1.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-XORG_TARBALL_SUFFIX="xz"
-XORG_EAUTORECONF="no"
-inherit flag-o-matic xorg-3 meson
-EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
-
-DESCRIPTION="X.Org X servers"
-SLOT="0/${PV}"
-if [[ ${PV} != 9999* ]]; then
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-fi
-
-IUSE_SERVERS="xephyr xnest xorg xvfb"
-IUSE="${IUSE_SERVERS} debug +elogind minimal selinux suid systemd test +udev unwind xcsecurity"
-RESTRICT="!test? ( test )"
-
-CDEPEND="
-	media-libs/libglvnd[X]
-	dev-libs/libbsd
-	dev-libs/openssl:0=
-	>=x11-apps/iceauth-1.0.2
-	>=x11-apps/xauth-1.0.3
-	x11-apps/xkbcomp
-	>=x11-libs/libdrm-2.4.89
-	>=x11-libs/libpciaccess-0.12.901
-	>=x11-libs/libXau-1.0.4
-	>=x11-libs/libXdmcp-1.0.2
-	>=x11-libs/libXfont2-2.0.1
-	>=x11-libs/libxkbfile-1.0.4
-	>=x11-libs/libxshmfence-1.1
-	>=x11-libs/pixman-0.27.2
-	>=x11-misc/xbitmaps-1.0.1
-	>=x11-misc/xkeyboard-config-2.4.1-r3
-	xorg? (
-		>=x11-libs/libxcvt-0.1.0
-	)
-	xnest? (
-		>=x11-libs/libXext-1.0.99.4
-		>=x11-libs/libX11-1.1.5
-	)
-	xephyr? (
-		x11-libs/libxcb
-		x11-libs/xcb-util
-		x11-libs/xcb-util-image
-		x11-libs/xcb-util-keysyms
-		x11-libs/xcb-util-renderutil
-		x11-libs/xcb-util-wm
-	)
-	!minimal? (
-		>=media-libs/mesa-18[X(+),egl(+),gbm(+)]
-		>=media-libs/libepoxy-1.5.4[X,egl(+)]
-	)
-	udev? ( virtual/libudev:= )
-	unwind? ( sys-libs/libunwind:= )
-	selinux? (
-		sys-process/audit
-		sys-libs/libselinux:=
-	)
-	systemd? (
-		sys-apps/dbus
-		sys-apps/systemd
-	)
-	elogind? (
-		sys-apps/dbus
-		sys-auth/elogind[pam]
-		sys-auth/pambase[elogind]
-	)
-	!!x11-drivers/nvidia-drivers[-libglvnd(+)]
-"
-DEPEND="${CDEPEND}
-	>=x11-base/xorg-proto-2021.4.99.2
-	>=x11-libs/xtrans-1.3.5
-	media-fonts/font-util
-	test? ( >=x11-libs/libxcvt-0.1.0 )
-"
-RDEPEND="${CDEPEND}
-	!systemd? ( gui-libs/display-manager-init )
-	selinux? ( sec-policy/selinux-xserver )
-	xorg? ( >=x11-apps/xinit-1.3.3-r1 )
-"
-BDEPEND="
-	app-alternatives/lex
-"
-PDEPEND="
-	xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
-
-REQUIRED_USE="!minimal? (
-		|| ( ${IUSE_SERVERS} )
-	)
-	elogind? ( udev )
-	?? ( elogind systemd )"
-
-UPSTREAMED_PATCHES=(
-)
-
-PATCHES=(
-	"${UPSTREAMED_PATCHES[@]}"
-	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
-	# needed for new eselect-opengl, bug #541232
-	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
-	# pending upstream backport, bug #885763
-	"${FILESDIR}"/${PN}-21.1.10-c99.patch
-	# backport of upstream commit, bug #925876
-	"${FILESDIR}"/${PN}-21.1.10-fix-c99-32bit.patch
-)
-
-src_configure() {
-	# bug #835653
-	use x86 && replace-flags -Os -O2
-	use x86 && replace-flags -Oz -O2
-
-	# localstatedir is used for the log location; we need to override the default
-	#	from ebuild.sh
-	# sysconfdir is used for the xorg.conf location; same applies
-	local emesonargs=(
-		--localstatedir "${EPREFIX}/var"
-		--sysconfdir "${EPREFIX}/etc/X11"
-		-Dbuildtype=$(usex debug debug plain)
-		-Db_ndebug=$(usex debug false true)
-		$(meson_use !minimal dri1)
-		$(meson_use !minimal dri2)
-		$(meson_use !minimal dri3)
-		$(meson_use !minimal glamor)
-		$(meson_use !minimal glx)
-		$(meson_use udev)
-		$(meson_use udev udev_kms)
-		$(meson_use unwind libunwind)
-		$(meson_use xcsecurity)
-		$(meson_use selinux xselinux)
-		$(meson_use xephyr)
-		$(meson_use xnest)
-		$(meson_use xorg)
-		$(meson_use xvfb)
-		-Ddocs=false
-		-Ddrm=true
-		-Ddtrace=false
-		-Dipv6=true
-		-Dhal=false
-		-Dlinux_acpi=false
-		-Dlinux_apm=false
-		-Dsecure-rpc=false
-		-Dsha1=libcrypto
-		-Dxkb_output_dir="${EPREFIX}/var/lib/xkb"
-	)
-
-	if [[ ${PV} == 9999 ]] ; then
-		# Gone in 21.1.x, but not in master.
-		emesonargs+=( -Dxwayland=false )
-	fi
-
-	if use systemd || use elogind; then
-		emesonargs+=(
-			-Dsystemd_logind=true
-			$(meson_use suid suid_wrapper)
-		)
-	else
-		emesonargs+=(
-			-Dsystemd_logind=false
-			-Dsuid_wrapper=false
-		)
-	fi
-
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-
-	# The meson build system does not support install-setuid
-	if ! use systemd && ! use elogind; then
-		if use suid; then
-			chmod u+s "${ED}"/usr/bin/Xorg
-		fi
-	fi
-
-	if ! use xorg; then
-		rm -f "${ED}"/usr/share/man/man1/Xserver.1x \
-			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
-			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
-			"${ED}"/usr/share/man/man1/Xserver.1x || die
-	fi
-
-	# install the @x11-module-rebuild set for Portage
-	insinto /usr/share/portage/config/sets
-	newins "${FILESDIR}"/xorg-sets.conf xorg.conf
-}
-
-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
-		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2023-12-14  4:12 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-12-14  4:12 UTC (permalink / raw
  To: gentoo-commits

commit:     702ab503b10f6fe6719564dbc310bd4422f58014
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 14 02:38:35 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 14 04:03:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=702ab503

x11-base/xorg-server: fix headers for modern C issue

Otherwise nouveau can't build. These changes are in master already and I've
sent a PR to backport them too.

Closes: https://bugs.gentoo.org/885763
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/xorg-server-21.1.10-c99.patch            |  39 +++++
 x11-base/xorg-server/xorg-server-21.1.10-r1.ebuild | 194 +++++++++++++++++++++
 2 files changed, 233 insertions(+)

diff --git a/x11-base/xorg-server/files/xorg-server-21.1.10-c99.patch b/x11-base/xorg-server/files/xorg-server-21.1.10-c99.patch
new file mode 100644
index 000000000000..12a48e611329
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-21.1.10-c99.patch
@@ -0,0 +1,39 @@
+https://bugs.gentoo.org/885763
+https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1114
+https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1222
+https://gitlab.freedesktop.org/xorg/xserver/-/commit/34a430a16ec2cb9851b1f2bc7fc2117e19b9fcc7
+
+From f3cb68d274c4536130683d28182620fbbf1b287d Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Thu, 13 Apr 2023 15:45:58 +0200
+Subject: [PATCH] fb: Declare wfbFinishScreenInit, wfbScreenInit for
+ !FB_ACCESS_WRAPPER
+
+xf86-video-nouveau calls wfbScreenInit without defining
+FB_ACCESS_WRAPPER (which has other unintended side effects).
+Presently, this compiles and links because compilers still support
+implicit function declarations, but this is going to change fairly
+soon.  This seems to be the most straightforward change to keep
+the driver building.
+
+(cherry picked from commit 34a430a16ec2cb9851b1f2bc7fc2117e19b9fcc7)
+--- a/fb/fb.h
++++ b/fb/fb.h
+@@ -1027,7 +1027,6 @@ extern _X_EXPORT Bool
+                int dpiy, int width,     /* pixel width of frame buffer */
+                int bpp);        /* bits per pixel of frame buffer */
+ 
+-#ifdef FB_ACCESS_WRAPPER
+ extern _X_EXPORT Bool
+ wfbFinishScreenInit(ScreenPtr pScreen,
+                     void *pbits,
+@@ -1049,7 +1048,6 @@ wfbScreenInit(ScreenPtr pScreen,
+               int width,
+               int bpp,
+               SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap);
+-#endif
+ 
+ extern _X_EXPORT Bool
+ fbFinishScreenInit(ScreenPtr pScreen,
+-- 
+GitLab

diff --git a/x11-base/xorg-server/xorg-server-21.1.10-r1.ebuild b/x11-base/xorg-server/xorg-server-21.1.10-r1.ebuild
new file mode 100644
index 000000000000..8d72321f5444
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-21.1.10-r1.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+XORG_TARBALL_SUFFIX="xz"
+XORG_EAUTORECONF="no"
+inherit flag-o-matic xorg-3 meson
+EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
+
+DESCRIPTION="X.Org X servers"
+SLOT="0/${PV}"
+if [[ ${PV} != 9999* ]]; then
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+IUSE_SERVERS="xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} debug +elogind minimal selinux suid systemd test +udev unwind xcsecurity"
+RESTRICT="!test? ( test )"
+
+CDEPEND="
+	media-libs/libglvnd[X]
+	dev-libs/libbsd
+	dev-libs/openssl:0=
+	>=x11-apps/iceauth-1.0.2
+	>=x11-apps/xauth-1.0.3
+	x11-apps/xkbcomp
+	>=x11-libs/libdrm-2.4.89
+	>=x11-libs/libpciaccess-0.12.901
+	>=x11-libs/libXau-1.0.4
+	>=x11-libs/libXdmcp-1.0.2
+	>=x11-libs/libXfont2-2.0.1
+	>=x11-libs/libxkbfile-1.0.4
+	>=x11-libs/libxshmfence-1.1
+	>=x11-libs/pixman-0.27.2
+	>=x11-misc/xbitmaps-1.0.1
+	>=x11-misc/xkeyboard-config-2.4.1-r3
+	xorg? (
+		>=x11-libs/libxcvt-0.1.0
+	)
+	xnest? (
+		>=x11-libs/libXext-1.0.99.4
+		>=x11-libs/libX11-1.1.5
+	)
+	xephyr? (
+		x11-libs/libxcb
+		x11-libs/xcb-util
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	!minimal? (
+		>=media-libs/mesa-18[X(+),egl(+),gbm(+)]
+		>=media-libs/libepoxy-1.5.4[X,egl(+)]
+	)
+	udev? ( virtual/libudev:= )
+	unwind? ( sys-libs/libunwind:= )
+	selinux? (
+		sys-process/audit
+		sys-libs/libselinux:=
+	)
+	systemd? (
+		sys-apps/dbus
+		sys-apps/systemd
+	)
+	elogind? (
+		sys-apps/dbus
+		sys-auth/elogind[pam]
+		sys-auth/pambase[elogind]
+	)
+	!!x11-drivers/nvidia-drivers[-libglvnd(+)]
+"
+DEPEND="${CDEPEND}
+	>=x11-base/xorg-proto-2021.4.99.2
+	>=x11-libs/xtrans-1.3.5
+	media-fonts/font-util
+	test? ( >=x11-libs/libxcvt-0.1.0 )
+"
+RDEPEND="${CDEPEND}
+	!systemd? ( gui-libs/display-manager-init )
+	selinux? ( sec-policy/selinux-xserver )
+	xorg? ( >=x11-apps/xinit-1.3.3-r1 )
+"
+BDEPEND="
+	sys-devel/flex
+"
+PDEPEND="
+	xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
+
+REQUIRED_USE="!minimal? (
+		|| ( ${IUSE_SERVERS} )
+	)
+	elogind? ( udev )
+	?? ( elogind systemd )"
+
+UPSTREAMED_PATCHES=(
+)
+
+PATCHES=(
+	"${UPSTREAMED_PATCHES[@]}"
+	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
+	# needed for new eselect-opengl, bug #541232
+	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
+	# pending upstream backport, bug #885763
+	"${FILESDIR}"/${PN}-21.1.10-c99.patch
+)
+
+src_configure() {
+	# bug #835653
+	use x86 && replace-flags -Os -O2
+
+	# localstatedir is used for the log location; we need to override the default
+	#	from ebuild.sh
+	# sysconfdir is used for the xorg.conf location; same applies
+	local emesonargs=(
+		--localstatedir "${EPREFIX}/var"
+		--sysconfdir "${EPREFIX}/etc/X11"
+		--buildtype $(usex debug debug plain)
+		-Db_ndebug=$(usex debug false true)
+		$(meson_use !minimal dri1)
+		$(meson_use !minimal dri2)
+		$(meson_use !minimal dri3)
+		$(meson_use !minimal glamor)
+		$(meson_use !minimal glx)
+		$(meson_use udev)
+		$(meson_use udev udev_kms)
+		$(meson_use unwind libunwind)
+		$(meson_use xcsecurity)
+		$(meson_use selinux xselinux)
+		$(meson_use xephyr)
+		$(meson_use xnest)
+		$(meson_use xorg)
+		$(meson_use xvfb)
+		-Ddocs=false
+		-Ddrm=true
+		-Ddtrace=false
+		-Dipv6=true
+		-Dhal=false
+		-Dlinux_acpi=false
+		-Dlinux_apm=false
+		-Dsecure-rpc=false
+		-Dsha1=libcrypto
+		-Dxkb_output_dir="${EPREFIX}/var/lib/xkb"
+	)
+
+	if [[ ${PV} == 9999 ]] ; then
+		# Gone in 21.1.x, but not in master.
+		emesonargs+=( -Dxwayland=false )
+	fi
+
+	if use systemd || use elogind; then
+		emesonargs+=(
+			-Dsystemd_logind=true
+			$(meson_use suid suid_wrapper)
+		)
+	else
+		emesonargs+=(
+			-Dsystemd_logind=false
+			-Dsuid_wrapper=false
+		)
+	fi
+
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+
+	# The meson build system does not support install-setuid
+	if ! use systemd && ! use elogind; then
+		if use suid; then
+			chmod u+s "${ED}"/usr/bin/Xorg
+		fi
+	fi
+
+	if ! use xorg; then
+		rm -f "${ED}"/usr/share/man/man1/Xserver.1x \
+			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
+			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
+			"${ED}"/usr/share/man/man1/Xserver.1x || die
+	fi
+
+	# install the @x11-module-rebuild set for Portage
+	insinto /usr/share/portage/config/sets
+	newins "${FILESDIR}"/xorg-sets.conf xorg.conf
+}
+
+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
+		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2023-11-25 17:31 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2023-11-25 17:31 UTC (permalink / raw
  To: gentoo-commits

commit:     637e44f058d0f6d13a6339fe09ecaa5fddef4ba2
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 25 17:14:05 2023 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 17:31:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=637e44f0

x11-base/xorg-server: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-base/xorg-server/Manifest                      |   1 -
 .../files/xorg-server-21.1.8-deadlock.patch        |  97 ----------
 .../xorg-server/files/xorg-server-21.1.8-wfb.patch |  43 -----
 x11-base/xorg-server/xorg-server-21.1.8-r2.ebuild  | 195 ---------------------
 4 files changed, 336 deletions(-)

diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index 26f511e9d9ed..16f4b3d8b53f 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -1,2 +1 @@
-DIST xorg-server-21.1.8.tar.xz 4980208 BLAKE2B a223efe6d14b55bd133b7f8db75b7720ea0ae58f1eced0f6b20caf6e7045e7649a0923a1c6db5d649265375e6768fa9811477d2fa0da52d7a1e65cf4511535d2 SHA512 6104b3620ed2e1e27d9a8e963388bbe8785a764585b1bc03dbf5d719a92894773dda580d377ca18ceeab353e65a5d23cc947bab84a4012f9dd1eca31cac36937
 DIST xorg-server-21.1.9.tar.xz 4935860 BLAKE2B 8e0a2e0f5fc4d06a08c1424fe618da9822e951f5b744b4cac1b1e14305ab598b162e4f08fb53ba5e60d0001257216755a576b470c961c26a909d66e9a46d1c77 SHA512 9044e1b9222616fb63aea444b75f4ca6582edb7d899018f8ea30359e57edf04b1555e69397ebc4d288f7e36d6b82a54dde3895f11d414573d229e908ac17bfe8

diff --git a/x11-base/xorg-server/files/xorg-server-21.1.8-deadlock.patch b/x11-base/xorg-server/files/xorg-server-21.1.8-deadlock.patch
deleted file mode 100644
index 8da824119edf..000000000000
--- a/x11-base/xorg-server/files/xorg-server-21.1.8-deadlock.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-https://bugs.gentoo.org/909643
-https://gitlab.freedesktop.org/mesa/mesa/-/issues/116
-https://gitlab.freedesktop.org/mesa/mesa/-/issues/6685
-https://gitlab.freedesktop.org/xorg/xserver/-/commit/b98fc07d3442a289c6bef82df50dd0a2d01de71a
-
-From b98fc07d3442a289c6bef82df50dd0a2d01de71a Mon Sep 17 00:00:00 2001
-From: Adam Jackson <ajax@redhat.com>
-Date: Thu, 2 Feb 2023 12:26:27 -0500
-Subject: [PATCH] present: Send a PresentConfigureNotify event for destroyed
- windows
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This enables fixing a deadlock case on the client side, where the client
-ends up blocked waiting for a Present event that will never come because
-the window was destroyed. The new PresentWindowDestroyed flag allows the
-client to avoid blocking indefinitely.
-
-Signed-off-by: Adam Jackson <ajax@redhat.com>
-See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/116
-See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6685
-Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
-(cherry picked from commit 462b06033e66a32308d940eb5fc47f5e4c914dc0)
---- a/present/present_event.c
-+++ b/present/present_event.c
-@@ -102,7 +102,8 @@ present_event_swap(xGenericEvent *from, xGenericEvent *to)
- }
- 
- void
--present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling)
-+present_send_config_notify(WindowPtr window, int x, int y, int w, int h,
-+                           int bw, WindowPtr sibling, CARD32 flags)
- {
-     present_window_priv_ptr window_priv = present_window_priv(window);
- 
-@@ -122,7 +123,7 @@ present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw,
-             .off_y = 0,
-             .pixmap_width = w,
-             .pixmap_height = h,
--            .pixmap_flags = 0
-+            .pixmap_flags = flags
-         };
-         present_event_ptr event;
- 
---- a/present/present_priv.h
-+++ b/present/present_priv.h
-@@ -43,6 +43,11 @@
- #define DebugPresent(x)
- #endif
- 
-+/* XXX this belongs in presentproto */
-+#ifndef PresentWindowDestroyed
-+#define PresentWindowDestroyed (1 << 0)
-+#endif
-+
- extern int present_request;
- 
- extern DevPrivateKeyRec present_screen_private_key;
-@@ -307,7 +312,7 @@ void
- present_free_events(WindowPtr window);
- 
- void
--present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling);
-+present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling, CARD32 flags);
- 
- void
- present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc);
---- a/present/present_screen.c
-+++ b/present/present_screen.c
-@@ -93,6 +93,15 @@ present_destroy_window(WindowPtr window)
-     present_screen_priv_ptr screen_priv = present_screen_priv(screen);
-     present_window_priv_ptr window_priv = present_window_priv(window);
- 
-+    present_send_config_notify(window,
-+                               window->drawable.x,
-+                               window->drawable.y,
-+                               window->drawable.width,
-+                               window->drawable.height,
-+                               window->borderWidth,
-+                               window->nextSib,
-+                               PresentWindowDestroyed);
-+
-     if (window_priv) {
-         present_clear_window_notifies(window);
-         present_free_events(window);
-@@ -123,7 +132,7 @@ present_config_notify(WindowPtr window,
-     ScreenPtr screen = window->drawable.pScreen;
-     present_screen_priv_ptr screen_priv = present_screen_priv(screen);
- 
--    present_send_config_notify(window, x, y, w, h, bw, sibling);
-+    present_send_config_notify(window, x, y, w, h, bw, sibling, 0);
- 
-     unwrap(screen_priv, screen, ConfigNotify);
-     if (screen->ConfigNotify)
--- 
-GitLab

diff --git a/x11-base/xorg-server/files/xorg-server-21.1.8-wfb.patch b/x11-base/xorg-server/files/xorg-server-21.1.8-wfb.patch
deleted file mode 100644
index 48cdbd017088..000000000000
--- a/x11-base/xorg-server/files/xorg-server-21.1.8-wfb.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-https://bugs.gentoo.org/885763
-https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1114
-https://gitlab.freedesktop.org/xorg/xserver/-/commit/34a430a16ec2cb9851b1f2bc7fc2117e19b9fcc7
-
-From 34a430a16ec2cb9851b1f2bc7fc2117e19b9fcc7 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Thu, 13 Apr 2023 15:45:58 +0200
-Subject: [PATCH] fb: Declare wfbFinishScreenInit, wfbScreenInit for
- !FB_ACCESS_WRAPPER
-
-xf86-video-nouveau calls wfbScreenInit without defining
-FB_ACCESS_WRAPPER (which has other unintended side effects).
-Presently, this compiles and links because compilers still support
-implicit function declarations, but this is going to change fairly
-soon.  This seems to be the most straightforward change to keep
-the driver building.
----
- fb/fb.h | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/fb/fb.h b/fb/fb.h
-index 08143a0d49..309f15294c 100644
---- a/fb/fb.h
-+++ b/fb/fb.h
-@@ -1027,7 +1027,6 @@ extern _X_EXPORT Bool
-                int dpiy, int width,     /* pixel width of frame buffer */
-                int bpp);        /* bits per pixel of frame buffer */
- 
--#ifdef FB_ACCESS_WRAPPER
- extern _X_EXPORT Bool
- wfbFinishScreenInit(ScreenPtr pScreen,
-                     void *pbits,
-@@ -1049,7 +1048,6 @@ wfbScreenInit(ScreenPtr pScreen,
-               int width,
-               int bpp,
-               SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap);
--#endif
- 
- extern _X_EXPORT Bool
- fbFinishScreenInit(ScreenPtr pScreen,
--- 
-GitLab
-

diff --git a/x11-base/xorg-server/xorg-server-21.1.8-r2.ebuild b/x11-base/xorg-server/xorg-server-21.1.8-r2.ebuild
deleted file mode 100644
index b2831b509eba..000000000000
--- a/x11-base/xorg-server/xorg-server-21.1.8-r2.ebuild
+++ /dev/null
@@ -1,195 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-XORG_TARBALL_SUFFIX="xz"
-XORG_EAUTORECONF="no"
-inherit flag-o-matic xorg-3 meson
-EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
-
-DESCRIPTION="X.Org X servers"
-SLOT="0/${PV}"
-if [[ ${PV} != 9999* ]]; then
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-fi
-
-IUSE_SERVERS="xephyr xnest xorg xvfb"
-IUSE="${IUSE_SERVERS} debug +elogind minimal selinux suid systemd test +udev unwind xcsecurity"
-RESTRICT="!test? ( test )"
-
-CDEPEND="
-	media-libs/libglvnd[X]
-	dev-libs/libbsd
-	dev-libs/openssl:0=
-	>=x11-apps/iceauth-1.0.2
-	>=x11-apps/rgb-1.0.3
-	>=x11-apps/xauth-1.0.3
-	x11-apps/xkbcomp
-	>=x11-libs/libdrm-2.4.89
-	>=x11-libs/libpciaccess-0.12.901
-	>=x11-libs/libXau-1.0.4
-	>=x11-libs/libXdmcp-1.0.2
-	>=x11-libs/libXfont2-2.0.1
-	>=x11-libs/libxkbfile-1.0.4
-	>=x11-libs/libxshmfence-1.1
-	>=x11-libs/pixman-0.27.2
-	>=x11-misc/xbitmaps-1.0.1
-	>=x11-misc/xkeyboard-config-2.4.1-r3
-	xorg? (
-		>=x11-libs/libxcvt-0.1.0
-	)
-	xnest? (
-		>=x11-libs/libXext-1.0.99.4
-		>=x11-libs/libX11-1.1.5
-	)
-	xephyr? (
-		x11-libs/libxcb
-		x11-libs/xcb-util
-		x11-libs/xcb-util-image
-		x11-libs/xcb-util-keysyms
-		x11-libs/xcb-util-renderutil
-		x11-libs/xcb-util-wm
-	)
-	!minimal? (
-		>=media-libs/mesa-18[X(+),egl(+),gbm(+)]
-		>=media-libs/libepoxy-1.5.4[X,egl(+)]
-	)
-	udev? ( virtual/libudev:= )
-	unwind? ( sys-libs/libunwind:= )
-	selinux? (
-		sys-process/audit
-		sys-libs/libselinux:=
-	)
-	systemd? (
-		sys-apps/dbus
-		sys-apps/systemd
-	)
-	elogind? (
-		sys-apps/dbus
-		sys-auth/elogind[pam]
-		sys-auth/pambase[elogind]
-	)
-	!!x11-drivers/nvidia-drivers[-libglvnd(+)]
-"
-DEPEND="${CDEPEND}
-	>=x11-base/xorg-proto-2021.4.99.2
-	>=x11-libs/xtrans-1.3.5
-	media-fonts/font-util
-	test? ( >=x11-libs/libxcvt-0.1.0 )
-"
-RDEPEND="${CDEPEND}
-	!systemd? ( gui-libs/display-manager-init )
-	selinux? ( sec-policy/selinux-xserver )
-	xorg? ( >=x11-apps/xinit-1.3.3-r1 )
-"
-BDEPEND="
-	sys-devel/flex
-"
-PDEPEND="
-	xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
-
-REQUIRED_USE="!minimal? (
-		|| ( ${IUSE_SERVERS} )
-	)
-	elogind? ( udev )
-	?? ( elogind systemd )"
-
-UPSTREAMED_PATCHES=(
-	"${FILESDIR}"/${P}-deadlock.patch
-	"${FILESDIR}"/${P}-wfb.patch
-)
-
-PATCHES=(
-	"${UPSTREAMED_PATCHES[@]}"
-	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
-	# needed for new eselect-opengl, bug #541232
-	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
-)
-
-src_configure() {
-	# bug #835653
-	use x86 && replace-flags -Os -O2
-
-	# localstatedir is used for the log location; we need to override the default
-	#	from ebuild.sh
-	# sysconfdir is used for the xorg.conf location; same applies
-	local emesonargs=(
-		--localstatedir "${EPREFIX}/var"
-		--sysconfdir "${EPREFIX}/etc/X11"
-		--buildtype $(usex debug debug plain)
-		-Db_ndebug=$(usex debug false true)
-		$(meson_use !minimal dri1)
-		$(meson_use !minimal dri2)
-		$(meson_use !minimal dri3)
-		$(meson_use !minimal glamor)
-		$(meson_use !minimal glx)
-		$(meson_use udev)
-		$(meson_use udev udev_kms)
-		$(meson_use unwind libunwind)
-		$(meson_use xcsecurity)
-		$(meson_use selinux xselinux)
-		$(meson_use xephyr)
-		$(meson_use xnest)
-		$(meson_use xorg)
-		$(meson_use xvfb)
-		-Ddocs=false
-		-Ddrm=true
-		-Ddtrace=false
-		-Dipv6=true
-		-Dhal=false
-		-Dlinux_acpi=false
-		-Dlinux_apm=false
-		-Dsecure-rpc=false
-		-Dsha1=libcrypto
-		-Dxkb_output_dir="${EPREFIX}/var/lib/xkb"
-	)
-
-	if [[ ${PV} == 9999 ]] ; then
-		# Gone in 21.1.x, but not in master.
-		emesonargs+=( -Dxwayland=false )
-	fi
-
-	if use systemd || use elogind; then
-		emesonargs+=(
-			-Dsystemd_logind=true
-			$(meson_use suid suid_wrapper)
-		)
-	else
-		emesonargs+=(
-			-Dsystemd_logind=false
-			-Dsuid_wrapper=false
-		)
-	fi
-
-	meson_src_configure
-}
-
-src_install() {
-	meson_src_install
-
-	# The meson build system does not support install-setuid
-	if ! use systemd && ! use elogind; then
-		if use suid; then
-			chmod u+s "${ED}"/usr/bin/Xorg
-		fi
-	fi
-
-	if ! use xorg; then
-		rm -f "${ED}"/usr/share/man/man1/Xserver.1x \
-			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
-			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
-			"${ED}"/usr/share/man/man1/Xserver.1x || die
-	fi
-
-	# install the @x11-module-rebuild set for Portage
-	insinto /usr/share/portage/config/sets
-	newins "${FILESDIR}"/xorg-sets.conf xorg.conf
-}
-
-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
-		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2023-10-25 15:41 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2023-10-25 15:41 UTC (permalink / raw
  To: gentoo-commits

commit:     9b4db39b0d72f93d5c46898cb262d8c5349542cc
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 25 15:29:54 2023 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Wed Oct 25 15:41:30 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b4db39b

x11-base/xorg-server: Version bump to 21.1.9

Bug: https://bugs.gentoo.org/916254
Closes: https://bugs.gentoo.org/884221
Closes: https://bugs.gentoo.org/909092
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-base/xorg-server/Manifest                      |   1 +
 ...1.9-xephyr-Don-t-check-for-SeatId-anymore.patch |  66 +++++++
 x11-base/xorg-server/xorg-server-21.1.9.ebuild     | 194 +++++++++++++++++++++
 3 files changed, 261 insertions(+)

diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index 4aa30fb75c5f..26f511e9d9ed 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -1 +1,2 @@
 DIST xorg-server-21.1.8.tar.xz 4980208 BLAKE2B a223efe6d14b55bd133b7f8db75b7720ea0ae58f1eced0f6b20caf6e7045e7649a0923a1c6db5d649265375e6768fa9811477d2fa0da52d7a1e65cf4511535d2 SHA512 6104b3620ed2e1e27d9a8e963388bbe8785a764585b1bc03dbf5d719a92894773dda580d377ca18ceeab353e65a5d23cc947bab84a4012f9dd1eca31cac36937
+DIST xorg-server-21.1.9.tar.xz 4935860 BLAKE2B 8e0a2e0f5fc4d06a08c1424fe618da9822e951f5b744b4cac1b1e14305ab598b162e4f08fb53ba5e60d0001257216755a576b470c961c26a909d66e9a46d1c77 SHA512 9044e1b9222616fb63aea444b75f4ca6582edb7d899018f8ea30359e57edf04b1555e69397ebc4d288f7e36d6b82a54dde3895f11d414573d229e908ac17bfe8

diff --git a/x11-base/xorg-server/files/xorg-server-21.1.9-xephyr-Don-t-check-for-SeatId-anymore.patch b/x11-base/xorg-server/files/xorg-server-21.1.9-xephyr-Don-t-check-for-SeatId-anymore.patch
new file mode 100644
index 000000000000..64581c9d0a18
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-21.1.9-xephyr-Don-t-check-for-SeatId-anymore.patch
@@ -0,0 +1,66 @@
+https://bugs.gentoo.org/884221
+https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1192
+
+From 4c03b67d334b05b814239420776f2fdd4c4a98ac Mon Sep 17 00:00:00 2001
+From: nerdopolis <bluescreen_avenger@verizon.net>
+Date: Tue, 11 Jan 2022 18:41:42 -0500
+Subject: [PATCH xserver] xephyr: Don't check for SeatId anymore
+
+After a change for the xserver to automatically determine the seat
+based on the XDG_SEAT variable, xephyr stopped working. This was
+because of an old feature where xephyr used to handle evdev
+directly. This was dropped some time ago, and now this check is
+not needed
+---
+ hw/kdrive/ephyr/ephyrinit.c | 34 ++++++++++++++++------------------
+ 1 file changed, 16 insertions(+), 18 deletions(-)
+
+diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
+index 020461db2..09cd28cb3 100644
+--- a/hw/kdrive/ephyr/ephyrinit.c
++++ b/hw/kdrive/ephyr/ephyrinit.c
+@@ -70,25 +70,23 @@ InitInput(int argc, char **argv)
+     KdKeyboardInfo *ki;
+     KdPointerInfo *pi;
+ 
+-    if (!SeatId) {
+-        KdAddKeyboardDriver(&EphyrKeyboardDriver);
+-        KdAddPointerDriver(&EphyrMouseDriver);
+-
+-        if (!kdHasKbd) {
+-            ki = KdNewKeyboard();
+-            if (!ki)
+-                FatalError("Couldn't create Xephyr keyboard\n");
+-            ki->driver = &EphyrKeyboardDriver;
+-            KdAddKeyboard(ki);
+-        }
++    KdAddKeyboardDriver(&EphyrKeyboardDriver);
++    KdAddPointerDriver(&EphyrMouseDriver);
++
++    if (!kdHasKbd) {
++        ki = KdNewKeyboard();
++        if (!ki)
++            FatalError("Couldn't create Xephyr keyboard\n");
++        ki->driver = &EphyrKeyboardDriver;
++        KdAddKeyboard(ki);
++    }
+ 
+-        if (!kdHasPointer) {
+-            pi = KdNewPointer();
+-            if (!pi)
+-                FatalError("Couldn't create Xephyr pointer\n");
+-            pi->driver = &EphyrMouseDriver;
+-            KdAddPointer(pi);
+-        }
++    if (!kdHasPointer) {
++        pi = KdNewPointer();
++        if (!pi)
++            FatalError("Couldn't create Xephyr pointer\n");
++        pi->driver = &EphyrMouseDriver;
++        KdAddPointer(pi);
+     }
+ 
+     KdInitInput();
+-- 
+2.41.0
+

diff --git a/x11-base/xorg-server/xorg-server-21.1.9.ebuild b/x11-base/xorg-server/xorg-server-21.1.9.ebuild
new file mode 100644
index 000000000000..f4b46fb4d12e
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-21.1.9.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+XORG_TARBALL_SUFFIX="xz"
+XORG_EAUTORECONF="no"
+inherit flag-o-matic xorg-3 meson
+EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
+
+DESCRIPTION="X.Org X servers"
+SLOT="0/${PV}"
+if [[ ${PV} != 9999* ]]; then
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+IUSE_SERVERS="xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} debug +elogind minimal selinux suid systemd test +udev unwind xcsecurity"
+RESTRICT="!test? ( test )"
+
+CDEPEND="
+	media-libs/libglvnd[X]
+	dev-libs/libbsd
+	dev-libs/openssl:0=
+	>=x11-apps/iceauth-1.0.2
+	>=x11-apps/xauth-1.0.3
+	x11-apps/xkbcomp
+	>=x11-libs/libdrm-2.4.89
+	>=x11-libs/libpciaccess-0.12.901
+	>=x11-libs/libXau-1.0.4
+	>=x11-libs/libXdmcp-1.0.2
+	>=x11-libs/libXfont2-2.0.1
+	>=x11-libs/libxkbfile-1.0.4
+	>=x11-libs/libxshmfence-1.1
+	>=x11-libs/pixman-0.27.2
+	>=x11-misc/xbitmaps-1.0.1
+	>=x11-misc/xkeyboard-config-2.4.1-r3
+	xorg? (
+		>=x11-libs/libxcvt-0.1.0
+	)
+	xnest? (
+		>=x11-libs/libXext-1.0.99.4
+		>=x11-libs/libX11-1.1.5
+	)
+	xephyr? (
+		x11-libs/libxcb
+		x11-libs/xcb-util
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	!minimal? (
+		>=media-libs/mesa-18[X(+),egl(+),gbm(+)]
+		>=media-libs/libepoxy-1.5.4[X,egl(+)]
+	)
+	udev? ( virtual/libudev:= )
+	unwind? ( sys-libs/libunwind:= )
+	selinux? (
+		sys-process/audit
+		sys-libs/libselinux:=
+	)
+	systemd? (
+		sys-apps/dbus
+		sys-apps/systemd
+	)
+	elogind? (
+		sys-apps/dbus
+		sys-auth/elogind[pam]
+		sys-auth/pambase[elogind]
+	)
+	!!x11-drivers/nvidia-drivers[-libglvnd(+)]
+"
+DEPEND="${CDEPEND}
+	>=x11-base/xorg-proto-2021.4.99.2
+	>=x11-libs/xtrans-1.3.5
+	media-fonts/font-util
+	test? ( >=x11-libs/libxcvt-0.1.0 )
+"
+RDEPEND="${CDEPEND}
+	!systemd? ( gui-libs/display-manager-init )
+	selinux? ( sec-policy/selinux-xserver )
+	xorg? ( >=x11-apps/xinit-1.3.3-r1 )
+"
+BDEPEND="
+	sys-devel/flex
+"
+PDEPEND="
+	xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
+
+REQUIRED_USE="!minimal? (
+		|| ( ${IUSE_SERVERS} )
+	)
+	elogind? ( udev )
+	?? ( elogind systemd )"
+
+UPSTREAMED_PATCHES=(
+)
+
+PATCHES=(
+	"${UPSTREAMED_PATCHES[@]}"
+	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
+	# needed for new eselect-opengl, bug #541232
+	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
+
+	"${FILESDIR}"/${P}-xephyr-Don-t-check-for-SeatId-anymore.patch
+)
+
+src_configure() {
+	# bug #835653
+	use x86 && replace-flags -Os -O2
+
+	# localstatedir is used for the log location; we need to override the default
+	#	from ebuild.sh
+	# sysconfdir is used for the xorg.conf location; same applies
+	local emesonargs=(
+		--localstatedir "${EPREFIX}/var"
+		--sysconfdir "${EPREFIX}/etc/X11"
+		--buildtype $(usex debug debug plain)
+		-Db_ndebug=$(usex debug false true)
+		$(meson_use !minimal dri1)
+		$(meson_use !minimal dri2)
+		$(meson_use !minimal dri3)
+		$(meson_use !minimal glamor)
+		$(meson_use !minimal glx)
+		$(meson_use udev)
+		$(meson_use udev udev_kms)
+		$(meson_use unwind libunwind)
+		$(meson_use xcsecurity)
+		$(meson_use selinux xselinux)
+		$(meson_use xephyr)
+		$(meson_use xnest)
+		$(meson_use xorg)
+		$(meson_use xvfb)
+		-Ddocs=false
+		-Ddrm=true
+		-Ddtrace=false
+		-Dipv6=true
+		-Dhal=false
+		-Dlinux_acpi=false
+		-Dlinux_apm=false
+		-Dsecure-rpc=false
+		-Dsha1=libcrypto
+		-Dxkb_output_dir="${EPREFIX}/var/lib/xkb"
+	)
+
+	if [[ ${PV} == 9999 ]] ; then
+		# Gone in 21.1.x, but not in master.
+		emesonargs+=( -Dxwayland=false )
+	fi
+
+	if use systemd || use elogind; then
+		emesonargs+=(
+			-Dsystemd_logind=true
+			$(meson_use suid suid_wrapper)
+		)
+	else
+		emesonargs+=(
+			-Dsystemd_logind=false
+			-Dsuid_wrapper=false
+		)
+	fi
+
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+
+	# The meson build system does not support install-setuid
+	if ! use systemd && ! use elogind; then
+		if use suid; then
+			chmod u+s "${ED}"/usr/bin/Xorg
+		fi
+	fi
+
+	if ! use xorg; then
+		rm -f "${ED}"/usr/share/man/man1/Xserver.1x \
+			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
+			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
+			"${ED}"/usr/share/man/man1/Xserver.1x || die
+	fi
+
+	# install the @x11-module-rebuild set for Portage
+	insinto /usr/share/portage/config/sets
+	newins "${FILESDIR}"/xorg-sets.conf xorg.conf
+}
+
+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
+		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2023-07-09  8:13 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-07-09  8:13 UTC (permalink / raw
  To: gentoo-commits

commit:     10fc6a6a7edcf1e7ff3d4db4fcbcbe18cec8f734
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Jul  9 08:08:19 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jul  9 08:08:43 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10fc6a6a

x11-base/xorg-server: backport deadlock fix

From the 21.1 backport branch.

Closes: https://bugs.gentoo.org/909643
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/xorg-server-21.1.8-deadlock.patch        |  97 +++++++++++
 x11-base/xorg-server/xorg-server-21.1.8-r1.ebuild  | 194 +++++++++++++++++++++
 2 files changed, 291 insertions(+)

diff --git a/x11-base/xorg-server/files/xorg-server-21.1.8-deadlock.patch b/x11-base/xorg-server/files/xorg-server-21.1.8-deadlock.patch
new file mode 100644
index 000000000000..8da824119edf
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-21.1.8-deadlock.patch
@@ -0,0 +1,97 @@
+https://bugs.gentoo.org/909643
+https://gitlab.freedesktop.org/mesa/mesa/-/issues/116
+https://gitlab.freedesktop.org/mesa/mesa/-/issues/6685
+https://gitlab.freedesktop.org/xorg/xserver/-/commit/b98fc07d3442a289c6bef82df50dd0a2d01de71a
+
+From b98fc07d3442a289c6bef82df50dd0a2d01de71a Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Thu, 2 Feb 2023 12:26:27 -0500
+Subject: [PATCH] present: Send a PresentConfigureNotify event for destroyed
+ windows
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This enables fixing a deadlock case on the client side, where the client
+ends up blocked waiting for a Present event that will never come because
+the window was destroyed. The new PresentWindowDestroyed flag allows the
+client to avoid blocking indefinitely.
+
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/116
+See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6685
+Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
+(cherry picked from commit 462b06033e66a32308d940eb5fc47f5e4c914dc0)
+--- a/present/present_event.c
++++ b/present/present_event.c
+@@ -102,7 +102,8 @@ present_event_swap(xGenericEvent *from, xGenericEvent *to)
+ }
+ 
+ void
+-present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling)
++present_send_config_notify(WindowPtr window, int x, int y, int w, int h,
++                           int bw, WindowPtr sibling, CARD32 flags)
+ {
+     present_window_priv_ptr window_priv = present_window_priv(window);
+ 
+@@ -122,7 +123,7 @@ present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw,
+             .off_y = 0,
+             .pixmap_width = w,
+             .pixmap_height = h,
+-            .pixmap_flags = 0
++            .pixmap_flags = flags
+         };
+         present_event_ptr event;
+ 
+--- a/present/present_priv.h
++++ b/present/present_priv.h
+@@ -43,6 +43,11 @@
+ #define DebugPresent(x)
+ #endif
+ 
++/* XXX this belongs in presentproto */
++#ifndef PresentWindowDestroyed
++#define PresentWindowDestroyed (1 << 0)
++#endif
++
+ extern int present_request;
+ 
+ extern DevPrivateKeyRec present_screen_private_key;
+@@ -307,7 +312,7 @@ void
+ present_free_events(WindowPtr window);
+ 
+ void
+-present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling);
++present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling, CARD32 flags);
+ 
+ void
+ present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc);
+--- a/present/present_screen.c
++++ b/present/present_screen.c
+@@ -93,6 +93,15 @@ present_destroy_window(WindowPtr window)
+     present_screen_priv_ptr screen_priv = present_screen_priv(screen);
+     present_window_priv_ptr window_priv = present_window_priv(window);
+ 
++    present_send_config_notify(window,
++                               window->drawable.x,
++                               window->drawable.y,
++                               window->drawable.width,
++                               window->drawable.height,
++                               window->borderWidth,
++                               window->nextSib,
++                               PresentWindowDestroyed);
++
+     if (window_priv) {
+         present_clear_window_notifies(window);
+         present_free_events(window);
+@@ -123,7 +132,7 @@ present_config_notify(WindowPtr window,
+     ScreenPtr screen = window->drawable.pScreen;
+     present_screen_priv_ptr screen_priv = present_screen_priv(screen);
+ 
+-    present_send_config_notify(window, x, y, w, h, bw, sibling);
++    present_send_config_notify(window, x, y, w, h, bw, sibling, 0);
+ 
+     unwrap(screen_priv, screen, ConfigNotify);
+     if (screen->ConfigNotify)
+-- 
+GitLab

diff --git a/x11-base/xorg-server/xorg-server-21.1.8-r1.ebuild b/x11-base/xorg-server/xorg-server-21.1.8-r1.ebuild
new file mode 100644
index 000000000000..654737cbf8be
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-21.1.8-r1.ebuild
@@ -0,0 +1,194 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+XORG_TARBALL_SUFFIX="xz"
+XORG_EAUTORECONF="no"
+inherit flag-o-matic xorg-3 meson
+EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
+
+DESCRIPTION="X.Org X servers"
+SLOT="0/${PV}"
+if [[ ${PV} != 9999* ]]; then
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+fi
+
+IUSE_SERVERS="xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} debug +elogind minimal selinux suid systemd test +udev unwind xcsecurity"
+RESTRICT="!test? ( test )"
+
+CDEPEND="
+	media-libs/libglvnd[X]
+	dev-libs/libbsd
+	dev-libs/openssl:0=
+	>=x11-apps/iceauth-1.0.2
+	>=x11-apps/rgb-1.0.3
+	>=x11-apps/xauth-1.0.3
+	x11-apps/xkbcomp
+	>=x11-libs/libdrm-2.4.89
+	>=x11-libs/libpciaccess-0.12.901
+	>=x11-libs/libXau-1.0.4
+	>=x11-libs/libXdmcp-1.0.2
+	>=x11-libs/libXfont2-2.0.1
+	>=x11-libs/libxkbfile-1.0.4
+	>=x11-libs/libxshmfence-1.1
+	>=x11-libs/pixman-0.27.2
+	>=x11-misc/xbitmaps-1.0.1
+	>=x11-misc/xkeyboard-config-2.4.1-r3
+	xorg? (
+		>=x11-libs/libxcvt-0.1.0
+	)
+	xnest? (
+		>=x11-libs/libXext-1.0.99.4
+		>=x11-libs/libX11-1.1.5
+	)
+	xephyr? (
+		x11-libs/libxcb
+		x11-libs/xcb-util
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	!minimal? (
+		>=media-libs/mesa-18[X(+),egl(+),gbm(+)]
+		>=media-libs/libepoxy-1.5.4[X,egl(+)]
+	)
+	udev? ( virtual/libudev:= )
+	unwind? ( sys-libs/libunwind:= )
+	selinux? (
+		sys-process/audit
+		sys-libs/libselinux:=
+	)
+	systemd? (
+		sys-apps/dbus
+		sys-apps/systemd
+	)
+	elogind? (
+		sys-apps/dbus
+		sys-auth/elogind[pam]
+		sys-auth/pambase[elogind]
+	)
+	!!x11-drivers/nvidia-drivers[-libglvnd(+)]
+"
+DEPEND="${CDEPEND}
+	>=x11-base/xorg-proto-2021.4.99.2
+	>=x11-libs/xtrans-1.3.5
+	media-fonts/font-util
+	test? ( >=x11-libs/libxcvt-0.1.0 )
+"
+RDEPEND="${CDEPEND}
+	!systemd? ( gui-libs/display-manager-init )
+	selinux? ( sec-policy/selinux-xserver )
+	xorg? ( >=x11-apps/xinit-1.3.3-r1 )
+"
+BDEPEND="
+	sys-devel/flex
+"
+PDEPEND="
+	xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
+
+REQUIRED_USE="!minimal? (
+		|| ( ${IUSE_SERVERS} )
+	)
+	elogind? ( udev )
+	?? ( elogind systemd )"
+
+UPSTREAMED_PATCHES=(
+	"${FILESDIR}"/${P}-deadlock.patch
+)
+
+PATCHES=(
+	"${UPSTREAMED_PATCHES[@]}"
+	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
+	# needed for new eselect-opengl, bug #541232
+	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
+)
+
+src_configure() {
+	# bug #835653
+	use x86 && replace-flags -Os -O2
+
+	# localstatedir is used for the log location; we need to override the default
+	#	from ebuild.sh
+	# sysconfdir is used for the xorg.conf location; same applies
+	local emesonargs=(
+		--localstatedir "${EPREFIX}/var"
+		--sysconfdir "${EPREFIX}/etc/X11"
+		--buildtype $(usex debug debug plain)
+		-Db_ndebug=$(usex debug false true)
+		$(meson_use !minimal dri1)
+		$(meson_use !minimal dri2)
+		$(meson_use !minimal dri3)
+		$(meson_use !minimal glamor)
+		$(meson_use !minimal glx)
+		$(meson_use udev)
+		$(meson_use udev udev_kms)
+		$(meson_use unwind libunwind)
+		$(meson_use xcsecurity)
+		$(meson_use selinux xselinux)
+		$(meson_use xephyr)
+		$(meson_use xnest)
+		$(meson_use xorg)
+		$(meson_use xvfb)
+		-Ddocs=false
+		-Ddrm=true
+		-Ddtrace=false
+		-Dipv6=true
+		-Dhal=false
+		-Dlinux_acpi=false
+		-Dlinux_apm=false
+		-Dsecure-rpc=false
+		-Dsha1=libcrypto
+		-Dxkb_output_dir="${EPREFIX}/var/lib/xkb"
+	)
+
+	if [[ ${PV} == 9999 ]] ; then
+		# Gone in 21.1.x, but not in master.
+		emesonargs+=( -Dxwayland=false )
+	fi
+
+	if use systemd || use elogind; then
+		emesonargs+=(
+			-Dsystemd_logind=true
+			$(meson_use suid suid_wrapper)
+		)
+	else
+		emesonargs+=(
+			-Dsystemd_logind=false
+			-Dsuid_wrapper=false
+		)
+	fi
+
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+
+	# The meson build system does not support install-setuid
+	if ! use systemd && ! use elogind; then
+		if use suid; then
+			chmod u+s "${ED}"/usr/bin/Xorg
+		fi
+	fi
+
+	if ! use xorg; then
+		rm -f "${ED}"/usr/share/man/man1/Xserver.1x \
+			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
+			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
+			"${ED}"/usr/share/man/man1/Xserver.1x || die
+	fi
+
+	# install the @x11-module-rebuild set for Portage
+	insinto /usr/share/portage/config/sets
+	newins "${FILESDIR}"/xorg-sets.conf xorg.conf
+}
+
+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
+		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2021-12-02  2:37 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2021-12-02  2:37 UTC (permalink / raw
  To: gentoo-commits

commit:     858311492b0112ad227968ba6813cffc1fe85f75
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  2 02:36:34 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec  2 02:36:34 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85831149

x11-base/xorg-server: apply DPI revert patch to 21.1.1

Upstream changed their mind post-release given the widespread breakage.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/xorg-server-21.1.1-DPI-revert.patch      | 133 +++++++++++++++++++++
 ...-21.1.1.ebuild => xorg-server-21.1.1-r1.ebuild} |   1 +
 2 files changed, 134 insertions(+)

diff --git a/x11-base/xorg-server/files/xorg-server-21.1.1-DPI-revert.patch b/x11-base/xorg-server/files/xorg-server-21.1.1-DPI-revert.patch
new file mode 100644
index 000000000000..89d8e2653a28
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-21.1.1-DPI-revert.patch
@@ -0,0 +1,133 @@
+https://gitlab.freedesktop.org/xorg/xserver/-/commit/35af1299e73483eaf93d913a960e1d1738bc7de6
+
+From: Povilas Kanapickas <povilas@radix.lt>
+Date: Sat, 13 Nov 2021 17:23:54 +0200
+Subject: [PATCH] Revert "hw/xfree86: Propagate physical dimensions from DRM
+ connector"
+
+Quite a lot of applications currently expect the screen DPI exposed by
+the X server to be 96 even when the real display DPI is different.
+Additionally, currently Xwayland completely ignores any hardware
+information and sets the DPI to 96. Accordingly the new behavior, even
+if it fixes a bug, should not be enabled automatically to all users.
+
+A better solution would be to make the default DPI stay as is and enable
+the correct behavior with a command line option (maybe -dpi auto, or
+similar). For now let's just revert the bug fix.
+
+This reverts commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d.
+
+Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
+--- a/hw/xfree86/common/xf86Helper.c
++++ b/hw/xfree86/common/xf86Helper.c
+@@ -55,7 +55,6 @@
+ #include "xf86Xinput.h"
+ #include "xf86InPriv.h"
+ #include "mivalidate.h"
+-#include "xf86Crtc.h"
+ 
+ /* For xf86GetClocks */
+ #if defined(CSRG_BASED) || defined(__GNU__)
+@@ -852,9 +851,8 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+ {
+     MessageType from = X_DEFAULT;
+     xf86MonPtr DDC = (xf86MonPtr) (pScrn->monitor->DDC);
+-    int probedWidthmm, probedHeightmm;
++    int ddcWidthmm, ddcHeightmm;
+     int widthErr, heightErr;
+-    xf86OutputPtr compat = xf86CompatOutput(pScrn);
+ 
+     /* XXX Maybe there is no need for widthmm/heightmm in ScrnInfoRec */
+     pScrn->widthmm = pScrn->monitor->widthmm;
+@@ -864,15 +862,11 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+         /* DDC gives display size in mm for individual modes,
+          * but cm for monitor
+          */
+-        probedWidthmm = DDC->features.hsize * 10;  /* 10mm in 1cm */
+-        probedHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
+-    }
+-    else if (compat && compat->mm_width > 0 && compat->mm_height > 0) {
+-        probedWidthmm = compat->mm_width;
+-        probedHeightmm = compat->mm_height;
++        ddcWidthmm = DDC->features.hsize * 10;  /* 10mm in 1cm */
++        ddcHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */
+     }
+     else {
+-        probedWidthmm = probedHeightmm = 0;
++        ddcWidthmm = ddcHeightmm = 0;
+     }
+ 
+     if (monitorResolution > 0) {
+@@ -898,15 +892,15 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+                    pScrn->widthmm, pScrn->heightmm);
+ 
+         /* Warn if config and probe disagree about display size */
+-        if (probedWidthmm && probedHeightmm) {
++        if (ddcWidthmm && ddcHeightmm) {
+             if (pScrn->widthmm > 0) {
+-                widthErr = abs(probedWidthmm - pScrn->widthmm);
++                widthErr = abs(ddcWidthmm - pScrn->widthmm);
+             }
+             else {
+                 widthErr = 0;
+             }
+             if (pScrn->heightmm > 0) {
+-                heightErr = abs(probedHeightmm - pScrn->heightmm);
++                heightErr = abs(ddcHeightmm - pScrn->heightmm);
+             }
+             else {
+                 heightErr = 0;
+@@ -915,17 +909,17 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)
+                 /* Should include config file name for monitor here */
+                 xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+                            "Probed monitor is %dx%d mm, using Displaysize %dx%d mm\n",
+-                           probedWidthmm, probedHeightmm, pScrn->widthmm,
++                           ddcWidthmm, ddcHeightmm, pScrn->widthmm,
+                            pScrn->heightmm);
+             }
+         }
+     }
+-    else if (probedWidthmm && probedHeightmm) {
++    else if (ddcWidthmm && ddcHeightmm) {
+         from = X_PROBED;
+         xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n",
+-                   probedWidthmm, probedHeightmm);
+-        pScrn->widthmm = probedWidthmm;
+-        pScrn->heightmm = probedHeightmm;
++                   ddcWidthmm, ddcHeightmm);
++        pScrn->widthmm = ddcWidthmm;
++        pScrn->heightmm = ddcHeightmm;
+         if (pScrn->widthmm > 0) {
+             pScrn->xDpi =
+                 (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+--- a/hw/xfree86/modes/xf86Crtc.c
++++ b/hw/xfree86/modes/xf86Crtc.c
+@@ -3256,10 +3256,8 @@ xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon)
+     free(output->MonInfo);
+ 
+     output->MonInfo = edid_mon;
+-    if (edid_mon) {
+-        output->mm_width = 0;
+-        output->mm_height = 0;
+-    }
++    output->mm_width = 0;
++    output->mm_height = 0;
+ 
+     if (debug_modes) {
+         xf86DrvMsg(scrn->scrnIndex, X_INFO, "EDID for output %s\n",
+--- a/hw/xfree86/modes/xf86RandR12.c
++++ b/hw/xfree86/modes/xf86RandR12.c
+@@ -806,12 +806,6 @@ xf86RandR12CreateScreenResources(ScreenPtr pScreen)
+                 mmWidth = output->conf_monitor->mon_width;
+                 mmHeight = output->conf_monitor->mon_height;
+             }
+-            else if (output &&
+-                (output->mm_width > 0 &&
+-                 output->mm_height > 0)) {
+-                mmWidth = output->mm_width;
+-                mmHeight = output->mm_height;
+-            }
+             else {
+                 /*
+                  * Otherwise, just set the screen to DEFAULT_DPI
+GitLab

diff --git a/x11-base/xorg-server/xorg-server-21.1.1.ebuild b/x11-base/xorg-server/xorg-server-21.1.1-r1.ebuild
similarity index 99%
rename from x11-base/xorg-server/xorg-server-21.1.1.ebuild
rename to x11-base/xorg-server/xorg-server-21.1.1-r1.ebuild
index feb237caedaf..0990ccd85bcd 100644
--- a/x11-base/xorg-server/xorg-server-21.1.1.ebuild
+++ b/x11-base/xorg-server/xorg-server-21.1.1-r1.ebuild
@@ -92,6 +92,7 @@ REQUIRED_USE="!minimal? (
 	?? ( elogind systemd )"
 
 UPSTREAMED_PATCHES=(
+	"${FILESDIR}"/${P}-DPI-revert.patch
 )
 
 PATCHES=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2020-03-19 21:50 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2020-03-19 21:50 UTC (permalink / raw
  To: gentoo-commits

commit:     ff6b355183abf835dc5355e01e6ca742eaff3a12
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 19 21:13:07 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 19 21:50:43 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff6b3551

x11-base/xorg-server: Add patch to build with -fno-common

Closes: https://bugs.gentoo.org/705880
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 ...erver-1.20.7-Fix-building-with-fno-common.patch | 254 +++++++++++++++++++++
 x11-base/xorg-server/xorg-server-1.20.7.ebuild     |   1 +
 2 files changed, 255 insertions(+)

diff --git a/x11-base/xorg-server/files/xorg-server-1.20.7-Fix-building-with-fno-common.patch b/x11-base/xorg-server/files/xorg-server-1.20.7-Fix-building-with-fno-common.patch
new file mode 100644
index 00000000000..d3011fcb255
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.20.7-Fix-building-with-fno-common.patch
@@ -0,0 +1,254 @@
+From 1610ef1d6b5ba99da9d1a639f3b65b2e61514a7d Mon Sep 17 00:00:00 2001
+From: David Seifert <soap@gentoo.org>
+Date: Fri, 24 Jan 2020 12:49:44 +0100
+Subject: [PATCH xserver] Fix building with `-fno-common`
+
+* GCC 10 will switch the default to `-fno-common`.
+  https://gcc.gnu.org/PR85678
+
+Bug: https://bugs.gentoo.org/705880
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+ hw/dmx/config/dmxconfig.c                | 2 +-
+ hw/dmx/config/xdmxconfig.c               | 2 +-
+ hw/dmx/glxProxy/glxext.c                 | 2 --
+ hw/xwayland/xwayland.c                   | 2 +-
+ test/misc.c                              | 2 +-
+ test/xi1/protocol-xchangedevicecontrol.c | 2 +-
+ test/xi2/protocol-common.c               | 2 ++
+ test/xi2/protocol-common.h               | 2 +-
+ test/xi2/protocol-xigetclientpointer.c   | 2 +-
+ test/xi2/protocol-xigetselectedevents.c  | 2 +-
+ test/xi2/protocol-xipassivegrabdevice.c  | 2 +-
+ test/xi2/protocol-xiquerydevice.c        | 2 +-
+ test/xi2/protocol-xiquerypointer.c       | 2 +-
+ test/xi2/protocol-xiqueryversion.c       | 2 +-
+ test/xi2/protocol-xiselectevents.c       | 2 +-
+ test/xi2/protocol-xisetclientpointer.c   | 2 +-
+ test/xi2/protocol-xiwarppointer.c        | 2 +-
+ 17 files changed, 17 insertions(+), 17 deletions(-)
+
+diff --git a/hw/dmx/config/dmxconfig.c b/hw/dmx/config/dmxconfig.c
+index c1a9e1cf3..85bc0dbe4 100644
+--- a/hw/dmx/config/dmxconfig.c
++++ b/hw/dmx/config/dmxconfig.c
+@@ -72,7 +72,7 @@ typedef struct DMXConfigCmdStruct {
+     DMXConfigList *xinputs;
+ } DMXConfigCmd, *DMXConfigCmdPtr;
+ 
+-DMXConfigEntryPtr dmxConfigEntry;
++extern DMXConfigEntryPtr dmxConfigEntry;
+ static DMXConfigCmd dmxConfigCmd;
+ 
+ static int dmxDisplaysFromCommandLine;
+diff --git a/hw/dmx/config/xdmxconfig.c b/hw/dmx/config/xdmxconfig.c
+index 49e4b5459..05d839688 100644
+--- a/hw/dmx/config/xdmxconfig.c
++++ b/hw/dmx/config/xdmxconfig.c
+@@ -65,7 +65,7 @@ extern FILE *yyin;
+ #define DMX_CANVAS_WIDTH  400
+ #define DMX_CANVAS_HEIGHT 500
+ 
+-DMXConfigEntryPtr dmxConfigEntry;
++extern DMXConfigEntryPtr dmxConfigEntry;
+ static DMXConfigVirtualPtr dmxConfigCurrent, dmxConfigNewVirtual;
+ static DMXConfigDisplayPtr dmxConfigCurrentDisplay, dmxConfigNewDisplay;
+ static int dmxConfigGrabbed, dmxConfigGrabbedFine;
+diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c
+index 49848bbff..ca9780f99 100644
+--- a/hw/dmx/glxProxy/glxext.c
++++ b/hw/dmx/glxProxy/glxext.c
+@@ -47,8 +47,6 @@
+ #include "extinit.h"
+ #include "glx_extinit.h"
+ 
+-int noGlxExtension;
+-
+ /*
+ ** Forward declarations.
+ */
+diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c
+index feb1058b7..5fefa5923 100644
+--- a/hw/xwayland/xwayland.c
++++ b/hw/xwayland/xwayland.c
+@@ -40,7 +40,7 @@
+ 
+ #ifdef XF86VIDMODE
+ #include <X11/extensions/xf86vmproto.h>
+-_X_EXPORT Bool noXFree86VidModeExtension;
++extern _X_EXPORT Bool noXFree86VidModeExtension;
+ #endif
+ 
+ #ifdef XWL_HAS_GLAMOR
+diff --git a/test/misc.c b/test/misc.c
+index 3c669b677..f1f76cccd 100644
+--- a/test/misc.c
++++ b/test/misc.c
+@@ -33,7 +33,7 @@
+ 
+ #include "tests-common.h"
+ 
+-ScreenInfo screenInfo;
++extern ScreenInfo screenInfo;
+ 
+ static void
+ dix_version_compare(void)
+diff --git a/test/xi1/protocol-xchangedevicecontrol.c b/test/xi1/protocol-xchangedevicecontrol.c
+index 57a15c407..54f1f67cb 100644
+--- a/test/xi1/protocol-xchangedevicecontrol.c
++++ b/test/xi1/protocol-xchangedevicecontrol.c
+@@ -37,7 +37,7 @@
+ 
+ #include "protocol-common.h"
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ static ClientRec client_request;
+ 
+ static void
+diff --git a/test/xi2/protocol-common.c b/test/xi2/protocol-common.c
+index 8cd85dd05..05dd3c4e7 100644
+--- a/test/xi2/protocol-common.c
++++ b/test/xi2/protocol-common.c
+@@ -45,6 +45,8 @@ static ClientRec server_client;
+ 
+ void *global_userdata;
+ 
++void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata);
++
+ int enable_GrabButton_wrap = 1;
+ int enable_XISetEventMask_wrap = 1;
+ 
+diff --git a/test/xi2/protocol-common.h b/test/xi2/protocol-common.h
+index 8490529ad..742ce348f 100644
+--- a/test/xi2/protocol-common.h
++++ b/test/xi2/protocol-common.h
+@@ -99,7 +99,7 @@ extern void *global_userdata;
+  * The reply handler called from WriteToClient. Set this handler if you need
+  * to check the reply values.
+  */
+-void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata);
++extern void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata);
+ 
+ /**
+  * The default screen used for the windows. Initialized by init_simple().
+diff --git a/test/xi2/protocol-xigetclientpointer.c b/test/xi2/protocol-xigetclientpointer.c
+index 9c38bd720..244e8438f 100644
+--- a/test/xi2/protocol-xigetclientpointer.c
++++ b/test/xi2/protocol-xigetclientpointer.c
+@@ -46,7 +46,7 @@ static struct {
+     int win;
+ } test_data;
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ static ClientRec client_request;
+ 
+ static void
+diff --git a/test/xi2/protocol-xigetselectedevents.c b/test/xi2/protocol-xigetselectedevents.c
+index 9a0fac5d4..b14100224 100644
+--- a/test/xi2/protocol-xigetselectedevents.c
++++ b/test/xi2/protocol-xigetselectedevents.c
+@@ -60,7 +60,7 @@ static struct {
+     int mask_len;
+ } test_data;
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ 
+ /* AddResource is called from XISetSEventMask, we don't need this */
+ Bool
+diff --git a/test/xi2/protocol-xipassivegrabdevice.c b/test/xi2/protocol-xipassivegrabdevice.c
+index c703a1ee8..142bcecb7 100644
+--- a/test/xi2/protocol-xipassivegrabdevice.c
++++ b/test/xi2/protocol-xipassivegrabdevice.c
+@@ -41,7 +41,7 @@
+ 
+ #include "protocol-common.h"
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ static ClientRec client_request;
+ 
+ #define N_MODS 7
+diff --git a/test/xi2/protocol-xiquerydevice.c b/test/xi2/protocol-xiquerydevice.c
+index a068038fd..6ee8a80fc 100644
+--- a/test/xi2/protocol-xiquerydevice.c
++++ b/test/xi2/protocol-xiquerydevice.c
+@@ -54,7 +54,7 @@ struct test_data {
+     int num_devices_in_reply;
+ };
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ 
+ static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data,
+                                      void *closure);
+diff --git a/test/xi2/protocol-xiquerypointer.c b/test/xi2/protocol-xiquerypointer.c
+index ed75d7910..0f5a2b57a 100644
+--- a/test/xi2/protocol-xiquerypointer.c
++++ b/test/xi2/protocol-xiquerypointer.c
+@@ -41,7 +41,7 @@
+ 
+ #include "protocol-common.h"
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ static ClientRec client_request;
+ static void reply_XIQueryPointer_data(ClientPtr client, int len,
+                                       char *data, void *closure);
+diff --git a/test/xi2/protocol-xiqueryversion.c b/test/xi2/protocol-xiqueryversion.c
+index 3ce758faa..c7ddbfc10 100644
+--- a/test/xi2/protocol-xiqueryversion.c
++++ b/test/xi2/protocol-xiqueryversion.c
+@@ -58,7 +58,7 @@ struct test_data {
+     int minor_expected;
+ };
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ 
+ static void
+ reply_XIQueryVersion(ClientPtr client, int len, char *data, void *closure)
+diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
+index f136c23d0..06050ade7 100644
+--- a/test/xi2/protocol-xiselectevents.c
++++ b/test/xi2/protocol-xiselectevents.c
+@@ -62,7 +62,7 @@
+ 
+ static unsigned char *data[4096 * 20];  /* the request data buffer */
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ 
+ int
+ __real_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
+diff --git a/test/xi2/protocol-xisetclientpointer.c b/test/xi2/protocol-xisetclientpointer.c
+index 6584bb9cc..ddc9f0000 100644
+--- a/test/xi2/protocol-xisetclientpointer.c
++++ b/test/xi2/protocol-xisetclientpointer.c
+@@ -48,7 +48,7 @@
+ 
+ #include "protocol-common.h"
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ static ClientRec client_request;
+ 
+ static void
+diff --git a/test/xi2/protocol-xiwarppointer.c b/test/xi2/protocol-xiwarppointer.c
+index 8484d54e5..e5c2f31ea 100644
+--- a/test/xi2/protocol-xiwarppointer.c
++++ b/test/xi2/protocol-xiwarppointer.c
+@@ -44,7 +44,7 @@
+ static int expected_x = SPRITE_X;
+ static int expected_y = SPRITE_Y;
+ 
+-ClientRec client_window;
++extern ClientRec client_window;
+ 
+ /**
+  * This function overrides the one in the screen rec.
+-- 
+2.24.1
+

diff --git a/x11-base/xorg-server/xorg-server-1.20.7.ebuild b/x11-base/xorg-server/xorg-server-1.20.7.ebuild
index 794466e2d51..33eb1762fd0 100644
--- a/x11-base/xorg-server/xorg-server-1.20.7.ebuild
+++ b/x11-base/xorg-server/xorg-server-1.20.7.ebuild
@@ -118,6 +118,7 @@ REQUIRED_USE="!minimal? (
 	xephyr? ( kdrive )"
 
 UPSTREAMED_PATCHES=(
+	"${FILESDIR}"/${P}-Fix-building-with-fno-common.patch
 )
 
 PATCHES=(


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2020-01-26 21:10 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2020-01-26 21:10 UTC (permalink / raw
  To: gentoo-commits

commit:     5144ab5fc62a428f70645a13012d8d0f697fc040
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 26 21:08:01 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun Jan 26 21:09:56 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5144ab5f

x11-base/xorg-server: Drop old versions

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 x11-base/xorg-server/Manifest                      |   1 -
 ...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/xorg-server-1.20.5.ebuild     | 236 ---------------------
 5 files changed, 572 deletions(-)

diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index c2b87823b65..3cdea5a75a0 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -1,3 +1,2 @@
-DIST xorg-server-1.20.5.tar.bz2 6126757 BLAKE2B 2374c6f39acd80174d9cf9c15b6a75f420de3a9b7b51a41385a326fed106fc57fdc5a0a4a08beba36a8d65bff1c8c8d35bb50c73c5285ee206f3293a212369be SHA512 625f0626b122cf95600abe382c3217348999357a0e2d2443092f1b67cff1c98d7ef09303884ceaeac181e0555dc56b0d4d44bda45cc464dac2d9a50c5b32d631
 DIST xorg-server-1.20.6.tar.bz2 6298697 BLAKE2B 30e505cf83bb2b20e17533b89b81521d029412ea6bd804ecf20458af20364172eb7b21561f14c885d5e16597e6d09985b255b6cec2beb30662658d9e316bc953 SHA512 9aa0ba4aee92fe628f2b8c41e4fe0134dc86154bb8787f907884ef2fd970e18e68e72ea8a1beb706d11ecf155b2abc9731f1abadff251ed592f8cca3b1240dd6
 DIST xorg-server-1.20.7.tar.bz2 6303005 BLAKE2B 343ebc1ff45fc1cd459b204d92eabdd0629c94d4338d2d7cb635f73642080d07ef174cfbd83e5b7f253f2918af2d1efbe99d7c75720b88857f69093ee0be1b65 SHA512 c67612e379111c28c68941c0a660abf72be7669591b41ccaa3b3474c4540a03822a28d892831b12ce08bac6e5e7e33504c2d19ef2a0c2298f83bd083459f96f5

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 54ed62935a6..00000000000
--- 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 <eric@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 <eric@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 fce25944537..00000000000
--- 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.volkov@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.volkov@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 1ce9e130794..00000000000
--- 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 <eric@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 <eric@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/xorg-server-1.20.5.ebuild b/x11-base/xorg-server/xorg-server-1.20.5.ebuild
deleted file mode 100644
index c3bedac6b16..00000000000
--- a/x11-base/xorg-server/xorg-server-1.20.5.ebuild
+++ /dev/null
@@ -1,236 +0,0 @@
-# Copyright 1999-2019 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
-EGIT_REPO_URI="https://gitlab.freedesktop.org/xorg/xserver.git"
-
-DESCRIPTION="X.Org X servers"
-SLOT="0/${PV}"
-if [[ ${PV} != 9999* ]]; then
-	KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux"
-fi
-
-IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb"
-IUSE="${IUSE_SERVERS} debug elogind ipv6 libressl libglvnd minimal selinux +suid systemd +udev unwind xcsecurity"
-
-CDEPEND="libglvnd? (
-		media-libs/libglvnd
-		!app-eselect/eselect-opengl
-	)
-	!libglvnd? ( >=app-eselect/eselect-opengl-1.3.0	)
-	!libressl? ( dev-libs/openssl:0= )
-	libressl? ( dev-libs/libressl:0= )
-	>=x11-apps/iceauth-1.0.2
-	>=x11-apps/rgb-1.0.3
-	>=x11-apps/xauth-1.0.3
-	x11-apps/xkbcomp
-	>=x11-libs/libdrm-2.4.89
-	>=x11-libs/libpciaccess-0.12.901
-	>=x11-libs/libXau-1.0.4
-	>=x11-libs/libXdmcp-1.0.2
-	>=x11-libs/libXfont2-2.0.1
-	>=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? (
-		x11-libs/libXt
-		>=x11-libs/libdmx-1.0.99.1
-		>=x11-libs/libX11-1.1.5
-		>=x11-libs/libXaw-1.0.4
-		>=x11-libs/libXext-1.0.99.4
-		>=x11-libs/libXfixes-5.0
-		>=x11-libs/libXi-1.2.99.1
-		>=x11-libs/libXmu-1.0.3
-		x11-libs/libXrender
-		>=x11-libs/libXres-1.0.3
-		>=x11-libs/libXtst-1.0.99.2
-	)
-	kdrive? (
-		>=x11-libs/libXext-1.0.5
-		x11-libs/libXv
-	)
-	xephyr? (
-		x11-libs/libxcb[xkb]
-		x11-libs/xcb-util
-		x11-libs/xcb-util-image
-		x11-libs/xcb-util-keysyms
-		x11-libs/xcb-util-renderutil
-		x11-libs/xcb-util-wm
-	)
-	!minimal? (
-		>=x11-libs/libX11-1.1.5
-		>=x11-libs/libXext-1.0.5
-		>=media-libs/mesa-18[X(+),egl,gbm]
-		media-libs/libepoxy[X,egl(+)]
-	)
-	udev? ( virtual/libudev:= )
-	unwind? ( sys-libs/libunwind )
-	wayland? (
-		>=dev-libs/wayland-1.3.0
-		media-libs/libepoxy[egl(+)]
-		>=dev-libs/wayland-protocols-1.1
-	)
-	>=x11-apps/xinit-1.3.3-r1
-	systemd? (
-		sys-apps/dbus
-		sys-apps/systemd
-	)
-	elogind? (
-		sys-apps/dbus
-		sys-auth/elogind
-		sys-auth/pambase[elogind]
-	)
-	"
-
-DEPEND="${CDEPEND}
-	sys-devel/flex
-	>=x11-base/xorg-proto-2018.4
-	dmx? (
-		doc? (
-			|| (
-				www-client/links
-				www-client/lynx
-				www-client/w3m
-			)
-		)
-	)"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-xserver )
-	!x11-drivers/xf86-video-modesetting
-"
-
-PDEPEND="
-	xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
-
-REQUIRED_USE="!minimal? (
-		|| ( ${IUSE_SERVERS} )
-	)
-	elogind? ( udev )
-	?? ( elogind systemd )
-	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=(
-	"${UPSTREAMED_PATCHES[@]}"
-	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
-	# needed for new eselect-opengl, bug #541232
-	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
-)
-
-pkg_setup() {
-	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
-	#	from ebuild.sh
-	# sysconfdir is used for the xorg.conf location; same applies
-	# NOTE: fop is used for doc generating; and I have no idea if Gentoo
-	#	package it somewhere
-	XORG_CONFIGURE_OPTIONS=(
-		$(use_enable ipv6)
-		$(use_enable debug)
-		$(use_enable dmx)
-		$(use_enable kdrive)
-		$(use_enable unwind libunwind)
-		$(use_enable wayland xwayland)
-		$(use_enable !minimal record)
-		$(use_enable !minimal xfree86-utils)
-		$(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)
-		$(use_enable xnest)
-		$(use_enable xorg)
-		$(use_enable xvfb)
-		$(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
-		--with-fontrootdir="${EPREFIX}"/usr/share/fonts
-		--with-xkb-output="${EPREFIX}"/var/lib/xkb
-		--disable-config-hal
-		--disable-linux-acpi
-		--without-dtrace
-		--without-fop
-		--with-os-vendor=Gentoo
-		--with-sha1=libcrypto
-	)
-}
-
-src_prepare() {
-	sed -i -e 's/"gl >= .*"/"gl"/' configure.ac || die
-	default
-	eautoreconf
-}
-
-src_install() {
-	xorg-3_src_install
-
-	server_based_install
-
-	if ! use minimal && use xorg; then
-		# Install xorg.conf.example into docs
-		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
-
-	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)
-		if ! use libglvnd; then
-			eselect opengl set xorg-x11 --use-old
-		fi
-	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
-		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
-	fi
-}
-
-server_based_install() {
-	if ! use xorg; then
-		rm "${ED}"/usr/share/man/man1/Xserver.1x \
-			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
-			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
-			"${ED}"/usr/share/man/man1/Xserver.1x
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2018-05-05 19:04 Nick Sarnie
  0 siblings, 0 replies; 11+ messages in thread
From: Nick Sarnie @ 2018-05-05 19:04 UTC (permalink / raw
  To: gentoo-commits

commit:     6d0297870ace46f17905f7440cee1614ce2ffb9b
Author:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
AuthorDate: Sat May  5 18:55:53 2018 +0000
Commit:     Nick Sarnie <sarnex <AT> gentoo <DOT> org>
CommitDate: Sat May  5 19:04:06 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d029787

x11-base/xorg-server: Backport patch to fix colors on Intel GPUs

Colors are broken on Intel GPUs with Mesa 18.0, let's backport the fix

Bug: https://bugs.gentoo.org/653688
Package-Manager: Portage-2.3.36, Repoman-2.3.9

 ...t-pick-sRGB-config-for-32-bit-RGBA-visual.patch |  39 ++++
 x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild  | 251 +++++++++++++++++++++
 2 files changed, 290 insertions(+)

diff --git a/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch b/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch
new file mode 100644
index 00000000000..d7e5e511e5d
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch
@@ -0,0 +1,39 @@
+From c2954b16c8730c7ed8441fd8dba25900f3aed265 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tapani=20P=C3=A4lli?= <tapani.palli@intel.com>
+Date: Tue, 28 Nov 2017 09:23:29 +0200
+Subject: [PATCH] glx: do not pick sRGB config for 32-bit RGBA visual
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes blending issues seen with kwin and gnome-shell when
+32bit visual has sRGB capability set.
+
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103699
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103646
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103655
+---
+ glx/glxscreens.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/glx/glxscreens.c b/glx/glxscreens.c
+index 73444152a..596d972e0 100644
+--- a/glx/glxscreens.c
++++ b/glx/glxscreens.c
+@@ -271,6 +271,11 @@ pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual)
+         /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */
+         if (visual->nplanes == 32 && config->rgbBits != 32)
+             continue;
++        /* If it's the 32-bit RGBA visual, do not pick sRGB capable config.
++         * This can cause issues with compositors that are not sRGB aware.
++         */
++        if (visual->nplanes == 32 && config->sRGBCapable == GL_TRUE)
++            continue;
+         /* Can't use the same FBconfig for multiple X visuals.  I think. */
+         if (config->visualID != 0)
+             continue;
+-- 
+2.17.0
+

diff --git a/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild b/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild
new file mode 100644
index 00000000000..4b366b21c80
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-1.19.5-r2.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+XORG_DOC=doc
+inherit xorg-2 multilib versionator flag-o-matic
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git"
+
+DESCRIPTION="X.Org X servers"
+SLOT="0/${PV}"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+
+IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} debug +glamor ipv6 libressl minimal selinux +suid systemd tslib +udev unwind xcsecurity"
+
+CDEPEND=">=app-eselect/eselect-opengl-1.3.0
+	!libressl? ( dev-libs/openssl:0= )
+	libressl? ( dev-libs/libressl:0= )
+	>=x11-apps/iceauth-1.0.2
+	>=x11-apps/rgb-1.0.3
+	>=x11-apps/xauth-1.0.3
+	x11-apps/xkbcomp
+	>=x11-libs/libdrm-2.4.46
+	>=x11-libs/libpciaccess-0.12.901
+	>=x11-libs/libXau-1.0.4
+	>=x11-libs/libXdmcp-1.0.2
+	>=x11-libs/libXfont2-2.0.1
+	>=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? (
+		x11-libs/libXt
+		>=x11-libs/libdmx-1.0.99.1
+		>=x11-libs/libX11-1.1.5
+		>=x11-libs/libXaw-1.0.4
+		>=x11-libs/libXext-1.0.99.4
+		>=x11-libs/libXfixes-5.0
+		>=x11-libs/libXi-1.2.99.1
+		>=x11-libs/libXmu-1.0.3
+		x11-libs/libXrender
+		>=x11-libs/libXres-1.0.3
+		>=x11-libs/libXtst-1.0.99.2
+	)
+	glamor? (
+		media-libs/libepoxy[X]
+		>=media-libs/mesa-10.3.4-r1[egl,gbm]
+		!x11-libs/glamor
+	)
+	kdrive? (
+		>=x11-libs/libXext-1.0.5
+		x11-libs/libXv
+	)
+	xephyr? (
+		x11-libs/libxcb[xkb]
+		x11-libs/xcb-util
+		x11-libs/xcb-util-image
+		x11-libs/xcb-util-keysyms
+		x11-libs/xcb-util-renderutil
+		x11-libs/xcb-util-wm
+	)
+	!minimal? (
+		>=x11-libs/libX11-1.1.5
+		>=x11-libs/libXext-1.0.5
+		>=media-libs/mesa-10.3.4-r1
+	)
+	tslib? ( >=x11-libs/tslib-1.0 )
+	udev? ( >=virtual/udev-150 )
+	unwind? ( sys-libs/libunwind )
+	wayland? (
+		>=dev-libs/wayland-1.3.0
+		media-libs/libepoxy
+		>=dev-libs/wayland-protocols-1.1
+	)
+	>=x11-apps/xinit-1.3.3-r1
+	systemd? (
+		sys-apps/dbus
+		sys-apps/systemd
+	)"
+
+DEPEND="${CDEPEND}
+	sys-devel/flex
+	>=x11-proto/bigreqsproto-1.1.0
+	>=x11-proto/compositeproto-0.4
+	>=x11-proto/damageproto-1.1
+	>=x11-proto/fixesproto-5.0
+	>=x11-proto/fontsproto-2.1.3
+	>=x11-proto/glproto-1.4.17-r1
+	>=x11-proto/inputproto-2.3
+	>=x11-proto/kbproto-1.0.3
+	>=x11-proto/randrproto-1.5.0
+	>=x11-proto/recordproto-1.13.99.1
+	>=x11-proto/renderproto-0.11
+	>=x11-proto/resourceproto-1.2.0
+	>=x11-proto/scrnsaverproto-1.1
+	>=x11-proto/trapproto-3.4.3
+	>=x11-proto/videoproto-2.2.2
+	>=x11-proto/xcmiscproto-1.2.0
+	>=x11-proto/xextproto-7.2.99.901
+	>=x11-proto/xf86dgaproto-2.0.99.1
+	>=x11-proto/xf86vidmodeproto-2.2.99.1
+	>=x11-proto/xineramaproto-1.1.3
+	>=x11-proto/xproto-7.0.31
+	>=x11-proto/presentproto-1.0
+	>=x11-proto/dri2proto-2.8
+	>=x11-proto/dri3proto-1.0
+	dmx? (
+		>=x11-proto/dmxproto-2.2.99.1
+		doc? (
+			|| (
+				www-client/links
+				www-client/lynx
+				www-client/w3m
+			)
+		)
+	)
+	!minimal? (
+		>=x11-proto/xf86driproto-2.1.0
+	)"
+
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-xserver )
+	!x11-drivers/xf86-video-modesetting
+"
+
+PDEPEND="
+	xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )"
+
+REQUIRED_USE="!minimal? (
+		|| ( ${IUSE_SERVERS} )
+	)
+	xephyr? ( kdrive )"
+
+#UPSTREAMED_PATCHES=(
+#	"${WORKDIR}/patches/"
+#)
+
+PATCHES=(
+	"${UPSTREAMED_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.19.4-sysmacros.patch #633530
+	"${FILESDIR}"/${PN}-1.19.5-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch #653688
+)
+
+pkg_pretend() {
+	# older gcc is not supported
+	[[ "${MERGE_TYPE}" != "binary" && $(gcc-major-version) -lt 4 ]] && \
+		die "Sorry, but gcc earlier than 4.0 will not work for xorg-server."
+}
+
+pkg_setup() {
+	if use wayland && ! use glamor; then
+		ewarn "glamor is necessary for acceleration under Xwayland."
+		ewarn "Performance may be unacceptable without it."
+	fi
+}
+
+src_configure() {
+	# localstatedir is used for the log location; we need to override the default
+	#	from ebuild.sh
+	# sysconfdir is used for the xorg.conf location; same applies
+	# NOTE: fop is used for doc generating; and I have no idea if Gentoo
+	#	package it somewhere
+	XORG_CONFIGURE_OPTIONS=(
+		$(use_enable ipv6)
+		$(use_enable debug)
+		$(use_enable dmx)
+		$(use_enable glamor)
+		$(use_enable kdrive)
+		$(use_enable kdrive kdrive-kbd)
+		$(use_enable kdrive kdrive-mouse)
+		$(use_enable kdrive kdrive-evdev)
+		$(use_enable suid install-setuid)
+		$(use_enable tslib)
+		$(use_enable unwind libunwind)
+		$(use_enable wayland xwayland)
+		$(use_enable !minimal record)
+		$(use_enable !minimal xfree86-utils)
+		$(use_enable !minimal dri)
+		$(use_enable !minimal dri2)
+		$(use_enable !minimal glx)
+		$(use_enable xcsecurity)
+		$(use_enable xephyr)
+		$(use_enable xnest)
+		$(use_enable xorg)
+		$(use_enable xvfb)
+		$(use_enable udev config-udev)
+		$(use_with doc doxygen)
+		$(use_with doc xmlto)
+		$(use_with systemd systemd-daemon)
+		$(use_enable systemd systemd-logind)
+		--enable-libdrm
+		--sysconfdir="${EPREFIX}"/etc/X11
+		--localstatedir="${EPREFIX}"/var
+		--with-fontrootdir="${EPREFIX}"/usr/share/fonts
+		--with-xkb-output="${EPREFIX}"/var/lib/xkb
+		--disable-config-hal
+		--disable-linux-acpi
+		--without-dtrace
+		--without-fop
+		--with-os-vendor=Gentoo
+		--with-sha1=libcrypto
+	)
+
+	xorg-2_src_configure
+}
+
+src_install() {
+	xorg-2_src_install
+
+	server_based_install
+
+	if ! use minimal && use xorg; then
+		# Install xorg.conf.example into docs
+		dodoc "${AUTOTOOLS_BUILD_DIR}"/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
+}
+
+pkg_postinst() {
+	# sets up libGL and DRI2 symlinks if needed (ie, on a fresh install)
+	eselect opengl set xorg-x11 --use-old
+}
+
+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
+		rm -rf "${EROOT}"/usr/$(get_libdir)/xorg/modules
+	fi
+}
+
+server_based_install() {
+	if ! use xorg; then
+		rm "${ED}"/usr/share/man/man1/Xserver.1x \
+			"${ED}"/usr/$(get_libdir)/xserver/SecurityPolicy \
+			"${ED}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
+			"${ED}"/usr/share/man/man1/Xserver.1x
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/
@ 2018-03-06 20:25 Matt Turner
  0 siblings, 0 replies; 11+ messages in thread
From: Matt Turner @ 2018-03-06 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     bbf0927bb971152a4d7e18b7fa3f3c40c186a569
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  6 20:23:08 2018 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Tue Mar  6 20:25:20 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbf0927b

x11-base/xorg-server: Add upstream patch to fix crash

Closes: https://bugs.gentoo.org/649392

 .../xorg-server-1.19.99.901-randr-fix-crash.patch  | 44 ++++++++++++++++++++++
 ...01.ebuild => xorg-server-1.19.99.901-r1.ebuild} |  1 +
 2 files changed, 45 insertions(+)

diff --git a/x11-base/xorg-server/files/xorg-server-1.19.99.901-randr-fix-crash.patch b/x11-base/xorg-server/files/xorg-server-1.19.99.901-randr-fix-crash.patch
new file mode 100644
index 00000000000..bcaaf867c7a
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.19.99.901-randr-fix-crash.patch
@@ -0,0 +1,44 @@
+From 2af0a50a4bb9be9f58681d417ceb9a7029caaf3b Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 28 Feb 2018 11:23:41 -0500
+Subject: [PATCH] randr: Fix a crash on initialization with GPU screens
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+RRSetChanged (immediately above) was immune to screens with no master,
+but RRTellChanged was not:
+
+    Thread 1 "X" received signal SIGSEGV, Segmentation fault.
+    RRTellChanged (pScreen=<optimized out>) at ../../randr/randr.c:576
+    576             mastersp = rrGetScrPriv(master);
+    (gdb) bt
+    #0  RRTellChanged (pScreen=<optimized out>) at ../../randr/randr.c:576
+    #1  0x000055555566f1e9 in RRNoticePropertyChange (value=0x555555bfbf28, property=70, output=0x555555bfef10) at ../../randr/rrproperty.c:153
+    #2  RRChangeOutputProperty (output=output@entry=0x555555bfef10, property=<optimized out>, type=type@entry=19, format=format@entry=32, mode=<optimized out>, mode@entry=0, len=len@entry=1, value=0x7fffffffe77c, sendevent=1, pending=0)
+        at ../../randr/rrproperty.c:263
+    #3  0x000055555566dba5 in RROutputSetNonDesktop (output=output@entry=0x555555bfef10, nonDesktop=nonDesktop@entry=0) at ../../randr/rroutput.c:333
+    ...
+
+Reported-by: Michel Dänzer <michel@daenzer.net>
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+---
+ randr/randr.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/randr/randr.c b/randr/randr.c
+index 339ad3ece..feb54bcc8 100644
+--- a/randr/randr.c
++++ b/randr/randr.c
+@@ -602,6 +602,8 @@ RRTellChanged(ScreenPtr pScreen)
+ 
+     if (pScreen->isGPU) {
+         master = pScreen->current_master;
++        if (!master)
++            return;
+         mastersp = rrGetScrPriv(master);
+     }
+     else {
+-- 
+2.16.1
+

diff --git a/x11-base/xorg-server/xorg-server-1.19.99.901.ebuild b/x11-base/xorg-server/xorg-server-1.19.99.901-r1.ebuild
similarity index 99%
rename from x11-base/xorg-server/xorg-server-1.19.99.901.ebuild
rename to x11-base/xorg-server/xorg-server-1.19.99.901-r1.ebuild
index 37491c682e6..19c536df784 100644
--- a/x11-base/xorg-server/xorg-server-1.19.99.901.ebuild
+++ b/x11-base/xorg-server/xorg-server-1.19.99.901-r1.ebuild
@@ -117,6 +117,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
 	# needed for new eselect-opengl, bug #541232
 	"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
+	"${FILESDIR}"/${P}-randr-fix-crash.patch
 )
 
 pkg_pretend() {


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-11-06  1:22 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-28  5:47 [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/files/, x11-base/xorg-server/ Matt Turner
  -- strict thread matches above, loose matches on Subject: below --
2024-11-06  1:22 Matt Turner
2023-12-14  4:12 Sam James
2023-11-25 17:31 Matt Turner
2023-10-25 15:41 Matt Turner
2023-07-09  8:13 Sam James
2021-12-02  2:37 Sam James
2020-03-19 21:50 Matt Turner
2020-01-26 21:10 Matt Turner
2018-05-05 19:04 Nick Sarnie
2018-03-06 20:25 Matt Turner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox