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