summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2012-08-08 23:33:09 +0000
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2012-08-08 23:33:09 +0000
commit03d4852045e4ad561a9ada183a32d4f750d95bc4 (patch)
tree33d305ac398bbda1a10d786b3a6c3aaa2f57db2f /x11-drivers/xf86-video-vmware
parentremove broken version (diff)
downloadhistorical-03d4852045e4ad561a9ada183a32d4f750d95bc4.tar.gz
historical-03d4852045e4ad561a9ada183a32d4f750d95bc4.tar.bz2
historical-03d4852045e4ad561a9ada183a32d4f750d95bc4.zip
Add patch to allow building against xorg-server-1.13, reported and tested by jmbsvicetto.
Package-Manager: portage-2.2.0_alpha120/cvs/Linux x86_64
Diffstat (limited to 'x11-drivers/xf86-video-vmware')
-rw-r--r--x11-drivers/xf86-video-vmware/ChangeLog11
-rw-r--r--x11-drivers/xf86-video-vmware/Manifest40
-rw-r--r--x11-drivers/xf86-video-vmware/files/xf86-video-vmware-12.0.2-xorg-server-1.13.patch520
-rw-r--r--x11-drivers/xf86-video-vmware/xf86-video-vmware-12.0.2-r1.ebuild20
4 files changed, 563 insertions, 28 deletions
diff --git a/x11-drivers/xf86-video-vmware/ChangeLog b/x11-drivers/xf86-video-vmware/ChangeLog
index bb67b124e092..a5e6869e7a68 100644
--- a/x11-drivers/xf86-video-vmware/ChangeLog
+++ b/x11-drivers/xf86-video-vmware/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for x11-drivers/xf86-video-vmware
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-vmware/ChangeLog,v 1.65 2012/06/24 19:16:15 ago Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-vmware/ChangeLog,v 1.66 2012/08/08 23:33:08 chithanh Exp $
+
+*xf86-video-vmware-12.0.2-r1 (08 Aug 2012)
+
+ 08 Aug 2012; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+ +files/xf86-video-vmware-12.0.2-xorg-server-1.13.patch,
+ +xf86-video-vmware-12.0.2-r1.ebuild:
+ Add patch to allow building against xorg-server-1.13, reported and tested by
+ jmbsvicetto.
24 Jun 2012; Agostino Sarubbo <ago@gentoo.org>
xf86-video-vmware-12.0.2.ebuild:
@@ -322,4 +330,3 @@
08 Aug 2005; Donnie Berkholz <dberkholz@gentoo.org>;
+xf86-video-vmware-10.10.2.ebuild:
Initial commit for modular X.
-
diff --git a/x11-drivers/xf86-video-vmware/Manifest b/x11-drivers/xf86-video-vmware/Manifest
index 9186f2e5237e..94f86a838c87 100644
--- a/x11-drivers/xf86-video-vmware/Manifest
+++ b/x11-drivers/xf86-video-vmware/Manifest
@@ -1,26 +1,14 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA512
-
-DIST xf86-video-vmware-11.0.3.tar.bz2 313656 RMD160 73b9ee26a35bba45e6e70907c882fa5dfba56151 SHA1 8aa23618a3dfa91f88094a4d1dc45c878f386f69 SHA256 b24a7cb2d87e416561e25122eab2cd48fc64a2ba105238456eefef16f29f38a3
-DIST xf86-video-vmware-11.1.0.tar.bz2 336334 RMD160 8a099e75760a856299f4ec7964a0cf4e29d5fa01 SHA1 beffdb52067de690dd0342b7c89ec45024c0292c SHA256 c97503e97f741e64b57ee0e4399323f9c0151fffa55e6f4b90f04f5921b9406a
-DIST xf86-video-vmware-12.0.0.tar.bz2 351064 RMD160 e6fa9c625380acf03bb50e416ab48766b0342a8a SHA1 a0dc242481452ed69a5406b146827f4946c94316 SHA256 0319f261a8f8e7694dfafa7fcdfbe1db73143e2401b155e1fddf5a1770db92c2
-DIST xf86-video-vmware-12.0.1.tar.bz2 431828 RMD160 aa4ed12493104b275ef7ac2c4f727d9fefe9bb8f SHA1 761a55b41b9e496a0887dfe4a9ade6aeacd2371d SHA256 ded644af1f74ca0ebdc759e3db715519c476b341c1783c3d92c93a76591ed496
-DIST xf86-video-vmware-12.0.2.tar.bz2 432468 RMD160 3324f164139c542fbd304ae627d467fea7f5d6bf SHA1 efa47f365d88da245804a9934719ff860ed04f95 SHA256 c827875fd94805ec9b925fe09aaa973e7e3f9096c7ef311d449c3f134ae75147
-EBUILD xf86-video-vmware-11.0.3.ebuild 572 RMD160 9d35e1573f4e0f67131377645651a9b24bc2c422 SHA1 c992c54d048537c1badaf9f8b0819c9fa4949d8d SHA256 e5d2bd24f6e8a9ac543d7a7d01d4b35ec089a71e1ac50c0635ba19ead9a386bc
-EBUILD xf86-video-vmware-11.1.0.ebuild 440 RMD160 96bf3720f91e00cf0a1c812a5f264e4c06c8dac6 SHA1 5826b865b46904c69571707022e447e85fb00f58 SHA256 a102b0067c196c37275855f7e0a304670226623a08276105d4529f25a2f0fbce
-EBUILD xf86-video-vmware-12.0.0.ebuild 440 RMD160 b0601fd94cbb99a80e113116bc723f5347928603 SHA1 fd2f14c7df857d19c58e3ee7df5c4955a9d97fca SHA256 d35940793249452ae2bb7abbb7f6d88acf3411843f7beeb7f0021302c3aaf49e
-EBUILD xf86-video-vmware-12.0.1.ebuild 461 RMD160 0024fb5025d7c38bd34a47c2899b6994cc9928e8 SHA1 d69e54b77d2d2551ff21201e369407cd2851e24a SHA256 2ebbb15115f4f121411d60f9504bcc358684f64a500c4ad4ccf76ce8d6ebc4cb
-EBUILD xf86-video-vmware-12.0.2.ebuild 454 RMD160 4af679ae708b90de126012567d3118a18f6cb2b9 SHA1 b1356c06cd5661ba86eb64483aaa6b88b01972cf SHA256 8e6a9bd764a7c41d96660a2717ffcc7bad425c79615df79421e6b7442232e51a
-MISC ChangeLog 9990 RMD160 94d8e1219ce8a56c6bb24ef18cfa9d7396556fcb SHA1 61e960e88ad3db2c8b592e18ef2f5c552f6b1ab2 SHA256 cb598c7aff4826fd4f47414b80337c3ca4358a644c1edb5c78d3b99720659f54
-MISC metadata.xml 254 RMD160 c918c791107bb6bade5533be97fda2a5357ade13 SHA1 c0bf2ca0f6107fdce02502942d7050d84ad30fb2 SHA256 32d68d1ad2e14d3f3af865dce8b2e42fec8722f17b1b35beeb5ecbd9b8e1a253
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.19 (GNU/Linux)
-
-iQEcBAEBCgAGBQJP52eEAAoJEOTDgjZ80txdzfEIAIM/05HOC9393O2G3dGonTk2
-fKK4pGIg6+t5+tMw72RDDwzCHA69EL6GmAyXIQ5/KElLmvxz6ECqhpF7svf0+paf
-s/Go5gPb/Tmmat2fax+vu4iOt0vH44uJ+SO+N4faM+qj8+r8eH5pkhO4EeDYhYxt
-VdFqCkLhlO3VsJttNPTt7vJJFrm+ZR4UqTGy2LoDq7dau4gBLEaCdFDrTcfLfcqb
-EbKoKxaZvPO07XcoSKpae9P4QPQA1+Dbv0lUP89U10DS5psmx+iwUJIWmxLongOb
-BFzmpNEI8cL+xp3foyDswfRwShJbqU6PzxVd3csuBpraC27N8HzlINrObNEpbSI=
-=Tr04
------END PGP SIGNATURE-----
+AUX xf86-video-vmware-12.0.2-xorg-server-1.13.patch 16501 SHA256 f2ae0be1a311e6ac1a9264fb9cee548598f1a4c9dc227c705514de5ef791f647 SHA512 3372e0ed4afb187f391cdbabcbe35099732e027873e16b1324139da97541ad5bd7f0d334cf2214d47d446e697a59661929d33608a3201ab3cffbe153ff201604 WHIRLPOOL ab12afe5fe3dcacc682a2a7f4b7b1e128a06d96bee65ec855beabd9281387c172f5f1f48aa235820e8cf5b702a90c2120b4d9154a82b8292b6bd068d3880f31d
+DIST xf86-video-vmware-11.0.3.tar.bz2 313656 SHA256 b24a7cb2d87e416561e25122eab2cd48fc64a2ba105238456eefef16f29f38a3
+DIST xf86-video-vmware-11.1.0.tar.bz2 336334 SHA256 c97503e97f741e64b57ee0e4399323f9c0151fffa55e6f4b90f04f5921b9406a
+DIST xf86-video-vmware-12.0.0.tar.bz2 351064 SHA256 0319f261a8f8e7694dfafa7fcdfbe1db73143e2401b155e1fddf5a1770db92c2
+DIST xf86-video-vmware-12.0.1.tar.bz2 431828 SHA256 ded644af1f74ca0ebdc759e3db715519c476b341c1783c3d92c93a76591ed496
+DIST xf86-video-vmware-12.0.2.tar.bz2 432468 SHA256 c827875fd94805ec9b925fe09aaa973e7e3f9096c7ef311d449c3f134ae75147 SHA512 14adbde330e247251fd425449fb79c8399f14ad9a295a1bea776e9bd77706ff9db9a7d0351f5faa8b96aac2b1d747ea289dc89b5cfdcbce5a11bba80b6765709 WHIRLPOOL b3061ef519f77bd8418bf48dafa2f18abb9d435f2eee7b3f64a217744eabaae4313d1d7cc22803817b5eceaeaa0347bcfc03e1c22535d34a6854a5d638c08fdc
+EBUILD xf86-video-vmware-11.0.3.ebuild 572 SHA256 e5d2bd24f6e8a9ac543d7a7d01d4b35ec089a71e1ac50c0635ba19ead9a386bc SHA512 1a65c2064498ee12ebce50c38972917c44ed776b49b94cf9933658dad3ecd5f26e9503a5c3905e9c69fde43f152b512e44feecfc3e4c45ddbde172f4e0db65fb WHIRLPOOL 558847c13830d0ed86c0245ab88499d12ab50967897d7ba542410695be0400a8920cff15e510b0bcc30371148f81aa79ebf5151a682ccfa4a42632359a889024
+EBUILD xf86-video-vmware-11.1.0.ebuild 440 SHA256 a102b0067c196c37275855f7e0a304670226623a08276105d4529f25a2f0fbce SHA512 9d6a2c4670aff2d93fcc6ec0d56bae2f11367f8f61535e805a12c29912ab8928fa893c4a9a81143095626cdc68a5db129abf344634be046331c3f836d14fdd7f WHIRLPOOL b9c139fa190d61468ef53a10deb0c4cecfc66bcd0166c67877973e8cacd60d737244884245759c716360d9e3077a2d5f556aec35bd942f3ef36c519aea93e224
+EBUILD xf86-video-vmware-12.0.0.ebuild 440 SHA256 d35940793249452ae2bb7abbb7f6d88acf3411843f7beeb7f0021302c3aaf49e SHA512 bad0dde278acad3ad90498c966d9baa6436e5e7b6bf5c870dd443f8109dca5657a58eb0ee1052c5398d37447f271db3f669cc775a761c40d0640650e85f41d5b WHIRLPOOL b2c3410c4a045ad3227ea32a0bc17973aa93b9809fbceba3fd732b23a0c0f7a1f7d4115b749e6c687df51dc9f01f056d6463d9065c88f83a68f4f73655900ebe
+EBUILD xf86-video-vmware-12.0.1.ebuild 461 SHA256 2ebbb15115f4f121411d60f9504bcc358684f64a500c4ad4ccf76ce8d6ebc4cb SHA512 7041eb984c539f69527e956d776e5f12191eb5ce3a769ccc4e407f8855e2efcd62579ef503d584bc61080adfe7563b07f3fb0ca89bee6116e18ed5042f608a07 WHIRLPOOL df5e1b8a2e91aaeb1f3affb6c20ebee45f4e302e2ec5ef5ca3492b4e1535052067f15970cc39babef9df1c7fe10b451b57c50592fcc1a1a4d50cb8439b58ffbf
+EBUILD xf86-video-vmware-12.0.2-r1.ebuild 520 SHA256 201e7d27d5db1dd93d9f8b531981de5b70e8320ddc019d175ea6e6aae0d3729b SHA512 222246c98f80ed3cf824361341634522f85701100dbb8042d840467d238c6d05517f5eaf95cfeb7ca1b1cbe18206e9f8cc6730e7ad64ed27d3fbdb505994a6ba WHIRLPOOL 61c8de3aaa2e2a25f1e728b289dffe0bd7e7bdf74cfc62cb2a2c896581f2d384ae1df2d077ccbd9061e95cf109b858dfabc2ece31a81c26dfdeb9091e86ee432
+EBUILD xf86-video-vmware-12.0.2.ebuild 454 SHA256 8e6a9bd764a7c41d96660a2717ffcc7bad425c79615df79421e6b7442232e51a SHA512 2c7a37a2b3897035713e1883bafc3b897d4e62ff38afd09e2962d77e3d968f5b1a46b86ad68eb31f3ec1f5fa5215edc65358c935956753f73f707ba7a5d05eff WHIRLPOOL 009fb61bfde383546c6e6ac8e61d6c479700b0895e851d9a092e95d4579903ff995a837930e7914664729a03727e11558027e28b1f98229aeb23ad2aa6bfd7a3
+MISC ChangeLog 10299 SHA256 1c317a04b477a23340ad2cb9cddd0013af4e2ea9ed6e672356aa9e111a452a30 SHA512 2ac1b671af07e103698e5d18297c74b41a21fafd26200b0437ec6ce9abaa1a459482ea6679a441c9d57f33747487824335cac343fb0ccfb1e559a46108dace40 WHIRLPOOL 704f016eeb7f721698ad00294a694377346b20cce0d32a0a676cc6f4eb6a3f6cbb225534f482553a5d3cb358219e29c087bb8fd815e02df14be46c82d7544da2
+MISC metadata.xml 254 SHA256 32d68d1ad2e14d3f3af865dce8b2e42fec8722f17b1b35beeb5ecbd9b8e1a253 SHA512 6d59e8be0228a3a61b27b0984a3ec1a98d5288106c62d9b5fcec735138f3671aec4217de6220c7c978e255242d0db6f71abccae79cc385ce06a6b3d895d00f06 WHIRLPOOL 64bff93fcf13f4db3f1adb4a3d07352faf3d1d2af0ae4fca3411e9b31e40f6494cca8373f83ef0daac2bfaeed1c20bb6af06507d3ae50f3fece86dc7c80c41fa
diff --git a/x11-drivers/xf86-video-vmware/files/xf86-video-vmware-12.0.2-xorg-server-1.13.patch b/x11-drivers/xf86-video-vmware/files/xf86-video-vmware-12.0.2-xorg-server-1.13.patch
new file mode 100644
index 000000000000..358c10bcb9fa
--- /dev/null
+++ b/x11-drivers/xf86-video-vmware/files/xf86-video-vmware-12.0.2-xorg-server-1.13.patch
@@ -0,0 +1,520 @@
+From 61df95a86f4997e342d50d7779b00aba2e8849a6 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied@redhat.com>
+Date: Wed, 06 Jun 2012 08:58:01 +0000
+Subject: vmware: port vmware driver to new compat API
+
+This is a port of the vmware driver to the new compat API.
+
+Tested-by: Jakob Bornecrantz <jakob@vmware.com>
+Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
+Signed-off-by: Dave Airlie <airlied@redhat.com>
+Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
+---
+diff -ur a/saa/saa.c b/saa/saa.c
+--- a/saa/saa.c 2012-03-08 17:13:16.000000000 +0100
++++ b/saa/saa.c 2012-08-09 01:20:23.000000000 +0200
+@@ -594,7 +594,7 @@
+ * screen private, before calling down to the next CloseScreen.
+ */
+ Bool
+-saa_close_screen(int i, ScreenPtr pScreen)
++saa_close_screen(CLOSE_SCREEN_ARGS_DECL)
+ {
+ struct saa_screen_priv *sscreen = saa_screen(pScreen);
+ struct saa_driver *driver = sscreen->driver;
+@@ -624,7 +624,7 @@
+
+ free(sscreen);
+
+- return (*pScreen->CloseScreen) (i, pScreen);
++ return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS);
+ }
+
+ struct saa_driver *
+diff -ur a/saa/saa.h b/saa/saa.h
+--- a/saa/saa.h 2012-03-08 17:13:16.000000000 +0100
++++ b/saa/saa.h 2012-08-09 01:20:23.000000000 +0200
+@@ -44,6 +44,8 @@
+ #include <damage.h>
+ #include <picturestr.h>
+
++#include "../src/compat-api.h"
++
+ #define SAA_VERSION_MAJOR 0
+ #define SAA_VERSION_MINOR 1
+
+@@ -173,7 +175,7 @@
+ saa_bitmap_to_region(PixmapPtr pPix);
+
+ extern _X_EXPORT Bool
+-saa_close_screen(int i, ScreenPtr pScreen);
++saa_close_screen(CLOSE_SCREEN_ARGS_DECL);
+
+ extern _X_EXPORT Bool
+ saa_gc_reads_destination(DrawablePtr pDrawable, GCPtr pGC);
+Nur in b/src: compat-api.h.
+diff -ur a/src/Makefile.am b/src/Makefile.am
+--- a/src/Makefile.am 2012-03-14 00:06:41.000000000 +0100
++++ b/src/Makefile.am 2012-08-09 01:20:23.000000000 +0200
+@@ -37,6 +37,7 @@
+ vmware_drv_la_SOURCES = \
+ bits2pixels.c \
+ bits2pixels.h \
++ compat-api.h \
+ guest_os.h \
+ includeCheck.h \
+ svga_escape.h \
+diff -ur a/src/vmware.c b/src/vmware.c
+--- a/src/vmware.c 2012-03-21 19:57:59.000000000 +0100
++++ b/src/vmware.c 2012-08-09 01:20:23.000000000 +0200
+@@ -901,8 +901,8 @@
+ pScrn->pScreen->rootDepth),
+ (pointer)(pVMWARE->FbBase + pScrn->fbOffset));
+
+- (*pScrn->EnableDisableFBAccess)(pScrn->pScreen->myNum, FALSE);
+- (*pScrn->EnableDisableFBAccess)(pScrn->pScreen->myNum, TRUE);
++ (*pScrn->EnableDisableFBAccess)(XF86_SCRN_ARG(pScrn), FALSE);
++ (*pScrn->EnableDisableFBAccess)(XF86_SCRN_ARG(pScrn), TRUE);
+ }
+
+ vgaHWProtect(pScrn, FALSE);
+@@ -1018,7 +1018,7 @@
+ }
+
+ static void
+-VMWAREAdjustFrame(int scrnIndex, int x, int y, int flags)
++VMWAREAdjustFrame(ADJUST_FRAME_ARGS_DECL)
+ {
+ /* FIXME */
+ }
+@@ -1089,9 +1089,9 @@
+ }
+
+ static Bool
+-VMWARECloseScreen(int scrnIndex, ScreenPtr pScreen)
++VMWARECloseScreen(CLOSE_SCREEN_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
+ ScreenPtr save = &pVMWARE->ScrnFuncs;
+
+@@ -1119,7 +1119,7 @@
+ pScrn->DriverFunc = NULL;
+ #endif
+
+- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
++ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
+ }
+
+ static Bool
+@@ -1296,16 +1296,14 @@
+ }
+
+ static Bool
+-VMWAREScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
++VMWAREScreenInit(SCREEN_INIT_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn;
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ vgaHWPtr hwp;
+ VMWAREPtr pVMWARE;
+ OptionInfoPtr options;
+ Bool useXinerama = TRUE;
+
+- /* Get the ScrnInfoRec */
+- pScrn = xf86Screens[pScreen->myNum];
+ pVMWARE = VMWAREPTR(pScrn);
+
+
+@@ -1381,7 +1379,7 @@
+ VMWAREModeInit(pScrn, pScrn->currentMode, FALSE);
+
+ /* Set the viewport if supported */
+- VMWAREAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
++ VMWAREAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
+
+ /*
+ * Setup the screen's visuals, and initialise the framebuffer
+@@ -1582,10 +1580,9 @@
+ }
+
+ static Bool
+-VMWARESwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
+-
++VMWARESwitchMode(SWITCH_MODE_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ ScreenPtr pScreen = pScrn->pScreen;
+
+ pScreen->mmWidth = (pScreen->width * VMWARE_INCHTOMM +
+@@ -1597,9 +1594,9 @@
+ }
+
+ static Bool
+-VMWAREEnterVT(int scrnIndex, int flags)
++VMWAREEnterVT(VT_FUNC_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
+
+ /*
+@@ -1616,9 +1613,9 @@
+ }
+
+ static void
+-VMWARELeaveVT(int scrnIndex, int flags)
++VMWARELeaveVT(VT_FUNC_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ VMWAREPtr pVMWARE = VMWAREPTR(pScrn);
+
+ /*
+@@ -1631,17 +1628,18 @@
+ }
+
+ static void
+-VMWAREFreeScreen(int scrnIndex, int flags)
++VMWAREFreeScreen(FREE_SCREEN_ARGS_DECL)
+ {
++ SCRN_INFO_PTR(arg);
+ /*
+ * If the vgahw module is used vgaHWFreeHWRec() would be called
+ * here.
+ */
+- VMWAREFreeRec(xf86Screens[scrnIndex]);
++ VMWAREFreeRec(pScrn);
+ }
+
+ static ModeStatus
+-VMWAREValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
++VMWAREValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
+ {
+ return MODE_OK;
+ }
+diff -ur a/src/vmware_common.h b/src/vmware_common.h
+--- a/src/vmware_common.h 2012-03-08 17:13:16.000000000 +0100
++++ b/src/vmware_common.h 2012-08-09 01:20:23.000000000 +0200
+@@ -32,6 +32,8 @@
+ #include <X11/extensions/panoramiXproto.h>
+ #include <xf86.h>
+
++#include "compat-api.h"
++
+ xXineramaScreenInfo *
+ VMWAREParseTopologyString(ScrnInfoPtr pScrn,
+ const char *topology,
+diff -ur a/src/vmware.h b/src/vmware.h
+--- a/src/vmware.h 2012-03-08 17:13:16.000000000 +0100
++++ b/src/vmware.h 2012-08-09 01:20:23.000000000 +0200
+@@ -177,7 +177,7 @@
+ #define VMWAREPTR(p) ((VMWAREPtr)((p)->driverPrivate))
+
+ static __inline ScrnInfoPtr infoFromScreen(ScreenPtr s) {
+- return xf86Screens[s->myNum];
++ return xf86ScreenToScrn(s);
+ }
+
+ #define MIN(a,b) ((a)<(b)?(a):(b))
+diff -ur a/vmwgfx/vmwgfx_dri2.c b/vmwgfx/vmwgfx_dri2.c
+--- a/vmwgfx/vmwgfx_dri2.c 2012-03-08 17:13:16.000000000 +0100
++++ b/vmwgfx/vmwgfx_dri2.c 2012-08-09 01:20:23.000000000 +0200
+@@ -83,7 +83,7 @@
+ dri2_do_create_buffer(DrawablePtr pDraw, DRI2Buffer2Ptr buffer, unsigned int format)
+ {
+ ScreenPtr pScreen = pDraw->pScreen;
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ BufferPrivatePtr private = buffer->driverPrivate;
+ PixmapPtr pPixmap;
+@@ -371,7 +371,7 @@
+ Bool
+ xorg_dri2_init(ScreenPtr pScreen)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ DRI2InfoRec dri2info;
+ int major, minor;
+diff -ur a/vmwgfx/vmwgfx_driver.c b/vmwgfx/vmwgfx_driver.c
+--- a/vmwgfx/vmwgfx_driver.c 2012-03-08 17:13:16.000000000 +0100
++++ b/vmwgfx/vmwgfx_driver.c 2012-08-09 01:20:23.000000000 +0200
+@@ -107,14 +107,13 @@
+ */
+
+ static Bool drv_pre_init(ScrnInfoPtr pScrn, int flags);
+-static Bool drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc,
+- char **argv);
+-static Bool drv_switch_mode(int scrnIndex, DisplayModePtr mode, int flags);
+-static void drv_adjust_frame(int scrnIndex, int x, int y, int flags);
+-static Bool drv_enter_vt(int scrnIndex, int flags);
+-static void drv_leave_vt(int scrnIndex, int flags);
+-static void drv_free_screen(int scrnIndex, int flags);
+-static ModeStatus drv_valid_mode(int scrnIndex, DisplayModePtr mode, Bool verbose,
++static Bool drv_screen_init(SCREEN_INIT_ARGS_DECL);
++static Bool drv_switch_mode(SWITCH_MODE_ARGS_DECL);
++static void drv_adjust_frame(ADJUST_FRAME_ARGS_DECL);
++static Bool drv_enter_vt(VT_FUNC_ARGS_DECL);
++static void drv_leave_vt(VT_FUNC_ARGS_DECL);
++static void drv_free_screen(FREE_SCREEN_ARGS_DECL);
++static ModeStatus drv_valid_mode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose,
+ int flags);
+
+ extern void xorg_tracker_set_functions(ScrnInfoPtr scrn);
+@@ -133,7 +132,7 @@
+ * Internal function definitions
+ */
+
+-static Bool drv_close_screen(int scrnIndex, ScreenPtr pScreen);
++static Bool drv_close_screen(CLOSE_SCREEN_ARGS_DECL);
+
+ /*
+ * Internal functions
+@@ -633,7 +632,7 @@
+
+ void xorg_flush(ScreenPtr pScreen)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ PixmapPtr pixmap = NULL;
+@@ -708,14 +707,13 @@
+ free(pixmaps);
+ }
+
+-static void drv_block_handler(int i, pointer blockData, pointer pTimeout,
+- pointer pReadmask)
++static void drv_block_handler(BLOCKHANDLER_ARGS_DECL)
+ {
+- ScreenPtr pScreen = screenInfo.screens[i];
+- modesettingPtr ms = modesettingPTR(xf86Screens[pScreen->myNum]);
++ SCREEN_PTR(arg);
++ modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen));
+
+ vmwgfx_swap(ms, pScreen, BlockHandler);
+- pScreen->BlockHandler(i, blockData, pTimeout, pReadmask);
++ pScreen->BlockHandler(BLOCKHANDLER_ARGS);
+ vmwgfx_swap(ms, pScreen, BlockHandler);
+
+ vmwgfx_flush_dri2(pScreen);
+@@ -725,7 +723,7 @@
+ static Bool
+ drv_create_screen_resources(ScreenPtr pScreen)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ Bool ret;
+
+@@ -735,9 +733,9 @@
+ if (!ret)
+ return ret;
+
+- drv_adjust_frame(pScrn->scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
++ drv_adjust_frame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
+
+- return drv_enter_vt(pScreen->myNum, 1);
++ return drv_enter_vt(VT_FUNC_ARGS);
+ }
+
+ static Bool
+@@ -773,7 +771,7 @@
+ static Bool
+ vmwgfx_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[screen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ modesettingPtr ms = modesettingPTR(pScrn);
+@@ -804,7 +802,7 @@
+ static Bool
+ vmwgfx_use_hw_cursor(ScreenPtr screen, CursorPtr cursor)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[screen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(screen);
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+ xf86CursorInfoPtr cursor_info = xf86_config->cursor_info;
+ modesettingPtr ms = modesettingPTR(pScrn);
+@@ -902,9 +900,9 @@
+
+
+ static Bool
+-drv_screen_init(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
++drv_screen_init(SCREEN_INIT_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ VisualPtr visual;
+
+@@ -1088,9 +1086,9 @@
+ }
+
+ static void
+-drv_adjust_frame(int scrnIndex, int x, int y, int flags)
++drv_adjust_frame(ADJUST_FRAME_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
+ xf86OutputPtr output = config->output[config->compat_output];
+ xf86CrtcPtr crtc = output->crtc;
+@@ -1104,15 +1102,16 @@
+ }
+
+ static void
+-drv_free_screen(int scrnIndex, int flags)
++drv_free_screen(FREE_SCREEN_ARGS_DECL)
+ {
+- drv_free_rec(xf86Screens[scrnIndex]);
++ SCRN_INFO_PTR(arg);
++ drv_free_rec(pScrn);
+ }
+
+ static void
+-drv_leave_vt(int scrnIndex, int flags)
++drv_leave_vt(VT_FUNC_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+ modesettingPtr ms = modesettingPTR(pScrn);
+
+ vmwgfx_cursor_bypass(ms->fd, 0, 0);
+@@ -1130,9 +1129,9 @@
+ * This gets called when gaining control of the VT, and from ScreenInit().
+ */
+ static Bool
+-drv_enter_vt(int scrnIndex, int flags)
++drv_enter_vt(VT_FUNC_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+
+ if (!drv_set_master(pScrn))
+ return FALSE;
+@@ -1144,17 +1143,17 @@
+ }
+
+ static Bool
+-drv_switch_mode(int scrnIndex, DisplayModePtr mode, int flags)
++drv_switch_mode(SWITCH_MODE_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ SCRN_INFO_PTR(arg);
+
+ return xf86SetSingleMode(pScrn, mode, RR_Rotate_0);
+ }
+
+ static Bool
+-drv_close_screen(int scrnIndex, ScreenPtr pScreen)
++drv_close_screen(CLOSE_SCREEN_ARGS_DECL)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+
+ if (ms->cursor) {
+@@ -1166,7 +1165,7 @@
+ xorg_dri2_close(pScreen);
+
+ if (pScrn->vtSema)
+- pScrn->LeaveVT(scrnIndex, 0);
++ pScrn->LeaveVT(VT_FUNC_ARGS);
+
+ pScrn->vtSema = FALSE;
+
+@@ -1180,11 +1179,11 @@
+ if (ms->xat)
+ xa_tracker_destroy(ms->xat);
+
+- return (*pScreen->CloseScreen) (scrnIndex, pScreen);
++ return (*pScreen->CloseScreen) (CLOSE_SCREEN_ARGS);
+ }
+
+ static ModeStatus
+-drv_valid_mode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
++drv_valid_mode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags)
+ {
+ return MODE_OK;
+ }
+diff -ur a/vmwgfx/vmwgfx_driver.h b/vmwgfx/vmwgfx_driver.h
+--- a/vmwgfx/vmwgfx_driver.h 2012-03-08 17:13:16.000000000 +0100
++++ b/vmwgfx/vmwgfx_driver.h 2012-08-09 01:20:23.000000000 +0200
+@@ -46,6 +46,7 @@
+ #include <xa_tracker.h>
+ #include <xf86Module.h>
+
++#include "../src/compat-api.h"
+ #ifdef DRI2
+ #include <dri2.h>
+ #if (!defined(DRI2INFOREC_VERSION) || (DRI2INFOREC_VERSION < 3))
+@@ -118,9 +119,9 @@
+ ScreenBlockHandlerProcPtr saved_BlockHandler;
+ CreateScreenResourcesProcPtr saved_CreateScreenResources;
+ CloseScreenProcPtr saved_CloseScreen;
+- Bool (*saved_EnterVT)(int, int);
+- void (*saved_LeaveVT)(int, int);
+- void (*saved_AdjustFrame)(int, int, int, int);
++ Bool (*saved_EnterVT)(VT_FUNC_ARGS_DECL);
++ void (*saved_LeaveVT)(VT_FUNC_ARGS_DECL);
++ void (*saved_AdjustFrame)(ADJUST_FRAME_ARGS_DECL);
+ Bool (*saved_UseHWCursor)(ScreenPtr, CursorPtr);
+ Bool (*saved_UseHWCursorARGB)(ScreenPtr, CursorPtr);
+
+diff -ur a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
+--- a/vmwgfx/vmwgfx_saa.c 2012-03-21 19:57:59.000000000 +0100
++++ b/vmwgfx/vmwgfx_saa.c 2012-08-09 01:20:23.000000000 +0200
+@@ -460,7 +460,7 @@
+ struct vmwgfx_saa *vsaa =
+ to_vmwgfx_saa(saa_get_driver(pScreen));
+ struct _WsbmListHead *list, *next;
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+
+ if (!pScrn->vtSema)
+ return;
+@@ -1199,7 +1199,7 @@
+ struct vmwgfx_saa *vsaa = to_vmwgfx_saa(driver);
+ struct saa_pixmap *spix = saa_get_saa_pixmap(pixmap);
+ struct vmwgfx_saa_pixmap *vpix = to_vmwgfx_saa_pixmap(spix);
+- ScrnInfoPtr pScrn = xf86Screens[vsaa->pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(vsaa->pScreen);
+
+ /*
+ * Make dri2 drawables up to date, or add them to the flush list
+diff -ur a/vmwgfx/vmwgfx_tex_video.c b/vmwgfx/vmwgfx_tex_video.c
+--- a/vmwgfx/vmwgfx_tex_video.c 2012-03-08 17:13:16.000000000 +0100
++++ b/vmwgfx/vmwgfx_tex_video.c 2012-08-09 01:20:23.000000000 +0200
+@@ -638,7 +638,7 @@
+ DrawablePtr pDraw)
+ {
+ struct xorg_xv_port_priv *pPriv = (struct xorg_xv_port_priv *) data;
+- ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
++ ScreenPtr pScreen = xf86ScrnToScreen(pScrn);
+ PixmapPtr pPixmap;
+ INT32 x1, x2, y1, y2;
+ BoxRec dstBox;
+@@ -732,7 +732,7 @@
+ static XF86VideoAdaptorPtr
+ xorg_setup_textured_adapter(ScreenPtr pScreen)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ XF86VideoAdaptorPtr adapt;
+ XF86AttributePtr attrs;
+@@ -799,7 +799,7 @@
+ void
+ xorg_xv_init(ScreenPtr pScreen)
+ {
+- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ modesettingPtr ms = modesettingPTR(pScrn);
+ XF86VideoAdaptorPtr *adaptors, *new_adaptors = NULL;
+ XF86VideoAdaptorPtr textured_adapter = NULL, overlay_adaptor = NULL;
diff --git a/x11-drivers/xf86-video-vmware/xf86-video-vmware-12.0.2-r1.ebuild b/x11-drivers/xf86-video-vmware/xf86-video-vmware-12.0.2-r1.ebuild
new file mode 100644
index 000000000000..7513dd70ad0e
--- /dev/null
+++ b/x11-drivers/xf86-video-vmware/xf86-video-vmware-12.0.2-r1.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-vmware/xf86-video-vmware-12.0.2-r1.ebuild,v 1.1 2012/08/08 23:33:08 chithanh Exp $
+
+EAPI=4
+
+XORG_DRI=always
+inherit xorg-2
+
+DESCRIPTION="VMware SVGA video driver"
+KEYWORDS="~amd64 ~x86 ~x86-fbsd"
+IUSE=""
+
+RDEPEND="x11-libs/libdrm[libkms,video_cards_vmware]
+ media-libs/mesa[xa]"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-xorg-server-1.13.patch
+)