summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11-base/xorg-server/Manifest5
-rw-r--r--x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch30
-rw-r--r--x11-base/xorg-server/files/xorg-server-disable-acpi.patch31
-rw-r--r--x11-base/xorg-server/files/xorg-sna.patch288
-rw-r--r--x11-base/xorg-server/xorg-server-1.10.99.901.ebuild236
5 files changed, 590 insertions, 0 deletions
diff --git a/x11-base/xorg-server/Manifest b/x11-base/xorg-server/Manifest
new file mode 100644
index 0000000..14f23ae
--- /dev/null
+++ b/x11-base/xorg-server/Manifest
@@ -0,0 +1,5 @@
+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-sna.patch 10133 RMD160 d462a7c930e20b193be3fc0f1fb6041ca998dbb6 SHA1 6950d35c4f2983bdc4e94921fa2ca3de3c4d00c1 SHA256 d00c11a3124b935855f25814be80f21963054bcef70104bfd93ab9f200e452e6
+DIST xorg-server-1.10.99.901.tar.bz2 4926641 RMD160 268a3993204012653c62e0f7fa20db9285a675f9 SHA1 106b6806b64ae368f1f8d52568ca272f88d0c567 SHA256 b7c9a0e3d1bb86adbbb52ef44a1ef41f41e00247cd7b36a8a0eafb2a8f3a3149
+EBUILD xorg-server-1.10.99.901.ebuild 6923 RMD160 61ceda526d37d8dd055a1141b833a67ce676d472 SHA1 c52c41260f8ec9a9b8ffa23cbd2c27c32f2b0a32 SHA256 d1b943131ad12c3c3f636a491a851d6e8519a24a1f87be82a80c34efc18e4bf4
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
index 0000000..2b05967
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.9-nouveau-default.patch
@@ -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;
+--
diff --git a/x11-base/xorg-server/files/xorg-server-disable-acpi.patch b/x11-base/xorg-server/files/xorg-server-disable-acpi.patch
new file mode 100644
index 0000000..cc80e6c
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-disable-acpi.patch
@@ -0,0 +1,31 @@
+From a8079882f1884edc62a9de28af915bd8b65dfbbe Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 11 Mar 2009 14:02:11 -0400
+Subject: [PATCH] Don't build the ACPI code.
+
+No good can come of this.
+---
+ configure.ac | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 72ae67e..04716f8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1269,13 +1269,11 @@ if test "x$XORG" = xyes; then
+ case $host_cpu in
+ ia64*)
+ linux_ia64=yes
+- linux_acpi="yes"
+ ;;
+ alpha*)
+ linux_alpha=yes
+ ;;
+ i*86|amd64*|x86_64*)
+- linux_acpi="yes"
+ ;;
+ *)
+ ;;
+--
+1.6.1.3
+
diff --git a/x11-base/xorg-server/files/xorg-sna.patch b/x11-base/xorg-server/files/xorg-sna.patch
new file mode 100644
index 0000000..a32e753
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-sna.patch
@@ -0,0 +1,288 @@
+diff --git a/hw/xfree86/xaa/xaaOffscreen.c b/hw/xfree86/xaa/xaaOffscreen.c
+index cd0d9a9..8fa5d6d 100644
+--- a/hw/xfree86/xaa/xaaOffscreen.c
++++ b/hw/xfree86/xaa/xaaOffscreen.c
+@@ -90,12 +90,11 @@ XAAMoveInOffscreenPixmaps(ScreenPtr pScreen)
+ (*pGC->ops->CopyArea)((DrawablePtr)tmpPix, (DrawablePtr)pPix, pGC,
+ 0, 0, pPix->drawable.width, pPix->drawable.height, 0, 0);
+
+- free(data);
+- tmpPix->devPrivate.ptr = NULL;
+-
+ FreeScratchGC(pGC);
+ FreeScratchPixmapHeader(tmpPix);
+
++ free(data);
++
+ pPriv->offscreenArea = area;
+ pLink->area = NULL;
+ pLink = pLink->next;
+diff --git a/dix/dispatch.c b/dix/dispatch.c
+index 192c8c3..3f73175 100644
+--- a/dix/dispatch.c
++++ b/dix/dispatch.c
+@@ -3855,7 +3855,6 @@ AddScreen(
+ return -1;
+ }
+ pScreen->myNum = i;
+- pScreen->totalPixmapSize = 0; /* computed in
+CreateScratchPixmapForScreen */
+ pScreen->ClipNotify = 0; /* for R4 ddx compatibility */
+ pScreen->CreateScreenResources = 0;
+
+diff --git a/dix/main.c b/dix/main.c
+index 955b7ea..7eadf36 100644
+--- a/dix/main.c
++++ b/dix/main.c
+@@ -206,12 +206,11 @@ int main(int argc, char *argv[], char *envp[])
+ if (screenInfo.numScreens < 1)
+ FatalError("no screens found");
+ InitExtensions(argc, argv);
++ InitPixmaps();
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ {
+ ScreenPtr pScreen = screenInfo.screens[i];
+- if (!CreateScratchPixmapsForScreen(i))
+- FatalError("failed to create scratch pixmaps");
+ if (pScreen->CreateScreenResources &&
+ !(*pScreen->CreateScreenResources)(pScreen))
+ FatalError("failed to create screen resources");
+@@ -321,7 +320,6 @@ int main(int argc, char *argv[], char *envp[])
+
+ for (i = screenInfo.numScreens - 1; i >= 0; i--)
+ {
+- FreeScratchPixmapsForScreen(i);
+ FreeGCperDepth(i);
+ FreeDefaultStipple(i);
+ (* screenInfo.screens[i]->CloseScreen)(i, screenInfo.screens[i]);
+diff --git a/dix/pixmap.c b/dix/pixmap.c
+index cbb5e7f..0b43592 100644
+--- a/dix/pixmap.c
++++ b/dix/pixmap.c
+@@ -53,20 +53,19 @@ PixmapPtr
+ GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth,
+ int bitsPerPixel, int devKind, pointer pPixData)
+ {
+- PixmapPtr pPixmap = pScreen->pScratchPixmap;
++ PixmapPtr pPixmap;
+
+- if (pPixmap)
+- pScreen->pScratchPixmap = NULL;
+- else
+- /* width and height of 0 means don't allocate any pixmap data */
+- pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0);
+-
+- if (pPixmap) {
+- if ((*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth,
+- bitsPerPixel, devKind, pPixData))
+- return pPixmap;
+- (*pScreen->DestroyPixmap)(pPixmap);
+- }
++ /* width and height of 0 means don't allocate any pixmap data */
++ pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth,
++ CREATE_PIXMAP_USAGE_SCRATCH_HEADER);
++ if (pPixmap == NullPixmap)
++ return NullPixmap;
++
++ if ((*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth,
++ bitsPerPixel, devKind, pPixData))
++ return pPixmap;
++
++ (*pScreen->DestroyPixmap)(pPixmap);
+ return NullPixmap;
+ }
+
+@@ -79,33 +78,22 @@ FreeScratchPixmapHeader(PixmapPtr pPixmap)
+ {
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+
+- pPixmap->devPrivate.ptr = NULL; /* lest ddx chases bad ptr */
+- if (pScreen->pScratchPixmap)
+- (*pScreen->DestroyPixmap)(pPixmap);
+- else
+- pScreen->pScratchPixmap = pPixmap;
++ if (pPixmap->refcnt != 1)
++ FatalError("Scratch pixmap still in use when finalized,
+refcnt=%d\n",
++ pPixmap->refcnt);
++
++ (*pScreen->DestroyPixmap)(pPixmap);
+ }
+ }
+
+
+-Bool
+-CreateScratchPixmapsForScreen(int scrnum)
++void
++InitPixmaps(void)
+ {
+ unsigned int pixmap_size;
+
+ pixmap_size = sizeof(PixmapRec) + dixPrivatesSize(PRIVATE_PIXMAP);
+- screenInfo.screens[scrnum]->totalPixmapSize = BitmapBytePad(pixmap_size *
+8);
+-
+- /* let it be created on first use */
+- screenInfo.screens[scrnum]->pScratchPixmap = NULL;
+- return TRUE;
+-}
+-
+-
+-void
+-FreeScratchPixmapsForScreen(int scrnum)
+-{
+- FreeScratchPixmapHeader(screenInfo.screens[scrnum]->pScratchPixmap);
++ screenInfo.totalPixmapSize = BitmapBytePad(pixmap_size * 8);
+ }
+
+
+@@ -115,12 +103,12 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
+ {
+ PixmapPtr pPixmap;
+
+- assert(pScreen->totalPixmapSize > 0);
++ assert(screenInfo.totalPixmapSize > 0);
+
+- if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize)
++ if (screenInfo.totalPixmapSize > ((size_t)-1) - pixDataSize)
+ return NullPixmap;
+
+- pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize);
++ pPixmap = malloc(screenInfo.totalPixmapSize + pixDataSize);
+ if (!pPixmap)
+ return NullPixmap;
+
+diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
+index a356c67..aebdff0 100644
+--- a/fb/fbpixmap.c
++++ b/fb/fbpixmap.c
+@@ -42,7 +42,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height,
+int depth, int bpp,
+ if (paddedWidth / 4 > 32767 || height > 32767)
+ return NullPixmap;
+ datasize = height * paddedWidth;
+- base = pScreen->totalPixmapSize;
++ base = screenInfo.totalPixmapSize;
+ adjust = 0;
+ if (base & 7)
+ adjust = 8 - (base & 7);
+diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
+index 2a5c805..cf7557e 100644
+--- a/hw/xfree86/common/xf86Module.h
++++ b/hw/xfree86/common/xf86Module.h
+@@ -82,7 +82,7 @@ typedef enum {
+ * mask is 0xFFFF0000.
+ */
+ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
+-#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(11, 0)
++#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(12, 0)
+ #define ABI_XINPUT_VERSION SET_ABI_VERSION(13, 0)
+ #define ABI_EXTENSION_VERSION SET_ABI_VERSION(5, 0)
+ #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6)
+diff --git a/include/pixmap.h b/include/pixmap.h
+index 014a111..daab76c 100644
+--- a/include/pixmap.h
++++ b/include/pixmap.h
+@@ -103,11 +103,8 @@ extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(
+ extern _X_EXPORT void FreeScratchPixmapHeader(
+ PixmapPtr /*pPixmap*/);
+
+-extern _X_EXPORT Bool CreateScratchPixmapsForScreen(
+- int /*scrnum*/);
+-
+-extern _X_EXPORT void FreeScratchPixmapsForScreen(
+- int /*scrnum*/);
++extern _X_EXPORT void InitPixmaps(
++ void);
+
+ extern _X_EXPORT PixmapPtr AllocatePixmap(
+ ScreenPtr /*pScreen*/,
+diff --git a/include/scrnintstr.h b/include/scrnintstr.h
+index a9357e8..617eadb 100644
+--- a/include/scrnintstr.h
++++ b/include/scrnintstr.h
+@@ -202,6 +202,8 @@ typedef void (* ClipNotifyProcPtr)(
+ #define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
+ /* pixmap will contain a glyph */
+ #define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
++/* pixmap will only be as a header for transient (e.g. on-stack) pixels */
++#define CREATE_PIXMAP_USAGE_SCRATCH_HEADER 4
+
+ typedef PixmapPtr (* CreatePixmapProcPtr)(
+ ScreenPtr /*pScreen*/,
+@@ -518,10 +520,6 @@ typedef struct _Screen {
+ GetScreenPixmapProcPtr GetScreenPixmap;
+ SetScreenPixmapProcPtr SetScreenPixmap;
+
+- PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
+-
+- unsigned int totalPixmapSize;
+-
+ MarkWindowProcPtr MarkWindow;
+ MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
+ ConfigNotifyProcPtr ConfigNotify;
+@@ -556,6 +554,8 @@ typedef struct _ScreenInfo {
+ int bitmapScanlineUnit;
+ int bitmapScanlinePad;
+ int bitmapBitOrder;
++ unsigned int totalPixmapSize;
++
+ int numPixmapFormats;
+ PixmapFormatRec
+ formats[MAXFORMATS];
+diff --git a/Xext/shm.c b/Xext/shm.c
+index b08af82..c6a3aee 100644
+--- a/Xext/shm.c
++++ b/Xext/shm.c
+@@ -1018,18 +1018,10 @@ static PixmapPtr
+ fbShmCreatePixmap (ScreenPtr pScreen,
+ int width, int height, int depth, char *addr)
+ {
+- PixmapPtr pPixmap;
+-
+- pPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, pScreen->rootDepth, 0);
+- if (!pPixmap)
+- return NullPixmap;
+-
+- if (!(*pScreen->ModifyPixmapHeader)(pPixmap, width, height, depth,
+- BitsPerPixel(depth), PixmapBytePad(width, depth), (pointer)addr)) {
+- (*pScreen->DestroyPixmap)(pPixmap);
+- return NullPixmap;
+- }
+- return pPixmap;
++ return GetScratchPixmapHeader(pScreen, width, height, depth,
++ BitsPerPixel(depth),
++ PixmapBytePad(width, depth),
++ addr);
+ }
+
+ static int
+diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
+index 5cc476a..46d481b 100644
+--- a/hw/xfree86/shadowfb/shadow.c
++++ b/hw/xfree86/shadowfb/shadow.c
+@@ -63,7 +63,6 @@ typedef struct {
+ CloseScreenProcPtr CloseScreen;
+ CopyWindowProcPtr CopyWindow;
+ CreateGCProcPtr CreateGC;
+- ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
+ CompositeProcPtr Composite;
+ Bool (*EnterVT)(int, int);
+ void (*LeaveVT)(int, int);
+@@ -172,7 +171,6 @@ ShadowFBInit2 (
+ pPriv->CloseScreen = pScreen->CloseScreen;
+ pPriv->CopyWindow = pScreen->CopyWindow;
+ pPriv->CreateGC = pScreen->CreateGC;
+- pPriv->ModifyPixmapHeader = pScreen->ModifyPixmapHeader;
+
+ pPriv->EnterVT = pScrn->EnterVT;
+ pPriv->LeaveVT = pScrn->LeaveVT;
+@@ -248,7 +246,6 @@ ShadowCloseScreen (int i, ScreenPtr pScreen)
+ pScreen->CloseScreen = pPriv->CloseScreen;
+ pScreen->CopyWindow = pPriv->CopyWindow;
+ pScreen->CreateGC = pPriv->CreateGC;
+- pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader;
+
+ pScrn->EnterVT = pPriv->EnterVT;
+ pScrn->LeaveVT = pPriv->LeaveVT;
diff --git a/x11-base/xorg-server/xorg-server-1.10.99.901.ebuild b/x11-base/xorg-server/xorg-server-1.10.99.901.ebuild
new file mode 100644
index 0000000..d39a01e
--- /dev/null
+++ b/x11-base/xorg-server/xorg-server-1.10.99.901.ebuild
@@ -0,0 +1,236 @@
+# Copyright 1999-2011 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.10.99.901.ebuild,v 1.2 2011/06/09 21:40:37 mattst88 Exp $
+
+EAPI=4
+
+XORG_DOC=doc
+inherit xorg-2 multilib versionator
+EGIT_REPO_URI="git://anongit.freedesktop.org/git/xorg/xserver"
+
+DESCRIPTION="X.Org X servers"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
+
+IUSE_SERVERS="dmx kdrive xnest xorg xvfb"
+IUSE="${IUSE_SERVERS} ipv6 minimal nptl tslib +udev"
+
+RDEPEND=">=app-admin/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/libpciaccess-0.10.3
+ >=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/pixman-0.21.8
+ >=x11-libs/xtrans-1.2.2
+ >=x11-misc/xbitmaps-1.0.1
+ >=x11-misc/xkeyboard-config-1.4
+ 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-4.0.3
+ >=x11-libs/libXi-1.2.99.1
+ >=x11-libs/libXmu-1.0.3
+ >=x11-libs/libXres-1.0.3
+ >=x11-libs/libXtst-1.0.99.2
+ )
+ 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-7.8_rc[nptl=]
+ )
+ tslib? ( >=x11-libs/tslib-1.0 x11-proto/xcalibrateproto )
+ udev? ( >=sys-fs/udev-150 )
+ >=x11-apps/xinit-1.3"
+
+DEPEND="${RDEPEND}
+ sys-devel/flex
+ >=x11-proto/bigreqsproto-1.1.0
+ >=x11-proto/compositeproto-0.4
+ >=x11-proto/damageproto-1.1
+ >=x11-proto/fixesproto-4.1
+ >=x11-proto/fontsproto-2.0.2
+ >=x11-proto/glproto-1.4.11
+ >=x11-proto/inputproto-1.9.99.902
+ >=x11-proto/kbproto-1.0.3
+ >=x11-proto/randrproto-1.2.99.3
+ >=x11-proto/recordproto-1.13.99.1
+ >=x11-proto/renderproto-0.11
+ >=x11-proto/resourceproto-1.0.2
+ >=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.1.99
+ >=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.17
+ dmx? ( >=x11-proto/dmxproto-2.2.99.1 )
+ !minimal? (
+ >=x11-proto/xf86driproto-2.1.0
+ >=x11-proto/dri2proto-2.3
+ >=x11-libs/libdrm-2.4.20
+ )"
+
+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}-disable-acpi.patch
+ "${FILESDIR}"/${PN}-1.9-nouveau-default.patch
+ "${FILESDIR}"/xorg-sna.patch
+)
+
+pkg_pretend() {
+ # older gcc is not supported
+ [[ $(gcc-major-version) -lt 4 ]] && \
+ die "Sorry, but gcc earlier than 4.0 wont work for xorg-server."
+}
+
+pkg_setup() {
+ xorg-2_pkg_setup
+
+ # 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
+ # --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
+ XORG_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 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)
+ --sysconfdir=/etc/X11
+ --localstatedir=/var
+ --enable-install-setuid
+ --with-fontrootdir=/usr/share/fonts
+ --with-xkb-output=/var/lib/xkb
+ --disable-config-hal
+ --without-dtrace
+ --without-fop
+ --with-os-vendor=Gentoo
+ )
+
+ # 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"
+}
+
+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-3 xdm
+ newconfd "${FILESDIR}"/xdm.confd-3 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
+
+ if [[ ${PV} != 9999 && $(get_version_component_range 2 ${REPLACING_VERSIONS}) != $(get_version_component_range 2 ${PV}) ]]; then
+ elog "You should consider reading upgrade guide for this release:"
+ elog " http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-$(get_version_component_range 1-2)-upgrade-guide.xml"
+ echo
+ ewarn "You must rebuild all drivers if upgrading from <xorg-server-$(get_version_component_range 1-2)"
+ ewarn "because the ABI changed. If you cannot start X because"
+ ewarn "of module version mismatch errors, this is your problem."
+
+ echo
+ ewarn "You can generate a list of all installed packages in the x11-drivers"
+ ewarn "category using this command:"
+ ewarn " emerge portage-utils; qlist -I -C x11-drivers/"
+ ewarn "or using sets from portage-2.2:"
+ ewarn " emerge @x11-module-rebuild"
+ fi
+}
+
+pkg_postrm() {
+ # Get rid of module dir to ensure opengl-update works properly
+ if [[ -z ${REPLACED_BY_VERSION} && -e ${ROOT}/usr/$(get_libdir)/xorg/modules ]]; then
+ rm -rf "${ROOT}"/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 "${D}"/usr/$(get_libdir)/xorg/modules/extensions/lib{glx,dri,dri2}*; do
+ if [ -f ${x} -o -L ${x} ]; then
+ mv -f ${x} "${D}"/usr/$(get_libdir)/opengl/xorg-x11/extensions
+ fi
+ done
+ eend 0
+}
+
+server_based_install() {
+ if ! use xorg; then
+ rm "${D}"/usr/share/man/man1/Xserver.1x \
+ "${D}"/usr/$(get_libdir)/xserver/SecurityPolicy \
+ "${D}"/usr/$(get_libdir)/pkgconfig/xorg-server.pc \
+ "${D}"/usr/share/man/man1/Xserver.1x
+ fi
+}