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