diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-03-11 18:21:29 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-03-11 18:21:29 +0000 |
commit | 20b4366fb7f9b50eb5c57ec34ff07642cb9ed633 (patch) | |
tree | a30185d2de7969c2fc82bcf964b5d4ee96c5da7a | |
parent | 3bfb87033218f1ac65aca7c4e381a0ca737ed92d (diff) |
attempt to fix broken ebuild
7 files changed, 23 insertions, 138 deletions
diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3-localconfig b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3-localconfig deleted file mode 100644 index 535c3f91..00000000 --- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3-localconfig +++ /dev/null @@ -1,30 +0,0 @@ -# -*- Makefile -*- -# -# Overwrite some default kBuild settings -# - -# -# Copyright (C) 2006-2008 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 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. -# - -# don't build testcases to save time, they are not needed for the package -VBOX_WITH_TESTCASES := -VBOX_WITH_TESTSUITE := - -KBUILD_MSG_STYLE := brief - -## paths, origin, hardening -VBOX_WITH_HARDENING := 2 -VBOX_WITH_ORIGIN := -VBOX_ONLY_ADDITIONS := 1 - -TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.release = -TEMPLATE_VBOXGUESTR3XORGMOD_LDFLAGS = $(TEMPLATE_VBOXGUESTR3DLL_LDFLAGS) diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3.2.8-mesa-check.patch b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3.2.8-mesa-check.patch deleted file mode 100644 index 6813a174..00000000 --- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-3.2.8-mesa-check.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- configure -+++ configure -@@ -1225,10 +1225,7 @@ - XCloseDisplay(dpy); - } - EOF -- [ -n "$INCX11" ] && I_INCX11=`prefix_I "$INCX11"` -- if test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs; then -- log_success "found" -- fi -+ test_compile "$LIBX11 $I_INCX11" Xlibs Xlibs - } - - -@@ -1382,21 +1379,6 @@ - #include <GL/glu.h> - extern "C" int main(void) - { -- Display *dpy; -- int major, minor; -- -- dpy = XOpenDisplay(NULL); -- if (dpy) -- { -- Bool glx_version = glXQueryVersion(dpy, &major, &minor); -- XCloseDisplay(dpy); -- if (glx_version) -- { -- printf("found version %u.%u, OK.\n", major, minor); -- return 0; -- } -- } -- printf("found (inactive), OK.\n"); - return 0; - } - EOF diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4-makeself-check.patch b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4-makeself-check.patch deleted file mode 100644 index e1fcb8c2..00000000 --- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4-makeself-check.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- VirtualBox-4.0.0_OSE/configure -+++ VirtualBox-4.0.0_OSE/configure -@@ -2527,7 +2527,6 @@ - check_compiler_h - [ "$BUILD_MACHINE" = "amd64" -a $WITH_VMMRAW -eq 1 ] && check_32bit - # tools/common/makeself* -- [ $OSE -ge 1 ] && check_makeself - fi - - [ -n "$SETUP_WINE" ] && setup_wine diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4-mkisofs-check.patch b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4-mkisofs-check.patch deleted file mode 100644 index 8b0d5912..00000000 --- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4-mkisofs-check.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- VirtualBox-4.0.0_OSE/configure -+++ VirtualBox-4.0.0_OSE/configure -@@ -2499,7 +2499,6 @@ - # don't check for yasm for the time beeing as 0.40 and 0.50 both have known bugs - # [ "$OS" != "darwin" ] && check_yasm - [ "$OS" != "darwin" ] && check_xsltproc --[ "$OS" != "darwin" ] && check_mkisofs - - # the libraries - [ "$OS" != "darwin" ] && check_pthread diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4.3.8-vboxvideo_compilefixes.patch b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4.3.8-vboxvideo_compilefixes.patch deleted file mode 100644 index 23be8a5c..00000000 --- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-4.3.8-vboxvideo_compilefixes.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- VirtualBox-4.3.8/src/VBox/Additions/x11/vboxvideo/vboxvideo.h -+++ VirtualBox-4.3.8/src/VBox/Additions/x11/vboxvideo/vboxvideo.h -@@ -105,7 +105,6 @@ - #define VBOX_NAME "VBoxVideo" - #define VBOX_DRIVER_NAME "vboxvideo" - --#ifdef VBOX_DRI_OLD - /* DRI support */ - #define _XF86DRI_SERVER_ - /* Hack to work around a libdrm header which is broken on Solaris */ -@@ -120,7 +119,6 @@ - /* For some reason this is not in the header files. */ - extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, - void **configprivs); --#endif - - #define VBOX_VIDEO_MAJOR 1 - #define VBOX_VIDEO_MINOR 0 -@@ -191,12 +189,10 @@ - Bool fAnyX; - #ifdef VBOX_DRI - Bool useDRI; --#ifdef VBOX_DRI_OLD - int cVisualConfigs; - __GLXvisualConfig *pVisualConfigs; - DRIInfoRec *pDRIInfo; - int drmFD; --# endif - #endif - } VBOXRec, *VBOXPtr; - diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.0.20-Makefile.module.kms.patch b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.0.20-Makefile.module.kms.patch deleted file mode 100644 index dd05a4a7..00000000 --- a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.0.20-Makefile.module.kms.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/VBox/Additions/linux/drm/Makefile.module.kms 2016-04-28 09:08:06.000000000 -0400 -+++ b/src/VBox/Additions/linux/drm/Makefile.module.kms 2016-05-03 15:11:22.134971872 -0400 -@@ -38,7 +38,7 @@ - MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h - endif - MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(MANGLING) --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.1.14.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.14.ebuild index 1a70106f..132bac26 100644 --- a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.14.ebuild +++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.14.ebuild @@ -1,6 +1,5 @@ # Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ EAPI=6 @@ -19,8 +18,8 @@ SLOT="0" KEYWORDS="amd64 x86" IUSE="+dri" -RDEPEND="=sys-kernel/virtualbox-guest-dkms-${PV} - >=x11-base/xorg-server-1.7:=[-minimal] +RDEPEND=">=x11-base/xorg-server-1.7:=[-minimal] + =sys-kernel/virtualbox-guest-dkms-${PV} x11-libs/libXcomposite" DEPEND="${RDEPEND} ${PYTHON_DEPS} @@ -46,7 +45,10 @@ PDEPEND="dri? ( ~app-emulation/virtualbox-guest-additions-${PV} )" REQUIRED_USE=( "${PYTHON_REQUIRED_USE}" ) +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 @@ -70,22 +72,28 @@ 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 limitations in check_gcc() sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/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 @@ -115,6 +123,7 @@ src_compile() { 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 @@ -129,14 +138,18 @@ src_compile() { if use dri; then local objdir="out/linux.${ARCH}/release/obj/vboxvideo_drm" - targets=( + # 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' @@ -149,20 +162,20 @@ src_compile() { 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() { - if use dri ; then - : - fi - 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* |