Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/virtualbox-modules/
Date: Tue, 25 Feb 2020 17:15:58
Message-Id: 1582650946.061033ff839ae647af1c9431c88d31f005cc803a.polynomial-c@gentoo
1 commit: 061033ff839ae647af1c9431c88d31f005cc803a
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 25 17:10:28 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 25 17:15:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=061033ff
7
8 app-emulation/virtualbox-modules: Don't use deprecated user.eclass anymore
9
10 Move acct-group/vboxusers dependency to app-emulation/virtualbox{,-bin}
11 packages.
12
13 Package-Manager: Portage-2.3.89, Repoman-2.3.20
14 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
15
16 .../virtualbox-modules-6.0.16-r1.ebuild | 55 ++++++++++++++++++++++
17 .../virtualbox-modules-6.1.4-r1.ebuild | 55 ++++++++++++++++++++++
18 2 files changed, 110 insertions(+)
19
20 diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.0.16-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.16-r1.ebuild
21 new file mode 100644
22 index 00000000000..0dac94ce21a
23 --- /dev/null
24 +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.0.16-r1.ebuild
25 @@ -0,0 +1,55 @@
26 +# Copyright 1999-2020 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +# XXX: the tarball here is just the kernel modules split out of the binary
30 +# package that comes from virtualbox-bin
31 +
32 +EAPI=7
33 +
34 +inherit linux-mod toolchain-funcs
35 +
36 +MY_P="vbox-kernel-module-src-${PV}"
37 +DESCRIPTION="Kernel Modules for Virtualbox"
38 +HOMEPAGE="https://www.virtualbox.org/"
39 +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
40 +
41 +LICENSE="GPL-2"
42 +SLOT="0"
43 +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
44 +KEYWORDS="~amd64 ~x86"
45 +IUSE="pax_kernel"
46 +
47 +RDEPEND="!=app-emulation/virtualbox-9999"
48 +
49 +S="${WORKDIR}"
50 +
51 +BUILD_TARGETS="all"
52 +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S}) vboxpci(misc:${S})"
53 +MODULESD_VBOXDRV_ENABLED="yes"
54 +MODULESD_VBOXNETADP_ENABLED="no"
55 +MODULESD_VBOXNETFLT_ENABLED="no"
56 +# The following is a security measure that comes directly from usptream.
57 +# Do NOT remove this!!!
58 +MODULESD_VBOXPCI_ADDITIONS=(
59 + "blacklist vboxpci"
60 + "install vboxpci /bin/true"
61 +)
62 +
63 +pkg_setup() {
64 + linux-mod_pkg_setup
65 + BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
66 +}
67 +
68 +src_prepare() {
69 + if use pax_kernel && kernel_is -ge 3 0 0 ; then
70 + eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
71 + fi
72 +
73 + default
74 +}
75 +
76 +src_install() {
77 + linux-mod_src_install
78 + insinto /usr/lib/modules-load.d/
79 + newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
80 +}
81
82 diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.4-r1.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.4-r1.ebuild
83 new file mode 100644
84 index 00000000000..6ad5644e2ed
85 --- /dev/null
86 +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.4-r1.ebuild
87 @@ -0,0 +1,55 @@
88 +# Copyright 1999-2020 Gentoo Authors
89 +# Distributed under the terms of the GNU General Public License v2
90 +
91 +# XXX: the tarball here is just the kernel modules split out of the binary
92 +# package that comes from virtualbox-bin
93 +
94 +EAPI=7
95 +
96 +inherit linux-mod toolchain-funcs
97 +
98 +MY_P="vbox-kernel-module-src-${PV}"
99 +DESCRIPTION="Kernel Modules for Virtualbox"
100 +HOMEPAGE="https://www.virtualbox.org/"
101 +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
102 +
103 +LICENSE="GPL-2"
104 +SLOT="0"
105 +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
106 +KEYWORDS="~amd64"
107 +IUSE="pax_kernel"
108 +
109 +RDEPEND="!=app-emulation/virtualbox-9999"
110 +
111 +S="${WORKDIR}"
112 +
113 +BUILD_TARGETS="all"
114 +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})"
115 +MODULESD_VBOXDRV_ENABLED="yes"
116 +MODULESD_VBOXNETADP_ENABLED="no"
117 +MODULESD_VBOXNETFLT_ENABLED="no"
118 +
119 +pkg_setup() {
120 + linux-mod_pkg_setup
121 + BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
122 +}
123 +
124 +src_prepare() {
125 + if use pax_kernel && kernel_is -ge 3 0 0 ; then
126 + eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
127 + fi
128 +
129 + default
130 +}
131 +
132 +src_install() {
133 + linux-mod_src_install
134 + insinto /usr/lib/modules-load.d/
135 + newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
136 +}
137 +
138 +pkg_postinst() {
139 + # Remove vboxpci.ko from current running kernel
140 + find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete
141 + linux-mod_pkg_postinst
142 +}