From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- app-emulation/virtualbox-modules/Manifest | 14 +++++ .../files/create_vbox_modules_tarball.sh | 29 ++++++++++ .../files/virtualbox-modules-4.1.4-pax-const.patch | 48 ++++++++++++++++ .../virtualbox-modules/files/virtualbox.conf | 4 ++ app-emulation/virtualbox-modules/metadata.xml | 15 +++++ .../virtualbox-modules-5.0.16.ebuild | 64 ++++++++++++++++++++++ .../virtualbox-modules-5.0.40.ebuild | 64 ++++++++++++++++++++++ .../virtualbox-modules-5.1.26.ebuild | 64 ++++++++++++++++++++++ .../virtualbox-modules-5.1.28.ebuild | 64 ++++++++++++++++++++++ 9 files changed, 366 insertions(+) create mode 100644 app-emulation/virtualbox-modules/Manifest create mode 100755 app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh create mode 100644 app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch create mode 100644 app-emulation/virtualbox-modules/files/virtualbox.conf create mode 100644 app-emulation/virtualbox-modules/metadata.xml create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.0.16.ebuild create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.0.40.ebuild create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.1.26.ebuild create mode 100644 app-emulation/virtualbox-modules/virtualbox-modules-5.1.28.ebuild (limited to 'app-emulation/virtualbox-modules') diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest new file mode 100644 index 000000000000..552a5a0ba266 --- /dev/null +++ b/app-emulation/virtualbox-modules/Manifest @@ -0,0 +1,14 @@ +AUX create_vbox_modules_tarball.sh 896 SHA256 4309bbf762e05ae09a2b92a737abddb89807b5a36f587178d7ac7f6ad4d91316 SHA512 c3154a13550817c581fa142e24081edfbdbc145315d34cc4569d12ad87a518fa0bf1443c053b50fdfdea6915bda1325ad973455ee85079294b83a49fd53f4771 WHIRLPOOL 761079d4ba0124488be9cc78305eef6c6df18d232c539ff4479caf3f04ea307e043c92a5f4099c7745a4e23741ce28259e87dd79bce8cee6862ef5e0661b2497 +AUX virtualbox-modules-4.1.4-pax-const.patch 2335 SHA256 d23da93fa1a3b7833766caa8329745ed7de7a5ed6ce1fecb090325fdc83e42f3 SHA512 8f5ffcd53f34e616b895013660e269e6031837411471abf69711df4fd5d745299dcb08d361eda0979dcfde7d9aafa0d24c99fcc9f3875fbf35771945f6b224a1 WHIRLPOOL b875d0747bdf3c2970d9dc84c7e4f6fac1bd37b85ba6086a981397c8b506a7af2709fa94317896650fd9ae98921d40f399e589b851eb2da2f9854eb1f443930c +AUX virtualbox.conf 38 SHA256 eb1ba5b5f8a2b795e3b050105a2f24cb5df9d392c6c4a3a9756e17f74ffeb146 SHA512 b61936fff57426d31efa6928eadb572cafe40a65d3e31a0eecb53dc784ba9d0a9e0ad5e419df74418b977f89c17873240c38e2ada95949e5252d879110d6094a WHIRLPOOL cadd73f81d8ddb545fb31ec2328103f998e5754d6f7fe63de7e72987992d49cb84c309b52e852cc221c078a39f1ec542662fc68b200478a6cec8e12881aee8bb +DIST vbox-kernel-module-src-5.0.16.tar.xz 593944 SHA256 8905e174069a6caf0200808fda6726704a947ab56fc48c3b6ebbf8831dde4123 SHA512 5311f6cfd917c04bcb51182ad414c0930fb85a73a90d81156f08640cdb4e4d442ed46a10b62b5d07ed81aa1ad65430d5186e95cc64293502c9b84937a6470bb4 WHIRLPOOL daf741cd8465ce65ae0e3f304b7c49d55be828da5fc285ac3a2b8e6fc7e68865b184b738a79fa7fbf1e106d647200a40224902ef7041e4dd5ab2c9ef054e4199 +DIST vbox-kernel-module-src-5.0.40.tar.xz 601604 SHA256 fb5dd2a62e1a53266f32c35523fa5ccc1d7928d4867c92637ef7368686acb70d SHA512 1236b16f2138872233a1a4f8933ec8803c7a15370cfadc148d338c803da572480d978d6be4b2512c3c80f7ee77cfef3d0a939b876ba9c53afbd267b24e2bfa65 WHIRLPOOL 59916e48536e1711cf0d98fecd3fe3ea0cce4b2eec622d34e5e52f20b05adb45dc627f4de5e55cfc92e2669b0fe71d4e1ba361d911d51da5bad3d80c42a66d24 +DIST vbox-kernel-module-src-5.1.26.tar.xz 625384 SHA256 5ba4f728c5b62c3d93828d99c5b54b8fb24a16bc8674e704714c4f71eb95ddc4 SHA512 c77e0d8dfade2abac95162e7e7a424be4875e44d43bcf2a13e0e50caa69f5fd0d21c77f03bb2cd4cbd5df4ab31e9fbd49ecd9220a49af8cd10081b960e014010 WHIRLPOOL 519246aeae6637cb8eb4b841552dc5e63f9a3d761fa6bcec43601c8a3194264457e4e78d200e975e31266af2944aa81f7487cf389f43d93db08f60a700a7758e +DIST vbox-kernel-module-src-5.1.28.tar.xz 625464 SHA256 d6f3b7afa98d2b526d8da3c8906addc307eea069db371d012ebbffc1ccdf9dd2 SHA512 c8ae6c065ad42e57eee9a54f288ba60fd9b32efe18cb74c8a035d547b30e7d857c9091307485a8dfc77eec45de29d3217c6871140e167e2438759c314c47680a WHIRLPOOL c6508d63cacfcd3ac901f276cd793dc83c595bc73965518baa544b5cf5157ea52363b759f03586f743d6c2e0fda7252b98136c96cef28ecfb31f6915d4ce5709 +EBUILD virtualbox-modules-5.0.16.ebuild 1658 SHA256 29ad421687c251f40743d974fbe413bb1a8363124c9279641179f82fce3b1406 SHA512 8d14149d1aaaacc254f538d323f86e6442f928534ed026edbd2605fec70f4d99bbdf881c4f5925e1e3885266f4b10be6931d48b56a97062107e61ef44ffe17d4 WHIRLPOOL 017ab643243b5f148e117cd880621435cbbb7451319153a5f6bd5f900990505e1fed687998487b5bfe325f99b6c2ab359b0bc41bbc18f9d486e91c7753caa0e3 +EBUILD virtualbox-modules-5.0.40.ebuild 1656 SHA256 b1ec82bb3097e17ce244d2814b6b54dd01f455bb7d4eac7847bc9d30cdddf3eb SHA512 bdb8d8f9f6ef4db63fb6039b136e49d5e7e52cff9a6ed476ad404c81d161655d9458caa267c8705ed4bfb84bf1677622584973f6b0adb413601d57810fab6690 WHIRLPOOL 56557c299ff5c90a6c922189bf78366ec372afe256f1d5a57f174f78845874c03337c79db3472cec3adc9f1bf1e55f347592a478cd615f5e8c3801a5d4100cdf +EBUILD virtualbox-modules-5.1.26.ebuild 1656 SHA256 b1ec82bb3097e17ce244d2814b6b54dd01f455bb7d4eac7847bc9d30cdddf3eb SHA512 bdb8d8f9f6ef4db63fb6039b136e49d5e7e52cff9a6ed476ad404c81d161655d9458caa267c8705ed4bfb84bf1677622584973f6b0adb413601d57810fab6690 WHIRLPOOL 56557c299ff5c90a6c922189bf78366ec372afe256f1d5a57f174f78845874c03337c79db3472cec3adc9f1bf1e55f347592a478cd615f5e8c3801a5d4100cdf +EBUILD virtualbox-modules-5.1.28.ebuild 1658 SHA256 67e799ce3dcd804e17b1add98fc6145c3a1e087c0d41cff39fa36900f75dacdf SHA512 b4733d729c837c9aaf0c2038a0b2fb6fcc845c56a6cea6d9e1ed9f4f28c995b2d71ee288d031a1cf45017fcf99054f9a01d33be70d6a5a35774732cb98d49209 WHIRLPOOL 8495ba85efdfea2309386aa698938f7127f8fa96922976f302ae59ba7c8752aa6a3102b1627dbaa2ebad501be8d97468053e08b751fd4db9f3a15380260565e8 +MISC ChangeLog 15585 SHA256 1150b2d0c819fdc67b6af69698fc4b82dcfb2d47e4cd5ebd0360caf4502b2ae3 SHA512 976c36a658a36301093c65cb28454adaf1d35545e4c96c4d4484769a9c8fcdd970aa47562819ae8709082a7f4dddaa8f3054cb1eece9d0467d114b2c73b40de8 WHIRLPOOL 07e6b4bad2dfa2062ea8e3210db82c9899860ff22797c5997ed02a9521fe20e85bf0e3e99fddde5605e16b80e3bc11e0c521e1a043addbf898ec35cc2f760491 +MISC ChangeLog-2015 29882 SHA256 f6ea3807c5c0ef811678bc4f3181b0c2b66e6bcc26dd8ed7c77ce81b56aebf52 SHA512 e20127bc643d6e0a34ed78dfbfcf221039d268bcf92dbefc517e274045ee28ccf532d201931bf7bca309417e8a2f0b88f52cad07895143ae1ec1525dfaceadb2 WHIRLPOOL 50174a725fa49c1b83a86552b8b452a2741f5d0e8f0bb6403626ffe4548aab5b4e64f9b9dc57dd287fe2d113b3a6141840a60cead31f5a721c9595d8eae8256a +MISC metadata.xml 502 SHA256 0d9c3daad11ea6f866d7600d188621b46992e253faaff2041c2d05206daac239 SHA512 399c87acfd980b7dc29b42d7eeeead868bc8e9efc085f23aa97507d9da6f4af272e747172c4d5d6c1dfe15dc125193a72a5d6ca47ec82615345e239ff26246e4 WHIRLPOOL 080399fd9fb91197af76e134ef7081c8f6fe04ddf00b09c206bd8b3f45a3e558235ce63e25917602e2bba95a974e5f6818f1e7b9e596a4e37cc961c271671b3d diff --git a/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh b/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh new file mode 100755 index 000000000000..756d243542bc --- /dev/null +++ b/app-emulation/virtualbox-modules/files/create_vbox_modules_tarball.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# Create a virtualbox modules tarball from a VirtualBox binary package. +# We cannot download the package by this script because of the unpredictable +# build number being in the filename. +# +# usage: create_vbox_modules_tarball.sh VirtualBox-4.1.18-78361-Linux_amd64.run + +[ -f "$1" ] || exit 1 + +VBOX_PACKAGE="$1" +VERSION_SUFFIX="" + +if [[ ${VBOX_PACKAGE} = *_BETA* ]] || [[ ${VBOX_PACKAGE} = *_RC* ]] ; then + VERSION_SUFFIX="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-[[:digit:]\.]\+\(_[[:alpha:]]\+[[:digit:]]\).*@\L\1@')" + +fi + +VBOX_VER="$(echo ${VBOX_PACKAGE} | sed 's@.*VirtualBox-\([[:digit:]\.]\+\).*@\1@')${VERSION_SUFFIX}" + + +sh ${VBOX_PACKAGE} --noexec --keep --nox11 || exit 2 +cd install || exit 3 +tar -xaf VirtualBox.tar.bz2 || exit 4 +cd src/vboxhost || exit 5 +tar -cvJf ../../../vbox-kernel-module-src-${VBOX_VER}.tar.xz . || exit 6 +cd ../../.. && rm install -rf + +exit 0 diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch new file mode 100644 index 000000000000..4e4cde06c784 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.4-pax-const.patch @@ -0,0 +1,48 @@ +diff -urp vboxdrv.orig/SUPDrvIDC.h vboxdrv/SUPDrvIDC.h +--- vboxdrv.orig/SUPDrvIDC.h 2011-09-06 15:53:27.852567531 +0200 ++++ vboxdrv/SUPDrvIDC.h 2011-09-06 15:54:05.420565524 +0200 +@@ -160,7 +160,7 @@ typedef struct SUPDRVIDCREQGETSYM + { + /** The symbol address. */ + PFNRT pfnSymbol; +- } Out; ++ } __no_const Out; + } u; + } SUPDRVIDCREQGETSYM; + /** Pointer to a SUPDRV IDC get symbol request. */ +diff -urp vboxnetflt.orig/include/VBox/intnet.h vboxnetflt/include/VBox/intnet.h +--- vboxnetflt.orig/include/VBox/intnet.h 2011-09-06 15:53:27.852567531 +0200 ++++ vboxnetflt/include/VBox/intnet.h 2011-09-06 15:54:05.424565524 +0200 +@@ -783,7 +783,7 @@ typedef struct INTNETTRUNKFACTORY + DECLR0CALLBACKMEMBER(int, pfnCreateAndConnect,(struct INTNETTRUNKFACTORY *pIfFactory, const char *pszName, + PINTNETTRUNKSWPORT pSwitchPort, uint32_t fFlags, + PINTNETTRUNKIFPORT *ppIfPort)); +-} INTNETTRUNKFACTORY; ++} __no_const INTNETTRUNKFACTORY; + /** Pointer to the trunk factory. */ + typedef INTNETTRUNKFACTORY *PINTNETTRUNKFACTORY; + +diff -urp vboxnetflt.orig/linux/VBoxNetFlt-linux.c vboxnetflt/linux/VBoxNetFlt-linux.c +--- vboxnetflt.orig/linux/VBoxNetFlt-linux.c 2011-07-19 12:15:22.000000000 +0200 ++++ vboxnetflt/linux/VBoxNetFlt-linux.c 2011-09-06 15:56:00.516559379 +0200 +@@ -840,7 +840,7 @@ typedef struct ethtool_ops OVR_OPSTYPE; + + # else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) */ + +-typedef struct net_device_ops OVR_OPSTYPE; ++typedef net_device_ops_no_const OVR_OPSTYPE; + # define OVR_OPS netdev_ops + # define OVR_XMIT pOrgOps->ndo_start_xmit + +diff -urp vboxpci.orig/include/VBox/rawpci.h vboxpci/include/VBox/rawpci.h +--- vboxpci.orig/include/VBox/rawpci.h 2011-04-18 17:01:12.000000000 +0200 ++++ vboxpci/include/VBox/rawpci.h 2011-09-06 15:57:17.340555277 +0200 +@@ -545,7 +545,7 @@ typedef struct RAWPCIFACTORY + DECLR0CALLBACKMEMBER(void, pfnDeinitVm,(PRAWPCIFACTORY pFactory, + PVM pVM, + PRAWPCIPERVM pPciData)); +-} RAWPCIFACTORY; ++} __no_const RAWPCIFACTORY; + + #define RAWPCIFACTORY_UUID_STR "ea089839-4171-476f-adfb-9e7ab1cbd0fb" + diff --git a/app-emulation/virtualbox-modules/files/virtualbox.conf b/app-emulation/virtualbox-modules/files/virtualbox.conf new file mode 100644 index 000000000000..452f0a9ff3e8 --- /dev/null +++ b/app-emulation/virtualbox-modules/files/virtualbox.conf @@ -0,0 +1,4 @@ +vboxnetflt +vboxnetadp +vboxdrv +vboxpci diff --git a/app-emulation/virtualbox-modules/metadata.xml b/app-emulation/virtualbox-modules/metadata.xml new file mode 100644 index 000000000000..851d70de80c5 --- /dev/null +++ b/app-emulation/virtualbox-modules/metadata.xml @@ -0,0 +1,15 @@ + + + + + polynomial-c@gentoo.org + Lars Wendler + + + masterzorag@gmail.com + Proxy maintainer. CC him on bugs + + + Apply patch needed for pax enabled kernels + + diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.0.16.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.16.ebuild new file mode 100644 index 000000000000..8aab1453509d --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.16.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2016 Gentoo Foundation +# 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-bin + +EAPI=6 + +inherit eutils linux-mod user + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pax_kernel" + +RDEPEND="!=app-emulation/virtualbox-9999" + +S=${WORKDIR} + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})" + +pkg_setup() { + enewgroup vboxusers + + CONFIG_CHECK="!TRIM_UNUSED_KSYMS" + ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly." + + linux-mod_pkg_setup + + BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" +} + +src_prepare() { + if kernel_is -ge 2 6 33 ; then + # evil patch for new kernels - header moved + grep -lR linux/autoconf.h * | xargs sed -i -e 's:::' + fi + + if use pax_kernel && kernel_is -ge 3 0 0 ; then + epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch + fi + + default +} + +src_install() { + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + doins "${FILESDIR}"/virtualbox.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst + elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\"," + elog "\"vboxnetadp\" and \"vboxpci\" to:" + elog " /etc/conf.d/modules" +} diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.0.40.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.40.ebuild new file mode 100644 index 000000000000..fc282ccbb370 --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.0.40.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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-bin + +EAPI=6 + +inherit eutils linux-mod user + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="pax_kernel" + +RDEPEND="!=app-emulation/virtualbox-9999" + +S=${WORKDIR} + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})" + +pkg_setup() { + enewgroup vboxusers + + CONFIG_CHECK="!TRIM_UNUSED_KSYMS" + ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly." + + linux-mod_pkg_setup + + BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" +} + +src_prepare() { + if kernel_is -ge 2 6 33 ; then + # evil patch for new kernels - header moved + grep -lR linux/autoconf.h * | xargs sed -i -e 's:::' + fi + + if use pax_kernel && kernel_is -ge 3 0 0 ; then + epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch + fi + + default +} + +src_install() { + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + doins "${FILESDIR}"/virtualbox.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst + elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\"," + elog "\"vboxnetadp\" and \"vboxpci\" to:" + elog " /etc/conf.d/modules" +} diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.26.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.26.ebuild new file mode 100644 index 000000000000..fc282ccbb370 --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.26.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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-bin + +EAPI=6 + +inherit eutils linux-mod user + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="pax_kernel" + +RDEPEND="!=app-emulation/virtualbox-9999" + +S=${WORKDIR} + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})" + +pkg_setup() { + enewgroup vboxusers + + CONFIG_CHECK="!TRIM_UNUSED_KSYMS" + ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly." + + linux-mod_pkg_setup + + BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" +} + +src_prepare() { + if kernel_is -ge 2 6 33 ; then + # evil patch for new kernels - header moved + grep -lR linux/autoconf.h * | xargs sed -i -e 's:::' + fi + + if use pax_kernel && kernel_is -ge 3 0 0 ; then + epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch + fi + + default +} + +src_install() { + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + doins "${FILESDIR}"/virtualbox.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst + elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\"," + elog "\"vboxnetadp\" and \"vboxpci\" to:" + elog " /etc/conf.d/modules" +} diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-5.1.28.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.28.ebuild new file mode 100644 index 000000000000..6600e4fb53b0 --- /dev/null +++ b/app-emulation/virtualbox-modules/virtualbox-modules-5.1.28.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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-bin + +EAPI=6 + +inherit eutils linux-mod user + +MY_P=vbox-kernel-module-src-${PV} +DESCRIPTION="Kernel Modules for Virtualbox" +HOMEPAGE="http://www.virtualbox.org/" +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="pax_kernel" + +RDEPEND="!=app-emulation/virtualbox-9999" + +S=${WORKDIR} + +BUILD_TARGETS="all" +BUILD_TARGET_ARCH="${ARCH}" +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})" + +pkg_setup() { + enewgroup vboxusers + + CONFIG_CHECK="!TRIM_UNUSED_KSYMS" + ERROR_TRIM_UNUSED_KSYMS="The kernel option CONFIG_TRIM_UNUSED_KSYMS removed kernel symbols that are needed by ${PN} to load correctly." + + linux-mod_pkg_setup + + BUILD_PARAMS="KERN_DIR=${KV_DIR} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1" +} + +src_prepare() { + if kernel_is -ge 2 6 33 ; then + # evil patch for new kernels - header moved + grep -lR linux/autoconf.h * | xargs sed -i -e 's:::' + fi + + if use pax_kernel && kernel_is -ge 3 0 0 ; then + epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch + fi + + default +} + +src_install() { + linux-mod_src_install + insinto /usr/lib/modules-load.d/ + doins "${FILESDIR}"/virtualbox.conf +} + +pkg_postinst() { + linux-mod_pkg_postinst + elog "If you are using sys-apps/openrc, please add \"vboxdrv\", \"vboxnetflt\"," + elog "\"vboxnetadp\" and \"vboxpci\" to:" + elog " /etc/conf.d/modules" +} -- cgit v1.2.3