11 |
11 |
DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
|
12 |
12 |
HOMEPAGE="https://www.virtualbox.org/"
|
13 |
13 |
SRC_URI="https://download.virtualbox.org/virtualbox/${PV}/${MY_P}.tar.bz2
|
14 |
|
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-6.1.36.tar.bz2"
|
|
14 |
https://gitweb.gentoo.org/proj/virtualbox-patches.git/snapshot/virtualbox-patches-7.0.8.tar.bz2"
|
15 |
15 |
S="${WORKDIR}/${MY_PN}-${PV}"
|
16 |
16 |
|
17 |
|
LICENSE="GPL-2"
|
|
17 |
# Reminder: see the LICENSE related comment in app-emulation/virtualbox-additions ebuild
|
|
18 |
LICENSE="GPL-3 LGPL-2.1+ MIT || ( GPL-3 CDDL )"
|
18 |
19 |
SLOT="0/$(ver_cut 1-2)"
|
19 |
20 |
KEYWORDS="amd64 x86"
|
20 |
|
IUSE="X +dbus"
|
|
21 |
IUSE="+dbus gui"
|
21 |
22 |
|
22 |
23 |
# automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
|
|
24 |
# TODO: find out what this is, remove comment if obsolete
|
|
25 |
|
23 |
26 |
RDEPEND="
|
24 |
27 |
acct-group/vboxguest
|
25 |
28 |
acct-group/vboxsf
|
... | ... | |
27 |
30 |
sys-libs/pam
|
28 |
31 |
sys-libs/zlib
|
29 |
32 |
dbus? ( sys-apps/dbus )
|
30 |
|
X? (
|
|
33 |
gui? (
|
31 |
34 |
x11-apps/xrandr
|
32 |
35 |
x11-apps/xrefresh
|
33 |
36 |
x11-libs/libX11
|
... | ... | |
36 |
39 |
x11-libs/libXt
|
37 |
40 |
)
|
38 |
41 |
"
|
|
42 |
# some libs here are indirect dependencies, and also needed at compile time.
|
|
43 |
# keeping them in DEPEND to avoid warnings from qa-vdb.
|
39 |
44 |
DEPEND="
|
40 |
45 |
${RDEPEND}
|
41 |
|
X? (
|
42 |
|
x11-base/xorg-proto
|
|
46 |
gui? (
|
43 |
47 |
x11-libs/libICE
|
44 |
48 |
x11-libs/libSM
|
45 |
49 |
x11-libs/libXau
|
46 |
50 |
x11-libs/libXdmcp
|
|
51 |
x11-base/xorg-proto
|
47 |
52 |
)
|
48 |
53 |
"
|
49 |
54 |
BDEPEND="
|
50 |
|
>=dev-util/kbuild-0.1.9998.3127
|
51 |
|
<=dev-util/kbuild-0.1.9998.3500
|
52 |
55 |
>=dev-lang/yasm-0.6.2
|
|
56 |
>=dev-util/kbuild-0.1.9998.3127
|
53 |
57 |
sys-devel/bin86
|
54 |
58 |
sys-power/iasl
|
55 |
59 |
"
|
56 |
60 |
PDEPEND="
|
57 |
|
X? ( x11-drivers/xf86-video-vboxvideo )
|
|
61 |
gui? ( x11-drivers/xf86-video-vboxvideo )
|
58 |
62 |
"
|
59 |
63 |
|
60 |
64 |
PATCHES=(
|
... | ... | |
84 |
88 |
|
85 |
89 |
# Disable things unused or splitted into separate ebuilds
|
86 |
90 |
cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die
|
87 |
|
use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk
|
|
91 |
if ! use gui; then
|
|
92 |
echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk || die
|
|
93 |
fi
|
88 |
94 |
|
89 |
95 |
# Remove pointless GCC version check
|
90 |
|
sed -e '/^check_gcc$/d' -i configure || die
|
|
96 |
sed -e '/ check_gcc$/d' -i configure || die
|
91 |
97 |
|
92 |
98 |
# Respect LDFLAGS (bug #759100)
|
93 |
|
sed -i -e '/TEMPLATE_VBOXR3EXE_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk
|
|
99 |
sed -i -e '/TEMPLATE_VBoxR3Exe_LDFLAGS.linux[ ]*=/ s/$/ $(CCLDFLAGS)/' Config.kmk || die
|
94 |
100 |
|
95 |
|
eapply "${WORKDIR}/virtualbox-patches-6.1.36/patches"
|
|
101 |
eapply "${WORKDIR}/virtualbox-patches-7.0.8/patches"
|
96 |
102 |
eapply_user
|
97 |
103 |
}
|
98 |
104 |
|
... | ... | |
177 |
183 |
# Move this here for bug 836037
|
178 |
184 |
local modargs=( KERN_DIR="${KV_OUT_DIR}" KERN_VER="${KV_FULL}" )
|
179 |
185 |
local modlist=( vboxguest vboxsf )
|
180 |
|
use X && modlist+=( vboxvideo )
|
|
186 |
use gui && modlist+=( vboxvideo )
|
181 |
187 |
modlist=( "${modlist[@]/%/=misc:${VBOX_MOD_SRC_DIR}}" )
|
182 |
188 |
linux-mod-r1_src_compile
|
183 |
189 |
}
|
... | ... | |
215 |
221 |
fperms 0755 /usr/bin/VBoxControl
|
216 |
222 |
|
217 |
223 |
# VBoxClient user service and xrandr wrapper
|
218 |
|
if use X ; then
|
|
224 |
if use gui ; then
|
219 |
225 |
doins VBoxClient
|
220 |
226 |
fperms 0755 /usr/bin/VBoxClient
|
221 |
227 |
doins VBoxDRMClient
|
... | ... | |
251 |
257 |
pkg_postinst() {
|
252 |
258 |
linux-mod-r1_pkg_postinst
|
253 |
259 |
udev_reload
|
254 |
|
if ! use X ; then
|
255 |
|
elog "use flag X is off, enable it to install the"
|
|
260 |
if ! use gui ; then
|
|
261 |
elog "use flag gui is off, enable it to install the"
|
256 |
262 |
elog "X Window System video driver."
|
257 |
263 |
fi
|
258 |
264 |
elog ""
|