# 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.1.24.ebuild,v 1.4 2013/03/11 14:56:11 polynomial-c Exp $ EAPI=2 inherit eutils linux-mod multilib python versionator toolchain-funcs MY_P=VirtualBox-${PV} DESCRIPTION="VirtualBox video driver" HOMEPAGE="http://www.virtualbox.org/" SRC_URI="http://download.virtualbox.org/virtualbox/${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.13.x if has_version ">=x11-base/xorg-server-1.13" ; 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* || die 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 }