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-guest-additions/
Date: Thu, 14 Jul 2016 09:28:45
Message-Id: 1468488507.373797bb9388c372ff20622dbb044d86832aaee9.polynomial-c@gentoo
1 commit: 373797bb9388c372ff20622dbb044d86832aaee9
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 14 09:16:33 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 14 09:28:27 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=373797bb
7
8 app-emulation/virtualbox-guest-additions: Bump to version 4.3.38
9
10 Package-Manager: portage-2.3.0
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 app-emulation/virtualbox-guest-additions/Manifest | 1 +
14 .../virtualbox-guest-additions-4.3.38.ebuild | 225 +++++++++++++++++++++
15 2 files changed, 226 insertions(+)
16
17 diff --git a/app-emulation/virtualbox-guest-additions/Manifest b/app-emulation/virtualbox-guest-additions/Manifest
18 index d5d5a20..b8143b3 100644
19 --- a/app-emulation/virtualbox-guest-additions/Manifest
20 +++ b/app-emulation/virtualbox-guest-additions/Manifest
21 @@ -1,4 +1,5 @@
22 DIST VirtualBox-4.3.32.tar.bz2 98168101 SHA256 dc5bf4e6f9989792d31bac174d20d7fc9e638654fa5a99c02b20a60557927261 SHA512 856b36cd90647cdceb7e182d066e9e1489d2bae0b71ce8b2f6324cd2d9854806eaea0fe0aad2d4e8b84bd836c688e13258ae69e094320572729b7d886c8d35f0 WHIRLPOOL 441041947dcd190d73a9cc5007bc0001b6eeb36ba958f4a09fca775670faff690423095d334e258fc0d6dcbef01d74a085505c8549397ced5dbe75ca96724144
23 DIST VirtualBox-4.3.36.tar.bz2 98421624 SHA256 af0776df6d03b2709cb76a69f055487bf12bdb3b4163e2a82959860300283046 SHA512 179fd8c7d3562fd6c3c6815ef56a3dbda3fcbb841171f911a923ded06e627fb2e6e33f66124303b448a05c364343ec35e2fb264f462a48e52d66277dfd77bcfc WHIRLPOOL 0419c2baac6f07d729a35a54be872d7949cb6fa99a5ce0f2317df32f27e20e42f045811697e40255f240ec84b08a3a1f36a563841a341a528c37c9e63fda2e6d
24 +DIST VirtualBox-4.3.38.tar.bz2 98437150 SHA256 36f16d435acf04c1dce81df08ba0b522b7c3b10fe48f6ab5b95e9c8404d1f2e5 SHA512 cdde06b26b20bf1f8a9c0ec9607a8d38de3246422a1907978d065b94f69e7b19bc4a9618ac0e3c18cb46b4f3912bfcb87332296ee12d711e8e738f0026f959c4 WHIRLPOOL 15869dc2730ffb8b5dc4d3d01678e889c6e095ea8cee8f607a8b5f9e016f018a0fd8594a2c3279d8f224d4a9e98b161e1e583320d9617b3de0c005774795b08e
25 DIST VirtualBox-5.0.16.tar.bz2 111062984 SHA256 f5a44d33a1db911f445b2eb2d22d9293a96a535cba488b5a235577ef868fa63c SHA512 3da3a227360fb50d299e99770378f65e8cb99525377343fa8faff2360be66643d46f68323d6a8b8d4d26182082f171bb35ab2497167bf6df18827a5ea7742074 WHIRLPOOL ea709057c588f28820790c2b193decba9ee0c57e0f82aa4361ca87aef661315182e18b5ee29558e47ed92f6037eb91befa5390680661a7b9f2248c7819b4a85c
26 DIST VirtualBox-5.0.20.tar.bz2 111231246 SHA256 af9c0787aae22964a1192cefbf9aa91a40c1d41e5fea485adebf09ab922d4c2b SHA512 a039455eed3715b9aa42e2dc6b65ea68b27899c0bcf0065a93c53d1093cce56ebf8a6982cd804208ef9e51794eab9c5c4f3b20550d41532fd4addbd7afda0f8e WHIRLPOOL f74f0a910e5e3f7b1704f57e9831f88b1036efbc61e3b97779f5b2a337ad70d55638b59f356c769d4b6bfd5955348d490f5080b04a3f494f25eb176944756cfd
27
28 diff --git a/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.38.ebuild b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.38.ebuild
29 new file mode 100644
30 index 0000000..69fe1df
31 --- /dev/null
32 +++ b/app-emulation/virtualbox-guest-additions/virtualbox-guest-additions-4.3.38.ebuild
33 @@ -0,0 +1,225 @@
34 +# Copyright 1999-2016 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +# $Id$
37 +
38 +EAPI=5
39 +
40 +inherit eutils linux-mod systemd user toolchain-funcs
41 +
42 +MY_PV="${PV/beta/BETA}"
43 +MY_PV="${MY_PV/rc/RC}"
44 +MY_P=VirtualBox-${MY_PV}
45 +DESCRIPTION="VirtualBox kernel modules and user-space tools for Gentoo guests"
46 +HOMEPAGE="http://www.virtualbox.org/"
47 +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +KEYWORDS="~amd64 ~x86"
52 +IUSE="X"
53 +
54 +RDEPEND="X? ( ~x11-drivers/xf86-video-virtualbox-${PV}
55 + x11-apps/xrandr
56 + x11-apps/xrefresh
57 + x11-libs/libXmu
58 + x11-libs/libX11
59 + x11-libs/libXt
60 + x11-libs/libXext
61 + x11-libs/libXau
62 + x11-libs/libXdmcp
63 + x11-libs/libSM
64 + x11-libs/libICE
65 + x11-proto/glproto )
66 + sys-apps/dbus
67 + !!x11-drivers/xf86-input-virtualbox"
68 +DEPEND="${RDEPEND}
69 + >=dev-util/kbuild-0.1.9998_pre20131130
70 + >=dev-lang/yasm-0.6.2
71 + sys-devel/bin86
72 + sys-libs/pam
73 + sys-power/iasl
74 + X? ( x11-proto/renderproto )
75 + !X? ( x11-proto/xproto )"
76 +
77 +BUILD_TARGETS="all"
78 +BUILD_TARGET_ARCH="${ARCH}"
79 +MODULE_NAMES="vboxguest(misc:${WORKDIR}/vboxguest:${WORKDIR}/vboxguest)
80 + vboxsf(misc:${WORKDIR}/vboxsf:${WORKDIR}/vboxsf)"
81 +
82 +S="${WORKDIR}/${MY_P}"
83 +
84 +pkg_setup() {
85 + linux-mod_pkg_setup
86 + BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
87 + enewgroup vboxguest
88 + enewuser vboxguest -1 /bin/sh /dev/null vboxguest
89 + # automount Error: VBoxServiceAutoMountWorker: Group "vboxsf" does not exist
90 + enewgroup vboxsf
91 +}
92 +
93 +src_unpack() {
94 + unpack ${A}
95 +
96 + # Create and unpack a tarball with the sources of the Linux guest
97 + # kernel modules, to include all the needed files
98 + "${S}"/src/VBox/Additions/linux/export_modules "${WORKDIR}/vbox-kmod.tar.gz"
99 + unpack ./vbox-kmod.tar.gz
100 +
101 + # Remove shipped binaries (kBuild,yasm), see bug #232775
102 + cd "${S}"
103 + rm -rf kBuild/bin tools
104 +}
105 +
106 +src_prepare() {
107 + # PaX fixes (see bug #298988)
108 + pushd "${WORKDIR}" &>/dev/null || die
109 + epatch "${FILESDIR}"/vboxguest-4.1.0-log-use-c99.patch
110 + popd &>/dev/null || die
111 +
112 + # Remove pointless GCC version limitations in check_gcc()
113 + 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" \
114 + -i configure || die
115 +
116 + # Disable things unused or splitted into separate ebuilds
117 + cp "${FILESDIR}/${PN}-3-localconfig" LocalConfig.kmk || die
118 +
119 + # stupid new header references...
120 + for vboxheader in {product,revision}-generated.h ; do
121 + for mdir in vbox{guest,sf} ; do
122 + ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
123 + "${WORKDIR}/${mdir}/${vboxheader}"
124 + done
125 + done
126 +}
127 +
128 +src_configure() {
129 + # build the user-space tools, warnings are harmless
130 + local cmd=(
131 + ./configure
132 + --nofatal
133 + --disable-xpcom
134 + --disable-sdl-ttf
135 + --disable-pulse
136 + --disable-alsa
137 + --with-gcc="$(tc-getCC)"
138 + --with-g++="$(tc-getCXX)"
139 + --target-arch=${ARCH}
140 + --with-linux="${KV_OUT_DIR}"
141 + --build-headless
142 + )
143 + echo "${cmd[@]}"
144 + "${cmd[@]}" || die "configure failed"
145 + source ./env.sh
146 + export VBOX_GCC_OPT="${CFLAGS} ${CPPFLAGS}"
147 +}
148 +
149 +src_compile() {
150 + for each in /src/VBox/{Runtime,Additions/common} \
151 + /src/VBox/Additions/linux/sharedfolders ; do
152 + cd "${S}"${each} || die
153 + MAKE="kmk" \
154 + emake TOOL_YASM_AS=yasm \
155 + KBUILD_VERBOSE=2
156 + done
157 +
158 + if use X; then
159 + cd "${S}"/src/VBox/Additions/x11/VBoxClient || die
160 + MAKE="kmk" \
161 + emake TOOL_YASM_AS=yasm \
162 + KBUILD_PATH="${S}/kBuild"
163 + fi
164 +
165 + # Now creating the kernel modules. We must do this _after_
166 + # we compiled the user-space tools as we need two of the
167 + # automatically generated header files. (>=3.2.0)
168 + linux-mod_src_compile
169 +}
170 +
171 +src_install() {
172 + linux-mod_src_install
173 +
174 + cd "${S}"/out/linux.${ARCH}/release/bin/additions || die
175 +
176 + insinto /sbin
177 + newins mount.vboxsf mount.vboxsf
178 + fperms 4755 /sbin/mount.vboxsf
179 +
180 + newinitd "${FILESDIR}"/${PN}-8.initd ${PN}
181 +
182 + insinto /usr/sbin/
183 + newins VBoxService vboxguest-service
184 + fperms 0755 /usr/sbin/vboxguest-service
185 +
186 + insinto /usr/bin
187 + doins VBoxControl
188 + fperms 0755 /usr/bin/VBoxControl
189 +
190 + # VBoxClient user service and xrandr wrapper
191 + if use X ; then
192 + doins VBoxClient
193 + fperms 0755 /usr/bin/VBoxClient
194 +
195 + pushd "${S}"/src/VBox/Additions/x11/Installer &>/dev/null \
196 + || die
197 + newins 98vboxadd-xclient VBoxClient-all
198 + fperms 0755 /usr/bin/VBoxClient-all
199 + popd &>/dev/null || die
200 + fi
201 +
202 + # udev rule for vboxdrv
203 + local udev_rules_dir="/lib/udev/rules.d"
204 + dodir ${udev_rules_dir}
205 + echo 'KERNEL=="vboxguest", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
206 + >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
207 + || die
208 + echo 'KERNEL=="vboxuser", OWNER="vboxguest", GROUP="vboxguest", MODE="0660"' \
209 + >> "${D}/${udev_rules_dir}/60-virtualbox-guest-additions.rules" \
210 + || die
211 +
212 + # VBoxClient autostart file
213 + insinto /etc/xdg/autostart
214 + doins "${FILESDIR}"/vboxclient.desktop
215 +
216 + # sample xorg.conf
217 + insinto /usr/share/doc/${PF}
218 + doins "${FILESDIR}"/xorg.conf.vbox
219 +
220 + systemd_dounit "${FILESDIR}/${PN}.service"
221 +}
222 +
223 +pkg_postinst() {
224 + linux-mod_pkg_postinst
225 + if ! use X ; then
226 + elog "use flag X is off, enable it to install the"
227 + elog "X Window System video driver."
228 + fi
229 + elog ""
230 + elog "Please add users to the \"vboxguest\" group so they can"
231 + elog "benefit from seamless mode, auto-resize and clipboard."
232 + elog ""
233 + elog "The vboxsf group has been added to make automount services work."
234 + elog "These services are part of the shared folders support."
235 + elog ""
236 + elog "Please add:"
237 + elog "/etc/init.d/${PN}"
238 + elog "to the default runlevel in order to start"
239 + elog "needed services."
240 + elog "To use the VirtualBox X driver, use the following"
241 + elog "file as your /etc/X11/xorg.conf:"
242 + elog " /usr/share/doc/${PF}/xorg.conf.vbox"
243 + elog ""
244 + elog "Also make sure you use the Mesa library for OpenGL:"
245 + elog " eselect opengl set xorg-x11"
246 + elog ""
247 + elog "An autostart .desktop file has been installed to start"
248 + elog "VBoxClient in desktop sessions."
249 + elog ""
250 + elog "You can mount shared folders with:"
251 + elog " mount -t vboxsf <shared_folder_name> <mount_point>"
252 + elog ""
253 + elog "Warning:"
254 + elog "this ebuild is only needed if you are running gentoo"
255 + elog "inside a VirtualBox Virtual Machine, you don't need"
256 + elog "it to run VirtualBox itself."
257 + elog ""
258 +}