diff options
author | Vadim Kuznetsov <vadimk@gentoo.org> | 2011-01-13 21:01:39 +0000 |
---|---|---|
committer | Vadim Kuznetsov <vadimk@gentoo.org> | 2011-01-13 21:01:39 +0000 |
commit | 2f4841ff015a6f67a458fd5b77e552eb4840cbd5 (patch) | |
tree | 4882751a0adb736c415afd04b3d83216a2853499 /app-emulation/vmware-modules | |
parent | Marking Moose-1.19 ~ppc for bug 343479 (diff) | |
download | gentoo-2-2f4841ff015a6f67a458fd5b77e552eb4840cbd5.tar.gz gentoo-2-2f4841ff015a6f67a458fd5b77e552eb4840cbd5.tar.bz2 gentoo-2-2f4841ff015a6f67a458fd5b77e552eb4840cbd5.zip |
Bugs 345145 and 349649 and 351592
(Portage version: 2.1.9.31/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation/vmware-modules')
4 files changed, 180 insertions, 4 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog index ec48f9cc4760..a23df60cf1b6 100644 --- a/app-emulation/vmware-modules/ChangeLog +++ b/app-emulation/vmware-modules/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-emulation/vmware-modules -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.62 2010/11/21 15:58:59 vadimk Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.63 2011/01/13 21:01:38 vadimk Exp $ + +*vmware-modules-1.0.0.25-r3 (13 Jan 2011) + + 13 Jan 2011; Vadim Kuznetsov <vadimk@gentoo.org> +files/1.0.0.25-sema.patch, + +vmware-modules-1.0.0.25-r3.ebuild: + Bug 345145 and 349649 and 351592 + Thanks to Mateusz Dziadko, Dane Smith and bugs et al. *vmware-modules-1.0.0.24-r2 (21 Nov 2010) diff --git a/app-emulation/vmware-modules/files/1.0.0.25-sema.patch b/app-emulation/vmware-modules/files/1.0.0.25-sema.patch new file mode 100644 index 000000000000..f5b06f3ccc0a --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.25-sema.patch @@ -0,0 +1,87 @@ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmci-only/include/compat_semaphore.h vmware-modules-1.0.0.25-r2/work/vmci-only/include/compat_semaphore.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmci-only/include/compat_semaphore.h 2011-01-11 21:55:57.016999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmci-only/include/compat_semaphore.h 2011-01-11 21:57:39.719999997 +0100 +@@ -45,5 +45,13 @@ + #endif + #endif + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif + + #endif /* __COMPAT_SEMAPHORE_H__ */ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmmon-only/include/compat_semaphore.h vmware-modules-1.0.0.25-r2/work/vmmon-only/include/compat_semaphore.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmmon-only/include/compat_semaphore.h 2011-01-11 21:55:57.028999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmmon-only/include/compat_semaphore.h 2011-01-11 21:58:57.529999998 +0100 +@@ -45,5 +45,13 @@ + #endif + #endif + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif + + #endif /* __COMPAT_SEMAPHORE_H__ */ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/compat_semaphore.h vmware-modules-1.0.0.25-r2/work/vmnet-only/compat_semaphore.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/compat_semaphore.h 2011-01-11 21:55:57.022999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmnet-only/compat_semaphore.h 2011-01-11 21:58:23.678999996 +0100 +@@ -45,5 +45,14 @@ + #endif + #endif + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif ++ + + #endif /* __COMPAT_SEMAPHORE_H__ */ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/vnetFilter.h vmware-modules-1.0.0.25-r2/work/vmnet-only/vnetFilter.h +--- vmware-modules-1.0.0.25-r2.orig/work/vmnet-only/vnetFilter.h 2011-01-11 21:55:57.020999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vmnet-only/vnetFilter.h 2011-01-11 22:02:29.522999997 +0100 +@@ -203,5 +203,13 @@ + } + #include "vmware_pack_end.h" + VNet_SetLogLevel; ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif + + #endif // ifndef _VNETFILTER_H_ +diff -ru vmware-modules-1.0.0.25-r2.orig/work/vsock-only/linux/af_vsock.h vmware-modules-1.0.0.25-r2/work/vsock-only/linux/af_vsock.h +--- vmware-modules-1.0.0.25-r2.orig/work/vsock-only/linux/af_vsock.h 2011-01-11 21:55:57.040999997 +0100 ++++ vmware-modules-1.0.0.25-r2/work/vsock-only/linux/af_vsock.h 2011-01-11 22:03:59.066999997 +0100 +@@ -88,4 +88,14 @@ + #endif + } VSockVmciSock; + ++#if (defined CONFIG_PREEMPT_RT && LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31)) || LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) ++ #ifndef DECLARE_MUTEX ++ #define DECLARE_MUTEX(_m) DEFINE_SEMAPHORE(_m) ++ #endif ++ #ifndef init_MUTEX ++ #define init_MUTEX(_m) sema_init(_m,1) ++ #endif ++#endif ++ ++ + #endif /* __AF_VSOCK_H__ */ diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild index 85c24384fe9f..f64deca32eb4 100644 --- a/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild +++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2010 Gentoo Foundation +# 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-1.0.0.25-r2.ebuild,v 1.2 2010/11/21 15:58:59 vadimk Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild,v 1.3 2011/01/13 21:01:38 vadimk Exp $ EAPI="2" diff --git a/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild new file mode 100644 index 000000000000..ce662b89bc3b --- /dev/null +++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r3.ebuild @@ -0,0 +1,82 @@ +# 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-1.0.0.25-r3.ebuild,v 1.1 2011/01/13 21:01:38 vadimk Exp $ + +EAPI="2" + +inherit eutils flag-o-matic linux-mod + +DESCRIPTION="VMware kernel modules" +HOMEPAGE="http://www.vmware.com/" + +SRC_URI="x86? ( + mirror://gentoo/${P}.x86.tar.bz2 + http://dev.gentoo.org/~vadimk/${P}.x86.tar.bz2 + ) + amd64? ( + 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_V65" # 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" + epatch "${FILESDIR}/sched_h-2.6.32.patch" + epatch "${FILESDIR}/${PV}-autoconf-generated.patch" + epatch "${FILESDIR}/apic.patch" + kernel_is ge 2 6 35 && epatch "${FILESDIR}/${PV}-sk_sleep.patch" + kernel_is ge 2 6 36 && epatch "${FILESDIR}/${PV}-unlocked_ioctl.patch" + kernel_is 2 6 37 && epatch "${FILESDIR}/${PV}-sema.patch" + + sed -i -e 's/make/$(MAKE)/g' {vmmon,vsock,vmblock,vmnet,vmci}-only/Makefile\ + || die "Sed failed." +} + +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 +} |