1 |
commit: e9a8ac2c6d9c2e90c28f41fae96c6d3affc6e2c3 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 2 21:51:12 2021 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 2 22:01:26 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9a8ac2c |
7 |
|
8 |
media-libs/mesa: Drop old versions |
9 |
|
10 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
11 |
|
12 |
media-libs/mesa/Manifest | 3 - |
13 |
media-libs/mesa/mesa-21.1.1.ebuild | 553 ------------------------------------- |
14 |
media-libs/mesa/mesa-21.1.2.ebuild | 553 ------------------------------------- |
15 |
media-libs/mesa/mesa-21.1.3.ebuild | 553 ------------------------------------- |
16 |
4 files changed, 1662 deletions(-) |
17 |
|
18 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
19 |
index 7babd9d375d..e99a53077b0 100644 |
20 |
--- a/media-libs/mesa/Manifest |
21 |
+++ b/media-libs/mesa/Manifest |
22 |
@@ -1,6 +1,3 @@ |
23 |
DIST mesa-20.3.5.tar.xz 14367412 BLAKE2B 7bad876ce702158e727a752eda6722e7165b497fd3a485dae4e989f22b13288a93f51bcd5e6a69b979f0bbe41599fa237c08f3bbb81cb9c6dc4c06827f8ad5f4 SHA512 481e710ed80d8f215a8d541cfe51b960862c2403c2b9e7e6932c8236b8decb5d478871d6c73559d6d795ada143803764f3a93b2329588c80f62e2e5ec98c78a9 |
24 |
DIST mesa-21.0.3.tar.xz 14710004 BLAKE2B f2165da4487824931d8ff90e4f13624546a297b0d3577d69b7cfd6078a965282b4a732cb720cbb08ea83a3a987603cfe67876fb18022fa444b011fcc9b7df352 SHA512 4a8aee48a8ea7f32e8aa3bbbd91db26c6053b9a43e62ff88256929e6bc147884f0fef988726b5a3d59d7008663f017c746a0352fd3fcc1c476b8190af4a2531f |
25 |
-DIST mesa-21.1.1.tar.xz 15169732 BLAKE2B b2c2f2fa14ebf78baeb64ca976dde2920a594bcea02b3a17820135afc169c8489f37a2869b140d637b11b618c96e37834c255ca7a92d17f70003a11e8fffd401 SHA512 79d0e2b0e1e590e7f36a082df3584010a553af0b3060bd2d3a7ace700ac7a8d1b7734ba67f2e193dd441434eeec74a16e0dbcbf8c15061b5dd5d6a1feca73d62 |
26 |
-DIST mesa-21.1.2.tar.xz 15199892 BLAKE2B 1e1d9e0bee2eec95a38379047c050ba7e4a9ada47bb8d4f1d3faf355ec6f71ad8e792cfaf72234a3c86f254c33618883f772c0f3f7f7f97085a8c7b5a1ad90d0 SHA512 a7907fa29fdb4e137015ee5405b9c8c0769ef9354bbe963c1af80318b398c05c79db6129b583106d620c42a5e9b625611b648fd5207334eb9b588d7963defc70 |
27 |
-DIST mesa-21.1.3.tar.xz 15230376 BLAKE2B 49098dc462a19ded67329556acdf136f249609dae85e8b898f721c34127df17fe816fea90e23a93ca9f86ab1f06f660e787cdb2b01b9caa2cd694c04ee1e2027 SHA512 8ca6d5516035484ea2a63bc6338794003ef167239ab0c220f8d3693f97f9725b46fc9d9a704c4ba11b83197d4b8e5f658d65ef0cce1e0957f5e58bd13726b9e0 |
28 |
DIST mesa-21.1.4.tar.xz 15254812 BLAKE2B 7ec6177ad4fb6f053553b634c9ff03c5d618d0212fd77c2fda8803197bef529c74ccf3c3ae75a810ba1d57862f08405c6df702e41f6cb0fd202833ce7b9efef0 SHA512 1f4e2d8ba2c3c02bad5468687752d7e87d6e79c4a0e6ec4b2741a57fb270d18ae4712aaa07a9e09a2d3348540f5a26cdbe05464cd52adb8df1e2e28a581b2b53 |
29 |
|
30 |
diff --git a/media-libs/mesa/mesa-21.1.1.ebuild b/media-libs/mesa/mesa-21.1.1.ebuild |
31 |
deleted file mode 100644 |
32 |
index b67e6c7e47f..00000000000 |
33 |
--- a/media-libs/mesa/mesa-21.1.1.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,553 +0,0 @@ |
36 |
-# Copyright 1999-2021 Gentoo Authors |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=7 |
40 |
- |
41 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
42 |
- |
43 |
-inherit llvm meson-multilib python-any-r1 linux-info |
44 |
- |
45 |
-OPENGL_DIR="xorg-x11" |
46 |
- |
47 |
-MY_P="${P/_/-}" |
48 |
- |
49 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
50 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
51 |
- |
52 |
-if [[ ${PV} == 9999 ]]; then |
53 |
- EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
54 |
- inherit git-r3 |
55 |
-else |
56 |
- SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz" |
57 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~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 intel iris lima nouveau panfrost v3d 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 |
74 |
- lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan |
75 |
- vulkan-overlay wayland +X xa xvmc zink +zstd" |
76 |
- |
77 |
-REQUIRED_USE=" |
78 |
- d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) |
79 |
- gles1? ( egl ) |
80 |
- gles2? ( egl ) |
81 |
- osmesa? ( gallium ) |
82 |
- vulkan? ( dri3 |
83 |
- video_cards_radeonsi? ( llvm ) ) |
84 |
- vulkan-overlay? ( vulkan ) |
85 |
- wayland? ( egl gbm ) |
86 |
- video_cards_freedreno? ( gallium ) |
87 |
- video_cards_intel? ( classic ) |
88 |
- video_cards_i915? ( || ( classic gallium ) ) |
89 |
- video_cards_i965? ( classic ) |
90 |
- video_cards_iris? ( gallium ) |
91 |
- video_cards_lima? ( gallium ) |
92 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
93 |
- video_cards_panfrost? ( 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_v3d? ( gallium ) |
102 |
- video_cards_vc4? ( gallium ) |
103 |
- video_cards_virgl? ( gallium ) |
104 |
- video_cards_vivante? ( gallium gbm ) |
105 |
- video_cards_vmware? ( gallium ) |
106 |
- xa? ( X ) |
107 |
- xvmc? ( X ) |
108 |
- zink? ( gallium vulkan ) |
109 |
-" |
110 |
- |
111 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.105" |
112 |
-RDEPEND=" |
113 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
114 |
- >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}] |
115 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
116 |
- gallium? ( |
117 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
118 |
- llvm? ( |
119 |
- video_cards_radeonsi? ( |
120 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
121 |
- ) |
122 |
- video_cards_r600? ( |
123 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
124 |
- ) |
125 |
- video_cards_radeon? ( |
126 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
127 |
- ) |
128 |
- ) |
129 |
- lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] ) |
130 |
- opencl? ( |
131 |
- >=virtual/opencl-3[${MULTILIB_USEDEP}] |
132 |
- dev-libs/libclc |
133 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
134 |
- ) |
135 |
- vaapi? ( |
136 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
137 |
- ) |
138 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
139 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
140 |
- ) |
141 |
- selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] ) |
142 |
- wayland? ( |
143 |
- >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}] |
144 |
- >=dev-libs/wayland-protocols-1.8 |
145 |
- ) |
146 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
147 |
- video_cards_intel? ( |
148 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
149 |
- ) |
150 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
151 |
- vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] ) |
152 |
- X? ( |
153 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
154 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
155 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
156 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
157 |
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
158 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
159 |
- ) |
160 |
- zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] ) |
161 |
- zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) |
162 |
-" |
163 |
-for card in ${RADEON_CARDS}; do |
164 |
- RDEPEND="${RDEPEND} |
165 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
166 |
- " |
167 |
-done |
168 |
-RDEPEND="${RDEPEND} |
169 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
170 |
-" |
171 |
- |
172 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
173 |
-# we need to *really* make sure we're not pulling one than more slot |
174 |
-# simultaneously. |
175 |
-# |
176 |
-# How to use it: |
177 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
178 |
-# 2. Update the := to specify *max* version, e.g. < 10. |
179 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 9. |
180 |
-LLVM_MAX_SLOT="12" |
181 |
-LLVM_DEPSTR=" |
182 |
- || ( |
183 |
- sys-devel/llvm:12[${MULTILIB_USEDEP}] |
184 |
- sys-devel/llvm:11[${MULTILIB_USEDEP}] |
185 |
- sys-devel/llvm:10[${MULTILIB_USEDEP}] |
186 |
- ) |
187 |
- <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${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 |
- gallium? ( |
194 |
- llvm? ( |
195 |
- opencl? ( |
196 |
- video_cards_r600? ( |
197 |
- ${CLANG_DEPSTR_AMDGPU} |
198 |
- ) |
199 |
- !video_cards_r600? ( |
200 |
- video_cards_radeonsi? ( |
201 |
- ${CLANG_DEPSTR_AMDGPU} |
202 |
- ) |
203 |
- ) |
204 |
- !video_cards_r600? ( |
205 |
- !video_cards_radeonsi? ( |
206 |
- video_cards_radeon? ( |
207 |
- ${CLANG_DEPSTR_AMDGPU} |
208 |
- ) |
209 |
- ) |
210 |
- ) |
211 |
- !video_cards_r600? ( |
212 |
- !video_cards_radeon? ( |
213 |
- !video_cards_radeonsi? ( |
214 |
- ${CLANG_DEPSTR} |
215 |
- ) |
216 |
- ) |
217 |
- ) |
218 |
- ) |
219 |
- !opencl? ( |
220 |
- video_cards_r600? ( |
221 |
- ${LLVM_DEPSTR_AMDGPU} |
222 |
- ) |
223 |
- !video_cards_r600? ( |
224 |
- video_cards_radeonsi? ( |
225 |
- ${LLVM_DEPSTR_AMDGPU} |
226 |
- ) |
227 |
- ) |
228 |
- !video_cards_r600? ( |
229 |
- !video_cards_radeonsi? ( |
230 |
- video_cards_radeon? ( |
231 |
- ${LLVM_DEPSTR_AMDGPU} |
232 |
- ) |
233 |
- ) |
234 |
- ) |
235 |
- !video_cards_r600? ( |
236 |
- !video_cards_radeon? ( |
237 |
- !video_cards_radeonsi? ( |
238 |
- ${LLVM_DEPSTR} |
239 |
- ) |
240 |
- ) |
241 |
- ) |
242 |
- ) |
243 |
- ) |
244 |
- ) |
245 |
-" |
246 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
247 |
- |
248 |
-DEPEND="${RDEPEND} |
249 |
- valgrind? ( dev-util/valgrind ) |
250 |
- X? ( |
251 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
252 |
- x11-base/xorg-proto |
253 |
- ) |
254 |
-" |
255 |
-BDEPEND=" |
256 |
- ${PYTHON_DEPS} |
257 |
- opencl? ( |
258 |
- >=sys-devel/gcc-4.6 |
259 |
- ) |
260 |
- sys-devel/bison |
261 |
- sys-devel/flex |
262 |
- virtual/pkgconfig |
263 |
- $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") |
264 |
- wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] ) |
265 |
-" |
266 |
- |
267 |
-S="${WORKDIR}/${MY_P}" |
268 |
-EGIT_CHECKOUT_DIR=${S} |
269 |
- |
270 |
-QA_WX_LOAD=" |
271 |
-x86? ( |
272 |
- usr/lib*/libglapi.so.0.0.0 |
273 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
274 |
- usr/lib*/libGLESv2.so.2.0.0 |
275 |
- usr/lib*/libGL.so.1.2.0 |
276 |
- usr/lib*/libOSMesa.so.8.0.0 |
277 |
- usr/lib/libGLX_mesa.so.0.0.0 |
278 |
-)" |
279 |
- |
280 |
-llvm_check_deps() { |
281 |
- local flags=${MULTILIB_USEDEP} |
282 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
283 |
- then |
284 |
- flags+=",llvm_targets_AMDGPU(-)" |
285 |
- fi |
286 |
- |
287 |
- if use opencl; then |
288 |
- has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1 |
289 |
- fi |
290 |
- has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]" |
291 |
-} |
292 |
- |
293 |
-pkg_pretend() { |
294 |
- if use vulkan; then |
295 |
- if ! use video_cards_i965 && |
296 |
- ! use video_cards_iris && |
297 |
- ! use video_cards_radeonsi && |
298 |
- ! use video_cards_v3d; then |
299 |
- ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d" |
300 |
- fi |
301 |
- fi |
302 |
- |
303 |
- if use opencl; then |
304 |
- if ! use video_cards_r600 && |
305 |
- ! use video_cards_radeonsi; then |
306 |
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" |
307 |
- fi |
308 |
- fi |
309 |
- |
310 |
- if use vaapi; then |
311 |
- if ! use video_cards_r600 && |
312 |
- ! use video_cards_radeonsi && |
313 |
- ! use video_cards_nouveau; then |
314 |
- ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" |
315 |
- fi |
316 |
- fi |
317 |
- |
318 |
- if use vdpau; then |
319 |
- if ! use video_cards_r300 && |
320 |
- ! use video_cards_r600 && |
321 |
- ! use video_cards_radeonsi && |
322 |
- ! use video_cards_nouveau; then |
323 |
- ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" |
324 |
- fi |
325 |
- fi |
326 |
- |
327 |
- if use xa; then |
328 |
- if ! use video_cards_freedreno && |
329 |
- ! use video_cards_nouveau && |
330 |
- ! use video_cards_vmware; then |
331 |
- ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" |
332 |
- fi |
333 |
- fi |
334 |
- |
335 |
- if use xvmc; then |
336 |
- if ! use video_cards_r600 && |
337 |
- ! use video_cards_nouveau; then |
338 |
- ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" |
339 |
- fi |
340 |
- fi |
341 |
- |
342 |
- if ! use gallium; then |
343 |
- use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium" |
344 |
- use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" |
345 |
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" |
346 |
- use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" |
347 |
- use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" |
348 |
- use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" |
349 |
- use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" |
350 |
- use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" |
351 |
- fi |
352 |
- |
353 |
- if ! use llvm; then |
354 |
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" |
355 |
- fi |
356 |
- |
357 |
- if use osmesa && ! use llvm; then |
358 |
- ewarn "OSMesa will be slow without enabling USE=llvm" |
359 |
- fi |
360 |
-} |
361 |
- |
362 |
-python_check_deps() { |
363 |
- has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" |
364 |
-} |
365 |
- |
366 |
-pkg_setup() { |
367 |
- # warning message for bug 459306 |
368 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
369 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
370 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
371 |
- fi |
372 |
- |
373 |
- if use video_cards_i965 || |
374 |
- use video_cards_iris || |
375 |
- use video_cards_radeonsi; then |
376 |
- if kernel_is -ge 5 11 3; then |
377 |
- CONFIG_CHECK="~KCMP" |
378 |
- elif kernel_is -ge 5 11; then |
379 |
- CONFIG_CHECK="~CHECKPOINT_RESTORE" |
380 |
- elif kernel_is -ge 5 10 20; then |
381 |
- CONFIG_CHECK="~KCMP" |
382 |
- else |
383 |
- CONFIG_CHECK="~CHECKPOINT_RESTORE" |
384 |
- fi |
385 |
- linux-info_pkg_setup |
386 |
- fi |
387 |
- |
388 |
- if use gallium && use llvm; then |
389 |
- llvm_pkg_setup |
390 |
- fi |
391 |
- python-any-r1_pkg_setup |
392 |
-} |
393 |
- |
394 |
-multilib_src_configure() { |
395 |
- local emesonargs=() |
396 |
- |
397 |
- if use classic; then |
398 |
- # Intel code |
399 |
- dri_driver_enable video_cards_i915 i915 |
400 |
- dri_driver_enable video_cards_i965 i965 |
401 |
- if ! use video_cards_i915 && \ |
402 |
- ! use video_cards_i965; then |
403 |
- dri_driver_enable video_cards_intel i915 i965 |
404 |
- fi |
405 |
- |
406 |
- # Nouveau code |
407 |
- dri_driver_enable video_cards_nouveau nouveau |
408 |
- |
409 |
- # ATI code |
410 |
- dri_driver_enable video_cards_r100 r100 |
411 |
- dri_driver_enable video_cards_r200 r200 |
412 |
- if ! use video_cards_r100 && \ |
413 |
- ! use video_cards_r200; then |
414 |
- dri_driver_enable video_cards_radeon r100 r200 |
415 |
- fi |
416 |
- fi |
417 |
- |
418 |
- local platforms |
419 |
- use X && platforms+="x11" |
420 |
- use wayland && platforms+=",wayland" |
421 |
- emesonargs+=(-Dplatforms=${platforms#,}) |
422 |
- |
423 |
- if use X || use egl; then |
424 |
- emesonargs+=(-Dglvnd=true) |
425 |
- else |
426 |
- emesonargs+=(-Dglvnd=false) |
427 |
- fi |
428 |
- |
429 |
- if use gallium; then |
430 |
- emesonargs+=( |
431 |
- $(meson_feature llvm) |
432 |
- $(meson_feature lm-sensors lmsensors) |
433 |
- $(meson_feature unwind libunwind) |
434 |
- ) |
435 |
- |
436 |
- if use video_cards_iris || |
437 |
- use video_cards_r300 || |
438 |
- use video_cards_r600 || |
439 |
- use video_cards_radeonsi || |
440 |
- use video_cards_nouveau || |
441 |
- use video_cards_vmware; then |
442 |
- emesonargs+=($(meson_use d3d9 gallium-nine)) |
443 |
- else |
444 |
- emesonargs+=(-Dgallium-nine=false) |
445 |
- fi |
446 |
- |
447 |
- if use video_cards_r600 || |
448 |
- use video_cards_radeonsi || |
449 |
- use video_cards_nouveau; then |
450 |
- emesonargs+=($(meson_feature vaapi gallium-va)) |
451 |
- use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) |
452 |
- else |
453 |
- emesonargs+=(-Dgallium-va=disabled) |
454 |
- fi |
455 |
- |
456 |
- if use video_cards_r300 || |
457 |
- use video_cards_r600 || |
458 |
- use video_cards_radeonsi || |
459 |
- use video_cards_nouveau; then |
460 |
- emesonargs+=($(meson_feature vdpau gallium-vdpau)) |
461 |
- else |
462 |
- emesonargs+=(-Dgallium-vdpau=disabled) |
463 |
- fi |
464 |
- |
465 |
- if use video_cards_freedreno || |
466 |
- use video_cards_nouveau || |
467 |
- use video_cards_vmware; then |
468 |
- emesonargs+=($(meson_feature xa gallium-xa)) |
469 |
- else |
470 |
- emesonargs+=(-Dgallium-xa=disabled) |
471 |
- fi |
472 |
- |
473 |
- if use video_cards_r600 || |
474 |
- use video_cards_nouveau; then |
475 |
- emesonargs+=($(meson_feature xvmc gallium-xvmc)) |
476 |
- else |
477 |
- emesonargs+=(-Dgallium-xvmc=disabled) |
478 |
- fi |
479 |
- |
480 |
- if use video_cards_freedreno || |
481 |
- use video_cards_lima || |
482 |
- use video_cards_panfrost || |
483 |
- use video_cards_v3d || |
484 |
- use video_cards_vc4 || |
485 |
- use video_cards_vivante; then |
486 |
- gallium_enable -- kmsro |
487 |
- fi |
488 |
- |
489 |
- gallium_enable -- swrast |
490 |
- gallium_enable video_cards_lima lima |
491 |
- gallium_enable video_cards_panfrost panfrost |
492 |
- gallium_enable video_cards_v3d v3d |
493 |
- gallium_enable video_cards_vc4 vc4 |
494 |
- gallium_enable video_cards_vivante etnaviv |
495 |
- gallium_enable video_cards_vmware svga |
496 |
- gallium_enable video_cards_nouveau nouveau |
497 |
- gallium_enable zink zink |
498 |
- |
499 |
- # Only one i915 driver (classic vs gallium). Default to classic. |
500 |
- if ! use classic; then |
501 |
- gallium_enable video_cards_i915 i915 |
502 |
- if ! use video_cards_i915 && \ |
503 |
- ! use video_cards_i965; then |
504 |
- gallium_enable video_cards_intel i915 |
505 |
- fi |
506 |
- fi |
507 |
- |
508 |
- gallium_enable video_cards_iris iris |
509 |
- |
510 |
- gallium_enable video_cards_r300 r300 |
511 |
- gallium_enable video_cards_r600 r600 |
512 |
- gallium_enable video_cards_radeonsi radeonsi |
513 |
- if ! use video_cards_r300 && \ |
514 |
- ! use video_cards_r600; then |
515 |
- gallium_enable video_cards_radeon r300 r600 |
516 |
- fi |
517 |
- |
518 |
- gallium_enable video_cards_freedreno freedreno |
519 |
- gallium_enable video_cards_virgl virgl |
520 |
- |
521 |
- # opencl stuff |
522 |
- emesonargs+=( |
523 |
- -Dgallium-opencl="$(usex opencl icd disabled)" |
524 |
- ) |
525 |
- fi |
526 |
- |
527 |
- if use vulkan; then |
528 |
- vulkan_enable video_cards_i965 intel |
529 |
- vulkan_enable video_cards_iris intel |
530 |
- vulkan_enable video_cards_radeonsi amd |
531 |
- vulkan_enable video_cards_v3d broadcom |
532 |
- fi |
533 |
- |
534 |
- driver_list() { |
535 |
- local drivers="$(sort -u <<< "${1// /$'\n'}")" |
536 |
- echo "${drivers//$'\n'/,}" |
537 |
- } |
538 |
- |
539 |
- emesonargs+=( |
540 |
- $(meson_use test build-tests) |
541 |
- -Dglx=$(usex X dri disabled) |
542 |
- -Dshared-glapi=enabled |
543 |
- $(meson_feature dri3) |
544 |
- $(meson_feature egl) |
545 |
- $(meson_feature gbm) |
546 |
- $(meson_feature gles1) |
547 |
- $(meson_feature gles2) |
548 |
- $(meson_use osmesa) |
549 |
- $(meson_use selinux) |
550 |
- $(meson_feature zstd) |
551 |
- -Dvalgrind=$(usex valgrind auto false) |
552 |
- -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") |
553 |
- -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") |
554 |
- -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") |
555 |
- $(meson_use vulkan vulkan-device-select-layer) |
556 |
- $(meson_use vulkan-overlay vulkan-overlay-layer) |
557 |
- --buildtype $(usex debug debug plain) |
558 |
- -Db_ndebug=$(usex debug false true) |
559 |
- ) |
560 |
- meson_src_configure |
561 |
-} |
562 |
- |
563 |
-multilib_src_test() { |
564 |
- meson_src_test -t 100 |
565 |
-} |
566 |
- |
567 |
-# $1 - VIDEO_CARDS flag (check skipped for "--") |
568 |
-# other args - names of DRI drivers to enable |
569 |
-dri_driver_enable() { |
570 |
- if [[ $1 == -- ]] || use $1; then |
571 |
- shift |
572 |
- DRI_DRIVERS+=("$@") |
573 |
- fi |
574 |
-} |
575 |
- |
576 |
-gallium_enable() { |
577 |
- if [[ $1 == -- ]] || use $1; then |
578 |
- shift |
579 |
- GALLIUM_DRIVERS+=("$@") |
580 |
- fi |
581 |
-} |
582 |
- |
583 |
-vulkan_enable() { |
584 |
- if [[ $1 == -- ]] || use $1; then |
585 |
- shift |
586 |
- VULKAN_DRIVERS+=("$@") |
587 |
- fi |
588 |
-} |
589 |
|
590 |
diff --git a/media-libs/mesa/mesa-21.1.2.ebuild b/media-libs/mesa/mesa-21.1.2.ebuild |
591 |
deleted file mode 100644 |
592 |
index b67e6c7e47f..00000000000 |
593 |
--- a/media-libs/mesa/mesa-21.1.2.ebuild |
594 |
+++ /dev/null |
595 |
@@ -1,553 +0,0 @@ |
596 |
-# Copyright 1999-2021 Gentoo Authors |
597 |
-# Distributed under the terms of the GNU General Public License v2 |
598 |
- |
599 |
-EAPI=7 |
600 |
- |
601 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
602 |
- |
603 |
-inherit llvm meson-multilib python-any-r1 linux-info |
604 |
- |
605 |
-OPENGL_DIR="xorg-x11" |
606 |
- |
607 |
-MY_P="${P/_/-}" |
608 |
- |
609 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
610 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
611 |
- |
612 |
-if [[ ${PV} == 9999 ]]; then |
613 |
- EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
614 |
- inherit git-r3 |
615 |
-else |
616 |
- SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz" |
617 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
618 |
-fi |
619 |
- |
620 |
-LICENSE="MIT" |
621 |
-SLOT="0" |
622 |
-RESTRICT=" |
623 |
- !test? ( test ) |
624 |
-" |
625 |
- |
626 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
627 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware" |
628 |
-for card in ${VIDEO_CARDS}; do |
629 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
630 |
-done |
631 |
- |
632 |
-IUSE="${IUSE_VIDEO_CARDS} |
633 |
- +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +llvm |
634 |
- lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan |
635 |
- vulkan-overlay wayland +X xa xvmc zink +zstd" |
636 |
- |
637 |
-REQUIRED_USE=" |
638 |
- d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) |
639 |
- gles1? ( egl ) |
640 |
- gles2? ( egl ) |
641 |
- osmesa? ( gallium ) |
642 |
- vulkan? ( dri3 |
643 |
- video_cards_radeonsi? ( llvm ) ) |
644 |
- vulkan-overlay? ( vulkan ) |
645 |
- wayland? ( egl gbm ) |
646 |
- video_cards_freedreno? ( gallium ) |
647 |
- video_cards_intel? ( classic ) |
648 |
- video_cards_i915? ( || ( classic gallium ) ) |
649 |
- video_cards_i965? ( classic ) |
650 |
- video_cards_iris? ( gallium ) |
651 |
- video_cards_lima? ( gallium ) |
652 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
653 |
- video_cards_panfrost? ( gallium ) |
654 |
- video_cards_radeon? ( || ( classic gallium ) |
655 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
656 |
- video_cards_r100? ( classic ) |
657 |
- video_cards_r200? ( classic ) |
658 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
659 |
- video_cards_r600? ( gallium ) |
660 |
- video_cards_radeonsi? ( gallium llvm ) |
661 |
- video_cards_v3d? ( gallium ) |
662 |
- video_cards_vc4? ( gallium ) |
663 |
- video_cards_virgl? ( gallium ) |
664 |
- video_cards_vivante? ( gallium gbm ) |
665 |
- video_cards_vmware? ( gallium ) |
666 |
- xa? ( X ) |
667 |
- xvmc? ( X ) |
668 |
- zink? ( gallium vulkan ) |
669 |
-" |
670 |
- |
671 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.105" |
672 |
-RDEPEND=" |
673 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
674 |
- >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}] |
675 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
676 |
- gallium? ( |
677 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
678 |
- llvm? ( |
679 |
- video_cards_radeonsi? ( |
680 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
681 |
- ) |
682 |
- video_cards_r600? ( |
683 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
684 |
- ) |
685 |
- video_cards_radeon? ( |
686 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
687 |
- ) |
688 |
- ) |
689 |
- lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] ) |
690 |
- opencl? ( |
691 |
- >=virtual/opencl-3[${MULTILIB_USEDEP}] |
692 |
- dev-libs/libclc |
693 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
694 |
- ) |
695 |
- vaapi? ( |
696 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
697 |
- ) |
698 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
699 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
700 |
- ) |
701 |
- selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] ) |
702 |
- wayland? ( |
703 |
- >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}] |
704 |
- >=dev-libs/wayland-protocols-1.8 |
705 |
- ) |
706 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
707 |
- video_cards_intel? ( |
708 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
709 |
- ) |
710 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
711 |
- vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] ) |
712 |
- X? ( |
713 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
714 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
715 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
716 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
717 |
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
718 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
719 |
- ) |
720 |
- zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] ) |
721 |
- zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) |
722 |
-" |
723 |
-for card in ${RADEON_CARDS}; do |
724 |
- RDEPEND="${RDEPEND} |
725 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
726 |
- " |
727 |
-done |
728 |
-RDEPEND="${RDEPEND} |
729 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
730 |
-" |
731 |
- |
732 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
733 |
-# we need to *really* make sure we're not pulling one than more slot |
734 |
-# simultaneously. |
735 |
-# |
736 |
-# How to use it: |
737 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
738 |
-# 2. Update the := to specify *max* version, e.g. < 10. |
739 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 9. |
740 |
-LLVM_MAX_SLOT="12" |
741 |
-LLVM_DEPSTR=" |
742 |
- || ( |
743 |
- sys-devel/llvm:12[${MULTILIB_USEDEP}] |
744 |
- sys-devel/llvm:11[${MULTILIB_USEDEP}] |
745 |
- sys-devel/llvm:10[${MULTILIB_USEDEP}] |
746 |
- ) |
747 |
- <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}] |
748 |
-" |
749 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
750 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
751 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
752 |
-RDEPEND="${RDEPEND} |
753 |
- gallium? ( |
754 |
- llvm? ( |
755 |
- opencl? ( |
756 |
- video_cards_r600? ( |
757 |
- ${CLANG_DEPSTR_AMDGPU} |
758 |
- ) |
759 |
- !video_cards_r600? ( |
760 |
- video_cards_radeonsi? ( |
761 |
- ${CLANG_DEPSTR_AMDGPU} |
762 |
- ) |
763 |
- ) |
764 |
- !video_cards_r600? ( |
765 |
- !video_cards_radeonsi? ( |
766 |
- video_cards_radeon? ( |
767 |
- ${CLANG_DEPSTR_AMDGPU} |
768 |
- ) |
769 |
- ) |
770 |
- ) |
771 |
- !video_cards_r600? ( |
772 |
- !video_cards_radeon? ( |
773 |
- !video_cards_radeonsi? ( |
774 |
- ${CLANG_DEPSTR} |
775 |
- ) |
776 |
- ) |
777 |
- ) |
778 |
- ) |
779 |
- !opencl? ( |
780 |
- video_cards_r600? ( |
781 |
- ${LLVM_DEPSTR_AMDGPU} |
782 |
- ) |
783 |
- !video_cards_r600? ( |
784 |
- video_cards_radeonsi? ( |
785 |
- ${LLVM_DEPSTR_AMDGPU} |
786 |
- ) |
787 |
- ) |
788 |
- !video_cards_r600? ( |
789 |
- !video_cards_radeonsi? ( |
790 |
- video_cards_radeon? ( |
791 |
- ${LLVM_DEPSTR_AMDGPU} |
792 |
- ) |
793 |
- ) |
794 |
- ) |
795 |
- !video_cards_r600? ( |
796 |
- !video_cards_radeon? ( |
797 |
- !video_cards_radeonsi? ( |
798 |
- ${LLVM_DEPSTR} |
799 |
- ) |
800 |
- ) |
801 |
- ) |
802 |
- ) |
803 |
- ) |
804 |
- ) |
805 |
-" |
806 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
807 |
- |
808 |
-DEPEND="${RDEPEND} |
809 |
- valgrind? ( dev-util/valgrind ) |
810 |
- X? ( |
811 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
812 |
- x11-base/xorg-proto |
813 |
- ) |
814 |
-" |
815 |
-BDEPEND=" |
816 |
- ${PYTHON_DEPS} |
817 |
- opencl? ( |
818 |
- >=sys-devel/gcc-4.6 |
819 |
- ) |
820 |
- sys-devel/bison |
821 |
- sys-devel/flex |
822 |
- virtual/pkgconfig |
823 |
- $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") |
824 |
- wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] ) |
825 |
-" |
826 |
- |
827 |
-S="${WORKDIR}/${MY_P}" |
828 |
-EGIT_CHECKOUT_DIR=${S} |
829 |
- |
830 |
-QA_WX_LOAD=" |
831 |
-x86? ( |
832 |
- usr/lib*/libglapi.so.0.0.0 |
833 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
834 |
- usr/lib*/libGLESv2.so.2.0.0 |
835 |
- usr/lib*/libGL.so.1.2.0 |
836 |
- usr/lib*/libOSMesa.so.8.0.0 |
837 |
- usr/lib/libGLX_mesa.so.0.0.0 |
838 |
-)" |
839 |
- |
840 |
-llvm_check_deps() { |
841 |
- local flags=${MULTILIB_USEDEP} |
842 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
843 |
- then |
844 |
- flags+=",llvm_targets_AMDGPU(-)" |
845 |
- fi |
846 |
- |
847 |
- if use opencl; then |
848 |
- has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1 |
849 |
- fi |
850 |
- has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]" |
851 |
-} |
852 |
- |
853 |
-pkg_pretend() { |
854 |
- if use vulkan; then |
855 |
- if ! use video_cards_i965 && |
856 |
- ! use video_cards_iris && |
857 |
- ! use video_cards_radeonsi && |
858 |
- ! use video_cards_v3d; then |
859 |
- ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d" |
860 |
- fi |
861 |
- fi |
862 |
- |
863 |
- if use opencl; then |
864 |
- if ! use video_cards_r600 && |
865 |
- ! use video_cards_radeonsi; then |
866 |
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" |
867 |
- fi |
868 |
- fi |
869 |
- |
870 |
- if use vaapi; then |
871 |
- if ! use video_cards_r600 && |
872 |
- ! use video_cards_radeonsi && |
873 |
- ! use video_cards_nouveau; then |
874 |
- ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" |
875 |
- fi |
876 |
- fi |
877 |
- |
878 |
- if use vdpau; then |
879 |
- if ! use video_cards_r300 && |
880 |
- ! use video_cards_r600 && |
881 |
- ! use video_cards_radeonsi && |
882 |
- ! use video_cards_nouveau; then |
883 |
- ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" |
884 |
- fi |
885 |
- fi |
886 |
- |
887 |
- if use xa; then |
888 |
- if ! use video_cards_freedreno && |
889 |
- ! use video_cards_nouveau && |
890 |
- ! use video_cards_vmware; then |
891 |
- ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" |
892 |
- fi |
893 |
- fi |
894 |
- |
895 |
- if use xvmc; then |
896 |
- if ! use video_cards_r600 && |
897 |
- ! use video_cards_nouveau; then |
898 |
- ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" |
899 |
- fi |
900 |
- fi |
901 |
- |
902 |
- if ! use gallium; then |
903 |
- use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium" |
904 |
- use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" |
905 |
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" |
906 |
- use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" |
907 |
- use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" |
908 |
- use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" |
909 |
- use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" |
910 |
- use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" |
911 |
- fi |
912 |
- |
913 |
- if ! use llvm; then |
914 |
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" |
915 |
- fi |
916 |
- |
917 |
- if use osmesa && ! use llvm; then |
918 |
- ewarn "OSMesa will be slow without enabling USE=llvm" |
919 |
- fi |
920 |
-} |
921 |
- |
922 |
-python_check_deps() { |
923 |
- has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" |
924 |
-} |
925 |
- |
926 |
-pkg_setup() { |
927 |
- # warning message for bug 459306 |
928 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
929 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
930 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
931 |
- fi |
932 |
- |
933 |
- if use video_cards_i965 || |
934 |
- use video_cards_iris || |
935 |
- use video_cards_radeonsi; then |
936 |
- if kernel_is -ge 5 11 3; then |
937 |
- CONFIG_CHECK="~KCMP" |
938 |
- elif kernel_is -ge 5 11; then |
939 |
- CONFIG_CHECK="~CHECKPOINT_RESTORE" |
940 |
- elif kernel_is -ge 5 10 20; then |
941 |
- CONFIG_CHECK="~KCMP" |
942 |
- else |
943 |
- CONFIG_CHECK="~CHECKPOINT_RESTORE" |
944 |
- fi |
945 |
- linux-info_pkg_setup |
946 |
- fi |
947 |
- |
948 |
- if use gallium && use llvm; then |
949 |
- llvm_pkg_setup |
950 |
- fi |
951 |
- python-any-r1_pkg_setup |
952 |
-} |
953 |
- |
954 |
-multilib_src_configure() { |
955 |
- local emesonargs=() |
956 |
- |
957 |
- if use classic; then |
958 |
- # Intel code |
959 |
- dri_driver_enable video_cards_i915 i915 |
960 |
- dri_driver_enable video_cards_i965 i965 |
961 |
- if ! use video_cards_i915 && \ |
962 |
- ! use video_cards_i965; then |
963 |
- dri_driver_enable video_cards_intel i915 i965 |
964 |
- fi |
965 |
- |
966 |
- # Nouveau code |
967 |
- dri_driver_enable video_cards_nouveau nouveau |
968 |
- |
969 |
- # ATI code |
970 |
- dri_driver_enable video_cards_r100 r100 |
971 |
- dri_driver_enable video_cards_r200 r200 |
972 |
- if ! use video_cards_r100 && \ |
973 |
- ! use video_cards_r200; then |
974 |
- dri_driver_enable video_cards_radeon r100 r200 |
975 |
- fi |
976 |
- fi |
977 |
- |
978 |
- local platforms |
979 |
- use X && platforms+="x11" |
980 |
- use wayland && platforms+=",wayland" |
981 |
- emesonargs+=(-Dplatforms=${platforms#,}) |
982 |
- |
983 |
- if use X || use egl; then |
984 |
- emesonargs+=(-Dglvnd=true) |
985 |
- else |
986 |
- emesonargs+=(-Dglvnd=false) |
987 |
- fi |
988 |
- |
989 |
- if use gallium; then |
990 |
- emesonargs+=( |
991 |
- $(meson_feature llvm) |
992 |
- $(meson_feature lm-sensors lmsensors) |
993 |
- $(meson_feature unwind libunwind) |
994 |
- ) |
995 |
- |
996 |
- if use video_cards_iris || |
997 |
- use video_cards_r300 || |
998 |
- use video_cards_r600 || |
999 |
- use video_cards_radeonsi || |
1000 |
- use video_cards_nouveau || |
1001 |
- use video_cards_vmware; then |
1002 |
- emesonargs+=($(meson_use d3d9 gallium-nine)) |
1003 |
- else |
1004 |
- emesonargs+=(-Dgallium-nine=false) |
1005 |
- fi |
1006 |
- |
1007 |
- if use video_cards_r600 || |
1008 |
- use video_cards_radeonsi || |
1009 |
- use video_cards_nouveau; then |
1010 |
- emesonargs+=($(meson_feature vaapi gallium-va)) |
1011 |
- use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) |
1012 |
- else |
1013 |
- emesonargs+=(-Dgallium-va=disabled) |
1014 |
- fi |
1015 |
- |
1016 |
- if use video_cards_r300 || |
1017 |
- use video_cards_r600 || |
1018 |
- use video_cards_radeonsi || |
1019 |
- use video_cards_nouveau; then |
1020 |
- emesonargs+=($(meson_feature vdpau gallium-vdpau)) |
1021 |
- else |
1022 |
- emesonargs+=(-Dgallium-vdpau=disabled) |
1023 |
- fi |
1024 |
- |
1025 |
- if use video_cards_freedreno || |
1026 |
- use video_cards_nouveau || |
1027 |
- use video_cards_vmware; then |
1028 |
- emesonargs+=($(meson_feature xa gallium-xa)) |
1029 |
- else |
1030 |
- emesonargs+=(-Dgallium-xa=disabled) |
1031 |
- fi |
1032 |
- |
1033 |
- if use video_cards_r600 || |
1034 |
- use video_cards_nouveau; then |
1035 |
- emesonargs+=($(meson_feature xvmc gallium-xvmc)) |
1036 |
- else |
1037 |
- emesonargs+=(-Dgallium-xvmc=disabled) |
1038 |
- fi |
1039 |
- |
1040 |
- if use video_cards_freedreno || |
1041 |
- use video_cards_lima || |
1042 |
- use video_cards_panfrost || |
1043 |
- use video_cards_v3d || |
1044 |
- use video_cards_vc4 || |
1045 |
- use video_cards_vivante; then |
1046 |
- gallium_enable -- kmsro |
1047 |
- fi |
1048 |
- |
1049 |
- gallium_enable -- swrast |
1050 |
- gallium_enable video_cards_lima lima |
1051 |
- gallium_enable video_cards_panfrost panfrost |
1052 |
- gallium_enable video_cards_v3d v3d |
1053 |
- gallium_enable video_cards_vc4 vc4 |
1054 |
- gallium_enable video_cards_vivante etnaviv |
1055 |
- gallium_enable video_cards_vmware svga |
1056 |
- gallium_enable video_cards_nouveau nouveau |
1057 |
- gallium_enable zink zink |
1058 |
- |
1059 |
- # Only one i915 driver (classic vs gallium). Default to classic. |
1060 |
- if ! use classic; then |
1061 |
- gallium_enable video_cards_i915 i915 |
1062 |
- if ! use video_cards_i915 && \ |
1063 |
- ! use video_cards_i965; then |
1064 |
- gallium_enable video_cards_intel i915 |
1065 |
- fi |
1066 |
- fi |
1067 |
- |
1068 |
- gallium_enable video_cards_iris iris |
1069 |
- |
1070 |
- gallium_enable video_cards_r300 r300 |
1071 |
- gallium_enable video_cards_r600 r600 |
1072 |
- gallium_enable video_cards_radeonsi radeonsi |
1073 |
- if ! use video_cards_r300 && \ |
1074 |
- ! use video_cards_r600; then |
1075 |
- gallium_enable video_cards_radeon r300 r600 |
1076 |
- fi |
1077 |
- |
1078 |
- gallium_enable video_cards_freedreno freedreno |
1079 |
- gallium_enable video_cards_virgl virgl |
1080 |
- |
1081 |
- # opencl stuff |
1082 |
- emesonargs+=( |
1083 |
- -Dgallium-opencl="$(usex opencl icd disabled)" |
1084 |
- ) |
1085 |
- fi |
1086 |
- |
1087 |
- if use vulkan; then |
1088 |
- vulkan_enable video_cards_i965 intel |
1089 |
- vulkan_enable video_cards_iris intel |
1090 |
- vulkan_enable video_cards_radeonsi amd |
1091 |
- vulkan_enable video_cards_v3d broadcom |
1092 |
- fi |
1093 |
- |
1094 |
- driver_list() { |
1095 |
- local drivers="$(sort -u <<< "${1// /$'\n'}")" |
1096 |
- echo "${drivers//$'\n'/,}" |
1097 |
- } |
1098 |
- |
1099 |
- emesonargs+=( |
1100 |
- $(meson_use test build-tests) |
1101 |
- -Dglx=$(usex X dri disabled) |
1102 |
- -Dshared-glapi=enabled |
1103 |
- $(meson_feature dri3) |
1104 |
- $(meson_feature egl) |
1105 |
- $(meson_feature gbm) |
1106 |
- $(meson_feature gles1) |
1107 |
- $(meson_feature gles2) |
1108 |
- $(meson_use osmesa) |
1109 |
- $(meson_use selinux) |
1110 |
- $(meson_feature zstd) |
1111 |
- -Dvalgrind=$(usex valgrind auto false) |
1112 |
- -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") |
1113 |
- -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") |
1114 |
- -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") |
1115 |
- $(meson_use vulkan vulkan-device-select-layer) |
1116 |
- $(meson_use vulkan-overlay vulkan-overlay-layer) |
1117 |
- --buildtype $(usex debug debug plain) |
1118 |
- -Db_ndebug=$(usex debug false true) |
1119 |
- ) |
1120 |
- meson_src_configure |
1121 |
-} |
1122 |
- |
1123 |
-multilib_src_test() { |
1124 |
- meson_src_test -t 100 |
1125 |
-} |
1126 |
- |
1127 |
-# $1 - VIDEO_CARDS flag (check skipped for "--") |
1128 |
-# other args - names of DRI drivers to enable |
1129 |
-dri_driver_enable() { |
1130 |
- if [[ $1 == -- ]] || use $1; then |
1131 |
- shift |
1132 |
- DRI_DRIVERS+=("$@") |
1133 |
- fi |
1134 |
-} |
1135 |
- |
1136 |
-gallium_enable() { |
1137 |
- if [[ $1 == -- ]] || use $1; then |
1138 |
- shift |
1139 |
- GALLIUM_DRIVERS+=("$@") |
1140 |
- fi |
1141 |
-} |
1142 |
- |
1143 |
-vulkan_enable() { |
1144 |
- if [[ $1 == -- ]] || use $1; then |
1145 |
- shift |
1146 |
- VULKAN_DRIVERS+=("$@") |
1147 |
- fi |
1148 |
-} |
1149 |
|
1150 |
diff --git a/media-libs/mesa/mesa-21.1.3.ebuild b/media-libs/mesa/mesa-21.1.3.ebuild |
1151 |
deleted file mode 100644 |
1152 |
index b67e6c7e47f..00000000000 |
1153 |
--- a/media-libs/mesa/mesa-21.1.3.ebuild |
1154 |
+++ /dev/null |
1155 |
@@ -1,553 +0,0 @@ |
1156 |
-# Copyright 1999-2021 Gentoo Authors |
1157 |
-# Distributed under the terms of the GNU General Public License v2 |
1158 |
- |
1159 |
-EAPI=7 |
1160 |
- |
1161 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
1162 |
- |
1163 |
-inherit llvm meson-multilib python-any-r1 linux-info |
1164 |
- |
1165 |
-OPENGL_DIR="xorg-x11" |
1166 |
- |
1167 |
-MY_P="${P/_/-}" |
1168 |
- |
1169 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
1170 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
1171 |
- |
1172 |
-if [[ ${PV} == 9999 ]]; then |
1173 |
- EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
1174 |
- inherit git-r3 |
1175 |
-else |
1176 |
- SRC_URI="https://archive.mesa3d.org/${MY_P}.tar.xz" |
1177 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
1178 |
-fi |
1179 |
- |
1180 |
-LICENSE="MIT" |
1181 |
-SLOT="0" |
1182 |
-RESTRICT=" |
1183 |
- !test? ( test ) |
1184 |
-" |
1185 |
- |
1186 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
1187 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware" |
1188 |
-for card in ${VIDEO_CARDS}; do |
1189 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
1190 |
-done |
1191 |
- |
1192 |
-IUSE="${IUSE_VIDEO_CARDS} |
1193 |
- +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 +gles2 +llvm |
1194 |
- lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan |
1195 |
- vulkan-overlay wayland +X xa xvmc zink +zstd" |
1196 |
- |
1197 |
-REQUIRED_USE=" |
1198 |
- d3d9? ( dri3 || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) ) |
1199 |
- gles1? ( egl ) |
1200 |
- gles2? ( egl ) |
1201 |
- osmesa? ( gallium ) |
1202 |
- vulkan? ( dri3 |
1203 |
- video_cards_radeonsi? ( llvm ) ) |
1204 |
- vulkan-overlay? ( vulkan ) |
1205 |
- wayland? ( egl gbm ) |
1206 |
- video_cards_freedreno? ( gallium ) |
1207 |
- video_cards_intel? ( classic ) |
1208 |
- video_cards_i915? ( || ( classic gallium ) ) |
1209 |
- video_cards_i965? ( classic ) |
1210 |
- video_cards_iris? ( gallium ) |
1211 |
- video_cards_lima? ( gallium ) |
1212 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
1213 |
- video_cards_panfrost? ( gallium ) |
1214 |
- video_cards_radeon? ( || ( classic gallium ) |
1215 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
1216 |
- video_cards_r100? ( classic ) |
1217 |
- video_cards_r200? ( classic ) |
1218 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
1219 |
- video_cards_r600? ( gallium ) |
1220 |
- video_cards_radeonsi? ( gallium llvm ) |
1221 |
- video_cards_v3d? ( gallium ) |
1222 |
- video_cards_vc4? ( gallium ) |
1223 |
- video_cards_virgl? ( gallium ) |
1224 |
- video_cards_vivante? ( gallium gbm ) |
1225 |
- video_cards_vmware? ( gallium ) |
1226 |
- xa? ( X ) |
1227 |
- xvmc? ( X ) |
1228 |
- zink? ( gallium vulkan ) |
1229 |
-" |
1230 |
- |
1231 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.105" |
1232 |
-RDEPEND=" |
1233 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
1234 |
- >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}] |
1235 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
1236 |
- gallium? ( |
1237 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
1238 |
- llvm? ( |
1239 |
- video_cards_radeonsi? ( |
1240 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1241 |
- ) |
1242 |
- video_cards_r600? ( |
1243 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1244 |
- ) |
1245 |
- video_cards_radeon? ( |
1246 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1247 |
- ) |
1248 |
- ) |
1249 |
- lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] ) |
1250 |
- opencl? ( |
1251 |
- >=virtual/opencl-3[${MULTILIB_USEDEP}] |
1252 |
- dev-libs/libclc |
1253 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1254 |
- ) |
1255 |
- vaapi? ( |
1256 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
1257 |
- ) |
1258 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
1259 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
1260 |
- ) |
1261 |
- selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] ) |
1262 |
- wayland? ( |
1263 |
- >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}] |
1264 |
- >=dev-libs/wayland-protocols-1.8 |
1265 |
- ) |
1266 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
1267 |
- video_cards_intel? ( |
1268 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1269 |
- ) |
1270 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1271 |
- vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] ) |
1272 |
- X? ( |
1273 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
1274 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
1275 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
1276 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
1277 |
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
1278 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
1279 |
- ) |
1280 |
- zink? ( media-libs/vulkan-loader:=[${MULTILIB_USEDEP}] ) |
1281 |
- zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] ) |
1282 |
-" |
1283 |
-for card in ${RADEON_CARDS}; do |
1284 |
- RDEPEND="${RDEPEND} |
1285 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
1286 |
- " |
1287 |
-done |
1288 |
-RDEPEND="${RDEPEND} |
1289 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
1290 |
-" |
1291 |
- |
1292 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
1293 |
-# we need to *really* make sure we're not pulling one than more slot |
1294 |
-# simultaneously. |
1295 |
-# |
1296 |
-# How to use it: |
1297 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
1298 |
-# 2. Update the := to specify *max* version, e.g. < 10. |
1299 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 9. |
1300 |
-LLVM_MAX_SLOT="12" |
1301 |
-LLVM_DEPSTR=" |
1302 |
- || ( |
1303 |
- sys-devel/llvm:12[${MULTILIB_USEDEP}] |
1304 |
- sys-devel/llvm:11[${MULTILIB_USEDEP}] |
1305 |
- sys-devel/llvm:10[${MULTILIB_USEDEP}] |
1306 |
- ) |
1307 |
- <sys-devel/llvm-$((LLVM_MAX_SLOT + 1)):=[${MULTILIB_USEDEP}] |
1308 |
-" |
1309 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
1310 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
1311 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
1312 |
-RDEPEND="${RDEPEND} |
1313 |
- gallium? ( |
1314 |
- llvm? ( |
1315 |
- opencl? ( |
1316 |
- video_cards_r600? ( |
1317 |
- ${CLANG_DEPSTR_AMDGPU} |
1318 |
- ) |
1319 |
- !video_cards_r600? ( |
1320 |
- video_cards_radeonsi? ( |
1321 |
- ${CLANG_DEPSTR_AMDGPU} |
1322 |
- ) |
1323 |
- ) |
1324 |
- !video_cards_r600? ( |
1325 |
- !video_cards_radeonsi? ( |
1326 |
- video_cards_radeon? ( |
1327 |
- ${CLANG_DEPSTR_AMDGPU} |
1328 |
- ) |
1329 |
- ) |
1330 |
- ) |
1331 |
- !video_cards_r600? ( |
1332 |
- !video_cards_radeon? ( |
1333 |
- !video_cards_radeonsi? ( |
1334 |
- ${CLANG_DEPSTR} |
1335 |
- ) |
1336 |
- ) |
1337 |
- ) |
1338 |
- ) |
1339 |
- !opencl? ( |
1340 |
- video_cards_r600? ( |
1341 |
- ${LLVM_DEPSTR_AMDGPU} |
1342 |
- ) |
1343 |
- !video_cards_r600? ( |
1344 |
- video_cards_radeonsi? ( |
1345 |
- ${LLVM_DEPSTR_AMDGPU} |
1346 |
- ) |
1347 |
- ) |
1348 |
- !video_cards_r600? ( |
1349 |
- !video_cards_radeonsi? ( |
1350 |
- video_cards_radeon? ( |
1351 |
- ${LLVM_DEPSTR_AMDGPU} |
1352 |
- ) |
1353 |
- ) |
1354 |
- ) |
1355 |
- !video_cards_r600? ( |
1356 |
- !video_cards_radeon? ( |
1357 |
- !video_cards_radeonsi? ( |
1358 |
- ${LLVM_DEPSTR} |
1359 |
- ) |
1360 |
- ) |
1361 |
- ) |
1362 |
- ) |
1363 |
- ) |
1364 |
- ) |
1365 |
-" |
1366 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
1367 |
- |
1368 |
-DEPEND="${RDEPEND} |
1369 |
- valgrind? ( dev-util/valgrind ) |
1370 |
- X? ( |
1371 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
1372 |
- x11-base/xorg-proto |
1373 |
- ) |
1374 |
-" |
1375 |
-BDEPEND=" |
1376 |
- ${PYTHON_DEPS} |
1377 |
- opencl? ( |
1378 |
- >=sys-devel/gcc-4.6 |
1379 |
- ) |
1380 |
- sys-devel/bison |
1381 |
- sys-devel/flex |
1382 |
- virtual/pkgconfig |
1383 |
- $(python_gen_any_dep ">=dev-python/mako-0.8.0[\${PYTHON_USEDEP}]") |
1384 |
- wayland? ( dev-util/wayland-scanner[${MULTILIB_USEDEP}] ) |
1385 |
-" |
1386 |
- |
1387 |
-S="${WORKDIR}/${MY_P}" |
1388 |
-EGIT_CHECKOUT_DIR=${S} |
1389 |
- |
1390 |
-QA_WX_LOAD=" |
1391 |
-x86? ( |
1392 |
- usr/lib*/libglapi.so.0.0.0 |
1393 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
1394 |
- usr/lib*/libGLESv2.so.2.0.0 |
1395 |
- usr/lib*/libGL.so.1.2.0 |
1396 |
- usr/lib*/libOSMesa.so.8.0.0 |
1397 |
- usr/lib/libGLX_mesa.so.0.0.0 |
1398 |
-)" |
1399 |
- |
1400 |
-llvm_check_deps() { |
1401 |
- local flags=${MULTILIB_USEDEP} |
1402 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
1403 |
- then |
1404 |
- flags+=",llvm_targets_AMDGPU(-)" |
1405 |
- fi |
1406 |
- |
1407 |
- if use opencl; then |
1408 |
- has_version "sys-devel/clang:${LLVM_SLOT}[${flags}]" || return 1 |
1409 |
- fi |
1410 |
- has_version "sys-devel/llvm:${LLVM_SLOT}[${flags}]" |
1411 |
-} |
1412 |
- |
1413 |
-pkg_pretend() { |
1414 |
- if use vulkan; then |
1415 |
- if ! use video_cards_i965 && |
1416 |
- ! use video_cards_iris && |
1417 |
- ! use video_cards_radeonsi && |
1418 |
- ! use video_cards_v3d; then |
1419 |
- ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain i965, iris, radeonsi, or v3d" |
1420 |
- fi |
1421 |
- fi |
1422 |
- |
1423 |
- if use opencl; then |
1424 |
- if ! use video_cards_r600 && |
1425 |
- ! use video_cards_radeonsi; then |
1426 |
- ewarn "Ignoring USE=opencl since VIDEO_CARDS does not contain r600 or radeonsi" |
1427 |
- fi |
1428 |
- fi |
1429 |
- |
1430 |
- if use vaapi; then |
1431 |
- if ! use video_cards_r600 && |
1432 |
- ! use video_cards_radeonsi && |
1433 |
- ! use video_cards_nouveau; then |
1434 |
- ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" |
1435 |
- fi |
1436 |
- fi |
1437 |
- |
1438 |
- if use vdpau; then |
1439 |
- if ! use video_cards_r300 && |
1440 |
- ! use video_cards_r600 && |
1441 |
- ! use video_cards_radeonsi && |
1442 |
- ! use video_cards_nouveau; then |
1443 |
- ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" |
1444 |
- fi |
1445 |
- fi |
1446 |
- |
1447 |
- if use xa; then |
1448 |
- if ! use video_cards_freedreno && |
1449 |
- ! use video_cards_nouveau && |
1450 |
- ! use video_cards_vmware; then |
1451 |
- ewarn "Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware" |
1452 |
- fi |
1453 |
- fi |
1454 |
- |
1455 |
- if use xvmc; then |
1456 |
- if ! use video_cards_r600 && |
1457 |
- ! use video_cards_nouveau; then |
1458 |
- ewarn "Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau" |
1459 |
- fi |
1460 |
- fi |
1461 |
- |
1462 |
- if ! use gallium; then |
1463 |
- use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium" |
1464 |
- use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium" |
1465 |
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium" |
1466 |
- use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium" |
1467 |
- use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium" |
1468 |
- use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium" |
1469 |
- use xa && ewarn "Ignoring USE=xa since USE does not contain gallium" |
1470 |
- use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium" |
1471 |
- fi |
1472 |
- |
1473 |
- if ! use llvm; then |
1474 |
- use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm" |
1475 |
- fi |
1476 |
- |
1477 |
- if use osmesa && ! use llvm; then |
1478 |
- ewarn "OSMesa will be slow without enabling USE=llvm" |
1479 |
- fi |
1480 |
-} |
1481 |
- |
1482 |
-python_check_deps() { |
1483 |
- has_version -b ">=dev-python/mako-0.8.0[${PYTHON_USEDEP}]" |
1484 |
-} |
1485 |
- |
1486 |
-pkg_setup() { |
1487 |
- # warning message for bug 459306 |
1488 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
1489 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
1490 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
1491 |
- fi |
1492 |
- |
1493 |
- if use video_cards_i965 || |
1494 |
- use video_cards_iris || |
1495 |
- use video_cards_radeonsi; then |
1496 |
- if kernel_is -ge 5 11 3; then |
1497 |
- CONFIG_CHECK="~KCMP" |
1498 |
- elif kernel_is -ge 5 11; then |
1499 |
- CONFIG_CHECK="~CHECKPOINT_RESTORE" |
1500 |
- elif kernel_is -ge 5 10 20; then |
1501 |
- CONFIG_CHECK="~KCMP" |
1502 |
- else |
1503 |
- CONFIG_CHECK="~CHECKPOINT_RESTORE" |
1504 |
- fi |
1505 |
- linux-info_pkg_setup |
1506 |
- fi |
1507 |
- |
1508 |
- if use gallium && use llvm; then |
1509 |
- llvm_pkg_setup |
1510 |
- fi |
1511 |
- python-any-r1_pkg_setup |
1512 |
-} |
1513 |
- |
1514 |
-multilib_src_configure() { |
1515 |
- local emesonargs=() |
1516 |
- |
1517 |
- if use classic; then |
1518 |
- # Intel code |
1519 |
- dri_driver_enable video_cards_i915 i915 |
1520 |
- dri_driver_enable video_cards_i965 i965 |
1521 |
- if ! use video_cards_i915 && \ |
1522 |
- ! use video_cards_i965; then |
1523 |
- dri_driver_enable video_cards_intel i915 i965 |
1524 |
- fi |
1525 |
- |
1526 |
- # Nouveau code |
1527 |
- dri_driver_enable video_cards_nouveau nouveau |
1528 |
- |
1529 |
- # ATI code |
1530 |
- dri_driver_enable video_cards_r100 r100 |
1531 |
- dri_driver_enable video_cards_r200 r200 |
1532 |
- if ! use video_cards_r100 && \ |
1533 |
- ! use video_cards_r200; then |
1534 |
- dri_driver_enable video_cards_radeon r100 r200 |
1535 |
- fi |
1536 |
- fi |
1537 |
- |
1538 |
- local platforms |
1539 |
- use X && platforms+="x11" |
1540 |
- use wayland && platforms+=",wayland" |
1541 |
- emesonargs+=(-Dplatforms=${platforms#,}) |
1542 |
- |
1543 |
- if use X || use egl; then |
1544 |
- emesonargs+=(-Dglvnd=true) |
1545 |
- else |
1546 |
- emesonargs+=(-Dglvnd=false) |
1547 |
- fi |
1548 |
- |
1549 |
- if use gallium; then |
1550 |
- emesonargs+=( |
1551 |
- $(meson_feature llvm) |
1552 |
- $(meson_feature lm-sensors lmsensors) |
1553 |
- $(meson_feature unwind libunwind) |
1554 |
- ) |
1555 |
- |
1556 |
- if use video_cards_iris || |
1557 |
- use video_cards_r300 || |
1558 |
- use video_cards_r600 || |
1559 |
- use video_cards_radeonsi || |
1560 |
- use video_cards_nouveau || |
1561 |
- use video_cards_vmware; then |
1562 |
- emesonargs+=($(meson_use d3d9 gallium-nine)) |
1563 |
- else |
1564 |
- emesonargs+=(-Dgallium-nine=false) |
1565 |
- fi |
1566 |
- |
1567 |
- if use video_cards_r600 || |
1568 |
- use video_cards_radeonsi || |
1569 |
- use video_cards_nouveau; then |
1570 |
- emesonargs+=($(meson_feature vaapi gallium-va)) |
1571 |
- use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers ) |
1572 |
- else |
1573 |
- emesonargs+=(-Dgallium-va=disabled) |
1574 |
- fi |
1575 |
- |
1576 |
- if use video_cards_r300 || |
1577 |
- use video_cards_r600 || |
1578 |
- use video_cards_radeonsi || |
1579 |
- use video_cards_nouveau; then |
1580 |
- emesonargs+=($(meson_feature vdpau gallium-vdpau)) |
1581 |
- else |
1582 |
- emesonargs+=(-Dgallium-vdpau=disabled) |
1583 |
- fi |
1584 |
- |
1585 |
- if use video_cards_freedreno || |
1586 |
- use video_cards_nouveau || |
1587 |
- use video_cards_vmware; then |
1588 |
- emesonargs+=($(meson_feature xa gallium-xa)) |
1589 |
- else |
1590 |
- emesonargs+=(-Dgallium-xa=disabled) |
1591 |
- fi |
1592 |
- |
1593 |
- if use video_cards_r600 || |
1594 |
- use video_cards_nouveau; then |
1595 |
- emesonargs+=($(meson_feature xvmc gallium-xvmc)) |
1596 |
- else |
1597 |
- emesonargs+=(-Dgallium-xvmc=disabled) |
1598 |
- fi |
1599 |
- |
1600 |
- if use video_cards_freedreno || |
1601 |
- use video_cards_lima || |
1602 |
- use video_cards_panfrost || |
1603 |
- use video_cards_v3d || |
1604 |
- use video_cards_vc4 || |
1605 |
- use video_cards_vivante; then |
1606 |
- gallium_enable -- kmsro |
1607 |
- fi |
1608 |
- |
1609 |
- gallium_enable -- swrast |
1610 |
- gallium_enable video_cards_lima lima |
1611 |
- gallium_enable video_cards_panfrost panfrost |
1612 |
- gallium_enable video_cards_v3d v3d |
1613 |
- gallium_enable video_cards_vc4 vc4 |
1614 |
- gallium_enable video_cards_vivante etnaviv |
1615 |
- gallium_enable video_cards_vmware svga |
1616 |
- gallium_enable video_cards_nouveau nouveau |
1617 |
- gallium_enable zink zink |
1618 |
- |
1619 |
- # Only one i915 driver (classic vs gallium). Default to classic. |
1620 |
- if ! use classic; then |
1621 |
- gallium_enable video_cards_i915 i915 |
1622 |
- if ! use video_cards_i915 && \ |
1623 |
- ! use video_cards_i965; then |
1624 |
- gallium_enable video_cards_intel i915 |
1625 |
- fi |
1626 |
- fi |
1627 |
- |
1628 |
- gallium_enable video_cards_iris iris |
1629 |
- |
1630 |
- gallium_enable video_cards_r300 r300 |
1631 |
- gallium_enable video_cards_r600 r600 |
1632 |
- gallium_enable video_cards_radeonsi radeonsi |
1633 |
- if ! use video_cards_r300 && \ |
1634 |
- ! use video_cards_r600; then |
1635 |
- gallium_enable video_cards_radeon r300 r600 |
1636 |
- fi |
1637 |
- |
1638 |
- gallium_enable video_cards_freedreno freedreno |
1639 |
- gallium_enable video_cards_virgl virgl |
1640 |
- |
1641 |
- # opencl stuff |
1642 |
- emesonargs+=( |
1643 |
- -Dgallium-opencl="$(usex opencl icd disabled)" |
1644 |
- ) |
1645 |
- fi |
1646 |
- |
1647 |
- if use vulkan; then |
1648 |
- vulkan_enable video_cards_i965 intel |
1649 |
- vulkan_enable video_cards_iris intel |
1650 |
- vulkan_enable video_cards_radeonsi amd |
1651 |
- vulkan_enable video_cards_v3d broadcom |
1652 |
- fi |
1653 |
- |
1654 |
- driver_list() { |
1655 |
- local drivers="$(sort -u <<< "${1// /$'\n'}")" |
1656 |
- echo "${drivers//$'\n'/,}" |
1657 |
- } |
1658 |
- |
1659 |
- emesonargs+=( |
1660 |
- $(meson_use test build-tests) |
1661 |
- -Dglx=$(usex X dri disabled) |
1662 |
- -Dshared-glapi=enabled |
1663 |
- $(meson_feature dri3) |
1664 |
- $(meson_feature egl) |
1665 |
- $(meson_feature gbm) |
1666 |
- $(meson_feature gles1) |
1667 |
- $(meson_feature gles2) |
1668 |
- $(meson_use osmesa) |
1669 |
- $(meson_use selinux) |
1670 |
- $(meson_feature zstd) |
1671 |
- -Dvalgrind=$(usex valgrind auto false) |
1672 |
- -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}") |
1673 |
- -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}") |
1674 |
- -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}") |
1675 |
- $(meson_use vulkan vulkan-device-select-layer) |
1676 |
- $(meson_use vulkan-overlay vulkan-overlay-layer) |
1677 |
- --buildtype $(usex debug debug plain) |
1678 |
- -Db_ndebug=$(usex debug false true) |
1679 |
- ) |
1680 |
- meson_src_configure |
1681 |
-} |
1682 |
- |
1683 |
-multilib_src_test() { |
1684 |
- meson_src_test -t 100 |
1685 |
-} |
1686 |
- |
1687 |
-# $1 - VIDEO_CARDS flag (check skipped for "--") |
1688 |
-# other args - names of DRI drivers to enable |
1689 |
-dri_driver_enable() { |
1690 |
- if [[ $1 == -- ]] || use $1; then |
1691 |
- shift |
1692 |
- DRI_DRIVERS+=("$@") |
1693 |
- fi |
1694 |
-} |
1695 |
- |
1696 |
-gallium_enable() { |
1697 |
- if [[ $1 == -- ]] || use $1; then |
1698 |
- shift |
1699 |
- GALLIUM_DRIVERS+=("$@") |
1700 |
- fi |
1701 |
-} |
1702 |
- |
1703 |
-vulkan_enable() { |
1704 |
- if [[ $1 == -- ]] || use $1; then |
1705 |
- shift |
1706 |
- VULKAN_DRIVERS+=("$@") |
1707 |
- fi |
1708 |
-} |