summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/virtualbox-guest-additions')
-rw-r--r--app-emulation/virtualbox-guest-additions/Manifest10
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.14-kernel-6.8.patch242
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch24
-rw-r--r--app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd25
-rw-r--r--app-emulation/virtualbox-guest-additions/metadata.xml8
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.48.ebuild (renamed from app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.36.ebuild)112
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.50-r1.ebuild292
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.50.ebuild (renamed from app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.38.ebuild)109
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.12.ebuild294
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r1.ebuild294
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r2.ebuild295
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r3.ebuild297
-rw-r--r--app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.16.ebuild290
13 files changed, 2156 insertions, 136 deletions
diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
index d98f18d2ee2d..94862e2eeed7 100644
--- a/app-emulation/virtualbox-guest-additions/Manifest
+++ b/app-emulation/virtualbox-guest-additions/Manifest
@@ -1,3 +1,9 @@
-DIST VirtualBox-6.1.36.tar.bz2 165685382 BLAKE2B 98dbb06450b9df650cb72493bcdea4b88fa9dd21f76d723fdc0bb2c1ab8266f67e972a7222dc9b5bd0d43754911710664bddace753995be025cf6bcc05a24ae5 SHA512 cc3b984a7da40c9bf14831808a2bc2bf7bf6821e53c25fa11cb4b4275feb1d4b0cb4a47d8a360b90c89e5a4038481efe8fe28ee22996dbefb6446761e88a8dec
-DIST VirtualBox-6.1.38.tar.bz2 165761175 BLAKE2B decda6e7a595f79e6ace6f8f6b8a7829223ac1422c3d280b6287a40ef942e773ad473f4fa4640a76f8fb825ebd8561c646f1b3d87922b1af55c138298b4c8f4f SHA512 7a4f2dc80e3251b1da6d29d3c6f6b802527decc70497b1a1d1008c0ab3109c2039d131c587d6ec4786aea619546757655337c2ec3456243336ca13c6f6748116
+DIST VirtualBox-6.1.48.tar.bz2 165960987 BLAKE2B c981e390ae518b829970827f6032fb19a93685fb58835a9d489c6e14cc60a5c14c65b0a3da5adae7818e73e1b0e558e8fa803160cb67847f18565bb78d656e97 SHA512 fff759f3871e4e8962536002f2bc13e5150a927e280493f5cb0abf06466ce66e45f4c6ef43489b5b3ed8682d8a3ac0eb6fb3dd7c4144924c81612553ec71a95f
+DIST VirtualBox-6.1.50.tar.bz2 165959648 BLAKE2B e244c4fa2ffe86216664104473e27e8ddbad86aae3bc26612d18204a4e67cece91d1fa3aa9e70f1c39f915bf5e4a1e6a14bbb19162c3ae2ff554373df95bce51 SHA512 ee2ec352e020f07262bf2120278d0d9807c501cd7c4d621d4e12ce18a821b134d48eb852bc7136008cfa77ed709703d3c2835b7a7177c325d989e8f433aff73f
+DIST VirtualBox-7.0.12.tar.bz2 175644088 BLAKE2B 507cbf7b1a8a807bd2602e74bc19a59cb177b9b2bdefa1be582e520666360a42510ca501f20c354746a0f1dadf61fe29135e3edc867e611bfe60a9405cb2bbce SHA512 9fe4511442eba788d02f932f5e98cfcc5aa4ebed41c00bd7333cf7e3f5de787e458f1f56930978283f041f403652c803143335fe9120ab63a2c113ca7b3f588f
+DIST VirtualBox-7.0.14.tar.bz2 175654864 BLAKE2B 99f4942b864ce481d69983af31393d763452c5b55697ab642b43c155f5fbc2a9963fbe1b7744baef620d0b351e1ac73c1ef978698b9a7e77897bb9cbc18dc17c SHA512 6a82933bbf51ff255d17cb61ae6ddfb791a2200e3dff705f181cd06c6031b48cf15faa5e8202a65daef0fb20b7fd9e33d40dbd0f9cc3f49af49fff04a1cb0a73
+DIST VirtualBox-7.0.16.tar.bz2 170897951 BLAKE2B 6b436c38df632222621723db94677a0efef5de2ac1eacec73571bc658955f23fff347fa60c37ec78c58bf94b82b8f9a95fb26c07ef4becc7e9f535af069151f5 SHA512 1b8ba08bec144cbd1f2e9aa0929cdf60a0b99930f1dd80567094fba75097d87661aef3da2cc24f4abff6b6db8f186e251c5f693a2a93943cc39909d5f1e1bce5
DIST virtualbox-patches-6.1.36.tar.bz2 2733 BLAKE2B dcfebfeca4873d382441515d48b4dfee9343bc7c83ea3cbb5002dbf7975143a79fae9a701b67dc35505e9ca03ff1b6293cb7c3279c4fdfda8ad21ba5fb9b7e87 SHA512 1bed5cdefbf8e7c4b0d9092ba4961ecf2262f27f35c71a91ef6f2e8fe8a1d92ed74f06bafbf58d70ba7165d933997f58073f4d4f4051e3ba5c0339b729066f57
+DIST virtualbox-patches-7.0.14.tar.bz2 6937 BLAKE2B da5f18efbba2a8f4701b3d29dc00784e4e80e18a18b029e5dce8c142eb4dc97637069bfc5081422064a7dc59dfacf503ebbdc3421caa96430dc53fa72988aa20 SHA512 57cc34b92e4626de5c445e34ae025da7ec0d752a60618c619a55c28bf7d6b1cc9dc81ea059b949b0f3e625568207e8084f9462faf487ca0daf2794e7f1feac36
+DIST virtualbox-patches-7.0.16.tar.bz2 6808 BLAKE2B d15fa2ca306375142c3e25d4759d2790b2bb9eb69e333a8773ad500b29dd127b401943abf59ca59d01858a3ed5551fb3a6c93c4c893c8de971a714ce5306d577 SHA512 a488cbc6660fe8637c44cd79d87156609af089988239a7e76fea8a3c7e6319512c574bef2e942b354b14ce671a8e75ab8b2160abf7c40963795ee8a545ecd992
+DIST virtualbox-patches-7.0.8.tar.bz2 2733 BLAKE2B 044dfe02a5bd5e757091318b394b0e5918677b5bbce9caef4a18d4d8df54821559f0df6ffbdd6f52d4934bc4018e9c9d908571c5d3d8804fd3b0f22a7a1aed84 SHA512 93a06aa3f9508d3a8743ca8494a958159b5bc3fd7a0a08ff23414d05c4f31084cf0f1c82a3866e222c83e6996ba004546f0bd33c6eb9a90eec8e548b8b3f2fbf
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.14-kernel-6.8.patch b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.14-kernel-6.8.patch
new file mode 100644
index 000000000000..459dbef713e9
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.14-kernel-6.8.patch
@@ -0,0 +1,242 @@
+Support for kernel 6.8.x.
+
+https://www.virtualbox.org/changeset/102989/vbox
+https://www.virtualbox.org/changeset/102990/vbox
+https://www.virtualbox.org/changeset/102992/vbox
+https://www.virtualbox.org/changeset/102993/vbox
+https://www.virtualbox.org/changeset/102994/vbox
+
+------------------------------------------------------------------------
+r102989 | vboxsync | 2024-01-22 19:12:25 +0200 (Lu, 22 ian 2024) | 2 lines
+
+iprt: Add wrapper for strlcpy/strscpy functions, bugref:10584.
+
+
+--- a/include/iprt/string.h
++++ b/include/iprt/string.h
+@@ -245,7 +245,29 @@
+ # define RT_BCOPY_UNFORTIFIED(a_pDst, a_pSrc, a_cbToCopy) memcpy((a_pDst), (a_pSrc), (a_cbToCopy))
+ #endif /* !RT_OS_LINUX && !__KERNEL__ */
+
++/** @def RT_STRSCPY
++ * Copy string and NULL-terminate output buffer.
++ *
++ * This macro should mostly be used in Linux kernel code. This is
++ * the replacement for deprecated strlcpy. It was deprecated since 3.16.60
++ * when strscpy was introduced as an alternative. Finally, strlcpy was
++ * completely removed from kernel code in 6.8.0.
++ *
++ * @param a_pDst Pointer to the destination string buffer.
++ * @param a_pSrc Pointer to the source NULL-terminated string buffer.
++ * @param a_cbToCopy Size of destination buffer..
++ */
++#if defined(RT_OS_LINUX) && defined(__KERNEL__)
++# if (RTLNX_VER_MIN(3,16,60))
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy))
++# else /* < 3.16.60 */
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strlcpy((a_pDst), (a_pSrc), (a_cbToCopy))
++# endif
++#else /* !RT_OS_LINUX && !__KERNEL__ */
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy))
++#endif /* !RT_OS_LINUX && !__KERNEL__ */
+
++
+ #ifdef IN_RING3
+
+ /**
+
+------------------------------------------------------------------------
+------------------------------------------------------------------------
+r102990 | vboxsync | 2024-01-22 19:13:50 +0200 (Lu, 22 ian 2024) | 2 lines
+
+Additions: Linux: Introduce initial support for kernel 6.8, bugref:10584.
+
+
+--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
++++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
+@@ -1410,7 +1410,7 @@
+ RTLogGroupSettings(pLogger, pszValue);
+ }
+ else if (pParam->name[0] != 'd')
+- strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
++ RT_STRSCPY(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
+
+ return 0;
+ }
+@@ -1436,7 +1436,7 @@
+ RTLogFlags(pLogger, pszValue);
+ }
+ else if (pParam->name[0] != 'd')
+- strlcpy(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags));
++ RT_STRSCPY(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags));
+ return 0;
+ }
+
+@@ -1461,7 +1461,7 @@
+ RTLogDestinations(pLogger, pszValue);
+ }
+ else if (pParam->name[0] != 'd')
+- strlcpy(&g_szLogDst[0], pszValue, sizeof(g_szLogDst));
++ RT_STRSCPY(&g_szLogDst[0], pszValue, sizeof(g_szLogDst));
+ return 0;
+ }
+
+--- a/src/VBox/Additions/linux/drm/vbox_drv.h
++++ b/src/VBox/Additions/linux/drm/vbox_drv.h
+@@ -538,9 +538,7 @@
+ int vbox_irq_init(struct vbox_private *vbox);
+ void vbox_irq_fini(struct vbox_private *vbox);
+ void vbox_report_hotplug(struct vbox_private *vbox);
+-#if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_MAJ_PREREQ(9,1) && !RTLNX_SUSE_MAJ_PREREQ(15,5)
+ irqreturn_t vbox_irq_handler(int irq, void *arg);
+-#endif
+
+ /* vbox_hgsmi.c */
+ void *hgsmi_buffer_alloc(struct gen_pool *guest_pool, size_t size,
+--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c
++++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c
+@@ -1408,7 +1408,7 @@
+ switch (opt) {
+ case Opt_iocharset:
+ case Opt_nls:
+- strlcpy(info->nls_name, param->string, sizeof(info->nls_name));
++ RT_STRSCPY(info->nls_name, param->string, sizeof(info->nls_name));
+ break;
+ case Opt_uid:
+ info->uid = result.uint_32;
+@@ -1469,7 +1469,7 @@
+ printk(KERN_WARNING "vboxsf: cache mode (%u) is out of range, using default instead.\n", result.uint_32);
+ break;
+ case Opt_tag:
+- strlcpy(info->szTag, param->string, sizeof(info->szTag));
++ RT_STRSCPY(info->szTag, param->string, sizeof(info->szTag));
+ break;
+ default:
+ return invalf(fc, "Invalid mount option: '%s'", param->key);
+@@ -1528,7 +1528,7 @@
+ }
+
+ /* fc->source (the shared folder name) is set after vbsf_init_fs_ctx() */
+- strlcpy(info->name, fc->source, sizeof(info->name));
++ RT_STRSCPY(info->name, fc->source, sizeof(info->name));
+
+ # if RTLNX_VER_MAX(5,3,0)
+ return vfs_get_super(fc, vfs_get_independent_super, vbsf_read_super_aux);
+--- a/src/VBox/Additions/linux/sharedfolders/regops.c
++++ b/src/VBox/Additions/linux/sharedfolders/regops.c
+@@ -3505,7 +3505,7 @@
+ };
+
+ /** file_operations::mmap wrapper for logging purposes. */
+-extern int vbsf_reg_mmap(struct file *file, struct vm_area_struct *vma)
++static int vbsf_reg_mmap(struct file *file, struct vm_area_struct *vma)
+ {
+ int rc;
+ SFLOGFLOW(("vbsf_reg_mmap: file=%p vma=%p\n", file, vma));
+@@ -3786,7 +3786,7 @@
+ }
+
+ # if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(9,3, 9,99)
+-int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
++static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
+ unsigned len, struct page **pagep, void **fsdata)
+ {
+ vbsf_write_begin_warn(pos, len, 0);
+@@ -3793,7 +3793,7 @@
+ return simple_write_begin(file, mapping, pos, len, pagep, fsdata);
+ }
+ # else
+-int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
++static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
+ unsigned len, unsigned flags, struct page **pagep, void **fsdata)
+ {
+ vbsf_write_begin_warn(pos, len, flags);
+
+------------------------------------------------------------------------
+------------------------------------------------------------------------
+r102992 | vboxsync | 2024-01-22 19:33:49 +0200 (Lu, 22 ian 2024) | 5 lines
+
+iprt: Add wrapper for strlcpy/strscpy functions, build fix, bugref:10584.
+
+Ignore return code of strscpy() in RT_STRSCPY macro sinse we have no caller
+who is using it. Also rename macro parameter, so it makes more sense.
+
+
+--- a/include/iprt/string.h
++++ b/include/iprt/string.h
+@@ -255,16 +255,16 @@
+ *
+ * @param a_pDst Pointer to the destination string buffer.
+ * @param a_pSrc Pointer to the source NULL-terminated string buffer.
+- * @param a_cbToCopy Size of destination buffer..
++ * @param a_cbDst Size of destination buffer.
+ */
+ #if defined(RT_OS_LINUX) && defined(__KERNEL__)
+ # if (RTLNX_VER_MIN(3,16,60))
+-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy))
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst))
+ # else /* < 3.16.60 */
+-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strlcpy((a_pDst), (a_pSrc), (a_cbToCopy))
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst))
+ # endif
+ #else /* !RT_OS_LINUX && !__KERNEL__ */
+-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbToCopy) strscpy((a_pDst), (a_pSrc), (a_cbToCopy))
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst))
+ #endif /* !RT_OS_LINUX && !__KERNEL__ */
+
+
+
+------------------------------------------------------------------------
+r102993 | vboxsync | 2024-01-22 19:41:44 +0200 (Lu, 22 ian 2024) | 5 lines
+
+Add wrapper for strlcpy/strscpy functions, build fix, bugref:10584.
+
+It seem, strscpy was added around 4.3.0. Older kernels probably
+have it as a backport. So, stick to 4.3.0.
+
+
+--- a/include/iprt/string.h
++++ b/include/iprt/string.h
+@@ -258,7 +258,7 @@
+ * @param a_cbDst Size of destination buffer.
+ */
+ #if defined(RT_OS_LINUX) && defined(__KERNEL__)
+-# if (RTLNX_VER_MIN(3,16,60))
++# if (RTLNX_VER_MIN(4,3,0))
+ # define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst))
+ # else /* < 3.16.60 */
+ # define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst))
+
+------------------------------------------------------------------------
+r102994 | vboxsync | 2024-01-22 20:06:29 +0200 (Lu, 22 ian 2024) | 6 lines
+
+iprt: Add wrapper for strlcpy/strscpy functions, build fix, bugref:10584.
+
+Another way around to suppress build error when strscpy return status
+is not used. Also, turn macro into strlcpy for non-Linux systems,
+so for them it will be no change.
+
+
+--- a/include/iprt/string.h
++++ b/include/iprt/string.h
+@@ -259,12 +259,16 @@
+ */
+ #if defined(RT_OS_LINUX) && defined(__KERNEL__)
+ # if (RTLNX_VER_MIN(4,3,0))
+-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst))
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) \
++ { \
++ ssize_t _ret; \
++ _ret = strscpy((a_pDst), (a_pSrc), (a_cbDst)); \
++ }
+ # else /* < 3.16.60 */
+ # define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst))
+ # endif
+ #else /* !RT_OS_LINUX && !__KERNEL__ */
+-# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) (void)strscpy((a_pDst), (a_pSrc), (a_cbDst))
++# define RT_STRSCPY(a_pDst, a_pSrc, a_cbDst) strlcpy((a_pDst), (a_pSrc), (a_cbDst))
+ #endif /* !RT_OS_LINUX && !__KERNEL__ */
+
+
+
+------------------------------------------------------------------------
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
new file mode 100644
index 000000000000..8e53107aedbc
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
@@ -0,0 +1,24 @@
+This file ends up included in
+src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibRuntimeXF86.cpp which
+is compiled with -ffreestanding, so it shouldn't include math.h
+
+See also: https://bugs.gentoo.org/907597
+
+--- a/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
++++ b/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/misc.h
+@@ -169,6 +169,7 @@
+ #ifndef IN_MODULE
+ /* XXX Not for modules */
+ #include <limits.h>
++#if defined __STDC_HOSTED__ && __STDC_HOSTED__ == 1
+ #if !defined(MAXSHORT) || !defined(MINSHORT) || \
+ !defined(MAXINT) || !defined(MININT)
+ /*
+@@ -178,6 +179,7 @@
+
+ #include <math.h>
+ #endif
++#endif // defined __STDC_HOSTED__ && __STDC_HOSTED__ == 1
+ #undef MAXSHORT
+ #define MAXSHORT SHRT_MAX
+ #undef MINSHORT
diff --git a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd b/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd
deleted file mode 100644
index 3af22dbfa49e..000000000000
--- a/app-emulation/virtualbox-guest-additions/files/virtualbox-guest-additions-8.initd
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-pidfile="/var/run/vboxguest-service.pid"
-command="/usr/sbin/vboxguest-service"
-command_args="--foreground"
-command_background="true"
-
-depend() {
- need dbus localmount
- before xdm
-}
-
-start_pre() {
- einfo "Loading kernel modules"
- /sbin/modprobe vboxguest 2>&1
- /sbin/modprobe vboxsf 2>&1
-}
-
-stop_post() {
- einfo "Removing kernel modules"
- /sbin/modprobe -r vboxsf 2>&1
- /sbin/modprobe -r vboxguest 2>&1
-}
diff --git a/app-emulation/virtualbox-guest-additions/metadata.xml b/app-emulation/virtualbox-guest-additions/metadata.xml
index 3651025ac589..498143329fed 100644
--- a/app-emulation/virtualbox-guest-additions/metadata.xml
+++ b/app-emulation/virtualbox-guest-additions/metadata.xml
@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person" proxied="yes">
- <email>ceamac.paragon@gmail.com</email>
+ <maintainer type="person">
+ <email>ceamac@gentoo.org</email>
<name>Viorel Munteanu</name>
</maintainer>
- <maintainer type="project" proxied="proxy">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
</pkgmetadata>
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.36.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.48.ebuild
index 43c37b24a0d7..fe43f7ac3ca9 100644
--- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.36.ebuild
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.48.ebuild
@@ -1,72 +1,74 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit edo linux-mod systemd toolchain-funcs udev
+inherit edo linux-mod-r1 systemd toolchain-funcs udev
MY_PN="VirtualBox"
-MY_PV="${PV/beta/BETA}"
-MY_PV="${MY_PV/rc/RC}"
-MY_P="${MY_PN}-${MY_PV}"
-[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)"
+MY_P="${MY_PN}-${PV}"
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
HOMEPAGE="https://www.virtualbox.org/"
-SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
- https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-${MY_PV}.tar.bz2"
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
+ https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="GPL-2"
SLOT="0/$(ver_cut 1-2)"
-[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
KEYWORDS="amd64 x86"
-IUSE="X"
+IUSE="X +dbus"
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
RDEPEND="
acct-group/vboxguest
acct-group/vboxsf
acct-user/vboxguest
- X? ( x11-apps/xrandr
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ X? (
+ x11-apps/xrandr
x11-apps/xrefresh
- x11-libs/libXmu
x11-libs/libX11
- x11-libs/libXt
x11-libs/libXext
- x11-libs/libXau
- x11-libs/libXdmcp
- x11-libs/libSM
- x11-libs/libICE )
- sys-apps/dbus
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
"
DEPEND="
${RDEPEND}
- >=dev-util/kbuild-0.1.9998.3127
+ X? (
+ x11-base/xorg-proto
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ )
+"
+BDEPEND="
+ >=dev-build/kbuild-0.1.9998.3127
+ <=dev-build/kbuild-0.1.9998.3500
>=dev-lang/yasm-0.6.2
sys-devel/bin86
- sys-libs/pam
sys-power/iasl
- x11-base/xorg-proto
"
PDEPEND="
X? ( x11-drivers/xf86-video-vboxvideo )
"
-BUILD_TARGETS="all"
-BUILD_TARGET_ARCH="${ARCH}"
-S="${WORKDIR}/${MY_PN}-${DIR_PV:-${PV}}"
-VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
+PATCHES=(
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
+)
-pkg_setup() {
- export DISTCC_DISABLE=1 #674256
- MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
- vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
- use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
+DOCS=() # Don't install the default README file during einstalldocs
- linux-mod_pkg_setup
-}
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="DRM_TTM"
src_prepare() {
+ eapply "${PATCHES[@]}"
+
# Remove shipped binaries (kBuild,yasm), see bug #232775
rm -r kBuild/bin tools || die
@@ -78,9 +80,7 @@ src_prepare() {
popd &>/dev/null || die
# PaX fixes (see bug #298988)
- pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
- eapply "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
- popd &>/dev/null || die
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
# Disable things unused or splitted into separate ebuilds
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
@@ -92,11 +92,7 @@ src_prepare() {
# Respect LDFLAGS (bug #759100)
sed -i -e '/TEMPLATE_VBOXR3EXE_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk
- # Do not use hard-coded ld (related to bug #488176)
- #sed -e '/QUIET)ld /s@ld @$(LD) @' \
- # -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
- eapply "${WORKDIR}/virtualbox-patches-${MY_PV}/patches"
+ eapply "${WORKDIR}/virtualbox-patches-6.1.36/patches"
eapply_user
}
@@ -113,6 +109,7 @@ src_configure() {
--disable-sdl-ttf
--disable-pulse
--disable-alsa
+ $(usev !dbus --disable-dbus)
--target-arch=${ARCH}
--with-linux="${KV_OUT_DIR}"
--build-headless
@@ -178,20 +175,36 @@ src_compile() {
# we compiled the user-space tools as we need two of the
# automatically generated header files. (>=3.2.0)
# Move this here for bug 836037
- BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers"
- linux-mod_src_compile
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use X && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
}
src_install() {
- linux-mod_src_install
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
- cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+ cd out/linux.${ARCH}/release/bin/additions || die
insinto /sbin
newins mount.vboxsf mount.vboxsf
fperms 4755 /sbin/mount.vboxsf
- newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
insinto /usr/sbin/
newins VBoxService vboxguest-service
@@ -208,8 +221,7 @@ src_install() {
doins VBoxDRMClient
fperms 4755 /usr/bin/VBoxDRMClient
- pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
- || die
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
newins 98vboxadd-xclient VBoxClient-all
fperms 0755 /usr/bin/VBoxClient-all
popd &>/dev/null || die
@@ -237,7 +249,7 @@ src_install() {
}
pkg_postinst() {
- linux-mod_pkg_postinst
+ linux-mod-r1_pkg_postinst
udev_reload
if ! use X ; then
elog "use flag X is off, enable it to install the"
@@ -258,9 +270,6 @@ pkg_postinst() {
elog "file as your /etc/X11/xorg.conf:"
elog " /usr/share/doc/${PF}/xorg.conf.vbox"
elog ""
- elog "Also make sure you use the Mesa library for OpenGL:"
- elog " eselect opengl set xorg-x11"
- elog ""
elog "An autostart .desktop file has been installed to start"
elog "VBoxClient in desktop sessions."
elog ""
@@ -275,6 +284,5 @@ pkg_postinst() {
}
pkg_postrm() {
- linux-mod_pkg_postrm
udev_reload
}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.50-r1.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.50-r1.ebuild
new file mode 100644
index 000000000000..60c236597e5a
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.50-r1.ebuild
@@ -0,0 +1,292 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo linux-mod-r1 readme.gentoo-r1 systemd toolchain-funcs udev
+
+MY_PN="VirtualBox"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
+ https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+LICENSE="GPL-2"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="X +dbus"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+RDEPEND="
+ acct-group/vboxguest
+ acct-group/vboxsf
+ acct-user/vboxguest
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ X? (
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ X? (
+ x11-base/xorg-proto
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ )
+"
+BDEPEND="
+ >=dev-build/kbuild-0.1.9998.3127
+ <=dev-build/kbuild-0.1.9998.3500
+ >=dev-lang/yasm-0.6.2
+ sys-devel/bin86
+ sys-power/iasl
+"
+
+PATCHES=(
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
+)
+
+DOCS=() # Don't install the default README file during einstalldocs
+
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="~DRM_TTM ~DRM_VMWGFX"
+WARNING_DRM_TTM="DRM_TTM is needed for running the vboxvideo driver."
+WARNING_DRM_VMWGFX="DRM_VMWGFX is the recommended driver for VMSVGA."
+
+DOC_CONTENTS="\n
+Please add users to the \"vboxguest\" group so they can\n
+benefit from seamless mode, auto-resize and clipboard.\n
+\n
+The vboxsf group has been added to make automount services work.\n
+These services are part of the shared folders support.\n
+\n
+Please add:\n
+ /etc/init.d/virtualbox-guest-additions\n
+to the default runlevel in order to start\n
+needed services.\n
+\n
+An autostart .desktop file has been installed to start\n
+VBoxClient in desktop sessions.\n
+\n
+You can mount shared folders with:\n
+ mount -t vboxsf <shared_folder_name> <mount_point>\n
+\n
+Warning:\n
+ this ebuild is only needed if you are running gentoo\n
+ inside a VirtualBox Virtual Machine, you don't need\n
+ it to run VirtualBox itself.\n
+\n"
+
+src_prepare() {
+ eapply "${PATCHES[@]}"
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
+ eend $? || die
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ if ! use X; then
+ echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
+ fi
+
+ # Remove pointless GCC version check
+ sed -e '/^check_gcc$/d' -i configure || die
+
+ # Respect LDFLAGS (bug #759100)
+ sed -i -e '/TEMPLATE_VBOXR3EXE_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
+
+ eapply "${WORKDIR}/virtualbox-patches-6.1.36/patches"
+ eapply_user
+}
+
+src_configure() {
+ tc-export AR CC CXX LD RANLIB
+
+ # Build the user-space tools, warnings are harmless
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ $(usev !dbus --disable-dbus)
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+
+ # bug #843437
+ # Respect LDFLAGS (bug #759100)
+ # Cannot use LDFLAGS here because they also get passed to $(LD)
+ cat >> LocalConfig.kmk <<-EOF || die
+ CFLAGS=${CFLAGS}
+ CXXFLAGS=${CXXFLAGS}
+ CCLDFLAGS=${LDFLAGS}
+ EOF
+
+ edo ./configure "${myconf[@]}"
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+ local myemakeargs=(
+ VBOX_BUILD_PUBLISHER=_Gentoo
+ VBOX_ONLY_ADDITIONS=1
+
+ KBUILD_VERBOSE=2
+
+ AS="$(tc-getCC)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ LD="$(tc-getCC)"
+
+ TOOL_GCC3_CC="$(tc-getCC)"
+ TOOL_GCC3_CXX="$(tc-getCXX)"
+ TOOL_GCC3_LD="$(tc-getCC)"
+ TOOL_GCC3_AS="$(tc-getCC)"
+ TOOL_GCC3_AR="$(tc-getAR)"
+ TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
+
+ TOOL_GXX3_CC="$(tc-getCC)"
+ TOOL_GXX3_CXX="$(tc-getCXX)"
+ TOOL_GXX3_LD="$(tc-getCXX)"
+ TOOL_GXX3_AS="$(tc-getCXX)"
+ TOOL_GXX3_AR="$(tc-getAR)"
+ TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
+
+ TOOL_GCC3_CFLAGS="${CFLAGS}"
+ TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+ VBOX_GCC_OPT="${CXXFLAGS}"
+ VBOX_NM="$(tc-getNM)"
+ TOOL_YASM_AS=yasm
+ )
+
+ MAKE="kmk" emake "${myemakeargs[@]}"
+
+ # 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)
+ # Move this here for bug 836037
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use X && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
+
+ cd out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use X ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+ doins VBoxDRMClient
+ fperms 4755 /usr/bin/VBoxDRMClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ dodoc "${FILESDIR}"/xorg.conf.vbox
+ docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ udev_reload
+
+ if ! use X ; then
+ elog "The use flag \"X\" is off, enable it to install the"
+ elog "X Window System drivers and integration."
+ fi
+
+ readme.gentoo_print_elog
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.38.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.50.ebuild
index f4ad72e4a393..346c45fc35e9 100644
--- a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.38.ebuild
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.50.ebuild
@@ -1,73 +1,74 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit edo linux-mod systemd toolchain-funcs udev
+inherit edo linux-mod-r1 systemd toolchain-funcs udev
MY_PN="VirtualBox"
-MY_PV="${PV/beta/BETA}"
-MY_PV="${MY_PV/rc/RC}"
-MY_P="${MY_PN}-${MY_PV}"
-[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)"
+MY_P="${MY_PN}-${PV}"
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
HOMEPAGE="https://www.virtualbox.org/"
-SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
LICENSE="GPL-2"
SLOT="0/$(ver_cut 1-2)"
-[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
KEYWORDS="~amd64 ~x86"
-IUSE="X"
+IUSE="X +dbus"
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
RDEPEND="
acct-group/vboxguest
acct-group/vboxsf
acct-user/vboxguest
- X? ( x11-apps/xrandr
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ X? (
+ x11-apps/xrandr
x11-apps/xrefresh
- x11-libs/libXmu
x11-libs/libX11
- x11-libs/libXt
x11-libs/libXext
- x11-libs/libXau
- x11-libs/libXdmcp
- x11-libs/libSM
- x11-libs/libICE )
- sys-apps/dbus
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
"
DEPEND="
${RDEPEND}
- >=dev-util/kbuild-0.1.9998.3127
+ X? (
+ x11-base/xorg-proto
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ )
+"
+BDEPEND="
+ >=dev-build/kbuild-0.1.9998.3127
+ <=dev-build/kbuild-0.1.9998.3500
>=dev-lang/yasm-0.6.2
sys-devel/bin86
- sys-libs/pam
sys-power/iasl
- x11-base/xorg-proto
"
PDEPEND="
X? ( x11-drivers/xf86-video-vboxvideo )
"
-BUILD_TARGETS="all"
-BUILD_TARGET_ARCH="${ARCH}"
-S="${WORKDIR}/${MY_PN}-${DIR_PV:-${PV}}"
-VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
-MODULESD_VBOXSF_ALIASES=("fs-vboxsf vboxsf") # 485996
+PATCHES=(
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
+)
-pkg_setup() {
- export DISTCC_DISABLE=1 #674256
- MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
- vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
- use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
+DOCS=() # Don't install the default README file during einstalldocs
- linux-mod_pkg_setup
-}
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="DRM_TTM"
src_prepare() {
+ eapply "${PATCHES[@]}"
+
# Remove shipped binaries (kBuild,yasm), see bug #232775
rm -r kBuild/bin tools || die
@@ -79,9 +80,7 @@ src_prepare() {
popd &>/dev/null || die
# PaX fixes (see bug #298988)
- pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
- eapply "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
- popd &>/dev/null || die
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
# Disable things unused or splitted into separate ebuilds
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
@@ -93,10 +92,6 @@ src_prepare() {
# Respect LDFLAGS (bug #759100)
sed -i -e '/TEMPLATE_VBOXR3EXE_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk
- # Do not use hard-coded ld (related to bug #488176)
- #sed -e '/QUIET)ld /s@ld @$(LD) @' \
- # -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
-
eapply "${WORKDIR}/virtualbox-patches-6.1.36/patches"
eapply_user
}
@@ -114,6 +109,7 @@ src_configure() {
--disable-sdl-ttf
--disable-pulse
--disable-alsa
+ $(usev !dbus --disable-dbus)
--target-arch=${ARCH}
--with-linux="${KV_OUT_DIR}"
--build-headless
@@ -179,20 +175,36 @@ src_compile() {
# we compiled the user-space tools as we need two of the
# automatically generated header files. (>=3.2.0)
# Move this here for bug 836037
- BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers"
- linux-mod_src_compile
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use X && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
}
src_install() {
- linux-mod_src_install
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
- cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
+ cd out/linux.${ARCH}/release/bin/additions || die
insinto /sbin
newins mount.vboxsf mount.vboxsf
fperms 4755 /sbin/mount.vboxsf
- newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
insinto /usr/sbin/
newins VBoxService vboxguest-service
@@ -209,8 +221,7 @@ src_install() {
doins VBoxDRMClient
fperms 4755 /usr/bin/VBoxDRMClient
- pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
- || die
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
newins 98vboxadd-xclient VBoxClient-all
fperms 0755 /usr/bin/VBoxClient-all
popd &>/dev/null || die
@@ -238,7 +249,7 @@ src_install() {
}
pkg_postinst() {
- linux-mod_pkg_postinst
+ linux-mod-r1_pkg_postinst
udev_reload
if ! use X ; then
elog "use flag X is off, enable it to install the"
@@ -259,9 +270,6 @@ pkg_postinst() {
elog "file as your /etc/X11/xorg.conf:"
elog " /usr/share/doc/${PF}/xorg.conf.vbox"
elog ""
- elog "Also make sure you use the Mesa library for OpenGL:"
- elog " eselect opengl set xorg-x11"
- elog ""
elog "An autostart .desktop file has been installed to start"
elog "VBoxClient in desktop sessions."
elog ""
@@ -276,6 +284,5 @@ pkg_postinst() {
}
pkg_postrm() {
- linux-mod_pkg_postrm
udev_reload
}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.12.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.12.ebuild
new file mode 100644
index 000000000000..52388f674103
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.12.ebuild
@@ -0,0 +1,294 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo linux-mod-r1 systemd toolchain-funcs udev
+
+MY_PN="VirtualBox"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
+ https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.8.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
+LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="amd64 x86"
+IUSE="+dbus gui"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+# TODO: find out what this is, remove comment if obsolete
+
+RDEPEND="
+ acct-group/vboxguest
+ acct-group/vboxsf
+ acct-user/vboxguest
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ gui? (
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+"
+# some libs here are indirect dependencies, and also needed at compile time.
+# keeping them in DEPEND to avoid warnings from qa-vdb.
+DEPEND="
+ ${RDEPEND}
+ gui? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ >=dev-lang/yasm-0.6.2
+ >=dev-build/kbuild-0.1.9998.3127
+ sys-devel/bin86
+ sys-power/iasl
+"
+PDEPEND="
+ gui? ( x11-drivers/xf86-video-vboxvideo )
+"
+
+PATCHES=(
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
+)
+
+DOCS=() # Don't install the default README file during einstalldocs
+
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="DRM_TTM"
+
+src_prepare() {
+ eapply "${PATCHES[@]}"
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
+ eend $? || die
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ if ! use gui; then
+ echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
+ fi
+
+ # Remove pointless GCC version check
+ sed -e '/ check_gcc$/d' -i configure || die
+
+ # Respect LDFLAGS (bug #759100)
+ sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
+
+ eapply "${WORKDIR}/virtualbox-patches-7.0.8/patches"
+ eapply_user
+}
+
+src_configure() {
+ tc-export AR CC CXX LD RANLIB
+
+ # Build the user-space tools, warnings are harmless
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ $(usev !dbus --disable-dbus)
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+
+ # bug #843437
+ # Respect LDFLAGS (bug #759100)
+ # Cannot use LDFLAGS here because they also get passed to $(LD)
+ cat >> LocalConfig.kmk <<-EOF || die
+ CFLAGS=${CFLAGS}
+ CXXFLAGS=${CXXFLAGS}
+ CCLDFLAGS=${LDFLAGS}
+ EOF
+
+ edo ./configure "${myconf[@]}"
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+ local myemakeargs=(
+ VBOX_BUILD_PUBLISHER=_Gentoo
+ VBOX_ONLY_ADDITIONS=1
+
+ KBUILD_VERBOSE=2
+
+ AS="$(tc-getCC)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ LD="$(tc-getCC)"
+
+ TOOL_GCC3_CC="$(tc-getCC)"
+ TOOL_GCC3_CXX="$(tc-getCXX)"
+ TOOL_GCC3_LD="$(tc-getCC)"
+ TOOL_GCC3_AS="$(tc-getCC)"
+ TOOL_GCC3_AR="$(tc-getAR)"
+ TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
+
+ TOOL_GXX3_CC="$(tc-getCC)"
+ TOOL_GXX3_CXX="$(tc-getCXX)"
+ TOOL_GXX3_LD="$(tc-getCXX)"
+ TOOL_GXX3_AS="$(tc-getCXX)"
+ TOOL_GXX3_AR="$(tc-getAR)"
+ TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
+
+ TOOL_GCC3_CFLAGS="${CFLAGS}"
+ TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+ VBOX_GCC_OPT="${CXXFLAGS}"
+ VBOX_NM="$(tc-getNM)"
+ TOOL_YASM_AS=yasm
+ )
+
+ MAKE="kmk" emake "${myemakeargs[@]}"
+
+ # 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)
+ # Move this here for bug 836037
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use gui && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
+
+ cd out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use gui ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+ doins VBoxDRMClient
+ fperms 4755 /usr/bin/VBoxDRMClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ dodoc "${FILESDIR}"/xorg.conf.vbox
+ docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ udev_reload
+ if ! use gui ; then
+ elog "use flag gui is off, enable it to install the"
+ elog "X Window System video driver."
+ fi
+ elog ""
+ elog "Please add users to the \"vboxguest\" group so they can"
+ elog "benefit from seamless mode, auto-resize and clipboard."
+ elog ""
+ elog "The vboxsf group has been added to make automount services work."
+ elog "These services are part of the shared folders support."
+ elog ""
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to start"
+ elog "needed services."
+ elog "To use the VirtualBox X driver, use the following"
+ elog "file as your /etc/X11/xorg.conf:"
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox"
+ elog ""
+ elog "An autostart .desktop file has been installed to start"
+ elog "VBoxClient in desktop sessions."
+ elog ""
+ elog "You can mount shared folders with:"
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>"
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r1.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r1.ebuild
new file mode 100644
index 000000000000..ca8e8a155d26
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r1.ebuild
@@ -0,0 +1,294 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo linux-mod-r1 systemd toolchain-funcs udev
+
+MY_PN="VirtualBox"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
+ https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
+LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="+dbus gui"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+# TODO: find out what this is, remove comment if obsolete
+
+RDEPEND="
+ acct-group/vboxguest
+ acct-group/vboxsf
+ acct-user/vboxguest
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ gui? (
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+"
+# some libs here are indirect dependencies, and also needed at compile time.
+# keeping them in DEPEND to avoid warnings from qa-vdb.
+DEPEND="
+ ${RDEPEND}
+ gui? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ >=dev-lang/yasm-0.6.2
+ >=dev-build/kbuild-0.1.9998.3127
+ sys-devel/bin86
+ sys-power/iasl
+"
+PDEPEND="
+ gui? ( x11-drivers/xf86-video-vboxvideo )
+"
+
+PATCHES=(
+ "${FILESDIR}"/virtualbox-guest-additions-7.0.8-fix-gcc13.patch
+)
+
+DOCS=() # Don't install the default README file during einstalldocs
+
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="DRM_TTM"
+
+src_prepare() {
+ eapply "${PATCHES[@]}"
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
+ eend $? || die
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ if ! use gui; then
+ echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
+ fi
+
+ # Remove pointless GCC version check
+ sed -e '/ check_gcc$/d' -i configure || die
+
+ # Respect LDFLAGS (bug #759100)
+ sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
+
+ eapply "${WORKDIR}/virtualbox-patches-7.0.14/patches"
+ eapply_user
+}
+
+src_configure() {
+ tc-export AR CC CXX LD RANLIB
+
+ # Build the user-space tools, warnings are harmless
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ $(usev !dbus --disable-dbus)
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+
+ # bug #843437
+ # Respect LDFLAGS (bug #759100)
+ # Cannot use LDFLAGS here because they also get passed to $(LD)
+ cat >> LocalConfig.kmk <<-EOF || die
+ CFLAGS=${CFLAGS}
+ CXXFLAGS=${CXXFLAGS}
+ CCLDFLAGS=${LDFLAGS}
+ EOF
+
+ edo ./configure "${myconf[@]}"
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+ local myemakeargs=(
+ VBOX_BUILD_PUBLISHER=_Gentoo
+ VBOX_ONLY_ADDITIONS=1
+
+ KBUILD_VERBOSE=2
+
+ AS="$(tc-getCC)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ LD="$(tc-getCC)"
+
+ TOOL_GCC3_CC="$(tc-getCC)"
+ TOOL_GCC3_CXX="$(tc-getCXX)"
+ TOOL_GCC3_LD="$(tc-getCC)"
+ TOOL_GCC3_AS="$(tc-getCC)"
+ TOOL_GCC3_AR="$(tc-getAR)"
+ TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
+
+ TOOL_GXX3_CC="$(tc-getCC)"
+ TOOL_GXX3_CXX="$(tc-getCXX)"
+ TOOL_GXX3_LD="$(tc-getCXX)"
+ TOOL_GXX3_AS="$(tc-getCXX)"
+ TOOL_GXX3_AR="$(tc-getAR)"
+ TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
+
+ TOOL_GCC3_CFLAGS="${CFLAGS}"
+ TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+ VBOX_GCC_OPT="${CXXFLAGS}"
+ VBOX_NM="$(tc-getNM)"
+ TOOL_YASM_AS=yasm
+ )
+
+ MAKE="kmk" emake "${myemakeargs[@]}"
+
+ # 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)
+ # Move this here for bug 836037
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use gui && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
+
+ cd out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use gui ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+ doins VBoxDRMClient
+ fperms 4755 /usr/bin/VBoxDRMClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ dodoc "${FILESDIR}"/xorg.conf.vbox
+ docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ udev_reload
+ if ! use gui ; then
+ elog "use flag gui is off, enable it to install the"
+ elog "X Window System video driver."
+ fi
+ elog ""
+ elog "Please add users to the \"vboxguest\" group so they can"
+ elog "benefit from seamless mode, auto-resize and clipboard."
+ elog ""
+ elog "The vboxsf group has been added to make automount services work."
+ elog "These services are part of the shared folders support."
+ elog ""
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to start"
+ elog "needed services."
+ elog "To use the VirtualBox X driver, use the following"
+ elog "file as your /etc/X11/xorg.conf:"
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox"
+ elog ""
+ elog "An autostart .desktop file has been installed to start"
+ elog "VBoxClient in desktop sessions."
+ elog ""
+ elog "You can mount shared folders with:"
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>"
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r2.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r2.ebuild
new file mode 100644
index 000000000000..80b4916cfe74
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r2.ebuild
@@ -0,0 +1,295 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo linux-mod-r1 systemd toolchain-funcs udev
+
+MY_PN="VirtualBox"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
+ https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
+LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="+dbus gui"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+# TODO: find out what this is, remove comment if obsolete
+
+RDEPEND="
+ acct-group/vboxguest
+ acct-group/vboxsf
+ acct-user/vboxguest
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ gui? (
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+"
+# some libs here are indirect dependencies, and also needed at compile time.
+# keeping them in DEPEND to avoid warnings from qa-vdb.
+DEPEND="
+ ${RDEPEND}
+ gui? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ >=dev-lang/yasm-0.6.2
+ >=dev-build/kbuild-0.1.9998.3127
+ sys-devel/bin86
+ sys-power/iasl
+"
+PDEPEND="
+ gui? ( x11-drivers/xf86-video-vboxvideo )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.8-fix-gcc13.patch
+ "${FILESDIR}"/${PN}-7.0.14-kernel-6.8.patch
+)
+
+DOCS=() # Don't install the default README file during einstalldocs
+
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="DRM_TTM"
+
+src_prepare() {
+ eapply "${PATCHES[@]}"
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
+ eend $? || die
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ if ! use gui; then
+ echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
+ fi
+
+ # Remove pointless GCC version check
+ sed -e '/ check_gcc$/d' -i configure || die
+
+ # Respect LDFLAGS (bug #759100)
+ sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
+
+ eapply "${WORKDIR}/virtualbox-patches-7.0.14/patches"
+ eapply_user
+}
+
+src_configure() {
+ tc-export AR CC CXX LD RANLIB
+
+ # Build the user-space tools, warnings are harmless
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ $(usev !dbus --disable-dbus)
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+
+ # bug #843437
+ # Respect LDFLAGS (bug #759100)
+ # Cannot use LDFLAGS here because they also get passed to $(LD)
+ cat >> LocalConfig.kmk <<-EOF || die
+ CFLAGS=${CFLAGS}
+ CXXFLAGS=${CXXFLAGS}
+ CCLDFLAGS=${LDFLAGS}
+ EOF
+
+ edo ./configure "${myconf[@]}"
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+ local myemakeargs=(
+ VBOX_BUILD_PUBLISHER=_Gentoo
+ VBOX_ONLY_ADDITIONS=1
+
+ KBUILD_VERBOSE=2
+
+ AS="$(tc-getCC)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ LD="$(tc-getCC)"
+
+ TOOL_GCC3_CC="$(tc-getCC)"
+ TOOL_GCC3_CXX="$(tc-getCXX)"
+ TOOL_GCC3_LD="$(tc-getCC)"
+ TOOL_GCC3_AS="$(tc-getCC)"
+ TOOL_GCC3_AR="$(tc-getAR)"
+ TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
+
+ TOOL_GXX3_CC="$(tc-getCC)"
+ TOOL_GXX3_CXX="$(tc-getCXX)"
+ TOOL_GXX3_LD="$(tc-getCXX)"
+ TOOL_GXX3_AS="$(tc-getCXX)"
+ TOOL_GXX3_AR="$(tc-getAR)"
+ TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
+
+ TOOL_GCC3_CFLAGS="${CFLAGS}"
+ TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+ VBOX_GCC_OPT="${CXXFLAGS}"
+ VBOX_NM="$(tc-getNM)"
+ TOOL_YASM_AS=yasm
+ )
+
+ MAKE="kmk" emake "${myemakeargs[@]}"
+
+ # 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)
+ # Move this here for bug 836037
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use gui && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
+
+ cd out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use gui ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+ doins VBoxDRMClient
+ fperms 4755 /usr/bin/VBoxDRMClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ dodoc "${FILESDIR}"/xorg.conf.vbox
+ docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ udev_reload
+ if ! use gui ; then
+ elog "use flag gui is off, enable it to install the"
+ elog "X Window System video driver."
+ fi
+ elog ""
+ elog "Please add users to the \"vboxguest\" group so they can"
+ elog "benefit from seamless mode, auto-resize and clipboard."
+ elog ""
+ elog "The vboxsf group has been added to make automount services work."
+ elog "These services are part of the shared folders support."
+ elog ""
+ elog "Please add:"
+ elog "/etc/init.d/${PN}"
+ elog "to the default runlevel in order to start"
+ elog "needed services."
+ elog "To use the VirtualBox X driver, use the following"
+ elog "file as your /etc/X11/xorg.conf:"
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox"
+ elog ""
+ elog "An autostart .desktop file has been installed to start"
+ elog "VBoxClient in desktop sessions."
+ elog ""
+ elog "You can mount shared folders with:"
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>"
+ elog ""
+ elog "Warning:"
+ elog "this ebuild is only needed if you are running gentoo"
+ elog "inside a VirtualBox Virtual Machine, you don't need"
+ elog "it to run VirtualBox itself."
+ elog ""
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r3.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r3.ebuild
new file mode 100644
index 000000000000..92c9fb95c5c6
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.14-r3.ebuild
@@ -0,0 +1,297 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo linux-mod-r1 readme.gentoo-r1 systemd toolchain-funcs udev
+
+MY_PN="VirtualBox"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
+ https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.14.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
+LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="+dbus gui"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+# TODO: find out what this is, remove comment if obsolete
+
+RDEPEND="
+ acct-group/vboxguest
+ acct-group/vboxsf
+ acct-user/vboxguest
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ gui? (
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+"
+# some libs here are indirect dependencies, and also needed at compile time.
+# keeping them in DEPEND to avoid warnings from qa-vdb.
+DEPEND="
+ ${RDEPEND}
+ gui? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ >=dev-lang/yasm-0.6.2
+ >=dev-build/kbuild-0.1.9998.3127
+ sys-devel/bin86
+ sys-power/iasl
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-7.0.8-fix-gcc13.patch
+ "${FILESDIR}"/${PN}-7.0.14-kernel-6.8.patch
+)
+
+DOCS=() # Don't install the default README file during einstalldocs
+
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="~DRM_TTM ~DRM_VMWGFX"
+WARNING_DRM_TTM="DRM_TTM is needed for running the vboxvideo driver."
+WARNING_DRM_VMWGFX="DRM_VMWGFX is the recommended driver for VMSVGA."
+
+DOC_CONTENTS="\n
+Please add users to the \"vboxguest\" group so they can\n
+benefit from seamless mode, auto-resize and clipboard.\n
+\n
+The vboxsf group has been added to make automount services work.\n
+These services are part of the shared folders support.\n
+\n
+Please add:\n
+ /etc/init.d/virtualbox-guest-additions\n
+to the default runlevel in order to start\n
+needed services.\n
+\n
+An autostart .desktop file has been installed to start\n
+VBoxClient in desktop sessions.\n
+\n
+You can mount shared folders with:\n
+ mount -t vboxsf <shared_folder_name> <mount_point>\n
+\n
+Warning:\n
+ this ebuild is only needed if you are running gentoo\n
+ inside a VirtualBox Virtual Machine, you don't need\n
+ it to run VirtualBox itself.\n
+\n"
+
+src_prepare() {
+ eapply "${PATCHES[@]}"
+
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
+ eend $? || die
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ if ! use gui; then
+ echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
+ fi
+
+ # Remove pointless GCC version check
+ sed -e '/ check_gcc$/d' -i configure || die
+
+ # Respect LDFLAGS (bug #759100)
+ sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
+
+ eapply "${WORKDIR}/virtualbox-patches-7.0.14/patches"
+ eapply_user
+}
+
+src_configure() {
+ tc-export AR CC CXX LD RANLIB
+
+ # Build the user-space tools, warnings are harmless
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ $(usev !dbus --disable-dbus)
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+
+ # bug #843437
+ # Respect LDFLAGS (bug #759100)
+ # Cannot use LDFLAGS here because they also get passed to $(LD)
+ cat >> LocalConfig.kmk <<-EOF || die
+ CFLAGS=${CFLAGS}
+ CXXFLAGS=${CXXFLAGS}
+ CCLDFLAGS=${LDFLAGS}
+ EOF
+
+ edo ./configure "${myconf[@]}"
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+ local myemakeargs=(
+ VBOX_BUILD_PUBLISHER=_Gentoo
+ VBOX_ONLY_ADDITIONS=1
+
+ KBUILD_VERBOSE=2
+
+ AS="$(tc-getCC)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ LD="$(tc-getCC)"
+
+ TOOL_GCC3_CC="$(tc-getCC)"
+ TOOL_GCC3_CXX="$(tc-getCXX)"
+ TOOL_GCC3_LD="$(tc-getCC)"
+ TOOL_GCC3_AS="$(tc-getCC)"
+ TOOL_GCC3_AR="$(tc-getAR)"
+ TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
+
+ TOOL_GXX3_CC="$(tc-getCC)"
+ TOOL_GXX3_CXX="$(tc-getCXX)"
+ TOOL_GXX3_LD="$(tc-getCXX)"
+ TOOL_GXX3_AS="$(tc-getCXX)"
+ TOOL_GXX3_AR="$(tc-getAR)"
+ TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
+
+ TOOL_GCC3_CFLAGS="${CFLAGS}"
+ TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+ VBOX_GCC_OPT="${CXXFLAGS}"
+ VBOX_NM="$(tc-getNM)"
+ TOOL_YASM_AS=yasm
+ )
+
+ MAKE="kmk" emake "${myemakeargs[@]}"
+
+ # 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)
+ # Move this here for bug 836037
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use gui && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
+
+ cd out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use gui ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+ doins VBoxDRMClient
+ fperms 4755 /usr/bin/VBoxDRMClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ dodoc "${FILESDIR}"/xorg.conf.vbox
+ docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ udev_reload
+
+ if ! use gui ; then
+ elog "The use flag \"gui\" is off, enable it to install the"
+ elog "X Window System drivers and integration."
+ fi
+
+ readme.gentoo_print_elog
+}
+
+pkg_postrm() {
+ udev_reload
+}
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.16.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.16.ebuild
new file mode 100644
index 000000000000..f704b0857188
--- /dev/null
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-7.0.16.ebuild
@@ -0,0 +1,290 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo linux-mod-r1 readme.gentoo-r1 systemd toolchain-funcs udev
+
+MY_PN="VirtualBox"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
+HOMEPAGE="https://www.virtualbox.org/"
+SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
+ https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.16.tar.bz2"
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
+LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
+SLOT="0/$(ver_cut 1-2)"
+KEYWORDS="~amd64 ~x86"
+IUSE="+dbus gui"
+
+# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
+# TODO: find out what this is, remove comment if obsolete
+
+RDEPEND="
+ acct-group/vboxguest
+ acct-group/vboxsf
+ acct-user/vboxguest
+ sys-libs/pam
+ sys-libs/zlib
+ dbus? ( sys-apps/dbus )
+ gui? (
+ x11-apps/xrandr
+ x11-apps/xrefresh
+ x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXmu
+ x11-libs/libXt
+ )
+"
+# some libs here are indirect dependencies, and also needed at compile time.
+# keeping them in DEPEND to avoid warnings from qa-vdb.
+DEPEND="
+ ${RDEPEND}
+ gui? (
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libXau
+ x11-libs/libXdmcp
+ x11-base/xorg-proto
+ )
+"
+BDEPEND="
+ >=dev-lang/yasm-0.6.2
+ >=dev-build/kbuild-0.1.9998.3127
+ sys-devel/bin86
+ sys-power/iasl
+"
+
+DOCS=() # Don't install the default README file during einstalldocs
+
+VBOX_MOD_SRC_DIR="out/linux.${ARCH}/release/bin/additions/src"
+CONFIG_CHECK="~DRM_TTM ~DRM_VMWGFX"
+WARNING_DRM_TTM="DRM_TTM is needed for running the vboxvideo driver."
+WARNING_DRM_VMWGFX="DRM_VMWGFX is the recommended driver for VMSVGA."
+
+DOC_CONTENTS="\n
+Please add users to the \"vboxguest\" group so they can\n
+benefit from seamless mode, auto-resize and clipboard.\n
+\n
+The vboxsf group has been added to make automount services work.\n
+These services are part of the shared folders support.\n
+\n
+Please add:\n
+ /etc/init.d/virtualbox-guest-additions\n
+to the default runlevel in order to start\n
+needed services.\n
+\n
+An autostart .desktop file has been installed to start\n
+VBoxClient in desktop sessions.\n
+\n
+You can mount shared folders with:\n
+ mount -t vboxsf <shared_folder_name> <mount_point>\n
+\n
+Warning:\n
+ this ebuild is only needed if you are running gentoo\n
+ inside a VirtualBox Virtual Machine, you don't need\n
+ it to run VirtualBox itself.\n
+\n"
+
+src_prepare() {
+ # Remove shipped binaries (kBuild,yasm), see bug #232775
+ rm -r kBuild/bin tools || die
+
+ # Provide kernel sources
+ pushd src/VBox/Additions &>/dev/null || die
+ ebegin "Extracting guest kernel module sources"
+ kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null
+ eend $? || die
+ popd &>/dev/null || die
+
+ # PaX fixes (see bug #298988)
+ eapply -d "${VBOX_MOD_SRC_DIR}" -- "${FILESDIR}"/vboxguest-6.1.36-log-use-c99.patch
+
+ # Disable things unused or splitted into separate ebuilds
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
+ if ! use gui; then
+ echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
+ fi
+
+ # Remove pointless GCC version check
+ sed -e '/ check_gcc$/d' -i configure || die
+
+ # Respect LDFLAGS (bug #759100)
+ sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
+
+ eapply "${WORKDIR}/virtualbox-patches-7.0.16/patches"
+ eapply_user
+}
+
+src_configure() {
+ tc-export AR CC CXX LD RANLIB
+
+ # Build the user-space tools, warnings are harmless
+ local myconf=(
+ --with-gcc="$(tc-getCC)"
+ --with-g++="$(tc-getCXX)"
+
+ --nofatal
+ --disable-xpcom
+ --disable-sdl-ttf
+ --disable-pulse
+ --disable-alsa
+ $(usev !dbus --disable-dbus)
+ --target-arch=${ARCH}
+ --with-linux="${KV_OUT_DIR}"
+ --build-headless
+ )
+
+ # bug #843437
+ # Respect LDFLAGS (bug #759100)
+ # Cannot use LDFLAGS here because they also get passed to $(LD)
+ cat >> LocalConfig.kmk <<-EOF || die
+ CFLAGS=${CFLAGS}
+ CXXFLAGS=${CXXFLAGS}
+ CCLDFLAGS=${LDFLAGS}
+ EOF
+
+ edo ./configure "${myconf[@]}"
+}
+
+src_compile() {
+ source ./env.sh || die
+
+ # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
+ MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS})
+ MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
+
+ local myemakeargs=(
+ VBOX_BUILD_PUBLISHER=_Gentoo
+ VBOX_ONLY_ADDITIONS=1
+
+ KBUILD_VERBOSE=2
+
+ AS="$(tc-getCC)"
+ CC="$(tc-getCC)"
+ CXX="$(tc-getCXX)"
+ LD="$(tc-getCC)"
+
+ TOOL_GCC3_CC="$(tc-getCC)"
+ TOOL_GCC3_CXX="$(tc-getCXX)"
+ TOOL_GCC3_LD="$(tc-getCC)"
+ TOOL_GCC3_AS="$(tc-getCC)"
+ TOOL_GCC3_AR="$(tc-getAR)"
+ TOOL_GCC3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GCC3_LD_SYSMOD="$(tc-getCC)"
+
+ TOOL_GXX3_CC="$(tc-getCC)"
+ TOOL_GXX3_CXX="$(tc-getCXX)"
+ TOOL_GXX3_LD="$(tc-getCXX)"
+ TOOL_GXX3_AS="$(tc-getCXX)"
+ TOOL_GXX3_AR="$(tc-getAR)"
+ TOOL_GXX3_OBJCOPY="$(tc-getOBJCOPY)"
+ #TOOL_GXX3_LD_SYSMOD="$(tc-getCXX)"
+
+ TOOL_GCC3_CFLAGS="${CFLAGS}"
+ TOOL_GCC3_CXXFLAGS="${CXXFLAGS}"
+ VBOX_GCC_OPT="${CXXFLAGS}"
+ VBOX_NM="$(tc-getNM)"
+ TOOL_YASM_AS=yasm
+ )
+
+ MAKE="kmk" emake "${myemakeargs[@]}"
+
+ # 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)
+ # Move this here for bug 836037
+ local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
+ local modlist=( vboxguest vboxsf )
+ use gui && modlist+=( vboxvideo )
+ modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
+ linux-mod-r1_src_compile
+}
+
+src_install() {
+ linux-mod-r1_src_install
+
+ insinto /etc/modprobe.d # 485996
+ newins - vboxsf.conf <<-EOF
+ # modprobe.d configuration file for VBOXSF
+
+ # Internal Aliases - Do not edit
+ # ------------------------------
+ alias fs-vboxsf vboxsf
+ EOF
+
+ cd out/linux.${ARCH}/release/bin/additions || die
+
+ insinto /sbin
+ newins mount.vboxsf mount.vboxsf
+ fperms 4755 /sbin/mount.vboxsf
+
+ if use dbus; then
+ newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
+ else
+ newinitd <(sed 's/ dbus\>//' "${FILESDIR}"/${PN}-8.initd-r1) ${PN}
+ fi
+
+ insinto /usr/sbin/
+ newins VBoxService vboxguest-service
+ fperms 0755 /usr/sbin/vboxguest-service
+
+ insinto /usr/bin
+ doins VBoxControl
+ fperms 0755 /usr/bin/VBoxControl
+
+ # VBoxClient user service and xrandr wrapper
+ if use gui ; then
+ doins VBoxClient
+ fperms 0755 /usr/bin/VBoxClient
+ doins VBoxDRMClient
+ fperms 4755 /usr/bin/VBoxDRMClient
+
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null || die
+ newins 98vboxadd-xclient VBoxClient-all
+ fperms 0755 /usr/bin/VBoxClient-all
+ popd &>/dev/null || die
+ fi
+
+ # udev rule for vboxdrv
+ local udev_rules_dir="/lib/udev/rules.d"
+ dodir ${udev_rules_dir}
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
+ >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
+ || die
+
+ # VBoxClient autostart file
+ insinto /etc/xdg/autostart
+ doins "${FILESDIR}"/vboxclient.desktop
+
+ # sample xorg.conf
+ dodoc "${FILESDIR}"/xorg.conf.vbox
+ docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
+
+ systemd_dounit "${FILESDIR}/${PN}.service"
+
+ readme.gentoo_create_doc
+}
+
+pkg_postinst() {
+ linux-mod-r1_pkg_postinst
+ udev_reload
+
+ if ! use gui ; then
+ elog "The use flag \"gui\" is off, enable it to install the"
+ elog "X Window System drivers and integration."
+ fi
+
+ readme.gentoo_print_elog
+}
+
+pkg_postrm() {
+ udev_reload
+}