summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-08-11 14:04:11 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-08-11 14:04:11 +0000
commit40752999790cc744a4a311c166559da6792ab208 (patch)
tree31f528005043335a88e2b2fe1ba4bef8af9c2e8e /eclass
parentStop hardcoding /lib/udev in src/lib/dev.c and redefine udevdir for install t... (diff)
downloadgentoo-2-40752999790cc744a4a311c166559da6792ab208.tar.gz
gentoo-2-40752999790cc744a4a311c166559da6792ab208.tar.bz2
gentoo-2-40752999790cc744a4a311c166559da6792ab208.zip
Stop hardcoding /etc/udev and respect udevdir from udev.pc pkg-cpnfig file.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/vmware-mod.eclass16
1 files changed, 11 insertions, 5 deletions
diff --git a/eclass/vmware-mod.eclass b/eclass/vmware-mod.eclass
index 495ff58cd2d7..116111a0433b 100644
--- a/eclass/vmware-mod.eclass
+++ b/eclass/vmware-mod.eclass
@@ -1,12 +1,12 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vmware-mod.eclass,v 1.20 2012/07/01 19:43:30 vadimk Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vmware-mod.eclass,v 1.21 2012/08/11 14:04:11 ssuominen Exp $
# @DEAD
# Ensure vmware comes before linux-mod since we want linux-mod's pkg_preinst and
# pkg_postinst, along with our own pkg_setup, src_unpack and src_compile
-inherit flag-o-matic eutils vmware linux-mod
+inherit flag-o-matic eutils vmware linux-mod toolchain-funcs
DESCRIPTION="Modules for Vmware Programs"
HOMEPAGE="http://www.vmware.com/"
@@ -20,6 +20,10 @@ LICENSE="vmware"
SLOT="0"
IUSE=""
+RDEPEND=""
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
# Provide vaguely sensible defaults
[[ -z "${VMWARE_VER}" ]] && VMWARE_VER="VME_V55"
VMWARE_MOD_DIR="${ANY_ANY}"
@@ -92,9 +96,11 @@ vmware-mod_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
+ local udevdir=/lib/udev
+ has_version sys-fs/udev && udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
+ dodir "${udevdir}"/rules.d
+ echo 'KERNEL=="vmmon*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/${udevdir}"/rules.d/60-vmware.rules || die
+ echo 'KERNEL=="vmnet*", GROUP="'$VMWARE_GROUP'" MODE=660' >> "${D}/${udevdir}"/rules.d/60-vmware.rules || die
fi
linux-mod_src_install