From fb89d0263a9b10f4467d892d785e3b55b527c6d5 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Fri, 25 Nov 2016 18:25:50 -0500 Subject: [PATCH] app-emulation/open-vm-tools: optionally build kernel modules The build system does some crazy stuff that is difficult to replicate in open-vm-tools-kmod. Package-Manager: portage-2.3.2_p8 --- .../open-vm-tools/open-vm-tools-10.1.0.ebuild | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app-emulation/open-vm-tools/open-vm-tools-10.1.0.ebuild b/app-emulation/open-vm-tools/open-vm-tools-10.1.0.ebuild index 2c653a565857..11dd15e4ff89 100644 --- a/app-emulation/open-vm-tools/open-vm-tools-10.1.0.ebuild +++ b/app-emulation/open-vm-tools/open-vm-tools-10.1.0.ebuild @@ -3,8 +3,9 @@ # $Id$ EAPI=6 +MODULES_OPTIONAL_USE="modules" -inherit autotools flag-o-matic pam systemd toolchain-funcs user +inherit autotools linux-mod pam systemd toolchain-funcs user DESCRIPTION="Opensourced tools for VMware guests" HOMEPAGE="https://github.com/vmware/open-vm-tools" @@ -71,7 +72,6 @@ src_configure() { --disable-tests --with-procps --with-dnet - --without-kernel-modules $(use_enable doc docs) $(use_enable grabbitmqproxy) $(use_enable vgauth) @@ -84,6 +84,10 @@ src_configure() { $(use_with X gtk3) $(use_with X gtkmm3) $(use_with X x) + + $(use_with modules kernel-modules) + --without-root-privileges + --with-kernel-release="${KV_FULL}" ) econf "${myeconfargs[@]}" @@ -92,6 +96,11 @@ src_configure() { find . -name Makefile -exec sed -i -e 's/-Werror//g' '{}' + || die "sed out Werror failed" } +src_compile() { + use modules && set_arch_to_kernel + default +} + src_install() { default prune_libtool_files --modules @@ -117,4 +126,5 @@ src_install() { pkg_postinst() { enewgroup vmware + linux-mod_pkg_postinst } -- 2.26.2