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-extpack-oracle/, app-emulation/virtualbox-modules/, ...
Date: Thu, 20 Jan 2022 15:32:05
Message-Id: 1642692696.bd3931dc09b86d4b65941674c760fc8908d5a158.polynomial-c@gentoo
1 commit: bd3931dc09b86d4b65941674c760fc8908d5a158
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jan 20 15:30:04 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jan 20 15:31:36 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd3931dc
7
8 virtualbox packages: Security bump to version 6.1.32
9
10 Bug: https://bugs.gentoo.org/831440
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-emulation/virtualbox-additions/Manifest | 1 +
14 .../virtualbox-additions-6.1.32.ebuild | 34 ++
15 app-emulation/virtualbox-extpack-oracle/Manifest | 1 +
16 .../virtualbox-extpack-oracle-6.1.32.ebuild | 41 ++
17 app-emulation/virtualbox-guest-additions/Manifest | 1 +
18 .../virtualbox-guest-additions-6.1.32.ebuild | 221 +++++++++
19 app-emulation/virtualbox-modules/Manifest | 1 +
20 .../virtualbox-modules-6.1.32.ebuild | 67 +++
21 app-emulation/virtualbox/Manifest | 1 +
22 app-emulation/virtualbox/virtualbox-6.1.32.ebuild | 510 +++++++++++++++++++++
23 10 files changed, 878 insertions(+)
24
25 diff --git a/app-emulation/virtualbox-additions/Manifest b/app-emulation/virtualbox-additions/Manifest
26 index dbc34c710785..925ae01f1b00 100644
27 --- a/app-emulation/virtualbox-additions/Manifest
28 +++ b/app-emulation/virtualbox-additions/Manifest
29 @@ -1,3 +1,4 @@
30 DIST VBoxGuestAdditions_6.1.24.iso 61081600 BLAKE2B 66427a961c83f2de1a0b8671066154133795e8e4f50ac82e927e82e05594c520b155f29f7f19373e5846c36a1e3f6e5d2f5d17db1cebc1996c4d1737d5b45862 SHA512 8753558fcf467805bff801be43281597ef6738f90f8f7a62f6acbba2753e57f44bc72cb66411f0a0f413135026ddf683b0330b49ccad77676ec67b7bf3faf06e
31 DIST VBoxGuestAdditions_6.1.28.iso 62226432 BLAKE2B 0f2d4076476945466cd5d3c5e3064c0f23e511596933d29cd7bab275ee1a21ac5fb81a4723c342f79946000e97681a5e9875cba006bdee6ec684169abd5e04d9 SHA512 2801c78909bdd38b623e958ce61154da7aa2ababf6e7723baf50e958afd1a8d4b0930800fe5549f728a7ac7979d8fa1597c969bf28743d7266b16ccc1b5960bb
32 DIST VBoxGuestAdditions_6.1.30.iso 62238720 BLAKE2B 1459548ad7d4c7ed79a44793d11fc4071a8b043dc0cb9b113775688c254cdfa8f658dcf33fa666c5d4c000357f8a1f8ef0f43268af8f84bd6833e16381e276d1 SHA512 0729275f46b486872f665b264c6ad83a0d42bb2a35ff5e96d9a8449bc9042328219f7533e6ef6ded0351e1fa73024755b32560af13606e808910262c3b133726
33 +DIST VBoxGuestAdditions_6.1.32.iso 62388224 BLAKE2B e8e4addf5d3a61ff193fcccf185353aa4325ed3747f1bc9afb376276cd38857cc2a087e8c6872cef083ea4eeda20a0c29bac62263c378b6c608e5fb6424623a0 SHA512 268526eec6d07e69e3ab583a11211331c103db87162be045e0068ebd6beeda491e215ea6de6ca2aed10e4312dd9b2904ab315f05bad7041ba6787bfa61aeb6e9
34
35 diff --git a/app-emulation/virtualbox-additions/virtualbox-additions-6.1.32.ebuild b/app-emulation/virtualbox-additions/virtualbox-additions-6.1.32.ebuild
36 new file mode 100644
37 index 000000000000..dee7c12719a6
38 --- /dev/null
39 +++ b/app-emulation/virtualbox-additions/virtualbox-additions-6.1.32.ebuild
40 @@ -0,0 +1,34 @@
41 +# Copyright 2022 Gentoo Authors
42 +# Distributed under the terms of the GNU General Public License v2
43 +
44 +EAPI=8
45 +
46 +MY_PN=VBoxGuestAdditions
47 +MY_PV="${PV/beta/BETA}"
48 +MY_PV="${MY_PV/rc/RC}"
49 +MY_P=${MY_PN}_${MY_PV}
50 +
51 +DESCRIPTION="CD image containing guest additions for VirtualBox"
52 +HOMEPAGE="https://www.virtualbox.org/"
53 +SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.iso"
54 +
55 +LICENSE="GPL-2+ LGPL-2.1+ MIT SGI-B-2.0 CDDL"
56 +SLOT="0/$(ver_cut 1-2)"
57 +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
58 +KEYWORDS="~amd64"
59 +IUSE=""
60 +RESTRICT="mirror"
61 +
62 +RDEPEND="!app-emulation/virtualbox-bin
63 + !=app-emulation/virtualbox-9999"
64 +
65 +S="${WORKDIR}"
66 +
67 +src_unpack() {
68 + return 0
69 +}
70 +
71 +src_install() {
72 + insinto /usr/share/${PN/-additions}
73 + newins "${DISTDIR}"/${MY_P}.iso ${MY_PN}.iso
74 +}
75
76 diff --git a/app-emulation/virtualbox-extpack-oracle/Manifest b/app-emulation/virtualbox-extpack-oracle/Manifest
77 index bf8ebfa38f39..6836ed519f82 100644
78 --- a/app-emulation/virtualbox-extpack-oracle/Manifest
79 +++ b/app-emulation/virtualbox-extpack-oracle/Manifest
80 @@ -1,3 +1,4 @@
81 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.24.tar.gz 11135003 BLAKE2B 53bb6dc35eb8ab1a58492ca3b67b63885ffa1ad3ed3a51a9e7e8c522845b082c420fb39a31a379ee56b45c9b02452acc5be4d72c5a5d9bddaa428bf7c9a3a086 SHA512 e2af2213e99c8c35a3090f5e36d05b1ef27c920cd31a2bf97b0368a89f27a5e2d0e0e0dced5e4e7bacda50fe4b57738924f13a933f5307ff2c8c4015ecc030ae
82 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.28.tar.gz 11136237 BLAKE2B 66f09d39a60277358b08f073e3d5836bdb4acddfacc0c5321b19f876d4c5407ed1039b65e22e188690cb6c034aacca2be8d60a52acb8467a6c6319f46c15bb61 SHA512 7e352889469ad678e93d042a5a240820753918cd191c9e164678b84947fba5ae0616fda7f8e6385b2ba525e51948e4860ca91cdd62a2eb503f79acadcb367f2e
83 DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.30.tar.gz 11136343 BLAKE2B c3db50c02da2a9a6ba766bf24103f0f45f073ea65954352fe3a3f01c25974374f6c7f7851e933ce4e5a082ec3944f1c521d74f51e10db5708454bd8817d8f23d SHA512 c525743b2304fe39c66f56147d85a92d4fc884cae007c8b801519e0b5bcbf08c7656ba66befbac63b03ba4d20034899ae4438c263de0bae7a3fd36af1608ea75
84 +DIST Oracle_VM_VirtualBox_Extension_Pack-6.1.32.tar.gz 11137804 BLAKE2B 376274d56ce61a9da785be0a3de63566bc39e9c7a2915a33ff7792173f7625c21d345da757e9963d9b1833124c3430523bc89ba0a0ed27b66a6d87a07d6d6602 SHA512 e7297a9fccd6c74a7986496da71bd6a0970bc53c49845b9bc44714ab04e90e9a4c427f1491f6ec287cdba87a93733de7849f5e78ab7f3ee1a127e8ac4ea20861
85
86 diff --git a/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.32.ebuild b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.32.ebuild
87 new file mode 100644
88 index 000000000000..10b24ce1fc11
89 --- /dev/null
90 +++ b/app-emulation/virtualbox-extpack-oracle/virtualbox-extpack-oracle-6.1.32.ebuild
91 @@ -0,0 +1,41 @@
92 +# Copyright 2022 Gentoo Authors
93 +# Distributed under the terms of the GNU General Public License v2
94 +
95 +EAPI=8
96 +
97 +MAIN_PV="$(ver_cut 1-3)"
98 +if [[ ${PV} = *_beta* ]] || [[ ${PV} = *_rc* ]] ; then
99 + MY_PV="${MAIN_PV}_$(ver_cut 5-6)"
100 + DEP_PV="${MY_PV}"
101 + MY_PV="${MY_PV/beta/BETA}"
102 + MY_PV="${MY_PV/rc/RC}"
103 +else
104 + MY_PV="${MAIN_PV}"
105 + DEP_PV="${MAIN_PV}"
106 +fi
107 +#VBOX_BUILD_ID="$(ver_cut 4)"
108 +MY_PN="Oracle_VM_VirtualBox_Extension_Pack"
109 +MY_P="${MY_PN}-${MY_PV}" #-${VBOX_BUILD_ID}"
110 +
111 +DESCRIPTION="PUEL extensions for VirtualBox"
112 +HOMEPAGE="https://www.virtualbox.org/"
113 +SRC_URI="https://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.vbox-extpack -> ${MY_P}.tar.gz"
114 +
115 +LICENSE="PUEL"
116 +SLOT="0/$(ver_cut 1-2)"
117 +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
118 +KEYWORDS="~amd64"
119 +IUSE=""
120 +RESTRICT="bindist mirror strip"
121 +
122 +RDEPEND="=app-emulation/virtualbox-${DEP_PV}*"
123 +
124 +S="${WORKDIR}"
125 +
126 +QA_PREBUILT="/usr/lib*/virtualbox/ExtensionPacks/${MY_PN}/.*"
127 +
128 +src_install() {
129 + insinto /usr/$(get_libdir)/virtualbox/ExtensionPacks/${MY_PN}
130 + doins -r linux.${ARCH}
131 + doins ExtPack* PXE-Intel.rom
132 +}
133
134 diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
135 index 3cf1e4f1facd..6c72dc819aec 100644
136 --- a/app-emulation/virtualbox-guest-additions/Manifest
137 +++ b/app-emulation/virtualbox-guest-additions/Manifest
138 @@ -1,4 +1,5 @@
139 DIST VirtualBox-6.1.24.tar.bz2 165754851 BLAKE2B 65bbc130281a745a00eee2a055dd59893e2f4b701cbdb31f4c45e2b7389f85f59d8a78ce1e03c83734a49b76fa61f56ea083a588874fa4023b723694f75ee8fb SHA512 cf2c5f58d2f160f8a22d94b7e30bcdaabd907661e05a72341bee93f5092b96c0c84d2291005f433040235227e3d6595ce0e66759c44c24eaedc6c9614646b3d6
140 DIST VirtualBox-6.1.28.tar.bz2 165774255 BLAKE2B fe66ab411ef8fd78ca7b5deb151b2bfc11f3625d54629e6768da9040297cea999c53873c94437f2a57b245e71db0e28bd2ad94ed557f8a1c1c674f477301e192 SHA512 d0eb49a82ec6ddb7ce7da362faf86254d324e73522001c44ab0f26a09ead3d9a800ce0d4ad3698853d4f9a4e9803ceb21f3bf50388a1855edcb2a42ce51f3a96
141 DIST VirtualBox-6.1.30.tar.bz2 165769447 BLAKE2B e15a8370c7cd83b547012639c3361da1b2ee40e8b094f11c22fadb95c9ddaae4791ee7cab16cb2eb23c6da4fc383f89f629335d577fa834fa1a979e19b9701bb SHA512 fab5b8327d9ad4186e584e90d1aca461d95731d0935509301e8adfe28d0737fb3ded5ac1d97e4cd1edc12c79bebb75cc675289762f9e918106f34bf6e8d363d4
142 +DIST VirtualBox-6.1.32.tar.bz2 165758238 BLAKE2B 24873d7cc8bd306ea3552fe75379fbe7be767c85406042344eb047ed31184c3357aea07dda5e15c275f5036ae63106ef1d2e6524b143bc645a6b5ba0016f1391 SHA512 8bf7af6b8b4d3ba90f0e91589cf26400648436eb9da6d31c1a760460bfe5eb7311ac3220b4c9a98ac50e559641d3d5f559134be65288821038255de1c2c7ce1e
143 DIST virtualbox-6.1.12-patches-01.tar.xz 2528 BLAKE2B a5d7cde0daea41bee2e40e46569c725769927a31865d99d13b8b13c4903e59b4097f85da15dc592b9c7e8baf8ff805397af827620f107ba09a468b4d1198ecab SHA512 f71d10a9fbce99c3f631ef30bcfa9d0e017e702ac509541b039e08ccbcd024beb93fde09c43d90af5d9d28f6842a7947f20e7950d3897da3e6d57859657e1123
144
145 diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.32.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.32.ebuild
146 new file mode 100644
147 index 000000000000..9610a3230f06
148 --- /dev/null
149 +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-6.1.32.ebuild
150 @@ -0,0 +1,221 @@
151 +# Copyright 2022 Gentoo Authors
152 +# Distributed under the terms of the GNU General Public License v2
153 +
154 +EAPI=7
155 +
156 +inherit linux-mod systemd toolchain-funcs
157 +
158 +MY_PN="VirtualBox"
159 +MY_PV="${PV/beta/BETA}"
160 +MY_PV="${MY_PV/rc/RC}"
161 +MY_P="${MY_PN}-${MY_PV}"
162 +[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)"
163 +
164 +DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
165 +HOMEPAGE="https://www.virtualbox.org/"
166 +SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
167 + https://dev.gentoo.org/~polynomial-c/virtualbox/patchsets/virtualbox-6.1.12-patches-01.tar.xz"
168 +
169 +LICENSE="GPL-2"
170 +SLOT="0/$(ver_cut 1-2)"
171 +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
172 +KEYWORDS="~amd64 ~x86"
173 +IUSE="X"
174 +
175 +# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
176 +RDEPEND="
177 + acct-group/vboxguest
178 + acct-group/vboxsf
179 + acct-user/vboxguest
180 + X? ( x11-apps/xrandr
181 + x11-apps/xrefresh
182 + x11-libs/libXmu
183 + x11-libs/libX11
184 + x11-libs/libXt
185 + x11-libs/libXext
186 + x11-libs/libXau
187 + x11-libs/libXdmcp
188 + x11-libs/libSM
189 + x11-libs/libICE )
190 + sys-apps/dbus
191 +"
192 +DEPEND="
193 + ${RDEPEND}
194 + >=dev-util/kbuild-0.1.9998.3127
195 + >=dev-lang/yasm-0.6.2
196 + sys-devel/bin86
197 + sys-libs/pam
198 + sys-power/iasl
199 + x11-base/xorg-proto
200 +"
201 +PDEPEND="
202 + X? ( x11-drivers/xf86-video-vboxvideo )
203 +"
204 +BUILD_TARGETS="all"
205 +BUILD_TARGET_ARCH="${ARCH}"
206 +
207 +S="${WORKDIR}/${MY_PN}-${DIR_PV:-${PV}}"
208 +VBOX_MOD_SRC_DIR="${S}/out/linux.${ARCH}/release/bin/additions/src"
209 +
210 +pkg_setup() {
211 + export DISTCC_DISABLE=1 #674256
212 + MODULE_NAMES="vboxguest(misc:${VBOX_MOD_SRC_DIR}/vboxguest:${VBOX_MOD_SRC_DIR}/vboxguest)
213 + vboxsf(misc:${VBOX_MOD_SRC_DIR}/vboxsf:${VBOX_MOD_SRC_DIR}/vboxsf)"
214 + use X && MODULE_NAMES+=" vboxvideo(misc:${VBOX_MOD_SRC_DIR}/vboxvideo::${VBOX_MOD_SRC_DIR}/vboxvideo)"
215 +
216 + linux-mod_pkg_setup
217 + BUILD_PARAMS="KERN_DIR=/lib/modules/${KV_FULL}/build KERNOUT=${KV_OUT_DIR} KBUILD_EXTRA_SYMBOLS=${S}/Module.symvers"
218 +}
219 +
220 +src_prepare() {
221 + # Remove shipped binaries (kBuild,yasm), see bug #232775
222 + rm -r kBuild/bin tools || die
223 +
224 + # Provide kernel sources
225 + pushd src/VBox/Additions &>/dev/null || die
226 + ebegin "Extracting guest kernel module sources"
227 + kmk GuestDrivers-src vboxguest-src vboxsf-src vboxvideo-src &>/dev/null || die
228 + eend
229 + popd &>/dev/null || die
230 +
231 + # PaX fixes (see bug #298988)
232 + pushd "${VBOX_MOD_SRC_DIR}" &>/dev/null || die
233 + eapply "${FILESDIR}"/vboxguest-6.0.6-log-use-c99.patch
234 + popd &>/dev/null || die
235 +
236 + # Disable things unused or splitted into separate ebuilds
237 + cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
238 + use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
239 +
240 + # Remove pointless GCC version check
241 + sed -e '/^check_gcc$/d' -i configure || die
242 +
243 + eapply "${WORKDIR}/patches"
244 +
245 + eapply_user
246 +}
247 +
248 +src_configure() {
249 + # build the user-space tools, warnings are harmless
250 + local cmd=(
251 + ./configure
252 + --nofatal
253 + --disable-xpcom
254 + --disable-sdl-ttf
255 + --disable-pulse
256 + --disable-alsa
257 + --with-gcc="$(tc-getCC)"
258 + --with-g++="$(tc-getCXX)"
259 + --target-arch=${ARCH}
260 + --with-linux="${KV_OUT_DIR}"
261 + --build-headless
262 + )
263 + echo "${cmd[@]}"
264 + "${cmd[@]}" || die "configure failed"
265 + source ./env.sh
266 + export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
267 +}
268 +
269 +src_compile() {
270 + MAKE="kmk" emake \
271 + VBOX_BUILD_PUBLISHER=_Gentoo \
272 + TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \
273 + TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \
274 + TOOL_YASM_AS=yasm \
275 + VBOX_ONLY_ADDITIONS=1 \
276 + KBUILD_VERBOSE=2
277 +
278 + # Now creating the kernel modules. We must do this _after_
279 + # we compiled the user-space tools as we need two of the
280 + # automatically generated header files. (>=3.2.0)
281 + linux-mod_src_compile
282 +}
283 +
284 +src_install() {
285 + linux-mod_src_install
286 +
287 + cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
288 +
289 + insinto /sbin
290 + newins mount.vboxsf mount.vboxsf
291 + fperms 4755 /sbin/mount.vboxsf
292 +
293 + newinitd "${FILESDIR}"/${PN}-8.initd-r1 ${PN}
294 +
295 + insinto /usr/sbin/
296 + newins VBoxService vboxguest-service
297 + fperms 0755 /usr/sbin/vboxguest-service
298 +
299 + insinto /usr/bin
300 + doins VBoxControl
301 + fperms 0755 /usr/bin/VBoxControl
302 +
303 + # VBoxClient user service and xrandr wrapper
304 + if use X ; then
305 + doins VBoxClient
306 + fperms 0755 /usr/bin/VBoxClient
307 +
308 + pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
309 + || die
310 + newins 98vboxadd-xclient VBoxClient-all
311 + fperms 0755 /usr/bin/VBoxClient-all
312 + popd &>/dev/null || die
313 + fi
314 +
315 + # udev rule for vboxdrv
316 + local udev_rules_dir="/lib/udev/rules.d"
317 + dodir ${udev_rules_dir}
318 + echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
319 + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
320 + || die
321 + echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
322 + >> "${ED}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
323 + || die
324 +
325 + # VBoxClient autostart file
326 + insinto /etc/xdg/autostart
327 + doins "${FILESDIR}"/vboxclient.desktop
328 +
329 + # sample xorg.conf
330 + dodoc "${FILESDIR}"/xorg.conf.vbox
331 + docompress -x "${ED}"/usr/share/doc/${PF}/xorg.conf.vbox
332 +
333 + systemd_dounit "${FILESDIR}/${PN}.service"
334 +}
335 +
336 +pkg_postinst() {
337 + linux-mod_pkg_postinst
338 + if ! use X ; then
339 + elog "use flag X is off, enable it to install the"
340 + elog "X Window System video driver."
341 + fi
342 + elog ""
343 + elog "Please add users to the \"vboxguest\" group so they can"
344 + elog "benefit from seamless mode, auto-resize and clipboard."
345 + elog ""
346 + elog "The vboxsf group has been added to make automount services work."
347 + elog "These services are part of the shared folders support."
348 + elog ""
349 + elog "Please add:"
350 + elog "/etc/init.d/${PN}"
351 + elog "to the default runlevel in order to start"
352 + elog "needed services."
353 + elog "To use the VirtualBox X driver, use the following"
354 + elog "file as your /etc/X11/xorg.conf:"
355 + elog " /usr/share/doc/${PF}/xorg.conf.vbox"
356 + elog ""
357 + elog "Also make sure you use the Mesa library for OpenGL:"
358 + elog " eselect opengl set xorg-x11"
359 + elog ""
360 + elog "An autostart .desktop file has been installed to start"
361 + elog "VBoxClient in desktop sessions."
362 + elog ""
363 + elog "You can mount shared folders with:"
364 + elog " mount -t vboxsf <shared_folder_name> <mount_point>"
365 + elog ""
366 + elog "Warning:"
367 + elog "this ebuild is only needed if you are running gentoo"
368 + elog "inside a VirtualBox Virtual Machine, you don't need"
369 + elog "it to run VirtualBox itself."
370 + elog ""
371 +}
372
373 diff --git a/app-emulation/virtualbox-modules/Manifest b/app-emulation/virtualbox-modules/Manifest
374 index c8a28b33d6b5..d2a2b3b4a0d2 100644
375 --- a/app-emulation/virtualbox-modules/Manifest
376 +++ b/app-emulation/virtualbox-modules/Manifest
377 @@ -1,3 +1,4 @@
378 DIST vbox-kernel-module-src-6.1.24.tar.xz 674584 BLAKE2B 3a20f615426a7b788bc4bce00e416fa3822cbec3f00691651acd53b7c7bda8b43d3669195cececa83f1fc50a792e417adcd709d859497da143c4d93a2b414912 SHA512 220d57ab33a41464cd9e506d38390e60b9e67ca8262b1a13732f3d40820e038365c129eb7144f1932b8c2d3fdcea828de3070dd927788015301bf4aa59c1cc48
379 DIST vbox-kernel-module-src-6.1.28.tar.xz 674924 BLAKE2B 4a262a1609df493df8ba5b78d2daa225aed41fe51d54648633393dcb24ec648ae95f2fcb003f9a7ceb1a2a2ea99bc113d54db6621523ddfc3819e729c46f42c8 SHA512 b0fc1a1a821c93aa7dadd3a064d87938d31cf6ce37ab55d960fba104df4f28ab48797dc254e246af7bf1d5df913a9f329035941555fc9f165f02abea4448f684
380 DIST vbox-kernel-module-src-6.1.30.tar.xz 675180 BLAKE2B 7df02a4b94dd30d211538cffe7e08aa590f78fea79add4105ecaa2e6d0ac2b495d950bab4950f301100b189a58dd29d1fd42c97c12e4458a5953cb5a2ed7c44e SHA512 19f080bea53bc11eeb67bb894fdce3ee6cfc0e9bcd0e697baad86b4f49ac331b0dfcca9b043def8ef8a9d40d3b867f09e14ffafb4eef47418184cbfd0e9acc03
381 +DIST vbox-kernel-module-src-6.1.32.tar.xz 675300 BLAKE2B fc843779ae9348203f2528009880e2d2dde65102c8be1837eb3a362e2703f9ecf54f7a10939318cbecbb41b4790a8b7d56c98ad82a4e83592b4c5491af0772b5 SHA512 e1c00be4fe2a0447c30ae0d380fc7a78fec1c3f52fb0cf0d20ccefcd174bf11097a91aa862ef8753be012e546a31555f5be9c1136cbaefc2240708b3adde7e5b
382
383 diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-6.1.32.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.32.ebuild
384 new file mode 100644
385 index 000000000000..a218e2492188
386 --- /dev/null
387 +++ b/app-emulation/virtualbox-modules/virtualbox-modules-6.1.32.ebuild
388 @@ -0,0 +1,67 @@
389 +# Copyright 2022 Gentoo Authors
390 +# Distributed under the terms of the GNU General Public License v2
391 +
392 +# XXX: the tarball here is just the kernel modules split out of the binary
393 +# package that comes from VirtualBox-*.run
394 +
395 +EAPI=7
396 +
397 +inherit linux-mod toolchain-funcs
398 +
399 +MY_P="vbox-kernel-module-src-${PV}"
400 +DESCRIPTION="Kernel Modules for Virtualbox"
401 +HOMEPAGE="https://www.virtualbox.org/"
402 +SRC_URI="https://dev.gentoo.org/~polynomial-c/virtualbox/${MY_P}.tar.xz"
403 +
404 +LICENSE="GPL-2"
405 +SLOT="0/$(ver_cut 1-2)"
406 +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
407 +KEYWORDS="~amd64"
408 +IUSE="pax-kernel"
409 +
410 +RDEPEND="!=app-emulation/virtualbox-9999"
411 +
412 +S="${WORKDIR}"
413 +
414 +BUILD_TARGETS="all"
415 +MODULE_NAMES="vboxdrv(misc:${S}) vboxnetflt(misc:${S}) vboxnetadp(misc:${S})"
416 +MODULESD_VBOXDRV_ENABLED="yes"
417 +MODULESD_VBOXNETADP_ENABLED="no"
418 +MODULESD_VBOXNETFLT_ENABLED="no"
419 +
420 +pkg_setup() {
421 + linux-mod_pkg_setup
422 + BUILD_PARAMS="CC=$(tc-getBUILD_CC) KERN_DIR=${KV_DIR} KERN_VER=${KV_FULL} O=${KV_OUT_DIR} V=1 KBUILD_VERBOSE=1"
423 + if linux_chkconfig_present CC_IS_CLANG; then
424 + ewarn "Warning: building ${PN} with a clang-built kernel is experimental."
425 +
426 + BUILD_PARAMS+=' CC=${CHOST}-clang'
427 + if linux_chkconfig_present LD_IS_LLD; then
428 + BUILD_PARAMS+=' LD=ld.lld'
429 + if linux_chkconfig_present LTO_CLANG_THIN; then
430 + # kernel enables cache by default leading to sandbox violations
431 + BUILD_PARAMS+=' ldflags-y=--thinlto-cache-dir= LDFLAGS_MODULE=--thinlto-cache-dir='
432 + fi
433 + fi
434 + fi
435 +}
436 +
437 +src_prepare() {
438 + if use pax-kernel && kernel_is -ge 3 0 0 ; then
439 + eapply -p0 "${FILESDIR}"/${PN}-5.2.8-pax-const.patch
440 + fi
441 +
442 + default
443 +}
444 +
445 +src_install() {
446 + linux-mod_src_install
447 + insinto /usr/lib/modules-load.d/
448 + newins "${FILESDIR}"/virtualbox.conf-r1 virtualbox.conf
449 +}
450 +
451 +pkg_postinst() {
452 + # Remove vboxpci.ko from current running kernel
453 + find /lib/modules/${KV_FULL}/misc -type f -name "vboxpci.ko" -delete
454 + linux-mod_pkg_postinst
455 +}
456
457 diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
458 index 3cf1e4f1facd..6c72dc819aec 100644
459 --- a/app-emulation/virtualbox/Manifest
460 +++ b/app-emulation/virtualbox/Manifest
461 @@ -1,4 +1,5 @@
462 DIST VirtualBox-6.1.24.tar.bz2 165754851 BLAKE2B 65bbc130281a745a00eee2a055dd59893e2f4b701cbdb31f4c45e2b7389f85f59d8a78ce1e03c83734a49b76fa61f56ea083a588874fa4023b723694f75ee8fb SHA512 cf2c5f58d2f160f8a22d94b7e30bcdaabd907661e05a72341bee93f5092b96c0c84d2291005f433040235227e3d6595ce0e66759c44c24eaedc6c9614646b3d6
463 DIST VirtualBox-6.1.28.tar.bz2 165774255 BLAKE2B fe66ab411ef8fd78ca7b5deb151b2bfc11f3625d54629e6768da9040297cea999c53873c94437f2a57b245e71db0e28bd2ad94ed557f8a1c1c674f477301e192 SHA512 d0eb49a82ec6ddb7ce7da362faf86254d324e73522001c44ab0f26a09ead3d9a800ce0d4ad3698853d4f9a4e9803ceb21f3bf50388a1855edcb2a42ce51f3a96
464 DIST VirtualBox-6.1.30.tar.bz2 165769447 BLAKE2B e15a8370c7cd83b547012639c3361da1b2ee40e8b094f11c22fadb95c9ddaae4791ee7cab16cb2eb23c6da4fc383f89f629335d577fa834fa1a979e19b9701bb SHA512 fab5b8327d9ad4186e584e90d1aca461d95731d0935509301e8adfe28d0737fb3ded5ac1d97e4cd1edc12c79bebb75cc675289762f9e918106f34bf6e8d363d4
465 +DIST VirtualBox-6.1.32.tar.bz2 165758238 BLAKE2B 24873d7cc8bd306ea3552fe75379fbe7be767c85406042344eb047ed31184c3357aea07dda5e15c275f5036ae63106ef1d2e6524b143bc645a6b5ba0016f1391 SHA512 8bf7af6b8b4d3ba90f0e91589cf26400648436eb9da6d31c1a760460bfe5eb7311ac3220b4c9a98ac50e559641d3d5f559134be65288821038255de1c2c7ce1e
466 DIST virtualbox-6.1.12-patches-01.tar.xz 2528 BLAKE2B a5d7cde0daea41bee2e40e46569c725769927a31865d99d13b8b13c4903e59b4097f85da15dc592b9c7e8baf8ff805397af827620f107ba09a468b4d1198ecab SHA512 f71d10a9fbce99c3f631ef30bcfa9d0e017e702ac509541b039e08ccbcd024beb93fde09c43d90af5d9d28f6842a7947f20e7950d3897da3e6d57859657e1123
467
468 diff --git a/app-emulation/virtualbox/virtualbox-6.1.32.ebuild b/app-emulation/virtualbox/virtualbox-6.1.32.ebuild
469 new file mode 100644
470 index 000000000000..de42d1ff09e7
471 --- /dev/null
472 +++ b/app-emulation/virtualbox/virtualbox-6.1.32.ebuild
473 @@ -0,0 +1,510 @@
474 +# Copyright 2022 Gentoo Authors
475 +# Distributed under the terms of the GNU General Public License v2
476 +
477 +EAPI=7
478 +
479 +PYTHON_COMPAT=( python3_{8..10} )
480 +inherit desktop flag-o-matic java-pkg-opt-2 linux-info pax-utils python-single-r1 tmpfiles toolchain-funcs udev xdg
481 +
482 +MY_PN="VirtualBox"
483 +MY_PV="${PV/beta/BETA}"
484 +MY_PV="${MY_PV/rc/RC}"
485 +MY_P=${MY_PN}-${MY_PV}
486 +[[ "${PV}" == *a ]] && DIR_PV="$(ver_cut 1-3)"
487 +
488 +DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
489 +HOMEPAGE="https://www.virtualbox.org/"
490 +SRC_URI="https://download.virtualbox.org/virtualbox/${DIR_PV:-${MY_PV}}/${MY_P}.tar.bz2
491 + https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-6.1.12-patches-01.tar.xz"
492 +
493 +LICENSE="GPL-2 dtrace? ( CDDL )"
494 +SLOT="0/$(ver_cut 1-2)"
495 +[[ "${PV}" == *_beta* ]] || [[ "${PV}" == *_rc* ]] || \
496 +KEYWORDS="~amd64"
497 +IUSE="alsa debug doc dtrace headless java lvm +opus pam pax-kernel pch pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
498 +
499 +COMMON_DEPEND="
500 + ${PYTHON_DEPS}
501 + !app-emulation/virtualbox-bin
502 + acct-group/vboxusers
503 + ~app-emulation/virtualbox-modules-${DIR_PV:-${PV}}
504 + dev-libs/libIDL
505 + >=dev-libs/libxslt-1.1.19
506 + net-misc/curl
507 + dev-libs/libxml2
508 + media-libs/libpng:0=
509 + media-libs/libvpx:0=
510 + sys-libs/zlib:=
511 + !headless? (
512 + media-libs/libsdl:0[X,video]
513 + x11-libs/libX11
514 + x11-libs/libxcb:=
515 + x11-libs/libXcursor
516 + x11-libs/libXext
517 + x11-libs/libXmu
518 + x11-libs/libXt
519 + opengl? ( media-libs/libglvnd[X] )
520 + qt5? (
521 + dev-qt/qtcore:5
522 + dev-qt/qtgui:5
523 + dev-qt/qtprintsupport:5
524 + dev-qt/qtwidgets:5
525 + dev-qt/qtx11extras:5
526 + opengl? ( dev-qt/qtopengl:5 )
527 + x11-libs/libXinerama
528 + )
529 + )
530 + dev-libs/openssl:0=
531 + virtual/libcrypt:=
532 + lvm? ( sys-fs/lvm2 )
533 + opus? ( media-libs/opus )
534 + udev? ( >=virtual/udev-171 )
535 + vnc? ( >=net-libs/libvncserver-0.9.9 )
536 +"
537 +DEPEND="
538 + ${COMMON_DEPEND}
539 + alsa? ( >=media-libs/alsa-lib-1.0.13 )
540 + !headless? (
541 + x11-libs/libXinerama
542 + opengl? ( virtual/opengl )
543 + )
544 + pam? ( sys-libs/pam )
545 + pax-kernel? ( sys-apps/elfix )
546 + pulseaudio? ( media-sound/pulseaudio )
547 + qt5? ( dev-qt/linguist-tools:5 )
548 + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
549 +"
550 +BDEPEND="
551 + ${PYTHON_DEPS}
552 + >=dev-util/kbuild-0.1.9998.3127
553 + >=dev-lang/yasm-0.6.2
554 + sys-devel/bin86
555 + sys-libs/libcap
556 + sys-power/iasl
557 + virtual/pkgconfig
558 + doc? (
559 + app-text/docbook-sgml-dtd:4.4
560 + dev-texlive/texlive-basic
561 + dev-texlive/texlive-latex
562 + dev-texlive/texlive-latexrecommended
563 + dev-texlive/texlive-latexextra
564 + dev-texlive/texlive-fontsrecommended
565 + dev-texlive/texlive-fontsextra
566 + )
567 + java? ( >=virtual/jdk-1.8 )
568 +"
569 +RDEPEND="
570 + ${COMMON_DEPEND}
571 + java? ( >=virtual/jre-1.6 )
572 +"
573 +
574 +QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
575 + usr/lib/virtualbox/VBoxSDL.so
576 + usr/lib/virtualbox/VBoxSharedFolders.so
577 + usr/lib/virtualbox/VBoxDD2.so
578 + usr/lib/virtualbox/VBoxOGLrenderspu.so
579 + usr/lib/virtualbox/VBoxPython.so
580 + usr/lib/virtualbox/VBoxDD.so
581 + usr/lib/virtualbox/VBoxDDU.so
582 + usr/lib/virtualbox/VBoxREM64.so
583 + usr/lib/virtualbox/VBoxSharedClipboard.so
584 + usr/lib/virtualbox/VBoxHeadless.so
585 + usr/lib/virtualbox/VBoxRT.so
586 + usr/lib/virtualbox/VBoxREM.so
587 + usr/lib/virtualbox/VBoxSettings.so
588 + usr/lib/virtualbox/VBoxKeyboard.so
589 + usr/lib/virtualbox/VBoxSharedCrOpenGL.so
590 + usr/lib/virtualbox/VBoxVMM.so
591 + usr/lib/virtualbox/VirtualBox.so
592 + usr/lib/virtualbox/VBoxOGLhosterrorspu.so
593 + usr/lib/virtualbox/components/VBoxC.so
594 + usr/lib/virtualbox/components/VBoxSVCM.so
595 + usr/lib/virtualbox/components/VBoxDDU.so
596 + usr/lib/virtualbox/components/VBoxRT.so
597 + usr/lib/virtualbox/components/VBoxREM.so
598 + usr/lib/virtualbox/components/VBoxVMM.so
599 + usr/lib/virtualbox/VBoxREM32.so
600 + usr/lib/virtualbox/VBoxPython2_7.so
601 + usr/lib/virtualbox/VBoxXPCOMC.so
602 + usr/lib/virtualbox/VBoxOGLhostcrutil.so
603 + usr/lib/virtualbox/VBoxNetDHCP.so
604 + usr/lib/virtualbox/VBoxNetNAT.so"
605 +
606 +S="${WORKDIR}/${MY_PN}-${DIR_PV:-${MY_PV}}"
607 +
608 +REQUIRED_USE="
609 + java? ( sdk )
610 + python? ( sdk )
611 + vboxwebsrv? ( java )
612 + ${PYTHON_REQUIRED_USE}
613 +"
614 +
615 +pkg_pretend() {
616 + if ! use headless && ! use qt5 ; then
617 + einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
618 + elif use headless && use qt5 ; then
619 + einfo "You selected USE=\"headless qt5\", defaulting to"
620 + einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
621 + fi
622 +
623 + if ! use opengl ; then
624 + einfo "No USE=\"opengl\" selected, this build will lack"
625 + einfo "the OpenGL feature."
626 + fi
627 + if ! use python ; then
628 + einfo "You have disabled the \"python\" USE flag. This will only"
629 + einfo "disable the python bindings being installed."
630 + fi
631 +}
632 +
633 +pkg_setup() {
634 + java-pkg-opt-2_pkg_setup
635 + python-single-r1_pkg_setup
636 +
637 + tc-ld-disable-gold #bug 488176
638 + tc-export CC CXX LD AR RANLIB
639 + export HOST_CC="$(tc-getBUILD_CC)"
640 +}
641 +
642 +src_prepare() {
643 + # Remove shipped binaries (kBuild,yasm), see bug #232775
644 + rm -r kBuild/bin tools || die
645 +
646 + # Replace pointless GCC version check with something less stupid.
647 + # This is needed for the qt5 version check.
648 + sed -e 's@^check_gcc$@cc_maj="$(${CC} -dumpversion | cut -d. -f1)" ; cc_min="$(${CC} -dumpversion | cut -d. -f2)"@' \
649 + -i configure || die
650 +
651 + # Disable things unused or split into separate ebuilds
652 + sed -e "s@MY_LIBDIR@$(get_libdir)@" \
653 + "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
654 +
655 + if ! use pch ; then
656 + # bug #753323
657 + echo -e "VBOX_WITHOUT_PRECOMPILED_HEADERS=1\r\n" >> LocalConfig.kmk || die
658 + fi
659 +
660 + # Respect LDFLAGS
661 + sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
662 + -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
663 +
664 + # Do not use hard-coded ld (related to bug #488176)
665 + sed -e '/QUIET)ld /s@ld @$(LD) @' \
666 + -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
667 +
668 + # Use PAM only when pam USE flag is enbaled (bug #376531)
669 + if ! use pam ; then
670 + einfo "Disabling PAM removes the possibility to use the VRDP features."
671 + sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
672 + sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
673 + src/VBox/HostServices/Makefile.kmk || die
674 + fi
675 +
676 + # add correct java path
677 + if use java ; then
678 + sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
679 + -i "${S}"/Config.kmk || die
680 + java-pkg-opt-2_src_prepare
681 + fi
682 +
683 + # Only add nopie patch when we're on hardened
684 + if gcc-specs-pie ; then
685 + eapply "${FILESDIR}/050_virtualbox-5.2.8-nopie.patch"
686 + fi
687 +
688 + # Only add paxmark patch when we're on pax-kernel
689 + if use pax-kernel ; then
690 + eapply "${FILESDIR}"/virtualbox-5.2.8-paxmark-bldprogs.patch
691 + fi
692 +
693 + eapply "${FILESDIR}/${PN}-6.1.26-configure-include-qt5-path.patch" #805365
694 +
695 + eapply "${WORKDIR}/patches"
696 +
697 + default
698 +}
699 +
700 +doecho() {
701 + echo "$@"
702 + "$@" || die
703 +}
704 +
705 +src_configure() {
706 + local myconf=(
707 + --with-gcc="$(tc-getCC)"
708 + --with-g++="$(tc-getCXX)"
709 + --disable-dbus
710 + --disable-kmods
711 + $(usex alsa '' --disable-alsa)
712 + $(usex debug --build-debug '')
713 + $(usex doc '' --disable-docs)
714 + $(usex java '' --disable-java)
715 + $(usex lvm '' --disable-devmapper)
716 + $(usex opus '' --disable-libopus)
717 + $(usex pulseaudio '' --disable-pulse)
718 + $(usex python '' --disable-python)
719 + $(usex vboxwebsrv --enable-webservice '')
720 + $(usex vnc --enable-vnc '')
721 + )
722 + if ! use headless ; then
723 + myconf+=(
724 + $(usex opengl '' --disable-opengl)
725 + $(usex qt5 '' --disable-qt)
726 + )
727 + else
728 + myconf+=(
729 + --build-headless
730 + --disable-opengl
731 + )
732 + fi
733 + if use amd64 && ! has_multilib_profile ; then
734 + myconf+=( --disable-vmmraw )
735 + fi
736 + # not an autoconf script
737 + doecho ./configure ${myconf[@]}
738 +}
739 +
740 +src_compile() {
741 + source ./env.sh || die
742 +
743 + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
744 + MAKEJOBS=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
745 + MAKELOAD=$(grep -Eo '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+' <<< ${MAKEOPTS}) #'
746 + MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
747 + MAKE="kmk" emake \
748 + VBOX_BUILD_PUBLISHER=_Gentoo \
749 + TOOL_GXX3_CC="$(tc-getCC)" TOOL_GXX3_CXX="$(tc-getCXX)" \
750 + TOOL_GXX3_LD="$(tc-getCXX)" VBOX_GCC_OPT="${CXXFLAGS}" \
751 + TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
752 + VBOX_WITH_VBOXIMGMOUNT=1 \
753 + all
754 +}
755 +
756 +src_install() {
757 + cd "${S}"/out/linux.${ARCH}/$(usex debug debug release)/bin || die
758 +
759 + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each size ico icofile
760 +
761 + vbox_inst() {
762 + local binary="${1}"
763 + local perms="${2:-0750}"
764 + local path="${3:-${vbox_inst_path}}"
765 +
766 + [[ -n "${binary}" ]] || die "vbox_inst: No binary given!"
767 + [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
768 +
769 + insinto ${path}
770 + doins ${binary}
771 + fowners root:vboxusers ${path}/${binary}
772 + fperms ${perms} ${path}/${binary}
773 + }
774 +
775 + # Create configuration files
776 + insinto /etc/vbox
777 + newins "${FILESDIR}/${PN}-4-config" vbox.cfg
778 +
779 + # Set the correct libdir
780 + sed \
781 + -e "s@MY_LIBDIR@$(get_libdir)@" \
782 + -i "${ED}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
783 +
784 + # Install the wrapper script
785 + exeinto ${vbox_inst_path}
786 + newexe "${FILESDIR}/${PN}-ose-6-wrapper" "VBox"
787 + fowners root:vboxusers ${vbox_inst_path}/VBox
788 + fperms 0750 ${vbox_inst_path}/VBox
789 +
790 + # Install binaries and libraries
791 + insinto ${vbox_inst_path}
792 + doins -r components
793 +
794 + for each in VBox{Autostart,BalloonCtrl,BugReport,CpuReport,ExtPackHelperApp,Manage,SVC,Tunctl,VMMPreload,XPCOMIPCD} vboximg-mount *so *r0 iPxeBaseBin ; do
795 + vbox_inst ${each}
796 + done
797 +
798 + # These binaries need to be suid root.
799 + for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
800 + vbox_inst ${each} 4750
801 + done
802 +
803 + # Install EFI Firmware files (bug #320757)
804 + for each in VBoxEFI{32,64}.fd ; do
805 + vbox_inst ${each} 0644
806 + done
807 +
808 + # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
809 + # VBoxXPCOMIPCD (bug #524202)
810 + for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
811 + pax-mark -m "${ED}"${vbox_inst_path}/${each}
812 + done
813 +
814 + # Symlink binaries to the shipped wrapper
815 + for each in vbox{autostart,balloonctrl,bugreport,headless,manage} VBox{Autostart,BalloonCtrl,BugReport,Headless,Manage,VRDP} ; do
816 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
817 + done
818 + dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
819 + dosym ${vbox_inst_path}/vboximg-mount /usr/bin/vboximg-mount
820 +
821 + if use pam ; then
822 + # VRDPAuth only works with this (bug #351949)
823 + dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
824 + fi
825 +
826 + # set an env-variable for 3rd party tools
827 + echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
828 + doenvd "${T}/90virtualbox"
829 +
830 + if ! use headless ; then
831 + vbox_inst rdesktop-vrdp
832 + vbox_inst VBoxSDL 4750
833 + pax-mark -m "${ED}"${vbox_inst_path}/VBoxSDL
834 +
835 + for each in vboxsdl VBoxSDL ; do
836 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
837 + done
838 +
839 + if use qt5 ; then
840 + vbox_inst VirtualBox
841 + vbox_inst VirtualBoxVM 4750
842 + for each in VirtualBox{,VM} ; do
843 + pax-mark -m "${ED}"${vbox_inst_path}/${each}
844 + done
845 +
846 + if use opengl ; then
847 + vbox_inst VBoxTestOGL
848 + pax-mark -m "${ED}"${vbox_inst_path}/VBoxTestOGL
849 + fi
850 +
851 + for each in virtualbox{,vm} VirtualBox{,VM} ; do
852 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
853 + done
854 +
855 + insinto /usr/share/${PN}
856 + doins -r nls
857 + doins -r UnattendedTemplates
858 +
859 + domenu ${PN}.desktop
860 + fi
861 +
862 + pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
863 + for size in 16 32 48 64 128 ; do
864 + newicon -s ${size} ${PN}-${size}px.png ${PN}.png
865 + done
866 + newicon ${PN}-48px.png ${PN}.png
867 + doicon -s scalable ${PN}.svg
868 + popd &>/dev/null || die
869 + pushd "${S}"/src/VBox/Artwork/other &>/dev/null || die
870 + for size in 16 24 32 48 64 72 96 128 256 512 ; do
871 + for ico in hdd ova ovf vbox{,-extpack} vdi vdh vmdk ; do
872 + icofile="${PN}-${ico}-${size}px.png"
873 + if [[ -f "${icofile}" ]] ; then
874 + newicon -s ${size} ${icofile} ${PN}-${ico}.png
875 + fi
876 + done
877 + done
878 + popd &>/dev/null || die
879 + fi
880 +
881 + if use lvm ; then
882 + vbox_inst VBoxVolInfo 4750
883 + dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
884 + fi
885 +
886 + if use sdk ; then
887 + insinto ${vbox_inst_path}
888 + doins -r sdk
889 +
890 + if use java ; then
891 + java-pkg_regjar "${ED}/${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
892 + java-pkg_regso "${ED}/${vbox_inst_path}/libvboxjxpcom.so"
893 + fi
894 + fi
895 +
896 + if use udev ; then
897 + local udevdir="$(get_udevdir)"
898 + insinto ${udevdir}
899 + doins VBoxCreateUSBNode.sh
900 + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
901 + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
902 + insinto ${udevdir}/rules.d
903 + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
904 + > "${T}"/10-virtualbox.rules || die
905 + doins "${T}"/10-virtualbox.rules
906 + fi
907 +
908 + if use vboxwebsrv ; then
909 + vbox_inst vboxwebsrv
910 + dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
911 + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
912 + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
913 + fi
914 +
915 + # Remove dead symlinks (bug #715338)
916 + find "${ED}"/usr/$(get_libdir)/${PN} -xtype l -delete || die
917 +
918 + # Fix version string in extensions or else they don't get accepted
919 + # by the virtualbox host process (see bug #438930)
920 + find ExtensionPacks -type f -name "ExtPack.xml" -print0 \
921 + | xargs --no-run-if-empty --null sed -i '/Version/s@_Gentoo@@' \
922 + || die
923 +
924 + local extensions_dir="${vbox_inst_path}/ExtensionPacks"
925 +
926 + if use vnc ; then
927 + insinto ${extensions_dir}
928 + doins -r ExtensionPacks/VNC
929 + fi
930 +
931 + if use dtrace ; then
932 + insinto ${extensions_dir}
933 + doins -r ExtensionPacks/Oracle_VBoxDTrace_Extension_Pack
934 + fi
935 +
936 + if use doc ; then
937 + dodoc UserManual.pdf
938 + fi
939 +
940 + newtmpfiles "${FILESDIR}"/${PN}-vboxusb_tmpfilesd ${PN}-vboxusb.conf
941 +}
942 +
943 +pkg_postinst() {
944 + xdg_pkg_postinst
945 +
946 + if use udev ; then
947 + udevadm control --reload-rules \
948 + && udevadm trigger --subsystem-match=usb
949 + fi
950 +
951 + tmpfiles_process virtualbox-vboxusb.conf
952 +
953 + if ! use headless && use qt5 ; then
954 + elog "To launch VirtualBox just type: \"virtualbox\"."
955 + fi
956 + elog "You must be in the vboxusers group to use VirtualBox."
957 + elog ""
958 + elog "The latest user manual is available for download at:"
959 + elog "http://download.virtualbox.org/virtualbox/${DIR_PV:-${PV}}/UserManual.pdf"
960 + elog ""
961 + elog "For advanced networking setups you should emerge:"
962 + elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
963 + elog ""
964 + elog "Starting with version 4.0.0, ${PN} has USB-1 support."
965 + elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
966 + elog " app-emulation/virtualbox-extpack-oracle"
967 + elog "package."
968 + elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
969 + elog "the \"extension\" USE flag. For installation of the guest additions ISO"
970 + elog "image, please emerge"
971 + elog " app-emulation/virtualbox-additions"
972 + elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
973 + elog " app-emulation/virtualbox-extpack-oracle"
974 + if ! use udev ; then
975 + elog ""
976 + elog "WARNING!"
977 + elog "Without USE=udev, USB devices will likely not work in ${PN}."
978 + elif [[ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ]] ; then
979 + elog ""
980 + elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
981 + elog "or else USB in ${PN} won't work."
982 + fi
983 +}