# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 PYTHON_COMPAT=( python2_7 ) inherit eutils linux-mod multilib python-single-r1 versionator toolchain-funcs MY_PV="${PV/beta/BETA}" MY_PV="${MY_PV/rc/RC}" MY_P=VirtualBox-${MY_PV} DESCRIPTION="VirtualBox video driver" HOMEPAGE="http://www.virtualbox.org/" SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="dri" RDEPEND="=3.2.0) linux-mod_src_compile fi } src_install() { if use dri; then linux-mod_src_install fi cd "${S}/out/linux.${ARCH}/release/bin/additions" insinto /usr/$(get_libdir)/xorg/modules/drivers newins vboxvideo_drv_system.so vboxvideo_drv.so # Guest OpenGL driver insinto /usr/$(get_libdir) doins -r VBoxOGL* if use dri ; then dosym /usr/$(get_libdir)/VBoxOGL.so \ /usr/$(get_libdir)/dri/vboxvideo_dri.so fi } pkg_postinst() { elog "You need to edit the file /etc/X11/xorg.conf and set:" elog "" elog " Driver \"vboxvideo\"" elog "" elog "in the Graphics device section (Section \"Device\")" elog "" if use dri; then elog "To use the kernel drm video driver, please add:" elog "\"vboxvideo\" to:" if has_version sys-apps/openrc ; then elog "/etc/conf.d/modules" else elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" fi elog "" fi }