From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 4EF6A138222 for ; Tue, 3 May 2016 20:28:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C56B621C008; Tue, 3 May 2016 20:28:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 54EBB21C008 for ; Tue, 3 May 2016 20:28:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3CDAA340BBF for ; Tue, 3 May 2016 20:28:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DC451328 for ; Tue, 3 May 2016 20:28:02 +0000 (UTC) From: "Ian Stakenvicius" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ian Stakenvicius" Message-ID: <1462307274.9670bfc86462af15a9d05b170b72ad68168b2580.axs@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: x11-drivers/xf86-video-virtualbox/, x11-drivers/xf86-video-virtualbox/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.0.20-Makefile.module.kms.patch x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.20.ebuild X-VCS-Directories: x11-drivers/xf86-video-virtualbox/files/ x11-drivers/xf86-video-virtualbox/ X-VCS-Committer: axs X-VCS-Committer-Name: Ian Stakenvicius X-VCS-Revision: 9670bfc86462af15a9d05b170b72ad68168b2580 X-VCS-Branch: master Date: Tue, 3 May 2016 20:28:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: dacd7e08-4992-44b8-9994-655d54adb7d9 X-Archives-Hash: 7413c6f945169fb1f9173029aaeeb3d0 commit: 9670bfc86462af15a9d05b170b72ad68168b2580 Author: Ian Stakenvicius gentoo org> AuthorDate: Tue May 3 20:03:45 2016 +0000 Commit: Ian Stakenvicius gentoo org> CommitDate: Tue May 3 20:27:54 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9670bfc8 x11-drivers/xf86-video-virtualbox-5.0.20: build kernel module with help of upstream Makefiles. This commit builds on the prior work of Polynomial-C to compile vboxvideo.ko using the upstream Makefile.module.kms. A small patch is necessary to add a missing include path to the build, and the rest of the changes are the addition of necessary symlinks to allow the build to proceed. Package-Manager: portage-2.2.26 ...deo-virtualbox-5.0.20-Makefile.module.kms.patch | 11 +++++ .../xf86-video-virtualbox-5.0.20.ebuild | 51 +++++++++++----------- 2 files changed, 37 insertions(+), 25 deletions(-) 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 new file mode 100644 index 0000000..dd05a4a --- /dev/null +++ b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.0.20-Makefile.module.kms.patch @@ -0,0 +1,11 @@ +--- 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.0.20.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.20.ebuild index 24d85e9..5dbf6db 100644 --- a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.20.ebuild +++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.0.20.ebuild @@ -73,14 +73,19 @@ pkg_setup() { } src_prepare() { - # Prepare the vboxvideo_drm Makefiles - #cp "${FILESDIR}/Makefile.inc" "${MODULES_SRC_DIR}" || die - ln -s Makefile.module.kms "${MODULES_SRC_DIR}/Makefile" || die - #sed '/^include.*header/ainclude $(obj)/Makefile.inc' \ - # -i "${MODULES_SRC_DIR}/Makefile.module.kms" || die - for incfile in Makefile.include.{head,foot}er ; do - ln -s "${S}/src/VBox/Installer/linux/${incfile}" \ - "${MODULES_SRC_DIR}/${incfile}" || die + # Prepare the vboxvideo_drm Makefiles and build dir + eapply "${FILESDIR}"/${P}-Makefile.module.kms.patch + ln -sf Makefile.module.kms "${MODULES_SRC_DIR}"/Makefile || die + # All of these are expected to be in $(KBUILD_EXTMOD)/ so symlink them into place + local incfile incfiles=( + include + src/VBox/Runtime/r0drv + src/VBox/Installer/linux/Makefile.include.{head,foot}er + out/linux.${ARCH}/release/{product,version,revision}-generated.h + ) + for incfile in ${incfiles[@]} ; do + ln -sf "${S}"/${incfile} \ + "${MODULES_SRC_DIR}"/${incfile##*/} || die done # Remove shipped binaries (kBuild,yasm), see bug #232775 @@ -118,18 +123,14 @@ src_configure() { } src_compile() { - local targets=() - - targets=( + local each targets=( Runtime Additions/common/VBoxGuestLib GuestHost/OpenGL Additions/x11/x11stubs Additions/common/crOpenGL Additions/x11/vboxvideo - #Additions/linux/drm ) - for each in ${targets[@]} ; do pushd "${S}"/src/VBox/${each} $>/dev/null || die MAKE="kmk" \ @@ -142,18 +143,18 @@ src_compile() { if use dri ; then local objdir="out/linux.${ARCH}/release/obj/vboxvideo_drv_system/src/VBox" - ln -s "${S}"/${objdir}/Additions/common/VBoxVideo/HGSMIBase.o \ - ${MODULES_SRC_DIR} || die - ln -s "${S}"/${objdir}/GuestHost/HGSMI/HGSMICommon.o \ - ${MODULES_SRC_DIR} || die - ln -s "${S}"/${objdir}/GuestHost/HGSMI/HGSMIMemAlloc.o \ - ${MODULES_SRC_DIR} || die - ln -s "${S}"/${objdir}/Runtime/common/alloc/heapoffset.o \ - ${MODULES_SRC_DIR} || die - ln -s "${S}"/${objdir}/Additions/common/VBoxVideo/Modesetting.o \ - ${MODULES_SRC_DIR} || die - ln -s "${S}"/${objdir}/Additions/common/VBoxVideo/VBVABase.o \ - ${MODULES_SRC_DIR} || die + # see the vboxvideo_drm_SOURCES list in Makefile.kmk for the below + targets=( + Additions/common/VBoxVideo/HGSMIBase.o + Additions/common/VBoxVideo/Modesetting.o + Additions/common/VBoxVideo/VBVABase.o + GuestHost/HGSMI/HGSMICommon.o + GuestHost/HGSMI/HGSMIMemAlloc.o + Runtime/common/alloc/heapoffset.o + ) + for each in ${targets[@]} ; do + ln -sf "${S}"/${objdir}/${each} "${MODULES_SRC_DIR}"/${each##*/} || die + done # Now creating the kernel modules. We must do this _after_ # we compiled the user-space tools as we need two of the