commit:     fb89d0263a9b10f4467d892d785e3b55b527c6d5
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 25 23:25:50 2016 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Nov 25 23:29:13 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb89d026

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

 app-emulation/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 2c653a5..11dd15e 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
 }

Reply via email to