diff options
3 files changed, 119 insertions, 1 deletions
diff --git a/app-emulation/vmware-modules/ChangeLog b/app-emulation/vmware-modules/ChangeLog index 8162f28e5e23..bc067f834735 100644 --- a/app-emulation/vmware-modules/ChangeLog +++ b/app-emulation/vmware-modules/ChangeLog @@ -1,6 +1,12 @@ # 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.60 2010/11/21 13:22:40 vadimk Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-emulation/vmware-modules/ChangeLog,v 1.61 2010/11/21 15:44:04 vadimk Exp $ + +*vmware-modules-1.0.0.25-r2 (21 Nov 2010) + + 21 Nov 2010; Vadim Kuznetsov <vadimk@gentoo.org> + +files/1.0.0.25-unlocked_ioctl.patch, +vmware-modules-1.0.0.25-r2.ebuild: + updated unlocked_ioctl patch 21 Nov 2010; Vadim Kuznetsov <vadimk@gentoo.org> -files/1.0.0.26-ioctl-2.6.36.patch, -files/1.0.0.26-iommu_map.patch, diff --git a/app-emulation/vmware-modules/files/1.0.0.25-unlocked_ioctl.patch b/app-emulation/vmware-modules/files/1.0.0.25-unlocked_ioctl.patch new file mode 100644 index 000000000000..f6250dc2e72f --- /dev/null +++ b/app-emulation/vmware-modules/files/1.0.0.25-unlocked_ioctl.patch @@ -0,0 +1,33 @@ +diff --git a/vmmon-only/linux/driver.c b/vmmon-only/linux/driver.c +index 3cd4923..0d4f6df 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 c83628d..eb4a707 100644 +--- a/vmmon-only/linux/hostif.c ++++ b/vmmon-only/linux/hostif.c +@@ -3411,7 +3413,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; + +@@ -3420,6 +3422,7 @@ HostIFDoIoctl(struct file *filp, + unlock_kernel(); + return err; + } ++#endif + return -ENOIOCTLCMD; + } + 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 new file mode 100644 index 000000000000..0fc78d71e3e6 --- /dev/null +++ b/app-emulation/vmware-modules/vmware-modules-1.0.0.25-r2.ebuild @@ -0,0 +1,79 @@ +# 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-r2.ebuild,v 1.1 2010/11/21 15:44:04 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 35 && epatch "${FILESDIR}/${PV}-unlocked_ioctl.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 +} |