From c8bbc1ae138e2751cbb1c3390f6d35e639eee6c2 Mon Sep 17 00:00:00 2001
From: Thomas White <taw@bitwiz.org.uk>
Date: Mon, 24 Aug 2009 23:31:35 +0100
Subject: [PATCH] Glamo-DRI bleeding edge

---
 conf/checksums.ini                               |   69 +++++++++++++++++++++-
 conf/machine/om-gta02.conf                       |    5 +-
 recipes/dri/libdrm_git.bb                        |   15 +++++
 recipes/glamo-dri-tests/glamo-dri-tests_git.bb   |   19 ++++++
 recipes/intltool/intltool_0.40.3.bb              |    9 ++-
 recipes/mesa/mesa-dri_git.bb                     |   18 ++++--
 recipes/xorg-driver/xf86-input-evdev_2.2.99.1.bb |    4 +
 recipes/xorg-driver/xf86-video-glamo.bb          |   10 +++
 recipes/xorg-lib/libx11_1.2.99.901.bb            |   26 ++++++++
 recipes/xorg-lib/libxext_1.0.99.4.bb             |    9 +++
 recipes/xorg-lib/libxi_1.2.99.3.bb               |    8 +++
 recipes/xorg-lib/libxtst_1.0.99.1.bb             |    9 +++
 recipes/xorg-lib/pixman_0.15.20.bb               |   17 +++++
 recipes/xorg-lib/xtrans_1.2.3.bb                 |   14 +++++
 recipes/xorg-proto/dri2proto_2.1.bb              |    3 +
 recipes/xorg-proto/fixesproto_4.1.bb             |    7 ++
 recipes/xorg-proto/inputproto_1.9.99.15.bb       |    6 ++
 recipes/xorg-proto/randrproto_1.3.0.bb           |    7 ++
 recipes/xorg-proto/renderproto_0.11.bb           |    4 +
 recipes/xorg-proto/xextproto_7.0.99.3.bb         |    3 +
 recipes/xorg-util/util-macros_1.2.1.bb           |    6 ++
 recipes/xorg-xserver/xorg-xserver-common.inc     |    4 +-
 recipes/xorg-xserver/xserver-xorg/dolt-fix.patch |   21 +++++++
 recipes/xorg-xserver/xserver-xorg_git.bb         |   20 ++++++
 24 files changed, 300 insertions(+), 13 deletions(-)
 create mode 100644 recipes/dri/libdrm_git.bb
 create mode 100644 recipes/glamo-dri-tests/glamo-dri-tests_git.bb
 create mode 100644 recipes/xorg-driver/xf86-input-evdev_2.2.99.1.bb
 create mode 100644 recipes/xorg-driver/xf86-video-glamo.bb
 create mode 100644 recipes/xorg-lib/libx11_1.2.99.901.bb
 create mode 100644 recipes/xorg-lib/libxext_1.0.99.4.bb
 create mode 100644 recipes/xorg-lib/libxi_1.2.99.3.bb
 create mode 100644 recipes/xorg-lib/libxtst_1.0.99.1.bb
 create mode 100644 recipes/xorg-lib/pixman_0.15.20.bb
 create mode 100644 recipes/xorg-lib/xtrans_1.2.3.bb
 create mode 100644 recipes/xorg-proto/dri2proto_2.1.bb
 create mode 100644 recipes/xorg-proto/fixesproto_4.1.bb
 create mode 100644 recipes/xorg-proto/inputproto_1.9.99.15.bb
 create mode 100644 recipes/xorg-proto/randrproto_1.3.0.bb
 create mode 100644 recipes/xorg-proto/renderproto_0.11.bb
 create mode 100644 recipes/xorg-proto/xextproto_7.0.99.3.bb
 create mode 100644 recipes/xorg-util/util-macros_1.2.1.bb
 create mode 100644 recipes/xorg-xserver/xserver-xorg/dolt-fix.patch
 create mode 100644 recipes/xorg-xserver/xserver-xorg_git.bb

diff --git a/conf/checksums.ini b/conf/checksums.ini
index 83ce10c..c6bd13e 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -4382,6 +4382,14 @@ sha256=7d27f2389e05b8727c6a7126c0b65d67749c170ba143e648912a88f2fe707bca
 md5=1d70f0653b0b3a837853262dc5d34da4
 sha256=69def6d1f64b3699ec9c729596d8b096623a62bdda6bbea78ed690421d174c11
 
+[http://xorg.freedesktop.org/releases/individual/proto/dri2proto-1.99.3.tar.bz2]
+md5=fffbbb3c26368ac63d408e81c51ec374
+sha256=ee48d527fc1547c6f9959fda47720ca924b97862d79e25d0cc463b32d1cb7914
+
+[http://xorg.freedesktop.org/releases/individual/proto/dri2proto-2.1.tar.bz2]
+md5=5cb7987d29db068153bdc8f23c767c43
+sha256=2b33f7c7658fb8f004c3aaf2717711262baeb5d77cf3fd24e9b6cc263895122d
+
 [http://www.ex-parrot.com/~chris/driftnet/driftnet-0.1.6.tar.gz]
 md5=8e11d77770452f97bb3c23f510489815
 sha256=dbdf7ead3ae14b109f88c86dedeb7524be8c257aa773a781891216f013373d6d
@@ -5382,6 +5390,10 @@ sha256=9d13db38c065d70f48ce70580c7d8cd940d923192c04bc3cb356cc98879b5788
 md5=6cc725db32346058a4adeef283335ae1
 sha256=c7ce53b1678268ec2f08d0a32580c2783b6e297941de36d8b880c0533ed51c26
 
+[http://xorg.freedesktop.org/releases/individual/proto/fixesproto-4.1.tar.bz2]
+md5=157644edb3cd526f2cb164eb79c52bad
+sha256=9635e292887e67caf59a16ee991ac348c978b279faa5acc323d30c3dcede398d
+
 [http://xorg.freedesktop.org/releases/individual/proto/fixesproto-4.0.tar.bz2]
 md5=8b298cc3424597f8138c7faf7763dce9
 sha256=b3fe971ccc8152db6c78da7117c31fc4cd2fcb2b6a4df3db0f8fed13d4ceb08f
@@ -9830,6 +9842,10 @@ sha256=5360e221354bbdfd67bf9834c2c1d7a0d83f22c17e057f92194411911fbb81f5
 md5=dcc36554aea1338b3813943daf1e9988
 sha256=ef90f7e4c151095cc75a573acd86355aa65c5bc7fd1dcce4a1483b64788e1461
 
+[http://xorg.freedesktop.org/releases/individual/proto/inputproto-1.9.99.15.tar.bz2]
+md5=87a569587d6141af0aa0ab4b604d083a
+sha256=adbb0c4ba929a67ba721a18ae0cfb79d43006f5afc86998c7f9127c7c4472681
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/proto/inputproto-X11R7.0-1.3.2.tar.bz2]
 md5=0da271f396bede5b8d09a61f6d1c4484
 sha256=3b48f495f9af74fc7cca2fe913e10ce3d947d1aa5e677722e87620b32f1068d0
@@ -10706,6 +10722,10 @@ sha256=bdbd6d239435c1736f5c532b12e8078761db8db5f37ab3195fe11c3e5b692c1c
 md5=d1512d65dadd4f48c779d4749e7753a8
 sha256=da9272900e41615e9c5dc25d84730b8966da6f5c8f4c40418dca2ad040fc8b82
 
+[http://xorg.freedesktop.org/releases/individual/lib/libX11-1.2.99.901.tar.bz2]
+md5=5923d6b4436fda8a0f04a3b08f693f17
+sha256=bdd7dc8fd7028b7969c29fa980a441766de89861d41ff7b2c00fa7b310f287fe
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libX11-X11R7.0-1.0.0.tar.bz2]
 md5=dcf59f148c978816ebbe3fbc5c9ef0e1
 sha256=89a3c2d8324ff9d0d91682503407310f7df30a74915cd253be3a75247b044248
@@ -10854,6 +10874,14 @@ sha256=2d706baf206d1cb422c8e0ceb6c5a8546bc3f0587cf090eba51e75a295d9c3f0
 md5=a91f1f722ac80c597cf0b75dcb8b48c0
 sha256=2dfd8eace1cafacc87b4055c57efeb771a740e24141d3f113de58c2a9eebd21f
 
+[http://xorg.freedesktop.org/releases/individual/lib/libXext-1.0.5.tar.bz2]
+md5=aa11d859cc8e9a0bad3bb55e1666547b
+sha256=1280af98466cb4484a89858ede3347ba9d7785baeb80b11f2066142dc2317d97
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXext-1.0.99.4.tar.bz2]
+md5=24da44888b87c66edb326acec35b85aa
+sha256=af941a61486ded37ae58c14ae2612046a3c88c36f825aa9b1769a8a704ebee8e
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXext-X11R7.0-1.0.0.tar.bz2]
 md5=9e47f574ac747446ac58ff9f6f402ceb
 sha256=5ccefe638c3dfc12fd8c2f2de38ec7e0e0b54bb271fa75f687e474a58edbad28
@@ -10954,6 +10982,10 @@ sha256=c77a5bbe97d0d0a6493adefcf1bd57aca91bc33279633b3f6cf1d2bb8812153f
 md5=4b88e07d7dd77ca1e786f09066b58c02
 sha256=7c0125ffb864e121ebfb5a20b1cfdff60562c2f2dfbb4e77c5eac81f36e15f3a
 
+[http://xorg.freedesktop.org/releases/individual/lib/libXi-1.2.99.3.tar.bz2]
+md5=2a2dd3686faf0e49983d726e47161802
+sha256=0f501cf1013a0294a0704979f14a77c059438efcefb4e6a87fd2f6f11f461ba7
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXi-X11R7.0-1.0.0.tar.bz2]
 md5=99503799b4d52ec0cac8e203341bb7b3
 sha256=64e8ece13fc778b9dd86ef93c4b782de9a1176a005ed7d895552a73acb103d9b
@@ -11110,6 +11142,10 @@ sha256=eef98ad3d35254384c3714cd63826fc2009f9b394f2b489718aba9be7be0a10b
 md5=090c1ad04e34982eada5cf3b1a0792fd
 sha256=b4a8dd3d9ceb04cd7322c1f7e5d2320d6ccf85ba8c81d736fd6d6c83c658c905
 
+[http://xorg.freedesktop.org/releases/individual/lib/libXtst-1.0.99.1.tar.bz2]
+md5=c41044b5c3af20e7abcfb874ea743b52
+sha256=cf3461a0ac039ae56957df84236f9009a286ac9a56bfb1a9c7755aa67b811946
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXtst-X11R7.0-1.0.1.tar.bz2]
 md5=3a3a3b88b4bc2a82f0b6de8ff526cc8c
 sha256=93d9c1fb831e2aaaab4627835e79ae0550837cbe18a0d6bc91edc2aa3ea67ad3
@@ -16982,6 +17018,10 @@ sha256=2b16516ef147bb604e1cf50c883143a052a7ff92d2930b70e571da0603b7d9ce
 md5=837df4a02c61a60a880644393b57faed
 sha256=45d491879791140dc1f20287e6489f32dc59ae37628038d991d9511abede3fc2
 
+[http://cairographics.org/releases/pixman-0.15.20.tar.gz]
+md5=613c95e7ddc8069b7aa2708f93219b7d
+sha256=e365eefdc3fcf88b8fd11c86882fe33bd669c89d9148148dce9d97135be50332
+
 [http://xorg.freedesktop.org/releases/individual/lib/pixman-0.9.4.tar.bz2]
 md5=c354ab5b0da10227226d3ef604254875
 sha256=261d239e9e3070a0a81e5b3eab92e6236c6295979bdae0a1ded05cbef93f67aa
@@ -18494,6 +18534,10 @@ sha256=9e1db25eec33ba1dff95010d6b8f1150ea40e7f953f1b6b7668a69a1171d23df
 md5=e2e45564f8ce22e00e1360e79c8ccdeb
 sha256=102fd42f8f2562450f4e45c28bfb0390c2d30ffa6a805eead15d67018930f654
 
+[http://xorg.freedesktop.org/releases/individual/proto/randrproto-1.3.0.tar.bz2]
+md5=a49416013fff33c853efb32f1926551e
+sha256=cfeb1429465e3c24debde1bf53ec35ef738fde5e80d2eed14f33e315e747bb8d
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/proto/randrproto-X11R7.0-1.1.2.tar.bz2]
 md5=bcf36d524f6f50aa16ee8e183350f7b8
 sha256=7a5eb58f10d02f58c2f7fb153bb5dc6d72173d5fa3d317bdbd9674f4577e0ad0
@@ -18638,6 +18682,10 @@ sha256=7754dfbbb1e3818f28720fa9647b8a593e9d54626a7896771c2bfac7f75e2726
 md5=598bc9a493deee2e48e4434e94467189
 sha256=c98a08b877e98a8fa7daa04be472de7e0cb38a99593faca8b987effcea2dd45b
 
+[http://xorg.freedesktop.org/releases/individual/proto/renderproto-0.11.tar.bz2]
+md5=b160a9733fe91b666e74fca284333148
+sha256=c4d1d6d9b0b6ed9a328a94890c171d534f62708f0982d071ccd443322bedffc2
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/proto/renderproto-X11R7.0-0.9.2.tar.bz2]
 md5=a7f3be0960c92ecb6a06a1022fe957df
 sha256=a875741d110a73952119460fac31e1bb7d0b0aff16f59c2a0a04bcd434c74f41
@@ -21282,6 +21330,10 @@ sha256=4f2a8a19e90ad82bc2da4eb52799a299a1c94bf5143bc2711e9e5d4cc5a7cdb4
 md5=ea2d9cd33ca6fd05923f007bd74d7c37
 sha256=97748154c41a1cd12635a79aee0c2846fd48ecb555fc8b54e3e5baec174e6e74
 
+[http://xorg.freedesktop.org/releases/individual/util/util-macros-1.2.1.tar.gz]
+md5=81b9746d6202ccf0b4a498cfd0731e71
+sha256=f3804f02f51a1be243ce7413dc67dca774f000686f8f2efedc77203a1962d401
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/util/util-macros-X11R7.0-1.0.1.tar.bz2]
 md5=bc6be634532d4936eb753de54e1663d3
 sha256=e95a45db65b33be472a3134492e348c4cd6edc200d02a85654ffe62bc2e6fdcd
@@ -22273,6 +22325,10 @@ sha256=d4ac7ae154ee9733be27a5f55586abb9362c768f5fb8a4fc7fd2645100a9313a
 md5=5d0d3c13b03e9516eafe536e6bd756c7
 sha256=eb7ea9a7917fa6d603529e76f793e56baefa87a3034602634c73f9b284adc8b7
 
+[http://xorg.freedesktop.org/releases/individual/proto/xextproto-7.0.99.3.tar.bz2]
+md5=417c21cbc02572d84dffdd5f92a760e7
+sha256=fba678966b16fd6f590e14ebfb495059fc0ce58f457a2336917c91da686772a8
+
 [http://xorg.freedesktop.org/releases/individual/proto/xextproto-7.0.2.tar.bz2]
 md5=242388ab65dde3a3dd313eeee265e429
 sha256=53f3039ae769b08bd139d4474a7debe0b6f24048e7c514c835c8a1880f11e0d9
@@ -22481,6 +22537,10 @@ sha256=825adcadaf4c90d4cb1d0bd21dcf67bf3b895f12f8e7bf186ed936445dc015ca
 md5=a6070ead29b2d81b5b386a96df2661b8
 sha256=45c4b6df8d1dbc4db8aa580be4f3c693ebba4eba4908d82489948827d3bed0e5
 
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-evdev-2.2.99.1.tar.bz2]
+md5=b50c24efa826d0d6651f7e314e3c4054
+sha256=a2fca822c9cf65d5e420d370649a5ee40d47cf775adefd8d4ba243e05d6b25de
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-input-evdev-X11R7.0-1.0.0.5.tar.bz2]
 md5=d982c6f185f4c75a4b65703ceed7be06
 sha256=ba53e8ce6bfa01da7fa86a31853542a71722b41b511041bdb58cf66c10f3edb4
@@ -24333,6 +24393,10 @@ sha256=2f36880bffaee0a5b2b704376a02b22066b6842445e1d77da698854e5973eb21
 md5=308971036e25250e7fe3cccfd5a120f8
 sha256=a680174f54be7763819e5275c5d5d44fc9e9b6f8e9351dd45c150eb4c182d5bb
 
+[http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.6.0.tar.bz2]
+md5=aafe73f5807ce8bb534727ecb72467c7
+sha256=81a9a02b621e8a3e0bae1ad1b5dd6706a3fdcdbe766d75e1670ab5b3f0d32812
+
 [http://xorg.freedesktop.org/releases/X11R7.0/src/xserver/xorg-server-X11R7.0-1.0.1.tar.bz2]
 md5=0e7527480fb845a3c2e333bd0f47ff50
 sha256=0419124e1bab473f8f9e2d7de1dba8bae2ed1375b72d55cdfb9471dac357ed47
@@ -24733,6 +24797,10 @@ sha256=16bc4646f105efd3d0dd105899ac19035d67acf50950ca8c70cf68772508272d
 md5=96e142331edd498a9364887b2548f1bb
 sha256=9ff21a8d9ea524ca9b7cb6d6b4d522b4cb20b1c35edeb8995a9e9265a0df64bd
 
+[http://xorg.freedesktop.org/releases/individual/lib/xtrans-1.2.3.tar.bz2]
+md5=f9cf791dfad59cf044e276aab3a71e1d
+sha256=a67a8b09d9530021e2bd4b93136f385e72a8d8e4f2c26a99aeb169bee88facf0
+
 [http://xorg.freedesktop.org/releases/individual/lib/xtrans-1.2.tar.bz2]
 md5=a91fef8b932b21992af7dfff7b2643f3
 sha256=d6c3cabd5ecd0183a8a9bc6b3471545df8e2c78956b4c4cfd48f0c545a88c9a4
@@ -25080,4 +25148,3 @@ sha256=5cc1a53bb909922596bdd0fa967b654fe1bfbe0dcf1d34608f0b7c90e0c27867
 [http://heanet.dl.sourceforge.net/zziplib/zziplib-0.13.49.tar.bz2]
 md5=5f7b88ebb2bcd7e8044328482d079661
 sha256=f57c4e33eb2cdd87a6c2f01bfa4794340fbe61ea1a1cfc7dac3b6671e1dd22af
-
diff --git a/conf/machine/om-gta02.conf b/conf/machine/om-gta02.conf
index bb1decc..da00134 100644
--- a/conf/machine/om-gta02.conf
+++ b/conf/machine/om-gta02.conf
@@ -7,7 +7,7 @@
 TARGET_ARCH = "arm"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-openmoko-stable"
-PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive-glamo"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg"
 UBOOT_ENTRYPOINT = "30008000"
 
 MACHINE_FEATURES = "kernel26 apm alsa bluetooth gps usbgadget usbhost phone wifi vfat ext2"
@@ -15,7 +15,8 @@ MACHINE_DISPLAY_WIDTH_PIXELS = "480"
 MACHINE_DISPLAY_HEIGHT_PIXELS = "640"
 MACHINE_DISPLAY_ORIENTATION = "0"
 MACHINE_DISPLAY_PPI = "285"
-XSERVER = "xserver-kdrive-glamo xserver-kdrive-fbdev"
+MACHINE_DRI_MODULES = "glamo"
+XSERVER = "xserver-xorg"
 
 # package machine specific modules
 MACHINE_EXTRA_RRECOMMENDS = "\
diff --git a/recipes/dri/libdrm_git.bb b/recipes/dri/libdrm_git.bb
new file mode 100644
index 0000000..4612bee
--- /dev/null
+++ b/recipes/dri/libdrm_git.bb
@@ -0,0 +1,15 @@
+PR = "r0.0001"
+
+SECTION = "x11/base"
+LICENSE = "MIT"
+SRC_URI = "git://git.bitwiz.org.uk/libdrm.git;protocol=git;branch=glamo"
+PROVIDES = "drm"
+DEPENDS = "libpthread-stubs linux-openmoko-devel"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
+
+do_stage() {
+	autotools_stage_all
+}
diff --git a/recipes/glamo-dri-tests/glamo-dri-tests_git.bb b/recipes/glamo-dri-tests/glamo-dri-tests_git.bb
new file mode 100644
index 0000000..bd65493
--- /dev/null
+++ b/recipes/glamo-dri-tests/glamo-dri-tests_git.bb
@@ -0,0 +1,19 @@
+DEPENDS = "libdrm virtual/libx11 libxext"
+
+PV = "1.0+git"
+PR = "r0.0001"
+PE = "1"
+
+SRC_URI = "git://git.bitwiz.org.uk/glamo-dri-tests.git;protocol=git;branch=master"
+
+inherit pkgconfig
+
+do_compile_prepend() {
+	export CROSS_CFLAGS=`pkg-config --cflags libdrm_glamo`
+}
+
+do_install() {
+        PREFIX=${D}/usr make install
+}
+
+S = "${WORKDIR}/git"
diff --git a/recipes/intltool/intltool_0.40.3.bb b/recipes/intltool/intltool_0.40.3.bb
index b4000dc..94e5bd8 100644
--- a/recipes/intltool/intltool_0.40.3.bb
+++ b/recipes/intltool/intltool_0.40.3.bb
@@ -1,13 +1,14 @@
 require intltool.inc
 
-PR = "r2"
+DEPENDS += "libxml-parser-perl-native"
+PR = "r2.1"
 
 EXTRA_OEMAKE = "'PERL_TARGET=/usr/bin/perl'"
 
 do_configure_prepend() {
 	sed -i -e s:\\\$\(PERL\):\$\(PERL_TARGET\):g Makefile.am
-}	
+}
 
 do_configure_append() {
-	sed -i -e s:head\ -1:head\ -n1:g intltool.m4 
-}	
+	sed -i -e s:head\ -1:head\ -n1:g intltool.m4
+}
diff --git a/recipes/mesa/mesa-dri_git.bb b/recipes/mesa/mesa-dri_git.bb
index bca681c..bdf165d 100644
--- a/recipes/mesa/mesa-dri_git.bb
+++ b/recipes/mesa/mesa-dri_git.bb
@@ -1,21 +1,29 @@
 include mesa-common.inc
 
 PROTO_DEPS = "xf86driproto glproto dri2proto"
-LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
+LIB_DEPS = "libdrm virtual/libx11 libxext libxxf86vm libxdamage libxfixes expat"
 
 DEPENDS = "${PROTO_DEPS}  ${LIB_DEPS}"
+PROVIDES = "mesa"
 
-PV = "7.2+gitr${SRCREV}"
-PR = "r1"
+PV = "7.4+git"
+PR = "r0.0001"
 PE = "1"
 
 DEFAULT_PREFERENCE = "-1"
 
-SRC_URI = "git://anongit.freedesktop.org/git/mesa/mesa;protocol=git"
+SRC_URI = "git://git.bitwiz.org.uk/mesa.git;protocol=git;branch=glamo"
+
 S = "${WORKDIR}/git"
 
 FILES_${PN} += "${libdir}/dri/*.so"
 FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
 
-EXTRA_OECONF += "--with-driver=dri --with-dri-drivers=swrast,${MACHINE_DRI_MODULES}"
+EXTRA_OECONF += "--disable-glx-tls --with-driver=dri --with-dri-drivers=swrast,${MACHINE_DRI_MODULES}"
+CFLAGS_append = " -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE "
+CFLAGS_append += "-D_BSD_SOURCE -D_GNU_SOURCE"
 
+do_install_append () {
+    install -d ${D}/usr/bin
+    install -m 0755 ${S}/progs/xdemos/{glxdemo,glxgears,glxheads,glxinfo} ${D}/usr/bin/
+}
diff --git a/recipes/xorg-driver/xf86-input-evdev_2.2.99.1.bb b/recipes/xorg-driver/xf86-input-evdev_2.2.99.1.bb
new file mode 100644
index 0000000..7929096
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-evdev_2.2.99.1.bb
@@ -0,0 +1,4 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- evdev input driver"
+PE = "1"
diff --git a/recipes/xorg-driver/xf86-video-glamo.bb b/recipes/xorg-driver/xf86-video-glamo.bb
new file mode 100644
index 0000000..31d125c
--- /dev/null
+++ b/recipes/xorg-driver/xf86-video-glamo.bb
@@ -0,0 +1,10 @@
+require xorg-driver-video.inc
+SRC_URI = "git://git.bitwiz.org.uk/xf86-video-glamo.git;protocol=git;branch=kms"
+
+S = "${WORKDIR}/git"
+
+PR = "r0.0001"
+PV = "git"
+PE = "1"
+
+DESCRIPTION = "X.Org X server -- Glamo display driver"
diff --git a/recipes/xorg-lib/libx11_1.2.99.901.bb b/recipes/xorg-lib/libx11_1.2.99.901.bb
new file mode 100644
index 0000000..5b1e304
--- /dev/null
+++ b/recipes/xorg-lib/libx11_1.2.99.901.bb
@@ -0,0 +1,26 @@
+require xorg-lib-common.inc
+PE = "1"
+PR = "r5"
+
+DESCRIPTION = "Base X libs."
+DEPENDS += " bigreqsproto xproto xextproto xtrans libxau xcmiscproto \
+	libxdmcp xf86bigfontproto kbproto inputproto"
+PROVIDES = "virtual/libx11"
+
+XORG_PN = "libX11"
+
+EXTRA_OECONF += "--without-xcb"
+
+SRC_URI += " file://ruutf8.patch;patch=1"
+
+do_compile() {
+        (
+         unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS
+         cd src/util; touch makekeys-makekeys.o ; ${BUILD_CC} ${BUILD_CFLAGS} makekeys.c -o makekeys
+         cd ../../
+        ) || exit 1
+        oe_runmake
+}
+
+FILES_${PN} += "${datadir}/X11/XKeysymDB ${datadir}/X11/XErrorDB ${libdir}/X11/Xcms.txt"
+FILES_${PN}-locale += "${datadir}/X11/locale ${libdir}/X11/locale"
diff --git a/recipes/xorg-lib/libxext_1.0.99.4.bb b/recipes/xorg-lib/libxext_1.0.99.4.bb
new file mode 100644
index 0000000..81231a8
--- /dev/null
+++ b/recipes/xorg-lib/libxext_1.0.99.4.bb
@@ -0,0 +1,9 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "X11 miscellaneous extension library"
+DEPENDS += "xproto virtual/libx11 xextproto libxau"
+PROVIDES = "xext"
+PR = "r1"
+PE = "1"
+
+XORG_PN = "libXext"
diff --git a/recipes/xorg-lib/libxi_1.2.99.3.bb b/recipes/xorg-lib/libxi_1.2.99.3.bb
new file mode 100644
index 0000000..31e3b49
--- /dev/null
+++ b/recipes/xorg-lib/libxi_1.2.99.3.bb
@@ -0,0 +1,8 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "X11 Input extension library"
+DEPENDS += "libxext inputproto"
+PR = "r1"
+PE = "1"
+
+XORG_PN = "libXi"
diff --git a/recipes/xorg-lib/libxtst_1.0.99.1.bb b/recipes/xorg-lib/libxtst_1.0.99.1.bb
new file mode 100644
index 0000000..174046f
--- /dev/null
+++ b/recipes/xorg-lib/libxtst_1.0.99.1.bb
@@ -0,0 +1,9 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "X Test Extension: client side library"
+DEPENDS += "libxext recordproto inputproto libxi"
+PROVIDES = "xtst"
+PR = "r1"
+PE = "1"
+
+XORG_PN = "libXtst"
diff --git a/recipes/xorg-lib/pixman_0.15.20.bb b/recipes/xorg-lib/pixman_0.15.20.bb
new file mode 100644
index 0000000..9e25cd8
--- /dev/null
+++ b/recipes/xorg-lib/pixman_0.15.20.bb
@@ -0,0 +1,17 @@
+SECTION = "libs"
+PRIORITY = "optional"
+DESCRIPTION = "Low-level pixel manipulation library."
+LICENSE = "X11"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://cairographics.org/releases/pixman-${PV}.tar.gz \
+	  "
+
+inherit autotools
+
+AUTOTOOLS_STAGE_PKGCONFIG = "1"
+do_stage () {
+ 	autotools_stage_all
+}
+
diff --git a/recipes/xorg-lib/xtrans_1.2.3.bb b/recipes/xorg-lib/xtrans_1.2.3.bb
new file mode 100644
index 0000000..81464f4
--- /dev/null
+++ b/recipes/xorg-lib/xtrans_1.2.3.bb
@@ -0,0 +1,14 @@
+require xorg-lib-common.inc
+
+DESCRIPTION = "network API translation layer to insulate X applications and \
+libraries from OS network vageries."
+PE = "1"
+PR = "r0"
+
+ALLOW_EMPTY = "1"
+
+FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/xtrans"
+
+RDEPENDS_${PN}-dev = ""
+
+XORG_PN = "xtrans"
diff --git a/recipes/xorg-proto/dri2proto_2.1.bb b/recipes/xorg-proto/dri2proto_2.1.bb
new file mode 100644
index 0000000..a0e1fd3
--- /dev/null
+++ b/recipes/xorg-proto/dri2proto_2.1.bb
@@ -0,0 +1,3 @@
+DESCRIPTION = "DRI2 extension headers"
+
+require xorg-proto-common.inc
diff --git a/recipes/xorg-proto/fixesproto_4.1.bb b/recipes/xorg-proto/fixesproto_4.1.bb
new file mode 100644
index 0000000..f9bc9d9
--- /dev/null
+++ b/recipes/xorg-proto/fixesproto_4.1.bb
@@ -0,0 +1,7 @@
+require xorg-proto-common.inc
+
+CONFLICTS = "fixesext"
+PR = "r1"
+PE = "1"
+
+XORG_PN = "fixesproto"
diff --git a/recipes/xorg-proto/inputproto_1.9.99.15.bb b/recipes/xorg-proto/inputproto_1.9.99.15.bb
new file mode 100644
index 0000000..e3a8b09
--- /dev/null
+++ b/recipes/xorg-proto/inputproto_1.9.99.15.bb
@@ -0,0 +1,6 @@
+require xorg-proto-common.inc
+
+PR = "r1"
+PE = "1"
+
+XORG_PN = "inputproto"
diff --git a/recipes/xorg-proto/randrproto_1.3.0.bb b/recipes/xorg-proto/randrproto_1.3.0.bb
new file mode 100644
index 0000000..85000cc
--- /dev/null
+++ b/recipes/xorg-proto/randrproto_1.3.0.bb
@@ -0,0 +1,7 @@
+require xorg-proto-common.inc
+
+CONFLICTS = "randrext"
+PR = "r1"
+PE = "1"
+
+XORG_PN = "randrproto"
diff --git a/recipes/xorg-proto/renderproto_0.11.bb b/recipes/xorg-proto/renderproto_0.11.bb
new file mode 100644
index 0000000..3d20b24
--- /dev/null
+++ b/recipes/xorg-proto/renderproto_0.11.bb
@@ -0,0 +1,4 @@
+require xorg-proto-common.inc
+
+CONFLICTS = "renderext"
+PE = "1"
diff --git a/recipes/xorg-proto/xextproto_7.0.99.3.bb b/recipes/xorg-proto/xextproto_7.0.99.3.bb
new file mode 100644
index 0000000..3637929
--- /dev/null
+++ b/recipes/xorg-proto/xextproto_7.0.99.3.bb
@@ -0,0 +1,3 @@
+require xorg-proto-common.inc
+
+PE = "1"
diff --git a/recipes/xorg-util/util-macros_1.2.1.bb b/recipes/xorg-util/util-macros_1.2.1.bb
new file mode 100644
index 0000000..4775fc6
--- /dev/null
+++ b/recipes/xorg-util/util-macros_1.2.1.bb
@@ -0,0 +1,6 @@
+require xorg-util-common.inc
+
+DESCRIPTION = "X autotools macros"
+PE = "1"
+
+ALLOW_EMPTY = "1"
diff --git a/recipes/xorg-xserver/xorg-xserver-common.inc b/recipes/xorg-xserver/xorg-xserver-common.inc
index 1960d3d..3a41141 100644
--- a/recipes/xorg-xserver/xorg-xserver-common.inc
+++ b/recipes/xorg-xserver/xorg-xserver-common.inc
@@ -4,7 +4,7 @@ LICENSE = "MIT-X"
 
 PROVIDES = "virtual/xserver"
 
-DEPENDS = "hal fontconfig freetype flex-native lbxutil kbproto \ 
+DEPENDS = "hal fontconfig freetype flex-native kbproto \
 xf86driproto drm glproto randrproto renderproto fixesproto damageproto \
 xcmiscproto xextproto xproto xf86miscproto xf86vidmodeproto xf86bigfontproto \
 scrnsaverproto bigreqsproto resourceproto fontsproto inputproto \
@@ -65,6 +65,7 @@ FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \
 #  84.0k   libxf4bpp.so
 
 PACKAGES =+ "${PN}-extension-dri \
+             ${PN}-extension-dri2 \
              ${PN}-extension-glx \
              ${PN}-module-libint10 \
              ${PN}-module-libafb \
@@ -76,6 +77,7 @@ PACKAGES =+ "${PN}-extension-dri \
              ${PN}-module-libxf4bpp"
 
 FILES_${PN}-extension-dri = "${libdir}/xorg/modules/extensions/libdri.so"
+FILES_${PN}-extension-dri2 = "${libdir}/xorg/modules/extensions/libdri2.so"
 FILES_${PN}-extension-glx = "${libdir}/xorg/modules/extensions/libglx.so"
 FILES_${PN}-module-libint10 = "${libdir}/xorg/modules/libint10.*"
 FILES_${PN}-module-libafb = "${libdir}/xorg/modules/libafb.*"
diff --git a/recipes/xorg-xserver/xserver-xorg/dolt-fix.patch b/recipes/xorg-xserver/xserver-xorg/dolt-fix.patch
new file mode 100644
index 0000000..414d72d
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-xorg/dolt-fix.patch
@@ -0,0 +1,21 @@
+Index: xorg-server/m4/dolt.m4
+===================================================================
+--- xorg-server/m4/dolt.m4	2009-04-14 21:14:56.000000000 +0400
++++ xorg-server-2/m4/dolt.m4	2009-07-15 12:38:33.796848843 +0400
+@@ -147,7 +147,7 @@
+     cat <<__DOLTLIBTOOL__EOF__ > doltlibtool
+ #!$DOLT_BASH
+ __DOLTLIBTOOL__EOF__
+-    cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
++    cat <<'__DOLTLIBTOOL__EOF__' | sed -e "s/@host_alias@/$host_alias/g" >>doltlibtool
+ top_builddir_slash="${0%%doltlibtool}"
+ : ${top_builddir_slash:=./}
+ args=()
+@@ -163,7 +163,7 @@
+ if $modeok && $tagok ; then
+     . ${top_builddir_slash}doltcompile "${args@<:@@@:>@}"
+ else
+-    exec ${top_builddir_slash}libtool "$[]@"
++    exec ${top_builddir_slash}@host_alias@-libtool "$[]@"
+ fi
+ __DOLTLIBTOOL__EOF__
diff --git a/recipes/xorg-xserver/xserver-xorg_git.bb b/recipes/xorg-xserver/xserver-xorg_git.bb
new file mode 100644
index 0000000..113541a
--- /dev/null
+++ b/recipes/xorg-xserver/xserver-xorg_git.bb
@@ -0,0 +1,20 @@
+require xorg-xserver-common.inc
+
+DESCRIPTION = "the X.Org X server"
+DEPENDS += "pixman libpciaccess openssl dri2proto glproto mesa xorg-minimal-fonts"
+PR = "r5.03"
+
+SRC_URI = "git://anongit.freedesktop.org/git/xorg/xserver;protocol=git;branch=master \
+           file://sysroot_fix.patch;patch=1 \
+           file://dolt-fix.patch;patch=1"
+
+S = "${WORKDIR}/git"
+
+do_install_prepend() {
+	mkdir -p ${D}/${libdir}/X11/fonts
+}
+
+EXTRA_OECONF += "--disable-xephyr --disable-config-hal --disable-xinerama"
+EXTRA_OECONF += " --disable-glx-tls --enable-dri2 --disable-unit-tests "
+
+export LDFLAGS += " -ldl "
-- 
1.6.2.5

