diff options
author | Viorel Munteanu <ceamac@gentoo.org> | 2022-11-19 11:40:12 +0200 |
---|---|---|
committer | Viorel Munteanu <ceamac@gentoo.org> | 2022-11-20 10:16:37 +0200 |
commit | 3227383fd983335e591bfa8e65fd62f413954aaa (patch) | |
tree | 49b09ea75685dd1656973dbc66a2921455ebae80 /app-emulation | |
parent | sys-libs/fortify-headers: drop 0.7 (diff) | |
download | gentoo-3227383fd983335e591bfa8e65fd62f413954aaa.tar.gz gentoo-3227383fd983335e591bfa8e65fd62f413954aaa.tar.bz2 gentoo-3227383fd983335e591bfa8e65fd62f413954aaa.zip |
app-emulation/virtualbox-modules: add 7.0.4
Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/virtualbox-modules/Manifest | 1 | ||||
-rw-r--r-- | app-emulation/virtualbox-modules/virtualbox-modules-7.0.4.ebuild | 58 |
2 files changed, 59 insertions, 0 deletions
diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest index dd1150faf86b..1bd41095e720 100644 --- a/app-emulation/virtualbox-modules/Manifest +++ b/app-emulation/virtualbox-modules/Manifest @@ -1,2 +1,3 @@ DIST vbox-kernel-module-src-6.1.40.tar.xz 680112 BLAKE2B 95bcb598bc3823c8bf4bfeb734a5d812a4830d072b186c999ed8632552550d0d21318bc50419fd18301cd6e8e58d091a4f6363c9ee86725d6bf8e74050b552d2 SHA512 8eec3c960077205d53b3d2a8367ce562edb02a6d90fe0a4bd06e1dfa256760e128b9895fc8005ceeb50a72eda6509533a28c6ee264d10a2cd30601ed5ced2eeb DIST vbox-kernel-module-src-7.0.2.tar.xz 719208 BLAKE2B 9e356c10b431f765dc7c13673c296b8acf6247304fe40f0a6accde30e1c1f2ab04f46ac18ac6350cb1c554f9d0aaf3cb831a5f737cbd7d50ae8efe48e312c8b4 SHA512 0c97b30ee14abeb62b9fbfe552da64f12f763cf3d35d5fda1dee595142f564f6220e61c15f73dcfd50853f4e4776bc73ba1808e5f78d7c2f5f2bf3522292d33e +DIST vbox-kernel-module-src-7.0.4.tar.xz 719552 BLAKE2B 5db9ef68acb0da28096dbb89b746261dfac830b626fbed669c02eab6399e681b2c5667d0fe547c8cc8c7e1cbf66d4c6696d9badf0faa617ef2cd0d7372ec9cbe SHA512 521994ffcc27766ee5bbf19595c41a292ce266247249e8ed701fca802d0a1bb82883959eb10bc06bc78abfd6b5230605e6620717526ca528f0b2e1d8d62a8dc4 diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-7.0.4.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.4.ebuild new file mode 100644 index 000000000000..5894b581bca7 --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-7.0.4.ebuild @@ -0,0 +1,58 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# XXX: the tarball here is just the kernel modules split out of the binary +# package that comes from VirtualBox-*.run +# XXX: update: now it is split from virtualbox-*-Debian~bullseye_amd64.deb + +EAPI=8 + +inherit linux-mod toolchain-funcs + +MY_P="vbox-kernel-module-src-${PV}" +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="https://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~ceamac/${CATEGORY}/${PN}/${MY_P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64" + +S="${WORKDIR}" + +BUILD_TARGETS="all" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})" +MODULESD_VBOXDRV_ENABLED="yes" +MODULESD_VBOXNETADP_ENABLED="no" +MODULESD_VBOXNETFLT_ENABLED="no" + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="CC=\"$(tc-getBUILD_CC)\" KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" + if linux_chkconfig_present CC_IS_CLANG; then + ewarn "Warning: building ${PN} with a clang-built kernel is experimental." + + BUILD_PARAMS+=' CC=${CHOST}-clang' + if linux_chkconfig_present LD_IS_LLD; then + BUILD_PARAMS+=' LD=ld.lld' + if linux_chkconfig_present LTO_CLANG_THIN; then + # kernel enables cache by default leading to sandbox violations + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir=' + fi + fi + fi +} + +src_install() { + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf +} + +pkg_postinst() { + # Remove vboxpci.ko from current running kernel + # This module is obsolete, removed in december 2019, so it may be missing. No || die + # TODO: consider removing this line in the near future + find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete + linux-mod_pkg_postinst +} |