1 |
commit: 8b2b73befeb3a6c4de1899d810366b625193ea56 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 1 16:44:33 2018 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 1 16:45:20 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b2b73be |
7 |
|
8 |
media-libs/mesa: Version bump 18.1.1 |
9 |
|
10 |
media-libs/mesa/Manifest | 1 + |
11 |
media-libs/mesa/mesa-18.1.1.ebuild | 531 +++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 532 insertions(+) |
13 |
|
14 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
15 |
index 3e0bde2c835..5652c66bcda 100644 |
16 |
--- a/media-libs/mesa/Manifest |
17 |
+++ b/media-libs/mesa/Manifest |
18 |
@@ -1,3 +1,4 @@ |
19 |
DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f |
20 |
DIST mesa-18.0.4.tar.xz 10939356 BLAKE2B 6bbf19f4e547be3be7385f6e8b094444fe78c0e1ac04d42f1e762ec92d83a53c06bae987b63a542553df4a8a1e17c0b3738e2db6faf356897f49b8d7efd5845c SHA512 f9a14be46c209661ceb318add1611481445d13b47e95c7a5d2a5e5ecfdd5d2c3fa9c2b16b30035bbb8d61ccc7cb65bfa6698ac8b040273e5ab045a951a67752c |
21 |
DIST mesa-18.1.0.tar.xz 11118776 BLAKE2B 0da5486e96596b3f919f15d2db9cd12de825811a0f2222bb76859bb7d275914dda0cc19a518b269fa0745d52982b92d5d645b6da639a870709193db721262658 SHA512 8b26af2df8b94373cbc339521974cd568c1d4ff4204986ee7b439e4cf3ebe14d822ea081a7769b68eca9263b7bc6dbca01836b8bb0d6495d2e2614c4e3d601ad |
22 |
+DIST mesa-18.1.1.tar.xz 11110892 BLAKE2B 05d48379109c1c3800d3d07b9f52e96b2cd4bc087517711ee752f89619afce0a0e09b7a9ede8b5d1807ceae3e2b506518657a0760c947f466121e2252f7eada3 SHA512 7783adc1ec7a1c3d092acfcca6b4ba19450c15a7f0d7f41fbf25e482236615d79ce24afe60959066ea7aa851df4f74fa3c569fa6d847ea79e6bfe046b8c65e90 |
23 |
|
24 |
diff --git a/media-libs/mesa/mesa-18.1.1.ebuild b/media-libs/mesa/mesa-18.1.1.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..70702be097d |
27 |
--- /dev/null |
28 |
+++ b/media-libs/mesa/mesa-18.1.1.ebuild |
29 |
@@ -0,0 +1,531 @@ |
30 |
+# Copyright 1999-2018 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+ |
35 |
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
36 |
+ |
37 |
+if [[ ${PV} = 9999 ]]; then |
38 |
+ GIT_ECLASS="git-r3" |
39 |
+ EXPERIMENTAL="true" |
40 |
+fi |
41 |
+ |
42 |
+PYTHON_COMPAT=( python2_7 ) |
43 |
+ |
44 |
+inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
45 |
+ |
46 |
+OPENGL_DIR="xorg-x11" |
47 |
+ |
48 |
+MY_P="${P/_/-}" |
49 |
+ |
50 |
+DESCRIPTION="OpenGL-like graphic library for Linux" |
51 |
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
52 |
+ |
53 |
+if [[ $PV == 9999 ]]; then |
54 |
+ SRC_URI="" |
55 |
+else |
56 |
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
57 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
58 |
+fi |
59 |
+ |
60 |
+LICENSE="MIT" |
61 |
+SLOT="0" |
62 |
+RESTRICT="!bindist? ( bindist )" |
63 |
+ |
64 |
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
65 |
+VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
66 |
+for card in ${VIDEO_CARDS}; do |
67 |
+ IUSE_VIDEO_CARDS+=" video_cards_${card}" |
68 |
+done |
69 |
+ |
70 |
+IUSE="${IUSE_VIDEO_CARDS} |
71 |
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
72 |
+ +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
73 |
+ vdpau vulkan wayland xvmc xa" |
74 |
+ |
75 |
+REQUIRED_USE=" |
76 |
+ d3d9? ( dri3 gallium ) |
77 |
+ llvm? ( gallium ) |
78 |
+ opencl? ( gallium llvm ) |
79 |
+ openmax? ( gallium ) |
80 |
+ gles1? ( egl ) |
81 |
+ gles2? ( egl ) |
82 |
+ vaapi? ( gallium ) |
83 |
+ vdpau? ( gallium ) |
84 |
+ vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
85 |
+ video_cards_radeonsi? ( llvm ) ) |
86 |
+ wayland? ( egl gbm ) |
87 |
+ xa? ( gallium ) |
88 |
+ video_cards_freedreno? ( gallium ) |
89 |
+ video_cards_intel? ( classic ) |
90 |
+ video_cards_i915? ( || ( classic gallium ) ) |
91 |
+ video_cards_i965? ( classic ) |
92 |
+ video_cards_imx? ( gallium video_cards_vivante ) |
93 |
+ video_cards_nouveau? ( || ( classic gallium ) ) |
94 |
+ video_cards_radeon? ( || ( classic gallium ) |
95 |
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
96 |
+ video_cards_r100? ( classic ) |
97 |
+ video_cards_r200? ( classic ) |
98 |
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
99 |
+ video_cards_r600? ( gallium ) |
100 |
+ video_cards_radeonsi? ( gallium llvm ) |
101 |
+ video_cards_vc4? ( gallium ) |
102 |
+ video_cards_virgl? ( gallium ) |
103 |
+ video_cards_vivante? ( gallium gbm ) |
104 |
+ video_cards_vmware? ( gallium ) |
105 |
+" |
106 |
+ |
107 |
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91" |
108 |
+RDEPEND=" |
109 |
+ !app-eselect/eselect-mesa |
110 |
+ >=app-eselect/eselect-opengl-1.3.0 |
111 |
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
112 |
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
113 |
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
114 |
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
115 |
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
116 |
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
117 |
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
118 |
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
119 |
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
120 |
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
121 |
+ llvm? ( |
122 |
+ video_cards_radeonsi? ( |
123 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
124 |
+ ) |
125 |
+ video_cards_r600? ( |
126 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
127 |
+ ) |
128 |
+ video_cards_radeon? ( |
129 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
130 |
+ ) |
131 |
+ ) |
132 |
+ opencl? ( |
133 |
+ app-eselect/eselect-opencl |
134 |
+ dev-libs/libclc |
135 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
136 |
+ ) |
137 |
+ openmax? ( |
138 |
+ >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] |
139 |
+ x11-misc/xdg-utils |
140 |
+ ) |
141 |
+ vaapi? ( |
142 |
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
143 |
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
144 |
+ ) |
145 |
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
146 |
+ wayland? ( |
147 |
+ >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
148 |
+ >=dev-libs/wayland-protocols-1.8 |
149 |
+ ) |
150 |
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
151 |
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
152 |
+ |
153 |
+ video_cards_intel? ( |
154 |
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
155 |
+ ) |
156 |
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
157 |
+" |
158 |
+for card in ${RADEON_CARDS}; do |
159 |
+ RDEPEND="${RDEPEND} |
160 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
161 |
+ " |
162 |
+done |
163 |
+RDEPEND="${RDEPEND} |
164 |
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
165 |
+" |
166 |
+ |
167 |
+# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
168 |
+# we need to *really* make sure we're not pulling one than more slot |
169 |
+# simultaneously. |
170 |
+# |
171 |
+# How to use it: |
172 |
+# 1. List all the working slots (with min versions) in ||, newest first. |
173 |
+# 2. Update the := to specify *max* version, e.g. < 7. |
174 |
+# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
175 |
+LLVM_DEPSTR=" |
176 |
+ || ( |
177 |
+ sys-devel/llvm:7[${MULTILIB_USEDEP}] |
178 |
+ sys-devel/llvm:6[${MULTILIB_USEDEP}] |
179 |
+ sys-devel/llvm:5[${MULTILIB_USEDEP}] |
180 |
+ sys-devel/llvm:4[${MULTILIB_USEDEP}] |
181 |
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
182 |
+ ) |
183 |
+ sys-devel/llvm:=[${MULTILIB_USEDEP}] |
184 |
+" |
185 |
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
186 |
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
187 |
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
188 |
+RDEPEND="${RDEPEND} |
189 |
+ llvm? ( |
190 |
+ opencl? ( |
191 |
+ video_cards_r600? ( |
192 |
+ ${CLANG_DEPSTR_AMDGPU} |
193 |
+ ) |
194 |
+ !video_cards_r600? ( |
195 |
+ video_cards_radeonsi? ( |
196 |
+ ${CLANG_DEPSTR_AMDGPU} |
197 |
+ ) |
198 |
+ ) |
199 |
+ !video_cards_r600? ( |
200 |
+ !video_cards_radeonsi? ( |
201 |
+ video_cards_radeon? ( |
202 |
+ ${CLANG_DEPSTR_AMDGPU} |
203 |
+ ) |
204 |
+ ) |
205 |
+ ) |
206 |
+ !video_cards_r600? ( |
207 |
+ !video_cards_radeon? ( |
208 |
+ !video_cards_radeonsi? ( |
209 |
+ ${CLANG_DEPSTR} |
210 |
+ ) |
211 |
+ ) |
212 |
+ ) |
213 |
+ ) |
214 |
+ !opencl? ( |
215 |
+ video_cards_r600? ( |
216 |
+ ${LLVM_DEPSTR_AMDGPU} |
217 |
+ ) |
218 |
+ !video_cards_r600? ( |
219 |
+ video_cards_radeonsi? ( |
220 |
+ ${LLVM_DEPSTR_AMDGPU} |
221 |
+ ) |
222 |
+ ) |
223 |
+ !video_cards_r600? ( |
224 |
+ !video_cards_radeonsi? ( |
225 |
+ video_cards_radeon? ( |
226 |
+ ${LLVM_DEPSTR_AMDGPU} |
227 |
+ ) |
228 |
+ ) |
229 |
+ ) |
230 |
+ !video_cards_r600? ( |
231 |
+ !video_cards_radeon? ( |
232 |
+ !video_cards_radeonsi? ( |
233 |
+ ${LLVM_DEPSTR} |
234 |
+ ) |
235 |
+ ) |
236 |
+ ) |
237 |
+ ) |
238 |
+ ) |
239 |
+" |
240 |
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
241 |
+ |
242 |
+DEPEND="${RDEPEND} |
243 |
+ ${PYTHON_DEPS} |
244 |
+ opencl? ( |
245 |
+ >=sys-devel/gcc-4.6 |
246 |
+ ) |
247 |
+ sys-devel/gettext |
248 |
+ virtual/pkgconfig |
249 |
+ valgrind? ( dev-util/valgrind ) |
250 |
+ x11-base/xorg-proto |
251 |
+ vulkan? ( |
252 |
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
253 |
+ ) |
254 |
+" |
255 |
+[[ ${PV} == 9999 ]] && DEPEND+=" |
256 |
+ sys-devel/bison |
257 |
+ sys-devel/flex |
258 |
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
259 |
+" |
260 |
+ |
261 |
+S="${WORKDIR}/${MY_P}" |
262 |
+EGIT_CHECKOUT_DIR=${S} |
263 |
+ |
264 |
+QA_WX_LOAD=" |
265 |
+x86? ( |
266 |
+ !pic? ( |
267 |
+ usr/lib*/libglapi.so.0.0.0 |
268 |
+ usr/lib*/libGLESv1_CM.so.1.1.0 |
269 |
+ usr/lib*/libGLESv2.so.2.0.0 |
270 |
+ usr/lib*/libGL.so.1.2.0 |
271 |
+ usr/lib*/libOSMesa.so.8.0.0 |
272 |
+ ) |
273 |
+)" |
274 |
+ |
275 |
+llvm_check_deps() { |
276 |
+ local flags=${MULTILIB_USEDEP} |
277 |
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
278 |
+ then |
279 |
+ flags+=",llvm_targets_AMDGPU(-)" |
280 |
+ fi |
281 |
+ |
282 |
+ if use opencl; then |
283 |
+ has_version "sys-devel/clang[${flags}]" || return 1 |
284 |
+ fi |
285 |
+ has_version "sys-devel/llvm[${flags}]" |
286 |
+} |
287 |
+ |
288 |
+pkg_setup() { |
289 |
+ # warning message for bug 459306 |
290 |
+ if use llvm && has_version sys-devel/llvm[!debug=]; then |
291 |
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
292 |
+ ewarn "detected! This can cause problems. For details, see bug 459306." |
293 |
+ fi |
294 |
+ |
295 |
+ if use llvm; then |
296 |
+ llvm_pkg_setup |
297 |
+ fi |
298 |
+ python-any-r1_pkg_setup |
299 |
+} |
300 |
+ |
301 |
+src_prepare() { |
302 |
+ eapply_user |
303 |
+ [[ ${PV} == 9999 ]] && eautoreconf |
304 |
+} |
305 |
+ |
306 |
+multilib_src_configure() { |
307 |
+ local myconf |
308 |
+ |
309 |
+ if use classic; then |
310 |
+ # Configurable DRI drivers |
311 |
+ driver_enable swrast |
312 |
+ |
313 |
+ # Intel code |
314 |
+ driver_enable video_cards_i915 i915 |
315 |
+ driver_enable video_cards_i965 i965 |
316 |
+ if ! use video_cards_i915 && \ |
317 |
+ ! use video_cards_i965; then |
318 |
+ driver_enable video_cards_intel i915 i965 |
319 |
+ fi |
320 |
+ |
321 |
+ # Nouveau code |
322 |
+ driver_enable video_cards_nouveau nouveau |
323 |
+ |
324 |
+ # ATI code |
325 |
+ driver_enable video_cards_r100 radeon |
326 |
+ driver_enable video_cards_r200 r200 |
327 |
+ if ! use video_cards_r100 && \ |
328 |
+ ! use video_cards_r200; then |
329 |
+ driver_enable video_cards_radeon radeon r200 |
330 |
+ fi |
331 |
+ fi |
332 |
+ |
333 |
+ if use egl; then |
334 |
+ myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
335 |
+ fi |
336 |
+ |
337 |
+ if use gallium; then |
338 |
+ myconf+=" |
339 |
+ $(use_enable d3d9 nine) |
340 |
+ $(use_enable llvm) |
341 |
+ $(use_enable openmax omx-bellagio) |
342 |
+ $(use_enable vaapi va) |
343 |
+ $(use_enable vdpau) |
344 |
+ $(use_enable xa) |
345 |
+ $(use_enable xvmc) |
346 |
+ " |
347 |
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
348 |
+ |
349 |
+ gallium_enable swrast |
350 |
+ gallium_enable video_cards_vc4 vc4 |
351 |
+ gallium_enable video_cards_vivante etnaviv |
352 |
+ gallium_enable video_cards_vmware svga |
353 |
+ gallium_enable video_cards_nouveau nouveau |
354 |
+ gallium_enable video_cards_i915 i915 |
355 |
+ gallium_enable video_cards_imx imx |
356 |
+ if ! use video_cards_i915 && \ |
357 |
+ ! use video_cards_i965; then |
358 |
+ gallium_enable video_cards_intel i915 |
359 |
+ fi |
360 |
+ |
361 |
+ gallium_enable video_cards_r300 r300 |
362 |
+ gallium_enable video_cards_r600 r600 |
363 |
+ gallium_enable video_cards_radeonsi radeonsi |
364 |
+ if ! use video_cards_r300 && \ |
365 |
+ ! use video_cards_r600; then |
366 |
+ gallium_enable video_cards_radeon r300 r600 |
367 |
+ fi |
368 |
+ |
369 |
+ gallium_enable video_cards_freedreno freedreno |
370 |
+ # opencl stuff |
371 |
+ if use opencl; then |
372 |
+ myconf+=" |
373 |
+ $(use_enable opencl) |
374 |
+ --with-clang-libdir="${EPREFIX}/usr/lib" |
375 |
+ " |
376 |
+ fi |
377 |
+ |
378 |
+ gallium_enable video_cards_virgl virgl |
379 |
+ fi |
380 |
+ |
381 |
+ if use vulkan; then |
382 |
+ vulkan_enable video_cards_i965 intel |
383 |
+ vulkan_enable video_cards_radeonsi radeon |
384 |
+ fi |
385 |
+ |
386 |
+ # x86 hardened pax_kernel needs glx-rts, bug 240956 |
387 |
+ if [[ ${ABI} == x86 ]]; then |
388 |
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
389 |
+ fi |
390 |
+ |
391 |
+ # on abi_x86_32 hardened we need to have asm disable |
392 |
+ if [[ ${ABI} == x86* ]] && use pic; then |
393 |
+ myconf+=" --disable-asm" |
394 |
+ fi |
395 |
+ |
396 |
+ if use gallium; then |
397 |
+ myconf+=" $(use_enable osmesa gallium-osmesa)" |
398 |
+ else |
399 |
+ myconf+=" $(use_enable osmesa)" |
400 |
+ fi |
401 |
+ |
402 |
+ # build fails with BSD indent, bug #428112 |
403 |
+ use userland_GNU || export INDENT=cat |
404 |
+ |
405 |
+ ECONF_SOURCE="${S}" \ |
406 |
+ econf \ |
407 |
+ --enable-dri \ |
408 |
+ --enable-glx \ |
409 |
+ --enable-shared-glapi \ |
410 |
+ $(use_enable !bindist texture-float) \ |
411 |
+ $(use_enable d3d9 nine) \ |
412 |
+ $(use_enable debug) \ |
413 |
+ $(use_enable dri3) \ |
414 |
+ $(use_enable egl) \ |
415 |
+ $(use_enable gbm) \ |
416 |
+ $(use_enable gles1) \ |
417 |
+ $(use_enable gles2) \ |
418 |
+ $(use_enable nptl glx-tls) \ |
419 |
+ $(use_enable unwind libunwind) \ |
420 |
+ --enable-valgrind=$(usex valgrind auto no) \ |
421 |
+ --enable-llvm-shared-libs \ |
422 |
+ --disable-opencl-icd \ |
423 |
+ --with-dri-drivers=${DRI_DRIVERS} \ |
424 |
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
425 |
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
426 |
+ PYTHON2="${PYTHON}" \ |
427 |
+ ${myconf} |
428 |
+} |
429 |
+ |
430 |
+multilib_src_install() { |
431 |
+ emake install DESTDIR="${D}" |
432 |
+ |
433 |
+ if use opencl; then |
434 |
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
435 |
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
436 |
+ dodir ${cl_dir}/{lib,include} |
437 |
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
438 |
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
439 |
+ "${ED}"${cl_dir} |
440 |
+ fi |
441 |
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
442 |
+ mv -f "${ED}"/usr/include/CL \ |
443 |
+ "${ED}"${cl_dir}/include |
444 |
+ fi |
445 |
+ eend $? |
446 |
+ fi |
447 |
+ |
448 |
+ if use openmax; then |
449 |
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
450 |
+ doenvd "${T}"/99mesaxdgomx |
451 |
+ keepdir /usr/share/mesa/xdg |
452 |
+ fi |
453 |
+} |
454 |
+ |
455 |
+multilib_src_install_all() { |
456 |
+ find "${ED}" -name '*.la' -delete |
457 |
+ einstalldocs |
458 |
+ |
459 |
+ if use !bindist; then |
460 |
+ dodoc docs/patents.txt |
461 |
+ fi |
462 |
+} |
463 |
+ |
464 |
+multilib_src_test() { |
465 |
+ if use llvm; then |
466 |
+ local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf' |
467 |
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die |
468 |
+ emake ${llvm_tests} |
469 |
+ pax-mark m ${llvm_tests} |
470 |
+ popd >/dev/null || die |
471 |
+ fi |
472 |
+ emake check |
473 |
+} |
474 |
+ |
475 |
+pkg_postinst() { |
476 |
+ # Switch to the xorg implementation. |
477 |
+ echo |
478 |
+ eselect opengl set --use-old ${OPENGL_DIR} |
479 |
+ |
480 |
+ # Switch to mesa opencl |
481 |
+ if use opencl; then |
482 |
+ eselect opencl set --use-old ${PN} |
483 |
+ fi |
484 |
+ |
485 |
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
486 |
+ if use openmax; then |
487 |
+ ebegin "Registering OpenMAX drivers" |
488 |
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
489 |
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
490 |
+ omxregister-bellagio |
491 |
+ eend $? |
492 |
+ fi |
493 |
+ |
494 |
+ # warn about patent encumbered texture-float |
495 |
+ if use !bindist; then |
496 |
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
497 |
+ elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
498 |
+ elog "explanation." |
499 |
+ fi |
500 |
+} |
501 |
+ |
502 |
+pkg_prerm() { |
503 |
+ if use openmax; then |
504 |
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
505 |
+ fi |
506 |
+} |
507 |
+ |
508 |
+# $1 - VIDEO_CARDS flag |
509 |
+# other args - names of DRI drivers to enable |
510 |
+# TODO: avoid code duplication for a more elegant implementation |
511 |
+driver_enable() { |
512 |
+ case $# in |
513 |
+ # for enabling unconditionally |
514 |
+ 1) |
515 |
+ DRI_DRIVERS+=",$1" |
516 |
+ ;; |
517 |
+ *) |
518 |
+ if use $1; then |
519 |
+ shift |
520 |
+ for i in $@; do |
521 |
+ DRI_DRIVERS+=",${i}" |
522 |
+ done |
523 |
+ fi |
524 |
+ ;; |
525 |
+ esac |
526 |
+} |
527 |
+ |
528 |
+gallium_enable() { |
529 |
+ case $# in |
530 |
+ # for enabling unconditionally |
531 |
+ 1) |
532 |
+ GALLIUM_DRIVERS+=",$1" |
533 |
+ ;; |
534 |
+ *) |
535 |
+ if use $1; then |
536 |
+ shift |
537 |
+ for i in $@; do |
538 |
+ GALLIUM_DRIVERS+=",${i}" |
539 |
+ done |
540 |
+ fi |
541 |
+ ;; |
542 |
+ esac |
543 |
+} |
544 |
+ |
545 |
+vulkan_enable() { |
546 |
+ case $# in |
547 |
+ # for enabling unconditionally |
548 |
+ 1) |
549 |
+ VULKAN_DRIVERS+=",$1" |
550 |
+ ;; |
551 |
+ *) |
552 |
+ if use $1; then |
553 |
+ shift |
554 |
+ for i in $@; do |
555 |
+ VULKAN_DRIVERS+=",${i}" |
556 |
+ done |
557 |
+ fi |
558 |
+ ;; |
559 |
+ esac |
560 |
+} |