summaryrefslogtreecommitdiff
path: root/x11-base
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-03-03 13:42:34 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-03-03 13:42:34 +0000
commit066d27181e9a797ad9f8fc43b49fc9a10ff2f707 (patch)
tree3cb05783d73b2c33589ba305144a31c718e123cd /x11-base
parent16449a80e28af2209916cc66d19c9a44ca2b90d9 (diff)
gentoo resync : 03.03.2019
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/Manifest.gzbin1048 -> 1050 bytes
-rw-r--r--x11-base/xorg-server/Manifest7
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.20.4-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch174
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.20.4-shm-Use-memfd_create-when-possible.patch89
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.20.4-shm-reindent-shm_tmpfile-to-follow-our-standards.patch72
-rw-r--r--x11-base/xorg-server/xorg-server-1.20.4.ebuild219
-rw-r--r--x11-base/xorg-server/xorg-server-9999.ebuild33
7 files changed, 572 insertions, 22 deletions
diff --git a/x11-base/Manifest.gz b/x11-base/Manifest.gz
index eb2a41e33302..e552d3115924 100644
--- a/x11-base/Manifest.gz
+++ b/x11-base/Manifest.gz
Binary files differ
diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
index c3a79a302d31..2c367c61577b 100644
--- a/x11-base/xorg-server/Manifest
+++ b/x11-base/xorg-server/Manifest
@@ -3,8 +3,13 @@ AUX xdm.confd-4 573 BLAKE2B 0c2a282acc851b95f925715c31915be469ef3758bbaa800d5fc5
AUX xdm.initd-11 6021 BLAKE2B 75b0ae0adb0a96324d6cd7be98686e3806ea87dada2cdd8ecb128e59e18add456a55ecd30080ab9ff5fb96ae972c05625913a333b5e42a7c8fed19ed8698f154 SHA512 c599d41e2476239ee3ba704ca2493f2d976c5de660ca05393580ca6387eba91156a00a1aa919da2b0d4a5f943eb858f801dc8d3cd907d1abd487fe4fe69bd321
AUX xorg-server-1.12-unloadsubmodule.patch 1373 BLAKE2B 4c6017bcdc53964ecc796e1beaf8a8714a85f1cfe65032df3e9ea23378b4d2db0057ea7a75ab00e8d5d89ae0d63c766dce05350446f69ffe69bb668d06e2e68b SHA512 a6a8ebbb1005f2ea9cfdfc928209a23fe213caab31a889c3290f14bcae0a9afd40176330e2e56cb5ff986d522505e7fb98fa0c71187f403e2afd33c9c919780e
AUX xorg-server-1.18-support-multiple-Files-sections.patch 1902 BLAKE2B 69ba852b425d652ebb83d116cabbf92d1530d2c616910ddbb96fb574cdad8d3f1ce2b4fcf9fb16aa2950b40a0723c9d00465d8e6d72299f1ea181a257d014c80 SHA512 5cd0a4ce9c2efef7abc84df805a3c6da33bd64fdb16c3aa2fa61da4f805605a3d12cab0f452d3bc217b6e5d5d5bea29c9f3bf262e46347a074770ebd75ddf5b5
+AUX xorg-server-1.20.4-shm-Pick-the-shm-dir-at-run-time-not-build-time.patch 4981 BLAKE2B 46b6548ebddbd962725b4e2a08060decd84f33dc74c2c4a7f4325402712b9dc84fd3325b2027fe0b98e9dd6a6a39bc976ba2a35481c5c49da310cd45a0e4dd3f SHA512 423b8869c3ce2ff74373aa04dca788896d8d47380b5b2368f51e5cc3100f47a94384ef2f616779a44d4cd04b8e0f997190ab7df58ae4605b5c9819fe1f93fb45
+AUX xorg-server-1.20.4-shm-Use-memfd_create-when-possible.patch 3194 BLAKE2B 6aca2b21b6b82cdd81a82d45bdbd1f861d4babdf222b73d285f118b42fdcb0a2b1f2949ab2141c7d95d3819c6687dc2323b4da19fbe99d865a2e51393b2c534a SHA512 a2de27ade9c79e8712c66d3ec8a1c9d4af0acdbbbc9bfdc58f0f9d8f2830a069fc3f3a74c92f5b0b0ff889bfc89017e7d0fed7fcd10b8916d0589b9f9171f81a
+AUX xorg-server-1.20.4-shm-reindent-shm_tmpfile-to-follow-our-standards.patch 1724 BLAKE2B 34c607f6b6a6f21ed6b34d7a87cb3bc1774f526f32144218c7d5d338474c08c98c72a87b41f3d0afcaf81dc0e8d5989a48fd8e64a6a9e25ad968ad8156f6e984 SHA512 49d5af904bac03cfc8ad89b70541e9af6687f7f0153d06ada64e2226d27dddc1b7bb27024bed73c20c365197858957730de005c515bbae8e22b610c3241b70e4
AUX xorg-sets.conf 199 BLAKE2B e9414694f372d3f2a65bee903522094a60e261ddcd0c49a1d85a2ee804f3edbb5c605ed2d0b44839a91e98957f05ea88da87530f5f36b2db249e09ee56ee2975 SHA512 910fe28f20909243044f079ff35136942b8790f4f28ac42ffc64a76b7f03cd22057087fa5e4e01192080b52c0d89000ea96d5a807c6f11f680d3f43312c5be41
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
EBUILD xorg-server-1.20.3.ebuild 5681 BLAKE2B a1088fde11b98f2b99ed3285b1227faf6f43b0e7c4d962027cbfeb2dbb2993323e975a4961c329c000c694243a6bb566f7a91c0932a678bcb85046a3b55d0976 SHA512 4631c5cc8b66959b00f550d7492eb3be466178b032083d393cd4dd69410e53d8535760f522a13b44ede8c488ce477c8159d2dc04629f51584890944cf66edf26
-EBUILD xorg-server-9999.ebuild 5692 BLAKE2B 9c1e868d44693b9ceaa5d2f51711c162d8b4c1d3d1b4fcaffc005d0d4fa341a86b293bdbb4a0d9d9a0349dafe4da138fefdca8528af2f4dfb8c09d3954dfb1b8 SHA512 48d73f4bc95aaf354fbd36171c419d1c919ab46b21002271d94b8a3e2993764e08199b5062fd534b85102a4d5122d8512792340c37da0dcd1ce033119dd8d636
+EBUILD xorg-server-1.20.4.ebuild 5672 BLAKE2B 6121ba98208ad053a5cf7bd3dd1603cf908c3c182eda35327ba77b492fa7109d0f8325a417d4eb8e256baf1ed7e1b44389f9b47cab1b9a6a15794f1ea04daf5b SHA512 3bf5357ba36d8fd73da64bc58936d5e77168ebe7571cbd5af06018337711870376df1e2fcc6e36e7cda385e33956e6c8292566abac1f00259698cc70f9157740
+EBUILD xorg-server-9999.ebuild 5413 BLAKE2B 64fe101633a849cc52aa458afc35095139eaa5243d6db290915eaa1a27a1e144e2c2cb54c012770725a0220b3c9cc446d8e31ee0f22dafc54a9278af8daf5754 SHA512 eadabec90532ffe7f9c7dbee572580ea704923a96eea501f0362ab4e5e94a42d7a7f1e17a1614062069ae1df86603830f818a1e4c37708715389bdca72ebd0da
MISC metadata.xml 858 BLAKE2B 0264739bcd577241b649d094bf9252fa46350ecf27f2685586b3d20f8d85656729c224483dc09ac2f6abcdf0c1e2a2fd67aa5c86e02cdf754becb5cb5d5080a0 SHA512 12f4a444557ad2deb04e230c6b52faacd5d670184e928f89f949411cc3888b1a97aae88589381ca75d2b7e1c88f1b5f30e2256a700fd00ba145c87f21a701edd
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 000000000000..54ed62935a6d
--- /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 000000000000..fce25944537f
--- /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 000000000000..1ce9e1307943
--- /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 000000000000..6a9a3eb1cea4
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-1.20.4.ebuild
@@ -0,0 +1,219 @@
+# 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() {
+ 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)
+ eselect opengl set xorg-x11 --use-old
+ fi
+}
+
+pkg_postrm() {
+ # Get rid of module dir to ensure opengl-update works properly
+ if [[ -z ${REPLACED_BY_VERSION} && -e ${EROOT}/usr/$(get_libdir)/xorg/modules ]]; then
+ 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
+}
diff --git a/x11-base/xorg-server/xorg-server-9999.ebuild b/x11-base/xorg-server/xorg-server-9999.ebuild
index d1cbe013ded9..187e506211e4 100644
--- a/x11-base/xorg-server/xorg-server-9999.ebuild
+++ b/x11-base/xorg-server/xorg-server-9999.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
XORG_DOC=doc
-inherit xorg-2 multilib versionator flag-o-matic
+inherit xorg-3 multilib flag-o-matic
EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git"
DESCRIPTION="X.Org X servers"
@@ -101,7 +101,7 @@ RDEPEND="${CDEPEND}
"
PDEPEND="
- xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )"
+ xorg? ( >=x11-base/xorg-drivers-$(ver_cut 1-2) )"
REQUIRED_USE="!minimal? (
|| ( ${IUSE_SERVERS} )
@@ -109,9 +109,8 @@ REQUIRED_USE="!minimal? (
minimal? ( !glamor !wayland )
xephyr? ( kdrive )"
-#UPSTREAMED_PATCHES=(
-# "${WORKDIR}/patches/"
-#)
+UPSTREAMED_PATCHES=(
+)
PATCHES=(
"${UPSTREAMED_PATCHES[@]}"
@@ -120,20 +119,12 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.18-support-multiple-Files-sections.patch
)
-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
@@ -176,18 +167,16 @@ src_configure() {
--without-fop
--with-sha1=libcrypto
)
-
- xorg-2_src_configure
}
src_install() {
- xorg-2_src_install
+ xorg-3_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
+ dodoc "${S}"/hw/xfree86/xorg.conf.example
fi
newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup
@@ -202,8 +191,10 @@ src_install() {
}
pkg_postinst() {
- # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install)
- eselect opengl set xorg-x11 --use-old
+ if ! use minimal; then
+ # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install)
+ eselect opengl set xorg-x11 --use-old
+ fi
}
pkg_postrm() {