summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kuznetsov <vadimk@gentoo.org>2011-03-27 15:20:08 +0000
committerVadim Kuznetsov <vadimk@gentoo.org>2011-03-27 15:20:08 +0000
commitd3012560bb4257d4d2a0e51c3c1b3e3fff99026f (patch)
treefe1147c09963303ac49346f2e2e4959307366305 /app-emulation
parentMarking courier-0.65.2-r1 ppc for bug 359303 (diff)
downloadgentoo-2-d3012560bb4257d4d2a0e51c3c1b3e3fff99026f.tar.gz
gentoo-2-d3012560bb4257d4d2a0e51c3c1b3e3fff99026f.tar.bz2
gentoo-2-d3012560bb4257d4d2a0e51c3c1b3e3fff99026f.zip
vmware kernel modules for vmware worksatation 7 host
(Portage version: 2.1.9.44/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/vmware-modules/ChangeLog10
-rw-r--r--app-emulation/vmware-modules/files/238-jobserver.patch75
-rw-r--r--app-emulation/vmware-modules/files/238-makefile-include.patch65
-rw-r--r--app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch80
-rw-r--r--app-emulation/vmware-modules/files/238-sema.patch83
-rw-r--r--app-emulation/vmware-modules/files/238-unlocked_ioctl.patch33
-rw-r--r--app-emulation/vmware-modules/vmware-modules-238.3-r8.ebuild79
7 files changed, 424 insertions, 1 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog
index 40b55d2837ad..33b49f53c2a1 100644
--- a/app-emulation/vmware-modules/ChangeLog
+++ b/app-emulation/vmware-modules/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-emulation/vmware-modules
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.72 2011/03/18 14:52:53 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.73 2011/03/27 15:20:08 vadimk Exp $
+
+*vmware-modules-238.3-r8 (27 Mar 2011)
+
+ 27 Mar 2011; Vadim Kuznetsov <vadimk@gentoo.org> +files/238-jobserver.patch,
+ +files/238-makefile-include.patch, +files/238-makefile-kernel-dir.patch,
+ +files/238-sema.patch, +files/238-unlocked_ioctl.patch,
+ +vmware-modules-238.3-r8.ebuild:
+ vmware kernel modules of the vmware player 3.1.3 or workstation 7.1.3 host
*vmware-modules-1.0.0.25-r4 (18 Mar 2011)
diff --git a/app-emulation/vmware-modules/files/238-jobserver.patch b/app-emulation/vmware-modules/files/238-jobserver.patch
new file mode 100644
index 000000000000..59a6ccca1da0
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-jobserver.patch
@@ -0,0 +1,75 @@
+diff -ru a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
+--- a/work/vmblock-only/Makefile 2011-01-22 08:59:15.907152002 -0500
++++ b/work/vmblock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vmci-only/Makefile b/work/vmci-only/Makefile
+--- a/work/vmci-only/Makefile 2011-01-22 08:59:15.907152002 -0500
++++ b/work/vmci-only/Makefile 2011-01-22 09:13:55.898936002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
+--- a/work/vmmon-only/Makefile 2011-01-22 08:59:15.907152002 -0500
++++ b/work/vmmon-only/Makefile 2011-01-22 09:13:55.894938002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
+--- a/work/vmnet-only/Makefile 2011-01-22 08:59:15.911150002 -0500
++++ b/work/vmnet-only/Makefile 2011-01-22 09:13:55.898936002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
+diff -ru a/work/vsock-only/Makefile b/work/vsock-only/Makefile
+--- a/work/vsock-only/Makefile 2011-01-22 08:59:15.911150002 -0500
++++ b/work/vsock-only/Makefile 2011-01-22 09:13:55.894938002 -0500
+@@ -123,9 +123,9 @@
+ postbuild:: ;
+
+ $(DRIVER_KO): prebuild
+- make -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $(BUILD_DIR) SUBDIRS=$$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) modules
+- make -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
++ $(MAKE) -C $$PWD SRCROOT=$$PWD/$(SRCROOT) \
+ MODULEBUILDDIR=$(MODULEBUILDDIR) postbuild
+ endif
+
diff --git a/app-emulation/vmware-modules/files/238-makefile-include.patch b/app-emulation/vmware-modules/files/238-makefile-include.patch
new file mode 100644
index 000000000000..777a3fd8bb6f
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-makefile-include.patch
@@ -0,0 +1,65 @@
+diff --git a/work/vmblock-only/Makefile.kernel b/work/vmblock-only/Makefile.kernel
+index 9d7c5ca..92cefff 100644
+--- a/work/vmblock-only/Makefile.kernel
++++ b/work/vmblock-only/Makefile.kernel
+@@ -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 --git a/work/vmci-only/Makefile.kernel b/work/vmci-only/Makefile.kernel
+index 22dc232..67e709f 100644
+--- a/work/vmci-only/Makefile.kernel
++++ b/work/vmci-only/Makefile.kernel
+@@ -21,7 +21,7 @@ CC_OPTS += -DVMCI
+
+ 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 --git a/work/vmmon-only/Makefile.kernel b/work/vmmon-only/Makefile.kernel
+index a7e26ea..befaca7 100644
+--- a/work/vmmon-only/Makefile.kernel
++++ b/work/vmmon-only/Makefile.kernel
+@@ -22,7 +22,7 @@ CC_OPTS += -DVMMON -DVMCORE
+ 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 --git a/work/vmnet-only/Makefile.kernel b/work/vmnet-only/Makefile.kernel
+index 4b16d06..0e252a6 100644
+--- a/work/vmnet-only/Makefile.kernel
++++ b/work/vmnet-only/Makefile.kernel
+@@ -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 --git a/work/vsock-only/Makefile.kernel b/work/vsock-only/Makefile.kernel
+index 47ef5f3..b3539ef 100644
+--- a/work/vsock-only/Makefile.kernel
++++ b/work/vsock-only/Makefile.kernel
+@@ -25,7 +25,7 @@ INCLUDE += -I$(SRCROOT)/include
+ 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/238-makefile-kernel-dir.patch b/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch
new file mode 100644
index 000000000000..d4bd6d12fed0
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-makefile-kernel-dir.patch
@@ -0,0 +1,80 @@
+diff --git a/work/vmblock-only/Makefile b/work/vmblock-only/Makefile
+index 0bd0e74..27c3ede 100644
+--- a/work/vmblock-only/Makefile
++++ b/work/vmblock-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ 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 := tools
+diff --git a/work/vmci-only/Makefile b/work/vmci-only/Makefile
+index 7babb8a..fbc5878 100644
+--- a/work/vmci-only/Makefile
++++ b/work/vmci-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ 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/work/vmmon-only/Makefile b/work/vmmon-only/Makefile
+index 4b4eb3e..1bb35ef 100644
+--- a/work/vmmon-only/Makefile
++++ b/work/vmmon-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ 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/work/vmnet-only/Makefile b/work/vmnet-only/Makefile
+index 06856e7..fd53bf8 100644
+--- a/work/vmnet-only/Makefile
++++ b/work/vmnet-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ 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/work/vsock-only/Makefile b/work/vsock-only/Makefile
+index e02adb0..210e502 100644
+--- a/work/vsock-only/Makefile
++++ b/work/vsock-only/Makefile
+@@ -46,9 +46,9 @@ endif
+ 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/files/238-sema.patch b/app-emulation/vmware-modules/files/238-sema.patch
new file mode 100644
index 000000000000..1ebdab7ee009
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-sema.patch
@@ -0,0 +1,83 @@
+diff -ru original//vmci-only/include/compat_semaphore.h patched//vmci-only/include/compat_semaphore.h
+--- original//vmci-only/include/compat_semaphore.h 2010-11-11 15:37:25.000000000 -0500
++++ patched//vmci-only/include/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
+@@ -28,7 +28,7 @@
+ #endif
+
+
+-#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ /*
+ * The -rt patch series changes the name of semaphore/mutex initialization
+ * routines (across the entire kernel). Probably to identify locations that
+@@ -41,7 +41,7 @@
+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
+ #endif
+ #ifndef init_MUTEX
+- #define init_MUTEX(_m) semaphore_init(_m)
++ #define init_MUTEX(_m) sema_init(_m,1)
+ #endif
+ #endif
+
+diff -ru original//vmmon-only/linux/driver.c patched//vmmon-only/linux/driver.c
+--- original//vmmon-only/linux/driver.c 2010-11-11 15:37:22.000000000 -0500
++++ patched//vmmon-only/linux/driver.c 2010-11-29 23:09:16.000000000 -0500
+@@ -145,7 +145,7 @@
+ #endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) && \
+ (defined(CONFIG_SMP) || defined(CONFIG_PREEMPT))
+-# define kernel_locked_by_current() kernel_locked()
++# define kernel_locked_by_current() (current->lock_depth >= 0)
+ #else
+ # define kernel_locked_by_current() 0
+ #endif
+@@ -170,6 +170,7 @@
+ static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
+ u_int iocmd, unsigned long ioarg);
+ #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
++#define VMW_HAVE_UNLOCKED_IOCTL
+ static long LinuxDriver_UnlockedIoctl(struct file *filp,
+ u_int iocmd, unsigned long ioarg);
+ #endif
+diff -ru original//vmnet-only/compat_semaphore.h patched//vmnet-only/compat_semaphore.h
+--- original//vmnet-only/compat_semaphore.h 2010-11-11 15:37:23.000000000 -0500
++++ patched//vmnet-only/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
+@@ -28,7 +28,7 @@
+ #endif
+
+
+-#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ /*
+ * The -rt patch series changes the name of semaphore/mutex initialization
+ * routines (across the entire kernel). Probably to identify locations that
+@@ -41,7 +41,7 @@
+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
+ #endif
+ #ifndef init_MUTEX
+- #define init_MUTEX(_m) semaphore_init(_m)
++ #define init_MUTEX(_m) sema_init(_m,1)
+ #endif
+ #endif
+
+diff -ru original//vsock-only/shared/compat_semaphore.h patched//vsock-only/shared/compat_semaphore.h
+--- original//vsock-only/shared/compat_semaphore.h 2010-11-11 13:04:44.000000000 -0500
++++ patched//vsock-only/shared/compat_semaphore.h 2010-11-20 10:11:56.000000000 -0500
+@@ -28,7 +28,7 @@
+ #endif
+
+
+-#if defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)
++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
+ /*
+ * The -rt patch series changes the name of semaphore/mutex initialization
+ * routines (across the entire kernel). Probably to identify locations that
+@@ -41,7 +41,7 @@
+ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m)
+ #endif
+ #ifndef init_MUTEX
+- #define init_MUTEX(_m) semaphore_init(_m)
++ #define init_MUTEX(_m) sema_init(_m,1)
+ #endif
+ #endif
+
diff --git a/app-emulation/vmware-modules/files/238-unlocked_ioctl.patch b/app-emulation/vmware-modules/files/238-unlocked_ioctl.patch
new file mode 100644
index 000000000000..3f1cd030c425
--- /dev/null
+++ b/app-emulation/vmware-modules/files/238-unlocked_ioctl.patch
@@ -0,0 +1,33 @@
+diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c
+index 1a0e753..089aba3 100644
+--- a/vmmon-only/linux/driver.c
++++ b/vmmon-only/linux/driver.c
+@@ -170,6 +170,7 @@ static int LinuxDriver_Open(struct inode *inode, struct file *filp);
+ static int LinuxDriver_Ioctl(struct inode *inode, struct file *filp,
+ u_int iocmd, unsigned long ioarg);
+ #if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
++#define VMW_HAVE_UNLOCKED_IOCTL
+ static long LinuxDriver_UnlockedIoctl(struct file *filp,
+ u_int iocmd, unsigned long ioarg);
+ #endif
+diff --git a/vmmon-only/linux/hostif.c b/vmmon-only/linux/hostif.c
+index 5847323..9042b97 100644
+--- a/vmmon-only/linux/hostif.c
++++ b/vmmon-only/linux/hostif.c
+@@ -3702,7 +3702,7 @@ HostIFDoIoctl(struct file *filp,
+ if (filp->f_op->unlocked_ioctl) {
+ return filp->f_op->unlocked_ioctl(filp, iocmd, ioarg);
+ }
+-#endif
++#else
+ if (filp->f_op->ioctl) {
+ long err;
+
+@@ -3712,6 +3712,7 @@ HostIFDoIoctl(struct file *filp,
+
+ return err;
+ }
++#endif
+
+ return -ENOIOCTLCMD;
+ }
diff --git a/app-emulation/vmware-modules/vmware-modules-238.3-r8.ebuild b/app-emulation/vmware-modules/vmware-modules-238.3-r8.ebuild
new file mode 100644
index 000000000000..df25ea041352
--- /dev/null
+++ b/app-emulation/vmware-modules/vmware-modules-238.3-r8.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-238.3-r8.ebuild,v 1.1 2011/03/27 15:20:08 vadimk Exp $
+
+EAPI="2"
+
+inherit eutils flag-o-matic linux-info linux-mod versionator
+
+PV_MAJOR=$(get_major_version)
+PV_MINOR=$(get_version_component_range 2)
+
+DESCRIPTION="VMware kernel modules"
+HOMEPAGE="http://www.vmware.com/"
+
+SRC_URI=""
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ || ( =app-emulation/vmware-player-3.1.${PV_MINOR}*
+ =app-emulation/vmware-workstation-7.1.${PV_MINOR}* )"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ CONFIG_CHECK="~HIGH_RES_TIMERS"
+ if kernel_is ge 2 6 37; then
+ CONFIG_CHECK="${CONFIG_CHECK} BKL"
+ fi
+
+ linux-info_pkg_setup
+
+ linux-mod_pkg_setup
+
+ VMWARE_GROUP=${VMWARE_GROUP:-vmware}
+
+ VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
+ VMWARE_MOD_DIR="${PN}-${PVR}"
+
+ BUILD_TARGETS="auto-build 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() {
+ cd "${S}"
+ for mod in ${VMWARE_MODULE_LIST}; do
+ tar -xf /opt/vmware/lib/vmware/modules/source/${mod}.tar
+ done
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV_MAJOR}-makefile-kernel-dir.patch"
+ epatch "${FILESDIR}/${PV_MAJOR}-makefile-include.patch"
+ epatch "${FILESDIR}/${PV_MAJOR}-jobserver.patch"
+ kernel_is 2 6 36 && epatch "${FILESDIR}/${PV_MAJOR}-unlocked_ioctl.patch"
+ kernel_is ge 2 6 37 && epatch "${FILESDIR}/${PV_MAJOR}-sema.patch"
+}
+
+src_install() {
+ linux-mod_src_install
+ local udevrules="${T}/60-vmware.rules"
+ cat > "${udevrules}" <<-EOF
+ KERNEL=="vmci", GROUP="${VMWARE_GROUP}", MODE=660
+ KERNEL=="vmmon", GROUP="${VMWARE_GROUP}", MODE=660
+ KERNEL=="vsock", GROUP="${VMWARE_GROUP}", MODE=660
+ EOF
+ insinto /etc/udev/rules.d/
+ doins "${udevrules}"
+}