summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2017-10-17 11:12:26 +0200
committerLars Wendler <polynomial-c@gentoo.org>2017-10-17 11:12:26 +0200
commitd7e5ba6b61d6464079306a454e84b49dc0386664 (patch)
tree35712a7601c5c7e4c7eee8a172c0a97711651965 /x11-drivers/xf86-video-virtualbox
parentvirtualbox packages: Bump to version 5.1.30 (diff)
downloadgentoo-d7e5ba6b61d6464079306a454e84b49dc0386664.tar.gz
gentoo-d7e5ba6b61d6464079306a454e84b49dc0386664.tar.bz2
gentoo-d7e5ba6b61d6464079306a454e84b49dc0386664.zip
virtualbox packages: removed old.
Package-Manager: Portage-2.3.11, Repoman-2.3.3
Diffstat (limited to 'x11-drivers/xf86-video-virtualbox')
-rw-r--r--x11-drivers/xf86-video-virtualbox/Manifest2
-rw-r--r--x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3-vboxvideo_drm.makefile240
-rw-r--r--x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.1.4-Makefile.module.kms.patch11
-rw-r--r--x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.16.ebuild181
-rw-r--r--x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.40.ebuild190
5 files changed, 0 insertions, 624 deletions
diff --git a/x11-drivers/xf86-video-virtualbox/Manifest b/x11-drivers/xf86-video-virtualbox/Manifest
index a025d9ebc351..a290de746330 100644
--- a/x11-drivers/xf86-video-virtualbox/Manifest
+++ b/x11-drivers/xf86-video-virtualbox/Manifest
@@ -1,5 +1,3 @@
-DIST VirtualBox-5.0.16.tar.bz2 111062984 SHA256 f5a44d33a1db911f445b2eb2d22d9293a96a535cba488b5a235577ef868fa63c SHA512 3da3a227360fb50d299e99770378f65e8cb99525377343fa8faff2360be66643d46f68323d6a8b8d4d26182082f171bb35ab2497167bf6df18827a5ea7742074 WHIRLPOOL ea709057c588f28820790c2b193decba9ee0c57e0f82aa4361ca87aef661315182e18b5ee29558e47ed92f6037eb91befa5390680661a7b9f2248c7819b4a85c
-DIST VirtualBox-5.0.40.tar.bz2 112997095 SHA256 e4275b7ada40b358e6e3bd1231b3a320aa06c72ae301283cac5adb42eaa8e4b5 SHA512 70cd4355591c5aed82148954bf55637a5dcdd1a5177dba78192e7c6eadfbf3f7023f352ba8f89d9eb3c3fc55b049f7c76af6bc94e04d1766d7fbe39e51a1393c WHIRLPOOL 9f471e63814c9d48063857f3b95410f5acdd4a3bd2716c525f2449f1eae95d0e91dbe5422374a49f31f8219daa155f716455f0259d131d93afb5cd9e13a7d467
DIST VirtualBox-5.1.26.tar.bz2 115915813 SHA256 b5715035e681a11ef1475f83f9503d34a00f0276b89c572eebec363dda80c8a9 SHA512 680e9646a51a0a5923b3ded10007ee1c1e2a41c6d8a961d2b2540db6578bed2847154f4cac87e3cfe1118a62595b47c7df99da854f6c340e173b9eb8cacf2add WHIRLPOOL 9d7950ec3ec2cd9b8aaa0ea319f9f5089eed7d2cd2879d313426b448a27570b5582235aa46c5ad5a0fd4d0b967f8d58a963f001549232136d6a8609262af71d0
DIST VirtualBox-5.1.28.tar.bz2 116427658 SHA256 ce7d4bf6535f70e3214abeb4866f7a8634aa3c7b6dedf8825e6ad80bd821398d SHA512 5c21fd535424d7fd9adbb51894ec6d37ecf00a63a850362bd7b61fedca5031e096641814130a97ad839c0bd7089dc3dc465509615aab2af3c5735ff71005670a WHIRLPOOL 2e3fbeb39083c2e69fb23200570781a8845780a6295553af48fa9155db132e37d0fc2fb26e8a45c52864f69f02e8a0d0cbd4c895e5fbb87ab9a51dd60c7c7904
DIST VirtualBox-5.1.30.tar.bz2 116510730 SHA256 6059b0986c9cdacc533177867634a76331ceccdcd46dddd111a50d1c42846d0b SHA512 6c44d9593f4815644a484b306e621fe7eca224002f85d89c00f2470300f2c78dbfe50ffda61d2c2465df14ca77c70a2ab86f1a05116feeee9f5833857eb18dee WHIRLPOOL dc1701211cc8247cb23800557cf7e2d34e5063806c5b22cd2c38454531ca390902fd6a764bfc17d14d33ec055de2d924853c9ed6c3ba29fb7998455f06109b6f
diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3-vboxvideo_drm.makefile b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3-vboxvideo_drm.makefile
deleted file mode 100644
index a09e58c0075b..000000000000
--- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3-vboxvideo_drm.makefile
+++ /dev/null
@@ -1,240 +0,0 @@
-#
-# VirtualBox Guest Additions Module Makefile.
-#
-# (For 2.6.x this file must be 'Makefile'!)
-#
-# Copyright (C) 2006-2007 Sun Microsystems, Inc.
-#
-# This file is part of VirtualBox Open Source Edition (OSE), as
-# available from http://www.virtualbox.org. This file is free software;
-# you can redistribute it and/or modify it under the terms of the GNU
-# General Public License (GPL) as published by the Free Software
-# Foundation, in version 2 as it comes in the "COPYING" file of the
-# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
-# Clara, CA 95054 USA or visit http://www.sun.com if you need
-# additional information or have any questions.
-#
-
-## @todo We must make this into a common template *soon*.
-
-#
-# First, figure out which architecture we're targeting and the build type.
-# (We have to support basic cross building (ARCH=i386|x86_64).)
-# While at it, warn about BUILD_* vars found to help with user problems.
-#
-ifeq ($(filter-out x86_64 amd64 AMD64,$(shell uname -m)),)
- BUILD_TARGET_ARCH_DEF := amd64
-else
- BUILD_TARGET_ARCH_DEF := x86
-endif
-ifneq ($(filter-out amd64 x86,$(BUILD_TARGET_ARCH)),)
- $(warning Ignoring unknown BUILD_TARGET_ARCH value '$(BUILD_TARGET_ARCH)'.)
- BUILD_TARGET_ARCH :=
-endif
-ifeq ($(BUILD_TARGET_ARCH),)
- ifeq ($(ARCH),x86_64)
- BUILD_TARGET_ARCH := amd64
- else
- ifeq ($(ARCH),i386)
- BUILD_TARGET_ARCH := x86
- else
- BUILD_TARGET_ARCH := $(BUILD_TARGET_ARCH_DEF)
- endif
- endif
-else
- ifneq ($(BUILD_TARGET_ARCH),$(BUILD_TARGET_ARCH_DEF))
- $(warning Using BUILD_TARGET_ARCH='$(BUILD_TARGET_ARCH)' from the $(origin BUILD_TARGET_ARCH).)
- endif
-endif
-
-ifneq ($(filter-out release profile debug strict,$(BUILD_TYPE)),)
- $(warning Ignoring unknown BUILD_TYPE value '$(BUILD_TYPE)'.)
- BUILD_TYPE :=
-endif
-ifeq ($(BUILD_TYPE),)
- BUILD_TYPE := release
-else
- ifneq ($(BUILD_TYPE),release)
- $(warning Using BUILD_TYPE='$(BUILD_TYPE)' from the $(origin BUILD_TYPE).)
- endif
-endif
-
-EXTRA_CFLAGS = -fshort-wchar
-
-ifneq ($(MAKECMDGOALS),clean)
-
-ifeq ($(KERNELRELEASE),)
-
- #
- # building from this directory
- #
-
- # kernel base directory
- ifndef KERN_DIR
- KERN_DIR := /lib/modules/$(shell uname -r)/build
- ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
- KERN_DIR := /usr/src/linux
- ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
- $(error Error: unable to find the sources of your current Linux kernel. \
- Specify KERN_DIR=<directory> and run Make again)
- endif
- $(warning Warning: using /usr/src/linux as the source directory of your \
- Linux kernel. If this is not correct, specify \
- KERN_DIR=<directory> and run Make again.)
- endif
- else
- ifneq ($(shell if test -d $(KERN_DIR); then echo yes; fi),yes)
- $(error Error: KERN_DIR does not point to a directory)
- endif
- endif
-
- # includes
- ifndef KERN_INCL
- KERN_INCL = $(KERN_DIR)/include
- endif
- ifneq ($(shell if test -d $(KERN_INCL); then echo yes; fi),yes)
- $(error Error: unable to find the include directory for your current Linux \
- kernel. Specify KERN_INCL=<directory> and run Make again)
- endif
-
- # module install dir.
- ifneq ($(filter install install_rpm,$(MAKECMDGOALS)),)
- ifndef MODULE_DIR
- MODULE_DIR_TST := /lib/modules/$(shell uname -r)
- ifeq ($(shell if test -d $(MODULE_DIR_TST); then echo yes; fi),yes)
- MODULE_DIR := $(MODULE_DIR_TST)/misc
- else
- $(error Unable to find the folder to install the DRM driver to)
- endif
- endif # MODULE_DIR unspecified
- endif
-
- # guess kernel version (24 or 26)
- ifeq ($(shell if grep '"2\.4\.' $(KERN_INCL)/linux/version.h > /dev/null; then echo yes; fi),yes)
- KERN_VERSION := 24
- else
- KERN_VERSION := 26
- endif
-
-else # neq($(KERNELRELEASE),)
-
- #
- # building from kbuild (make -C <kernel_directory> M=`pwd`)
- #
-
- # guess kernel version (24 or 26)
- ifeq ($(shell if echo "$(VERSION).$(PATCHLEVEL)." | grep '2\.4\.' > /dev/null; then echo yes; fi),yes)
- KERN_VERSION := 24
- else
- KERN_VERSION := 26
- endif
-
-endif # neq($(KERNELRELEASE),)
-
-# debug - show guesses.
-ifdef DEBUG
-$(warning dbg: KERN_DIR = $(KERN_DIR))
-$(warning dbg: KERN_INCL = $(KERN_INCL))
-$(warning dbg: MODULE_DIR = $(MODULE_DIR))
-$(warning dbg: KERN_VERSION = $(KERN_VERSION))
-endif
-
-KBUILD_VERBOSE ?= 1
-
-#
-# Compiler options
-#
-ifndef INCL
- INCL := $(addprefix -I,$(KERN_INCL) $(EXTRA_INCL))
- ifndef KBUILD_EXTMOD
- KBUILD_EXTMOD := $(shell pwd)
- endif
- INCL += $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
- export INCL
-endif
-KFLAGS := -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 \
- -DIN_SUP_R0 -DVBOX -DVBOX_WITH_HGCM -DLOG_TO_BACKDOOR -DIN_MODULE \
- -DIN_GUEST_R0
-ifeq ($(BUILD_TARGET_ARCH),amd64)
- KFLAGS += -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS
-else
- KFLAGS += -DRT_ARCH_X86
-endif
-ifeq ($(BUILD_TYPE),debug)
-KFLAGS += -DDEBUG
-endif
-
-# override is required by the Debian guys
-override MODULE = vboxvideo
-OBJS = vboxvideo_drm.o
-
-ifeq ($(KERN_VERSION), 24)
-#
-# 2.4
-#
-
-CFLAGS := -O2 -DVBOX_LINUX_2_4 $(INCL) $(KFLAGS) $(KDEBUG)
-MODULE_EXT := o
-
-# 2.4 Module linking
-$(MODULE).o: $(OBJS)
- $(LD) -o $@ -r $(OBJS)
-
-.PHONY: $(MODULE)
-all: $(MODULE)
-$(MODULE): $(MODULE).o
-
-else
-#
-# 2.6 and later
-#
-
-MODULE_EXT := ko
-
-$(MODULE)-y := $(OBJS)
-
-# special hack for Fedora Core 6 2.6.18 (fc6), rhel5 2.6.18 (el5),
-# ClarkConnect 4.3 (cc4) and ClarkConnect 5 (v5)
-ifeq ($(KERNELRELEASE),)
- KFLAGS += $(foreach inc,$(KERN_INCL),\
- $(if $(wildcard $(inc)/linux/utsrelease.h),\
- $(if $(shell grep '"2.6.18.*fc6.*"' $(inc)/linux/utsrelease.h; \
- grep '"2.6.18.*el5.*"' $(inc)/linux/utsrelease.h; \
- grep '"2.6.18.*v5.*"' $(inc)/linux/utsrelease.h; \
- grep '"2.6.18.*cc4.*"' $(inc)/linux/utsrelease.h),\
- -DKERNEL_FC6,),))
-else
- KFLAGS += $(if $(shell echo "$(KERNELRELEASE)"|grep '2.6.18.*fc6.*';\
- echo "$(KERNELRELEASE)"|grep '2.6.18.*el5.*';\
- echo "$(KERNELRELEASE)"|grep '2.6.18.*v5.*';\
- echo "$(KERNELRELEASE)"|grep '2.6.18.*cc4.*'),\
- -DKERNEL_FC6,)
-endif
-
-# build defs
-EXTRA_CFLAGS += $(INCL) $(KFLAGS) $(KDEBUG)
-
-all: $(MODULE)
-
-obj-m += $(MODULE).o
-
-$(MODULE):
- $(MAKE) KBUILD_VERBOSE=$(KBUILD_VERBOSE) -C $(KERN_DIR) SUBDIRS=$(CURDIR) SRCROOT=$(CURDIR) modules
-
-endif
-
-install: $(MODULE)
- @mkdir -p $(MODULE_DIR); \
- install -m 0664 -o root -g root $(MODULE).$(MODULE_EXT) $(MODULE_DIR); \
- PATH="$(PATH):/bin:/sbin" depmod -ae;
-
-endif # eq($(MAKECMDGOALS),clean)
-
-# important: Don't remove Module.symvers! DKMS does 'make clean' before building ...
-clean:
- for f in . linux r0drv r0drv/linux; do rm -f $$f/*.o $$f/.*.cmd $$f/.*.flags; done
- rm -rf .vboxvideo* .tmp_ver* vboxvideo.* Modules.symvers modules.order
-
diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.1.4-Makefile.module.kms.patch b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.1.4-Makefile.module.kms.patch
deleted file mode 100644
index f34ac667d0e4..000000000000
--- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.1.4-Makefile.module.kms.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/VBox/Additions/linux/drm/Makefile.module.kms
-+++ b/src/VBox/Additions/linux/drm/Makefile.module.kms
-@@ -43,7 +43,7 @@ else
- MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h
- endif
- MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(MANGLING) -fno-pie
--MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include)
-+MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux)
- # What on earth is this?
- MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include)
- MOD_INCL += -Iinclude/drm
diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.16.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.16.ebuild
deleted file mode 100644
index 25dabb13925d..000000000000
--- a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.16.ebuild
+++ /dev/null
@@ -1,181 +0,0 @@
-# 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"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="
- <x11-base/xorg-server-1.19:=[-minimal]
- x11-libs/libXcomposite
- ${PYTHON_DEPS}"
-DEPEND="${RDEPEND}
- >=dev-util/kbuild-0.1.9998_pre20131130
- >=dev-lang/yasm-0.6.2
- >=sys-devel/gcc-4.9.0
- sys-power/iasl
- x11-proto/fontsproto
- x11-proto/randrproto
- x11-proto/renderproto
- x11-proto/resourceproto
- x11-proto/scrnsaverproto
- x11-proto/xextproto
- x11-proto/xineramaproto
- x11-proto/xproto
- x11-libs/libXdmcp
- x11-libs/libXau
- x11-libs/libX11
- x11-libs/libXfixes
- x11-libs/libXext
- dri? ( x11-proto/xf86driproto
- >=x11-libs/libdrm-2.4.5 )"
-
-BUILD_TARGETS="all"
-BUILD_TARGET_ARCH="${ARCH}"
-MODULE_NAMES="vboxvideo(misc:${WORKDIR}/vboxvideo_drm:${WORKDIR}/vboxvideo_drm)"
-
-PATCHES=(
- # Ugly hack to build the opengl part of the video driver
- "${FILESDIR}/${PN}-2.2.0-enable-opengl.patch"
-
- # unset useless/problematic checks in configure
- "${FILESDIR}/${PN}-5.0.0_beta3-configure_checks.patch"
-)
-
-S="${WORKDIR}/${MY_P}"
-
-QA_TEXTRELS_x86="usr/lib/VBoxOGL.so"
-
-pkg_setup() {
- if [ "${MERGE_TYPE}" != "binary" ]; then
- version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}"
- fi
-
- linux-mod_pkg_setup
- BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Prepare the vboxvideo_drm sources and Makefile in ${WORKDIR}
- cp -a "${S}"/src/VBox/Additions/linux/drm "${WORKDIR}/vboxvideo_drm" \
- || die "cannot copy vboxvideo_drm directory"
- cp "${FILESDIR}/${PN}-3-vboxvideo_drm.makefile" \
- "${WORKDIR}/vboxvideo_drm/Makefile" \
- || die "cannot copy vboxvideo_drm Makefile"
-
- # stupid new header references...
- for vboxheader in {product,version}-generated.h ; do
- ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
- "${WORKDIR}/vboxvideo_drm/${vboxheader}"
- done
-
- # Remove shipped binaries (kBuild,yasm), see bug #232775
- rm -r kBuild/bin tools || die
-
- # Disable things unused or splitted into separate ebuilds
- cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
-
- # Remove pointless GCC version check
- sed -e '/^check_gcc$/d' -i configure || die
-
- default
-
- # link with lazy on hardened #394757
- sed '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' \
- -i Config.kmk || die
-}
-
-src_configure() {
- # build the user-space tools, warnings are harmless
- local cmd=(
- ./configure
- --nofatal
- --disable-xpcom
- --disable-sdl-ttf
- --disable-pulse
- --disable-alsa
- --with-gcc="$(tc-getCC)"
- --with-g++="$(tc-getCXX)"
- --target-arch=${ARCH}
- --with-linux="${KV_OUT_DIR}"
- --build-headless
- )
- echo "${cmd[@]}"
- "${cmd[@]}" || die "configure failed"
- source ./env.sh
- export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
-}
-
-src_compile() {
- for each in /src/VBox/{Runtime,Additions/common/VBoxGuestLib} \
- /src/VBox/{GuestHost/OpenGL,Additions/x11/x11stubs,Additions/common/crOpenGL} \
- /src/VBox/Additions/x11/vboxvideo ; do
- cd "${S}"${each} || die
- MAKE="kmk" \
- emake TOOL_YASM_AS=yasm \
- VBOX_USE_SYSTEM_XORG_HEADERS=1 \
- KBUILD_PATH="${S}/kBuild" \
- KBUILD_VERBOSE=2
- done
-
- if use dri ; then
- # Now creating the kernel modules. We must do this _after_
- # we compiled the user-space tools as we need two of the
- # automatically generated header files. (>=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
-}
diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.40.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.40.ebuild
deleted file mode 100644
index b8937614e94c..000000000000
--- a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.40.ebuild
+++ /dev/null
@@ -1,190 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-inherit eutils 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 X11 video driver for Gentoo guest"
-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"
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-RDEPEND="
- <x11-base/xorg-server-1.19:=[-minimal]
- x11-libs/libXcomposite
- ${PYTHON_DEPS}"
-DEPEND="${RDEPEND}
- >=dev-lang/yasm-0.6.2
- >=dev-util/kbuild-0.1.9998_pre20131130
- >=sys-devel/gcc-4.9.0
- sys-power/iasl
- x11-proto/fontsproto
- x11-proto/randrproto
- x11-proto/renderproto
- x11-proto/resourceproto
- x11-proto/scrnsaverproto
- x11-proto/xextproto
- x11-proto/xineramaproto
- x11-proto/xproto
- x11-libs/libXdmcp
- x11-libs/libXau
- x11-libs/libX11
- x11-libs/libXfixes
- x11-libs/libXext
- dri? ( x11-proto/xf86driproto
- >=x11-libs/libdrm-2.4.5 )"
-PDEPEND="dri? ( ~app-emulation/virtualbox-guest-additions-${PV} )"
-
-BUILD_TARGETS="all"
-BUILD_TARGET_ARCH="${ARCH}"
-S="${WORKDIR}/${MY_P}"
-MODULES_SRC_DIR="${S}/src/VBox/Additions/linux/drm"
-
-PATCHES=(
- # Ugly hack to build the opengl part of the video driver
- "${FILESDIR}/${PN}-2.2.0-enable-opengl.patch"
-
- # unset useless/problematic checks in configure
- "${FILESDIR}/${PN}-5.0.0_beta3-configure_checks.patch"
-)
-
-QA_TEXTRELS_x86="usr/lib/VBoxOGL.so"
-
-pkg_setup() {
- if [ "${MERGE_TYPE}" != "binary" ]; then
- version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}"
- fi
-
- python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Prepare the vboxvideo_drm Makefiles and build dir
- eapply "${FILESDIR}"/${PN}-5.1.4-Makefile.module.kms.patch
-
- # Remove shipped binaries (kBuild,yasm), see bug #232775
- rm -r kBuild/bin tools || die
-
- # Disable things unused or splitted into separate ebuilds
- cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
-
- # Remove pointless GCC version check
- sed -e '/^check_gcc$/d' -i configure || die
-
- default
-
- # link with lazy on hardened #394757
- sed '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' \
- -i Config.kmk || die
-}
-
-src_configure() {
- # build the user-space tools, warnings are harmless
- local cmd=(
- ./configure
- --nofatal
- --disable-xpcom
- --disable-sdl-ttf
- --disable-pulse
- --disable-alsa
- --with-gcc="$(tc-getCC)"
- --with-g++="$(tc-getCXX)"
- --target-arch=${ARCH}
- --with-linux="${KV_OUT_DIR}"
- --build-headless
- )
- echo "${cmd[@]}"
- "${cmd[@]}" || die "configure failed"
- source ./env.sh
- export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
-}
-
-src_compile() {
- local each targets=(
- Runtime
- Additions/common/VBoxGuestLib
- GuestHost/OpenGL
- Additions/x11/x11stubs
- Additions/common/crOpenGL
- Additions/x11/vboxvideo
- )
-
- # need to use the upstream build system to create necessary objects properly
- use dri && targets+=( Additions/linux/drm )
-
- for each in ${targets[@]} ; do
- pushd "${S}"/src/VBox/${each} &>/dev/null || die
- MAKE="kmk" \
- emake TOOL_YASM_AS=yasm \
- VBOX_USE_SYSTEM_XORG_HEADERS=1 \
- KBUILD_PATH="${S}/kBuild" \
- KBUILD_VERBOSE=2
- popd &>/dev/null || die
- done
-
- if use dri; then
- local objdir="out/linux.${ARCH}/release/obj/vboxvideo_drm"
- # We need a Makefile, so use Makefile.module.kms
- ln -s Makefile.module.kms "${MODULES_SRC_DIR}"/Makefile || die
- # All of these are expected to be in $(KBUILD_EXTMOD)/ so symlink them into place
- targets=(
- include
- src/VBox/Runtime/r0drv
- src/VBox/Installer/linux/Makefile.include.{head,foot}er
- out/linux.${ARCH}/release/{product,version,revision}-generated.h
- )
- for each in ${targets[@]} ; do
- ln -s "${S}"/${each} \
- "${MODULES_SRC_DIR}"/${each##*/} || die
- done
- # see the vboxvideo_drm_SOURCES list in Makefile.kmk for the below,
- # and replace '..' with 'dt'
- targets=(
- dt/dt/common/VBoxVideo/HGSMIBase.o
- dt/dt/common/VBoxVideo/Modesetting.o
- dt/dt/common/VBoxVideo/VBVABase.o
- dt/dt/dt/GuestHost/HGSMI/HGSMICommon.o
- dt/dt/dt/GuestHost/HGSMI/HGSMIMemAlloc.o
- dt/dt/dt/Runtime/common/alloc/heapoffset.o
- )
- for each in ${targets[@]} ; do
- ln -s "${S}"/${objdir}/${each} \
- "${MODULES_SRC_DIR}" || die
- ln -s "${S}"/${objdir}/${each}.dep \
- "${MODULES_SRC_DIR}" || die
- done
- fi
-}
-
-src_install() {
- cd "${S}/out/linux.${ARCH}/release/bin/additions" || die
- 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\")"
-}