# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-4.3.0.ebuild,v 1.2 2013/10/15 14:17:18 polynomial-c Exp $ EAPI=5 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 # # xorg-server-1.14.x if has_version ">=x11-base/xorg-server-1.13.99" ; then newins vboxvideo_drv_114.so vboxvideo_drv.so # xorg-server-1.13.x elif has_version ">=x11-base/xorg-server-1.12.99" ; then newins vboxvideo_drv_113.so vboxvideo_drv.so # xorg-server-1.12.x elif has_version ">=x11-base/xorg-server-1.12" ; then newins vboxvideo_drv_112.so vboxvideo_drv.so # xorg-server-1.11.x elif has_version ">=x11-base/xorg-server-1.11" ; then newins vboxvideo_drv_111.so vboxvideo_drv.so # xorg-server-1.10.x elif has_version ">=x11-base/xorg-server-1.10" ; then newins vboxvideo_drv_110.so vboxvideo_drv.so # xorg-server-1.9.x else newins vboxvideo_drv_19.so vboxvideo_drv.so fi # 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 }