1 |
commit: 513442f7a7c0593bbffe5075731ca43925d35f0e |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 1 15:34:36 2016 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 1 15:34:57 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=513442f7 |
7 |
|
8 |
virtualbox guest packages: Bump to versions 5.1.6 and 5.1.8 |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
app-emulation/virtualbox-guest-additions/Manifest | 2 + |
14 |
.../virtualbox-guest-additions-5.1.6.ebuild | 218 ++++++++++++++++++++ |
15 |
.../virtualbox-guest-additions-5.1.8.ebuild | 218 ++++++++++++++++++++ |
16 |
x11-drivers/xf86-video-virtualbox/Manifest | 2 + |
17 |
...ideo-virtualbox-5.1.4-Makefile.module.kms.patch | 11 ++ |
18 |
.../xf86-video-virtualbox-5.1.6.ebuild | 220 +++++++++++++++++++++ |
19 |
.../xf86-video-virtualbox-5.1.8.ebuild | 220 +++++++++++++++++++++ |
20 |
7 files changed, 891 insertions(+) |
21 |
|
22 |
diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest |
23 |
index 70f7832..05aac7a 100644 |
24 |
--- a/app-emulation/virtualbox-guest-additions/Manifest |
25 |
+++ b/app-emulation/virtualbox-guest-additions/Manifest |
26 |
@@ -2,3 +2,5 @@ DIST VirtualBox-4.3.38.tar.bz2 98437150 SHA256 36f16d435acf04c1dce81df08ba0b522b |
27 |
DIST VirtualBox-4.3.40.tar.bz2 98760522 SHA256 4bbea49ee1eaa600db7af64b05c8ce6a1f7585de08f4f85cd7b6f0f7a798bcc6 SHA512 9af5266587206795b685f642633966d2d380130c559f64ce61d81137258b71fd7dfb9b97d67f54ddc2482c44bd226dee02b8ee1fb5f0ce0ec2044cfa1d364260 WHIRLPOOL f0687e094f35af262c0e64a0859d95adc1a8becd434f73da8a0c952875bdc875210cb05040de868dc2d43626168ff3e220069b3976e58ec727fead9366d5c9dc |
28 |
DIST VirtualBox-5.0.16.tar.bz2 111062984 SHA256 f5a44d33a1db911f445b2eb2d22d9293a96a535cba488b5a235577ef868fa63c SHA512 3da3a227360fb50d299e99770378f65e8cb99525377343fa8faff2360be66643d46f68323d6a8b8d4d26182082f171bb35ab2497167bf6df18827a5ea7742074 WHIRLPOOL ea709057c588f28820790c2b193decba9ee0c57e0f82aa4361ca87aef661315182e18b5ee29558e47ed92f6037eb91befa5390680661a7b9f2248c7819b4a85c |
29 |
DIST VirtualBox-5.0.20.tar.bz2 111231246 SHA256 af9c0787aae22964a1192cefbf9aa91a40c1d41e5fea485adebf09ab922d4c2b SHA512 a039455eed3715b9aa42e2dc6b65ea68b27899c0bcf0065a93c53d1093cce56ebf8a6982cd804208ef9e51794eab9c5c4f3b20550d41532fd4addbd7afda0f8e WHIRLPOOL f74f0a910e5e3f7b1704f57e9831f88b1036efbc61e3b97779f5b2a337ad70d55638b59f356c769d4b6bfd5955348d490f5080b04a3f494f25eb176944756cfd |
30 |
+DIST VirtualBox-5.1.6.tar.bz2 114669517 SHA256 2e0112b0d85841587b8f212e6ba8f6c35b31e1cce6b6999497dc917cd37e6911 SHA512 7b10c203692a091b3de8dda147b386e17fa7d2bdb56031163e0551e54c1ff6a8e953361d51cc6f7bb6978544a6517e843b446e866aa1fa6f96b4677dda27daa4 WHIRLPOOL ba6ea523dc06622854b304b408f2ce402d164ae4dbc5eeb4cc675c3e4c7d8e12db1a3bcee7d19f67d274ff92b32e143c111d5d732b463c48d72d4036910ce141 |
31 |
+DIST VirtualBox-5.1.8.tar.bz2 114688166 SHA256 e447031de468aee746529b2cf60768922f9beff22a13c54284aa430f5e925933 SHA512 178299173ee0062e23aee779faa893a42815d17163eab9ba2ed8b46be63a7110fe1690792de21514dc05ccd5a1752ea0f11357220e0e6f91f101dea3416e819c WHIRLPOOL 20ea8d253d177fd11c4349656aaa0f87f0fb76018511b345e85800d4dd8ab1e2e05c300a1f932670e5f5fac6ea547bfaa0a52b8526c4f363358911c770444a81 |
32 |
|
33 |
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.6.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.6.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000..99fe674 |
36 |
--- /dev/null |
37 |
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.6.ebuild |
38 |
@@ -0,0 +1,218 @@ |
39 |
+# Copyright 1999-2016 Gentoo Foundation |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+# $Id$ |
42 |
+ |
43 |
+EAPI=6 |
44 |
+ |
45 |
+inherit eutils linux-mod systemd user toolchain-funcs |
46 |
+ |
47 |
+MY_PV="${PV/beta/BETA}" |
48 |
+MY_PV="${MY_PV/rc/RC}" |
49 |
+MY_P=VirtualBox-${MY_PV} |
50 |
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests" |
51 |
+HOMEPAGE="http://www.virtualbox.org/" |
52 |
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" |
53 |
+ |
54 |
+LICENSE="GPL-2" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~x86" |
57 |
+IUSE="X" |
58 |
+ |
59 |
+RDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV} |
60 |
+ x11-apps/xrandr |
61 |
+ x11-apps/xrefresh |
62 |
+ x11-libs/libXmu |
63 |
+ x11-libs/libX11 |
64 |
+ x11-libs/libXt |
65 |
+ x11-libs/libXext |
66 |
+ x11-libs/libXau |
67 |
+ x11-libs/libXdmcp |
68 |
+ x11-libs/libSM |
69 |
+ x11-libs/libICE |
70 |
+ x11-proto/glproto ) |
71 |
+ sys-apps/dbus |
72 |
+ !!x11-drivers/xf86-input-virtualbox" |
73 |
+DEPEND="${RDEPEND} |
74 |
+ >=dev-util/kbuild-0.1.9998_pre20131130 |
75 |
+ >=dev-lang/yasm-0.6.2 |
76 |
+ sys-devel/bin86 |
77 |
+ sys-libs/pam |
78 |
+ sys-power/iasl |
79 |
+ X? ( x11-proto/renderproto ) |
80 |
+ !X? ( x11-proto/xproto )" |
81 |
+ |
82 |
+BUILD_TARGETS="all" |
83 |
+BUILD_TARGET_ARCH="${ARCH}" |
84 |
+MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest) |
85 |
+ vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)" |
86 |
+ |
87 |
+S="${WORKDIR}/${MY_P}" |
88 |
+ |
89 |
+pkg_setup() { |
90 |
+ linux-mod_pkg_setup |
91 |
+ BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}" |
92 |
+ enewgroup vboxguest |
93 |
+ enewuser vboxguest -1 /bin/sh /dev/null vboxguest |
94 |
+ # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist |
95 |
+ enewgroup vboxsf |
96 |
+} |
97 |
+ |
98 |
+src_unpack() { |
99 |
+ unpack ${A} |
100 |
+ |
101 |
+ # Create and unpack a tarball with the sources of the Linux guest |
102 |
+ # kernel modules, to include all the needed files |
103 |
+ "${S}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz" |
104 |
+ unpack ./vbox-kmod.tar.gz |
105 |
+ |
106 |
+ # Remove shipped binaries (kBuild,yasm), see bug #232775 |
107 |
+ cd "${S}" |
108 |
+ rm -rf kBuild/bin tools |
109 |
+} |
110 |
+ |
111 |
+src_prepare() { |
112 |
+ # PaX fixes (see bug #298988) |
113 |
+ pushd "${WORKDIR}" &>/dev/null || die |
114 |
+ eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch |
115 |
+ popd &>/dev/null || die |
116 |
+ |
117 |
+ # Disable things unused or splitted into separate ebuilds |
118 |
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die |
119 |
+ use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk |
120 |
+ |
121 |
+ # stupid new header references... |
122 |
+ for vboxheader in {product,revision,version}-generated.h ; do |
123 |
+ for mdir in vbox{guest,sf} ; do |
124 |
+ ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \ |
125 |
+ "${WORKDIR}/${mdir}/${vboxheader}" |
126 |
+ done |
127 |
+ done |
128 |
+ |
129 |
+ # Remove pointless GCC version limitations in check_gcc() |
130 |
+ sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ |
131 |
+ -i configure || die |
132 |
+ |
133 |
+ eapply_user |
134 |
+} |
135 |
+ |
136 |
+src_configure() { |
137 |
+ # build the user-space tools, warnings are harmless |
138 |
+ local cmd=( |
139 |
+ ./configure |
140 |
+ --nofatal |
141 |
+ --disable-xpcom |
142 |
+ --disable-sdl-ttf |
143 |
+ --disable-pulse |
144 |
+ --disable-alsa |
145 |
+ --with-gcc="$(tc-getCC)" |
146 |
+ --with-g++="$(tc-getCXX)" |
147 |
+ --target-arch=${ARCH} |
148 |
+ --with-linux="${KV_OUT_DIR}" |
149 |
+ --build-headless |
150 |
+ ) |
151 |
+ echo "${cmd[@]}" |
152 |
+ "${cmd[@]}" || die "configure failed" |
153 |
+ source ./env.sh |
154 |
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}" |
155 |
+} |
156 |
+ |
157 |
+src_compile() { |
158 |
+ MAKE="kmk" \ |
159 |
+ emake TOOL_YASM_AS=yasm \ |
160 |
+ VBOX_ONLY_ADDITIONS=1 \ |
161 |
+ KBUILD_VERBOSE=2 |
162 |
+ |
163 |
+ # Now creating the kernel modules. We must do this _after_ |
164 |
+ # we compiled the user-space tools as we need two of the |
165 |
+ # automatically generated header files. (>=3.2.0) |
166 |
+ linux-mod_src_compile |
167 |
+} |
168 |
+ |
169 |
+src_install() { |
170 |
+ linux-mod_src_install |
171 |
+ |
172 |
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die |
173 |
+ |
174 |
+ insinto /sbin |
175 |
+ newins mount.vboxsf mount.vboxsf |
176 |
+ fperms 4755 /sbin/mount.vboxsf |
177 |
+ |
178 |
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN} |
179 |
+ |
180 |
+ insinto /usr/sbin/ |
181 |
+ newins VBoxService vboxguest-service |
182 |
+ fperms 0755 /usr/sbin/vboxguest-service |
183 |
+ |
184 |
+ insinto /usr/bin |
185 |
+ doins VBoxControl |
186 |
+ fperms 0755 /usr/bin/VBoxControl |
187 |
+ |
188 |
+ # VBoxClient user service and xrandr wrapper |
189 |
+ if use X ; then |
190 |
+ doins VBoxClient |
191 |
+ fperms 0755 /usr/bin/VBoxClient |
192 |
+ |
193 |
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \ |
194 |
+ || die |
195 |
+ newins 98vboxadd-xclient VBoxClient-all |
196 |
+ fperms 0755 /usr/bin/VBoxClient-all |
197 |
+ popd &>/dev/null || die |
198 |
+ fi |
199 |
+ |
200 |
+ # udev rule for vboxdrv |
201 |
+ local udev_rules_dir="/lib/udev/rules.d" |
202 |
+ dodir ${udev_rules_dir} |
203 |
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ |
204 |
+ >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ |
205 |
+ || die |
206 |
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ |
207 |
+ >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ |
208 |
+ || die |
209 |
+ |
210 |
+ # VBoxClient autostart file |
211 |
+ insinto /etc/xdg/autostart |
212 |
+ doins "${FILESDIR}"/vboxclient.desktop |
213 |
+ |
214 |
+ # sample xorg.conf |
215 |
+ insinto /usr/share/doc/${PF} |
216 |
+ doins "${FILESDIR}"/xorg.conf.vbox |
217 |
+ |
218 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
219 |
+} |
220 |
+ |
221 |
+pkg_postinst() { |
222 |
+ linux-mod_pkg_postinst |
223 |
+ if ! use X ; then |
224 |
+ elog "use flag X is off, enable it to install the" |
225 |
+ elog "X Window System video driver." |
226 |
+ fi |
227 |
+ elog "" |
228 |
+ elog "Please add users to the \"vboxguest\" group so they can" |
229 |
+ elog "benefit from seamless mode, auto-resize and clipboard." |
230 |
+ elog "" |
231 |
+ elog "The vboxsf group has been added to make automount services work." |
232 |
+ elog "These services are part of the shared folders support." |
233 |
+ elog "" |
234 |
+ elog "Please add:" |
235 |
+ elog "/etc/init.d/${PN}" |
236 |
+ elog "to the default runlevel in order to start" |
237 |
+ elog "needed services." |
238 |
+ elog "To use the VirtualBox X driver, use the following" |
239 |
+ elog "file as your /etc/X11/xorg.conf:" |
240 |
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox" |
241 |
+ elog "" |
242 |
+ elog "Also make sure you use the Mesa library for OpenGL:" |
243 |
+ elog " eselect opengl set xorg-x11" |
244 |
+ elog "" |
245 |
+ elog "An autostart .desktop file has been installed to start" |
246 |
+ elog "VBoxClient in desktop sessions." |
247 |
+ elog "" |
248 |
+ elog "You can mount shared folders with:" |
249 |
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>" |
250 |
+ elog "" |
251 |
+ elog "Warning:" |
252 |
+ elog "this ebuild is only needed if you are running gentoo" |
253 |
+ elog "inside a VirtualBox Virtual Machine, you don't need" |
254 |
+ elog "it to run VirtualBox itself." |
255 |
+ elog "" |
256 |
+} |
257 |
|
258 |
diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.8.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.8.ebuild |
259 |
new file mode 100644 |
260 |
index 00000000..99fe674 |
261 |
--- /dev/null |
262 |
+++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-5.1.8.ebuild |
263 |
@@ -0,0 +1,218 @@ |
264 |
+# Copyright 1999-2016 Gentoo Foundation |
265 |
+# Distributed under the terms of the GNU General Public License v2 |
266 |
+# $Id$ |
267 |
+ |
268 |
+EAPI=6 |
269 |
+ |
270 |
+inherit eutils linux-mod systemd user toolchain-funcs |
271 |
+ |
272 |
+MY_PV="${PV/beta/BETA}" |
273 |
+MY_PV="${MY_PV/rc/RC}" |
274 |
+MY_P=VirtualBox-${MY_PV} |
275 |
+DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests" |
276 |
+HOMEPAGE="http://www.virtualbox.org/" |
277 |
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" |
278 |
+ |
279 |
+LICENSE="GPL-2" |
280 |
+SLOT="0" |
281 |
+KEYWORDS="~amd64 ~x86" |
282 |
+IUSE="X" |
283 |
+ |
284 |
+RDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV} |
285 |
+ x11-apps/xrandr |
286 |
+ x11-apps/xrefresh |
287 |
+ x11-libs/libXmu |
288 |
+ x11-libs/libX11 |
289 |
+ x11-libs/libXt |
290 |
+ x11-libs/libXext |
291 |
+ x11-libs/libXau |
292 |
+ x11-libs/libXdmcp |
293 |
+ x11-libs/libSM |
294 |
+ x11-libs/libICE |
295 |
+ x11-proto/glproto ) |
296 |
+ sys-apps/dbus |
297 |
+ !!x11-drivers/xf86-input-virtualbox" |
298 |
+DEPEND="${RDEPEND} |
299 |
+ >=dev-util/kbuild-0.1.9998_pre20131130 |
300 |
+ >=dev-lang/yasm-0.6.2 |
301 |
+ sys-devel/bin86 |
302 |
+ sys-libs/pam |
303 |
+ sys-power/iasl |
304 |
+ X? ( x11-proto/renderproto ) |
305 |
+ !X? ( x11-proto/xproto )" |
306 |
+ |
307 |
+BUILD_TARGETS="all" |
308 |
+BUILD_TARGET_ARCH="${ARCH}" |
309 |
+MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest) |
310 |
+ vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)" |
311 |
+ |
312 |
+S="${WORKDIR}/${MY_P}" |
313 |
+ |
314 |
+pkg_setup() { |
315 |
+ linux-mod_pkg_setup |
316 |
+ BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}" |
317 |
+ enewgroup vboxguest |
318 |
+ enewuser vboxguest -1 /bin/sh /dev/null vboxguest |
319 |
+ # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist |
320 |
+ enewgroup vboxsf |
321 |
+} |
322 |
+ |
323 |
+src_unpack() { |
324 |
+ unpack ${A} |
325 |
+ |
326 |
+ # Create and unpack a tarball with the sources of the Linux guest |
327 |
+ # kernel modules, to include all the needed files |
328 |
+ "${S}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz" |
329 |
+ unpack ./vbox-kmod.tar.gz |
330 |
+ |
331 |
+ # Remove shipped binaries (kBuild,yasm), see bug #232775 |
332 |
+ cd "${S}" |
333 |
+ rm -rf kBuild/bin tools |
334 |
+} |
335 |
+ |
336 |
+src_prepare() { |
337 |
+ # PaX fixes (see bug #298988) |
338 |
+ pushd "${WORKDIR}" &>/dev/null || die |
339 |
+ eapply "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch |
340 |
+ popd &>/dev/null || die |
341 |
+ |
342 |
+ # Disable things unused or splitted into separate ebuilds |
343 |
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die |
344 |
+ use X || echo "VBOX_WITH_X11_ADDITIONS :=" >> LocalConfig.kmk |
345 |
+ |
346 |
+ # stupid new header references... |
347 |
+ for vboxheader in {product,revision,version}-generated.h ; do |
348 |
+ for mdir in vbox{guest,sf} ; do |
349 |
+ ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \ |
350 |
+ "${WORKDIR}/${mdir}/${vboxheader}" |
351 |
+ done |
352 |
+ done |
353 |
+ |
354 |
+ # Remove pointless GCC version limitations in check_gcc() |
355 |
+ sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ |
356 |
+ -i configure || die |
357 |
+ |
358 |
+ eapply_user |
359 |
+} |
360 |
+ |
361 |
+src_configure() { |
362 |
+ # build the user-space tools, warnings are harmless |
363 |
+ local cmd=( |
364 |
+ ./configure |
365 |
+ --nofatal |
366 |
+ --disable-xpcom |
367 |
+ --disable-sdl-ttf |
368 |
+ --disable-pulse |
369 |
+ --disable-alsa |
370 |
+ --with-gcc="$(tc-getCC)" |
371 |
+ --with-g++="$(tc-getCXX)" |
372 |
+ --target-arch=${ARCH} |
373 |
+ --with-linux="${KV_OUT_DIR}" |
374 |
+ --build-headless |
375 |
+ ) |
376 |
+ echo "${cmd[@]}" |
377 |
+ "${cmd[@]}" || die "configure failed" |
378 |
+ source ./env.sh |
379 |
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}" |
380 |
+} |
381 |
+ |
382 |
+src_compile() { |
383 |
+ MAKE="kmk" \ |
384 |
+ emake TOOL_YASM_AS=yasm \ |
385 |
+ VBOX_ONLY_ADDITIONS=1 \ |
386 |
+ KBUILD_VERBOSE=2 |
387 |
+ |
388 |
+ # Now creating the kernel modules. We must do this _after_ |
389 |
+ # we compiled the user-space tools as we need two of the |
390 |
+ # automatically generated header files. (>=3.2.0) |
391 |
+ linux-mod_src_compile |
392 |
+} |
393 |
+ |
394 |
+src_install() { |
395 |
+ linux-mod_src_install |
396 |
+ |
397 |
+ cd "${S}"/out/linux.${ARCH}/release/bin/additions || die |
398 |
+ |
399 |
+ insinto /sbin |
400 |
+ newins mount.vboxsf mount.vboxsf |
401 |
+ fperms 4755 /sbin/mount.vboxsf |
402 |
+ |
403 |
+ newinitd "${FILESDIR}"/${PN}-8.initd ${PN} |
404 |
+ |
405 |
+ insinto /usr/sbin/ |
406 |
+ newins VBoxService vboxguest-service |
407 |
+ fperms 0755 /usr/sbin/vboxguest-service |
408 |
+ |
409 |
+ insinto /usr/bin |
410 |
+ doins VBoxControl |
411 |
+ fperms 0755 /usr/bin/VBoxControl |
412 |
+ |
413 |
+ # VBoxClient user service and xrandr wrapper |
414 |
+ if use X ; then |
415 |
+ doins VBoxClient |
416 |
+ fperms 0755 /usr/bin/VBoxClient |
417 |
+ |
418 |
+ pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \ |
419 |
+ || die |
420 |
+ newins 98vboxadd-xclient VBoxClient-all |
421 |
+ fperms 0755 /usr/bin/VBoxClient-all |
422 |
+ popd &>/dev/null || die |
423 |
+ fi |
424 |
+ |
425 |
+ # udev rule for vboxdrv |
426 |
+ local udev_rules_dir="/lib/udev/rules.d" |
427 |
+ dodir ${udev_rules_dir} |
428 |
+ echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ |
429 |
+ >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ |
430 |
+ || die |
431 |
+ echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \ |
432 |
+ >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \ |
433 |
+ || die |
434 |
+ |
435 |
+ # VBoxClient autostart file |
436 |
+ insinto /etc/xdg/autostart |
437 |
+ doins "${FILESDIR}"/vboxclient.desktop |
438 |
+ |
439 |
+ # sample xorg.conf |
440 |
+ insinto /usr/share/doc/${PF} |
441 |
+ doins "${FILESDIR}"/xorg.conf.vbox |
442 |
+ |
443 |
+ systemd_dounit "${FILESDIR}/${PN}.service" |
444 |
+} |
445 |
+ |
446 |
+pkg_postinst() { |
447 |
+ linux-mod_pkg_postinst |
448 |
+ if ! use X ; then |
449 |
+ elog "use flag X is off, enable it to install the" |
450 |
+ elog "X Window System video driver." |
451 |
+ fi |
452 |
+ elog "" |
453 |
+ elog "Please add users to the \"vboxguest\" group so they can" |
454 |
+ elog "benefit from seamless mode, auto-resize and clipboard." |
455 |
+ elog "" |
456 |
+ elog "The vboxsf group has been added to make automount services work." |
457 |
+ elog "These services are part of the shared folders support." |
458 |
+ elog "" |
459 |
+ elog "Please add:" |
460 |
+ elog "/etc/init.d/${PN}" |
461 |
+ elog "to the default runlevel in order to start" |
462 |
+ elog "needed services." |
463 |
+ elog "To use the VirtualBox X driver, use the following" |
464 |
+ elog "file as your /etc/X11/xorg.conf:" |
465 |
+ elog " /usr/share/doc/${PF}/xorg.conf.vbox" |
466 |
+ elog "" |
467 |
+ elog "Also make sure you use the Mesa library for OpenGL:" |
468 |
+ elog " eselect opengl set xorg-x11" |
469 |
+ elog "" |
470 |
+ elog "An autostart .desktop file has been installed to start" |
471 |
+ elog "VBoxClient in desktop sessions." |
472 |
+ elog "" |
473 |
+ elog "You can mount shared folders with:" |
474 |
+ elog " mount -t vboxsf <shared_folder_name> <mount_point>" |
475 |
+ elog "" |
476 |
+ elog "Warning:" |
477 |
+ elog "this ebuild is only needed if you are running gentoo" |
478 |
+ elog "inside a VirtualBox Virtual Machine, you don't need" |
479 |
+ elog "it to run VirtualBox itself." |
480 |
+ elog "" |
481 |
+} |
482 |
|
483 |
diff --git a/x11-drivers/xf86-video-virtualbox/Manifest b/x11-drivers/xf86-video-virtualbox/Manifest |
484 |
index 70f7832..05aac7a 100644 |
485 |
--- a/x11-drivers/xf86-video-virtualbox/Manifest |
486 |
+++ b/x11-drivers/xf86-video-virtualbox/Manifest |
487 |
@@ -2,3 +2,5 @@ DIST VirtualBox-4.3.38.tar.bz2 98437150 SHA256 36f16d435acf04c1dce81df08ba0b522b |
488 |
DIST VirtualBox-4.3.40.tar.bz2 98760522 SHA256 4bbea49ee1eaa600db7af64b05c8ce6a1f7585de08f4f85cd7b6f0f7a798bcc6 SHA512 9af5266587206795b685f642633966d2d380130c559f64ce61d81137258b71fd7dfb9b97d67f54ddc2482c44bd226dee02b8ee1fb5f0ce0ec2044cfa1d364260 WHIRLPOOL f0687e094f35af262c0e64a0859d95adc1a8becd434f73da8a0c952875bdc875210cb05040de868dc2d43626168ff3e220069b3976e58ec727fead9366d5c9dc |
489 |
DIST VirtualBox-5.0.16.tar.bz2 111062984 SHA256 f5a44d33a1db911f445b2eb2d22d9293a96a535cba488b5a235577ef868fa63c SHA512 3da3a227360fb50d299e99770378f65e8cb99525377343fa8faff2360be66643d46f68323d6a8b8d4d26182082f171bb35ab2497167bf6df18827a5ea7742074 WHIRLPOOL ea709057c588f28820790c2b193decba9ee0c57e0f82aa4361ca87aef661315182e18b5ee29558e47ed92f6037eb91befa5390680661a7b9f2248c7819b4a85c |
490 |
DIST VirtualBox-5.0.20.tar.bz2 111231246 SHA256 af9c0787aae22964a1192cefbf9aa91a40c1d41e5fea485adebf09ab922d4c2b SHA512 a039455eed3715b9aa42e2dc6b65ea68b27899c0bcf0065a93c53d1093cce56ebf8a6982cd804208ef9e51794eab9c5c4f3b20550d41532fd4addbd7afda0f8e WHIRLPOOL f74f0a910e5e3f7b1704f57e9831f88b1036efbc61e3b97779f5b2a337ad70d55638b59f356c769d4b6bfd5955348d490f5080b04a3f494f25eb176944756cfd |
491 |
+DIST VirtualBox-5.1.6.tar.bz2 114669517 SHA256 2e0112b0d85841587b8f212e6ba8f6c35b31e1cce6b6999497dc917cd37e6911 SHA512 7b10c203692a091b3de8dda147b386e17fa7d2bdb56031163e0551e54c1ff6a8e953361d51cc6f7bb6978544a6517e843b446e866aa1fa6f96b4677dda27daa4 WHIRLPOOL ba6ea523dc06622854b304b408f2ce402d164ae4dbc5eeb4cc675c3e4c7d8e12db1a3bcee7d19f67d274ff92b32e143c111d5d732b463c48d72d4036910ce141 |
492 |
+DIST VirtualBox-5.1.8.tar.bz2 114688166 SHA256 e447031de468aee746529b2cf60768922f9beff22a13c54284aa430f5e925933 SHA512 178299173ee0062e23aee779faa893a42815d17163eab9ba2ed8b46be63a7110fe1690792de21514dc05ccd5a1752ea0f11357220e0e6f91f101dea3416e819c WHIRLPOOL 20ea8d253d177fd11c4349656aaa0f87f0fb76018511b345e85800d4dd8ab1e2e05c300a1f932670e5f5fac6ea547bfaa0a52b8526c4f363358911c770444a81 |
493 |
|
494 |
diff --git a/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.1.4-Makefile.module.kms.patch b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.1.4-Makefile.module.kms.patch |
495 |
new file mode 100644 |
496 |
index 00000000..f34ac66 |
497 |
--- /dev/null |
498 |
+++ b/x11-drivers/xf86-video-virtualbox/files/xf86-video-virtualbox-5.1.4-Makefile.module.kms.patch |
499 |
@@ -0,0 +1,11 @@ |
500 |
+--- a/src/VBox/Additions/linux/drm/Makefile.module.kms |
501 |
++++ b/src/VBox/Additions/linux/drm/Makefile.module.kms |
502 |
+@@ -43,7 +43,7 @@ else |
503 |
+ MANGLING := $(KBUILD_EXTMOD)/include/VBox/VBoxGuestMangling.h |
504 |
+ endif |
505 |
+ MOD_CFLAGS = -Wno-declaration-after-statement -fshort-wchar -include $(MANGLING) -fno-pie |
506 |
+-MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include) |
507 |
++MOD_INCL = $(addprefix -I$(KBUILD_EXTMOD),/ /include /r0drv/linux) |
508 |
+ # What on earth is this? |
509 |
+ MOD_INCL += $(addprefix -I$(KBUILD_EXTMOD)/vboxvideo,/ /include) |
510 |
+ MOD_INCL += -Iinclude/drm |
511 |
|
512 |
diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.6.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.6.ebuild |
513 |
new file mode 100644 |
514 |
index 00000000..780bd87 |
515 |
--- /dev/null |
516 |
+++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.6.ebuild |
517 |
@@ -0,0 +1,220 @@ |
518 |
+# Copyright 1999-2016 Gentoo Foundation |
519 |
+# Distributed under the terms of the GNU General Public License v2 |
520 |
+# $Id$ |
521 |
+ |
522 |
+EAPI=6 |
523 |
+ |
524 |
+PYTHON_COMPAT=( python2_7 ) |
525 |
+inherit eutils linux-mod multilib python-single-r1 versionator toolchain-funcs |
526 |
+ |
527 |
+MY_PV="${PV/beta/BETA}" |
528 |
+MY_PV="${MY_PV/rc/RC}" |
529 |
+MY_P=VirtualBox-${MY_PV} |
530 |
+DESCRIPTION="VirtualBox video driver" |
531 |
+HOMEPAGE="http://www.virtualbox.org/" |
532 |
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" |
533 |
+ |
534 |
+LICENSE="GPL-2" |
535 |
+SLOT="0" |
536 |
+KEYWORDS="~amd64 ~x86" |
537 |
+IUSE="dri" |
538 |
+ |
539 |
+RDEPEND=">=x11-base/xorg-server-1.7:=[-minimal] |
540 |
+ x11-libs/libXcomposite" |
541 |
+DEPEND="${RDEPEND} |
542 |
+ >=dev-util/kbuild-0.1.9998_pre20131130 |
543 |
+ ${PYTHON_DEPS} |
544 |
+ >=dev-lang/yasm-0.6.2 |
545 |
+ >=sys-devel/gcc-4.9.0 |
546 |
+ sys-power/iasl |
547 |
+ x11-proto/fontsproto |
548 |
+ x11-proto/randrproto |
549 |
+ x11-proto/renderproto |
550 |
+ x11-proto/resourceproto |
551 |
+ x11-proto/scrnsaverproto |
552 |
+ x11-proto/xextproto |
553 |
+ x11-proto/xineramaproto |
554 |
+ x11-proto/xproto |
555 |
+ x11-libs/libXdmcp |
556 |
+ x11-libs/libXau |
557 |
+ x11-libs/libX11 |
558 |
+ x11-libs/libXfixes |
559 |
+ x11-libs/libXext |
560 |
+ dri? ( x11-proto/xf86driproto |
561 |
+ >=x11-libs/libdrm-2.4.5 )" |
562 |
+ |
563 |
+REQUIRED_USE=( "${PYTHON_REQUIRED_USE}" ) |
564 |
+ |
565 |
+BUILD_TARGETS="all" |
566 |
+BUILD_TARGET_ARCH="${ARCH}" |
567 |
+S="${WORKDIR}/${MY_P}" |
568 |
+MODULES_SRC_DIR="${S}/src/VBox/Additions/linux/drm" |
569 |
+MODULE_NAMES="vboxvideo(misc:${MODULES_SRC_DIR}:${MODULES_SRC_DIR})" |
570 |
+ |
571 |
+PATCHES=( |
572 |
+ # Ugly hack to build the opengl part of the video driver |
573 |
+ "${FILESDIR}/${PN}-2.2.0-enable-opengl.patch" |
574 |
+ |
575 |
+ # unset useless/problematic checks in configure |
576 |
+ "${FILESDIR}/${PN}-5.0.0_beta3-configure_checks.patch" |
577 |
+) |
578 |
+ |
579 |
+QA_TEXTRELS_x86="usr/lib/VBoxOGL.so" |
580 |
+ |
581 |
+pkg_setup() { |
582 |
+ if [ "${MERGE_TYPE}" != "binary" ]; then |
583 |
+ version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}" |
584 |
+ fi |
585 |
+ |
586 |
+ CONFIG_CHECK="~DRM ~DRM_TTM" |
587 |
+ linux-mod_pkg_setup |
588 |
+ BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}" |
589 |
+ |
590 |
+ python-single-r1_pkg_setup |
591 |
+} |
592 |
+ |
593 |
+src_prepare() { |
594 |
+ # Prepare the vboxvideo_drm Makefiles and build dir |
595 |
+ eapply "${FILESDIR}"/${PN}-5.1.4-Makefile.module.kms.patch |
596 |
+ |
597 |
+ # Remove shipped binaries (kBuild,yasm), see bug #232775 |
598 |
+ rm -r kBuild/bin tools || die |
599 |
+ |
600 |
+ # Disable things unused or splitted into separate ebuilds |
601 |
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die |
602 |
+ |
603 |
+ # Remove pointless GCC version limitations in check_gcc() |
604 |
+ sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ |
605 |
+ -i configure || die |
606 |
+ |
607 |
+ default |
608 |
+ |
609 |
+ # link with lazy on hardened #394757 |
610 |
+ sed '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' \ |
611 |
+ -i Config.kmk || die |
612 |
+} |
613 |
+ |
614 |
+src_configure() { |
615 |
+ # build the user-space tools, warnings are harmless |
616 |
+ local cmd=( |
617 |
+ ./configure |
618 |
+ --nofatal |
619 |
+ --disable-xpcom |
620 |
+ --disable-sdl-ttf |
621 |
+ --disable-pulse |
622 |
+ --disable-alsa |
623 |
+ --with-gcc="$(tc-getCC)" |
624 |
+ --with-g++="$(tc-getCXX)" |
625 |
+ --target-arch=${ARCH} |
626 |
+ --with-linux="${KV_OUT_DIR}" |
627 |
+ --build-headless |
628 |
+ ) |
629 |
+ echo "${cmd[@]}" |
630 |
+ "${cmd[@]}" || die "configure failed" |
631 |
+ source ./env.sh |
632 |
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}" |
633 |
+} |
634 |
+ |
635 |
+src_compile() { |
636 |
+ local each targets=( |
637 |
+ Runtime |
638 |
+ Additions/common/VBoxGuestLib |
639 |
+ GuestHost/OpenGL |
640 |
+ Additions/x11/x11stubs |
641 |
+ Additions/common/crOpenGL |
642 |
+ Additions/x11/vboxvideo |
643 |
+ ) |
644 |
+ |
645 |
+ # need to use the upstream build system to create necessary objects properly |
646 |
+ use dri && targets+=( Additions/linux/drm ) |
647 |
+ |
648 |
+ for each in ${targets[@]} ; do |
649 |
+ pushd "${S}"/src/VBox/${each} $>/dev/null || die |
650 |
+ MAKE="kmk" \ |
651 |
+ emake TOOL_YASM_AS=yasm \ |
652 |
+ VBOX_USE_SYSTEM_XORG_HEADERS=1 \ |
653 |
+ KBUILD_PATH="${S}/kBuild" \ |
654 |
+ KBUILD_VERBOSE=2 |
655 |
+ popd &>/dev/null || die |
656 |
+ done |
657 |
+ |
658 |
+ if use dri; then |
659 |
+ local objdir="out/linux.${ARCH}/release/obj/vboxvideo_drm" |
660 |
+ # We need a Makefile, so use Makefile.module.kms |
661 |
+ ln -s Makefile.module.kms "${MODULES_SRC_DIR}"/Makefile || die |
662 |
+ # All of these are expected to be in $(KBUILD_EXTMOD)/ so symlink them into place |
663 |
+ targets=( |
664 |
+ include |
665 |
+ src/VBox/Runtime/r0drv |
666 |
+ src/VBox/Installer/linux/Makefile.include.{head,foot}er |
667 |
+ out/linux.${ARCH}/release/{product,version,revision}-generated.h |
668 |
+ ) |
669 |
+ for each in ${targets[@]} ; do |
670 |
+ ln -s "${S}"/${each} \ |
671 |
+ "${MODULES_SRC_DIR}"/${each##*/} || die |
672 |
+ done |
673 |
+ # see the vboxvideo_drm_SOURCES list in Makefile.kmk for the below, |
674 |
+ # and replace '..' with 'dt' |
675 |
+ targets=( |
676 |
+ dt/dt/common/VBoxVideo/HGSMIBase.o |
677 |
+ dt/dt/common/VBoxVideo/Modesetting.o |
678 |
+ dt/dt/common/VBoxVideo/VBVABase.o |
679 |
+ dt/dt/dt/GuestHost/HGSMI/HGSMICommon.o |
680 |
+ dt/dt/dt/GuestHost/HGSMI/HGSMIMemAlloc.o |
681 |
+ dt/dt/dt/Runtime/common/alloc/heapoffset.o |
682 |
+ ) |
683 |
+ for each in ${targets[@]} ; do |
684 |
+ ln -s "${S}"/${objdir}/${each} \ |
685 |
+ "${MODULES_SRC_DIR}" || die |
686 |
+ ln -s "${S}"/${objdir}/${each}.dep \ |
687 |
+ "${MODULES_SRC_DIR}" || die |
688 |
+ done |
689 |
+ |
690 |
+ # Now creating the kernel modules. We must do this _after_ |
691 |
+ # we compiled the user-space tools as we need two of the |
692 |
+ # automatically generated header files. (>=3.2.0) |
693 |
+ pushd "${MODULES_SRC_DIR}" &>/dev/null || die |
694 |
+ linux-mod_src_compile |
695 |
+ popd &>/dev/null || die |
696 |
+ fi |
697 |
+} |
698 |
+ |
699 |
+src_install() { |
700 |
+ if use dri; then |
701 |
+ pushd "${MODULES_SRC_DIR}" &>/dev/null || die |
702 |
+ linux-mod_src_install |
703 |
+ popd &>/dev/null || die |
704 |
+ fi |
705 |
+ |
706 |
+ cd "${S}/out/linux.${ARCH}/release/bin/additions" || die |
707 |
+ insinto /usr/$(get_libdir)/xorg/modules/drivers |
708 |
+ newins vboxvideo_drv_system.so vboxvideo_drv.so |
709 |
+ |
710 |
+ # Guest OpenGL driver |
711 |
+ insinto /usr/$(get_libdir) |
712 |
+ doins -r VBoxOGL* |
713 |
+ |
714 |
+ if use dri ; then |
715 |
+ dosym /usr/$(get_libdir)/VBoxOGL.so \ |
716 |
+ /usr/$(get_libdir)/dri/vboxvideo_dri.so |
717 |
+ fi |
718 |
+} |
719 |
+ |
720 |
+pkg_postinst() { |
721 |
+ elog "You need to edit the file /etc/X11/xorg.conf and set:" |
722 |
+ elog "" |
723 |
+ elog " Driver \"vboxvideo\"" |
724 |
+ elog "" |
725 |
+ elog "in the Graphics device section (Section \"Device\")" |
726 |
+ elog "" |
727 |
+ if use dri; then |
728 |
+ elog "To use the kernel drm video driver, please add:" |
729 |
+ elog "\"${MODULE_NAMES%(*}\" to:" |
730 |
+ if has_version sys-apps/openrc ; then |
731 |
+ elog "/etc/conf.d/modules" |
732 |
+ else |
733 |
+ elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" |
734 |
+ fi |
735 |
+ elog "" |
736 |
+ fi |
737 |
+} |
738 |
|
739 |
diff --git a/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.8.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.8.ebuild |
740 |
new file mode 100644 |
741 |
index 00000000..780bd87 |
742 |
--- /dev/null |
743 |
+++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-5.1.8.ebuild |
744 |
@@ -0,0 +1,220 @@ |
745 |
+# Copyright 1999-2016 Gentoo Foundation |
746 |
+# Distributed under the terms of the GNU General Public License v2 |
747 |
+# $Id$ |
748 |
+ |
749 |
+EAPI=6 |
750 |
+ |
751 |
+PYTHON_COMPAT=( python2_7 ) |
752 |
+inherit eutils linux-mod multilib python-single-r1 versionator toolchain-funcs |
753 |
+ |
754 |
+MY_PV="${PV/beta/BETA}" |
755 |
+MY_PV="${MY_PV/rc/RC}" |
756 |
+MY_P=VirtualBox-${MY_PV} |
757 |
+DESCRIPTION="VirtualBox video driver" |
758 |
+HOMEPAGE="http://www.virtualbox.org/" |
759 |
+SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2" |
760 |
+ |
761 |
+LICENSE="GPL-2" |
762 |
+SLOT="0" |
763 |
+KEYWORDS="~amd64 ~x86" |
764 |
+IUSE="dri" |
765 |
+ |
766 |
+RDEPEND=">=x11-base/xorg-server-1.7:=[-minimal] |
767 |
+ x11-libs/libXcomposite" |
768 |
+DEPEND="${RDEPEND} |
769 |
+ >=dev-util/kbuild-0.1.9998_pre20131130 |
770 |
+ ${PYTHON_DEPS} |
771 |
+ >=dev-lang/yasm-0.6.2 |
772 |
+ >=sys-devel/gcc-4.9.0 |
773 |
+ sys-power/iasl |
774 |
+ x11-proto/fontsproto |
775 |
+ x11-proto/randrproto |
776 |
+ x11-proto/renderproto |
777 |
+ x11-proto/resourceproto |
778 |
+ x11-proto/scrnsaverproto |
779 |
+ x11-proto/xextproto |
780 |
+ x11-proto/xineramaproto |
781 |
+ x11-proto/xproto |
782 |
+ x11-libs/libXdmcp |
783 |
+ x11-libs/libXau |
784 |
+ x11-libs/libX11 |
785 |
+ x11-libs/libXfixes |
786 |
+ x11-libs/libXext |
787 |
+ dri? ( x11-proto/xf86driproto |
788 |
+ >=x11-libs/libdrm-2.4.5 )" |
789 |
+ |
790 |
+REQUIRED_USE=( "${PYTHON_REQUIRED_USE}" ) |
791 |
+ |
792 |
+BUILD_TARGETS="all" |
793 |
+BUILD_TARGET_ARCH="${ARCH}" |
794 |
+S="${WORKDIR}/${MY_P}" |
795 |
+MODULES_SRC_DIR="${S}/src/VBox/Additions/linux/drm" |
796 |
+MODULE_NAMES="vboxvideo(misc:${MODULES_SRC_DIR}:${MODULES_SRC_DIR})" |
797 |
+ |
798 |
+PATCHES=( |
799 |
+ # Ugly hack to build the opengl part of the video driver |
800 |
+ "${FILESDIR}/${PN}-2.2.0-enable-opengl.patch" |
801 |
+ |
802 |
+ # unset useless/problematic checks in configure |
803 |
+ "${FILESDIR}/${PN}-5.0.0_beta3-configure_checks.patch" |
804 |
+) |
805 |
+ |
806 |
+QA_TEXTRELS_x86="usr/lib/VBoxOGL.so" |
807 |
+ |
808 |
+pkg_setup() { |
809 |
+ if [ "${MERGE_TYPE}" != "binary" ]; then |
810 |
+ version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}" |
811 |
+ fi |
812 |
+ |
813 |
+ CONFIG_CHECK="~DRM ~DRM_TTM" |
814 |
+ linux-mod_pkg_setup |
815 |
+ BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}" |
816 |
+ |
817 |
+ python-single-r1_pkg_setup |
818 |
+} |
819 |
+ |
820 |
+src_prepare() { |
821 |
+ # Prepare the vboxvideo_drm Makefiles and build dir |
822 |
+ eapply "${FILESDIR}"/${PN}-5.1.4-Makefile.module.kms.patch |
823 |
+ |
824 |
+ # Remove shipped binaries (kBuild,yasm), see bug #232775 |
825 |
+ rm -r kBuild/bin tools || die |
826 |
+ |
827 |
+ # Disable things unused or splitted into separate ebuilds |
828 |
+ cp "${FILESDIR}/${PN}-5-localconfig" LocalConfig.kmk || die |
829 |
+ |
830 |
+ # Remove pointless GCC version limitations in check_gcc() |
831 |
+ sed -e "/\s*-o\s*\\\(\s*\$cc_maj\s*-eq\s*[5-9]\s*-a\s*\$cc_min\s*-gt\s*[0-5]\s*\\\)\s*\\\/d" \ |
832 |
+ -i configure || die |
833 |
+ |
834 |
+ default |
835 |
+ |
836 |
+ # link with lazy on hardened #394757 |
837 |
+ sed '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' \ |
838 |
+ -i Config.kmk || die |
839 |
+} |
840 |
+ |
841 |
+src_configure() { |
842 |
+ # build the user-space tools, warnings are harmless |
843 |
+ local cmd=( |
844 |
+ ./configure |
845 |
+ --nofatal |
846 |
+ --disable-xpcom |
847 |
+ --disable-sdl-ttf |
848 |
+ --disable-pulse |
849 |
+ --disable-alsa |
850 |
+ --with-gcc="$(tc-getCC)" |
851 |
+ --with-g++="$(tc-getCXX)" |
852 |
+ --target-arch=${ARCH} |
853 |
+ --with-linux="${KV_OUT_DIR}" |
854 |
+ --build-headless |
855 |
+ ) |
856 |
+ echo "${cmd[@]}" |
857 |
+ "${cmd[@]}" || die "configure failed" |
858 |
+ source ./env.sh |
859 |
+ export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}" |
860 |
+} |
861 |
+ |
862 |
+src_compile() { |
863 |
+ local each targets=( |
864 |
+ Runtime |
865 |
+ Additions/common/VBoxGuestLib |
866 |
+ GuestHost/OpenGL |
867 |
+ Additions/x11/x11stubs |
868 |
+ Additions/common/crOpenGL |
869 |
+ Additions/x11/vboxvideo |
870 |
+ ) |
871 |
+ |
872 |
+ # need to use the upstream build system to create necessary objects properly |
873 |
+ use dri && targets+=( Additions/linux/drm ) |
874 |
+ |
875 |
+ for each in ${targets[@]} ; do |
876 |
+ pushd "${S}"/src/VBox/${each} $>/dev/null || die |
877 |
+ MAKE="kmk" \ |
878 |
+ emake TOOL_YASM_AS=yasm \ |
879 |
+ VBOX_USE_SYSTEM_XORG_HEADERS=1 \ |
880 |
+ KBUILD_PATH="${S}/kBuild" \ |
881 |
+ KBUILD_VERBOSE=2 |
882 |
+ popd &>/dev/null || die |
883 |
+ done |
884 |
+ |
885 |
+ if use dri; then |
886 |
+ local objdir="out/linux.${ARCH}/release/obj/vboxvideo_drm" |
887 |
+ # We need a Makefile, so use Makefile.module.kms |
888 |
+ ln -s Makefile.module.kms "${MODULES_SRC_DIR}"/Makefile || die |
889 |
+ # All of these are expected to be in $(KBUILD_EXTMOD)/ so symlink them into place |
890 |
+ targets=( |
891 |
+ include |
892 |
+ src/VBox/Runtime/r0drv |
893 |
+ src/VBox/Installer/linux/Makefile.include.{head,foot}er |
894 |
+ out/linux.${ARCH}/release/{product,version,revision}-generated.h |
895 |
+ ) |
896 |
+ for each in ${targets[@]} ; do |
897 |
+ ln -s "${S}"/${each} \ |
898 |
+ "${MODULES_SRC_DIR}"/${each##*/} || die |
899 |
+ done |
900 |
+ # see the vboxvideo_drm_SOURCES list in Makefile.kmk for the below, |
901 |
+ # and replace '..' with 'dt' |
902 |
+ targets=( |
903 |
+ dt/dt/common/VBoxVideo/HGSMIBase.o |
904 |
+ dt/dt/common/VBoxVideo/Modesetting.o |
905 |
+ dt/dt/common/VBoxVideo/VBVABase.o |
906 |
+ dt/dt/dt/GuestHost/HGSMI/HGSMICommon.o |
907 |
+ dt/dt/dt/GuestHost/HGSMI/HGSMIMemAlloc.o |
908 |
+ dt/dt/dt/Runtime/common/alloc/heapoffset.o |
909 |
+ ) |
910 |
+ for each in ${targets[@]} ; do |
911 |
+ ln -s "${S}"/${objdir}/${each} \ |
912 |
+ "${MODULES_SRC_DIR}" || die |
913 |
+ ln -s "${S}"/${objdir}/${each}.dep \ |
914 |
+ "${MODULES_SRC_DIR}" || die |
915 |
+ done |
916 |
+ |
917 |
+ # Now creating the kernel modules. We must do this _after_ |
918 |
+ # we compiled the user-space tools as we need two of the |
919 |
+ # automatically generated header files. (>=3.2.0) |
920 |
+ pushd "${MODULES_SRC_DIR}" &>/dev/null || die |
921 |
+ linux-mod_src_compile |
922 |
+ popd &>/dev/null || die |
923 |
+ fi |
924 |
+} |
925 |
+ |
926 |
+src_install() { |
927 |
+ if use dri; then |
928 |
+ pushd "${MODULES_SRC_DIR}" &>/dev/null || die |
929 |
+ linux-mod_src_install |
930 |
+ popd &>/dev/null || die |
931 |
+ fi |
932 |
+ |
933 |
+ cd "${S}/out/linux.${ARCH}/release/bin/additions" || die |
934 |
+ insinto /usr/$(get_libdir)/xorg/modules/drivers |
935 |
+ newins vboxvideo_drv_system.so vboxvideo_drv.so |
936 |
+ |
937 |
+ # Guest OpenGL driver |
938 |
+ insinto /usr/$(get_libdir) |
939 |
+ doins -r VBoxOGL* |
940 |
+ |
941 |
+ if use dri ; then |
942 |
+ dosym /usr/$(get_libdir)/VBoxOGL.so \ |
943 |
+ /usr/$(get_libdir)/dri/vboxvideo_dri.so |
944 |
+ fi |
945 |
+} |
946 |
+ |
947 |
+pkg_postinst() { |
948 |
+ elog "You need to edit the file /etc/X11/xorg.conf and set:" |
949 |
+ elog "" |
950 |
+ elog " Driver \"vboxvideo\"" |
951 |
+ elog "" |
952 |
+ elog "in the Graphics device section (Section \"Device\")" |
953 |
+ elog "" |
954 |
+ if use dri; then |
955 |
+ elog "To use the kernel drm video driver, please add:" |
956 |
+ elog "\"${MODULE_NAMES%(*}\" to:" |
957 |
+ if has_version sys-apps/openrc ; then |
958 |
+ elog "/etc/conf.d/modules" |
959 |
+ else |
960 |
+ elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" |
961 |
+ fi |
962 |
+ elog "" |
963 |
+ fi |
964 |
+} |