aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Fish <gentoo@seaofdirac.net>2018-04-01 14:13:35 +0200
committerNicholas Fish <gentoo@seaofdirac.net>2018-04-01 14:13:35 +0200
commitab6cc91f6d9957a7882c5cc1389aedfe68a62733 (patch)
treece9fac257645da40c9b3a88e871e3b87c02e273e /x11-base
parentmedia-libs/mesa: add patch to increase created pthread stack size to 1MB to w... (diff)
downloadennui-ab6cc91f6d9957a7882c5cc1389aedfe68a62733.tar.gz
ennui-ab6cc91f6d9957a7882c5cc1389aedfe68a62733.tar.bz2
ennui-ab6cc91f6d9957a7882c5cc1389aedfe68a62733.zip
x11-base/xorg-server: add ebuild for X.Org X Server 1.19.99.902 (1.20.0 RC 2)
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/xorg-server/Manifest8
-rw-r--r--x11-base/xorg-server/files/xdm-setup.initd-113
-rw-r--r--x11-base/xorg-server/files/xdm.confd-410
-rw-r--r--x11-base/xorg-server/files/xdm.initd-11230
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch53
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch36
-rw-r--r--x11-base/xorg-server/files/xorg-sets.conf6
-rw-r--r--x11-base/xorg-server/xorg-server-1.19.99.902.ebuild214
8 files changed, 570 insertions, 0 deletions
diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
new file mode 100644
index 0000000..34d7095
--- /dev/null
+++ b/x11-base/xorg-server/Manifest
@@ -0,0 +1,8 @@
+AUX xdm-setup.initd-1 225 BLAKE2B 16823bad1346820adcb51041ed71791635353e4355f615d0de5d5456919da910c427d348b2300fa8c0e963e1b4fe3ce71cfeb039ab3f084173a20f307c0fd192 SHA512 c6bdf1e195c9af97cd504ef9b63fc0835fe79d24738295d21277aa97951405721b96cff11097098edb707f9b351dce26993de04198d22251ca0655a313083083
+AUX xdm.confd-4 562 BLAKE2B e72acf22f703d4ebf125d086e0147a790f000accb2fe50dd93c2c99753d507f70bf90caeaa804b36496ee8f224da5ca18a7daac0a3ce819d8ffdee133e8b8de1 SHA512 facfb91c0b4e0b1cae86b707d263523215633720e1e8f4595639411f936907b321643e8a06111dd3f7b74fa601476e4b0d09768edfdec762c73fa07cb227588b
+AUX xdm.initd-11 6021 BLAKE2B 75b0ae0adb0a96324d6cd7be98686e3806ea87dada2cdd8ecb128e59e18add456a55ecd30080ab9ff5fb96ae972c05625913a333b5e42a7c8fed19ed8698f154 SHA512 c599d41e2476239ee3ba704ca2493f2d976c5de660ca05393580ca6387eba91156a00a1aa919da2b0d4a5f943eb858f801dc8d3cd907d1abd487fe4fe69bd321
+AUX xorg-server-1.18-support-multiple-Files-sections.patch 1902 BLAKE2B 69ba852b425d652ebb83d116cabbf92d1530d2c616910ddbb96fb574cdad8d3f1ce2b4fcf9fb16aa2950b40a0723c9d00465d8e6d72299f1ea181a257d014c80 SHA512 5cd0a4ce9c2efef7abc84df805a3c6da33bd64fdb16c3aa2fa61da4f805605a3d12cab0f452d3bc217b6e5d5d5bea29c9f3bf262e46347a074770ebd75ddf5b5
+AUX xorg-server-1.19.4-sysmacros.patch 986 BLAKE2B 04c111591a6a558913217b24aa2357478e7d931b6cee5185dda31ebd38d68463b4a158a18d8a60ffa7ccc5c65e246f261ebbf7c0ebc81fd3ae31e7579b7adab4 SHA512 858676058779363741901ffbf79666f723f917b49f8627ddd2f31768873adfb416a70bc298e2356861cb5abca8be54a6c64f8fa4fd11a91cce072b93857ad168
+AUX xorg-sets.conf 199 BLAKE2B e9414694f372d3f2a65bee903522094a60e261ddcd0c49a1d85a2ee804f3edbb5c605ed2d0b44839a91e98957f05ea88da87530f5f36b2db249e09ee56ee2975 SHA512 910fe28f20909243044f079ff35136942b8790f4f28ac42ffc64a76b7f03cd22057087fa5e4e01192080b52c0d89000ea96d5a807c6f11f680d3f43312c5be41
+DIST xorg-server-1.19.99.902.tar.bz2 6077007 BLAKE2B 19b0055e10669d46df88cebcf743e0eee32b3c927a8947b8a64ad8de6ac16d5b2378d9dcb60b9fc8586e16dff118161c03bde0ead37350491ef846cf4ac76302 SHA512 762198b48ec9f2c9b977aa90193fc30183a9cbb967338939d4b8f936430889ee1d7ab3d029cc12c5117adbf032b434777a63caa92f90ca4189587375ee7196de
+EBUILD xorg-server-1.19.99.902.ebuild 5389 BLAKE2B a792bf0136dd89da067c69b78a8b3338e4ddbb94224a3106aefe45186449283fbce4879a6efdda5945661cd978690887e260eef752bf5397dea52b00f3d42bca SHA512 2490522bfbfbc2475c2ee55ed69da6dede6bf7a567c15277cf83550c4084d291473d09c1a12c02113b1af963c55a79689768fb37309659b6d4cf82db5dfb3e11
diff --git a/x11-base/xorg-server/files/xdm-setup.initd-1 b/x11-base/xorg-server/files/xdm-setup.initd-1
new file mode 100644
index 0000000..8f2ed27
--- /dev/null
+++ b/x11-base/xorg-server/files/xdm-setup.initd-1
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+}
+
+start() {
+ if get_bootparam "nox" ; then
+ touch /etc/.noxdm
+ fi
+}
diff --git a/x11-base/xorg-server/files/xdm.confd-4 b/x11-base/xorg-server/files/xdm.confd-4
new file mode 100644
index 0000000..c82fece
--- /dev/null
+++ b/x11-base/xorg-server/files/xdm.confd-4
@@ -0,0 +1,10 @@
+# We always try and start X on a static VT. The various DMs normally default
+# to using VT7. If you wish to use the xdm init script, then you should ensure
+# that the VT checked is the same VT your DM wants to use. We do this check to
+# ensure that you haven't accidentally configured something to run on the VT
+# in your /etc/inittab file so that you don't get a dead keyboard.
+CHECKVT=7
+
+# What display manager do you use ? [ xdm | gdm | kdm | gpe | entrance ]
+# NOTE: If this is set in /etc/rc.conf, that setting will override this one.
+DISPLAYMANAGER="xdm"
diff --git a/x11-base/xorg-server/files/xdm.initd-11 b/x11-base/xorg-server/files/xdm.initd-11
new file mode 100644
index 0000000..c9ec367
--- /dev/null
+++ b/x11-base/xorg-server/files/xdm.initd-11
@@ -0,0 +1,230 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+
+# This is here to serve as a note to myself, and future developers.
+#
+# Any Display manager (gdm,kdm,xdm) has the following problem: if
+# it is started before any getty, and no vt is specified, it will
+# usually run on vt2. When the getty on vt2 then starts, and the
+# DM is already started, the getty will take control of the keyboard,
+# leaving us with a "dead" keyboard.
+#
+# Resolution: add the following line to /etc/inittab
+#
+# x:a:once:/etc/X11/startDM.sh
+#
+# and have /etc/X11/startDM.sh start the DM in daemon mode if
+# a lock is present (with the info of what DM should be started),
+# else just fall through.
+#
+# How this basically works, is the "a" runlevel is a additional
+# runlevel that you can use to fork processes with init, but the
+# runlevel never gets changed to this runlevel. Along with the "a"
+# runlevel, the "once" key word means that startDM.sh will only be
+# run when we specify it to run, thus eliminating respawning
+# startDM.sh when "xdm" is not added to the default runlevel, as was
+# done previously.
+#
+# This script then just calls "telinit a", and init will run
+# /etc/X11/startDM.sh after the current runlevel completes (this
+# script should only be added to the actual runlevel the user is
+# using).
+#
+# Martin Schlemmer
+# aka Azarah
+# 04 March 2002
+
+depend() {
+ need localmount xdm-setup
+
+ # this should start as early as possible
+ # we can't do 'before *' as that breaks it
+ # (#139824) Start after ypbind and autofs for network authentication
+ # (#145219 #180163) Could use lirc mouse as input device
+ # (#70689 comment #92) Start after consolefont to avoid display corruption
+ # (#291269) Start after quota, since some dm need readable home
+ # (#390609) gdm-3 will fail when dbus is not running
+ # (#366753) starting keymaps after X causes problems
+ after bootmisc consolefont modules netmount
+ after readahead-list ypbind autofs openvpn gpm lircmd
+ after quota keymaps
+ before alsasound
+
+ # Start before X
+ use consolekit dbus xfs
+}
+
+setup_dm() {
+ local MY_XDM
+
+ MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')
+
+ # Load our root path from profile.env
+ # Needed for kdm
+ PATH=${PATH}:$(. /etc/profile.env; echo "${ROOTPATH}")
+
+ NAME=
+ case "${MY_XDM}" in
+ kdm|kde)
+ EXE=/usr/bin/kdm
+ PIDFILE=/run/kdm.pid
+ ;;
+ entrance*)
+ EXE=/usr/sbin/entrance
+ PIDFILE=/run/entrance.pid
+ ;;
+ gdm|gnome)
+ # gdm-3 and above has different paths
+ if [ -f /usr/sbin/gdm ]; then
+ EXE=/usr/sbin/gdm
+ PIDFILE=/run/gdm/gdm.pid
+ START_STOP_ARGS="--background"
+ AUTOCLEAN_CGROUP="yes"
+ else
+ EXE=/usr/bin/gdm
+ PIDFILE=/run/gdm.pid
+ fi
+ [ "${RC_UNAME}" != "Linux" ] && NAME=gdm-binary
+ ;;
+ wdm)
+ EXE=/usr/bin/wdm
+ PIDFILE=
+ ;;
+ gpe)
+ EXE=/usr/bin/gpe-dm
+ PIDFILE=/run/gpe-dm.pid
+ ;;
+ lxdm)
+ EXE=/usr/sbin/lxdm-binary
+ PIDFILE=/run/lxdm.pid
+ START_STOP_ARGS="--background"
+ ;;
+ lightdm)
+ EXE=/usr/sbin/lightdm
+ PIDFILE=/run/lightdm.pid
+ START_STOP_ARGS="--background"
+ ;;
+ sddm)
+ EXE="/usr/bin/sddm"
+ START_STOP_ARGS="-m --background"
+ PIDFILE=/run/sddm.pid
+ ;;
+ *)
+ # first find out if there is such executable
+ EXE="$(command -v ${MY_XDM} 2>/dev/null)"
+ PIDFILE="/run/${MY_XDM}.pid"
+
+ # warn user that he is doing sick things if the exe was not found
+ if [ -z "${EXE}" ]; then
+ echo "ERROR: Your XDM value is invalid."
+ echo " No ${MY_XDM} executable could be found on your system."
+ fi
+ ;;
+ esac
+
+ if ! [ -x "${EXE}" ]; then
+ EXE=/usr/bin/xdm
+ PIDFILE=/run/xdm.pid
+ if ! [ -x "/usr/bin/xdm" ]; then
+ echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm,"
+ echo " or install x11-apps/xdm package"
+ eend 255
+ fi
+ fi
+}
+
+# Check to see if something is defined on our VT
+vtstatic() {
+ if [ -e /etc/inittab ] ; then
+ grep -Eq "^[^#]+.*\<tty$1\>" /etc/inittab
+ elif [ -e /etc/ttys ] ; then
+ grep -q "^ttyv$(($1 - 1))" /etc/ttys
+ else
+ return 1
+ fi
+}
+
+start() {
+ local EXE NAME PIDFILE AUTOCLEAN_CGROUP
+ setup_dm
+
+ if [ -f /etc/.noxdm ]; then
+ einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed."
+ rm /etc/.noxdm
+ return 0
+ fi
+
+ ebegin "Setting up ${EXE##*/}"
+
+ # save the prefered DM
+ save_options "service" "${EXE}"
+ save_options "name" "${NAME}"
+ save_options "pidfile" "${PIDFILE}"
+ save_options "start_stop_args" "${START_STOP_ARGS}"
+ save_options "autoclean_cgroup" "${AUTOCLEAN_CGROUP:-no}"
+
+ if [ -n "${CHECKVT-y}" ] ; then
+ if vtstatic "${CHECKVT:-7}" ; then
+ if [ -x /sbin/telinit ] && [ "${SOFTLEVEL}" != "BOOT" ] && [ "${RC_SOFTLEVEL}" != "BOOT" ]; then
+ ewarn "Something is already defined on VT ${CHECKVT:-7}, will start X later"
+ telinit a >/dev/null 2>&1
+ return 0
+ else
+ eerror "Something is already defined on VT ${CHECKVT:-7}, not starting"
+ return 1
+ fi
+ fi
+ fi
+
+ /etc/X11/startDM.sh
+ eend 0
+}
+
+stop() {
+ local curvt retval
+
+ retval=0
+ if [ -t 0 ]; then
+ if type fgconsole >/dev/null 2>&1; then
+ curvt=$(fgconsole 2>/dev/null)
+ else
+ curvt=$(tty)
+ case "${curvt}" in
+ /dev/ttyv[0-9]*) curvt=${curvt#/dev/ttyv} ;;
+ *) curvt= ;;
+ esac
+ fi
+ fi
+ local myexe myname mypidfile myservice
+ myexe=$(get_options "service")
+ myname=$(get_options "name")
+ mypidfile=$(get_options "pidfile")
+ myservice=${myexe##*/}
+ yesno "${rc_cgroup_cleanup:-no}" || rc_cgroup_cleanup=$(get_options "autoclean_cgroup")
+
+ [ -z "${myexe}" ] && return 0
+
+ ebegin "Stopping ${myservice}"
+
+ if start-stop-daemon --quiet --test --stop --exec "${myexe}"; then
+ start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \
+ ${mypidfile:+--pidfile} ${mypidfile} \
+ ${myname:+--name} ${myname}
+ retval=${?}
+ fi
+
+ # switch back to original vt
+ if [ -n "${curvt}" ]; then
+ if type chvt >/dev/null 2>&1; then
+ chvt "${curvt}"
+ else
+ vidcontrol -s "$((curvt + 1))"
+ fi
+ fi
+
+ eend ${retval} "Error stopping ${myservice}"
+ return ${retval}
+}
+
+# vim: set ts=4 :
diff --git a/x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch b/x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch
new file mode 100644
index 0000000..0a61145
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.18-support-multiple-Files-sections.patch
@@ -0,0 +1,53 @@
+See http://lists.x.org/archives/xorg-devel/2015-February/045755.html
+
+diff --git a/hw/xfree86/parser/Files.c b/hw/xfree86/parser/Files.c
+index 849bf92..5cc3ec7 100644
+--- a/hw/xfree86/parser/Files.c
++++ b/hw/xfree86/parser/Files.c
+@@ -76,14 +76,18 @@ static xf86ConfigSymTabRec FilesTab[] = {
+ #define CLEANUP xf86freeFiles
+
+ XF86ConfFilesPtr
+-xf86parseFilesSection(void)
++xf86parseFilesSection(XF86ConfFilesPtr ptr)
+ {
+ int i, j;
+ int k, l;
+ char *str;
+ int token;
+
+- parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec)
++ if (!ptr) {
++ if( (ptr=calloc(1,sizeof(XF86ConfFilesRec))) == NULL ) {
++ return NULL;
++ }
++ }
+
+ while ((token = xf86getToken(FilesTab)) != ENDSECTION) {
+ switch (token) {
+diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h
+index 171f8e8..e8199fe 100644
+--- a/hw/xfree86/parser/configProcs.h
++++ b/hw/xfree86/parser/configProcs.h
+@@ -36,7 +36,7 @@ void xf86freeDeviceList(XF86ConfDevicePtr ptr);
+ int xf86validateDevice(XF86ConfigPtr p);
+
+ /* Files.c */
+-XF86ConfFilesPtr xf86parseFilesSection(void);
++XF86ConfFilesPtr xf86parseFilesSection(XF86ConfFilesPtr ptr);
+ void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr);
+ void xf86freeFiles(XF86ConfFilesPtr p);
+
+diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
+index 327c02a..e0d6139 100644
+--- a/hw/xfree86/parser/read.c
++++ b/hw/xfree86/parser/read.c
+@@ -110,7 +110,7 @@ xf86readConfigFile(void)
+ if (xf86nameCompare(xf86_lex_val.str, "files") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
+- HANDLE_RETURN(conf_files, xf86parseFilesSection());
++ HANDLE_RETURN(conf_files, xf86parseFilesSection(ptr->conf_files));
+ }
+ else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) {
+ free(xf86_lex_val.str);
diff --git a/x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch b/x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch
new file mode 100644
index 0000000..8a3cb76
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.19.4-sysmacros.patch
@@ -0,0 +1,36 @@
+From 7d097c0c38ab82115a1e56489bfe09f9f01b24de Mon Sep 17 00:00:00 2001
+From: Mart Raudsepp <leio@gentoo.org>
+Date: Wed, 11 Oct 2017 16:11:49 +0300
+Subject: [PATCH] config/udev: Add sys/sysmacros.h include for major/minor
+ functions for new glibc
+
+Commits d732c36597fa and 84e3b96b5313 added the include to some files, but
+missed config/udev.c, where the major and minor functions are used as well.
+This should be Linux-only, so we don't need the sys/mkdev.h case here for
+Solaris.
+
+Signed-off-by: Mart Raudsepp <leio@gentoo.org>
+---
+https://bugs.gentoo.org/633530
+https://patchwork.freedesktop.org/patch/181800/
+
+ config/udev.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/config/udev.c b/config/udev.c
+index 932f230..b3b8d0f 100644
+--- a/config/udev.c
++++ b/config/udev.c
+@@ -30,6 +30,9 @@
+ #include <libudev.h>
+ #include <ctype.h>
+ #include <unistd.h>
++#ifdef HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h>
++#endif
+
+ #include "input.h"
+ #include "inputstr.h"
+--
+2.10.2
+
diff --git a/x11-base/xorg-server/files/xorg-sets.conf b/x11-base/xorg-server/files/xorg-sets.conf
new file mode 100644
index 0000000..5cd8112
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-sets.conf
@@ -0,0 +1,6 @@
+# Rebuild all X11 modules (mostly useful after xorg-server ABI change).
+[x11-module-rebuild]
+class = portage.sets.dbapi.VariableSet
+world-candidate = false
+variable = CATEGORY
+includes = x11-drivers
diff --git a/x11-base/xorg-server/xorg-server-1.19.99.902.ebuild b/x11-base/xorg-server/xorg-server-1.19.99.902.ebuild
new file mode 100644
index 0000000..55aa99c
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-1.19.99.902.ebuild
@@ -0,0 +1,214 @@
+# 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}"
+if [[ ${PV} != 9999* ]]; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
+fi
+
+IUSE_SERVERS="dmx kdrive wayland xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} debug +glamor ipv6 libressl minimal selinux systemd +udev unwind xcsecurity"
+
+CDEPEND=">=app-eselect/eselect-opengl-1.3.0
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl )
+ >=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-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
+ )
+ 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-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-$(get_version_component_range 1-2) )"
+
+REQUIRED_USE="!minimal? (
+ || ( ${IUSE_SERVERS} )
+ )
+ xephyr? ( kdrive )"
+
+PATCHES=(
+ # needed for new eselect-opengl, bug #541232
+ "${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
+ # 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)
+ --enable-libdrm
+ --enable-suid-wrapper
+ --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
+}