1 |
commit: 8f78674ef2d8be525b57581918b494251102d2e4 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 27 16:30:44 2018 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 27 16:31:10 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f78674e |
7 |
|
8 |
media-libs/mesa: Drop old versions |
9 |
|
10 |
media-libs/mesa/Manifest | 3 - |
11 |
media-libs/mesa/mesa-18.1.1-r1.ebuild | 539 --------------------------------- |
12 |
media-libs/mesa/mesa-18.1.1.ebuild | 531 --------------------------------- |
13 |
media-libs/mesa/mesa-18.1.2.ebuild | 539 --------------------------------- |
14 |
media-libs/mesa/mesa-18.1.3.ebuild | 540 ---------------------------------- |
15 |
5 files changed, 2152 deletions(-) |
16 |
|
17 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
18 |
index ff1abc07e65..1478269d410 100644 |
19 |
--- a/media-libs/mesa/Manifest |
20 |
+++ b/media-libs/mesa/Manifest |
21 |
@@ -1,7 +1,4 @@ |
22 |
DIST mesa-17.3.9.tar.xz 10660456 BLAKE2B 54f4a75f9040e50e9eea8f5c52a276578379d25d2a01ac4767ab12bee85fe5dae1492d5bb1df06b6e8c6b0fe960bbd5ea38691c75d08a6b4302c64377ce58e54 SHA512 83deffbc6b9823b8e93cccf57d7952106f3d55fea881e3924f9f9586f0e9347a6e3a1a36cc19c24af819f2fde3af9496652a6ff56132511a5618d5774404f63f |
23 |
DIST mesa-18.0.5.tar.xz 10952996 BLAKE2B 708cdb2ef95a618430cd4e7eb45bcab0f6575774065b61f53787aa378385fe0dfa0b04f9c80c5426f9581851edc545a75c137777dc304ac8ba57465d365fcd50 SHA512 63b47cdca7f8282aab7aaa66233411f02918e5c4804b7a0010de2b1867fe90171e492ff031dfc4aa20968dfc99bd7dceb5d35fd44c709e54a2ece61175a60f3d |
24 |
-DIST mesa-18.1.1.tar.xz 11110892 BLAKE2B 05d48379109c1c3800d3d07b9f52e96b2cd4bc087517711ee752f89619afce0a0e09b7a9ede8b5d1807ceae3e2b506518657a0760c947f466121e2252f7eada3 SHA512 7783adc1ec7a1c3d092acfcca6b4ba19450c15a7f0d7f41fbf25e482236615d79ce24afe60959066ea7aa851df4f74fa3c569fa6d847ea79e6bfe046b8c65e90 |
25 |
-DIST mesa-18.1.2.tar.xz 11124408 BLAKE2B 8327f16f41d59e6ec8d4145a8399503cf04799d437e336714760e4bdc563c483583363e32d41affc2365e977b96494156300910b1834bc9957504b6c0cf168fa SHA512 1b896ecc42c2f81813d551a2b14d271d274a948fa10bf5b7a567417690316c2ab7e7fdd52fe004732cd1a47661ba91acf7d5b21e3b3f28e21b50aadbfa96a5d5 |
26 |
-DIST mesa-18.1.3.tar.xz 11126236 BLAKE2B 2315cdc95130ef604a86e3886abf9b15e6c7944fab3b3cc020358dd08a76f2b876904516e5c081d549b16240ae4dedd647402dd7bd8de4c91015bb601c0c2923 SHA512 f6e5b81a80a309a36a04759d18364d3c71c48d1cb88f87b2f5432ef003092a22046e88ce2082031d5d52b60ba36f585d8df52e06ecc7a5158079936236f36887 |
27 |
DIST mesa-18.1.4.tar.xz 11133392 BLAKE2B b0c205e5baa04bb018333ffd89942f86f19edd3f610cce004db23bad4ebc1a3379ea35e72c85ccc08c34c8bc0991c1f0b595227fae2259e4b76895542d3f25b9 SHA512 04b8e5bbfa640f2303c388ab701fc2aca7f6d5d127ca5a9f9409975556813ba8e94305d27c9cea236a0e6d44a38b97e2877509268a96d9ed2a6762ab385aa3dc |
28 |
DIST mesa-18.1.5.tar.xz 11137340 BLAKE2B 3c18d2d73aa7ee920344691bd6de68b27b5cfb37e707921e04e3989596f3e5a088ac7171b033bb61473627cc1a5bf11d24a1f28d8483164b855f8023a74497e1 SHA512 f0bcb903bbf2ff7fc0b4a8fe100ea26ee91c0029b64adaf5fc4877ed7681f325c54b1be8eb0b140bff620da79f30a96375c2e1085e504ebfaf50e57f6da93013 |
29 |
|
30 |
diff --git a/media-libs/mesa/mesa-18.1.1-r1.ebuild b/media-libs/mesa/mesa-18.1.1-r1.ebuild |
31 |
deleted file mode 100644 |
32 |
index 174ef6902cf..00000000000 |
33 |
--- a/media-libs/mesa/mesa-18.1.1-r1.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,539 +0,0 @@ |
36 |
-# Copyright 1999-2018 Gentoo Foundation |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=6 |
40 |
- |
41 |
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
42 |
- |
43 |
-if [[ ${PV} = 9999 ]]; then |
44 |
- GIT_ECLASS="git-r3" |
45 |
- EXPERIMENTAL="true" |
46 |
-fi |
47 |
- |
48 |
-PYTHON_COMPAT=( python2_7 ) |
49 |
- |
50 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
51 |
- |
52 |
-OPENGL_DIR="xorg-x11" |
53 |
- |
54 |
-MY_P="${P/_/-}" |
55 |
- |
56 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
57 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
58 |
- |
59 |
-if [[ $PV == 9999 ]]; then |
60 |
- SRC_URI="" |
61 |
-else |
62 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
63 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
64 |
-fi |
65 |
- |
66 |
-LICENSE="MIT" |
67 |
-SLOT="0" |
68 |
-RESTRICT="!bindist? ( bindist )" |
69 |
- |
70 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
71 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
72 |
-for card in ${VIDEO_CARDS}; do |
73 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
74 |
-done |
75 |
- |
76 |
-IUSE="${IUSE_VIDEO_CARDS} |
77 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
78 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
79 |
- vdpau vulkan wayland xvmc xa" |
80 |
- |
81 |
-REQUIRED_USE=" |
82 |
- d3d9? ( dri3 gallium ) |
83 |
- llvm? ( gallium ) |
84 |
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) ) |
85 |
- openmax? ( gallium ) |
86 |
- gles1? ( egl ) |
87 |
- gles2? ( egl ) |
88 |
- vaapi? ( gallium ) |
89 |
- vdpau? ( gallium ) |
90 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
91 |
- video_cards_radeonsi? ( llvm ) ) |
92 |
- wayland? ( egl gbm ) |
93 |
- xa? ( gallium ) |
94 |
- video_cards_freedreno? ( gallium ) |
95 |
- video_cards_intel? ( classic ) |
96 |
- video_cards_i915? ( || ( classic gallium ) ) |
97 |
- video_cards_i965? ( classic ) |
98 |
- video_cards_imx? ( gallium video_cards_vivante ) |
99 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
100 |
- video_cards_radeon? ( || ( classic gallium ) |
101 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
102 |
- video_cards_r100? ( classic ) |
103 |
- video_cards_r200? ( classic ) |
104 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
105 |
- video_cards_r600? ( gallium ) |
106 |
- video_cards_radeonsi? ( gallium llvm ) |
107 |
- video_cards_vc4? ( gallium ) |
108 |
- video_cards_virgl? ( gallium ) |
109 |
- video_cards_vivante? ( gallium gbm ) |
110 |
- video_cards_vmware? ( gallium ) |
111 |
-" |
112 |
- |
113 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91" |
114 |
-RDEPEND=" |
115 |
- !app-eselect/eselect-mesa |
116 |
- >=app-eselect/eselect-opengl-1.3.0 |
117 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
118 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
119 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
120 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
121 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
122 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
123 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
124 |
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
125 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
126 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
127 |
- llvm? ( |
128 |
- video_cards_radeonsi? ( |
129 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
130 |
- ) |
131 |
- video_cards_r600? ( |
132 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
133 |
- ) |
134 |
- video_cards_radeon? ( |
135 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
136 |
- ) |
137 |
- ) |
138 |
- opencl? ( |
139 |
- app-eselect/eselect-opencl |
140 |
- dev-libs/libclc |
141 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
142 |
- ) |
143 |
- openmax? ( |
144 |
- >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] |
145 |
- x11-misc/xdg-utils |
146 |
- ) |
147 |
- vaapi? ( |
148 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
149 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
150 |
- ) |
151 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
152 |
- wayland? ( |
153 |
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] |
154 |
- >=dev-libs/wayland-protocols-1.8 |
155 |
- ) |
156 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
157 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
158 |
- |
159 |
- video_cards_intel? ( |
160 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
161 |
- ) |
162 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
163 |
-" |
164 |
-for card in ${RADEON_CARDS}; do |
165 |
- RDEPEND="${RDEPEND} |
166 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
167 |
- " |
168 |
-done |
169 |
-RDEPEND="${RDEPEND} |
170 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
171 |
-" |
172 |
- |
173 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
174 |
-# we need to *really* make sure we're not pulling one than more slot |
175 |
-# simultaneously. |
176 |
-# |
177 |
-# How to use it: |
178 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
179 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
180 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
181 |
-LLVM_DEPSTR=" |
182 |
- || ( |
183 |
- sys-devel/llvm:7[${MULTILIB_USEDEP}] |
184 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
185 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
186 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
187 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
188 |
- ) |
189 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
190 |
-" |
191 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
192 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
193 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
194 |
-RDEPEND="${RDEPEND} |
195 |
- llvm? ( |
196 |
- opencl? ( |
197 |
- video_cards_r600? ( |
198 |
- ${CLANG_DEPSTR_AMDGPU} |
199 |
- ) |
200 |
- !video_cards_r600? ( |
201 |
- video_cards_radeonsi? ( |
202 |
- ${CLANG_DEPSTR_AMDGPU} |
203 |
- ) |
204 |
- ) |
205 |
- !video_cards_r600? ( |
206 |
- !video_cards_radeonsi? ( |
207 |
- video_cards_radeon? ( |
208 |
- ${CLANG_DEPSTR_AMDGPU} |
209 |
- ) |
210 |
- ) |
211 |
- ) |
212 |
- !video_cards_r600? ( |
213 |
- !video_cards_radeon? ( |
214 |
- !video_cards_radeonsi? ( |
215 |
- ${CLANG_DEPSTR} |
216 |
- ) |
217 |
- ) |
218 |
- ) |
219 |
- ) |
220 |
- !opencl? ( |
221 |
- video_cards_r600? ( |
222 |
- ${LLVM_DEPSTR_AMDGPU} |
223 |
- ) |
224 |
- !video_cards_r600? ( |
225 |
- video_cards_radeonsi? ( |
226 |
- ${LLVM_DEPSTR_AMDGPU} |
227 |
- ) |
228 |
- ) |
229 |
- !video_cards_r600? ( |
230 |
- !video_cards_radeonsi? ( |
231 |
- video_cards_radeon? ( |
232 |
- ${LLVM_DEPSTR_AMDGPU} |
233 |
- ) |
234 |
- ) |
235 |
- ) |
236 |
- !video_cards_r600? ( |
237 |
- !video_cards_radeon? ( |
238 |
- !video_cards_radeonsi? ( |
239 |
- ${LLVM_DEPSTR} |
240 |
- ) |
241 |
- ) |
242 |
- ) |
243 |
- ) |
244 |
- ) |
245 |
-" |
246 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
247 |
- |
248 |
-DEPEND="${RDEPEND} |
249 |
- ${PYTHON_DEPS} |
250 |
- opencl? ( |
251 |
- >=sys-devel/gcc-4.6 |
252 |
- ) |
253 |
- sys-devel/gettext |
254 |
- virtual/pkgconfig |
255 |
- valgrind? ( dev-util/valgrind ) |
256 |
- x11-base/xorg-proto |
257 |
- vulkan? ( |
258 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
259 |
- ) |
260 |
-" |
261 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
262 |
- sys-devel/bison |
263 |
- sys-devel/flex |
264 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
265 |
-" |
266 |
- |
267 |
-S="${WORKDIR}/${MY_P}" |
268 |
-EGIT_CHECKOUT_DIR=${S} |
269 |
- |
270 |
-QA_WX_LOAD=" |
271 |
-x86? ( |
272 |
- !pic? ( |
273 |
- usr/lib*/libglapi.so.0.0.0 |
274 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
275 |
- usr/lib*/libGLESv2.so.2.0.0 |
276 |
- usr/lib*/libGL.so.1.2.0 |
277 |
- usr/lib*/libOSMesa.so.8.0.0 |
278 |
- ) |
279 |
-)" |
280 |
- |
281 |
-llvm_check_deps() { |
282 |
- local flags=${MULTILIB_USEDEP} |
283 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
284 |
- then |
285 |
- flags+=",llvm_targets_AMDGPU(-)" |
286 |
- fi |
287 |
- |
288 |
- if use opencl; then |
289 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
290 |
- fi |
291 |
- has_version "sys-devel/llvm[${flags}]" |
292 |
-} |
293 |
- |
294 |
-pkg_setup() { |
295 |
- # warning message for bug 459306 |
296 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
297 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
298 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
299 |
- fi |
300 |
- |
301 |
- if use llvm; then |
302 |
- llvm_pkg_setup |
303 |
- fi |
304 |
- python-any-r1_pkg_setup |
305 |
-} |
306 |
- |
307 |
-src_prepare() { |
308 |
- eapply_user |
309 |
- [[ ${PV} == 9999 ]] && eautoreconf |
310 |
-} |
311 |
- |
312 |
-multilib_src_configure() { |
313 |
- local myconf |
314 |
- |
315 |
- if use classic; then |
316 |
- # Configurable DRI drivers |
317 |
- driver_enable swrast |
318 |
- |
319 |
- # Intel code |
320 |
- driver_enable video_cards_i915 i915 |
321 |
- driver_enable video_cards_i965 i965 |
322 |
- if ! use video_cards_i915 && \ |
323 |
- ! use video_cards_i965; then |
324 |
- driver_enable video_cards_intel i915 i965 |
325 |
- fi |
326 |
- |
327 |
- # Nouveau code |
328 |
- driver_enable video_cards_nouveau nouveau |
329 |
- |
330 |
- # ATI code |
331 |
- driver_enable video_cards_r100 radeon |
332 |
- driver_enable video_cards_r200 r200 |
333 |
- if ! use video_cards_r100 && \ |
334 |
- ! use video_cards_r200; then |
335 |
- driver_enable video_cards_radeon radeon r200 |
336 |
- fi |
337 |
- fi |
338 |
- |
339 |
- if use egl; then |
340 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
341 |
- fi |
342 |
- |
343 |
- if use gallium; then |
344 |
- myconf+=" |
345 |
- $(use_enable d3d9 nine) |
346 |
- $(use_enable llvm) |
347 |
- $(use_enable openmax omx-bellagio) |
348 |
- $(use_enable vaapi va) |
349 |
- $(use_enable vdpau) |
350 |
- $(use_enable xa) |
351 |
- $(use_enable xvmc) |
352 |
- " |
353 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
354 |
- |
355 |
- gallium_enable swrast |
356 |
- gallium_enable video_cards_vc4 vc4 |
357 |
- gallium_enable video_cards_vivante etnaviv |
358 |
- gallium_enable video_cards_vmware svga |
359 |
- gallium_enable video_cards_nouveau nouveau |
360 |
- gallium_enable video_cards_i915 i915 |
361 |
- gallium_enable video_cards_imx imx |
362 |
- if ! use video_cards_i915 && \ |
363 |
- ! use video_cards_i965; then |
364 |
- gallium_enable video_cards_intel i915 |
365 |
- fi |
366 |
- |
367 |
- gallium_enable video_cards_r300 r300 |
368 |
- gallium_enable video_cards_r600 r600 |
369 |
- gallium_enable video_cards_radeonsi radeonsi |
370 |
- if ! use video_cards_r300 && \ |
371 |
- ! use video_cards_r600; then |
372 |
- gallium_enable video_cards_radeon r300 r600 |
373 |
- fi |
374 |
- |
375 |
- gallium_enable video_cards_freedreno freedreno |
376 |
- # opencl stuff |
377 |
- if use opencl; then |
378 |
- myconf+=" |
379 |
- $(use_enable opencl) |
380 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
381 |
- " |
382 |
- fi |
383 |
- |
384 |
- gallium_enable video_cards_virgl virgl |
385 |
- fi |
386 |
- |
387 |
- if use vulkan; then |
388 |
- vulkan_enable video_cards_i965 intel |
389 |
- vulkan_enable video_cards_radeonsi radeon |
390 |
- fi |
391 |
- |
392 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
393 |
- if [[ ${ABI} == x86 ]]; then |
394 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
395 |
- fi |
396 |
- |
397 |
- # on abi_x86_32 hardened we need to have asm disable |
398 |
- if [[ ${ABI} == x86* ]] && use pic; then |
399 |
- myconf+=" --disable-asm" |
400 |
- fi |
401 |
- |
402 |
- if use gallium; then |
403 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
404 |
- else |
405 |
- myconf+=" $(use_enable osmesa)" |
406 |
- fi |
407 |
- |
408 |
- # build fails with BSD indent, bug #428112 |
409 |
- use userland_GNU || export INDENT=cat |
410 |
- |
411 |
- ECONF_SOURCE="${S}" \ |
412 |
- econf \ |
413 |
- --enable-dri \ |
414 |
- --enable-glx \ |
415 |
- --enable-shared-glapi \ |
416 |
- $(use_enable !bindist texture-float) \ |
417 |
- $(use_enable d3d9 nine) \ |
418 |
- $(use_enable debug) \ |
419 |
- $(use_enable dri3) \ |
420 |
- $(use_enable egl) \ |
421 |
- $(use_enable gbm) \ |
422 |
- $(use_enable gles1) \ |
423 |
- $(use_enable gles2) \ |
424 |
- $(use_enable nptl glx-tls) \ |
425 |
- $(use_enable unwind libunwind) \ |
426 |
- --enable-valgrind=$(usex valgrind auto no) \ |
427 |
- --enable-llvm-shared-libs \ |
428 |
- --disable-opencl-icd \ |
429 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
430 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
431 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
432 |
- PYTHON2="${PYTHON}" \ |
433 |
- ${myconf} |
434 |
-} |
435 |
- |
436 |
-multilib_src_install() { |
437 |
- emake install DESTDIR="${D}" |
438 |
- |
439 |
- if use wayland; then |
440 |
- # These files are now provided by >=dev-libs/wayland-1.15.0 |
441 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die |
442 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die |
443 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die |
444 |
- rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die |
445 |
- fi |
446 |
- |
447 |
- if use opencl; then |
448 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
449 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
450 |
- dodir ${cl_dir}/{lib,include} |
451 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
452 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
453 |
- "${ED}"${cl_dir} |
454 |
- fi |
455 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
456 |
- mv -f "${ED}"/usr/include/CL \ |
457 |
- "${ED}"${cl_dir}/include |
458 |
- fi |
459 |
- eend $? |
460 |
- fi |
461 |
- |
462 |
- if use openmax; then |
463 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
464 |
- doenvd "${T}"/99mesaxdgomx |
465 |
- keepdir /usr/share/mesa/xdg |
466 |
- fi |
467 |
-} |
468 |
- |
469 |
-multilib_src_install_all() { |
470 |
- find "${ED}" -name '*.la' -delete |
471 |
- einstalldocs |
472 |
- |
473 |
- if use !bindist; then |
474 |
- dodoc docs/patents.txt |
475 |
- fi |
476 |
-} |
477 |
- |
478 |
-multilib_src_test() { |
479 |
- if use llvm; then |
480 |
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf' |
481 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
482 |
- emake ${llvm_tests} |
483 |
- pax-mark m ${llvm_tests} |
484 |
- popd >/dev/null || die |
485 |
- fi |
486 |
- emake check |
487 |
-} |
488 |
- |
489 |
-pkg_postinst() { |
490 |
- # Switch to the xorg implementation. |
491 |
- echo |
492 |
- eselect opengl set --use-old ${OPENGL_DIR} |
493 |
- |
494 |
- # Switch to mesa opencl |
495 |
- if use opencl; then |
496 |
- eselect opencl set --use-old ${PN} |
497 |
- fi |
498 |
- |
499 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
500 |
- if use openmax; then |
501 |
- ebegin "Registering OpenMAX drivers" |
502 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
503 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
504 |
- omxregister-bellagio |
505 |
- eend $? |
506 |
- fi |
507 |
- |
508 |
- # warn about patent encumbered texture-float |
509 |
- if use !bindist; then |
510 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
511 |
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
512 |
- elog "explanation." |
513 |
- fi |
514 |
-} |
515 |
- |
516 |
-pkg_prerm() { |
517 |
- if use openmax; then |
518 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
519 |
- fi |
520 |
-} |
521 |
- |
522 |
-# $1 - VIDEO_CARDS flag |
523 |
-# other args - names of DRI drivers to enable |
524 |
-# TODO: avoid code duplication for a more elegant implementation |
525 |
-driver_enable() { |
526 |
- case $# in |
527 |
- # for enabling unconditionally |
528 |
- 1) |
529 |
- DRI_DRIVERS+=",$1" |
530 |
- ;; |
531 |
- *) |
532 |
- if use $1; then |
533 |
- shift |
534 |
- for i in $@; do |
535 |
- DRI_DRIVERS+=",${i}" |
536 |
- done |
537 |
- fi |
538 |
- ;; |
539 |
- esac |
540 |
-} |
541 |
- |
542 |
-gallium_enable() { |
543 |
- case $# in |
544 |
- # for enabling unconditionally |
545 |
- 1) |
546 |
- GALLIUM_DRIVERS+=",$1" |
547 |
- ;; |
548 |
- *) |
549 |
- if use $1; then |
550 |
- shift |
551 |
- for i in $@; do |
552 |
- GALLIUM_DRIVERS+=",${i}" |
553 |
- done |
554 |
- fi |
555 |
- ;; |
556 |
- esac |
557 |
-} |
558 |
- |
559 |
-vulkan_enable() { |
560 |
- case $# in |
561 |
- # for enabling unconditionally |
562 |
- 1) |
563 |
- VULKAN_DRIVERS+=",$1" |
564 |
- ;; |
565 |
- *) |
566 |
- if use $1; then |
567 |
- shift |
568 |
- for i in $@; do |
569 |
- VULKAN_DRIVERS+=",${i}" |
570 |
- done |
571 |
- fi |
572 |
- ;; |
573 |
- esac |
574 |
-} |
575 |
|
576 |
diff --git a/media-libs/mesa/mesa-18.1.1.ebuild b/media-libs/mesa/mesa-18.1.1.ebuild |
577 |
deleted file mode 100644 |
578 |
index 5acb40f7585..00000000000 |
579 |
--- a/media-libs/mesa/mesa-18.1.1.ebuild |
580 |
+++ /dev/null |
581 |
@@ -1,531 +0,0 @@ |
582 |
-# Copyright 1999-2018 Gentoo Foundation |
583 |
-# Distributed under the terms of the GNU General Public License v2 |
584 |
- |
585 |
-EAPI=6 |
586 |
- |
587 |
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
588 |
- |
589 |
-if [[ ${PV} = 9999 ]]; then |
590 |
- GIT_ECLASS="git-r3" |
591 |
- EXPERIMENTAL="true" |
592 |
-fi |
593 |
- |
594 |
-PYTHON_COMPAT=( python2_7 ) |
595 |
- |
596 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
597 |
- |
598 |
-OPENGL_DIR="xorg-x11" |
599 |
- |
600 |
-MY_P="${P/_/-}" |
601 |
- |
602 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
603 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
604 |
- |
605 |
-if [[ $PV == 9999 ]]; then |
606 |
- SRC_URI="" |
607 |
-else |
608 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
609 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
610 |
-fi |
611 |
- |
612 |
-LICENSE="MIT" |
613 |
-SLOT="0" |
614 |
-RESTRICT="!bindist? ( bindist )" |
615 |
- |
616 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
617 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
618 |
-for card in ${VIDEO_CARDS}; do |
619 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
620 |
-done |
621 |
- |
622 |
-IUSE="${IUSE_VIDEO_CARDS} |
623 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
624 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
625 |
- vdpau vulkan wayland xvmc xa" |
626 |
- |
627 |
-REQUIRED_USE=" |
628 |
- d3d9? ( dri3 gallium ) |
629 |
- llvm? ( gallium ) |
630 |
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) ) |
631 |
- openmax? ( gallium ) |
632 |
- gles1? ( egl ) |
633 |
- gles2? ( egl ) |
634 |
- vaapi? ( gallium ) |
635 |
- vdpau? ( gallium ) |
636 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
637 |
- video_cards_radeonsi? ( llvm ) ) |
638 |
- wayland? ( egl gbm ) |
639 |
- xa? ( gallium ) |
640 |
- video_cards_freedreno? ( gallium ) |
641 |
- video_cards_intel? ( classic ) |
642 |
- video_cards_i915? ( || ( classic gallium ) ) |
643 |
- video_cards_i965? ( classic ) |
644 |
- video_cards_imx? ( gallium video_cards_vivante ) |
645 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
646 |
- video_cards_radeon? ( || ( classic gallium ) |
647 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
648 |
- video_cards_r100? ( classic ) |
649 |
- video_cards_r200? ( classic ) |
650 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
651 |
- video_cards_r600? ( gallium ) |
652 |
- video_cards_radeonsi? ( gallium llvm ) |
653 |
- video_cards_vc4? ( gallium ) |
654 |
- video_cards_virgl? ( gallium ) |
655 |
- video_cards_vivante? ( gallium gbm ) |
656 |
- video_cards_vmware? ( gallium ) |
657 |
-" |
658 |
- |
659 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91" |
660 |
-RDEPEND=" |
661 |
- !app-eselect/eselect-mesa |
662 |
- >=app-eselect/eselect-opengl-1.3.0 |
663 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
664 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
665 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
666 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
667 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
668 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
669 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
670 |
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
671 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
672 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
673 |
- llvm? ( |
674 |
- video_cards_radeonsi? ( |
675 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
676 |
- ) |
677 |
- video_cards_r600? ( |
678 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
679 |
- ) |
680 |
- video_cards_radeon? ( |
681 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
682 |
- ) |
683 |
- ) |
684 |
- opencl? ( |
685 |
- app-eselect/eselect-opencl |
686 |
- dev-libs/libclc |
687 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
688 |
- ) |
689 |
- openmax? ( |
690 |
- >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] |
691 |
- x11-misc/xdg-utils |
692 |
- ) |
693 |
- vaapi? ( |
694 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
695 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
696 |
- ) |
697 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
698 |
- wayland? ( |
699 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
700 |
- >=dev-libs/wayland-protocols-1.8 |
701 |
- ) |
702 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
703 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
704 |
- |
705 |
- video_cards_intel? ( |
706 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
707 |
- ) |
708 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
709 |
-" |
710 |
-for card in ${RADEON_CARDS}; do |
711 |
- RDEPEND="${RDEPEND} |
712 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
713 |
- " |
714 |
-done |
715 |
-RDEPEND="${RDEPEND} |
716 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
717 |
-" |
718 |
- |
719 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
720 |
-# we need to *really* make sure we're not pulling one than more slot |
721 |
-# simultaneously. |
722 |
-# |
723 |
-# How to use it: |
724 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
725 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
726 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
727 |
-LLVM_DEPSTR=" |
728 |
- || ( |
729 |
- sys-devel/llvm:7[${MULTILIB_USEDEP}] |
730 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
731 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
732 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
733 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
734 |
- ) |
735 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
736 |
-" |
737 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
738 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
739 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
740 |
-RDEPEND="${RDEPEND} |
741 |
- llvm? ( |
742 |
- opencl? ( |
743 |
- video_cards_r600? ( |
744 |
- ${CLANG_DEPSTR_AMDGPU} |
745 |
- ) |
746 |
- !video_cards_r600? ( |
747 |
- video_cards_radeonsi? ( |
748 |
- ${CLANG_DEPSTR_AMDGPU} |
749 |
- ) |
750 |
- ) |
751 |
- !video_cards_r600? ( |
752 |
- !video_cards_radeonsi? ( |
753 |
- video_cards_radeon? ( |
754 |
- ${CLANG_DEPSTR_AMDGPU} |
755 |
- ) |
756 |
- ) |
757 |
- ) |
758 |
- !video_cards_r600? ( |
759 |
- !video_cards_radeon? ( |
760 |
- !video_cards_radeonsi? ( |
761 |
- ${CLANG_DEPSTR} |
762 |
- ) |
763 |
- ) |
764 |
- ) |
765 |
- ) |
766 |
- !opencl? ( |
767 |
- video_cards_r600? ( |
768 |
- ${LLVM_DEPSTR_AMDGPU} |
769 |
- ) |
770 |
- !video_cards_r600? ( |
771 |
- video_cards_radeonsi? ( |
772 |
- ${LLVM_DEPSTR_AMDGPU} |
773 |
- ) |
774 |
- ) |
775 |
- !video_cards_r600? ( |
776 |
- !video_cards_radeonsi? ( |
777 |
- video_cards_radeon? ( |
778 |
- ${LLVM_DEPSTR_AMDGPU} |
779 |
- ) |
780 |
- ) |
781 |
- ) |
782 |
- !video_cards_r600? ( |
783 |
- !video_cards_radeon? ( |
784 |
- !video_cards_radeonsi? ( |
785 |
- ${LLVM_DEPSTR} |
786 |
- ) |
787 |
- ) |
788 |
- ) |
789 |
- ) |
790 |
- ) |
791 |
-" |
792 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
793 |
- |
794 |
-DEPEND="${RDEPEND} |
795 |
- ${PYTHON_DEPS} |
796 |
- opencl? ( |
797 |
- >=sys-devel/gcc-4.6 |
798 |
- ) |
799 |
- sys-devel/gettext |
800 |
- virtual/pkgconfig |
801 |
- valgrind? ( dev-util/valgrind ) |
802 |
- x11-base/xorg-proto |
803 |
- vulkan? ( |
804 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
805 |
- ) |
806 |
-" |
807 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
808 |
- sys-devel/bison |
809 |
- sys-devel/flex |
810 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
811 |
-" |
812 |
- |
813 |
-S="${WORKDIR}/${MY_P}" |
814 |
-EGIT_CHECKOUT_DIR=${S} |
815 |
- |
816 |
-QA_WX_LOAD=" |
817 |
-x86? ( |
818 |
- !pic? ( |
819 |
- usr/lib*/libglapi.so.0.0.0 |
820 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
821 |
- usr/lib*/libGLESv2.so.2.0.0 |
822 |
- usr/lib*/libGL.so.1.2.0 |
823 |
- usr/lib*/libOSMesa.so.8.0.0 |
824 |
- ) |
825 |
-)" |
826 |
- |
827 |
-llvm_check_deps() { |
828 |
- local flags=${MULTILIB_USEDEP} |
829 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
830 |
- then |
831 |
- flags+=",llvm_targets_AMDGPU(-)" |
832 |
- fi |
833 |
- |
834 |
- if use opencl; then |
835 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
836 |
- fi |
837 |
- has_version "sys-devel/llvm[${flags}]" |
838 |
-} |
839 |
- |
840 |
-pkg_setup() { |
841 |
- # warning message for bug 459306 |
842 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
843 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
844 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
845 |
- fi |
846 |
- |
847 |
- if use llvm; then |
848 |
- llvm_pkg_setup |
849 |
- fi |
850 |
- python-any-r1_pkg_setup |
851 |
-} |
852 |
- |
853 |
-src_prepare() { |
854 |
- eapply_user |
855 |
- [[ ${PV} == 9999 ]] && eautoreconf |
856 |
-} |
857 |
- |
858 |
-multilib_src_configure() { |
859 |
- local myconf |
860 |
- |
861 |
- if use classic; then |
862 |
- # Configurable DRI drivers |
863 |
- driver_enable swrast |
864 |
- |
865 |
- # Intel code |
866 |
- driver_enable video_cards_i915 i915 |
867 |
- driver_enable video_cards_i965 i965 |
868 |
- if ! use video_cards_i915 && \ |
869 |
- ! use video_cards_i965; then |
870 |
- driver_enable video_cards_intel i915 i965 |
871 |
- fi |
872 |
- |
873 |
- # Nouveau code |
874 |
- driver_enable video_cards_nouveau nouveau |
875 |
- |
876 |
- # ATI code |
877 |
- driver_enable video_cards_r100 radeon |
878 |
- driver_enable video_cards_r200 r200 |
879 |
- if ! use video_cards_r100 && \ |
880 |
- ! use video_cards_r200; then |
881 |
- driver_enable video_cards_radeon radeon r200 |
882 |
- fi |
883 |
- fi |
884 |
- |
885 |
- if use egl; then |
886 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
887 |
- fi |
888 |
- |
889 |
- if use gallium; then |
890 |
- myconf+=" |
891 |
- $(use_enable d3d9 nine) |
892 |
- $(use_enable llvm) |
893 |
- $(use_enable openmax omx-bellagio) |
894 |
- $(use_enable vaapi va) |
895 |
- $(use_enable vdpau) |
896 |
- $(use_enable xa) |
897 |
- $(use_enable xvmc) |
898 |
- " |
899 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
900 |
- |
901 |
- gallium_enable swrast |
902 |
- gallium_enable video_cards_vc4 vc4 |
903 |
- gallium_enable video_cards_vivante etnaviv |
904 |
- gallium_enable video_cards_vmware svga |
905 |
- gallium_enable video_cards_nouveau nouveau |
906 |
- gallium_enable video_cards_i915 i915 |
907 |
- gallium_enable video_cards_imx imx |
908 |
- if ! use video_cards_i915 && \ |
909 |
- ! use video_cards_i965; then |
910 |
- gallium_enable video_cards_intel i915 |
911 |
- fi |
912 |
- |
913 |
- gallium_enable video_cards_r300 r300 |
914 |
- gallium_enable video_cards_r600 r600 |
915 |
- gallium_enable video_cards_radeonsi radeonsi |
916 |
- if ! use video_cards_r300 && \ |
917 |
- ! use video_cards_r600; then |
918 |
- gallium_enable video_cards_radeon r300 r600 |
919 |
- fi |
920 |
- |
921 |
- gallium_enable video_cards_freedreno freedreno |
922 |
- # opencl stuff |
923 |
- if use opencl; then |
924 |
- myconf+=" |
925 |
- $(use_enable opencl) |
926 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
927 |
- " |
928 |
- fi |
929 |
- |
930 |
- gallium_enable video_cards_virgl virgl |
931 |
- fi |
932 |
- |
933 |
- if use vulkan; then |
934 |
- vulkan_enable video_cards_i965 intel |
935 |
- vulkan_enable video_cards_radeonsi radeon |
936 |
- fi |
937 |
- |
938 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
939 |
- if [[ ${ABI} == x86 ]]; then |
940 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
941 |
- fi |
942 |
- |
943 |
- # on abi_x86_32 hardened we need to have asm disable |
944 |
- if [[ ${ABI} == x86* ]] && use pic; then |
945 |
- myconf+=" --disable-asm" |
946 |
- fi |
947 |
- |
948 |
- if use gallium; then |
949 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
950 |
- else |
951 |
- myconf+=" $(use_enable osmesa)" |
952 |
- fi |
953 |
- |
954 |
- # build fails with BSD indent, bug #428112 |
955 |
- use userland_GNU || export INDENT=cat |
956 |
- |
957 |
- ECONF_SOURCE="${S}" \ |
958 |
- econf \ |
959 |
- --enable-dri \ |
960 |
- --enable-glx \ |
961 |
- --enable-shared-glapi \ |
962 |
- $(use_enable !bindist texture-float) \ |
963 |
- $(use_enable d3d9 nine) \ |
964 |
- $(use_enable debug) \ |
965 |
- $(use_enable dri3) \ |
966 |
- $(use_enable egl) \ |
967 |
- $(use_enable gbm) \ |
968 |
- $(use_enable gles1) \ |
969 |
- $(use_enable gles2) \ |
970 |
- $(use_enable nptl glx-tls) \ |
971 |
- $(use_enable unwind libunwind) \ |
972 |
- --enable-valgrind=$(usex valgrind auto no) \ |
973 |
- --enable-llvm-shared-libs \ |
974 |
- --disable-opencl-icd \ |
975 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
976 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
977 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
978 |
- PYTHON2="${PYTHON}" \ |
979 |
- ${myconf} |
980 |
-} |
981 |
- |
982 |
-multilib_src_install() { |
983 |
- emake install DESTDIR="${D}" |
984 |
- |
985 |
- if use opencl; then |
986 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
987 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
988 |
- dodir ${cl_dir}/{lib,include} |
989 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
990 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
991 |
- "${ED}"${cl_dir} |
992 |
- fi |
993 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
994 |
- mv -f "${ED}"/usr/include/CL \ |
995 |
- "${ED}"${cl_dir}/include |
996 |
- fi |
997 |
- eend $? |
998 |
- fi |
999 |
- |
1000 |
- if use openmax; then |
1001 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
1002 |
- doenvd "${T}"/99mesaxdgomx |
1003 |
- keepdir /usr/share/mesa/xdg |
1004 |
- fi |
1005 |
-} |
1006 |
- |
1007 |
-multilib_src_install_all() { |
1008 |
- find "${ED}" -name '*.la' -delete |
1009 |
- einstalldocs |
1010 |
- |
1011 |
- if use !bindist; then |
1012 |
- dodoc docs/patents.txt |
1013 |
- fi |
1014 |
-} |
1015 |
- |
1016 |
-multilib_src_test() { |
1017 |
- if use llvm; then |
1018 |
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf' |
1019 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
1020 |
- emake ${llvm_tests} |
1021 |
- pax-mark m ${llvm_tests} |
1022 |
- popd >/dev/null || die |
1023 |
- fi |
1024 |
- emake check |
1025 |
-} |
1026 |
- |
1027 |
-pkg_postinst() { |
1028 |
- # Switch to the xorg implementation. |
1029 |
- echo |
1030 |
- eselect opengl set --use-old ${OPENGL_DIR} |
1031 |
- |
1032 |
- # Switch to mesa opencl |
1033 |
- if use opencl; then |
1034 |
- eselect opencl set --use-old ${PN} |
1035 |
- fi |
1036 |
- |
1037 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
1038 |
- if use openmax; then |
1039 |
- ebegin "Registering OpenMAX drivers" |
1040 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
1041 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
1042 |
- omxregister-bellagio |
1043 |
- eend $? |
1044 |
- fi |
1045 |
- |
1046 |
- # warn about patent encumbered texture-float |
1047 |
- if use !bindist; then |
1048 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
1049 |
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
1050 |
- elog "explanation." |
1051 |
- fi |
1052 |
-} |
1053 |
- |
1054 |
-pkg_prerm() { |
1055 |
- if use openmax; then |
1056 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
1057 |
- fi |
1058 |
-} |
1059 |
- |
1060 |
-# $1 - VIDEO_CARDS flag |
1061 |
-# other args - names of DRI drivers to enable |
1062 |
-# TODO: avoid code duplication for a more elegant implementation |
1063 |
-driver_enable() { |
1064 |
- case $# in |
1065 |
- # for enabling unconditionally |
1066 |
- 1) |
1067 |
- DRI_DRIVERS+=",$1" |
1068 |
- ;; |
1069 |
- *) |
1070 |
- if use $1; then |
1071 |
- shift |
1072 |
- for i in $@; do |
1073 |
- DRI_DRIVERS+=",${i}" |
1074 |
- done |
1075 |
- fi |
1076 |
- ;; |
1077 |
- esac |
1078 |
-} |
1079 |
- |
1080 |
-gallium_enable() { |
1081 |
- case $# in |
1082 |
- # for enabling unconditionally |
1083 |
- 1) |
1084 |
- GALLIUM_DRIVERS+=",$1" |
1085 |
- ;; |
1086 |
- *) |
1087 |
- if use $1; then |
1088 |
- shift |
1089 |
- for i in $@; do |
1090 |
- GALLIUM_DRIVERS+=",${i}" |
1091 |
- done |
1092 |
- fi |
1093 |
- ;; |
1094 |
- esac |
1095 |
-} |
1096 |
- |
1097 |
-vulkan_enable() { |
1098 |
- case $# in |
1099 |
- # for enabling unconditionally |
1100 |
- 1) |
1101 |
- VULKAN_DRIVERS+=",$1" |
1102 |
- ;; |
1103 |
- *) |
1104 |
- if use $1; then |
1105 |
- shift |
1106 |
- for i in $@; do |
1107 |
- VULKAN_DRIVERS+=",${i}" |
1108 |
- done |
1109 |
- fi |
1110 |
- ;; |
1111 |
- esac |
1112 |
-} |
1113 |
|
1114 |
diff --git a/media-libs/mesa/mesa-18.1.2.ebuild b/media-libs/mesa/mesa-18.1.2.ebuild |
1115 |
deleted file mode 100644 |
1116 |
index 174ef6902cf..00000000000 |
1117 |
--- a/media-libs/mesa/mesa-18.1.2.ebuild |
1118 |
+++ /dev/null |
1119 |
@@ -1,539 +0,0 @@ |
1120 |
-# Copyright 1999-2018 Gentoo Foundation |
1121 |
-# Distributed under the terms of the GNU General Public License v2 |
1122 |
- |
1123 |
-EAPI=6 |
1124 |
- |
1125 |
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
1126 |
- |
1127 |
-if [[ ${PV} = 9999 ]]; then |
1128 |
- GIT_ECLASS="git-r3" |
1129 |
- EXPERIMENTAL="true" |
1130 |
-fi |
1131 |
- |
1132 |
-PYTHON_COMPAT=( python2_7 ) |
1133 |
- |
1134 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
1135 |
- |
1136 |
-OPENGL_DIR="xorg-x11" |
1137 |
- |
1138 |
-MY_P="${P/_/-}" |
1139 |
- |
1140 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
1141 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
1142 |
- |
1143 |
-if [[ $PV == 9999 ]]; then |
1144 |
- SRC_URI="" |
1145 |
-else |
1146 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
1147 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
1148 |
-fi |
1149 |
- |
1150 |
-LICENSE="MIT" |
1151 |
-SLOT="0" |
1152 |
-RESTRICT="!bindist? ( bindist )" |
1153 |
- |
1154 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
1155 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
1156 |
-for card in ${VIDEO_CARDS}; do |
1157 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
1158 |
-done |
1159 |
- |
1160 |
-IUSE="${IUSE_VIDEO_CARDS} |
1161 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
1162 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
1163 |
- vdpau vulkan wayland xvmc xa" |
1164 |
- |
1165 |
-REQUIRED_USE=" |
1166 |
- d3d9? ( dri3 gallium ) |
1167 |
- llvm? ( gallium ) |
1168 |
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) ) |
1169 |
- openmax? ( gallium ) |
1170 |
- gles1? ( egl ) |
1171 |
- gles2? ( egl ) |
1172 |
- vaapi? ( gallium ) |
1173 |
- vdpau? ( gallium ) |
1174 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
1175 |
- video_cards_radeonsi? ( llvm ) ) |
1176 |
- wayland? ( egl gbm ) |
1177 |
- xa? ( gallium ) |
1178 |
- video_cards_freedreno? ( gallium ) |
1179 |
- video_cards_intel? ( classic ) |
1180 |
- video_cards_i915? ( || ( classic gallium ) ) |
1181 |
- video_cards_i965? ( classic ) |
1182 |
- video_cards_imx? ( gallium video_cards_vivante ) |
1183 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
1184 |
- video_cards_radeon? ( || ( classic gallium ) |
1185 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
1186 |
- video_cards_r100? ( classic ) |
1187 |
- video_cards_r200? ( classic ) |
1188 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
1189 |
- video_cards_r600? ( gallium ) |
1190 |
- video_cards_radeonsi? ( gallium llvm ) |
1191 |
- video_cards_vc4? ( gallium ) |
1192 |
- video_cards_virgl? ( gallium ) |
1193 |
- video_cards_vivante? ( gallium gbm ) |
1194 |
- video_cards_vmware? ( gallium ) |
1195 |
-" |
1196 |
- |
1197 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91" |
1198 |
-RDEPEND=" |
1199 |
- !app-eselect/eselect-mesa |
1200 |
- >=app-eselect/eselect-opengl-1.3.0 |
1201 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
1202 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
1203 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
1204 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
1205 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
1206 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
1207 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
1208 |
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
1209 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
1210 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
1211 |
- llvm? ( |
1212 |
- video_cards_radeonsi? ( |
1213 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1214 |
- ) |
1215 |
- video_cards_r600? ( |
1216 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1217 |
- ) |
1218 |
- video_cards_radeon? ( |
1219 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1220 |
- ) |
1221 |
- ) |
1222 |
- opencl? ( |
1223 |
- app-eselect/eselect-opencl |
1224 |
- dev-libs/libclc |
1225 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1226 |
- ) |
1227 |
- openmax? ( |
1228 |
- >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] |
1229 |
- x11-misc/xdg-utils |
1230 |
- ) |
1231 |
- vaapi? ( |
1232 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
1233 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
1234 |
- ) |
1235 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
1236 |
- wayland? ( |
1237 |
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] |
1238 |
- >=dev-libs/wayland-protocols-1.8 |
1239 |
- ) |
1240 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
1241 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
1242 |
- |
1243 |
- video_cards_intel? ( |
1244 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1245 |
- ) |
1246 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1247 |
-" |
1248 |
-for card in ${RADEON_CARDS}; do |
1249 |
- RDEPEND="${RDEPEND} |
1250 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
1251 |
- " |
1252 |
-done |
1253 |
-RDEPEND="${RDEPEND} |
1254 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
1255 |
-" |
1256 |
- |
1257 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
1258 |
-# we need to *really* make sure we're not pulling one than more slot |
1259 |
-# simultaneously. |
1260 |
-# |
1261 |
-# How to use it: |
1262 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
1263 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
1264 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
1265 |
-LLVM_DEPSTR=" |
1266 |
- || ( |
1267 |
- sys-devel/llvm:7[${MULTILIB_USEDEP}] |
1268 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
1269 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
1270 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1271 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
1272 |
- ) |
1273 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
1274 |
-" |
1275 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
1276 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
1277 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
1278 |
-RDEPEND="${RDEPEND} |
1279 |
- llvm? ( |
1280 |
- opencl? ( |
1281 |
- video_cards_r600? ( |
1282 |
- ${CLANG_DEPSTR_AMDGPU} |
1283 |
- ) |
1284 |
- !video_cards_r600? ( |
1285 |
- video_cards_radeonsi? ( |
1286 |
- ${CLANG_DEPSTR_AMDGPU} |
1287 |
- ) |
1288 |
- ) |
1289 |
- !video_cards_r600? ( |
1290 |
- !video_cards_radeonsi? ( |
1291 |
- video_cards_radeon? ( |
1292 |
- ${CLANG_DEPSTR_AMDGPU} |
1293 |
- ) |
1294 |
- ) |
1295 |
- ) |
1296 |
- !video_cards_r600? ( |
1297 |
- !video_cards_radeon? ( |
1298 |
- !video_cards_radeonsi? ( |
1299 |
- ${CLANG_DEPSTR} |
1300 |
- ) |
1301 |
- ) |
1302 |
- ) |
1303 |
- ) |
1304 |
- !opencl? ( |
1305 |
- video_cards_r600? ( |
1306 |
- ${LLVM_DEPSTR_AMDGPU} |
1307 |
- ) |
1308 |
- !video_cards_r600? ( |
1309 |
- video_cards_radeonsi? ( |
1310 |
- ${LLVM_DEPSTR_AMDGPU} |
1311 |
- ) |
1312 |
- ) |
1313 |
- !video_cards_r600? ( |
1314 |
- !video_cards_radeonsi? ( |
1315 |
- video_cards_radeon? ( |
1316 |
- ${LLVM_DEPSTR_AMDGPU} |
1317 |
- ) |
1318 |
- ) |
1319 |
- ) |
1320 |
- !video_cards_r600? ( |
1321 |
- !video_cards_radeon? ( |
1322 |
- !video_cards_radeonsi? ( |
1323 |
- ${LLVM_DEPSTR} |
1324 |
- ) |
1325 |
- ) |
1326 |
- ) |
1327 |
- ) |
1328 |
- ) |
1329 |
-" |
1330 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
1331 |
- |
1332 |
-DEPEND="${RDEPEND} |
1333 |
- ${PYTHON_DEPS} |
1334 |
- opencl? ( |
1335 |
- >=sys-devel/gcc-4.6 |
1336 |
- ) |
1337 |
- sys-devel/gettext |
1338 |
- virtual/pkgconfig |
1339 |
- valgrind? ( dev-util/valgrind ) |
1340 |
- x11-base/xorg-proto |
1341 |
- vulkan? ( |
1342 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
1343 |
- ) |
1344 |
-" |
1345 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
1346 |
- sys-devel/bison |
1347 |
- sys-devel/flex |
1348 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
1349 |
-" |
1350 |
- |
1351 |
-S="${WORKDIR}/${MY_P}" |
1352 |
-EGIT_CHECKOUT_DIR=${S} |
1353 |
- |
1354 |
-QA_WX_LOAD=" |
1355 |
-x86? ( |
1356 |
- !pic? ( |
1357 |
- usr/lib*/libglapi.so.0.0.0 |
1358 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
1359 |
- usr/lib*/libGLESv2.so.2.0.0 |
1360 |
- usr/lib*/libGL.so.1.2.0 |
1361 |
- usr/lib*/libOSMesa.so.8.0.0 |
1362 |
- ) |
1363 |
-)" |
1364 |
- |
1365 |
-llvm_check_deps() { |
1366 |
- local flags=${MULTILIB_USEDEP} |
1367 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
1368 |
- then |
1369 |
- flags+=",llvm_targets_AMDGPU(-)" |
1370 |
- fi |
1371 |
- |
1372 |
- if use opencl; then |
1373 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
1374 |
- fi |
1375 |
- has_version "sys-devel/llvm[${flags}]" |
1376 |
-} |
1377 |
- |
1378 |
-pkg_setup() { |
1379 |
- # warning message for bug 459306 |
1380 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
1381 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
1382 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
1383 |
- fi |
1384 |
- |
1385 |
- if use llvm; then |
1386 |
- llvm_pkg_setup |
1387 |
- fi |
1388 |
- python-any-r1_pkg_setup |
1389 |
-} |
1390 |
- |
1391 |
-src_prepare() { |
1392 |
- eapply_user |
1393 |
- [[ ${PV} == 9999 ]] && eautoreconf |
1394 |
-} |
1395 |
- |
1396 |
-multilib_src_configure() { |
1397 |
- local myconf |
1398 |
- |
1399 |
- if use classic; then |
1400 |
- # Configurable DRI drivers |
1401 |
- driver_enable swrast |
1402 |
- |
1403 |
- # Intel code |
1404 |
- driver_enable video_cards_i915 i915 |
1405 |
- driver_enable video_cards_i965 i965 |
1406 |
- if ! use video_cards_i915 && \ |
1407 |
- ! use video_cards_i965; then |
1408 |
- driver_enable video_cards_intel i915 i965 |
1409 |
- fi |
1410 |
- |
1411 |
- # Nouveau code |
1412 |
- driver_enable video_cards_nouveau nouveau |
1413 |
- |
1414 |
- # ATI code |
1415 |
- driver_enable video_cards_r100 radeon |
1416 |
- driver_enable video_cards_r200 r200 |
1417 |
- if ! use video_cards_r100 && \ |
1418 |
- ! use video_cards_r200; then |
1419 |
- driver_enable video_cards_radeon radeon r200 |
1420 |
- fi |
1421 |
- fi |
1422 |
- |
1423 |
- if use egl; then |
1424 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
1425 |
- fi |
1426 |
- |
1427 |
- if use gallium; then |
1428 |
- myconf+=" |
1429 |
- $(use_enable d3d9 nine) |
1430 |
- $(use_enable llvm) |
1431 |
- $(use_enable openmax omx-bellagio) |
1432 |
- $(use_enable vaapi va) |
1433 |
- $(use_enable vdpau) |
1434 |
- $(use_enable xa) |
1435 |
- $(use_enable xvmc) |
1436 |
- " |
1437 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
1438 |
- |
1439 |
- gallium_enable swrast |
1440 |
- gallium_enable video_cards_vc4 vc4 |
1441 |
- gallium_enable video_cards_vivante etnaviv |
1442 |
- gallium_enable video_cards_vmware svga |
1443 |
- gallium_enable video_cards_nouveau nouveau |
1444 |
- gallium_enable video_cards_i915 i915 |
1445 |
- gallium_enable video_cards_imx imx |
1446 |
- if ! use video_cards_i915 && \ |
1447 |
- ! use video_cards_i965; then |
1448 |
- gallium_enable video_cards_intel i915 |
1449 |
- fi |
1450 |
- |
1451 |
- gallium_enable video_cards_r300 r300 |
1452 |
- gallium_enable video_cards_r600 r600 |
1453 |
- gallium_enable video_cards_radeonsi radeonsi |
1454 |
- if ! use video_cards_r300 && \ |
1455 |
- ! use video_cards_r600; then |
1456 |
- gallium_enable video_cards_radeon r300 r600 |
1457 |
- fi |
1458 |
- |
1459 |
- gallium_enable video_cards_freedreno freedreno |
1460 |
- # opencl stuff |
1461 |
- if use opencl; then |
1462 |
- myconf+=" |
1463 |
- $(use_enable opencl) |
1464 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
1465 |
- " |
1466 |
- fi |
1467 |
- |
1468 |
- gallium_enable video_cards_virgl virgl |
1469 |
- fi |
1470 |
- |
1471 |
- if use vulkan; then |
1472 |
- vulkan_enable video_cards_i965 intel |
1473 |
- vulkan_enable video_cards_radeonsi radeon |
1474 |
- fi |
1475 |
- |
1476 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
1477 |
- if [[ ${ABI} == x86 ]]; then |
1478 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
1479 |
- fi |
1480 |
- |
1481 |
- # on abi_x86_32 hardened we need to have asm disable |
1482 |
- if [[ ${ABI} == x86* ]] && use pic; then |
1483 |
- myconf+=" --disable-asm" |
1484 |
- fi |
1485 |
- |
1486 |
- if use gallium; then |
1487 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
1488 |
- else |
1489 |
- myconf+=" $(use_enable osmesa)" |
1490 |
- fi |
1491 |
- |
1492 |
- # build fails with BSD indent, bug #428112 |
1493 |
- use userland_GNU || export INDENT=cat |
1494 |
- |
1495 |
- ECONF_SOURCE="${S}" \ |
1496 |
- econf \ |
1497 |
- --enable-dri \ |
1498 |
- --enable-glx \ |
1499 |
- --enable-shared-glapi \ |
1500 |
- $(use_enable !bindist texture-float) \ |
1501 |
- $(use_enable d3d9 nine) \ |
1502 |
- $(use_enable debug) \ |
1503 |
- $(use_enable dri3) \ |
1504 |
- $(use_enable egl) \ |
1505 |
- $(use_enable gbm) \ |
1506 |
- $(use_enable gles1) \ |
1507 |
- $(use_enable gles2) \ |
1508 |
- $(use_enable nptl glx-tls) \ |
1509 |
- $(use_enable unwind libunwind) \ |
1510 |
- --enable-valgrind=$(usex valgrind auto no) \ |
1511 |
- --enable-llvm-shared-libs \ |
1512 |
- --disable-opencl-icd \ |
1513 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
1514 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
1515 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
1516 |
- PYTHON2="${PYTHON}" \ |
1517 |
- ${myconf} |
1518 |
-} |
1519 |
- |
1520 |
-multilib_src_install() { |
1521 |
- emake install DESTDIR="${D}" |
1522 |
- |
1523 |
- if use wayland; then |
1524 |
- # These files are now provided by >=dev-libs/wayland-1.15.0 |
1525 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die |
1526 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die |
1527 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die |
1528 |
- rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die |
1529 |
- fi |
1530 |
- |
1531 |
- if use opencl; then |
1532 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
1533 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
1534 |
- dodir ${cl_dir}/{lib,include} |
1535 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
1536 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
1537 |
- "${ED}"${cl_dir} |
1538 |
- fi |
1539 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
1540 |
- mv -f "${ED}"/usr/include/CL \ |
1541 |
- "${ED}"${cl_dir}/include |
1542 |
- fi |
1543 |
- eend $? |
1544 |
- fi |
1545 |
- |
1546 |
- if use openmax; then |
1547 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
1548 |
- doenvd "${T}"/99mesaxdgomx |
1549 |
- keepdir /usr/share/mesa/xdg |
1550 |
- fi |
1551 |
-} |
1552 |
- |
1553 |
-multilib_src_install_all() { |
1554 |
- find "${ED}" -name '*.la' -delete |
1555 |
- einstalldocs |
1556 |
- |
1557 |
- if use !bindist; then |
1558 |
- dodoc docs/patents.txt |
1559 |
- fi |
1560 |
-} |
1561 |
- |
1562 |
-multilib_src_test() { |
1563 |
- if use llvm; then |
1564 |
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf' |
1565 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
1566 |
- emake ${llvm_tests} |
1567 |
- pax-mark m ${llvm_tests} |
1568 |
- popd >/dev/null || die |
1569 |
- fi |
1570 |
- emake check |
1571 |
-} |
1572 |
- |
1573 |
-pkg_postinst() { |
1574 |
- # Switch to the xorg implementation. |
1575 |
- echo |
1576 |
- eselect opengl set --use-old ${OPENGL_DIR} |
1577 |
- |
1578 |
- # Switch to mesa opencl |
1579 |
- if use opencl; then |
1580 |
- eselect opencl set --use-old ${PN} |
1581 |
- fi |
1582 |
- |
1583 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
1584 |
- if use openmax; then |
1585 |
- ebegin "Registering OpenMAX drivers" |
1586 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
1587 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
1588 |
- omxregister-bellagio |
1589 |
- eend $? |
1590 |
- fi |
1591 |
- |
1592 |
- # warn about patent encumbered texture-float |
1593 |
- if use !bindist; then |
1594 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
1595 |
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
1596 |
- elog "explanation." |
1597 |
- fi |
1598 |
-} |
1599 |
- |
1600 |
-pkg_prerm() { |
1601 |
- if use openmax; then |
1602 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
1603 |
- fi |
1604 |
-} |
1605 |
- |
1606 |
-# $1 - VIDEO_CARDS flag |
1607 |
-# other args - names of DRI drivers to enable |
1608 |
-# TODO: avoid code duplication for a more elegant implementation |
1609 |
-driver_enable() { |
1610 |
- case $# in |
1611 |
- # for enabling unconditionally |
1612 |
- 1) |
1613 |
- DRI_DRIVERS+=",$1" |
1614 |
- ;; |
1615 |
- *) |
1616 |
- if use $1; then |
1617 |
- shift |
1618 |
- for i in $@; do |
1619 |
- DRI_DRIVERS+=",${i}" |
1620 |
- done |
1621 |
- fi |
1622 |
- ;; |
1623 |
- esac |
1624 |
-} |
1625 |
- |
1626 |
-gallium_enable() { |
1627 |
- case $# in |
1628 |
- # for enabling unconditionally |
1629 |
- 1) |
1630 |
- GALLIUM_DRIVERS+=",$1" |
1631 |
- ;; |
1632 |
- *) |
1633 |
- if use $1; then |
1634 |
- shift |
1635 |
- for i in $@; do |
1636 |
- GALLIUM_DRIVERS+=",${i}" |
1637 |
- done |
1638 |
- fi |
1639 |
- ;; |
1640 |
- esac |
1641 |
-} |
1642 |
- |
1643 |
-vulkan_enable() { |
1644 |
- case $# in |
1645 |
- # for enabling unconditionally |
1646 |
- 1) |
1647 |
- VULKAN_DRIVERS+=",$1" |
1648 |
- ;; |
1649 |
- *) |
1650 |
- if use $1; then |
1651 |
- shift |
1652 |
- for i in $@; do |
1653 |
- VULKAN_DRIVERS+=",${i}" |
1654 |
- done |
1655 |
- fi |
1656 |
- ;; |
1657 |
- esac |
1658 |
-} |
1659 |
|
1660 |
diff --git a/media-libs/mesa/mesa-18.1.3.ebuild b/media-libs/mesa/mesa-18.1.3.ebuild |
1661 |
deleted file mode 100644 |
1662 |
index fab79931039..00000000000 |
1663 |
--- a/media-libs/mesa/mesa-18.1.3.ebuild |
1664 |
+++ /dev/null |
1665 |
@@ -1,540 +0,0 @@ |
1666 |
-# Copyright 1999-2018 Gentoo Foundation |
1667 |
-# Distributed under the terms of the GNU General Public License v2 |
1668 |
- |
1669 |
-EAPI=6 |
1670 |
- |
1671 |
-EGIT_REPO_URI="https://gitlab.freedesktop.org/mesa/mesa.git" |
1672 |
- |
1673 |
-if [[ ${PV} = 9999 ]]; then |
1674 |
- GIT_ECLASS="git-r3" |
1675 |
- EXPERIMENTAL="true" |
1676 |
-fi |
1677 |
- |
1678 |
-PYTHON_COMPAT=( python2_7 ) |
1679 |
- |
1680 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
1681 |
- |
1682 |
-OPENGL_DIR="xorg-x11" |
1683 |
- |
1684 |
-MY_P="${P/_/-}" |
1685 |
- |
1686 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
1687 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
1688 |
- |
1689 |
-if [[ $PV == 9999 ]]; then |
1690 |
- SRC_URI="" |
1691 |
-else |
1692 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
1693 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
1694 |
-fi |
1695 |
- |
1696 |
-LICENSE="MIT" |
1697 |
-SLOT="0" |
1698 |
-RESTRICT="!bindist? ( bindist )" |
1699 |
- |
1700 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
1701 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
1702 |
-for card in ${VIDEO_CARDS}; do |
1703 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
1704 |
-done |
1705 |
- |
1706 |
-IUSE="${IUSE_VIDEO_CARDS} |
1707 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
1708 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
1709 |
- vdpau vulkan wayland xvmc xa" |
1710 |
- |
1711 |
-REQUIRED_USE=" |
1712 |
- d3d9? ( dri3 gallium ) |
1713 |
- llvm? ( gallium ) |
1714 |
- opencl? ( gallium llvm || ( video_cards_r600 video_cards_radeonsi ) ) |
1715 |
- openmax? ( gallium ) |
1716 |
- gles1? ( egl ) |
1717 |
- gles2? ( egl ) |
1718 |
- vaapi? ( gallium ) |
1719 |
- vdpau? ( gallium ) |
1720 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
1721 |
- video_cards_radeonsi? ( llvm ) ) |
1722 |
- wayland? ( egl gbm ) |
1723 |
- xa? ( gallium ) |
1724 |
- video_cards_freedreno? ( gallium ) |
1725 |
- video_cards_intel? ( classic ) |
1726 |
- video_cards_i915? ( || ( classic gallium ) ) |
1727 |
- video_cards_i965? ( classic ) |
1728 |
- video_cards_imx? ( gallium video_cards_vivante ) |
1729 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
1730 |
- video_cards_radeon? ( || ( classic gallium ) |
1731 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
1732 |
- video_cards_r100? ( classic ) |
1733 |
- video_cards_r200? ( classic ) |
1734 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
1735 |
- video_cards_r600? ( gallium ) |
1736 |
- video_cards_radeonsi? ( gallium llvm ) |
1737 |
- video_cards_vc4? ( gallium ) |
1738 |
- video_cards_virgl? ( gallium ) |
1739 |
- video_cards_vivante? ( gallium gbm ) |
1740 |
- video_cards_vmware? ( gallium ) |
1741 |
-" |
1742 |
- |
1743 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.91" |
1744 |
-RDEPEND=" |
1745 |
- !app-eselect/eselect-mesa |
1746 |
- >=app-eselect/eselect-opengl-1.3.0 |
1747 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
1748 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
1749 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
1750 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
1751 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
1752 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
1753 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
1754 |
- >=x11-libs/libxcb-1.13:=[${MULTILIB_USEDEP}] |
1755 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
1756 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
1757 |
- llvm? ( |
1758 |
- video_cards_radeonsi? ( |
1759 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1760 |
- ) |
1761 |
- video_cards_r600? ( |
1762 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1763 |
- ) |
1764 |
- video_cards_radeon? ( |
1765 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1766 |
- ) |
1767 |
- ) |
1768 |
- opencl? ( |
1769 |
- app-eselect/eselect-opencl |
1770 |
- dev-libs/libclc |
1771 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
1772 |
- ) |
1773 |
- openmax? ( |
1774 |
- >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] |
1775 |
- x11-misc/xdg-utils |
1776 |
- ) |
1777 |
- vaapi? ( |
1778 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
1779 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
1780 |
- ) |
1781 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
1782 |
- wayland? ( |
1783 |
- >=dev-libs/wayland-1.15.0:=[${MULTILIB_USEDEP}] |
1784 |
- >=dev-libs/wayland-protocols-1.8 |
1785 |
- ) |
1786 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
1787 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
1788 |
- |
1789 |
- video_cards_intel? ( |
1790 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1791 |
- ) |
1792 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
1793 |
-" |
1794 |
-for card in ${RADEON_CARDS}; do |
1795 |
- RDEPEND="${RDEPEND} |
1796 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
1797 |
- " |
1798 |
-done |
1799 |
-RDEPEND="${RDEPEND} |
1800 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
1801 |
-" |
1802 |
- |
1803 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
1804 |
-# we need to *really* make sure we're not pulling one than more slot |
1805 |
-# simultaneously. |
1806 |
-# |
1807 |
-# How to use it: |
1808 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
1809 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
1810 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
1811 |
-LLVM_MAX_SLOT="6" |
1812 |
-LLVM_DEPSTR=" |
1813 |
- || ( |
1814 |
- sys-devel/llvm:7[${MULTILIB_USEDEP}] |
1815 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
1816 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
1817 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
1818 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
1819 |
- ) |
1820 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
1821 |
-" |
1822 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
1823 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
1824 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
1825 |
-RDEPEND="${RDEPEND} |
1826 |
- llvm? ( |
1827 |
- opencl? ( |
1828 |
- video_cards_r600? ( |
1829 |
- ${CLANG_DEPSTR_AMDGPU} |
1830 |
- ) |
1831 |
- !video_cards_r600? ( |
1832 |
- video_cards_radeonsi? ( |
1833 |
- ${CLANG_DEPSTR_AMDGPU} |
1834 |
- ) |
1835 |
- ) |
1836 |
- !video_cards_r600? ( |
1837 |
- !video_cards_radeonsi? ( |
1838 |
- video_cards_radeon? ( |
1839 |
- ${CLANG_DEPSTR_AMDGPU} |
1840 |
- ) |
1841 |
- ) |
1842 |
- ) |
1843 |
- !video_cards_r600? ( |
1844 |
- !video_cards_radeon? ( |
1845 |
- !video_cards_radeonsi? ( |
1846 |
- ${CLANG_DEPSTR} |
1847 |
- ) |
1848 |
- ) |
1849 |
- ) |
1850 |
- ) |
1851 |
- !opencl? ( |
1852 |
- video_cards_r600? ( |
1853 |
- ${LLVM_DEPSTR_AMDGPU} |
1854 |
- ) |
1855 |
- !video_cards_r600? ( |
1856 |
- video_cards_radeonsi? ( |
1857 |
- ${LLVM_DEPSTR_AMDGPU} |
1858 |
- ) |
1859 |
- ) |
1860 |
- !video_cards_r600? ( |
1861 |
- !video_cards_radeonsi? ( |
1862 |
- video_cards_radeon? ( |
1863 |
- ${LLVM_DEPSTR_AMDGPU} |
1864 |
- ) |
1865 |
- ) |
1866 |
- ) |
1867 |
- !video_cards_r600? ( |
1868 |
- !video_cards_radeon? ( |
1869 |
- !video_cards_radeonsi? ( |
1870 |
- ${LLVM_DEPSTR} |
1871 |
- ) |
1872 |
- ) |
1873 |
- ) |
1874 |
- ) |
1875 |
- ) |
1876 |
-" |
1877 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
1878 |
- |
1879 |
-DEPEND="${RDEPEND} |
1880 |
- ${PYTHON_DEPS} |
1881 |
- opencl? ( |
1882 |
- >=sys-devel/gcc-4.6 |
1883 |
- ) |
1884 |
- sys-devel/gettext |
1885 |
- virtual/pkgconfig |
1886 |
- valgrind? ( dev-util/valgrind ) |
1887 |
- x11-base/xorg-proto |
1888 |
- vulkan? ( |
1889 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
1890 |
- ) |
1891 |
-" |
1892 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
1893 |
- sys-devel/bison |
1894 |
- sys-devel/flex |
1895 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
1896 |
-" |
1897 |
- |
1898 |
-S="${WORKDIR}/${MY_P}" |
1899 |
-EGIT_CHECKOUT_DIR=${S} |
1900 |
- |
1901 |
-QA_WX_LOAD=" |
1902 |
-x86? ( |
1903 |
- !pic? ( |
1904 |
- usr/lib*/libglapi.so.0.0.0 |
1905 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
1906 |
- usr/lib*/libGLESv2.so.2.0.0 |
1907 |
- usr/lib*/libGL.so.1.2.0 |
1908 |
- usr/lib*/libOSMesa.so.8.0.0 |
1909 |
- ) |
1910 |
-)" |
1911 |
- |
1912 |
-llvm_check_deps() { |
1913 |
- local flags=${MULTILIB_USEDEP} |
1914 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
1915 |
- then |
1916 |
- flags+=",llvm_targets_AMDGPU(-)" |
1917 |
- fi |
1918 |
- |
1919 |
- if use opencl; then |
1920 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
1921 |
- fi |
1922 |
- has_version "sys-devel/llvm[${flags}]" |
1923 |
-} |
1924 |
- |
1925 |
-pkg_setup() { |
1926 |
- # warning message for bug 459306 |
1927 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
1928 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
1929 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
1930 |
- fi |
1931 |
- |
1932 |
- if use llvm; then |
1933 |
- llvm_pkg_setup |
1934 |
- fi |
1935 |
- python-any-r1_pkg_setup |
1936 |
-} |
1937 |
- |
1938 |
-src_prepare() { |
1939 |
- eapply_user |
1940 |
- [[ ${PV} == 9999 ]] && eautoreconf |
1941 |
-} |
1942 |
- |
1943 |
-multilib_src_configure() { |
1944 |
- local myconf |
1945 |
- |
1946 |
- if use classic; then |
1947 |
- # Configurable DRI drivers |
1948 |
- driver_enable swrast |
1949 |
- |
1950 |
- # Intel code |
1951 |
- driver_enable video_cards_i915 i915 |
1952 |
- driver_enable video_cards_i965 i965 |
1953 |
- if ! use video_cards_i915 && \ |
1954 |
- ! use video_cards_i965; then |
1955 |
- driver_enable video_cards_intel i915 i965 |
1956 |
- fi |
1957 |
- |
1958 |
- # Nouveau code |
1959 |
- driver_enable video_cards_nouveau nouveau |
1960 |
- |
1961 |
- # ATI code |
1962 |
- driver_enable video_cards_r100 radeon |
1963 |
- driver_enable video_cards_r200 r200 |
1964 |
- if ! use video_cards_r100 && \ |
1965 |
- ! use video_cards_r200; then |
1966 |
- driver_enable video_cards_radeon radeon r200 |
1967 |
- fi |
1968 |
- fi |
1969 |
- |
1970 |
- if use egl; then |
1971 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
1972 |
- fi |
1973 |
- |
1974 |
- if use gallium; then |
1975 |
- myconf+=" |
1976 |
- $(use_enable d3d9 nine) |
1977 |
- $(use_enable llvm) |
1978 |
- $(use_enable openmax omx-bellagio) |
1979 |
- $(use_enable vaapi va) |
1980 |
- $(use_enable vdpau) |
1981 |
- $(use_enable xa) |
1982 |
- $(use_enable xvmc) |
1983 |
- " |
1984 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
1985 |
- |
1986 |
- gallium_enable swrast |
1987 |
- gallium_enable video_cards_vc4 vc4 |
1988 |
- gallium_enable video_cards_vivante etnaviv |
1989 |
- gallium_enable video_cards_vmware svga |
1990 |
- gallium_enable video_cards_nouveau nouveau |
1991 |
- gallium_enable video_cards_i915 i915 |
1992 |
- gallium_enable video_cards_imx imx |
1993 |
- if ! use video_cards_i915 && \ |
1994 |
- ! use video_cards_i965; then |
1995 |
- gallium_enable video_cards_intel i915 |
1996 |
- fi |
1997 |
- |
1998 |
- gallium_enable video_cards_r300 r300 |
1999 |
- gallium_enable video_cards_r600 r600 |
2000 |
- gallium_enable video_cards_radeonsi radeonsi |
2001 |
- if ! use video_cards_r300 && \ |
2002 |
- ! use video_cards_r600; then |
2003 |
- gallium_enable video_cards_radeon r300 r600 |
2004 |
- fi |
2005 |
- |
2006 |
- gallium_enable video_cards_freedreno freedreno |
2007 |
- # opencl stuff |
2008 |
- if use opencl; then |
2009 |
- myconf+=" |
2010 |
- $(use_enable opencl) |
2011 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
2012 |
- " |
2013 |
- fi |
2014 |
- |
2015 |
- gallium_enable video_cards_virgl virgl |
2016 |
- fi |
2017 |
- |
2018 |
- if use vulkan; then |
2019 |
- vulkan_enable video_cards_i965 intel |
2020 |
- vulkan_enable video_cards_radeonsi radeon |
2021 |
- fi |
2022 |
- |
2023 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
2024 |
- if [[ ${ABI} == x86 ]]; then |
2025 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
2026 |
- fi |
2027 |
- |
2028 |
- # on abi_x86_32 hardened we need to have asm disable |
2029 |
- if [[ ${ABI} == x86* ]] && use pic; then |
2030 |
- myconf+=" --disable-asm" |
2031 |
- fi |
2032 |
- |
2033 |
- if use gallium; then |
2034 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
2035 |
- else |
2036 |
- myconf+=" $(use_enable osmesa)" |
2037 |
- fi |
2038 |
- |
2039 |
- # build fails with BSD indent, bug #428112 |
2040 |
- use userland_GNU || export INDENT=cat |
2041 |
- |
2042 |
- ECONF_SOURCE="${S}" \ |
2043 |
- econf \ |
2044 |
- --enable-dri \ |
2045 |
- --enable-glx \ |
2046 |
- --enable-shared-glapi \ |
2047 |
- $(use_enable !bindist texture-float) \ |
2048 |
- $(use_enable d3d9 nine) \ |
2049 |
- $(use_enable debug) \ |
2050 |
- $(use_enable dri3) \ |
2051 |
- $(use_enable egl) \ |
2052 |
- $(use_enable gbm) \ |
2053 |
- $(use_enable gles1) \ |
2054 |
- $(use_enable gles2) \ |
2055 |
- $(use_enable nptl glx-tls) \ |
2056 |
- $(use_enable unwind libunwind) \ |
2057 |
- --enable-valgrind=$(usex valgrind auto no) \ |
2058 |
- --enable-llvm-shared-libs \ |
2059 |
- --disable-opencl-icd \ |
2060 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
2061 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
2062 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
2063 |
- PYTHON2="${PYTHON}" \ |
2064 |
- ${myconf} |
2065 |
-} |
2066 |
- |
2067 |
-multilib_src_install() { |
2068 |
- emake install DESTDIR="${D}" |
2069 |
- |
2070 |
- if use wayland; then |
2071 |
- # These files are now provided by >=dev-libs/wayland-1.15.0 |
2072 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so" || die |
2073 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1" || die |
2074 |
- rm "${ED}/usr/$(get_libdir)/libwayland-egl.so.1.0.0" || die |
2075 |
- rm "${ED}/usr/$(get_libdir)/pkgconfig/wayland-egl.pc" || die |
2076 |
- fi |
2077 |
- |
2078 |
- if use opencl; then |
2079 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
2080 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
2081 |
- dodir ${cl_dir}/{lib,include} |
2082 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
2083 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
2084 |
- "${ED}"${cl_dir} |
2085 |
- fi |
2086 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
2087 |
- mv -f "${ED}"/usr/include/CL \ |
2088 |
- "${ED}"${cl_dir}/include |
2089 |
- fi |
2090 |
- eend $? |
2091 |
- fi |
2092 |
- |
2093 |
- if use openmax; then |
2094 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
2095 |
- doenvd "${T}"/99mesaxdgomx |
2096 |
- keepdir /usr/share/mesa/xdg |
2097 |
- fi |
2098 |
-} |
2099 |
- |
2100 |
-multilib_src_install_all() { |
2101 |
- find "${ED}" -name '*.la' -delete |
2102 |
- einstalldocs |
2103 |
- |
2104 |
- if use !bindist; then |
2105 |
- dodoc docs/patents.txt |
2106 |
- fi |
2107 |
-} |
2108 |
- |
2109 |
-multilib_src_test() { |
2110 |
- if use llvm; then |
2111 |
- local llvm_tests='lp_test_arit lp_test_arit lp_test_blend lp_test_blend lp_test_conv lp_test_conv lp_test_format lp_test_format lp_test_printf lp_test_printf' |
2112 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
2113 |
- emake ${llvm_tests} |
2114 |
- pax-mark m ${llvm_tests} |
2115 |
- popd >/dev/null || die |
2116 |
- fi |
2117 |
- emake check |
2118 |
-} |
2119 |
- |
2120 |
-pkg_postinst() { |
2121 |
- # Switch to the xorg implementation. |
2122 |
- echo |
2123 |
- eselect opengl set --use-old ${OPENGL_DIR} |
2124 |
- |
2125 |
- # Switch to mesa opencl |
2126 |
- if use opencl; then |
2127 |
- eselect opencl set --use-old ${PN} |
2128 |
- fi |
2129 |
- |
2130 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
2131 |
- if use openmax; then |
2132 |
- ebegin "Registering OpenMAX drivers" |
2133 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
2134 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
2135 |
- omxregister-bellagio |
2136 |
- eend $? |
2137 |
- fi |
2138 |
- |
2139 |
- # warn about patent encumbered texture-float |
2140 |
- if use !bindist; then |
2141 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
2142 |
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
2143 |
- elog "explanation." |
2144 |
- fi |
2145 |
-} |
2146 |
- |
2147 |
-pkg_prerm() { |
2148 |
- if use openmax; then |
2149 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
2150 |
- fi |
2151 |
-} |
2152 |
- |
2153 |
-# $1 - VIDEO_CARDS flag |
2154 |
-# other args - names of DRI drivers to enable |
2155 |
-# TODO: avoid code duplication for a more elegant implementation |
2156 |
-driver_enable() { |
2157 |
- case $# in |
2158 |
- # for enabling unconditionally |
2159 |
- 1) |
2160 |
- DRI_DRIVERS+=",$1" |
2161 |
- ;; |
2162 |
- *) |
2163 |
- if use $1; then |
2164 |
- shift |
2165 |
- for i in $@; do |
2166 |
- DRI_DRIVERS+=",${i}" |
2167 |
- done |
2168 |
- fi |
2169 |
- ;; |
2170 |
- esac |
2171 |
-} |
2172 |
- |
2173 |
-gallium_enable() { |
2174 |
- case $# in |
2175 |
- # for enabling unconditionally |
2176 |
- 1) |
2177 |
- GALLIUM_DRIVERS+=",$1" |
2178 |
- ;; |
2179 |
- *) |
2180 |
- if use $1; then |
2181 |
- shift |
2182 |
- for i in $@; do |
2183 |
- GALLIUM_DRIVERS+=",${i}" |
2184 |
- done |
2185 |
- fi |
2186 |
- ;; |
2187 |
- esac |
2188 |
-} |
2189 |
- |
2190 |
-vulkan_enable() { |
2191 |
- case $# in |
2192 |
- # for enabling unconditionally |
2193 |
- 1) |
2194 |
- VULKAN_DRIVERS+=",$1" |
2195 |
- ;; |
2196 |
- *) |
2197 |
- if use $1; then |
2198 |
- shift |
2199 |
- for i in $@; do |
2200 |
- VULKAN_DRIVERS+=",${i}" |
2201 |
- done |
2202 |
- fi |
2203 |
- ;; |
2204 |
- esac |
2205 |
-} |