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/
Date: Wed, 13 Jul 2016 10:17:11
Message-Id: 1468405005.e3bf261d91ef041f3b5b1ca6282180bfbdc73482.polynomial-c@gentoo
1 commit: e3bf261d91ef041f3b5b1ca6282180bfbdc73482
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 13 10:13:10 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 13 10:16:45 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3bf261d
7
8 app-emulation/virtualbox: Bump to versions 5.0.24 and 5.1.0
9
10 bug #586630
11
12 Package-Manager: portage-2.3.0
13 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
14
15 app-emulation/virtualbox/Manifest | 2 +
16 app-emulation/virtualbox/virtualbox-5.0.24.ebuild | 436 +++++++++++++++++++++
17 app-emulation/virtualbox/virtualbox-5.1.0.ebuild | 438 ++++++++++++++++++++++
18 3 files changed, 876 insertions(+)
19
20 diff --git a/app-emulation/virtualbox/Manifest b/app-emulation/virtualbox/Manifest
21 index 1a97f8d..b464140 100644
22 --- a/app-emulation/virtualbox/Manifest
23 +++ b/app-emulation/virtualbox/Manifest
24 @@ -2,5 +2,7 @@ DIST VirtualBox-4.3.32.tar.bz2 98168101 SHA256 dc5bf4e6f9989792d31bac174d20d7fc9
25 DIST VirtualBox-4.3.36.tar.bz2 98421624 SHA256 af0776df6d03b2709cb76a69f055487bf12bdb3b4163e2a82959860300283046 SHA512 179fd8c7d3562fd6c3c6815ef56a3dbda3fcbb841171f911a923ded06e627fb2e6e33f66124303b448a05c364343ec35e2fb264f462a48e52d66277dfd77bcfc WHIRLPOOL 0419c2baac6f07d729a35a54be872d7949cb6fa99a5ce0f2317df32f27e20e42f045811697e40255f240ec84b08a3a1f36a563841a341a528c37c9e63fda2e6d
26 DIST VirtualBox-5.0.16.tar.bz2 111062984 SHA256 f5a44d33a1db911f445b2eb2d22d9293a96a535cba488b5a235577ef868fa63c SHA512 3da3a227360fb50d299e99770378f65e8cb99525377343fa8faff2360be66643d46f68323d6a8b8d4d26182082f171bb35ab2497167bf6df18827a5ea7742074 WHIRLPOOL ea709057c588f28820790c2b193decba9ee0c57e0f82aa4361ca87aef661315182e18b5ee29558e47ed92f6037eb91befa5390680661a7b9f2248c7819b4a85c
27 DIST VirtualBox-5.0.20.tar.bz2 111231246 SHA256 af9c0787aae22964a1192cefbf9aa91a40c1d41e5fea485adebf09ab922d4c2b SHA512 a039455eed3715b9aa42e2dc6b65ea68b27899c0bcf0065a93c53d1093cce56ebf8a6982cd804208ef9e51794eab9c5c4f3b20550d41532fd4addbd7afda0f8e WHIRLPOOL f74f0a910e5e3f7b1704f57e9831f88b1036efbc61e3b97779f5b2a337ad70d55638b59f356c769d4b6bfd5955348d490f5080b04a3f494f25eb176944756cfd
28 +DIST VirtualBox-5.0.24.tar.bz2 111252724 SHA256 9134b04ca21ca23534e2300aab5ab7ff60d21b56bfd2e21504316bfee73afa87 SHA512 81a40c8c76fda02260ff6bbfdc464dcdb1f95155725772cc1edbafe813ca96955714d5bfe0418e2db60c6983b7fa0eb8a32a3833348c314fc0a429f345b3038c WHIRLPOOL aaffc6c3fda0fbdb93c2ba27857b885c45194fa4bc78d7f4939148fc054bc0b8dc26fbf9bdcab3d0e2f4f873e6bfa07479411839ac97aea6d905538fe00daeb0
29 +DIST VirtualBox-5.1.0.tar.bz2 114065041 SHA256 2367c24f8c912b5599f3e2e7dc586ac2ca457e214add424bb5647fd72fa4740a SHA512 230097ae92e41ee5b5ec590126f75ba1f6dec44f2d0f6c0bb4b3063689c88413dede7684ea7b6f9455bbe69f46a546a2aba90af306e7d536d7f5611aeb5ec51a WHIRLPOOL a117b79875c20896276423469b159fe2fa4143a8e754e8e3b9affb0cbe66859669c401efb8e0b10be7e077d62cc1f439fd81f17a236b86c6281db0868200d26c
30 DIST virtualbox-4.3.16-patches-01.tar.xz 4288 SHA256 270c4f01b2c13c4133987b3acc073dfbf78840212cf09f083dbf8fc80407ce6f SHA512 595f88c4b388b4807347c15c1750ec73aceba1c82ad993e9a05c7b78dfece7b679aff0338b3a48e2ccee7911fb5ed0dba803052332a270230078551f747052bc WHIRLPOOL 2157ee3fb9beed906cff28647c869e37d62551ad8c93801c0f0ec6893675f11786aa6d92acf11c348d30aa58b6e03a3faa879c664dddac6e5b8525035986c9ca
31 DIST virtualbox-5.0.16-patches-01.tar.xz 4024 SHA256 200eb980a12323a61d0fa6dbf61ed64ee1e2bb5e18e16eabdf8668d8fd8be3e4 SHA512 4eed117253754abee9088d4c320b4a6f0b3e1c8313b98f354cb727001156fe68d553a677073d40b921437f4cc073420866d1533aad4e61a79607d8360abbfd4a WHIRLPOOL ab40851873d55ae873ca8ff88670a17476c0d502116f4abda7b766064a2daa71929eb69b4b68c64c3d2d0762134fe85d07044bdedde4bf15924520a604972aaa
32
33 diff --git a/app-emulation/virtualbox/virtualbox-5.0.24.ebuild b/app-emulation/virtualbox/virtualbox-5.0.24.ebuild
34 new file mode 100644
35 index 0000000..7f3c4a3
36 --- /dev/null
37 +++ b/app-emulation/virtualbox/virtualbox-5.0.24.ebuild
38 @@ -0,0 +1,436 @@
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 +PYTHON_COMPAT=( python2_7 )
46 +inherit eutils fdo-mime flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev
47 +
48 +MY_PV="${PV/beta/BETA}"
49 +MY_PV="${MY_PV/rc/RC}"
50 +MY_P=VirtualBox-${MY_PV}
51 +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
52 + https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.0.16-patches-01.tar.xz"
53 +S="${WORKDIR}/${MY_P}"
54 +
55 +DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
56 +HOMEPAGE="http://www.virtualbox.org/"
57 +
58 +LICENSE="GPL-2"
59 +SLOT="0"
60 +KEYWORDS="~amd64 ~x86"
61 +IUSE="alsa debug doc headless java libressl lvm pam pulseaudio +opengl python +qt4 +sdk +udev vboxwebsrv vnc"
62 +
63 +RDEPEND="!app-emulation/virtualbox-bin
64 + ~app-emulation/virtualbox-modules-${PV}
65 + dev-libs/libIDL
66 + >=dev-libs/libxslt-1.1.19
67 + net-misc/curl
68 + dev-libs/libxml2
69 + media-libs/libpng:0=
70 + media-libs/libvpx:0=
71 + sys-libs/zlib
72 + !headless? (
73 + media-libs/libsdl:0[X,video]
74 + x11-libs/libX11
75 + x11-libs/libXcursor
76 + x11-libs/libXext
77 + x11-libs/libXmu
78 + x11-libs/libXt
79 + opengl? ( virtual/opengl media-libs/freeglut )
80 + qt4? (
81 + dev-qt/qtgui:4
82 + dev-qt/qtcore:4
83 + opengl? ( dev-qt/qtopengl:4 )
84 + x11-libs/libXinerama
85 + )
86 + )
87 + java? ( >=virtual/jre-1.6:= )
88 + libressl? ( dev-libs/libressl:= )
89 + !libressl? ( dev-libs/openssl:0= )
90 + lvm? ( sys-fs/lvm2 )
91 + udev? ( >=virtual/udev-171 )
92 + vnc? ( >=net-libs/libvncserver-0.9.9 )"
93 +DEPEND="${RDEPEND}
94 + >=dev-util/kbuild-0.1.9998_pre20131130
95 + >=dev-lang/yasm-0.6.2
96 + sys-devel/bin86
97 + sys-libs/libcap
98 + sys-power/iasl
99 + virtual/pkgconfig
100 + alsa? ( >=media-libs/alsa-lib-1.0.13 )
101 + doc? (
102 + dev-texlive/texlive-basic
103 + dev-texlive/texlive-latex
104 + dev-texlive/texlive-latexrecommended
105 + dev-texlive/texlive-latexextra
106 + dev-texlive/texlive-fontsrecommended
107 + dev-texlive/texlive-fontsextra
108 + )
109 + !headless? ( x11-libs/libXinerama )
110 + java? ( >=virtual/jre-1.6:= )
111 + pam? ( sys-libs/pam )
112 + pulseaudio? ( media-sound/pulseaudio )
113 + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
114 + ${PYTHON_DEPS}"
115 +
116 +QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
117 + usr/lib/virtualbox/VBoxSDL.so
118 + usr/lib/virtualbox/VBoxSharedFolders.so
119 + usr/lib/virtualbox/VBoxDD2.so
120 + usr/lib/virtualbox/VBoxOGLrenderspu.so
121 + usr/lib/virtualbox/VBoxPython.so
122 + usr/lib/virtualbox/VBoxDD.so
123 + usr/lib/virtualbox/VBoxDDU.so
124 + usr/lib/virtualbox/VBoxREM64.so
125 + usr/lib/virtualbox/VBoxSharedClipboard.so
126 + usr/lib/virtualbox/VBoxHeadless.so
127 + usr/lib/virtualbox/VBoxRT.so
128 + usr/lib/virtualbox/VBoxREM.so
129 + usr/lib/virtualbox/VBoxSettings.so
130 + usr/lib/virtualbox/VBoxKeyboard.so
131 + usr/lib/virtualbox/VBoxSharedCrOpenGL.so
132 + usr/lib/virtualbox/VBoxVMM.so
133 + usr/lib/virtualbox/VirtualBox.so
134 + usr/lib/virtualbox/VBoxOGLhosterrorspu.so
135 + usr/lib/virtualbox/components/VBoxC.so
136 + usr/lib/virtualbox/components/VBoxSVCM.so
137 + usr/lib/virtualbox/components/VBoxDDU.so
138 + usr/lib/virtualbox/components/VBoxRT.so
139 + usr/lib/virtualbox/components/VBoxREM.so
140 + usr/lib/virtualbox/components/VBoxVMM.so
141 + usr/lib/virtualbox/VBoxREM32.so
142 + usr/lib/virtualbox/VBoxPython2_7.so
143 + usr/lib/virtualbox/VBoxXPCOMC.so
144 + usr/lib/virtualbox/VBoxOGLhostcrutil.so
145 + usr/lib/virtualbox/VBoxNetDHCP.so
146 + usr/lib/virtualbox/VBoxNetNAT.so"
147 +
148 +REQUIRED_USE="
149 + java? ( sdk )
150 + python? ( sdk )
151 + vboxwebsrv? ( java )
152 + ${PYTHON_REQUIRED_USE}
153 +"
154 +
155 +pkg_setup() {
156 + if ! use headless && ! use qt4 ; then
157 + einfo "No USE=\"qt4\" selected, this build will not include"
158 + einfo "any Qt frontend."
159 + elif use headless && use qt4 ; then
160 + einfo "You selected USE=\"headless qt4\", defaulting to"
161 + einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
162 + fi
163 +
164 + if ! use opengl ; then
165 + einfo "No USE=\"opengl\" selected, this build will lack"
166 + einfo "the OpenGL feature."
167 + fi
168 + if ! use python ; then
169 + einfo "You have disabled the \"python\" USE flag. This will only"
170 + einfo "disable the python bindings being installed."
171 + fi
172 + java-pkg-opt-2_pkg_setup
173 + python-single-r1_pkg_setup
174 +
175 + tc-ld-disable-gold #bug 488176
176 + tc-export CC CXX LD AR RANLIB
177 + export HOST_CC="$(tc-getBUILD_CC)"
178 +}
179 +
180 +src_prepare() {
181 + # Remove shipped binaries (kBuild,yasm), see bug #232775
182 + rm -r kBuild/bin tools || die
183 +
184 + # Remove pointless GCC version limitations in check_gcc()
185 + 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" \
186 + -i configure || die
187 +
188 + # Disable things unused or split into separate ebuilds
189 + sed -e "s@MY_LIBDIR@$(get_libdir)@" \
190 + "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
191 +
192 + # Respect LDFLAGS
193 + sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
194 + -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
195 +
196 + # Do not use hard-coded ld (related to bug #488176)
197 + sed -e '/QUIET)ld /s@ld @$(LD) @' \
198 + -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
199 +
200 + # Use PAM only when pam USE flag is enbaled (bug #376531)
201 + if ! use pam ; then
202 + elog "Disabling PAM removes the possibility to use the VRDP features."
203 + sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
204 + sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
205 + src/VBox/HostServices/Makefile.kmk || die
206 + fi
207 +
208 + # add correct java path
209 + if use java ; then
210 + sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
211 + -i "${S}"/Config.kmk || die
212 + java-pkg-opt-2_src_prepare
213 + fi
214 +
215 + if ! gcc-specs-pie ; then
216 + rm "${WORKDIR}/patches/050_${PN}-5.0.2-nopie.patch" || die
217 + fi
218 +
219 + eapply "${WORKDIR}/patches"
220 +
221 + eapply_user
222 +}
223 +
224 +src_configure() {
225 + local myconf
226 + use alsa || myconf+=( --disable-alsa )
227 + use debug && myconf+=( --build-debug )
228 + use doc || myconf+=( --disable-docs )
229 + use java || myconf+=( --disable-java )
230 + use lvm || myconf+=( --disable-devmapper )
231 + use opengl || myconf+=( --disable-opengl )
232 + use pulseaudio || myconf+=( --disable-pulse )
233 + use python || myconf+=( --disable-python )
234 + use vboxwebsrv && myconf+=( --enable-webservice )
235 + use vnc && myconf+=( --enable-vnc )
236 + if ! use headless ; then
237 + use qt4 || myconf+=( --disable-qt4 )
238 + else
239 + myconf+=( --build-headless --disable-opengl )
240 + fi
241 + if use amd64 && ! has_multilib_profile ; then
242 + myconf+=( --disable-vmmraw )
243 + fi
244 + # not an autoconf script
245 + ./configure \
246 + --with-gcc="$(tc-getCC)" \
247 + --with-g++="$(tc-getCXX)" \
248 + --disable-dbus \
249 + --disable-kmods \
250 + ${myconf[@]} \
251 + || die "configure failed"
252 +}
253 +
254 +src_compile() {
255 + source ./env.sh || die
256 +
257 + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
258 + # and strip all flags
259 + # strip-flags
260 +
261 + MAKEJOBS=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+')
262 + MAKELOAD=$(echo ${MAKEOPTS} | egrep -o '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+') #'
263 + MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
264 + MAKE="kmk" emake \
265 + VBOX_BUILD_PUBLISHER=_Gentoo \
266 + TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
267 + TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
268 + TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
269 + TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
270 + VBOX_GCC_OPT="${CXXFLAGS}" \
271 + TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
272 + all
273 +}
274 +
275 +src_install() {
276 + local binpath="release"
277 + use debug && binpath="debug"
278 + cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
279 +
280 + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile
281 +
282 + vbox_inst() {
283 + local binary="${1}"
284 + local perms="${2:-0750}"
285 + local path="${3:-${vbox_inst_path}}"
286 +
287 + [[ -n "${binary}" ]] || die "vbox_inst: No binray given!"
288 + [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
289 +
290 + insinto ${path}
291 + doins ${binary}
292 + fowners root:vboxusers ${path}/${binary}
293 + fperms ${perms} ${path}/${binary}
294 + }
295 +
296 + # Create configuration files
297 + insinto /etc/vbox
298 + newins "${FILESDIR}/${PN}-4-config" vbox.cfg
299 +
300 + # Set the right libdir
301 + sed -i \
302 + -e "s@MY_LIBDIR@$(get_libdir)@" \
303 + "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
304 +
305 + # Install the wrapper script
306 + exeinto ${vbox_inst_path}
307 + newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
308 + fowners root:vboxusers ${vbox_inst_path}/VBox
309 + fperms 0750 ${vbox_inst_path}/VBox
310 +
311 + # Install binaries and libraries
312 + insinto ${vbox_inst_path}
313 + doins -r components
314 +
315 + # *.rc files for x86_64 are only available on multilib systems
316 + local rcfiles="*.rc"
317 + if use amd64 && ! has_multilib_profile ; then
318 + rcfiles=""
319 + fi
320 + for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
321 + vbox_inst ${each}
322 + done
323 +
324 + # These binaries need to be suid root in any case.
325 + for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
326 + vbox_inst ${each} 4750
327 + done
328 +
329 + # Install EFI Firmware files (bug #320757)
330 + pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
331 + for fwfile in VBoxEFI{32,64}.fd ; do
332 + vbox_inst ${fwfile} 0644
333 + done
334 + popd &>/dev/null || die
335 +
336 + # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
337 + # VBoxXPCOMIPCD (bug #524202)
338 + for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
339 + pax-mark -m "${D}"${vbox_inst_path}/${each}
340 + done
341 +
342 + # Symlink binaries to the shipped wrapper
343 + for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
344 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
345 + done
346 + dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
347 +
348 + # VRDPAuth only works with this (bug #351949)
349 + dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
350 +
351 + # set an env-variable for 3rd party tools
352 + echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
353 + doenvd "${T}/90virtualbox"
354 +
355 + if ! use headless ; then
356 + vbox_inst VBoxSDL 4750
357 + pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL
358 +
359 + for each in vboxsdl VBoxSDL ; do
360 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
361 + done
362 +
363 + if use opengl && use qt4 ; then
364 + vbox_inst VBoxTestOGL
365 + pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL
366 + fi
367 +
368 + if use qt4 ; then
369 + vbox_inst VirtualBox 4750
370 + pax-mark -m "${D}"${vbox_inst_path}/VirtualBox
371 +
372 + for each in virtualbox VirtualBox ; do
373 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
374 + done
375 +
376 + insinto /usr/share/${PN}
377 + doins -r nls
378 +
379 + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
380 + fi
381 +
382 + pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
383 + for size in 16 32 48 64 128 ; do
384 + newicon -s ${size} ${PN}-${size}px.png ${PN}.png
385 + done
386 + newicon ${PN}-48px.png ${PN}.png
387 + doicon -s scalable ${PN}.svg
388 + popd &>/dev/null || die
389 + fi
390 +
391 + if use lvm ; then
392 + vbox_inst VBoxVolInfo 4750
393 + dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
394 + fi
395 +
396 + if use sdk ; then
397 + insinto ${vbox_inst_path}
398 + doins -r sdk
399 +
400 + if use java ; then
401 + java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
402 + java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so"
403 + fi
404 + fi
405 +
406 + if use udev ; then
407 + # New way of handling USB device nodes for VBox (bug #356215)
408 + local udevdir="$(get_udevdir)"
409 + insinto ${udevdir}
410 + doins VBoxCreateUSBNode.sh
411 + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
412 + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
413 + insinto ${udevdir}/rules.d
414 + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
415 + > "${T}"/10-virtualbox.rules || die
416 + doins "${T}"/10-virtualbox.rules
417 + fi
418 +
419 + if use vboxwebsrv ; then
420 + vbox_inst vboxwebsrv
421 + dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
422 + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
423 + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
424 + fi
425 +}
426 +
427 +pkg_postinst() {
428 + fdo-mime_desktop_database_update
429 +
430 + if use udev ; then
431 + udevadm control --reload-rules \
432 + && udevadm trigger --subsystem-match=usb
433 + fi
434 +
435 + if ! use headless && use qt4 ; then
436 + elog "To launch VirtualBox just type: \"virtualbox\"."
437 + fi
438 + elog "You must be in the vboxusers group to use VirtualBox."
439 + elog ""
440 + elog "The latest user manual is available for download at:"
441 + elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
442 + elog ""
443 + elog "For advanced networking setups you should emerge:"
444 + elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
445 + elog ""
446 + elog "IMPORTANT!"
447 + elog "If you upgrade from app-emulation/virtualbox-ose make sure to run"
448 + elog "\"env-update\" as root and logout and relogin as the user you wish"
449 + elog "to run ${PN} as."
450 + elog ""
451 + elog "Starting with version 4.0.0, ${PN} has USB-1 support."
452 + elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
453 + elog " app-emulation/virtualbox-extpack-oracle"
454 + elog "package."
455 + elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
456 + elog "the \"extension\" USE flag. For installation of the guest additions ISO"
457 + elog "image, please emerge"
458 + elog " app-emulation/virtualbox-additions"
459 + elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
460 + elog " app-emulation/virtualbox-extpack-oracle"
461 + if ! use udev ; then
462 + elog ""
463 + elog "WARNING!"
464 + elog "Without USE=udev, USB devices will likely not work in ${PN}."
465 + elif [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
466 + elog ""
467 + elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
468 + elog "or else USB in ${PN} won't work."
469 + fi
470 +}
471 +
472 +pkg_postrm() {
473 + fdo-mime_desktop_database_update
474 +}
475
476 diff --git a/app-emulation/virtualbox/virtualbox-5.1.0.ebuild b/app-emulation/virtualbox/virtualbox-5.1.0.ebuild
477 new file mode 100644
478 index 0000000..9916c3d
479 --- /dev/null
480 +++ b/app-emulation/virtualbox/virtualbox-5.1.0.ebuild
481 @@ -0,0 +1,438 @@
482 +# Copyright 1999-2016 Gentoo Foundation
483 +# Distributed under the terms of the GNU General Public License v2
484 +# $Id$
485 +
486 +EAPI=6
487 +
488 +PYTHON_COMPAT=( python2_7 )
489 +inherit eutils fdo-mime flag-o-matic java-pkg-opt-2 linux-info multilib pax-utils python-single-r1 toolchain-funcs udev
490 +
491 +MY_PV="${PV/beta/BETA}"
492 +MY_PV="${MY_PV/rc/RC}"
493 +MY_P=VirtualBox-${MY_PV}
494 +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2
495 + https://dev.gentoo.org/~polynomial-c/${PN}/patchsets/${PN}-5.0.16-patches-01.tar.xz"
496 +S="${WORKDIR}/${MY_P}"
497 +
498 +DESCRIPTION="Family of powerful x86 virtualization products for enterprise and home use"
499 +HOMEPAGE="http://www.virtualbox.org/"
500 +
501 +LICENSE="GPL-2"
502 +SLOT="0"
503 +KEYWORDS="~amd64 ~x86"
504 +IUSE="alsa debug doc headless java libressl lvm pam pulseaudio +opengl python +qt5 +sdk +udev vboxwebsrv vnc"
505 +
506 +RDEPEND="!app-emulation/virtualbox-bin
507 + ~app-emulation/virtualbox-modules-${PV}
508 + dev-libs/libIDL
509 + >=dev-libs/libxslt-1.1.19
510 + net-misc/curl
511 + dev-libs/libxml2
512 + media-libs/libpng:0=
513 + media-libs/libvpx:0=
514 + sys-libs/zlib
515 + !headless? (
516 + media-libs/libsdl:0[X,video]
517 + x11-libs/libX11
518 + x11-libs/libXcursor
519 + x11-libs/libXext
520 + x11-libs/libXmu
521 + x11-libs/libXt
522 + opengl? ( virtual/opengl media-libs/freeglut )
523 + qt5? (
524 + dev-qt/qtcore:5
525 + dev-qt/qtgui:5
526 + dev-qt/qtprintsupport:5
527 + dev-qt/qtwidgets:5
528 + dev-qt/qtx11extras:5
529 + opengl? ( dev-qt/qtopengl:5 )
530 + x11-libs/libXinerama
531 + )
532 + )
533 + java? ( >=virtual/jre-1.6:= )
534 + libressl? ( dev-libs/libressl:= )
535 + !libressl? ( dev-libs/openssl:0= )
536 + lvm? ( sys-fs/lvm2 )
537 + udev? ( >=virtual/udev-171 )
538 + vnc? ( >=net-libs/libvncserver-0.9.9 )"
539 +DEPEND="${RDEPEND}
540 + >=dev-util/kbuild-0.1.9998_pre20131130-r1
541 + >=dev-lang/yasm-0.6.2
542 + sys-devel/bin86
543 + sys-libs/libcap
544 + sys-power/iasl
545 + virtual/pkgconfig
546 + alsa? ( >=media-libs/alsa-lib-1.0.13 )
547 + doc? (
548 + dev-texlive/texlive-basic
549 + dev-texlive/texlive-latex
550 + dev-texlive/texlive-latexrecommended
551 + dev-texlive/texlive-latexextra
552 + dev-texlive/texlive-fontsrecommended
553 + dev-texlive/texlive-fontsextra
554 + )
555 + !headless? ( x11-libs/libXinerama )
556 + java? ( >=virtual/jre-1.6:= )
557 + pam? ( sys-libs/pam )
558 + pulseaudio? ( media-sound/pulseaudio )
559 + vboxwebsrv? ( net-libs/gsoap[-gnutls(-)] )
560 + ${PYTHON_DEPS}"
561 +
562 +QA_TEXTRELS_x86="usr/lib/virtualbox-ose/VBoxGuestPropSvc.so
563 + usr/lib/virtualbox/VBoxSDL.so
564 + usr/lib/virtualbox/VBoxSharedFolders.so
565 + usr/lib/virtualbox/VBoxDD2.so
566 + usr/lib/virtualbox/VBoxOGLrenderspu.so
567 + usr/lib/virtualbox/VBoxPython.so
568 + usr/lib/virtualbox/VBoxDD.so
569 + usr/lib/virtualbox/VBoxDDU.so
570 + usr/lib/virtualbox/VBoxREM64.so
571 + usr/lib/virtualbox/VBoxSharedClipboard.so
572 + usr/lib/virtualbox/VBoxHeadless.so
573 + usr/lib/virtualbox/VBoxRT.so
574 + usr/lib/virtualbox/VBoxREM.so
575 + usr/lib/virtualbox/VBoxSettings.so
576 + usr/lib/virtualbox/VBoxKeyboard.so
577 + usr/lib/virtualbox/VBoxSharedCrOpenGL.so
578 + usr/lib/virtualbox/VBoxVMM.so
579 + usr/lib/virtualbox/VirtualBox.so
580 + usr/lib/virtualbox/VBoxOGLhosterrorspu.so
581 + usr/lib/virtualbox/components/VBoxC.so
582 + usr/lib/virtualbox/components/VBoxSVCM.so
583 + usr/lib/virtualbox/components/VBoxDDU.so
584 + usr/lib/virtualbox/components/VBoxRT.so
585 + usr/lib/virtualbox/components/VBoxREM.so
586 + usr/lib/virtualbox/components/VBoxVMM.so
587 + usr/lib/virtualbox/VBoxREM32.so
588 + usr/lib/virtualbox/VBoxPython2_7.so
589 + usr/lib/virtualbox/VBoxXPCOMC.so
590 + usr/lib/virtualbox/VBoxOGLhostcrutil.so
591 + usr/lib/virtualbox/VBoxNetDHCP.so
592 + usr/lib/virtualbox/VBoxNetNAT.so"
593 +
594 +REQUIRED_USE="
595 + java? ( sdk )
596 + python? ( sdk )
597 + vboxwebsrv? ( java )
598 + ${PYTHON_REQUIRED_USE}
599 +"
600 +
601 +pkg_setup() {
602 + if ! use headless && ! use qt5 ; then
603 + einfo "No USE=\"qt5\" selected, this build will not include any Qt frontend."
604 + elif use headless && use qt5 ; then
605 + einfo "You selected USE=\"headless qt5\", defaulting to"
606 + einfo "USE=\"headless\", this build will not include any X11/Qt frontend."
607 + fi
608 +
609 + if ! use opengl ; then
610 + einfo "No USE=\"opengl\" selected, this build will lack"
611 + einfo "the OpenGL feature."
612 + fi
613 + if ! use python ; then
614 + einfo "You have disabled the \"python\" USE flag. This will only"
615 + einfo "disable the python bindings being installed."
616 + fi
617 + java-pkg-opt-2_pkg_setup
618 + python-single-r1_pkg_setup
619 +
620 + tc-ld-disable-gold #bug 488176
621 + tc-export CC CXX LD AR RANLIB
622 + export HOST_CC="$(tc-getBUILD_CC)"
623 +}
624 +
625 +src_prepare() {
626 + # Remove shipped binaries (kBuild,yasm), see bug #232775
627 + rm -r kBuild/bin tools || die
628 +
629 + # Remove pointless GCC version limitations in check_gcc()
630 + 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" \
631 + -i configure || die
632 +
633 + # Disable things unused or split into separate ebuilds
634 + sed -e "s@MY_LIBDIR@$(get_libdir)@" \
635 + "${FILESDIR}"/${PN}-5-localconfig > LocalConfig.kmk || die
636 +
637 + # Respect LDFLAGS
638 + sed -e "s@_LDFLAGS\.${ARCH}*.*=@& ${LDFLAGS}@g" \
639 + -i Config.kmk src/libs/xpcom18a4/Config.kmk || die
640 +
641 + # Do not use hard-coded ld (related to bug #488176)
642 + sed -e '/QUIET)ld /s@ld @$(LD) @' \
643 + -i src/VBox/Devices/PC/ipxe/Makefile.kmk || die
644 +
645 + # Use PAM only when pam USE flag is enbaled (bug #376531)
646 + if ! use pam ; then
647 + elog "Disabling PAM removes the possibility to use the VRDP features."
648 + sed -i 's@^.*VBOX_WITH_PAM@#VBOX_WITH_PAM@' Config.kmk || die
649 + sed -i 's@\(.*/auth/Makefile.kmk.*\)@#\1@' \
650 + src/VBox/HostServices/Makefile.kmk || die
651 + fi
652 +
653 + # add correct java path
654 + if use java ; then
655 + sed "s@/usr/lib/jvm/java-6-sun@$(java-config -O)@" \
656 + -i "${S}"/Config.kmk || die
657 + java-pkg-opt-2_src_prepare
658 + fi
659 +
660 + if ! gcc-specs-pie ; then
661 + rm "${WORKDIR}/patches/050_${PN}-5.0.2-nopie.patch" || die
662 + fi
663 +
664 + eapply "${WORKDIR}/patches"
665 +
666 + eapply_user
667 +}
668 +
669 +src_configure() {
670 + local myconf
671 + use alsa || myconf+=( --disable-alsa )
672 + use debug && myconf+=( --build-debug )
673 + use doc || myconf+=( --disable-docs )
674 + use java || myconf+=( --disable-java )
675 + use lvm || myconf+=( --disable-devmapper )
676 + use opengl || myconf+=( --disable-opengl )
677 + use pulseaudio || myconf+=( --disable-pulse )
678 + use python || myconf+=( --disable-python )
679 + use vboxwebsrv && myconf+=( --enable-webservice )
680 + use vnc && myconf+=( --enable-vnc )
681 + if ! use headless ; then
682 + use qt5 || myconf+=( --disable-qt )
683 + else
684 + myconf+=( --build-headless --disable-opengl )
685 + fi
686 + if use amd64 && ! has_multilib_profile ; then
687 + myconf+=( --disable-vmmraw )
688 + fi
689 + # not an autoconf script
690 + ./configure \
691 + --with-gcc="$(tc-getCC)" \
692 + --with-g++="$(tc-getCXX)" \
693 + --disable-dbus \
694 + --disable-kmods \
695 + ${myconf[@]} \
696 + || die "configure failed"
697 +}
698 +
699 +src_compile() {
700 + source ./env.sh || die
701 +
702 + # Force kBuild to respect C[XX]FLAGS and MAKEOPTS (bug #178529)
703 + # and strip all flags
704 + # strip-flags
705 +
706 + MAKEJOBS=$(echo ${MAKEOPTS} | egrep -o '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+')
707 + MAKELOAD=$(echo ${MAKEOPTS} | egrep -o '(\-l|\-\-load-average)(=?|[[:space:]]*)[[:digit:]]+') #'
708 + MAKEOPTS="${MAKEJOBS} ${MAKELOAD}"
709 + MAKE="kmk" emake \
710 + VBOX_BUILD_PUBLISHER=_Gentoo \
711 + TOOL_GCC3_CC="$(tc-getCC)" TOOL_GCC3_CXX="$(tc-getCXX)" \
712 + TOOL_GCC3_AS="$(tc-getCC)" TOOL_GCC3_AR="$(tc-getAR)" \
713 + TOOL_GCC3_LD="$(tc-getCXX)" TOOL_GCC3_LD_SYSMOD="$(tc-getLD)" \
714 + TOOL_GCC3_CFLAGS="${CFLAGS}" TOOL_GCC3_CXXFLAGS="${CXXFLAGS}" \
715 + VBOX_GCC_OPT="${CXXFLAGS}" \
716 + TOOL_YASM_AS=yasm KBUILD_VERBOSE=2 \
717 + all
718 +}
719 +
720 +src_install() {
721 + local binpath="release"
722 + use debug && binpath="debug"
723 + cd "${S}"/out/linux.${ARCH}/${binpath}/bin || die
724 +
725 + local vbox_inst_path="/usr/$(get_libdir)/${PN}" each fwfile
726 +
727 + vbox_inst() {
728 + local binary="${1}"
729 + local perms="${2:-0750}"
730 + local path="${3:-${vbox_inst_path}}"
731 +
732 + [[ -n "${binary}" ]] || die "vbox_inst: No binray given!"
733 + [[ ${perms} =~ ^[[:digit:]]+{4}$ ]] || die "vbox_inst: perms must consist of four digits."
734 +
735 + insinto ${path}
736 + doins ${binary}
737 + fowners root:vboxusers ${path}/${binary}
738 + fperms ${perms} ${path}/${binary}
739 + }
740 +
741 + # Create configuration files
742 + insinto /etc/vbox
743 + newins "${FILESDIR}/${PN}-4-config" vbox.cfg
744 +
745 + # Set the right libdir
746 + sed -i \
747 + -e "s@MY_LIBDIR@$(get_libdir)@" \
748 + "${D}"/etc/vbox/vbox.cfg || die "vbox.cfg sed failed"
749 +
750 + # Install the wrapper script
751 + exeinto ${vbox_inst_path}
752 + newexe "${FILESDIR}/${PN}-ose-5-wrapper" "VBox"
753 + fowners root:vboxusers ${vbox_inst_path}/VBox
754 + fperms 0750 ${vbox_inst_path}/VBox
755 +
756 + # Install binaries and libraries
757 + insinto ${vbox_inst_path}
758 + doins -r components
759 +
760 + # *.rc files for x86_64 are only available on multilib systems
761 + local rcfiles="*.rc"
762 + if use amd64 && ! has_multilib_profile ; then
763 + rcfiles=""
764 + fi
765 + for each in VBox{ExtPackHelperApp,Manage,SVC,Tunctl,XPCOMIPCD} *so *r0 ${rcfiles} ; do
766 + vbox_inst ${each}
767 + done
768 +
769 + # These binaries need to be suid root in any case.
770 + for each in VBox{Headless,Net{AdpCtl,DHCP,NAT}} ; do
771 + vbox_inst ${each} 4750
772 + done
773 +
774 + # Install EFI Firmware files (bug #320757)
775 + pushd "${S}"/src/VBox/Devices/EFI/FirmwareBin &>/dev/null || die
776 + for fwfile in VBoxEFI{32,64}.fd ; do
777 + vbox_inst ${fwfile} 0644
778 + done
779 + popd &>/dev/null || die
780 +
781 + # VBoxSVC and VBoxManage need to be pax-marked (bug #403453)
782 + # VBoxXPCOMIPCD (bug #524202)
783 + for each in VBox{Headless,Manage,SVC,XPCOMIPCD} ; do
784 + pax-mark -m "${D}"${vbox_inst_path}/${each}
785 + done
786 +
787 + # Symlink binaries to the shipped wrapper
788 + for each in vbox{headless,manage} VBox{Headless,Manage,VRDP} ; do
789 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
790 + done
791 + dosym ${vbox_inst_path}/VBoxTunctl /usr/bin/VBoxTunctl
792 +
793 + # VRDPAuth only works with this (bug #351949)
794 + dosym VBoxAuth.so ${vbox_inst_path}/VRDPAuth.so
795 +
796 + # set an env-variable for 3rd party tools
797 + echo -n "VBOX_APP_HOME=${vbox_inst_path}" > "${T}/90virtualbox"
798 + doenvd "${T}/90virtualbox"
799 +
800 + if ! use headless ; then
801 + vbox_inst VBoxSDL 4750
802 + pax-mark -m "${D}"${vbox_inst_path}/VBoxSDL
803 +
804 + for each in vboxsdl VBoxSDL ; do
805 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
806 + done
807 +
808 + if use qt5 ; then
809 + vbox_inst VirtualBox 4750
810 + pax-mark -m "${D}"${vbox_inst_path}/VirtualBox
811 +
812 + if use opengl ; then
813 + vbox_inst VBoxTestOGL
814 + pax-mark -m "${D}"${vbox_inst_path}/VBoxTestOGL
815 + fi
816 +
817 + for each in virtualbox VirtualBox ; do
818 + dosym ${vbox_inst_path}/VBox /usr/bin/${each}
819 + done
820 +
821 + insinto /usr/share/${PN}
822 + doins -r nls
823 +
824 + newmenu "${FILESDIR}"/${PN}-ose.desktop-2 ${PN}.desktop
825 + fi
826 +
827 + pushd "${S}"/src/VBox/Artwork/OSE &>/dev/null || die
828 + for size in 16 32 48 64 128 ; do
829 + newicon -s ${size} ${PN}-${size}px.png ${PN}.png
830 + done
831 + newicon ${PN}-48px.png ${PN}.png
832 + doicon -s scalable ${PN}.svg
833 + popd &>/dev/null || die
834 + fi
835 +
836 + if use lvm ; then
837 + vbox_inst VBoxVolInfo 4750
838 + dosym ${vbox_inst_path}/VBoxVolInfo /usr/bin/VBoxVolInfo
839 + fi
840 +
841 + if use sdk ; then
842 + insinto ${vbox_inst_path}
843 + doins -r sdk
844 +
845 + if use java ; then
846 + java-pkg_regjar "${D}${vbox_inst_path}/sdk/bindings/xpcom/java/vboxjxpcom.jar"
847 + java-pkg_regso "${D}${vbox_inst_path}/libvboxjxpcom.so"
848 + fi
849 + fi
850 +
851 + if use udev ; then
852 + # New way of handling USB device nodes for VBox (bug #356215)
853 + local udevdir="$(get_udevdir)"
854 + insinto ${udevdir}
855 + doins VBoxCreateUSBNode.sh
856 + fowners root:vboxusers ${udevdir}/VBoxCreateUSBNode.sh
857 + fperms 0750 ${udevdir}/VBoxCreateUSBNode.sh
858 + insinto ${udevdir}/rules.d
859 + sed "s@%UDEVDIR%@${udevdir}@" "${FILESDIR}"/10-virtualbox.rules \
860 + > "${T}"/10-virtualbox.rules || die
861 + doins "${T}"/10-virtualbox.rules
862 + fi
863 +
864 + if use vboxwebsrv ; then
865 + vbox_inst vboxwebsrv
866 + dosym ${vbox_inst_path}/VBox /usr/bin/vboxwebsrv
867 + newinitd "${FILESDIR}"/vboxwebsrv-initd vboxwebsrv
868 + newconfd "${FILESDIR}"/vboxwebsrv-confd vboxwebsrv
869 + fi
870 +}
871 +
872 +pkg_postinst() {
873 + fdo-mime_desktop_database_update
874 +
875 + if use udev ; then
876 + udevadm control --reload-rules \
877 + && udevadm trigger --subsystem-match=usb
878 + fi
879 +
880 + if ! use headless && use qt5 ; then
881 + elog "To launch VirtualBox just type: \"virtualbox\"."
882 + fi
883 + elog "You must be in the vboxusers group to use VirtualBox."
884 + elog ""
885 + elog "The latest user manual is available for download at:"
886 + elog "http://download.virtualbox.org/virtualbox/${PV}/UserManual.pdf"
887 + elog ""
888 + elog "For advanced networking setups you should emerge:"
889 + elog "net-misc/bridge-utils and sys-apps/usermode-utilities"
890 + elog ""
891 + elog "IMPORTANT!"
892 + elog "If you upgrade from app-emulation/virtualbox-ose make sure to run"
893 + elog "\"env-update\" as root and logout and relogin as the user you wish"
894 + elog "to run ${PN} as."
895 + elog ""
896 + elog "Starting with version 4.0.0, ${PN} has USB-1 support."
897 + elog "For USB-2 support, PXE-boot ability and VRDP support please emerge"
898 + elog " app-emulation/virtualbox-extpack-oracle"
899 + elog "package."
900 + elog "Starting with version 5.0.0, ${PN} no longer has the \"additions\" and"
901 + elog "the \"extension\" USE flag. For installation of the guest additions ISO"
902 + elog "image, please emerge"
903 + elog " app-emulation/virtualbox-additions"
904 + elog "and for the USB2, USB3, VRDP and PXE boot ROM modules, please emerge"
905 + elog " app-emulation/virtualbox-extpack-oracle"
906 + if ! use udev ; then
907 + elog ""
908 + elog "WARNING!"
909 + elog "Without USE=udev, USB devices will likely not work in ${PN}."
910 + elif [ -e "${ROOT}/etc/udev/rules.d/10-virtualbox.rules" ] ; then
911 + elog ""
912 + elog "Please remove \"${ROOT}/etc/udev/rules.d/10-virtualbox.rules\""
913 + elog "or else USB in ${PN} won't work."
914 + fi
915 +}
916 +
917 +pkg_postrm() {
918 + fdo-mime_desktop_database_update
919 +}