summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-18 15:57:51 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-18 15:57:51 +0100
commitdd6857add365d190d2a81d0f5d1f850587c42b66 (patch)
treeb32c71c29b21a7fac37f3b733ab67f5a1849ae38
parenteb3b4431ea6f9c2c54af1c0c2327ad1896615f54 (diff)
sys-kernel/virtualbox-modules-dkms : support building from DKMS
-rw-r--r--metadata/md5-cache/sys-kernel/virtualbox-modules-dkms-6.1.402
-rw-r--r--sys-kernel/virtualbox-modules-dkms/files/Makefile-dkms.patch43
-rw-r--r--sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-6.1.40.ebuild2
3 files changed, 46 insertions, 1 deletions
diff --git a/metadata/md5-cache/sys-kernel/virtualbox-modules-dkms-6.1.40 b/metadata/md5-cache/sys-kernel/virtualbox-modules-dkms-6.1.40
index 40d0a86c..5bce11f5 100644
--- a/metadata/md5-cache/sys-kernel/virtualbox-modules-dkms-6.1.40
+++ b/metadata/md5-cache/sys-kernel/virtualbox-modules-dkms-6.1.40
@@ -11,4 +11,4 @@ RESTRICT=mirror
SLOT=0
SRC_URI=https://github.com/ceamac/virtualbox-modules-dist/releases/download/v6.1.40/vbox-kernel-module-src-6.1.40.tar.xz
_eclasses_=edos2unix 33e347e171066657f91f8b0c72ec8773 eutils 8f942ebdcf04334697649d4a0bf65a32 strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 wrapper 4a1902f969e5718126434fc35f3a0d9c
-_md5_=570da4c82f861fee735961e3b5b87130
+_md5_=6b10fab111d3d12a87ca9c1e927509f0
diff --git a/sys-kernel/virtualbox-modules-dkms/files/Makefile-dkms.patch b/sys-kernel/virtualbox-modules-dkms/files/Makefile-dkms.patch
new file mode 100644
index 00000000..4c801b01
--- /dev/null
+++ b/sys-kernel/virtualbox-modules-dkms/files/Makefile-dkms.patch
@@ -0,0 +1,43 @@
+diff -Nur a/Makefile b/Makefile
+--- a/Makefile 2022-10-11 16:40:10.000000000 +0100
++++ b/Makefile 2022-10-18 15:54:45.877811069 +0100
+@@ -23,25 +23,25 @@
+ # terms and conditions of either the GPL or the CDDL or both.
+ #
+
+-ifneq ($(KERNELRELEASE),)
++ifneq ($(KBUILD_EXTMOD),)
+
+-# Building from kBuild (make -C <kernel_directory> M=`pwd`),
+-# or inside a kernel source tree.
++# Building from kBuild (make -C <kernel_directory> M=`pwd`).
++# KBUILD_EXTMOD is set to $(M) in this case.
+
+ obj-m = vboxdrv/
+-ifneq ($(wildcard $(CURDIR)/vboxnetflt/Makefile),)
++ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetflt/Makefile),)
+ obj-m += vboxnetflt/
+ endif
+-ifneq ($(wildcard $(CURDIR)/vboxnetadp/Makefile),)
++ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxnetadp/Makefile),)
+ obj-m += vboxnetadp/
+ endif
+-ifneq ($(wildcard $(CURDIR)/vboxpci/Makefile),)
++ifneq ($(wildcard $(KBUILD_EXTMOD)/vboxpci/Makefile),)
+ obj-m += vboxpci/
+ endif
+
+-else # ! KERNELRELEASE
++else # ! KBUILD_EXTMOD
+
+-# convenience Makefile without KERNELRELEASE
++# convenience Makefile without KBUILD_EXTMOD
+
+ KBUILD_VERBOSE ?=
+ KERN_VER ?= $(shell uname -r)
+@@ -167,4 +167,4 @@
+ fi; \
+ done
+
+-endif # ! KERNELRELEASE
++endif # ! KBUILD_EXTMOD
diff --git a/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-6.1.40.ebuild b/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-6.1.40.ebuild
index bb68e200..c5262889 100644
--- a/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-6.1.40.ebuild
+++ b/sys-kernel/virtualbox-modules-dkms/virtualbox-modules-dkms-6.1.40.ebuild
@@ -23,6 +23,8 @@ DEPEND="
"
RDEPEND="${DEPEND}"
+PATCHES=( ${FILESDIR}/Makefile-dkms.patch )
+
S=${WORKDIR}
src_prepare() {