diff --git a/app-emulation/vmware-modules/Manifest b/app-emulation/vmware-modules/Manifest
new file mode 100644
index 000000000..4f8ab333e
--- /dev/null
+++ b/app-emulation/vmware-modules/Manifest
@@ -0,0 +1,5 @@
+AUX 1.0.0.26-makefile-include.patch 2873 RMD160 2313761dc064d066ab912af294fc95bb462ff05e SHA1 2deae503f8c169c23b228981593996b03367b609 SHA256 d870c2f507c430adce76c251fa1c107cce512b38eaeacda9f1ffee485c02c02c
+AUX 1.0.0.26-makefile-kernel-dir.patch 2129 RMD160 885b638c78cb0663d0d55682bafd453c6122fe17 SHA1 9a08768a9923d8259346f89ae78deae878b68df9 SHA256 fd583c13433bb3ddc64a21af6c472e3c6a2747990118a22881d2b48c16e5655f
+DIST vmware-modules-1.0.0.26.amd64.tar.bz2 630368 RMD160 d3321edf23598493a937d71c9d3200921b05a13e SHA1 eed55d8b267af74d05e1a3eab150fa35cbfdf1ba SHA256 8fd323c39c62bf4995ab34b7b544344ac79740d4bd647bf89cd7fb24a6cdf898
+DIST vmware-modules-1.0.0.26.x86.tar.bz2 630339 RMD160 c04ec66c0fda191337a35f9447776584ca34ffff SHA1 2329f085405a79121a973f125564ca9d99a3c9cb SHA256 08df4bfb19cda7ba5eb4cf11b7f8a88bd8750db712e45116eb0a0d9895644a82
+EBUILD vmware-modules-1.0.0.26.ebuild 1909 RMD160 94ee8109ff1b9b82181899707c012a2563b3128c SHA1 f55b8fd1eba2ac24ff38968d014607452ffe0b77 SHA256 4af1ff0bc768dd81b2776e1696fad59bcce49c66094a9c7f8010547bf5af8466
diff --git a/app-emulation/vmware-modules/files/1.0.0.26-makefile-include.patch b/app-emulation/vmware-modules/files/1.0.0.26-makefile-include.patch
new file mode 100644
index 000000000..a19dc2ed2
--- /dev/null
+++ b/app-emulation/vmware-modules/files/1.0.0.26-makefile-include.patch
@@ -0,0 +1,60 @@
+diff -Naur old/vmblock-only/Makefile.kernel work/vmblock-only/Makefile.kernel
+--- old/vmblock-only/Makefile.kernel 2010-01-23 01:09:08.000000000 +0000
++++ work/vmblock-only/Makefile.kernel 2010-02-08 16:25:28.000000000 +0000
+@@ -19,7 +19,7 @@
+
+ INCLUDE += -I$(SRCROOT)/include
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/epoll.c, -DVMW_HAVE_EPOLL, )
+diff -Naur old/vmci-only/Makefile.kernel work/vmci-only/Makefile.kernel
+--- old/vmci-only/Makefile.kernel 2010-01-23 04:19:55.000000000 +0000
++++ work/vmci-only/Makefile.kernel 2010-02-08 16:26:16.000000000 +0000
+@@ -21,7 +21,7 @@
+
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/epoll.c, -DVMW_HAVE_EPOLL, )
+
+diff -Naur old/vmmon-only/Makefile.kernel work/vmmon-only/Makefile.kernel
+--- old/vmmon-only/Makefile.kernel 2010-01-23 04:19:52.000000000 +0000
++++ work/vmmon-only/Makefile.kernel 2010-02-08 16:26:29.000000000 +0000
+@@ -22,7 +22,7 @@
+ INCLUDE := -I$(SRCROOT)/include -I$(SRCROOT)/common -I$(SRCROOT)/linux \
+ -I$(SRCROOT)/vmcore
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/nopage1.c, -DVMW_NOPAGE_261, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/autoconf/skas1.c, -DVMW_SKAS_MMAP, )
+diff -Naur old/vmnet-only/Makefile.kernel work/vmnet-only/Makefile.kernel
+--- old/vmnet-only/Makefile.kernel 2010-01-23 04:19:54.000000000 +0000
++++ work/vmnet-only/Makefile.kernel 2010-02-08 16:27:34.000000000 +0000
+@@ -19,7 +19,7 @@
+
+ INCLUDE := -I$(SRCROOT)
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/sk_alloc.c,-DVMW_HAVE_SK_ALLOC_WITH_PROTO, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(SRCROOT)/netdev_has_net.c,-DVMW_NETDEV_HAS_NET, )
+diff -Naur old/vsock-only/Makefile.kernel work/vsock-only/Makefile.kernel
+--- old/vsock-only/Makefile.kernel 2010-01-23 01:09:09.000000000 +0000
++++ work/vsock-only/Makefile.kernel 2010-02-08 16:28:22.000000000 +0000
+@@ -25,7 +25,7 @@
+ INCLUDE += -I$(SRCROOT)/linux
+ INCLUDE += -I$(SRCROOT)/common
+
+-EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE)
++EXTRA_CFLAGS := $(CC_OPTS) $(INCLUDE) $(LINUXINCLUDE)
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/epoll.c, -DVMW_HAVE_EPOLL, )
+ EXTRA_CFLAGS += $(call vm_check_build, $(AUTOCONF_DIR)/setnice.c, -DVMW_HAVE_SET_USER_NICE, )
+
diff --git a/app-emulation/vmware-modules/files/1.0.0.26-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/1.0.0.26-makefile-kernel-dir.patch
new file mode 100644
index 000000000..8df4d8694
--- /dev/null
+++ b/app-emulation/vmware-modules/files/1.0.0.26-makefile-kernel-dir.patch
@@ -0,0 +1,80 @@
+diff --git a/vmblock-only/Makefile b/vmblock-only/Makefile
+index 0a9ffd6..4aa09e8 100644
+--- a/vmblock-only/Makefile
++++ b/vmblock-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmblock
+ PRODUCT := @PRODUCT@
+diff --git a/vmci-only/Makefile b/vmci-only/Makefile
+index 0a6c9c6..6cd0b6d 100644
+--- a/vmci-only/Makefile
++++ b/vmci-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmci
+ PRODUCT := @PRODUCT@
+diff --git a/vmmon-only/Makefile b/vmmon-only/Makefile
+index d26e58c..f8a40f4 100644
+--- a/vmmon-only/Makefile
++++ b/vmmon-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmmon
+ PRODUCT := @PRODUCT@
+diff --git a/vmnet-only/Makefile b/vmnet-only/Makefile
+index 4cabc30..568271a 100644
+--- a/vmnet-only/Makefile
++++ b/vmnet-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vmnet
+ PRODUCT := @PRODUCT@
+diff --git a/vsock-only/Makefile b/vsock-only/Makefile
+index a69bc22..8a74856 100644
+--- a/vsock-only/Makefile
++++ b/vsock-only/Makefile
+@@ -29,9 +29,9 @@ SRCROOT = .
+ VM_UNAME = $(shell uname -r)
+
+ # Header directory for the running kernel
+-HEADER_DIR = /lib/modules/$(VM_UNAME)/build/include
++HEADER_DIR = $(KERNEL_DIR)
+
+-BUILD_DIR = $(HEADER_DIR)/..
++BUILD_DIR = $(KBUILD_OUTPUT)
+
+ DRIVER := vsock
+ PRODUCT := ws
diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.26.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.26.ebuild
new file mode 100644
index 000000000..d5e3dd845
--- /dev/null
+++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.26.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.25.ebuild,v 1.5 2010/01/02 20:07:47 vadimk Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic linux-mod
+
+DESCRIPTION="VMware kernel modules"
+HOMEPAGE="http://www.vmware.com/"
+
+SRC_URI="x86? (
+ http://dev.pentoo.ch/~grimmlin/vmware/${P}.x86.tar.bz2
+ mirror://gentoo/${P}.x86.tar.bz2
+ http://dev.gentoo.org/~vadimk/${P}.x86.tar.bz2
+ )
+ amd64? (
+ http://dev.pentoo.ch/~grimmlin/vmware/${P}.amd64.tar.bz2
+ mirror://gentoo/${P}.amd64.tar.bz2
+ http://dev.gentoo.org/~vadimk/${P}.amd64.tar.bz2
+ )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"
+
+pkg_setup() {
+ linux-mod_pkg_setup
+
+ VMWARE_VER="VME_V70" # THIS VALUE IS JUST A PLACE HOLDER
+ VMWARE_GROUP=${VMWARE_GROUP:-vmware}
+
+ VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
+ VMWARE_MOD_DIR="${PN}-${PVR}"
+
+ BUILD_TARGETS="auto-build VMWARE_VER=${VMWARE_VER} KERNEL_DIR=${KERNEL_DIR} KBUILD_OUTPUT=${KV_OUT_DIR}"
+
+ enewgroup "${VMWARE_GROUP}"
+ filter-flags -mfpmath=sse
+
+ for mod in ${VMWARE_MODULE_LIST}; do
+ MODULE_NAMES="${MODULE_NAMES} ${mod}(misc:${S}/${mod}-only)"
+ done
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ for mod in ${VMWARE_MODULE_LIST}; do
+ unpack ./"${P}"/${mod}.tar
+ done
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-makefile-kernel-dir.patch"
+ epatch "${FILESDIR}/${PV}-makefile-include.patch"
+}
+
+src_install() {
+ # this adds udev rules for vmmon*
+ if [[ -n "`echo ${VMWARE_MODULE_LIST} | grep vmmon`" ]];
+ then
+ dodir /etc/udev/rules.d
+ echo 'KERNEL=="vmmon*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die
+ echo 'KERNEL=="vmnet*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/etc/udev/rules.d/60-vmware.rules" || die
+ fi
+
+ linux-mod_src_install
+}
diff --git a/app-emulation/vmware-workstation/Manifest b/app-emulation/vmware-workstation/Manifest
new file mode 100644
index 000000000..b5ec2c95f
--- /dev/null
+++ b/app-emulation/vmware-workstation/Manifest
@@ -0,0 +1,18 @@
+AUX 7.0.1.227600/vmware-player-app.py.patch 2868 RMD160 b3a57a54dacb2cd82b951eafd5bce3b1126dad54 SHA1 41ce4f8788b43ea955f70faf121f75cbecee0467 SHA256 ae669b8799a0eb726b1a8345c5854dfc4758aca5c932c404e1fccd51d6faf818
+AUX 7.0.1.227600/vmware-player-extras.py.patch 426 RMD160 458d95094d2e47726221ab427486b263b87e4297 SHA1 e41c36cfe150380aceafd1768e9e159fb4e1813f SHA256 1047cdc79d4bc138deaf809f191bdde69c4a5a8ed6ab5b595457a341ecb68abb
+AUX 7.0.1.227600/vmware-player.py.patch 2936 RMD160 6b9957799b3571f5382975c4d78bc3db7d16e666 SHA1 b32f9e4c2d2213872a7d8f88754a8552b113567f SHA256 fa711634a038d313769cf5d5180ca96bfb3ba18f392f6c0dd0672a4b4f7d6c9c
+AUX 7.0.1.227600/vmware-vix.py.patch 795 RMD160 d230fd802e3f41afd1946aaf13637806923ee860 SHA1 bb3d166726512cd5d8515a87426968b682b342e5 SHA256 34be7416e10ceed19845b4f45756c7e99d1905967ac716b8a8e9e61d5270f4fa
+AUX 7.0.1.227600/vmware-workstation.py.patch 3194 RMD160 29ad4872c9269836efe43c3a2b41562d315d9ff9 SHA1 9b2fe24f045d695bb6afa55fb2dae407e39b5662 SHA256 0cd03b9b415cf1289b2da57d76cf96485c77b05204c722094277cba24571c734
+AUX 90vmware-workstation 106 RMD160 471fb03d54bb48c651d4543f1c8ece1bb9b40c0a SHA1 3db7ec2a3b37a84328bf3d481a58b42499ef520b SHA256 c8f7143551f516b901143e60fc74e822ca3d235477d1c2a135bb36cbc639cf1e
+AUX helpers/module_patcher.sh 174 RMD160 0b2d1ee14443ec188546b090ae2c5e6efd132026 SHA1 f00ea5d03430be4969834bda822ed2865ef6e079 SHA256 1e63240f7e21e119c8e0b083f540fdde83fc22d781f3abe43927713a464898ea
+AUX helpers/unbundler.sh 1828 RMD160 d5bb43628d105c4372fa1fe7e7ebac29300fa91f SHA1 ed4b2645369b63e1cb6e322d412eb2ede1cbbdcd SHA256 4e71dd96f5136c1eb98be5e1184b9ec48ed9ac7935fa1defd94d501cef05eb78
+AUX helpers/vmware-config.sh 497 RMD160 04addab6d99bf2c984f855a97b935ca8e0e584d8 SHA1 935eb3f565cebdca806d20e852a4bc75c7bc420b SHA256 72712959b26b22bfe8118561cd7b0751973d2a9dd8c2b15379cd42dc8a4ac246
+AUX vmware-player.desktop 599 RMD160 a5a9897671da69c4706ba412d9a041edfd13a9b7 SHA1 12af70f7039b19838e298d1949df28b1b8d407a6 SHA256 b967f2e6dba531613498a2dea130f557fc366e869876aa63ba3ae97f5ff59c54
+AUX vmware-workstation-7.0.1.227600-installer.patch 8007 RMD160 6db58cf39b1fd35074cc305b809740efd8ba6dd0 SHA1 5f085b257d6db09266c6bc9099c7fd29d41b3753 SHA256 ce7bbcdd1e802d8f964301cd10ba29a90aa07e709388d659587516c258abb163
+AUX vmware-workstation-7.0.rc 1444 RMD160 cfc983d5606fba3972c89e9094f0f6af89a7a2fb SHA1 fc0ed37ffa96106febb6d7e86e886cbd451481af SHA256 86af02f8d8da8c6acc7a190eef5368782455bc520be1cf3d4fd18d5d312d4bab
+AUX vmware-workstation.desktop 605 RMD160 256b59a1e52b65279ef38b3dcf52c43a34090807 SHA1 8f8c1fded85070be0532e33f1bdc05425e33bfb1 SHA256 ae2f572200a16a1e1222e282268ae138588c0e7576045a584c1d17f54f379f3e
+AUX vmware-workstation.rc 1862 RMD160 000c71ee5c62edc27d3df3f23286e1fe8490516e SHA1 cf1db60598d0d2fe44260f7387537ec1babf3a52 SHA256 76e6ea8c199a4dced79a75a0346360714941ef192b61e4610c6229e071d64782
+AUX vmware-workstation.xml 1592 RMD160 0d7e9ed13ebb3c73dd847e95fa95499296609e8c SHA1 02db2ee7ca0abb8b8793c9f56d858bb08c1c715f SHA256 56aafee80ad705e8d832f8853c36d763d37b87d1cb132a41c50eb63085ae854d
+DIST VMware-Workstation-Full-7.0.1-227600.i386.bundle 286244988 RMD160 9db7f06a3662b4b474cddb61675e36071eb16711 SHA1 f6d0789afa7927ca154973a071603a0bd098e697 SHA256 cc003ff5a811ace83172712e435047d41f0e883320d7d0798e69940389e31d57
+DIST VMware-Workstation-Full-7.0.1-227600.x86_64.bundle 292113593 RMD160 ac519500f4b3cfc2849c8a3f5ba4ddd02db0f9a3 SHA1 a901c45a2a02678b0d1722e8f27152c3af12a7ac SHA256 e188381d0569e8cc1f652df8d12f4572e207e40dd9c726af02d09c42503551d3
+EBUILD vmware-workstation-7.0.1.227600.ebuild 5590 RMD160 b2d449c5e8eb3b598e328a19382eb2e6f385e04e SHA1 ef09b00ddc04e58508d6187d3176f59ba8ab6fc7 SHA256 db0f7289f1dd9fb3486d81ea2ae7334c92de1ffb0e3ef4c5641e11a9df461ad8
diff --git a/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player-app.py.patch b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player-app.py.patch
new file mode 100644
index 000000000..b3d97a240
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player-app.py.patch
@@ -0,0 +1,70 @@
+--- vmware-player-app.py.orig 2010-02-04 19:50:15.000000000 +0100
++++ vmware-player-app.py 2010-02-27 21:05:08.000000000 +0100
+@@ -6,7 +6,8 @@
+
+ GCONF_DEFAULTS = 'xml:readwrite:/etc/gconf/gconf.xml.defaults'
+ DEST = LIBDIR/'vmware'
+-CONFIG = DEST/'setup/vmware-config'
++import os
++CONFIG=path(os.environ['WORKDIR'])/'vmware-config.sh'
+ CUPSLIBDIR = LIBDIR/'cups'
+ SETTINGS = \
+ { 'libdir': DEST,
+@@ -25,7 +26,7 @@
+
+ # Player and Workstation both depend on some configuration living
+ # in /etc/vmware
+-ETCDIR = Destination('/etc/vmware')
++ETCDIR = SYSCONFDIR/'vmware'
+
+ class PlayerApp(Installer):
+ def PreTransactionInstall(self, old, new, upgrade):
+@@ -106,13 +107,14 @@
+ not themeIndex.exists() and self.AddTarget('File', 'files/index.theme', themeIndex)
+
+ # Services
+- self.RegisterService(name='vmware', src='etc/init.d/services.sh', start=19, stop=8)
++ self.AddTarget('File', 'etc/init.d/services.sh', ETCDIR/'init.d/vmware')
++ # self.RegisterService(name='vmware', src='etc/init.d/services.sh', start=19, stop=8)
+
+ # modprobe.d script. Only install this on systems where modprobe.d
+ # exists.
+ if path('/etc/modprobe.d').exists():
+ self.AddTarget('File', 'etc/modprobe.d/modprobe-vmware-fuse.conf',
+- '/etc/modprobe.d/vmware-fuse.conf')
++ SYSCONFDIR/'modprobe.d/vmware-fuse.conf')
+
+ def _scriptRunnable(self, script):
+ """ Returns True if the script exists and is in a runnable state """
+@@ -178,7 +180,7 @@
+ for module in modules:
+ for ext in ('o', 'ko'):
+ mod = '%s.%s' % (module, ext)
+- (base/mod).remove(ignore_errors=True)
++# (base/mod).remove(ignore_errors=True)
+
+ # Make sure we kill all processes that should not be running!
+ self._killVMwareProcesses()
+@@ -228,9 +230,10 @@
+ for key, val in SETTINGS.items():
+ self.RunCommand(CONFIG, '-s', key, val)
+
+- bootstrap = ETCDIR/'bootstrap'
++ import os
++ bootstrap = path(os.environ['WORKDIR'])/'vmware-confdir/bootstrap'
+ # Create the bootstrap file.
+- bootstrap.unlink(ignore_errors=True)
++ #bootstrap.unlink(ignore_errors=True)
+ # Fill it.
+ for i in ('PREFIX', 'BINDIR', 'SBINDIR', 'LIBDIR', 'DATADIR',
+ 'SYSCONFDIR', 'DOCDIR', 'MANDIR', 'INCLUDEDIR', 'INITDIR',
+@@ -343,7 +346,8 @@
+
+ def _isGConfUsable(self):
+ """ Return True if GConf settings can be configured, otherwise False """
+- return self.RunCommand('gconftool-2', '--help', ignoreErrors=True, noLogging=True).retCode == 0
++ return False
++# return self.RunCommand('gconftool-2', '--help', ignoreErrors=True, noLogging=True).retCode == 0
+
+ def _configureVMStreamingHandlers(self):
+ """ Configures handlers for vm:// and vms:// used for VM streaming """
diff --git a/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player-extras.py.patch b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player-extras.py.patch
new file mode 100644
index 000000000..eb9e72305
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player-extras.py.patch
@@ -0,0 +1,14 @@
+diff --git a/vmware-player-extras.py b/vmware-player-extras.py
+index 21595b1..e8adf08 100644
+--- a/vmware-player-extras.py
++++ b/vmware-player-extras.py
+@@ -6,7 +6,8 @@ VMware Player Extras component installer.
+
+ DEST = LIBDIR/'vmware'
+ SETTINGS = { 'vmware.fullpath': BINDIR/'vmware', }
+-CONF = DEST/'setup/vmware-config'
++import os
++CONF = path(os.environ['WORKDIR'])/'vmware-config.sh'
+
+
+ class PlayerExtras(Installer):
diff --git a/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player.py.patch b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player.py.patch
new file mode 100644
index 000000000..49306c33f
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-player.py.patch
@@ -0,0 +1,64 @@
+diff --git a/vmware-player.py b/vmware-player.py
+index bee22df..d06cca9 100644
+--- a/vmware-player.py
++++ b/vmware-player.py
+@@ -6,7 +6,8 @@ VMware Player component installer.
+
+ GCONF_DEFAULTS = 'xml:readwrite:/etc/gconf/gconf.xml.defaults'
+ DEST = LIBDIR/'vmware'
+-CONFIG = DEST/'setup/vmware-config'
++import os
++CONFIG = path(os.environ['WORKDIR'])/'vmware-config.sh'
+ CUPSLIBDIR = LIBDIR/'cups'
+ # XXX: LIBDIR should be properly calculated, to make this cleaner
+ if (PREFIX/'lib64/cups').exists():
+@@ -84,12 +85,12 @@ class Player(Installer):
+ ret, kvers = output('uname', '-r')
+ kvers = kvers.strip()
+ modules = ('vmmon', 'vmnet', 'vmblock', 'vmci', 'vsock')
+- base = path('/lib/modules/%s/misc' % kvers)
++ base = path('/this/path/doesnt/exist/lib/modules/%s/misc' % kvers)
+
+ for module in modules:
+ for ext in ('o', 'ko'):
+ mod = '%s.%s' % (module, ext)
+- (base/mod).remove(ignore_errors=True)
++ # (base/mod).remove(ignore_errors=True)
+
+ def PreUninstall(self, old, new, upgrade):
+ script = INITSCRIPTDIR/'vmware'
+@@ -156,8 +157,8 @@ class Player(Installer):
+ def PostTransactionInstall(self, old, new, upgrade):
+ if ENV.get('VMWARE_SKIP_MODULES'):
+ log.info('Skipping kernel module installation')
+- elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
+- log.info('Successfully installed kernel modules')
++ # elif run(BINDIR/'vmware-modconfig', '--console', '--install-all') == 0:
++ # log.info('Successfully installed kernel modules')
+ else:
+ log.info('Unable to install kernel modules')
+
+@@ -189,8 +190,8 @@ class Player(Installer):
+ for handler in ('vm', 'vms'):
+ for gconfType, key, value in settings:
+ key = key % handler
+- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+- '--type', gconfType, '--set', key, value)
++ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
++ # '--type', gconfType, '--set', key, value)
+
+ # Instruct all gconfd daemons to reload.
+ run('killall', '-HUP', 'gconfd-2')
+@@ -200,9 +201,9 @@ class Player(Installer):
+ def _deconfigureVMStreamingHandlers(self):
+ """ Deconfigures the handlers for vm:// and vms:// used for VM streaming"""
+ def deconfigureGConf():
+- for handler in ('vm', 'vms'):
+- run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
+- '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
++ # for handler in ('vm', 'vms'):
++ # run('gconftool-2', '--direct', '--config-source', GCONF_DEFAULTS,
++ # '--recursive-unset', '/desktop/gnome/url-handlers/%s' % handler)
+
+ # Instruct all gconfd daemons to reload.
+ run('killall', '-HUP', 'gconfd-2')
diff --git a/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-vix.py.patch b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-vix.py.patch
new file mode 100644
index 000000000..beb2586de
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-vix.py.patch
@@ -0,0 +1,21 @@
+--- vmware-vix.py.orig 2010-02-04 19:50:56.000000000 +0100
++++ vmware-vix.py 2010-02-05 02:17:54.000000000 +0100
+@@ -6,7 +6,8 @@
+ DEST = LIBDIR/'vmware-vix'
+ SETTINGS = { 'vmware.fullpath': BINDIR/'vmware',
+ 'vix.libdir': DEST, }
+-CONF = DEST/'setup/vmware-config'
++import os
++CONF = path(os.environ['WORKDIR'])/'vmware-config.sh'
+
+ class VIX(Installer):
+ def PreTransactionInstall(self, old, new, upgrade):
+@@ -29,7 +30,7 @@
+ for key, val in SETTINGS.items():
+ self.RunCommand(CONF, '-s', key, val)
+ # Add link to deprecated uninstall mechanism to catch downgrades
+- self.AddUninstallLinks('vix')
++ # self.AddUninstallLinks('vix')
+
+ def PreUninstall(self, old, new, upgrade):
+ # XXX: VIX may have been removed out from underneath us if
diff --git a/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-workstation.py.patch b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-workstation.py.patch
new file mode 100644
index 000000000..766e86ec4
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/7.0.1.227600/vmware-workstation.py.patch
@@ -0,0 +1,79 @@
+--- vmware-workstation.py.orig 2010-02-04 18:50:30.000000000 +0000
++++ vmware-workstation.py 2010-02-25 18:25:37.000000000 +0000
+@@ -4,11 +4,12 @@
+ VMware Workstation component installer.
+ """
+ DEST = LIBDIR/'vmware'
+-conf = DEST/'setup/vmware-config'
++import os
++conf = path(os.environ['WORKDIR'])/'vmware-config.sh'
+
+-LIMITSFILE = Destination('/etc/security/limits.conf')
++LIMITSFILE = SYSCONFDIR/'security/limits.conf'
+ NOFILE_MINIMUM = 4096
+-PAMLOGINFILE = Destination('/etc/pam.d/login')
++PAMLOGINFILE = SYSCONFDIR/'pam.d/login'
+
+ vmwareSentinel = '# Automatically generated by the VMware Installer - DO NOT REMOVE\n'
+ pamLoginLine = 'session required pam_limits.so\n'
+@@ -109,7 +110,7 @@
+ self.SetPermission(DEST/'bin/*', BINARY)
+
+ eclipse = self.GetAnswer('eclipse')
+- eclipse and self.AddTarget('Link', DEST/'eclipse-ivd/com.vmware.bfg_1.0.0',
++ False and self.AddTarget('Link', DEST/'eclipse-ivd/com.vmware.bfg_1.0.0',
+ Destination(eclipse)/'plugins/com.vmware.bfg_1.0.0')
+
+ def _killVMwareProcesses(self):
+@@ -179,13 +180,13 @@
+ # Player is still installed though, so we want to be
+ # sure to restart the services for Player.
+ script = INITSCRIPTDIR/'vmware'
+- if script.exists():
++ if False:
+ self.RunCommand(script, 'stop', ignoreErrors=True)
+ self.RunCommand(script, 'start')
+
+ def _ClearVMwareEclipseINI(self):
+ eclipse = self.GetAnswer('eclipse')
+- if eclipse:
++ if False:
+ try:
+ # Check if our section already exists at the beginning
+ # of the file. If it does clear it.
+@@ -202,7 +203,7 @@
+ def _ModifyEclipseINI(self):
+ eclipse = self.GetAnswer('eclipse')
+ log.Debug('ModifyINI: Eclipse is: %s', eclipse)
+- if eclipse:
++ if False:
+ log.Debug('ModifyINI: Eclipse path was found at %s', eclipse)
+ # Modify the eclipse.ini file to include the lines:
+ # -vm
+@@ -234,7 +235,7 @@
+ missingFeatures = []
+ pluginDir = DEST/'eclipse-ng'
+ xmlfile = pluginDir/'feature.xml'
+- if xmlfile.exists():
++ if False:
+ text = xmlfile.bytes()
+ req = str(re.findall('.*', text, re.DOTALL))
+ reqPlugins = re.findall('import plugin="(.*?)"', str(req), re.DOTALL)
+@@ -284,7 +285,7 @@
+ eclipse = self.GetAnswer('eclipse')
+ eclipseCCPP = self.GetAnswer('eclipseCCPP')
+ log.Debug('Eclipse(C/C++): Eclipse is: %s', eclipse)
+- if eclipse and eclipseCCPP.lower() == 'yes':
++ if False and eclipseCCPP.lower() == 'yes':
+ success=False
+ pluginPath = DEST/'eclipse-ng'
+ configFile = pluginPath/'vmware-eclipse-update-site.config'
+@@ -459,7 +460,7 @@
+ # to check.
+ nofileHL = self.GetAnswer('nofileHardLimit')
+ if nofileHL and (self.hardLimit != int(nofileHL)):
+- limitsFile = Destination('/etc/security/limits.conf')
++ limitsFile = LIMITSFILE
+ if limitsFile.exists():
+ self._ClearVMwareLimitsConf(limitsFile, restoreEntry=False)
+ log.Debug('Modifying /etc/security/limits.conf hard limit from '
diff --git a/app-emulation/vmware-workstation/files/90vmware-workstation b/app-emulation/vmware-workstation/files/90vmware-workstation
new file mode 100644
index 000000000..0352870f4
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/90vmware-workstation
@@ -0,0 +1,3 @@
+PATH=/opt/vmware/workstation/bin
+ROOTPATH=/opt/vmware/workstation/bin
+MANPATH=/opt/vmware/workstation/man
diff --git a/app-emulation/vmware-workstation/files/helpers/module_patcher.sh b/app-emulation/vmware-workstation/files/helpers/module_patcher.sh
new file mode 100755
index 000000000..03c490a73
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/helpers/module_patcher.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+MY_BASE=$(basename $1)
+if [ -f ${FILESDIR}/${PV}/${MY_BASE}.patch ];
+then
+ echo -n "Module Patcher: "
+ patch -f -p1 ${1} < ${FILESDIR}/${PV}/${MY_BASE}.patch
+fi
diff --git a/app-emulation/vmware-workstation/files/helpers/unbundler.sh b/app-emulation/vmware-workstation/files/helpers/unbundler.sh
new file mode 100755
index 000000000..b19b587c2
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/helpers/unbundler.sh
@@ -0,0 +1,91 @@
+#!/bin/bash
+
+ORIGFILE="$1"
+
+is_relative() {
+ local path="$1"
+ shift
+
+ [ "${path:0:1}" != "/" ]
+ return
+}
+
+set_offsets() {
+ # This won't work with non-GNU stat.
+ FILE_SIZE=`stat -L --format "%s" "$1"`
+ local offset=$(($FILE_SIZE - 4))
+
+ MAGIC_OFFSET=$offset
+ offset=$(($offset - 4))
+
+ CHECKSUM_OFFSET=$offset
+ offset=$(($offset - 4))
+
+ VERSION_OFFSET=$offset
+ offset=$(($offset - 4))
+
+ PREPAYLOAD_OFFSET=$offset
+ offset=$(($offset - 4))
+
+ PREPAYLOAD_SIZE_OFFSET=$offset
+ offset=$(($offset - 4))
+
+ LAUNCHER_SIZE_OFFSET=$offset
+ offset=$(($offset - 4))
+
+ PAYLOAD_OFFSET=$offset
+ offset=$(($offset - 4))
+
+ PAYLOAD_SIZE_OFFSET=$offset
+ offset=$(($offset - 4))
+}
+
+set_lengths() {
+ local file="$1"
+ if [ ! -s "$file" ]; then
+ echo "$file does not exist"
+ exit 1
+ fi
+
+ # XXX: put extraction in its own function
+ MAGIC_NUMBER=`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | tr -d ' '`
+
+ if [ "$MAGIC_NUMBER" != "907380241" ]; then
+ echo "magic number does not match"
+ exit 1
+ fi
+
+ LAUNCHER_SIZE=`od -An -t u4 -N 4 -j $LAUNCHER_SIZE_OFFSET "$file" | tr -d ' '`
+ PAYLOAD_SIZE=`od -An -t u4 -N 4 -j $PAYLOAD_SIZE_OFFSET "$file" | tr -d ' '`
+ PREPAYLOAD_SIZE=`od -An -t u4 -N 4 -j $PREPAYLOAD_SIZE_OFFSET "$file" | tr -d ' '`
+
+ SKIP_BYTES=$(($PREPAYLOAD_SIZE + $LAUNCHER_SIZE))
+
+ return 0
+}
+
+if is_relative "${ORIGFILE}"; then
+ ORIGFILE="`pwd`/${ORIGFILE}"
+fi
+
+
+set_offsets ${ORIGFILE}
+set_lengths ${ORIGFILE}
+
+echo "Unbundling" ${ORIGFILE}
+
+PREPAYLOAD="prepayload"
+PAYLOAD="payload"
+
+# Unpack the pre-payload file
+mkdir ${PREPAYLOAD}
+cd ${PREPAYLOAD}
+dd if="${ORIGFILE}" ibs=$LAUNCHER_SIZE obs=1024 skip=1 | tar -xzf - 2> /dev/null
+cd ..
+
+# Unpack the main file
+mkdir ${PAYLOAD}
+cd ${PAYLOAD}
+dd if="${ORIGFILE}" ibs=$SKIP_BYTES obs=1024 skip=1 | tar -xzf - 2> /dev/null
+cd ..
+
diff --git a/app-emulation/vmware-workstation/files/helpers/vmware-config.sh b/app-emulation/vmware-workstation/files/helpers/vmware-config.sh
new file mode 100755
index 000000000..4895502ac
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/helpers/vmware-config.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+CONFIG_FILE="${D}/etc/vmware/config"
+
+remove_key() {
+ local key=${1}
+ grep -v "^${key} =" ${CONFIG_FILE}
+ grep -v "^${key} =" ${CONFIG_FILE} > ${CONFIG_FILE}.tmp
+ mv ${CONFIG_FILE}.tmp ${CONFIG_FILE}
+}
+
+add_key() {
+ local key=${1}
+ local value=${2}
+ echo "${1} = \"${2}\"" >> ${CONFIG_FILE}
+}
+
+mkdir -p $(dirname ${CONFIG_FILE})
+touch ${CONFIG_FILE}
+
+if [ "${1}" == "-s" ]; then
+ remove_key ${2}
+ add_key ${2} ${3/${D}/}
+fi
+
+if [ "${1}" == "-d" ]; then
+ remove_key ${2}
+fi
+
diff --git a/app-emulation/vmware-workstation/files/vmware-player.desktop b/app-emulation/vmware-workstation/files/vmware-player.desktop
new file mode 100644
index 000000000..755ac187e
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/vmware-player.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=VMWare Player
+Type=Application
+Comment=Emulate a complete PC on your PC without the usual performance overhead of most emulators
+MimeType=application/x-vmware-vm-legacy;application/x-vmware-team;application/x-vmware-vm-clone;application/x-vmware-vm;application/x-vmware-vm-clone;application/x-vmware-vm;application/x-vmware-vm-clone;application/x-vmware-vm;application/x-vmware-vmdisk;application/x-vmware-team;application/x-vmware-vmfoundry;application/x-vmware-vm;application/x-vmware-snapshot;
+Exec=vmplayer
+TryExec=vmplayer
+Icon=vmware-player
+Categories=System;
diff --git a/app-emulation/vmware-workstation/files/vmware-workstation-7.0.1.227600-installer.patch b/app-emulation/vmware-workstation/files/vmware-workstation-7.0.1.227600-installer.patch
new file mode 100644
index 000000000..cb51ef2f7
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/vmware-workstation-7.0.1.227600-installer.patch
@@ -0,0 +1,163 @@
+diff -Naur payload.orig/install/vmware-installer/.installer/1.1/vmware-installer.py payload/install/vmware-installer/.installer/1.1/vmware-installer.py
+--- payload.orig/install/vmware-installer/.installer/1.1/vmware-installer.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/.installer/1.1/vmware-installer.py 2010-02-24 00:05:53.000000000 +0100
+@@ -10,7 +10,7 @@
+
+ # The 1.0 Installer looks in very specific locations for existing installs
+ # (/etc/vmware and /etc/vmware-vix)
+-OLDCONFDIR = Destination('/etc/vmware')
++OLDCONFDIR = SYSCONFDIR/'vmware'
+ OLDBOOTSTRAPS = ['/etc/vmware', '/etc/vmware-vix']
+
+ installerLinks = ['vmware-installer', 'vmware-uninstall',
+@@ -149,7 +149,8 @@
+ path(bin/'vmware-installer').symlink(str(BINDIR/'vmware-installer'))
+
+ # Create necessary bootstrap files
+- bootstrap = CONFDIR/'bootstrap'
++ import os
++ bootstrap = path(os.environ['WORKDIR'])/'vmware-confdir/bootstrap'
+ bootstrap.write_bytes('VMWARE_INSTALLER="%s"\n\n' % DEST, append=False)
+ bootstrap.write_bytes('VERSION="%s"\n' % '1.1', append=True)
+ bootstrap.write_bytes('VMISPYVERSION="%s"\n' % PYTHON_VERSION, append=True)
+@@ -159,7 +160,7 @@
+ # don't already exist
+ for bstrap in OLDBOOTSTRAPS:
+ bootstrap = path(bstrap)/'bootstrap'
+- if not bootstrap.exists():
++ if False:
+ try:
+ path(bstrap).makedirs()
+ except OSError:
+@@ -228,7 +229,7 @@
+ # don't clean up the bootstrap files.
+ for suffix in ['', '-vix']:
+ oldfile = path('/etc/vmware%s/bootstrap' % suffix)
+- if oldfile.exists():
++ if False:
+ text = oldfile.bytes()
+ if text.find('VERSION="1.0"') != -1:
+ bstraps.remove('/etc/vmware%s' % suffix)
+diff -Naur payload.orig/install/vmware-installer/vmis/core/common.py payload/install/vmware-installer/vmis/core/common.py
+--- payload.orig/install/vmware-installer/vmis/core/common.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/core/common.py 2010-02-05 17:31:31.000000000 +0100
+@@ -247,4 +247,3 @@
+ # nonexistant DB.
+ SYSTEM_BOOTSTRAP = path('/etc/vmware-installer/bootstrap')
+ SYSTEM_DATABASE = path('/etc/vmware-installer/database')
+-
+diff -Naur payload.orig/install/vmware-installer/vmis/core/dependency.py payload/install/vmware-installer/vmis/core/dependency.py
+--- payload.orig/install/vmware-installer/vmis/core/dependency.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/core/dependency.py 2010-02-04 19:57:42.000000000 +0100
+@@ -291,7 +291,7 @@
+ log.debug(' found match: %s' % possibleDep)
+ node.addDependency(possibleDep, dependency.optional)
+ matched = True
+- if not matched and not dependency.optional and not force:
++ if False:
+ exception = UnsatisfiedDependency('Component %s has unsatisfied '
+ 'dependency: %s' % (node.component,
+ dependency))
+diff -Naur payload.orig/install/vmware-installer/vmis/core/env.py payload/install/vmware-installer/vmis/core/env.py
+--- payload.orig/install/vmware-installer/vmis/core/env.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/core/env.py 2010-02-04 19:56:51.000000000 +0100
+@@ -305,6 +305,8 @@
+ # Python will interpret as being a module separator
+ moduleName = component.name.replace('.', '')
+ fileObj, pathName, description = imp.find_module(moduleName, [loadPath])
++ print output(os.path.join(env['ENV'].get('WORKDIR', './'), 'module_patcher.sh'), pathName)[1],
++ fileObj = file(pathName)
+
+ componentCoreVersion = component.coreVersion
+ if component.name == 'vmware-installer': # XXX: HARDCODE - Fix this.
+diff -Naur payload.orig/install/vmware-installer/vmis/core/files.py payload/install/vmware-installer/vmis/core/files.py
+--- payload.orig/install/vmware-installer/vmis/core/files.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/core/files.py 2010-02-09 00:09:20.000000000 +0100
+@@ -17,7 +17,8 @@
+ Check to see if VMIS_COMPONENT_ONLY is defined. Return true if it is,
+ false otherwise.
+ """
+- return 'VMIS_COMPONENT_ONLY' in globals()
++ return False
++# return 'VMIS_COMPONENT_ONLY' in globals()
+
+
+ # XXX: This could be handled better.
+@@ -196,6 +197,7 @@
+ id = 0
+
+ def Install(self, component, dest, precopy=None):
++
+ if self.IsRelative():
+ entries = list(component.Glob(self))
+
+diff -Naur payload.orig/install/vmware-installer/vmis/core/questions.py payload/install/vmware-installer/vmis/core/questions.py
+--- payload.orig/install/vmware-installer/vmis/core/questions.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/core/questions.py 2010-02-04 19:56:51.000000000 +0100
+@@ -199,6 +199,9 @@
+ """
+ super(InitDir, self).Validate(answer)
+
++ ### GENTOO PATCH ### Finish early
++ return True
++
+ rcdirs = ('rc0.d', 'rc1.d', 'rc2.d', 'rc3.d', 'rc4.d', 'rc5.d', 'rc6.d')
+ answer = path(answer)
+
+diff -Naur payload.orig/install/vmware-installer/vmis/db.py payload/install/vmware-installer/vmis/db.py
+--- payload.orig/install/vmware-installer/vmis/db.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/db.py 2010-02-04 21:23:04.000000000 +0100
+@@ -569,7 +569,7 @@
+
+ if row:
+ coreID = row['id'];
+- else:
++ elif False:
+ cur = self._db.execute(u'SELECT id, name, version FROM components WHERE name="vmware-installer"')
+ rows = cur.fetchone();
+ cur.close();
+diff -Naur payload.orig/install/vmware-installer/vmis/__init__.py payload/install/vmware-installer/vmis/__init__.py
+--- payload.orig/install/vmware-installer/vmis/__init__.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/__init__.py 2010-02-04 19:56:51.000000000 +0100
+@@ -20,7 +20,7 @@
+ MAJOR_VERSION = VERSION_INFO[0]
+ VMISPYVERSION = os.environ.get('VMISPYVERSION')
+
+-CONFDIR = path(u'/etc/vmware-installer')
++CONFDIR = path(u'./vmware-confdir')
+ DATABASE_PATH = CONFDIR/'database'
+
+ # Database setting for use by the installer and its component.
+diff -Naur payload.orig/install/vmware-installer/vmis/util/log.py payload/install/vmware-installer/vmis/util/log.py
+--- payload.orig/install/vmware-installer/vmis/util/log.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmis/util/log.py 2010-02-04 19:56:51.000000000 +0100
+@@ -24,12 +24,13 @@
+ username = pwd.getpwuid(os.getuid())[0]
+ dirname = '/tmp/vmware-%s' % username
+ LOG_FILE = '%s/vmware-installer.log' % dirname
++LOG_FILE = './vmware-installer.log'
+ # Make sure this directory exists. Assuming /tmp exists.
+- try:
+- os.mkdir(dirname)
+- except OSError:
++# try:
++# os.mkdir(dirname)
++# except OSError:
+ # It's okay if it already exists
+- pass
++# pass
+
+ if level <= logging.DEBUG:
+ MAX_BYTES = 0
+diff -Naur payload.orig/install/vmware-installer/vmware-installer.py payload/install/vmware-installer/vmware-installer.py
+--- payload.orig/install/vmware-installer/vmware-installer.py 2010-02-04 19:50:58.000000000 +0100
++++ payload/install/vmware-installer/vmware-installer.py 2010-02-09 00:09:45.000000000 +0100
+@@ -200,7 +200,7 @@
+ # if it exists and continue with installation.
+ dbase = SYSTEM_DATABASE
+ if dbase.exists():
+- dbase.remove(ignore_errors=True);
++# dbase.remove(ignore_errors=True);
+ log.error('Bootstrap file was missing, but database file exists. '
+ 'Installer system state is corrupted. Removing '
+ '%s and starting with an empty installer database.'
diff --git a/app-emulation/vmware-workstation/files/vmware-workstation-7.0.rc b/app-emulation/vmware-workstation/files/vmware-workstation-7.0.rc
new file mode 100644
index 000000000..62310143a
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/vmware-workstation-7.0.rc
@@ -0,0 +1,74 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/files/vmware-workstation-6.5.rc,v 1.1 2008/11/09 20:56:55 ikelos Exp $
+
+depend() {
+ need localmount hald
+ use logger net
+ after samba
+}
+
+vmware_prettify() {
+ # Yea, the code is ugly but the output is pretty
+ state=$1
+ waserror=0
+ msgtype=0
+ while read line
+ do
+ [ "${line}" = "" ] && continue
+ if [ ${msgtype} -le 0 ]
+ then
+ if [ ${msgtype} -eq -1 ]
+ then
+ ewarn ${line}
+ continue
+ fi
+ case ${line} in
+ *:*)
+ einfon ${line}
+ echo
+ eend 0
+ msgtype=1;;
+ *)
+ ewarn ${line}
+ msgtype=-1
+ waserror=1;;
+ esac
+ continue
+ fi
+
+ # Strip out anything after the code
+ message=`echo ${line} | sed -e "s/^\(.*\).*$/\1/"`
+ einfon " ${message}"
+ echo
+
+ echo ${line} | grep -q done
+ status=$?
+ eend ${status}
+
+ if [ ${status} -eq 0 ]
+ then
+ logger -p local0.err -t vmware-${state} "${line}"
+ waserror=${status}
+ fi
+ done
+ if [ "${msgtype}" = "-1" ]
+ then
+ eend 1 "VMware is not properly configured! See above."
+ fi
+ return ${waserror}
+}
+
+start() {
+ test -x /etc/vmware/init.d/vmware || \
+ eend 1 "vmware init script not found. Aborting" || return 1
+
+ /etc/vmware/init.d/vmware start | vmware_prettify start
+ return $?
+}
+
+stop() {
+ /etc/vmware/init.d/vmware stop | vmware_prettify stop
+ return $?
+}
diff --git a/app-emulation/vmware-workstation/files/vmware-workstation.desktop b/app-emulation/vmware-workstation/files/vmware-workstation.desktop
new file mode 100644
index 000000000..dc6d1164c
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/vmware-workstation.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Version=1.0
+Name=VMWare Workstation
+Type=Application
+Comment=Emulate a complete PC on your PC without the usual performance overhead of most emulators
+MimeType=application/x-vmware-vm-legacy;application/x-vmware-team;application/x-vmware-vm-clone;application/x-vmware-vm;application/x-vmware-vm-clone;application/x-vmware-vm;application/x-vmware-vm-clone;application/x-vmware-vm;application/x-vmware-vmdisk;application/x-vmware-team;application/x-vmware-vmfoundry;application/x-vmware-vm;application/x-vmware-snapshot;
+Exec=vmware
+TryExec=vmware
+Icon=vmware-workstation
+Categories=System;
diff --git a/app-emulation/vmware-workstation/files/vmware-workstation.rc b/app-emulation/vmware-workstation/files/vmware-workstation.rc
new file mode 100644
index 000000000..a4bd89a3c
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/vmware-workstation.rc
@@ -0,0 +1,86 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-workstation/files/vmware-workstation.rc,v 1.6 2007/11/25 12:50:32 ikelos Exp $
+
+depend() {
+ need localmount
+ use logger net hald
+ after samba
+}
+
+vmware_prettify() {
+ # Yea, the code is ugly but the output is pretty
+ state=$1
+ waserror=0
+ msgtype=0
+ while read line
+ do
+ [ "${line}" = "" ] && continue
+ if [ ${msgtype} -le 0 ]
+ then
+ if [ ${msgtype} -eq -1 ]
+ then
+ ewarn ${line}
+ continue
+ fi
+ case ${line} in
+ *:*)
+ einfon ${line}
+ echo
+ eend 0
+ msgtype=1;;
+ *)
+ ewarn ${line}
+ msgtype=-1
+ waserror=1;;
+ esac
+ continue
+ fi
+
+ # Strip out anything after the code
+ message=`echo ${line} | sed -e "s/^\(.*\).*$/\1/"`
+ einfon " ${message}"
+ echo
+
+ echo ${line} | grep -q done
+ status=$?
+ eend ${status}
+
+ if [ ${status} -eq 0 ]
+ then
+ logger -p local0.err -t vmware-${state} "${line}"
+ waserror=${status}
+ fi
+ done
+ if [ "${msgtype}" = "-1" ]
+ then
+ eend 1 "VMware is not properly configured! See above."
+ fi
+ return ${waserror}
+}
+
+start() {
+ test -x /etc/vmware/init.d/vmware || \
+ eend 1 "vmware init script not found. Aborting" || return 1
+
+ if modinfo vmblock > /dev/null 2>&1;
+ then
+ ebegin "Loading vmblock for drag and drop support"
+ local result
+ modprobe vmblock || eend 1 "Failed to load vmblock driver"
+ test ! -e /tmp/VMwareDnD && mkdir /tmp/VMwareDnD
+ chmod 1777 /tmp/VMwareDnD
+ mount -t vmblock none /proc/fs/vmblock/mountPoint || eend 1 "Failed to mount the vmblock filesystem"
+ eend 0
+ fi
+
+ /etc/vmware/init.d/vmware start | vmware_prettify start
+ return $?
+}
+
+stop() {
+ umount /proc/fs/vmblock/mountPoint > /dev/null 2>&1
+ /etc/vmware/init.d/vmware stop | vmware_prettify stop
+ return $?
+}
diff --git a/app-emulation/vmware-workstation/files/vmware-workstation.xml b/app-emulation/vmware-workstation/files/vmware-workstation.xml
new file mode 100644
index 000000000..8d5e2eff5
--- /dev/null
+++ b/app-emulation/vmware-workstation/files/vmware-workstation.xml
@@ -0,0 +1,48 @@
+
+
+
+
+ VMware virtual machine
+
+
+
+
+
+
+
+ VMware virtual disk
+
+
+
+
+
+
+
+
+ VMware team
+
+
+
+
+
+
+
+
+
+ VMware virtual machine snapshot
+
+
+
+
+
+
+
+ VMware virtual machine foundry
+
+
+
+
+
+
+
+
diff --git a/app-emulation/vmware-workstation/vmware-workstation-7.0.1.227600.ebuild b/app-emulation/vmware-workstation/vmware-workstation-7.0.1.227600.ebuild
new file mode 100644
index 000000000..babb35850
--- /dev/null
+++ b/app-emulation/vmware-workstation/vmware-workstation-7.0.1.227600.ebuild
@@ -0,0 +1,187 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: Exp $
+
+EAPI="2"
+
+inherit eutils versionator fdo-mime gnome2-utils
+
+MY_PN="VMware-Workstation-Full-$(replace_version_separator 3 - $PV)"
+
+DESCRIPTION="Emulate a complete PC on your PC without the usual performance overhead of most emulators"
+HOMEPAGE="http://www.vmware.com/products/desktop/ws_features.html"
+DOWNLOAD_URL="http://www.vmware.com/download/ws/"
+SRC_URI="
+ x86? (
+ mirror://vmware/software/wkst/${MY_PN}.i386.bundle
+ http://download.softpedia.ro/linux/${MY_PN}.i386.bundle )
+ amd64? (
+ mirror://vmware/software/wkst/${MY_PN}.x86_64.bundle
+ http://download.softpedia.ro/linux/${MY_PN}.x86_64.bundle )
+ "
+
+LICENSE="vmware"
+SLOT="0"
+KEYWORDS="-* amd64 x86"
+IUSE=""
+RESTRICT="strip fetch binchecks"
+PROPERTIES="interactive"
+
+# vmware-workstation should not use virtual/libc as this is a
+# precompiled binary package thats linked to glibc.
+DEPEND=">=dev-lang/python-2.5[sqlite,ncurses]
+ dev-python/lxml"
+RDEPEND="
+ ~app-emulation/vmware-modules-1.0.0.26
+ dev-cpp/cairomm
+ dev-cpp/libgnomecanvasmm
+ dev-cpp/libsexymm
+ sys-apps/pciutils
+ sys-apps/hal
+ sys-fs/fuse
+ sys-libs/glibc
+ >=x11-libs/libview-0.6.2
+ x11-libs/libgksu
+ x11-libs/libXcursor
+ x11-libs/libXft
+ x11-libs/libXi
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ !!app-emulation/vmware-player
+ !!app-emulation/vmware-server
+ "
+
+S=${WORKDIR}/vmware-distrib
+VM_INSTALL_DIR="/opt/vmware/workstation"
+
+pkg_setup() {
+ if use x86; then
+ MY_P="${MY_PN}.i386"
+ elif use amd64; then
+ MY_P="${MY_PN}.x86_64"
+ fi
+
+ if [ "$(python -c "import curses; curses.setupterm(); print curses.tigetstr('hpa')")" == "None" ]; then
+ die "Please emerge this package using a different terminal (e.g. not within screen)."
+ fi
+}
+
+pkg_nofetch() {
+ if use x86; then
+ MY_P="${MY_PN}.i386"
+ elif use amd64; then
+ MY_P="${MY_PN}.x86_64"
+ fi
+
+ einfo "Please download the ${MY_P}.bundle from"
+ einfo "${DOWNLOAD_URL}"
+ einfo "and place it in ${DISTDIR}"
+}
+
+src_unpack() {
+ # Unbundle the bundle
+ cp "${FILESDIR}"/helpers/* "${WORKDIR}"
+ chmod a+x "${WORKDIR}"/*.sh
+ "${WORKDIR}"/unbundler.sh "${DISTDIR}/${MY_P}".bundle
+}
+
+src_prepare() {
+ # Patch up the installer
+ epatch "${FILESDIR}/${P}-installer.patch"
+
+ mkdir "${WORKDIR}/vmware-confdir"
+}
+
+src_install() {
+ dodir /etc/init.d
+
+ #Run the installer
+ local INSTALLER="${WORKDIR}/payload/install/vmware-installer"
+ local PYOPTS="-W ignore::DeprecationWarning"
+ export VMWARE_SKIP_NETWORKING="true"
+ export VMWARE_SKIP_SERVICES="true"
+# python ${PYOPTS} "${INSTALLER}/vmware-installer.py" \
+ export VMWARE_BOOTSTRAP="${INSTALLER}/bootstrap"
+ sed -e "s#@@VMWARE_INSTALLER@@#${INSTALLER}#" -i "${VMWARE_BOOTSTRAP}"
+ "${INSTALLER}/vmware-installer" \
+ --set-setting vmware-installer prefix "${D}${VM_INSTALL_DIR}" \
+ --set-setting vmware-installer vmware-installer.libconf "${INSTALLER}/lib/libconf" \
+ --set-setting vmware-installer initdir "${T}" \
+ --set-setting vmware-installer initscriptdir "${D}/etc/init.d" \
+ --set-setting vmware-installer sysconfdir "${D}/etc" \
+ --install-component "${INSTALLER}" \
+ --install-bundle "${DISTDIR}/${MY_P}.bundle" \
+ --console --required
+
+ rm -fr "${D}${VM_INSTALL_DIR}/lib/vmware/modules/binary"
+
+ if [ ! -e "${WORKDIR}"/vmware-confdir/bootstrap ]; then
+ eerror "VMware installation seems to have rolled back."
+ eerror "Please include the contents of ${WORKDIR}/vmware-installer.log"
+ eerror "in any bug reports you file."
+ die "VMware installation rolled back."
+ fi
+
+ # Redirect all the ${D} paths to / paths"
+ sed -i -e "s:${D}::" "${WORKDIR}"/vmware-confdir/bootstrap
+
+ # Redirect all the /etc/vmware-installer to /etc/vmware
+ sed -i -e '/ETCDIR/ s/-installer//' "${D}"/opt/vmware/workstation/bin/vmware-modconfig
+ sed -i -e '/ETCDIR/ s/-installer//' "${D}"/opt/vmware/workstation/bin/vmware-installer
+
+ # Fix up icons/mime/desktop handlers
+ dodir /usr/share/
+ mv "${D}${VM_INSTALL_DIR}"/share/applications "${D}"/usr/share/
+ rm -f "${D}${VM_INSTALL_DIR}"/share/icons/hicolor/{icon-theme.cache,index.theme}
+ mv "${D}${VM_INSTALL_DIR}"/share/icons "${D}"/usr/share/
+ dodir /usr/share/mime
+ mv "${D}${VM_INSTALL_DIR}"/share/mime/packages "${D}"/usr/share/mime
+ sed -i -e "s:${D}::" "${D}"/usr/share/applications/*.desktop
+
+ # Copy across the temporary /etc/vmware directory
+ dodir /etc/vmware/init.d
+ cp -r "${WORKDIR}"/vmware-confdir/* "${D}/etc/vmware"
+ chmod +x "${D}/etc/vmware/init.d/vmware"
+ sed -i -e "s:/sbin/lsmod:/bin/lsmod:" "${D}"/etc/vmware/init.d/vmware
+ newinitd "${FILESDIR}/${PN}"-7.0.rc vmware
+ touch "${D}"/etc/vmware/networking
+
+ # Setup the path environment
+ insinto /etc/env.d
+ doins "${FILESDIR}/90${PN}"
+
+ # Fix some paths to allow included gtk to work
+# for i in "/etc/pango/pangorc" \
+# "/etc/pango/pango.modules" \
+# "/etc/gtk-2.0/gtk.immodules" \
+# "/etc/gtk-2.0/gdk-pixbuf.loaders" ; do
+# sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/libconf${i} ;
+# sed -i -e "s:${D}::" "${D}${VM_INSTALL_DIR}"/lib/vmware/installer/lib/libconf${i} ;
+# done
+}
+
+pkg_config() {
+ ${VM_INSTALL_DIR}/bin/vmware-networks --postinstall ${PN},old,new
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+
+ ewarn "Before you can use vmware-workstation, you must configure a default network setup."
+ ewarn "You can do this by running 'emerge --config ${PN}'."
+}
+
+pkg_prerm() {
+ einfo "Stopping ${product_name} for safe unmerge"
+ /etc/init.d/vmware stop
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ gnome2_icon_cache_update
+}