aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Fish <gentoo@seaofdirac.net>2015-06-05 18:28:49 +0000
committerNicholas Fish <gentoo@seaofdirac.net>2015-06-05 18:28:49 +0000
commitb3cf20445aabdd36f7c125f9e117d1f565a371d9 (patch)
tree1af6517cd9ad41001696f4665643fd9026dd447d /x11-base
parentAdd modified nvidia-drivers package for compilation against musl (diff)
downloadennui-b3cf20445aabdd36f7c125f9e117d1f565a371d9.tar.gz
ennui-b3cf20445aabdd36f7c125f9e117d1f565a371d9.tar.bz2
ennui-b3cf20445aabdd36f7c125f9e117d1f565a371d9.zip
Add modified xorg-server-1.16.4 and new xorg-server-1.17.1 builds for compilation against musl
Diffstat (limited to 'x11-base')
-rw-r--r--x11-base/xorg-server/Manifest15
-rw-r--r--x11-base/xorg-server/files/xdm-setup.initd-114
-rw-r--r--x11-base/xorg-server/files/xdm.confd-410
-rw-r--r--x11-base/xorg-server/files/xdm.initd-11231
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.12-ia64-fix_inx_outx.patch60
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch53
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.14.3-musl.patch31
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-0.patch102
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-1.patch138
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.17-ia64-fix_inx_outx.patch59
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch65
-rw-r--r--x11-base/xorg-server/files/xorg-sets.conf6
-rw-r--r--x11-base/xorg-server/xorg-server-1.16.4-r100.ebuild258
-rw-r--r--x11-base/xorg-server/xorg-server-1.17.1-r99.ebuild271
14 files changed, 1313 insertions, 0 deletions
diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
new file mode 100644
index 0000000..cf8f4de
--- /dev/null
+++ b/x11-base/xorg-server/Manifest
@@ -0,0 +1,15 @@
+AUX xdm-setup.initd-1 346 SHA256 942ce5e8d1a0770543b683dcc388bae7619a24eb9741c1cd678ed3df97c01406 SHA512 b12ef1a757213c2df2d4fb50691695fdaf00ee9edb7d4ec551980c48b6eb05598d3eda0db543719a11a82b019939fb4af82a19813d238a725dcc0d818379103e WHIRLPOOL 28a033355ec3871eba2dfdf45969e9ac354d8ae542dcb1449901af856b9c26314318f6a91cec81f2548caaede19d88e14eac2de0fd7dab8957a7358e94a594b2
+AUX xdm.confd-4 562 SHA256 9d26b72bb28611a60a6b9f942b8d8cfe47b59f926be89af9709b5912668344d8 SHA512 facfb91c0b4e0b1cae86b707d263523215633720e1e8f4595639411f936907b321643e8a06111dd3f7b74fa601476e4b0d09768edfdec762c73fa07cb227588b WHIRLPOOL d701fb5f40ecde2b2f2bb56970576c8abde1499916168fee4a6d27afbc1c0493eb17ddd1a8ee70bfbc77d553a47e219e538febada4946d19cccbdabc90f40e6f
+AUX xdm.initd-11 6136 SHA256 86a17c9ba172481318d5fd51c3aadfdcad9e5d52ed7478379723ce1784061930 SHA512 6ebd1d4aa538c4de0591348e2befe0d03da2014863208ce52dbe9966e069908adcd5efd5b8ed01cfa3bd3c84121e91494e6d82e1cf96acac2ab0b03a2961dfae WHIRLPOOL 16c6f69008c28f3fc2b84e7257e75df578308ed4a4a537600c43d7a6d372c64a3d8f9e8f1a59c2d8106e1bee9a87694d06f3d1f777d132a19544b747e745473d
+AUX xorg-server-1.12-ia64-fix_inx_outx.patch 1737 SHA256 bf996a01faf3d1e6f00f12b17373a2530e7e433d3e6c4cac8935ebddc91cd089 SHA512 18bf9bbb973ae4e3f95ffafca8f82845f0c318c3b2dbf0cf9089a2614215ecf000b9037bfed7d80d9367be01247bf316ba2f6e16aa04fe79c54d81441c962bcd WHIRLPOOL cd133d58fc74de9d49773fe2a570d023cea38d09d7550fb9097a8c83a8393e8fc829ffaac566eee732475410e5d8063d0f99d437a68a67e8d3f65d012522240e
+AUX xorg-server-1.12-unloadsubmodule.patch 1373 SHA256 c68c4c0749b9229c3ca11c72b5ca98b58c7dbaf5c7311ce45890204bdc637c3c SHA512 a6a8ebbb1005f2ea9cfdfc928209a23fe213caab31a889c3290f14bcae0a9afd40176330e2e56cb5ff986d522505e7fb98fa0c71187f403e2afd33c9c919780e WHIRLPOOL 7e9dce7dc4e064567e68697a2966f87cef756670db7e49da50c8d9a5379d7930c3f9642913b8482b8c7597067ef9098e1989284986b5ec605aca6a536329c05c
+AUX xorg-server-1.14.3-musl.patch 916 SHA256 aa3d44a6b21a7991eb730d5ddf345e8ab9cf2a319648576b30a1cf5be2621fd1 SHA512 06bc6860c6fc5508c3e7458f2a6061ad02e893d0ba6303423fe76d12b223ef609f225383da891ecbaf448d9ba82bad94f33d5854763b467c1845588fbbbafcb2 WHIRLPOOL 52e957f34a738fe79eb54707252642ee2a748fc10655a02d6998f5f93380766082a772f1de91d8c65042421329af70a9057580dd5f521edec48516ba58803793
+AUX xorg-server-1.17-cve-2015-0255-0.patch 3454 SHA256 eab604a006dca644132fcc98db36cb184422b16d1e0f6becd94b311565d0f79d SHA512 dcca4037cb0278fc508f8c4a9b33b8e1f21a4be7d22fb6345b2b2c30956dfd9c9e574fb1dba7e1dadd7f312c033e76286b5f94b1edb058a37e704e3b2b27f241 WHIRLPOOL 75aede9cb62103108b08ea2e5f281c2077acc692c5b503f9f4cca55348aa29c2f3dfcf04065105715c57ae3d994bb7c6942405806aba276d4e14a9d6c1dc8b06
+AUX xorg-server-1.17-cve-2015-0255-1.patch 4715 SHA256 dbd9f973ef3fab04f3889cd8a44aeacae87bf463a74209d36f014055495fdbab SHA512 493e55bfb8bf3792af91ceb5ca270f7bad9b885e1eda94e61e9c1837c837906b1134864f000610f0e79acba24a55cd1b948b866cfe634c704cc2e19d4258f5b5 WHIRLPOOL c9bcd9a84e00a466efdfe6b954592c166c6758da124b5d866f25e6ad8f77a3b3cc46c30aa7fc6a6eafa2e70af47e2cd800109ec6ed8f67d04c41db7d53b740a3
+AUX xorg-server-1.17-ia64-fix_inx_outx.patch 1539 SHA256 4c844b2d41b6412304b8a918e3cd93d8f2ab8dad8e6a22310cd87d1f3d8f5e95 SHA512 1db65132bb04eff380d38ccc8441f9f9e5286d7a47956495c0a7de7978107d15e5638d05df0aabbcd11687dd03189a7ac50fca51d755d082869aed71e66dbda1 WHIRLPOOL 8f7f3d107e2f8ce5e07d5dac9bf68b7547425943c3e6b6db92eab8bebc0194da53384c953f5e823a5284025e1bbcf18000b497d31de7c5d46e43f9cc02999915
+AUX xorg-server-1.17-support-multiple-Files-sections.patch 2256 SHA256 1cc57d2e8449d50737c507005df348610bb68241fe36e997e4803b3b8b3e6d86 SHA512 e3141727c993e02b2e067095807e96ef0cc82e2e7c8b65664d0530ef05a0f7b9170272e4e1e3523ede3f1cc23b00c4776785b8299e0b58a6e7fd56062aecefb6 WHIRLPOOL 078a5e30777a8f6e908421a1c7cc4a7e63c23f57b600bb1117bc1e8de2db0e6440870f811e65283acaa48da06fcc5666434d2bdce257709344e8f584d1525623
+AUX xorg-sets.conf 199 SHA256 1201d0337ac69d9715f4454a86dfb8a7bd1ae6f4c2578042fc08f283a997597c SHA512 910fe28f20909243044f079ff35136942b8790f4f28ac42ffc64a76b7f03cd22057087fa5e4e01192080b52c0d89000ea96d5a807c6f11f680d3f43312c5be41 WHIRLPOOL 4acac88e1688ea71df59a86a8a188b5369ad05f61e1369cd620eecd754511578e961a537ff6d0b22156f671d3485289cbc941dfe83bea24a27329b7bebb46c7d
+DIST xorg-server-1.16.4.tar.bz2 5817330 SHA256 abb6e1cc9213a9915a121f48576ff6739a0b8cdb3d32796f9a7743c9a6efc871 SHA512 f756fca65535aa921a85d8d8eb36ea2ba5b7af90a46d640b0ca76259a9abd9d323885087e11156528d95240937c70373045001ae20266a1b9e89909f007e9e74 WHIRLPOOL 63980a3e2b57d2860998344f21a6524598b3dc135c277e5a868e34b57ab5060681ae7137358b3ba8b9ca5fd622a91aeb06bd0ac9e3e5ce1f4dc55df2b2dc0e33
+DIST xorg-server-1.17.1.tar.bz2 5852385 SHA256 2bf8e9f6f0a710dec1d2472467bff1f4e247cb6dcd76eb469aafdc8a2d7db2ab SHA512 195a0e0a6bd9c7655e62dd40dfbd7dea77d10f1143d4fd6154e8bdbb463d3729f81ecd1e379d66f68e828d4f4583782c15ce260de24444802076844aec552c4f WHIRLPOOL a8a78b0bfa6137941e3434f083319a827f0332fd9c190922bb0a33381e86173868d236c96a89ee3049400f37521fe052838416f009713f004227f05b8717d776
+EBUILD xorg-server-1.16.4-r100.ebuild 6839 SHA256 c423c5a6abd1d817fbd2ee1657244370f3684e0a650d527ecdc1ea2f6f7c33d4 SHA512 bcd5079f5d871d939315a2f8f206ac340e4dd0059268c7785e7749b8f27d5ba579aab328131f8a81a675dc8b7e2c750868d5037863c8cb024354376f91de6180 WHIRLPOOL 1b581a0d4f10ae997afd3f4ded6be28c97dfe666cda8d751d53ac716b025f2b3f5efef50579cb4cda770a560cabddbed17c2882db908c2b84a9e954b9f28a0b7
+EBUILD xorg-server-1.17.1-r99.ebuild 7328 SHA256 f37b7301ad2259a3da31b73e4ea0c3ce5464b0773a8917d8328c0cde476e976e SHA512 1958c102974d8f1444e0966253eb824404db8c1359162f384c05fc0e33facd443256051d30f09d621f68f797b7880b2ee4d233397718b6c5bc3df3782ba17114 WHIRLPOOL 184a194e41137fd0d4903643a1f1669f6915e660fc9d931b7d8fe9df146410593ba66ae208ee5260e8355b7d810ac28ef2be531ee466575e7e0b54e8dd229bbe
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..365664e
--- /dev/null
+++ b/x11-base/xorg-server/files/xdm-setup.initd-1
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/files/xdm-setup.initd-1,v 1.1 2010/04/13 10:07:39 scarabeus Exp $
+
+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..2f7b47c
--- /dev/null
+++ b/x11-base/xorg-server/files/xdm.initd-11
@@ -0,0 +1,231 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/files/xdm.initd-11,v 1.1 2014/04/14 16:19:25 chithanh Exp $
+
+# 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.12-ia64-fix_inx_outx.patch b/x11-base/xorg-server/files/xorg-server-1.12-ia64-fix_inx_outx.patch
new file mode 100644
index 0000000..24a5a02
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.12-ia64-fix_inx_outx.patch
@@ -0,0 +1,60 @@
+diff -r --context xorg-server-1.12.3/hw/xfree86/common/compiler.h xorg-server-1.12.3-fix/hw/xfree86/common/compiler.h
+*** xorg-server-1.12.3/hw/xfree86/common/compiler.h 2012-07-06 07:17:19.000000000 +0200
+--- xorg-server-1.12.3-fix/hw/xfree86/common/compiler.h 2012-08-29 00:14:39.000000000 +0200
+***************
+*** 421,426 ****
+--- 421,474 ----
+ #include <machine/pio.h>
+ #endif /* __NetBSD__ */
+
++ #elif defined(linux) && defined(__ia64__)
++ /* for Linux on ia64, we use the LIBC _inx/_outx routines */
++ /* note that the appropriate setup via "ioperm" needs to be done */
++ /* *before* any inx/outx is done. */
++
++ extern _X_EXPORT void _outb(unsigned char val, unsigned long port);
++ extern _X_EXPORT void _outw(unsigned short val, unsigned long port);
++ extern _X_EXPORT void _outl(unsigned int val, unsigned long port);
++ extern _X_EXPORT unsigned int _inb(unsigned long port);
++ extern _X_EXPORT unsigned int _inw(unsigned long port);
++ extern _X_EXPORT unsigned int _inl(unsigned long port);
++
++ static __inline__ void
++ outb(unsigned long port, unsigned char val)
++ {
++ _outb(val, port);
++ }
++
++ static __inline__ void
++ outw(unsigned long port, unsigned short val)
++ {
++ _outw(val, port);
++ }
++
++ static __inline__ void
++ outl(unsigned long port, unsigned int val)
++ {
++ _outl(val, port);
++ }
++
++ static __inline__ unsigned int
++ inb(unsigned long port)
++ {
++ return _inb(port);
++ }
++
++ static __inline__ unsigned int
++ inw(unsigned long port)
++ {
++ return _inw(port);
++ }
++
++ static __inline__ unsigned int
++ inl(unsigned long port)
++ {
++ return _inl(port);
++ }
++
+ #elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__)
+
+ #include <inttypes.h>
diff --git a/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch b/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch
new file mode 100644
index 0000000..57c7349
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch
@@ -0,0 +1,53 @@
+diff -u13 -r xorg-server-1.12.3-old/hw/xfree86/loader/loadmod.c xorg-server-1.12.3/hw/xfree86/loader/loadmod.c
+--- xorg-server-1.12.3-old/hw/xfree86/loader/loadmod.c 2012-09-05 18:26:42.000000000 +0200
++++ xorg-server-1.12.3/hw/xfree86/loader/loadmod.c 2012-09-05 18:28:54.000000000 +0200
+@@ -1109,39 +1109,38 @@
+ static void
+ RemoveChild(ModuleDescPtr child)
+ {
+ ModuleDescPtr mdp;
+ ModuleDescPtr prevsib;
+ ModuleDescPtr parent;
+
+ if (!child->parent)
+ return;
+
+ parent = child->parent;
+ if (parent->child == child) {
+ parent->child = child->sib;
+- return;
+- }
+-
+- prevsib = parent->child;
+- mdp = prevsib->sib;
+- while (mdp && mdp != child) {
+- prevsib = mdp;
+- mdp = mdp->sib;
++ }
++ else {
++ prevsib = parent->child;
++ mdp = prevsib->sib;
++ while (mdp && mdp != child) {
++ prevsib = mdp;
++ mdp = mdp->sib;
++ }
++ if (mdp == child)
++ prevsib->sib = child->sib;
+ }
+- if (mdp == child)
+- prevsib->sib = child->sib;
+ child->sib = NULL;
+- return;
+ }
+
+ void
+ LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin)
+ {
+ const char *msg;
+ MessageType type = X_ERROR;
+
+ switch (errmaj) {
+ case LDR_NOERROR:
+ msg = "no error";
+ break;
+ case LDR_NOMEM:
diff --git a/x11-base/xorg-server/files/xorg-server-1.14.3-musl.patch b/x11-base/xorg-server/files/xorg-server-1.14.3-musl.patch
new file mode 100644
index 0000000..dae9848
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.14.3-musl.patch
@@ -0,0 +1,31 @@
+diff -ur a/xorg-server-1.14.3/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server-1.14.3/hw/xfree86/os-support/xf86_OSlib.h
+--- a/xorg-server-1.14.3/hw/xfree86/os-support/xf86_OSlib.h
++++ b/xorg-server-1.14.3/hw/xfree86/os-support/xf86_OSlib.h
+@@ -179,7 +179,7 @@
+ #include <assert.h>
+
+ #ifdef __linux__
+-#include <termio.h>
++#include <termios.h>
+ #else /* __GLIBC__ */
+ #include <termios.h>
+ #endif
+diff -ur a/xorg-server-1.14.3/os/access.c b/xorg-server-1.14.3/os/access.c
+--- a/xorg-server-1.14.3/os/access.c
++++ b/xorg-server-1.14.3/os/access.c
+@@ -89,6 +89,7 @@
+ #define XSERV_t
+ #define TRANS_SERVER
+ #define TRANS_REOPEN
++#define _GNU_SOURCE
+ #include <X11/Xtrans/Xtrans.h>
+ #include <X11/Xauth.h>
+ #include <X11/X.h>
+@@ -98,6 +99,7 @@
+ #include <errno.h>
+ #include <sys/types.h>
+ #ifndef WIN32
++#define _GNU_SOURCE
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <ctype.h>
diff --git a/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-0.patch b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-0.patch
new file mode 100644
index 0000000..9540e31
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-0.patch
@@ -0,0 +1,102 @@
+From 81c90dc8f0aae3b65730409b1b615b5fa7280ebd Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Fri, 16 Jan 2015 20:08:59 +0100
+Subject: xkb: Don't swap XkbSetGeometry data in the input buffer
+
+The XkbSetGeometry request embeds data which needs to be swapped when the
+server and the client have different endianess.
+
+_XkbSetGeometry() invokes functions that swap these data directly in the
+input buffer.
+
+However, ProcXkbSetGeometry() may call _XkbSetGeometry() more than once
+(if there is more than one keyboard), thus causing on swapped clients the
+same data to be swapped twice in memory, further causing a server crash
+because the strings lengths on the second time are way off bounds.
+
+To allow _XkbSetGeometry() to run reliably more than once with swapped
+clients, do not swap the data in the buffer, use variables instead.
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index 15c7f34..b9a3ac4 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -4961,14 +4961,13 @@ static char *
+ _GetCountedString(char **wire_inout, Bool swap)
+ {
+ char *wire, *str;
+- CARD16 len, *plen;
++ CARD16 len;
+
+ wire = *wire_inout;
+- plen = (CARD16 *) wire;
++ len = *(CARD16 *) wire;
+ if (swap) {
+- swaps(plen);
++ swaps(&len);
+ }
+- len = *plen;
+ str = malloc(len + 1);
+ if (str) {
+ memcpy(str, &wire[2], len);
+@@ -4985,25 +4984,28 @@ _CheckSetDoodad(char **wire_inout,
+ {
+ char *wire;
+ xkbDoodadWireDesc *dWire;
++ xkbAnyDoodadWireDesc any;
++ xkbTextDoodadWireDesc text;
+ XkbDoodadPtr doodad;
+
+ dWire = (xkbDoodadWireDesc *) (*wire_inout);
++ any = dWire->any;
+ wire = (char *) &dWire[1];
+ if (client->swapped) {
+- swapl(&dWire->any.name);
+- swaps(&dWire->any.top);
+- swaps(&dWire->any.left);
+- swaps(&dWire->any.angle);
++ swapl(&any.name);
++ swaps(&any.top);
++ swaps(&any.left);
++ swaps(&any.angle);
+ }
+ CHK_ATOM_ONLY(dWire->any.name);
+- doodad = XkbAddGeomDoodad(geom, section, dWire->any.name);
++ doodad = XkbAddGeomDoodad(geom, section, any.name);
+ if (!doodad)
+ return BadAlloc;
+ doodad->any.type = dWire->any.type;
+ doodad->any.priority = dWire->any.priority;
+- doodad->any.top = dWire->any.top;
+- doodad->any.left = dWire->any.left;
+- doodad->any.angle = dWire->any.angle;
++ doodad->any.top = any.top;
++ doodad->any.left = any.left;
++ doodad->any.angle = any.angle;
+ switch (doodad->any.type) {
+ case XkbOutlineDoodad:
+ case XkbSolidDoodad:
+@@ -5026,12 +5028,13 @@ _CheckSetDoodad(char **wire_inout,
+ dWire->text.colorNdx);
+ return BadMatch;
+ }
++ text = dWire->text;
+ if (client->swapped) {
+- swaps(&dWire->text.width);
+- swaps(&dWire->text.height);
++ swaps(&text.width);
++ swaps(&text.height);
+ }
+- doodad->text.width = dWire->text.width;
+- doodad->text.height = dWire->text.height;
++ doodad->text.width = text.width;
++ doodad->text.height = text.height;
+ doodad->text.color_ndx = dWire->text.colorNdx;
+ doodad->text.text = _GetCountedString(&wire, client->swapped);
+ doodad->text.font = _GetCountedString(&wire, client->swapped);
+--
+cgit v0.10.2
+
diff --git a/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-1.patch b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-1.patch
new file mode 100644
index 0000000..be131c2
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.17-cve-2015-0255-1.patch
@@ -0,0 +1,138 @@
+From 20079c36cf7d377938ca5478447d8b9045cb7d43 Mon Sep 17 00:00:00 2001
+From: Olivier Fourdan <ofourdan@redhat.com>
+Date: Fri, 16 Jan 2015 08:44:45 +0100
+Subject: xkb: Check strings length against request size
+
+Ensure that the given strings length in an XkbSetGeometry request remain
+within the limits of the size of the request.
+
+Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+diff --git a/xkb/xkb.c b/xkb/xkb.c
+index b9a3ac4..f3988f9 100644
+--- a/xkb/xkb.c
++++ b/xkb/xkb.c
+@@ -4957,25 +4957,29 @@ ProcXkbGetGeometry(ClientPtr client)
+
+ /***====================================================================***/
+
+-static char *
+-_GetCountedString(char **wire_inout, Bool swap)
++static Status
++_GetCountedString(char **wire_inout, ClientPtr client, char **str)
+ {
+- char *wire, *str;
++ char *wire, *next;
+ CARD16 len;
+
+ wire = *wire_inout;
+ len = *(CARD16 *) wire;
+- if (swap) {
++ if (client->swapped) {
+ swaps(&len);
+ }
+- str = malloc(len + 1);
+- if (str) {
+- memcpy(str, &wire[2], len);
+- str[len] = '\0';
+- }
+- wire += XkbPaddedSize(len + 2);
+- *wire_inout = wire;
+- return str;
++ next = wire + XkbPaddedSize(len + 2);
++ /* Check we're still within the size of the request */
++ if (client->req_len <
++ bytes_to_int32(next - (char *) client->requestBuffer))
++ return BadValue;
++ *str = malloc(len + 1);
++ if (!*str)
++ return BadAlloc;
++ memcpy(*str, &wire[2], len);
++ *(*str + len) = '\0';
++ *wire_inout = next;
++ return Success;
+ }
+
+ static Status
+@@ -4987,6 +4991,7 @@ _CheckSetDoodad(char **wire_inout,
+ xkbAnyDoodadWireDesc any;
+ xkbTextDoodadWireDesc text;
+ XkbDoodadPtr doodad;
++ Status status;
+
+ dWire = (xkbDoodadWireDesc *) (*wire_inout);
+ any = dWire->any;
+@@ -5036,8 +5041,14 @@ _CheckSetDoodad(char **wire_inout,
+ doodad->text.width = text.width;
+ doodad->text.height = text.height;
+ doodad->text.color_ndx = dWire->text.colorNdx;
+- doodad->text.text = _GetCountedString(&wire, client->swapped);
+- doodad->text.font = _GetCountedString(&wire, client->swapped);
++ status = _GetCountedString(&wire, client, &doodad->text.text);
++ if (status != Success)
++ return status;
++ status = _GetCountedString(&wire, client, &doodad->text.font);
++ if (status != Success) {
++ free (doodad->text.text);
++ return status;
++ }
+ break;
+ case XkbIndicatorDoodad:
+ if (dWire->indicator.onColorNdx >= geom->num_colors) {
+@@ -5072,7 +5083,9 @@ _CheckSetDoodad(char **wire_inout,
+ }
+ doodad->logo.color_ndx = dWire->logo.colorNdx;
+ doodad->logo.shape_ndx = dWire->logo.shapeNdx;
+- doodad->logo.logo_name = _GetCountedString(&wire, client->swapped);
++ status = _GetCountedString(&wire, client, &doodad->logo.logo_name);
++ if (status != Success)
++ return status;
+ break;
+ default:
+ client->errorValue = _XkbErrCode2(0x4F, dWire->any.type);
+@@ -5304,18 +5317,20 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client)
+ char *wire;
+
+ wire = (char *) &req[1];
+- geom->label_font = _GetCountedString(&wire, client->swapped);
++ status = _GetCountedString(&wire, client, &geom->label_font);
++ if (status != Success)
++ return status;
+
+ for (i = 0; i < req->nProperties; i++) {
+ char *name, *val;
+
+- name = _GetCountedString(&wire, client->swapped);
+- if (!name)
+- return BadAlloc;
+- val = _GetCountedString(&wire, client->swapped);
+- if (!val) {
++ status = _GetCountedString(&wire, client, &name);
++ if (status != Success)
++ return status;
++ status = _GetCountedString(&wire, client, &val);
++ if (status != Success) {
+ free(name);
+- return BadAlloc;
++ return status;
+ }
+ if (XkbAddGeomProperty(geom, name, val) == NULL) {
+ free(name);
+@@ -5349,9 +5364,9 @@ _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client)
+ for (i = 0; i < req->nColors; i++) {
+ char *name;
+
+- name = _GetCountedString(&wire, client->swapped);
+- if (!name)
+- return BadAlloc;
++ status = _GetCountedString(&wire, client, &name);
++ if (status != Success)
++ return status;
+ if (!XkbAddGeomColor(geom, name, geom->num_colors)) {
+ free(name);
+ return BadAlloc;
+--
+cgit v0.10.2
+
diff --git a/x11-base/xorg-server/files/xorg-server-1.17-ia64-fix_inx_outx.patch b/x11-base/xorg-server/files/xorg-server-1.17-ia64-fix_inx_outx.patch
new file mode 100644
index 0000000..84485c9
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.17-ia64-fix_inx_outx.patch
@@ -0,0 +1,59 @@
+diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
+index 1653574..fe881ee 100644
+--- a/hw/xfree86/common/compiler.h
++++ b/hw/xfree86/common/compiler.h
+@@ -286,6 +286,54 @@ extern _X_EXPORT unsigned int inl(unsigned int port);
+ #include <machine/pio.h>
+ #endif /* __NetBSD__ */
+
++#elif defined(linux) && defined(__ia64__)
++/* for Linux on ia64, we use the LIBC _inx/_outx routines */
++/* note that the appropriate setup via "ioperm" needs to be done */
++/* *before* any inx/outx is done. */
++
++extern _X_EXPORT void _outb(unsigned char val, unsigned long port);
++extern _X_EXPORT void _outw(unsigned short val, unsigned long port);
++extern _X_EXPORT void _outl(unsigned int val, unsigned long port);
++extern _X_EXPORT unsigned int _inb(unsigned long port);
++extern _X_EXPORT unsigned int _inw(unsigned long port);
++extern _X_EXPORT unsigned int _inl(unsigned long port);
++
++static __inline__ void
++outb(unsigned long port, unsigned char val)
++{
++ _outb(val, port);
++}
++
++static __inline__ void
++outw(unsigned long port, unsigned short val)
++{
++ _outw(val, port);
++}
++
++static __inline__ void
++outl(unsigned long port, unsigned int val)
++{
++ _outl(val, port);
++}
++
++static __inline__ unsigned int
++inb(unsigned long port)
++{
++ return _inb(port);
++}
++
++static __inline__ unsigned int
++inw(unsigned long port)
++{
++ return _inw(port);
++}
++
++static __inline__ unsigned int
++inl(unsigned long port)
++{
++ return _inl(port);
++}
++
+ #elif defined(__amd64__)
+
+ #include <inttypes.h>
diff --git a/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch b/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch
new file mode 100644
index 0000000..789a118
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.17-support-multiple-Files-sections.patch
@@ -0,0 +1,65 @@
+From a140d7ce3f37f30b4fed27c5a70ebcc4ed13c612 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 24 Feb 2015 12:57:24 +0100
+Subject: [PATCH] config: Support multiple 'Files' sections
+
+---
+ hw/xfree86/parser/Files.c | 8 ++++++--
+ hw/xfree86/parser/configProcs.h | 2 +-
+ hw/xfree86/parser/read.c | 2 +-
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+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 774e2a2..b9fdebb 100644
+--- a/hw/xfree86/parser/configProcs.h
++++ b/hw/xfree86/parser/configProcs.h
+@@ -37,7 +37,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);
+--
+2.3.0
+
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.16.4-r100.ebuild b/x11-base/xorg-server/xorg-server-1.16.4-r100.ebuild
new file mode 100644
index 0000000..dcfc6a2
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-1.16.4-r100.ebuild
@@ -0,0 +1,258 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.16.4.ebuild,v 1.5 2015/02/20 11:17:22 ago Exp $
+
+EAPI=5
+
+XORG_DOC=doc
+inherit xorg-2 multilib versionator flag-o-matic
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/xserver"
+
+DESCRIPTION="X.Org X servers"
+SLOT="0/1.16.1"
+KEYWORDS="amd64 ~arm ~mips ppc x86"
+
+IUSE_SERVERS="dmx kdrive xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} glamor ipv6 minimal nptl selinux +suid systemd tslib +udev unwind wayland"
+
+CDEPEND=">=app-eselect/eselect-opengl-1.0.8
+ dev-libs/openssl
+ media-libs/freetype
+ >=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.20
+ >=x11-libs/libpciaccess-0.12.901
+ >=x11-libs/libXau-1.0.4
+ >=x11-libs/libXdmcp-1.0.2
+ >=x11-libs/libXfont-1.4.2
+ >=x11-libs/libxkbfile-1.0.4
+ >=x11-libs/libxshmfence-1.1
+ >=x11-libs/pixman-0.27.2
+ >=x11-libs/xtrans-1.3.3
+ >=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
+ media-libs/mesa[egl,gbm]
+ !x11-libs/glamor
+ )
+ kdrive? (
+ >=x11-libs/libXext-1.0.5
+ x11-libs/libXv
+ )
+ !minimal? (
+ >=x11-libs/libX11-1.1.5
+ >=x11-libs/libXext-1.0.5
+ >=media-libs/mesa-9.2.0[nptl=]
+ )
+ tslib? ( >=x11-libs/tslib-1.0 )
+ udev? ( >=virtual/udev-150 )
+ unwind? ( sys-libs/libunwind )
+ wayland? (
+ >=dev-libs/wayland-1.3.0
+ media-libs/libepoxy
+ )
+ >=x11-apps/xinit-1.3
+ 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
+ >=x11-proto/inputproto-2.2.99.1
+ >=x11-proto/kbproto-1.0.3
+ >=x11-proto/randrproto-1.4.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/xf86rushproto-1.1.2
+ >=x11-proto/xf86vidmodeproto-2.2.99.1
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-proto/xproto-7.0.26
+ >=x11-proto/presentproto-1.0
+ >=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
+ >=x11-proto/dri2proto-2.8
+ )"
+
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-xserver )
+"
+
+PDEPEND="
+ xorg? ( >=x11-base/xorg-drivers-$(get_version_component_range 1-2) )"
+
+REQUIRED_USE="!minimal? (
+ || ( ${IUSE_SERVERS} )
+ )"
+
+#UPSTREAMED_PATCHES=(
+# "${WORKDIR}/patches/"
+#)
+
+PATCHES=(
+ "${UPSTREAMED_PATCHES[@]}"
+ "${FILESDIR}"/${PN}-1.12-ia64-fix_inx_outx.patch
+ "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
+ "${FILESDIR}"/${PN}-1.14.3-musl.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."
+}
+
+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 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 install-libxf86config)
+ $(use_enable !minimal dri)
+ $(use_enable !minimal dri2)
+ $(use_enable !minimal glx)
+ $(use_enable xnest)
+ $(use_enable xorg)
+ $(use_enable xvfb)
+ $(use_enable nptl glx-tls)
+ $(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-server requires includes from OS mesa which are not visible for
+ # users of binary drivers.
+ mkdir -p "${T}/mesa-symlinks/GL"
+ for i in gl glx glxmd glxproto glxtokens; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/xorg-x11/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ for i in glext glxext; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/global/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ append-cppflags "-I${T}/mesa-symlinks"
+
+ xorg-2_src_configure
+}
+
+src_install() {
+ xorg-2_src_install
+
+ dynamic_libgl_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
+}
+
+dynamic_libgl_install() {
+ # next section is to setup the dynamic libGL stuff
+ ebegin "Moving GL files for dynamic switching"
+ dodir /usr/$(get_libdir)/opengl/xorg-x11/extensions
+ local x=""
+ for x in "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/lib{glx,dri,dri2}*; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f ${x} "${ED}"/usr/$(get_libdir)/opengl/xorg-x11/extensions
+ fi
+ done
+ eend 0
+}
+
+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-1.17.1-r99.ebuild b/x11-base/xorg-server/xorg-server-1.17.1-r99.ebuild
new file mode 100644
index 0000000..e925435
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-1.17.1-r99.ebuild
@@ -0,0 +1,271 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.17.1-r1.ebuild,v 1.3 2015/03/31 18:08:58 ulm Exp $
+
+EAPI=5
+
+XORG_DOC=doc
+inherit xorg-2 multilib versionator flag-o-matic
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/xserver"
+
+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 xephyr xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} glamor ipv6 minimal nptl selinux +suid systemd tslib +udev unwind wayland"
+
+CDEPEND=">=app-eselect/eselect-opengl-1.3.0
+ dev-libs/openssl
+ media-libs/freetype
+ >=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/libXfont-1.4.2
+ >=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
+ >=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
+ 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-9.2.0[nptl=]
+ )
+ tslib? ( >=x11-libs/tslib-1.0 )
+ udev? ( >=virtual/udev-150 )
+ unwind? ( sys-libs/libunwind )
+ wayland? (
+ >=dev-libs/wayland-1.3.0
+ media-libs/libepoxy
+ )
+ >=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.2.99.1
+ >=x11-proto/kbproto-1.0.3
+ >=x11-proto/randrproto-1.4.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/xf86rushproto-1.1.2
+ >=x11-proto/xf86vidmodeproto-2.2.99.1
+ >=x11-proto/xineramaproto-1.1.3
+ >=x11-proto/xproto-7.0.26
+ >=x11-proto/presentproto-1.0
+ >=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
+ >=x11-proto/dri2proto-2.8
+ )"
+
+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.17-ia64-fix_inx_outx.patch
+ "${FILESDIR}"/${PN}-1.12-unloadsubmodule.patch
+ # needed for new eselect-opengl, bug #541232
+ "${FILESDIR}"/${PN}-1.17-support-multiple-Files-sections.patch
+ "${FILESDIR}"/${PN}-1.14.3-musl.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."
+}
+
+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 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 install-libxf86config)
+ $(use_enable !minimal dri)
+ $(use_enable !minimal dri2)
+ $(use_enable !minimal glx)
+ $(use_enable xephyr)
+ $(use_enable xnest)
+ $(use_enable xorg)
+ $(use_enable xvfb)
+ $(use_enable nptl glx-tls)
+ $(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-server requires includes from OS mesa which are not visible for
+ # users of binary drivers.
+ mkdir -p "${T}/mesa-symlinks/GL"
+ for i in gl glx glxmd glxproto glxtokens; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/xorg-x11/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ for i in glext glxext; do
+ ln -s "${EROOT}usr/$(get_libdir)/opengl/global/include/$i.h" "${T}/mesa-symlinks/GL/$i.h" || die
+ done
+ append-cppflags "-I${T}/mesa-symlinks"
+
+ xorg-2_src_configure
+}
+
+src_install() {
+ xorg-2_src_install
+
+ dynamic_libgl_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
+}
+
+dynamic_libgl_install() {
+ # next section is to setup the dynamic libGL stuff
+ ebegin "Moving GL files for dynamic switching"
+ dodir /usr/$(get_libdir)/opengl/xorg-x11/extensions
+ local x=""
+ for x in "${ED}"/usr/$(get_libdir)/xorg/modules/extensions/lib{glx,dri,dri2}*; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f ${x} "${ED}"/usr/$(get_libdir)/opengl/xorg-x11/extensions
+ fi
+ done
+ eend 0
+}
+
+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
+}