Gentoo Archives: gentoo-commits

From: Matt Turner <mattst88@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/mesa/
Date: Sun, 05 Dec 2021 21:54:04
Message-Id: 1638741230.b4102e0e3e9fa9f40211949c82f190a99bb83c39.mattst88@gentoo
1 commit: b4102e0e3e9fa9f40211949c82f190a99bb83c39
2 Author: Matt Turner <mattst88 <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 4 02:08:26 2021 +0000
4 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 5 21:53:50 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4102e0e
7
8 media-libs/mesa: Drop classic drivers
9
10 The classic drivers have been dropped from the main branch upstream in
11
12 https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10153
13
14 They will be maintained in an "Amber" branch, long-term. The Amber
15 branch has not been made yet.
16
17 Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>
18
19 media-libs/mesa/mesa-9999.ebuild | 361 +++++++++++++++------------------------
20 1 file changed, 138 insertions(+), 223 deletions(-)
21
22 diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild
23 index d200a650255d..55e813f0fde1 100644
24 --- a/media-libs/mesa/mesa-9999.ebuild
25 +++ b/media-libs/mesa/mesa-9999.ebuild
26 @@ -26,46 +26,27 @@ RESTRICT="
27 !test? ( test )
28 "
29
30 -RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi"
31 -VIDEO_CARDS="${RADEON_CARDS} crocus freedreno i915 i965 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
32 +RADEON_CARDS="r300 r600 radeon radeonsi"
33 +VIDEO_CARDS="${RADEON_CARDS} crocus freedreno i915 intel iris lima nouveau panfrost v3d vc4 virgl vivante vmware"
34 for card in ${VIDEO_CARDS}; do
35 IUSE_VIDEO_CARDS+=" video_cards_${card}"
36 done
37
38 IUSE="${IUSE_VIDEO_CARDS}
39 - +classic cpu_flags_x86_sse2 d3d9 debug +gallium gles1 +gles2 +llvm
40 + cpu_flags_x86_sse2 d3d9 debug gles1 +gles2 +llvm
41 lm-sensors opencl osmesa selinux test unwind vaapi valgrind vdpau vulkan
42 vulkan-overlay wayland +X xa xvmc zink +zstd"
43
44 REQUIRED_USE="
45 - d3d9? ( gallium || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
46 - osmesa? ( gallium )
47 + d3d9? ( || ( video_cards_iris video_cards_r300 video_cards_r600 video_cards_radeonsi video_cards_nouveau video_cards_vmware ) )
48 vulkan? ( video_cards_radeonsi? ( llvm ) )
49 vulkan-overlay? ( vulkan )
50 - video_cards_crocus? ( gallium )
51 - video_cards_freedreno? ( gallium )
52 - video_cards_intel? ( classic )
53 - video_cards_i915? ( || ( classic gallium ) )
54 - video_cards_i965? ( classic )
55 - video_cards_iris? ( gallium )
56 - video_cards_lima? ( gallium )
57 - video_cards_nouveau? ( || ( classic gallium ) )
58 - video_cards_panfrost? ( gallium )
59 - video_cards_radeon? ( || ( classic gallium )
60 - gallium? ( x86? ( llvm ) amd64? ( llvm ) ) )
61 - video_cards_r100? ( classic )
62 - video_cards_r200? ( classic )
63 - video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) )
64 - video_cards_r600? ( gallium )
65 - video_cards_radeonsi? ( gallium llvm )
66 - video_cards_v3d? ( gallium )
67 - video_cards_vc4? ( gallium )
68 - video_cards_virgl? ( gallium )
69 - video_cards_vivante? ( gallium )
70 - video_cards_vmware? ( gallium )
71 + video_cards_radeon? ( x86? ( llvm ) amd64? ( llvm ) )
72 + video_cards_r300? ( x86? ( llvm ) amd64? ( llvm ) )
73 + video_cards_radeonsi? ( llvm )
74 xa? ( X )
75 xvmc? ( X )
76 - zink? ( gallium vulkan )
77 + zink? ( vulkan )
78 "
79
80 LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.109"
81 @@ -73,39 +54,35 @@ RDEPEND="
82 >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}]
83 >=media-libs/libglvnd-1.3.2[X?,${MULTILIB_USEDEP}]
84 >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}]
85 - gallium? (
86 - unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
87 - llvm? (
88 - video_cards_radeonsi? (
89 - virtual/libelf:0=[${MULTILIB_USEDEP}]
90 - )
91 - video_cards_r600? (
92 - virtual/libelf:0=[${MULTILIB_USEDEP}]
93 - )
94 - video_cards_radeon? (
95 - virtual/libelf:0=[${MULTILIB_USEDEP}]
96 - )
97 + unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] )
98 + llvm? (
99 + video_cards_radeonsi? (
100 + virtual/libelf:0=[${MULTILIB_USEDEP}]
101 )
102 - lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
103 - opencl? (
104 - >=virtual/opencl-3[${MULTILIB_USEDEP}]
105 - dev-libs/libclc
106 - virtual/libelf:0=[${MULTILIB_USEDEP}]
107 - )
108 - vaapi? (
109 - >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
110 + video_cards_r600? (
111 + virtual/libelf:0=[${MULTILIB_USEDEP}]
112 )
113 - vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
114 - xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
115 + video_cards_radeon? (
116 + virtual/libelf:0=[${MULTILIB_USEDEP}]
117 + )
118 + )
119 + lm-sensors? ( sys-apps/lm-sensors:=[${MULTILIB_USEDEP}] )
120 + opencl? (
121 + >=virtual/opencl-3[${MULTILIB_USEDEP}]
122 + dev-libs/libclc
123 + virtual/libelf:0=[${MULTILIB_USEDEP}]
124 + )
125 + vaapi? (
126 + >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}]
127 )
128 + vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] )
129 + xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] )
130 selinux? ( sys-libs/libselinux[${MULTILIB_USEDEP}] )
131 wayland? (
132 >=dev-libs/wayland-1.18.0:=[${MULTILIB_USEDEP}]
133 )
134 ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}]
135 - video_cards_intel? (
136 - !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
137 - )
138 + video_cards_intel? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
139 video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] )
140 vulkan-overlay? ( dev-util/glslang:0=[${MULTILIB_USEDEP}] )
141 X? (
142 @@ -149,53 +126,51 @@ LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
143 CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang}
144 CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]}
145 RDEPEND="${RDEPEND}
146 - gallium? (
147 - llvm? (
148 - opencl? (
149 - video_cards_r600? (
150 + llvm? (
151 + opencl? (
152 + video_cards_r600? (
153 + ${CLANG_DEPSTR_AMDGPU}
154 + )
155 + !video_cards_r600? (
156 + video_cards_radeonsi? (
157 ${CLANG_DEPSTR_AMDGPU}
158 )
159 - !video_cards_r600? (
160 - video_cards_radeonsi? (
161 + )
162 + !video_cards_r600? (
163 + !video_cards_radeonsi? (
164 + video_cards_radeon? (
165 ${CLANG_DEPSTR_AMDGPU}
166 )
167 )
168 - !video_cards_r600? (
169 + )
170 + !video_cards_r600? (
171 + !video_cards_radeon? (
172 !video_cards_radeonsi? (
173 - video_cards_radeon? (
174 - ${CLANG_DEPSTR_AMDGPU}
175 - )
176 - )
177 - )
178 - !video_cards_r600? (
179 - !video_cards_radeon? (
180 - !video_cards_radeonsi? (
181 - ${CLANG_DEPSTR}
182 - )
183 + ${CLANG_DEPSTR}
184 )
185 )
186 )
187 - !opencl? (
188 - video_cards_r600? (
189 + )
190 + !opencl? (
191 + video_cards_r600? (
192 + ${LLVM_DEPSTR_AMDGPU}
193 + )
194 + !video_cards_r600? (
195 + video_cards_radeonsi? (
196 ${LLVM_DEPSTR_AMDGPU}
197 )
198 - !video_cards_r600? (
199 - video_cards_radeonsi? (
200 + )
201 + !video_cards_r600? (
202 + !video_cards_radeonsi? (
203 + video_cards_radeon? (
204 ${LLVM_DEPSTR_AMDGPU}
205 )
206 )
207 - !video_cards_r600? (
208 + )
209 + !video_cards_r600? (
210 + !video_cards_radeon? (
211 !video_cards_radeonsi? (
212 - video_cards_radeon? (
213 - ${LLVM_DEPSTR_AMDGPU}
214 - )
215 - )
216 - )
217 - !video_cards_r600? (
218 - !video_cards_radeon? (
219 - !video_cards_radeonsi? (
220 - ${LLVM_DEPSTR}
221 - )
222 + ${LLVM_DEPSTR}
223 )
224 )
225 )
226 @@ -253,11 +228,10 @@ llvm_check_deps() {
227 pkg_pretend() {
228 if use vulkan; then
229 if ! use video_cards_freedreno &&
230 - ! use video_cards_i965 &&
231 ! use video_cards_iris &&
232 ! use video_cards_radeonsi &&
233 ! use video_cards_v3d; then
234 - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, i965, iris, radeonsi, or v3d"
235 + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, iris, radeonsi, or v3d"
236 fi
237 fi
238
239 @@ -300,17 +274,6 @@ pkg_pretend() {
240 fi
241 fi
242
243 - if ! use gallium; then
244 - use lm-sensors && ewarn "Ignoring USE=lm-sensors since USE does not contain gallium"
245 - use llvm && ewarn "Ignoring USE=llvm since USE does not contain gallium"
246 - use opencl && ewarn "Ignoring USE=opencl since USE does not contain gallium"
247 - use vaapi && ewarn "Ignoring USE=vaapi since USE does not contain gallium"
248 - use vdpau && ewarn "Ignoring USE=vdpau since USE does not contain gallium"
249 - use unwind && ewarn "Ignoring USE=unwind since USE does not contain gallium"
250 - use xa && ewarn "Ignoring USE=xa since USE does not contain gallium"
251 - use xvmc && ewarn "Ignoring USE=xvmc since USE does not contain gallium"
252 - fi
253 -
254 if ! use llvm; then
255 use opencl && ewarn "Ignoring USE=opencl since USE does not contain llvm"
256 fi
257 @@ -331,8 +294,7 @@ pkg_setup() {
258 ewarn "detected! This can cause problems. For details, see bug 459306."
259 fi
260
261 - if use video_cards_i965 ||
262 - use video_cards_iris ||
263 + if use video_cards_iris ||
264 use video_cards_radeonsi; then
265 if kernel_is -ge 5 11 3; then
266 CONFIG_CHECK="~KCMP"
267 @@ -346,7 +308,7 @@ pkg_setup() {
268 linux-info_pkg_setup
269 fi
270
271 - if use gallium && use llvm; then
272 + if use llvm; then
273 llvm_pkg_setup
274 fi
275 python-any-r1_pkg_setup
276 @@ -355,134 +317,94 @@ pkg_setup() {
277 multilib_src_configure() {
278 local emesonargs=()
279
280 - if use classic; then
281 - # Intel code
282 - dri_driver_enable video_cards_i915 i915
283 - dri_driver_enable video_cards_i965 i965
284 - if ! use video_cards_i915 && \
285 - ! use video_cards_i965; then
286 - dri_driver_enable video_cards_intel i915 i965
287 - fi
288 -
289 - # Nouveau code
290 - dri_driver_enable video_cards_nouveau nouveau
291 -
292 - # ATI code
293 - dri_driver_enable video_cards_r100 r100
294 - dri_driver_enable video_cards_r200 r200
295 - if ! use video_cards_r100 && \
296 - ! use video_cards_r200; then
297 - dri_driver_enable video_cards_radeon r100 r200
298 - fi
299 - fi
300 -
301 local platforms
302 use X && platforms+="x11"
303 use wayland && platforms+=",wayland"
304 emesonargs+=(-Dplatforms=${platforms#,})
305
306 - if use gallium; then
307 - emesonargs+=(
308 - $(meson_feature llvm)
309 - $(meson_feature lm-sensors lmsensors)
310 - $(meson_feature unwind libunwind)
311 - )
312 -
313 - if use video_cards_iris ||
314 - use video_cards_r300 ||
315 - use video_cards_r600 ||
316 - use video_cards_radeonsi ||
317 - use video_cards_nouveau ||
318 - use video_cards_vmware; then
319 - emesonargs+=($(meson_use d3d9 gallium-nine))
320 - else
321 - emesonargs+=(-Dgallium-nine=false)
322 - fi
323 -
324 - if use video_cards_r600 ||
325 - use video_cards_radeonsi ||
326 - use video_cards_nouveau; then
327 - emesonargs+=($(meson_feature vaapi gallium-va))
328 - use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
329 - else
330 - emesonargs+=(-Dgallium-va=disabled)
331 - fi
332 -
333 - if use video_cards_r300 ||
334 - use video_cards_r600 ||
335 - use video_cards_radeonsi ||
336 - use video_cards_nouveau; then
337 - emesonargs+=($(meson_feature vdpau gallium-vdpau))
338 - else
339 - emesonargs+=(-Dgallium-vdpau=disabled)
340 - fi
341 -
342 - if use video_cards_freedreno ||
343 - use video_cards_nouveau ||
344 - use video_cards_vmware; then
345 - emesonargs+=($(meson_feature xa gallium-xa))
346 - else
347 - emesonargs+=(-Dgallium-xa=disabled)
348 - fi
349 -
350 - if use video_cards_r600 ||
351 - use video_cards_nouveau; then
352 - emesonargs+=($(meson_feature xvmc gallium-xvmc))
353 - else
354 - emesonargs+=(-Dgallium-xvmc=disabled)
355 - fi
356 + if use video_cards_iris ||
357 + use video_cards_r300 ||
358 + use video_cards_r600 ||
359 + use video_cards_radeonsi ||
360 + use video_cards_nouveau ||
361 + use video_cards_vmware; then
362 + emesonargs+=($(meson_use d3d9 gallium-nine))
363 + else
364 + emesonargs+=(-Dgallium-nine=false)
365 + fi
366
367 - if use video_cards_freedreno ||
368 - use video_cards_lima ||
369 - use video_cards_panfrost ||
370 - use video_cards_v3d ||
371 - use video_cards_vc4 ||
372 - use video_cards_vivante; then
373 - gallium_enable -- kmsro
374 - fi
375 + if use video_cards_r600 ||
376 + use video_cards_radeonsi ||
377 + use video_cards_nouveau; then
378 + emesonargs+=($(meson_feature vaapi gallium-va))
379 + use vaapi && emesonargs+=( -Dva-libs-path="${EPREFIX}"/usr/$(get_libdir)/va/drivers )
380 + else
381 + emesonargs+=(-Dgallium-va=disabled)
382 + fi
383
384 - gallium_enable -- swrast
385 - gallium_enable video_cards_lima lima
386 - gallium_enable video_cards_panfrost panfrost
387 - gallium_enable video_cards_v3d v3d
388 - gallium_enable video_cards_vc4 vc4
389 - gallium_enable video_cards_vivante etnaviv
390 - gallium_enable video_cards_vmware svga
391 - gallium_enable video_cards_nouveau nouveau
392 - gallium_enable zink zink
393 -
394 - # Only one i915 driver (classic vs gallium). Default to classic.
395 - if ! use classic; then
396 - gallium_enable video_cards_i915 i915
397 - if ! use video_cards_i915 && \
398 - ! use video_cards_i965; then
399 - gallium_enable video_cards_intel i915
400 - fi
401 - fi
402 + if use video_cards_r300 ||
403 + use video_cards_r600 ||
404 + use video_cards_radeonsi ||
405 + use video_cards_nouveau; then
406 + emesonargs+=($(meson_feature vdpau gallium-vdpau))
407 + else
408 + emesonargs+=(-Dgallium-vdpau=disabled)
409 + fi
410
411 - gallium_enable video_cards_crocus crocus
412 - gallium_enable video_cards_iris iris
413 + if use video_cards_freedreno ||
414 + use video_cards_nouveau ||
415 + use video_cards_vmware; then
416 + emesonargs+=($(meson_feature xa gallium-xa))
417 + else
418 + emesonargs+=(-Dgallium-xa=disabled)
419 + fi
420
421 - gallium_enable video_cards_r300 r300
422 - gallium_enable video_cards_r600 r600
423 - gallium_enable video_cards_radeonsi radeonsi
424 - if ! use video_cards_r300 && \
425 - ! use video_cards_r600; then
426 - gallium_enable video_cards_radeon r300 r600
427 - fi
428 + if use video_cards_r600 ||
429 + use video_cards_nouveau; then
430 + emesonargs+=($(meson_feature xvmc gallium-xvmc))
431 + else
432 + emesonargs+=(-Dgallium-xvmc=disabled)
433 + fi
434
435 - gallium_enable video_cards_freedreno freedreno
436 - gallium_enable video_cards_virgl virgl
437 + if use video_cards_freedreno ||
438 + use video_cards_lima ||
439 + use video_cards_panfrost ||
440 + use video_cards_v3d ||
441 + use video_cards_vc4 ||
442 + use video_cards_vivante; then
443 + gallium_enable -- kmsro
444 + fi
445
446 - # opencl stuff
447 - emesonargs+=(
448 - -Dgallium-opencl="$(usex opencl icd disabled)"
449 - )
450 + gallium_enable -- swrast
451 + gallium_enable video_cards_crocus crocus
452 + gallium_enable video_cards_freedreno freedreno
453 + gallium_enable video_cards_i915 i915
454 + gallium_enable video_cards_iris iris
455 + gallium_enable video_cards_lima lima
456 + gallium_enable video_cards_nouveau nouveau
457 + gallium_enable video_cards_panfrost panfrost
458 + gallium_enable video_cards_v3d v3d
459 + gallium_enable video_cards_vc4 vc4
460 + gallium_enable video_cards_virgl virgl
461 + gallium_enable video_cards_vivante etnaviv
462 + gallium_enable video_cards_vmware svga
463 + gallium_enable zink zink
464 +
465 + gallium_enable video_cards_r300 r300
466 + gallium_enable video_cards_r600 r600
467 + gallium_enable video_cards_radeonsi radeonsi
468 + if ! use video_cards_r300 && \
469 + ! use video_cards_r600; then
470 + gallium_enable video_cards_radeon r300 r600
471 fi
472
473 + # opencl stuff
474 + emesonargs+=(
475 + -Dgallium-opencl="$(usex opencl icd disabled)"
476 + )
477 +
478 if use vulkan; then
479 vulkan_enable video_cards_freedreno freedreno
480 - vulkan_enable video_cards_i965 intel
481 vulkan_enable video_cards_iris intel
482 vulkan_enable video_cards_radeonsi amd
483 vulkan_enable video_cards_v3d broadcom
484 @@ -508,14 +430,14 @@ multilib_src_configure() {
485 -Dglvnd=true
486 $(meson_feature gles1)
487 $(meson_feature gles2)
488 + $(meson_feature llvm)
489 + $(meson_feature lm-sensors lmsensors)
490 $(meson_use osmesa)
491 $(meson_use selinux)
492 + $(meson_feature unwind libunwind)
493 $(meson_feature zstd)
494 - $(meson_use video_cards_crocus prefer-crocus)
495 - $(meson_use video_cards_iris prefer-iris)
496 $(meson_use cpu_flags_x86_sse2 sse2)
497 -Dvalgrind=$(usex valgrind auto disabled)
498 - -Ddri-drivers=$(driver_list "${DRI_DRIVERS[*]}")
499 -Dgallium-drivers=$(driver_list "${GALLIUM_DRIVERS[*]}")
500 -Dvulkan-drivers=$(driver_list "${VULKAN_DRIVERS[*]}")
501 --buildtype $(usex debug debug plain)
502 @@ -530,13 +452,6 @@ multilib_src_test() {
503
504 # $1 - VIDEO_CARDS flag (check skipped for "--")
505 # other args - names of DRI drivers to enable
506 -dri_driver_enable() {
507 - if [[ $1 == -- ]] || use $1; then
508 - shift
509 - DRI_DRIVERS+=("$@")
510 - fi
511 -}
512 -
513 gallium_enable() {
514 if [[ $1 == -- ]] || use $1; then
515 shift