]> git.draconx.ca Git - gentoo-draconx.git/commitdiff
xorg-server: Sync with X11 overlay.
authorNick Bowler <nbowler@draconx.ca>
Fri, 1 Oct 2010 00:10:03 +0000 (20:10 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 1 Oct 2010 00:10:03 +0000 (20:10 -0400)
x11-base/xorg-server/Manifest
x11-base/xorg-server/files/xdm-setup.initd-1
x11-base/xorg-server/files/xdm.initd-3 [new file with mode: 0755]
x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch [new file with mode: 0644]
x11-base/xorg-server/xorg-server-9999.ebuild

index 10535dc21099334c41b10086999805bf68762886..30d84d4d543b74720d3a4b64614d301fc74ab2b3 100644 (file)
@@ -2,9 +2,11 @@ AUX 0001-xfree86-Add-DontLie-server-flag.patch 4746 RMD160 87de996ac0eaab5d0bdc7
 AUX 1.7.5.902-fix-tslib-1.0-check.patch 743 RMD160 139969e7c89ccbb6c86a93b7ea74aad2e942cd55 SHA1 621f3dea75aeb84a30279e5854b0ae256f653113 SHA256 03fced212933eb4502554c4fd629ead92027dc13f178ad5c43cd59b7ce615cea
 AUX 1.8.0-match-only-sane-devices.patch 1980 RMD160 4fee29076bb30e8fb1b820ef58a1c26f3bd63c73 SHA1 98d4ea8e493a31f141e39f4a468458469ebff58f SHA256 95f6ab36fa1b6b80786ff90fb2ee1f7fe02d964a1d10c90277060b4982d8eace
 AUX 1.8.0-no-hardcoded-etc.patch 833 RMD160 9e3736556f8c74c1c78561590cf03e9316d28a75 SHA1 0063e0c520f128507e71134571de6dd95a00079c SHA256 2168832548dbb8d6619df7b2a54b22f118de588522b4014dabaa98829331a6b9
-AUX xdm-setup.initd-1 346 RMD160 e68512e71adbf15743f789bb6b5587b07a9812a3 SHA1 f25303b8bcef0c5d2eb61517d5347b4b88736cd4 SHA256 942ce5e8d1a0770543b683dcc388bae7619a24eb9741c1cd678ed3df97c01406
+AUX xdm-setup.initd-1 339 RMD160 dd3f50da114627d2be776b41a0d7d967ebbff477 SHA1 d86813f810aab72b81a72c298c2d230554d8e82e SHA256 018bc6acc70c708d8e3935617b8da2b84a3f5502a4db4c4731c2eaea7d3f04c0
 AUX xdm.confd-3 853 RMD160 363cd18f760650923e16579bf55f661e93dad63b SHA1 0027b98f2aeb5c43219fa4f9b7d81a05101bec6f SHA256 00af0d957ff1b4f31c1aa4701d93a54080408548792deafac5414cbfa13b89ec
 AUX xdm.initd 5392 RMD160 eec0b0ccefeee366e891afc73d195240b447421f SHA1 d3ce725e86fa3889f77403354b7f69d8184181ae SHA256 0c087c42d46563fd9d63da655753128aab2a0815efb83f906db3f54ba5c886ce
+AUX xdm.initd-3 5394 RMD160 7810d9873cd27ab8130bf3bd5dd39a219b18a014 SHA1 52b20375c9e21671081d0dcdf99024fc63b8b2b8 SHA256 f0999a2c7486675e3eb549653e136afaf457400fc7ba17d77f0266a2291ebf42
+AUX xorg-server-1.9-nouveau-default.patch 916 RMD160 0ebdf0fb76364b7fd0c520c3a2f7cc2cc1a83446 SHA1 daddde0f4f4276e12b87354d2e6825ed5c74c6eb SHA256 a7ff421dd928e3025194279f9afb7cc033a896b3417abe339741e9c6ed4b54ea
 AUX xorg-server-disable-acpi.patch 663 RMD160 7074ca5276369b746ea7606a0795232aafe07c90 SHA1 d300a37dd2e0a8aa3965948c13f6995e6767841d SHA256 5b3cc7c8bea18fe3ba81851d2846d19ffd8fab9cdf5d8f3a274846847e734200
 AUX xorg-sets.conf 199 RMD160 33815115b6e8b8360af4f0778b0e2c5fb1a9aaee SHA1 b5a2fd01a97558fa909c67f510d8a59b55e20f57 SHA256 1201d0337ac69d9715f4454a86dfb8a7bd1ae6f4c2578042fc08f283a997597c
 DIST xorg-server-1.7.7.tar.bz2 4939257 RMD160 19ab82795abe122cd267e4718152bf87af465829 SHA1 0f1b71363843b7e394d6de62d0db5b74d3e645ef SHA256 54c4d32bfeb8852adbea3ddae6981f3bc2eadb330124d9b35226c617c01926ff
@@ -13,5 +15,4 @@ DIST xorg-server-1.8.1.tar.bz2 5200978 RMD160 27bd6d1e565e241412f1fb8e18b5b9b194
 EBUILD xorg-server-1.7.7.ebuild 7220 RMD160 ed925fe7fccf08ae58ce59314a0c472535f13ec0 SHA1 5d72d32a1b8c9c4f40f88627b42d749ed4223e7b SHA256 f70710b49e1ca43c8cc765fe20ab9819bc5b2793eff0064cee607e4703d73ccc
 EBUILD xorg-server-1.8.0.ebuild 8221 RMD160 6aa53ec1042a8c12b9aa06c1aee767a50e1c2445 SHA1 d1e770f5108c161fb5d20207c612c568c32cfdc8 SHA256 5e21d8ab052b17774c40b67fb20981847a289ddbad39b8753501d21b50a6d450
 EBUILD xorg-server-1.8.1-r1.ebuild 7998 RMD160 c1035725f811ee2b5723a8bdac73cb3eeb3f6dd0 SHA1 08cf52506fb9eb2261b9c3d64dd8807fd95daeb5 SHA256 43b5bc070b8f479c08532f4a5c62b332cf8f579ee5f49614ffb256a1bb746a1a
-EBUILD xorg-server-9999.ebuild 7554 RMD160 a37ba4ef0666f00a0bb770c055ff04004a4c31db SHA1 dda2ffaa44659a26179f5b43bdfa647302cdfe79 SHA256 05d4b39cb42bbf2f2f80b9fd87ef760c8d4306b9f21fdcf9c7cec2360070afec
-MISC xorg-server-9999.ebuild~ 7631 RMD160 02b5800a75e19c4e152ee6ed70f36cd9102041ef SHA1 3ee06fa83148406defd01b3c55cf7a1e5b52ee18 SHA256 5892aa2a850269e738a900c0ca2147f19a892cd3967577205c68d1b1af03d4b0
+EBUILD xorg-server-9999.ebuild 7709 RMD160 07d17dd9f7666826cd5914e46135085f140c89cd SHA1 acbc023b5acadcc57c4dc06c537ffcb71ce06ab5 SHA256 016bd9f10f4368379c833593beb48e2de036b744cee54b430dd5f26c095d480b
index 365664e6655608b8422c65a77af74091aa9eca36..6ed3922ca74b65fe52fc20a40e884b4d70e9a3bf 100644 (file)
@@ -1,7 +1,7 @@
 #!/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 $
+# $Header: /var/cvsroot/gentoo-x86/x11-apps/xinit/files/xdm-setup.initd-1,v 1.5 2009/09/24 17:07:56 williamh Exp $
 
 depend() {
        need localmount
diff --git a/x11-base/xorg-server/files/xdm.initd-3 b/x11-base/xorg-server/files/xdm.initd-3
new file mode 100755 (executable)
index 0000000..3471977
--- /dev/null
@@ -0,0 +1,207 @@
+#!/sbin/runscript
+# Copyright 1999-2004 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,v 1.1 2010/04/13 10:07:39 scarabeus 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
+       after bootmisc consolefont modules netmount
+       after readahead-list ypbind autofs openvpn gpm lircmd
+       after quota
+       before alsasound
+
+       # Start before X
+       use consolekit 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="$(which kdm)"
+                       PIDFILE=/var/run/kdm.pid
+                       ;;
+               kdm-*)
+                       EXE="/usr/kde/${MY_XDM#kdm-}/bin/kdm"
+                       PIDFILE=/var/run/kdm.pid
+                       ;;
+               entrance*)
+                       EXE=/usr/sbin/entranced
+                       PIDFILE=/var/lib/entranced.pid
+                       ;;
+               gdm|gnome)
+                       EXE=/usr/bin/gdm
+                       [ "${RC_UNAME}" != "Linux" ] && NAME=gdm-binary
+                       PIDFILE=/var/run/gdm.pid
+                       ;;
+               wdm)
+                       EXE=/usr/bin/wdm
+                       PIDFILE=
+                       ;;
+               gpe)
+                       EXE=/usr/bin/gpe-dm
+                       PIDFILE=/var/run/gpe-dm.pid
+                       ;;
+               *)
+                       # first find out if there is such executable
+                       EXE="$(which ${MY_XDM} 2>/dev/null)"
+                       PIDFILE="/var/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=/var/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
+       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}"
+
+       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##*/}
+
+       [ -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.9-nouveau-default.patch b/x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch
new file mode 100644 (file)
index 0000000..2b05967
--- /dev/null
@@ -0,0 +1,30 @@
+diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
+index 74016af..9c296f5 100644
+--- a/hw/xfree86/common/xf86pciBus.c
++++ b/hw/xfree86/common/xf86pciBus.c
+@@ -1118,7 +1118,23 @@ videoPtrToDriverList(struct pci_device *dev,
+           break;
+       case 0x102b:                driverList[0] = "mga";      break;
+       case 0x10c8:                driverList[0] = "neomagic"; break;
+-      case 0x10de: case 0x12d2:   driverList[0] = "nv";       break;
++      case 0x10de: case 0x12d2:
++          switch (dev->device_id) {
++          /* NV1 */
++          case 0x0008:
++          case 0x0009:
++              driverList[0] = "vesa";
++              break;
++          /* NV3 */
++          case 0x0018:
++          case 0x0019:
++              driverList[0] = "nv";
++              break;
++          default:
++              driverList[0] = "nouveau";
++              break;
++          }
++          break;
+       case 0x1106:                driverList[0] = "openchrome"; break;
+         case 0x1b36:              driverList[0] = "qxl"; break;
+       case 0x1163:                driverList[0] = "rendition"; break;
+-- 
index 47e3b80e0b0e6c7aafadc2ea6c6273c57d6501b1..b059c99d778d1d050d349d885841f75ee66cc1c1 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: $
+# $Header: /var/cvsroot/gentoo-x86/x11-base/xorg-server/xorg-server-1.9.0.ebuild,v 1.1 2010/09/12 18:41:36 chithanh Exp $
 
 EAPI=3
 inherit xorg-2 multilib versionator
@@ -13,7 +13,7 @@ DESCRIPTION="X.Org X servers"
 KEYWORDS=""
 
 IUSE_SERVERS="dmx kdrive xorg"
-IUSE="${IUSE_SERVERS} doc tslib ipv6 minimal nptl +udev"
+IUSE="${IUSE_SERVERS} doc ipv6 minimal nptl tslib +udev"
 RDEPEND=">=app-admin/eselect-opengl-1.0.8
        dev-libs/openssl
        media-libs/freetype
@@ -24,7 +24,7 @@ RDEPEND=">=app-admin/eselect-opengl-1.0.8
        >=x11-libs/libpciaccess-0.10.3
        >=x11-libs/libXau-1.0.4
        >=x11-libs/libXdmcp-1.0.2
-       >=x11-libs/libXfont-1.3.3
+       >=x11-libs/libXfont-1.4.2
        >=x11-libs/libxkbfile-1.0.4
        >=x11-libs/pixman-0.15.20
        >=x11-libs/xtrans-1.2.2
@@ -44,6 +44,7 @@ RDEPEND=">=app-admin/eselect-opengl-1.0.8
        )
        kdrive? (
                >=x11-libs/libXext-1.0.5
+               x11-libs/libXv
        )
        !minimal? (
                >=x11-libs/libX11-1.1.5
@@ -51,7 +52,7 @@ RDEPEND=">=app-admin/eselect-opengl-1.0.8
                >=media-libs/mesa-7.8_rc[nptl=]
        )
        tslib? ( >=x11-libs/tslib-1.0 x11-proto/xcalibrateproto )
-       udev? ( sys-fs/udev )"
+       udev? ( >=sys-fs/udev-150 )"
 
 DEPEND="${RDEPEND}
        sys-devel/flex
@@ -84,8 +85,8 @@ DEPEND="${RDEPEND}
        )
        !minimal? (
                >=x11-proto/xf86driproto-2.1.0
-               >=x11-proto/dri2proto-2.1
-               >=x11-libs/libdrm-2.3.0
+               >=x11-proto/dri2proto-2.3
+               >=x11-libs/libdrm-2.4.20
        )"
 
 PDEPEND="
@@ -103,6 +104,8 @@ EPATCH_SUFFIX="patch"
 PATCHES=(
        "${UPSTREAMED_PATCHES[@]}"
        "${FILESDIR}"/${PN}-disable-acpi.patch
+       "${FILESDIR}"/${PN}-1.9-nouveau-default.patch
+       "${FILESDIR}"/1.7.5.902-fix-tslib-1.0-check.patch
        )
 
 pkg_setup() {
@@ -111,15 +114,18 @@ pkg_setup() {
        use minimal || ensure_a_server_is_building
 
        # localstatedir is used for the log location; we need to override the default
-       #       from ebuild.sh
+       #       from ebuild.sh
        # sysconfdir is used for the xorg.conf location; same applies
-       #       --enable-install-setuid needed because sparcs default off
+       #       --enable-install-setuid needed because sparcs default off
        # NOTE: fop is used for doc generating ; and i have no idea if gentoo
-       #        package it somewhere
+       #       package it somewhere
        CONFIGURE_OPTIONS="
                $(use_enable ipv6)
                $(use_enable dmx)
                $(use_enable kdrive)
+               $(use_enable kdrive kdrive-kbd)
+               $(use_enable kdrive kdrive-mouse)
+               $(use_enable kdrive kdrive-evdev)
                $(use_enable tslib)
                $(use_enable tslib xcalibrate)
                $(use_enable !minimal xvfb)
@@ -146,6 +152,18 @@ pkg_setup() {
                --with-os-vendor=Gentoo
                ${conf_opts}"
 
+       # Xorg-server requires includes from OS mesa which are not visible for
+       # users of binary drivers.
+       # Due to the limitations of CONFIGURE_OPTIONS, we have to export this
+       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"
+
        # (#121394) Causes window corruption
        filter-flags -fweb
 
@@ -169,24 +187,6 @@ pkg_setup() {
        fi
 }
 
-src_configure() {
-       # this is required only for configure and build time
-       # we need to ensure having enough glxtokens
-       # the subshell is needed so the addwrite is not shared in rest of that phase
-       OLD_IMPLEM="$(eselect opengl show)"
-       [[ ${OLD_IMPLEM} != ${OPENGL_DIR} ]] && ( addwrite "${ROOT}"; eselect opengl set ${OPENGL_DIR}; )
-       xorg-2_src_configure
-}
-
-src_compile() {
-       emake # no die here intentional
-       if [[ $? != 0 ]]; then
-               [[ ${OLD_IMPLEM} != ${OPENGL_DIR} ]] && ( addwrite "${ROOT}"; eselect opengl set ${OLD_IMPLEM}; )
-               die "Compilation failed"
-       fi
-       [[ ${OLD_IMPLEM} != ${OPENGL_DIR} ]] && ( addwrite "${ROOT}"; eselect opengl set ${OLD_IMPLEM}; )
-}
-
 src_install() {
        xorg-2_src_install
 
@@ -200,14 +200,8 @@ src_install() {
                        || die "couldn't install xorg.conf.example"
        fi
 
-       # install the xdm.init
-       cp "${FILESDIR}"/xdm.initd "${T}"
-       sed -i \
-               -e "/@HALD_DEPEND@/ d" \
-               "${T}"/xdm.initd \
-               || die "sed failed"
-       newinitd "${T}"/xdm.initd xdm || die "initd file install failed"
        newinitd "${FILESDIR}"/xdm-setup.initd-1 xdm-setup || die
+       newinitd "${FILESDIR}"/xdm.initd-3 xdm || die
        newconfd "${FILESDIR}"/xdm.confd-3 xdm || die
 
        # install the @x11-module-rebuild set for Portage
@@ -216,6 +210,9 @@ src_install() {
 }
 
 pkg_postinst() {
+       # sets up libGL and DRI2 symlinks if needed (ie, on a fresh install)
+       eselect opengl set --use-old xorg-x11
+
        if [[ ${INFO} = yes ]]; then
                einfo "You should consider reading upgrade guide for this release:"
                einfo " http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-$(get_version_component_range 1-2)-upgrade-guide.xml"