summaryrefslogtreecommitdiff
path: root/x11-drivers/xf86-video-virtualbox
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-03-02 15:59:12 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-03-02 15:59:12 +0000
commit06a7b5647e11a8ddf69b1c3d3ded6a8ba28b923e (patch)
tree8d58c1f4b049da677b33209b072f2b3057268fe0 /x11-drivers/xf86-video-virtualbox
parent99abbc5e5a6ecd3fc981b45646fd8cb5d320377b (diff)
gentoo resync : 02.03.2018
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/xf86-video-virtualbox-5.1.34.ebuild192
2 files changed, 194 insertions, 0 deletions
diff --git a/x11-drivers/xf86-video-virtualbox/Manifest b/x11-drivers/xf86-video-virtualbox/Manifest
index 53c44b25c9f6..507abe696eaf 100644
--- a/x11-drivers/xf86-video-virtualbox/Manifest
+++ b/x11-drivers/xf86-video-virtualbox/Manifest
@@ -4,5 +4,7 @@ AUX xf86-video-virtualbox-5.0.0_beta3-configure_checks.patch 1248 BLAKE2B 449981
AUX xf86-video-virtualbox-5.1.10-xorg119.patch 3375 BLAKE2B 52b6999cffb8b60ceac7949af1d3bb8452e138a9d6f8d84ac6587a121e1a379f9e69a0b9896c83e63c7ebfec26abe2b46e957a25385d04cc8613aec407483906 SHA512 f84cdbb6b43444eda753f6a31b3fe2514152545a7d75569d88f3b2d22542e5d087dfbd735457155f1463449f4e2138382d6f730978bd8d80280ad609dc826718
AUX xf86-video-virtualbox-5.1.24-Makefile.module.kms.patch 533 BLAKE2B 3ef40088fb83096c17944609d4fb7c14b7e7bb39ef0bf08d3bcda2795d4ead8801f06e7761804191ca4eec537bc22f45dcd6085407b1e6ef3ed4227a1fd594b0 SHA512 325a7adca76884e40be17d756ebdee3c8e8565d50a872c7cb2e429d046fd91b44acc6b788abb0eb28ab14594687203894ffe0c2d441c38ea5f87a88e76e87997
DIST VirtualBox-5.1.32.tar.bz2 117268301 BLAKE2B 336df054e3407d7e701d6719258cfcba9beec1439cbe94f137570cfcbdea02df3e34374ac36d3b4387c47ebafd17a0f05c2fb710eb4f140d8200117b505aba98 SHA512 052ac1672515a36c4138e2d52672a466d4c768f219f52eefe98e747a292ebebe04e7de35547eae6803654be5dc937b8e6f4d358a65fd4f49a8333eac8862d138
+DIST VirtualBox-5.1.34.tar.bz2 117291269 BLAKE2B 0eb9b3f778f2d677ac3635fa59dfa6861d0fec3c0331582e5961b78ab55b5ab26bbf286de05a3e87e8a64e2b54861613a8d2c93f70736a07c551dca834786abd SHA512 0f828e58d68678a0a94a39c12313425105f9255ca207d40dd04065d0072857cdc4fc886f944b852c3fb63fed04d70a3449aecd2aab9e27af7f13b506143a4b6f
EBUILD xf86-video-virtualbox-5.1.32.ebuild 5048 BLAKE2B e6214b4d223bd87556921fe320b1603de3cd80256254f9db6e8a60a3773b0212b68e5a5a25fe655fadc32e42b906a0f830e12c64c6a43978bee06e14a7b965f6 SHA512 4ed0f341ca74f86b7a41714d3ffeb7e6871a8362f83fe0a5fa6cb27c827fe88a2fa416d74a155fd05f92e10b79d9f8a0cbd7476e0fcaf7cb87a7b5de3d1813e3
+EBUILD xf86-video-virtualbox-5.1.34.ebuild 5050 BLAKE2B 6c3eb6c9b9004e66b338241fc7155e49765353a9989463e08d5fcbc44a9ea5e8b56f29d52e65681cb0421382d198bdb0eda0cab72350dfc390c49eb18135e29f SHA512 5744ff815d05aa550092d7f877f60a3de571bde0ca4d17433a92b2925d524166768542dc126c60116a7726d0fd69f9d10e57d56f42e57f63ef431af2a6cc7406
MISC metadata.xml 343 BLAKE2B 9e18764cb3f6a1df7858366112557de847f14dd2d7415612da0ebe28895a92a7714d0295f3551ddc62711bf84d5be253ddda3146f6121d52c4f86c05a20ad835 SHA512 88eabdec952f2eee2490f23050b39127f500765f6f93adecb9cfdb62776d73e9dddcdb56756b41041ed4727375ffb0e5f729c219a7de5620344bbee10bbc06c9
diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.34.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.34.ebuild
new file mode 100644
index 000000000000..932d9378fad9
--- /dev/null
+++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.34.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2018 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="https://www.virtualbox.org/"
+SRC_URI="https://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.7:=[-minimal]
+ x11-libs/libXcomposite
+ ${PYTHON_DEPS}"
+DEPEND="${RDEPEND}
+ >=dev-lang/yasm-0.6.2
+ >=dev-util/kbuild-0.1.9998_pre20131130
+ 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"
+
+ # xorg-1.19 patch from opensuse (bug #602784)
+ "${FILESDIR}/${PN}-5.1.10-xorg119.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.24-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\")"
+}