1 |
commit: d1c88664e29246fde1cf111357f33a810e75a0fe |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 31 19:08:36 2018 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 31 19:09:54 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d1c88664 |
7 |
|
8 |
media-libs/mesa: Version bump to 18.2.4 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/669058 |
11 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
12 |
|
13 |
media-libs/mesa/Manifest | 1 + |
14 |
media-libs/mesa/mesa-18.2.4.ebuild | 526 +++++++++++++++++++++++++++++++++++++ |
15 |
2 files changed, 527 insertions(+) |
16 |
|
17 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
18 |
index b09c0f454cb..fc632fc5a65 100644 |
19 |
--- a/media-libs/mesa/Manifest |
20 |
+++ b/media-libs/mesa/Manifest |
21 |
@@ -3,3 +3,4 @@ DIST mesa-18.2.0.tar.xz 11331164 BLAKE2B e4e7c65a0c3c0716451157f7d026df8836399b5 |
22 |
DIST mesa-18.2.1.tar.xz 11374476 BLAKE2B f0f3b766d68550f8c395a1b1d1ffc7a9e532c22ee6b91d698db33a270c152e03ab656d4219301bc2e0e95ba6f0583017c4361add928ad8ab26378a1ec6958f36 SHA512 d249bdf79aad36db9a8d291b3a1a100d283893ac741f58f85ae7e5c90ca25c37f80a5fa6fc57945ffeb0b67b788e7ea146543ec790b22f144578fc4c1525b84d |
23 |
DIST mesa-18.2.2.tar.xz 11375608 BLAKE2B 0b2a1b60e72885b2b48335645c04c4d5720c0b426c256781f3e84e22955ac87d9abe19550f996e3ff964befcc2b959e8639dcad585b3ec777dd629f06623e5ec SHA512 35c27f0673abd35d0581db34b6ad646058523dd826ff751df718e1f9d6a996409a0c5b313fbbf177058d9610a53d646f858fb86537e3ea1000df5edbddcf043a |
24 |
DIST mesa-18.2.3.tar.xz 11376632 BLAKE2B b693e42918be9980d86fedf136e872d785b92b49272cbd5374907f7c3bc857ef5991852de5cf7da1b4f16420b0cf9926541219d3b1717b78fe6fc6c3cf2c3788 SHA512 20f512b1f3835b1c78b1f05f2e2125dc3437b61b8857e7ec62e0f9ac3be2ccb5b7ebe7e18f444da1117bc100d75e4b03cd2a0180f0f0b1cf760714b43bc7a664 |
25 |
+DIST mesa-18.2.4.tar.xz 11377556 BLAKE2B b11c33ade744fb976862fecccbcc4c97196a005e40a00ef02bd8d409b66b3aa11f97baee13f2aa92f2d7c5461b2ef44beae3103687dea9ee29e92439a068f08a SHA512 088d43b087f4005752e4db75eaa6897e0fcb6de7b9a1f2d2b2ce3b5557d1dff829022e0092e8b1038ff01182c863ca0f26c97b9adde34bca462d3fa24502bfde |
26 |
|
27 |
diff --git a/media-libs/mesa/mesa-18.2.4.ebuild b/media-libs/mesa/mesa-18.2.4.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..2b4e1542fc5 |
30 |
--- /dev/null |
31 |
+++ b/media-libs/mesa/mesa-18.2.4.ebuild |
32 |
@@ -0,0 +1,526 @@ |
33 |
+# Copyright 1999-2018 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+PYTHON_COMPAT=( python2_7 ) |
39 |
+ |
40 |
+inherit llvm meson multilib-minimal pax-utils python-any-r1 |
41 |
+ |
42 |
+OPENGL_DIR="xorg-x11" |
43 |
+ |
44 |
+MY_P="${P/_/-}" |
45 |
+ |
46 |
+DESCRIPTION="OpenGL-like graphic library for Linux" |
47 |
+HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
48 |
+ |
49 |
+if [[ ${PV} == 9999 ]]; then |
50 |
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
51 |
+ EXPERIMENTAL="true" |
52 |
+ inherit git-r3 |
53 |
+else |
54 |
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
55 |
+ 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" |
56 |
+fi |
57 |
+ |
58 |
+LICENSE="MIT" |
59 |
+SLOT="0" |
60 |
+RESTRICT=" |
61 |
+ !test? ( test ) |
62 |
+" |
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 |
+ +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 +llvm lm_sensors |
72 |
+ opencl osmesa pax_kernel pic selinux test unwind vaapi valgrind vdpau |
73 |
+ vulkan wayland xa xvmc" |
74 |
+ |
75 |
+REQUIRED_USE=" |
76 |
+ d3d9? ( dri3 ) |
77 |
+ gles1? ( egl ) |
78 |
+ gles2? ( egl ) |
79 |
+ vulkan? ( dri3 |
80 |
+ || ( video_cards_i965 video_cards_radeonsi ) |
81 |
+ video_cards_radeonsi? ( llvm ) ) |
82 |
+ wayland? ( egl gbm ) |
83 |
+ video_cards_freedreno? ( gallium ) |
84 |
+ video_cards_intel? ( classic ) |
85 |
+ video_cards_i915? ( || ( classic gallium ) ) |
86 |
+ video_cards_i965? ( classic ) |
87 |
+ video_cards_imx? ( gallium video_cards_vivante ) |
88 |
+ video_cards_nouveau? ( || ( classic gallium ) ) |
89 |
+ video_cards_radeon? ( || ( classic gallium ) |
90 |
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
91 |
+ video_cards_r100? ( classic ) |
92 |
+ video_cards_r200? ( classic ) |
93 |
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
94 |
+ video_cards_r600? ( gallium ) |
95 |
+ video_cards_radeonsi? ( gallium llvm ) |
96 |
+ video_cards_vc4? ( gallium ) |
97 |
+ video_cards_virgl? ( gallium ) |
98 |
+ video_cards_vivante? ( gallium gbm ) |
99 |
+ video_cards_vmware? ( gallium ) |
100 |
+" |
101 |
+ |
102 |
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.93" |
103 |
+RDEPEND=" |
104 |
+ !app-eselect/eselect-mesa |
105 |
+ >=app-eselect/eselect-opengl-1.3.0 |
106 |
+ >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
107 |
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
108 |
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
109 |
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
110 |
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
111 |
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
112 |
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
113 |
+ >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
114 |
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
115 |
+ gallium? ( |
116 |
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
117 |
+ llvm? ( |
118 |
+ video_cards_radeonsi? ( |
119 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
120 |
+ ) |
121 |
+ video_cards_r600? ( |
122 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
123 |
+ ) |
124 |
+ video_cards_radeon? ( |
125 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
126 |
+ ) |
127 |
+ ) |
128 |
+ lm_sensors? ( sys-apps/lm_sensors:=[${MULTILIB_USEDEP}] ) |
129 |
+ opencl? ( |
130 |
+ dev-libs/ocl-icd[khronos-headers,${MULTILIB_USEDEP}] |
131 |
+ dev-libs/libclc |
132 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
133 |
+ ) |
134 |
+ vaapi? ( |
135 |
+ >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
136 |
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
137 |
+ ) |
138 |
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
139 |
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
140 |
+ ) |
141 |
+ wayland? ( |
142 |
+ >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] |
143 |
+ >=dev-libs/wayland-protocols-1.8 |
144 |
+ ) |
145 |
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
146 |
+ |
147 |
+ video_cards_intel? ( |
148 |
+ !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
149 |
+ ) |
150 |
+ video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
151 |
+" |
152 |
+for card in ${RADEON_CARDS}; do |
153 |
+ RDEPEND="${RDEPEND} |
154 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
155 |
+ " |
156 |
+done |
157 |
+RDEPEND="${RDEPEND} |
158 |
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
159 |
+" |
160 |
+ |
161 |
+# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
162 |
+# we need to *really* make sure we're not pulling one than more slot |
163 |
+# simultaneously. |
164 |
+# |
165 |
+# How to use it: |
166 |
+# 1. List all the working slots (with min versions) in ||, newest first. |
167 |
+# 2. Update the := to specify *max* version, e.g. < 7. |
168 |
+# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
169 |
+LLVM_MAX_SLOT="7" |
170 |
+LLVM_DEPSTR=" |
171 |
+ || ( |
172 |
+ sys-devel/llvm:7[${MULTILIB_USEDEP}] |
173 |
+ sys-devel/llvm:6[${MULTILIB_USEDEP}] |
174 |
+ sys-devel/llvm:5[${MULTILIB_USEDEP}] |
175 |
+ sys-devel/llvm:4[${MULTILIB_USEDEP}] |
176 |
+ >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
177 |
+ ) |
178 |
+ sys-devel/llvm:=[${MULTILIB_USEDEP}] |
179 |
+" |
180 |
+LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
181 |
+CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
182 |
+CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
183 |
+RDEPEND="${RDEPEND} |
184 |
+ llvm? ( |
185 |
+ opencl? ( |
186 |
+ video_cards_r600? ( |
187 |
+ ${CLANG_DEPSTR_AMDGPU} |
188 |
+ ) |
189 |
+ !video_cards_r600? ( |
190 |
+ video_cards_radeonsi? ( |
191 |
+ ${CLANG_DEPSTR_AMDGPU} |
192 |
+ ) |
193 |
+ ) |
194 |
+ !video_cards_r600? ( |
195 |
+ !video_cards_radeonsi? ( |
196 |
+ video_cards_radeon? ( |
197 |
+ ${CLANG_DEPSTR_AMDGPU} |
198 |
+ ) |
199 |
+ ) |
200 |
+ ) |
201 |
+ !video_cards_r600? ( |
202 |
+ !video_cards_radeon? ( |
203 |
+ !video_cards_radeonsi? ( |
204 |
+ ${CLANG_DEPSTR} |
205 |
+ ) |
206 |
+ ) |
207 |
+ ) |
208 |
+ ) |
209 |
+ !opencl? ( |
210 |
+ video_cards_r600? ( |
211 |
+ ${LLVM_DEPSTR_AMDGPU} |
212 |
+ ) |
213 |
+ !video_cards_r600? ( |
214 |
+ video_cards_radeonsi? ( |
215 |
+ ${LLVM_DEPSTR_AMDGPU} |
216 |
+ ) |
217 |
+ ) |
218 |
+ !video_cards_r600? ( |
219 |
+ !video_cards_radeonsi? ( |
220 |
+ video_cards_radeon? ( |
221 |
+ ${LLVM_DEPSTR_AMDGPU} |
222 |
+ ) |
223 |
+ ) |
224 |
+ ) |
225 |
+ !video_cards_r600? ( |
226 |
+ !video_cards_radeon? ( |
227 |
+ !video_cards_radeonsi? ( |
228 |
+ ${LLVM_DEPSTR} |
229 |
+ ) |
230 |
+ ) |
231 |
+ ) |
232 |
+ ) |
233 |
+ ) |
234 |
+" |
235 |
+unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
236 |
+ |
237 |
+DEPEND="${RDEPEND} |
238 |
+ ${PYTHON_DEPS} |
239 |
+ opencl? ( |
240 |
+ >=sys-devel/gcc-4.6 |
241 |
+ ) |
242 |
+ sys-devel/bison |
243 |
+ sys-devel/flex |
244 |
+ sys-devel/gettext |
245 |
+ virtual/pkgconfig |
246 |
+ valgrind? ( dev-util/valgrind ) |
247 |
+ x11-base/xorg-proto |
248 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
249 |
+ $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") |
250 |
+" |
251 |
+ |
252 |
+S="${WORKDIR}/${MY_P}" |
253 |
+EGIT_CHECKOUT_DIR=${S} |
254 |
+ |
255 |
+QA_WX_LOAD=" |
256 |
+x86? ( |
257 |
+ !pic? ( |
258 |
+ usr/lib*/libglapi.so.0.0.0 |
259 |
+ usr/lib*/libGLESv1_CM.so.1.0.0 |
260 |
+ usr/lib*/libGLESv2.so.2.0.0 |
261 |
+ usr/lib*/libGL.so.1.2.0 |
262 |
+ usr/lib*/libOSMesa.so.8.0.0 |
263 |
+ ) |
264 |
+)" |
265 |
+ |
266 |
+llvm_check_deps() { |
267 |
+ local flags=${MULTILIB_USEDEP} |
268 |
+ if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
269 |
+ then |
270 |
+ flags+=",llvm_targets_AMDGPU(-)" |
271 |
+ fi |
272 |
+ |
273 |
+ if use opencl; then |
274 |
+ has_version "sys-devel/clang[${flags}]" || return 1 |
275 |
+ fi |
276 |
+ has_version "sys-devel/llvm[${flags}]" |
277 |
+} |
278 |
+ |
279 |
+pkg_pretend() { |
280 |
+ if use d3d9; then |
281 |
+ if ! use video_cards_r300 && |
282 |
+ ! use video_cards_r600 && |
283 |
+ ! use video_cards_radeonsi && |
284 |
+ ! use video_cards_nouveau && |
285 |
+ ! use video_cards_vmware; then |
286 |
+ ewarn "Ignoring USE=d3d9 since VIDEO_CARDS does not contain r300, r600, radeonsi, nouveau, or vmware" |
287 |
+ fi |
288 |
+ fi |
289 |
+ |
290 |
+ if use opencl; then |
291 |
+ if ! use video_cards_r600 && |
292 |
+ ! use video_cards_radeonsi; then |
293 |
+ ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" |
294 |
+ fi |
295 |
+ fi |
296 |
+ |
297 |
+ if use vaapi; then |
298 |
+ if ! use video_cards_r600 && |
299 |
+ ! use video_cards_radeonsi && |
300 |
+ ! use video_cards_nouveau; then |
301 |
+ ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" |
302 |
+ fi |
303 |
+ fi |
304 |
+ |
305 |
+ if use vdpau; then |
306 |
+ if ! use video_cards_r300 && |
307 |
+ ! use video_cards_r600 && |
308 |
+ ! use video_cards_radeonsi && |
309 |
+ ! use video_cards_nouveau; then |
310 |
+ ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" |
311 |
+ fi |
312 |
+ fi |
313 |
+ |
314 |
+ if use xa; then |
315 |
+ if ! use video_cards_freedreno && |
316 |
+ ! use video_cards_nouveau && |
317 |
+ ! use video_cards_vmware; then |
318 |
+ ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" |
319 |
+ fi |
320 |
+ fi |
321 |
+ |
322 |
+ if use xvmc; then |
323 |
+ if ! use video_cards_r600 && |
324 |
+ ! use video_cards_nouveau; then |
325 |
+ ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" |
326 |
+ fi |
327 |
+ fi |
328 |
+ |
329 |
+ if ! use gallium; then |
330 |
+ use d3d9 && ewarn "Ignoring USE=d3d9 since USE does not contain gallium" |
331 |
+ use lm_sensors && ewarn "Ignoring USE=lm_sensors since USE does not contain gallium" |
332 |
+ use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" |
333 |
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" |
334 |
+ use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" |
335 |
+ use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" |
336 |
+ use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" |
337 |
+ use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" |
338 |
+ use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" |
339 |
+ fi |
340 |
+ |
341 |
+ if ! use llvm; then |
342 |
+ use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" |
343 |
+ fi |
344 |
+} |
345 |
+ |
346 |
+pkg_setup() { |
347 |
+ # warning message for bug 459306 |
348 |
+ if use llvm && has_version sys-devel/llvm[!debug=]; then |
349 |
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
350 |
+ ewarn "detected! This can cause problems. For details, see bug 459306." |
351 |
+ fi |
352 |
+ |
353 |
+ if use llvm; then |
354 |
+ llvm_pkg_setup |
355 |
+ fi |
356 |
+ python-any-r1_pkg_setup |
357 |
+} |
358 |
+ |
359 |
+multilib_src_configure() { |
360 |
+ local emesonargs=() |
361 |
+ |
362 |
+ if use classic; then |
363 |
+ # Intel code |
364 |
+ dri_driver_enable video_cards_i915 i915 |
365 |
+ dri_driver_enable video_cards_i965 i965 |
366 |
+ if ! use video_cards_i915 && \ |
367 |
+ ! use video_cards_i965; then |
368 |
+ dri_driver_enable video_cards_intel i915 i965 |
369 |
+ fi |
370 |
+ |
371 |
+ # Nouveau code |
372 |
+ dri_driver_enable video_cards_nouveau nouveau |
373 |
+ |
374 |
+ # ATI code |
375 |
+ dri_driver_enable video_cards_r100 r100 |
376 |
+ dri_driver_enable video_cards_r200 r200 |
377 |
+ if ! use video_cards_r100 && \ |
378 |
+ ! use video_cards_r200; then |
379 |
+ dri_driver_enable video_cards_radeon r100 r200 |
380 |
+ fi |
381 |
+ fi |
382 |
+ |
383 |
+ emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") ) |
384 |
+ |
385 |
+ if use gallium; then |
386 |
+ emesonargs+=( |
387 |
+ $(meson_use llvm) |
388 |
+ $(meson_use lm_sensors lmsensors) |
389 |
+ $(meson_use unwind libunwind) |
390 |
+ ) |
391 |
+ |
392 |
+ if use video_cards_r300 || |
393 |
+ use video_cards_r600 || |
394 |
+ use video_cards_radeonsi || |
395 |
+ use video_cards_nouveau || |
396 |
+ use video_cards_vmware; then |
397 |
+ emesonargs+=($(meson_use d3d9 gallium-nine)) |
398 |
+ else |
399 |
+ emesonargs+=(-Dgallium-nine=false) |
400 |
+ fi |
401 |
+ |
402 |
+ if use video_cards_r600 || |
403 |
+ use video_cards_radeonsi || |
404 |
+ use video_cards_nouveau; then |
405 |
+ emesonargs+=($(meson_use vaapi gallium-va)) |
406 |
+ use vaapi && emesonargs+=( -Dva-libs-path=/usr/$(get_libdir)/va/drivers ) |
407 |
+ else |
408 |
+ emesonargs+=(-Dgallium-va=false) |
409 |
+ fi |
410 |
+ |
411 |
+ if use video_cards_r300 || |
412 |
+ use video_cards_r600 || |
413 |
+ use video_cards_radeonsi || |
414 |
+ use video_cards_nouveau; then |
415 |
+ emesonargs+=($(meson_use vdpau gallium-vdpau)) |
416 |
+ else |
417 |
+ emesonargs+=(-Dgallium-vdpau=false) |
418 |
+ fi |
419 |
+ |
420 |
+ if use video_cards_freedreno || |
421 |
+ use video_cards_nouveau || |
422 |
+ use video_cards_vmware; then |
423 |
+ emesonargs+=($(meson_use xa gallium-xa)) |
424 |
+ else |
425 |
+ emesonargs+=(-Dgallium-xa=false) |
426 |
+ fi |
427 |
+ |
428 |
+ if use video_cards_r600 || |
429 |
+ use video_cards_nouveau; then |
430 |
+ emesonargs+=($(meson_use xvmc gallium-xvmc)) |
431 |
+ else |
432 |
+ emesonargs+=(-Dgallium-xvmc=false) |
433 |
+ fi |
434 |
+ |
435 |
+ gallium_enable video_cards_vc4 vc4 |
436 |
+ gallium_enable video_cards_vivante etnaviv |
437 |
+ gallium_enable video_cards_vmware svga |
438 |
+ gallium_enable video_cards_nouveau nouveau |
439 |
+ gallium_enable video_cards_imx imx |
440 |
+ |
441 |
+ # Only one i915 driver (classic vs gallium). Default to classic. |
442 |
+ if ! use classic; then |
443 |
+ gallium_enable video_cards_i915 i915 |
444 |
+ if ! use video_cards_i915 && \ |
445 |
+ ! use video_cards_i965; then |
446 |
+ gallium_enable video_cards_intel i915 |
447 |
+ fi |
448 |
+ fi |
449 |
+ |
450 |
+ gallium_enable video_cards_r300 r300 |
451 |
+ gallium_enable video_cards_r600 r600 |
452 |
+ gallium_enable video_cards_radeonsi radeonsi |
453 |
+ if ! use video_cards_r300 && \ |
454 |
+ ! use video_cards_r600; then |
455 |
+ gallium_enable video_cards_radeon r300 r600 |
456 |
+ fi |
457 |
+ |
458 |
+ gallium_enable video_cards_freedreno freedreno |
459 |
+ gallium_enable video_cards_virgl virgl |
460 |
+ |
461 |
+ # opencl stuff |
462 |
+ emesonargs+=( |
463 |
+ -Dgallium-opencl="$(usex opencl icd disabled)" |
464 |
+ ) |
465 |
+ fi |
466 |
+ |
467 |
+ if use vulkan; then |
468 |
+ vulkan_enable video_cards_i965 intel |
469 |
+ vulkan_enable video_cards_radeonsi amd |
470 |
+ fi |
471 |
+ |
472 |
+ # x86 hardened pax_kernel needs glx-rts, bug 240956 |
473 |
+ if [[ ${ABI} == x86 ]]; then |
474 |
+ emesonargs+=( $(meson_use pax_kernel glx-read-only-text) ) |
475 |
+ fi |
476 |
+ |
477 |
+ # on abi_x86_32 hardened we need to have asm disable |
478 |
+ if [[ ${ABI} == x86* ]] && use pic; then |
479 |
+ emesonargs+=( -Dasm=false ) |
480 |
+ fi |
481 |
+ |
482 |
+ if use gallium; then |
483 |
+ gallium_enable -- swrast |
484 |
+ emesonargs+=( -Dosmesa=$(usex osmesa gallium none) ) |
485 |
+ else |
486 |
+ dri_driver_enable -- swrast |
487 |
+ emesonargs+=( -Dosmesa=$(usex osmesa classic none) ) |
488 |
+ fi |
489 |
+ |
490 |
+ driver_list() { |
491 |
+ local drivers="$(sort -u <<< "${1// /$'\n'}")" |
492 |
+ echo "${drivers//$'\n'/,}" |
493 |
+ } |
494 |
+ |
495 |
+ emesonargs+=( |
496 |
+ $(meson_use test build-tests) |
497 |
+ -Dglx=dri |
498 |
+ -Dshared-glapi=true |
499 |
+ $(meson_use dri3) |
500 |
+ $(meson_use egl) |
501 |
+ $(meson_use gbm) |
502 |
+ $(meson_use gles1) |
503 |
+ $(meson_use gles2) |
504 |
+ $(meson_use selinux) |
505 |
+ -Dvalgrind=$(usex valgrind auto false) |
506 |
+ -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") |
507 |
+ -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") |
508 |
+ -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") |
509 |
+ --buildtype $(usex debug debug plain) |
510 |
+ -Db_ndebug=$(usex debug false true) |
511 |
+ ) |
512 |
+ meson_src_configure |
513 |
+} |
514 |
+ |
515 |
+multilib_src_compile() { |
516 |
+ meson_src_compile |
517 |
+} |
518 |
+ |
519 |
+multilib_src_install() { |
520 |
+ meson_src_install |
521 |
+} |
522 |
+ |
523 |
+multilib_src_install_all() { |
524 |
+ einstalldocs |
525 |
+} |
526 |
+ |
527 |
+multilib_src_test() { |
528 |
+ meson_src_test |
529 |
+} |
530 |
+ |
531 |
+pkg_postinst() { |
532 |
+ # Switch to the xorg implementation. |
533 |
+ echo |
534 |
+ eselect opengl set --use-old ${OPENGL_DIR} |
535 |
+} |
536 |
+ |
537 |
+# $1 - VIDEO_CARDS flag (check skipped for "--") |
538 |
+# other args - names of DRI drivers to enable |
539 |
+dri_driver_enable() { |
540 |
+ if [[ $1 == -- ]] || use $1; then |
541 |
+ shift |
542 |
+ DRI_DRIVERS+=("$@") |
543 |
+ fi |
544 |
+} |
545 |
+ |
546 |
+gallium_enable() { |
547 |
+ if [[ $1 == -- ]] || use $1; then |
548 |
+ shift |
549 |
+ GALLIUM_DRIVERS+=("$@") |
550 |
+ fi |
551 |
+} |
552 |
+ |
553 |
+vulkan_enable() { |
554 |
+ if [[ $1 == -- ]] || use $1; then |
555 |
+ shift |
556 |
+ VULKAN_DRIVERS+=("$@") |
557 |
+ fi |
558 |
+} |