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: x11-drivers/xf86-video-virtualbox/
Date: Thu, 14 Jul 2016 09:28:44
Message-Id: 1468488504.25e4df8425c48568033980b277c6de8ceafe7c13.polynomial-c@gentoo
1 commit: 25e4df8425c48568033980b277c6de8ceafe7c13
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 14 09:14:47 2016 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 14 09:28:24 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25e4df84
7
8 x11-drivers/xf86-video-virtualbox: 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 x11-drivers/xf86-video-virtualbox/Manifest | 1 +
14 .../xf86-video-virtualbox-4.3.38.ebuild | 180 +++++++++++++++++++++
15 2 files changed, 181 insertions(+)
16
17 diff --git a/x11-drivers/xf86-video-virtualbox/Manifest b/x11-drivers/xf86-video-virtualbox/Manifest
18 index d5d5a20..b8143b3 100644
19 --- a/x11-drivers/xf86-video-virtualbox/Manifest
20 +++ b/x11-drivers/xf86-video-virtualbox/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/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-4.3.38.ebuild b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-4.3.38.ebuild
29 new file mode 100644
30 index 0000000..8b73fe1
31 --- /dev/null
32 +++ b/x11-drivers/xf86-video-virtualbox/xf86-video-virtualbox-4.3.38.ebuild
33 @@ -0,0 +1,180 @@
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 +PYTHON_COMPAT=( python2_7 )
41 +inherit eutils linux-mod multilib python-single-r1 versionator toolchain-funcs
42 +
43 +MY_PV="${PV/beta/BETA}"
44 +MY_PV="${MY_PV/rc/RC}"
45 +MY_P=VirtualBox-${MY_PV}
46 +DESCRIPTION="VirtualBox video driver"
47 +HOMEPAGE="http://www.virtualbox.org/"
48 +SRC_URI="http://download.virtualbox.org/virtualbox/${MY_PV}/${MY_P}.tar.bz2"
49 +
50 +LICENSE="GPL-2"
51 +SLOT="0"
52 +KEYWORDS="~amd64 ~x86"
53 +IUSE="dri"
54 +
55 +RDEPEND=">=x11-base/xorg-server-1.7:=[-minimal]
56 + x11-libs/libXcomposite"
57 +DEPEND="${RDEPEND}
58 + >=dev-util/kbuild-0.1.9998_pre20131130
59 + ${PYTHON_DEPS}
60 + >=dev-lang/yasm-0.6.2
61 + >=sys-devel/gcc-4.9.0
62 + sys-power/iasl
63 + x11-proto/fontsproto
64 + x11-proto/randrproto
65 + x11-proto/renderproto
66 + x11-proto/resourceproto
67 + x11-proto/scrnsaverproto
68 + x11-proto/xextproto
69 + x11-proto/xineramaproto
70 + x11-proto/xproto
71 + x11-libs/libXdmcp
72 + x11-libs/libXau
73 + x11-libs/libX11
74 + x11-libs/libXfixes
75 + x11-libs/libXext
76 + dri? ( x11-proto/xf86driproto
77 + >=x11-libs/libdrm-2.4.5 )"
78 +
79 +REQUIRED_USE=( "${PYTHON_REQUIRED_USE}" )
80 +
81 +BUILD_TARGETS="all"
82 +BUILD_TARGET_ARCH="${ARCH}"
83 +MODULE_NAMES="vboxvideo(misc:${WORKDIR}/vboxvideo_drm:${WORKDIR}/vboxvideo_drm)"
84 +
85 +S="${WORKDIR}/${MY_P}"
86 +
87 +QA_TEXTRELS_x86="usr/lib/VBoxOGL.so"
88 +
89 +pkg_setup() {
90 + if [ "${MERGE_TYPE}" != "binary" ]; then
91 + version_is_at_least 4.9 $(gcc-version) || die "Please set gcc 4.9 or higher as active in gcc-config to build ${PN}"
92 + fi
93 +
94 + linux-mod_pkg_setup
95 + BUILD_PARAMS="KERN_DIR=${KV_OUT_DIR} KERNOUT=${KV_OUT_DIR}"
96 +
97 + python-single-r1_pkg_setup
98 +}
99 +
100 +src_prepare() {
101 + # Prepare the vboxvideo_drm sources and Makefile in ${WORKDIR}
102 + cp -a "${S}"/src/VBox/Additions/linux/drm "${WORKDIR}/vboxvideo_drm" \
103 + || die "cannot copy vboxvideo_drm directory"
104 + cp "${FILESDIR}/${PN}-3-vboxvideo_drm.makefile" \
105 + "${WORKDIR}/vboxvideo_drm/Makefile" \
106 + || die "cannot copy vboxvideo_drm Makefile"
107 +
108 + # stupid new header references...
109 + for vboxheader in {product,version}-generated.h ; do
110 + ln -sf "${S}"/out/linux.${ARCH}/release/${vboxheader} \
111 + "${WORKDIR}/vboxvideo_drm/${vboxheader}"
112 + done
113 +
114 + # Remove shipped binaries (kBuild,yasm), see bug #232775
115 + rm -rf kBuild/bin tools
116 +
117 + # Remove pointless GCC version limitations in check_gcc()
118 + 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" \
119 + -i configure || die
120 +
121 + # Disable things unused or splitted into separate ebuilds
122 + cp "${FILESDIR}/${PN}-3-localconfig" LocalConfig.kmk || die
123 +
124 + # Ugly hack to build the opengl part of the video driver
125 + epatch "${FILESDIR}/${PN}-2.2.0-enable-opengl.patch"
126 +
127 + # unset useless/problematic checks in configure
128 + epatch "${FILESDIR}/${PN}-3.2.8-mesa-check.patch" \
129 + "${FILESDIR}/${PN}-4-makeself-check.patch" \
130 + "${FILESDIR}/${PN}-4-mkisofs-check.patch"
131 +
132 + # link with lazy on hardened #394757
133 + sed -i '/^TEMPLATE_VBOXR3EXE_LDFLAGS.linux/s/$/ -Wl,-z,lazy/' Config.kmk || die
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 + for each in /src/VBox/{Runtime,Additions/common/VBoxGuestLib} \
159 + /src/VBox/{GuestHost/OpenGL,Additions/x11/x11stubs,Additions/common/crOpenGL} \
160 + /src/VBox/Additions/x11/vboxvideo ; do
161 + cd "${S}"${each} || die
162 + MAKE="kmk" \
163 + emake TOOL_YASM_AS=yasm \
164 + VBOX_USE_SYSTEM_XORG_HEADERS=1 \
165 + KBUILD_PATH="${S}/kBuild" \
166 + KBUILD_VERBOSE=2
167 + done
168 +
169 + if use dri ; then
170 + # Now creating the kernel modules. We must do this _after_
171 + # we compiled the user-space tools as we need two of the
172 + # automatically generated header files. (>=3.2.0)
173 + linux-mod_src_compile
174 + fi
175 +}
176 +
177 +src_install() {
178 + if use dri; then
179 + linux-mod_src_install
180 + fi
181 +
182 + cd "${S}/out/linux.${ARCH}/release/bin/additions"
183 + insinto /usr/$(get_libdir)/xorg/modules/drivers
184 + newins vboxvideo_drv_system.so vboxvideo_drv.so
185 +
186 + # Guest OpenGL driver
187 + insinto /usr/$(get_libdir)
188 + doins -r VBoxOGL*
189 +
190 + if use dri ; then
191 + dosym /usr/$(get_libdir)/VBoxOGL.so \
192 + /usr/$(get_libdir)/dri/vboxvideo_dri.so
193 + fi
194 +}
195 +
196 +pkg_postinst() {
197 + elog "You need to edit the file /etc/X11/xorg.conf and set:"
198 + elog ""
199 + elog " Driver \"vboxvideo\""
200 + elog ""
201 + elog "in the Graphics device section (Section \"Device\")"
202 + elog ""
203 + if use dri; then
204 + elog "To use the kernel drm video driver, please add:"
205 + elog "\"vboxvideo\" to:"
206 + if has_version sys-apps/openrc ; then
207 + elog "/etc/conf.d/modules"
208 + else
209 + elog "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
210 + fi
211 + elog ""
212 + fi
213 +}