1 |
commit: 98b4087835d12e109b7de08c8e3c80d9bc3f3563 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 9 02:38:51 2018 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 9 02:40:41 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98b40878 |
7 |
|
8 |
media-libs/mesa: Drop old versions |
9 |
|
10 |
media-libs/mesa/Manifest | 2 - |
11 |
media-libs/mesa/mesa-18.0.0_rc2.ebuild | 582 --------------------------------- |
12 |
media-libs/mesa/mesa-18.0.0_rc3.ebuild | 582 --------------------------------- |
13 |
3 files changed, 1166 deletions(-) |
14 |
|
15 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
16 |
index 45ec23d7c04..8568ef1e703 100644 |
17 |
--- a/media-libs/mesa/Manifest |
18 |
+++ b/media-libs/mesa/Manifest |
19 |
@@ -1,6 +1,4 @@ |
20 |
DIST mesa-17.1.10.tar.xz 9872168 BLAKE2B 205ece7b016fcc1de5bb72711775cd8f4b90f5d6c26db77d1576752fcd4a99a36cbcd902bb6ad1041d476d1c3b32479baceb4087c902ce598ede3d57851c6b9d SHA512 728dbd41f5d3a7a1c33fc18c08a8b8eb1f6d236c5f00781209f46b144dd66a27ecd723ab1635868b7ad77de3a18ad53f1a88c932f17c0be97605a2775e3b3a9b |
21 |
DIST mesa-17.2.8.tar.xz 10393304 BLAKE2B 558321eefc6d599aaedfe468f03c2f1f99b5c96c253637db00b7da3265ec38e031d15f77623db1f4408f15912c93347e0f5769b01d92329be7f55e45f6f6bf75 SHA512 ce05ad2d3e1b55ffe9c8ef65023a840c04b29014c7876b23182a6a6dd0b768f248ec21bc5b738d21b846f59f4b73501a9fe834d6a87e7dba16c6f821008e0f01 |
22 |
DIST mesa-17.3.3.tar.xz 10637708 BLAKE2B a2cec4abc58eb71c1ec92d073ac3a128e1f993f69b163c9f6e474fef4520fe074d84ca8d972a7822a76226e132230f6e7fac320b940ea3462553d398ef6bcfce SHA512 7ac8ecdcf3b2b43239835bc2c5da7f2730f80a2db945fe00df03d1548920fbc074dd4806ddd345a1ce682fd29d75b2209ef81b6b06e657f9c8ae8622a34a03c1 |
23 |
-DIST mesa-18.0.0-rc2.tar.xz 10962300 BLAKE2B 89444a46261d837bd5c7bc54898ebdafe58e863d3532bd80f6592432d2925317fc0ac144dd55862a249d6390efc3955942dc2980ce87e589b9360de61a1f6148 SHA512 aada4caf4c2021bc1e7c071b32ed0ccbbbfe415bc1cb5a80eee3911b1b11a2bd87a10e99c5a152790709488afbdb60e87b4b66c2ca22c0cf89c029fb10c6e8b3 |
24 |
-DIST mesa-18.0.0-rc3.tar.xz 10964880 BLAKE2B 4887e2962b3d1c328734af9effe33cac7fd69c888b3c500d28423c62bae0a26fe58396c8371b1e0861e68a90c03be0029d5a32019efa920f40908b0b054d7c6c SHA512 62e7491cdd5a6651c2bb7c0268685654d5376a68135c1904c684f716805695840c0a16fcff324c75f3ec000bebfa835b3da9a13c479b612da715b171fe68bc0b |
25 |
DIST mesa-18.0.0-rc4.tar.xz 11027596 BLAKE2B 96554acd69636b91d1b79e7fefa4ba6e3f701ef7ef6c16718493070d62ab41c7bbd66e2f4d4a97fac8c236ac4c9150b2ce41e4e57b865fff6122b3f60b047e25 SHA512 91dd0a4396715a7896fc47aabf38c4b486df3b50c9764795805550ef01724d2e2281ba9b000e82760ea0e199c58d8c9943dbc732b2adab46554ff5c2f9e2ece1 |
26 |
|
27 |
diff --git a/media-libs/mesa/mesa-18.0.0_rc2.ebuild b/media-libs/mesa/mesa-18.0.0_rc2.ebuild |
28 |
deleted file mode 100644 |
29 |
index e2f425d49ac..00000000000 |
30 |
--- a/media-libs/mesa/mesa-18.0.0_rc2.ebuild |
31 |
+++ /dev/null |
32 |
@@ -1,582 +0,0 @@ |
33 |
-# Copyright 1999-2018 Gentoo Foundation |
34 |
-# Distributed under the terms of the GNU General Public License v2 |
35 |
- |
36 |
-EAPI=6 |
37 |
- |
38 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
39 |
- |
40 |
-if [[ ${PV} = 9999 ]]; then |
41 |
- GIT_ECLASS="git-r3" |
42 |
- EXPERIMENTAL="true" |
43 |
-fi |
44 |
- |
45 |
-PYTHON_COMPAT=( python2_7 ) |
46 |
- |
47 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
48 |
- |
49 |
-OPENGL_DIR="xorg-x11" |
50 |
- |
51 |
-MY_P="${P/_/-}" |
52 |
- |
53 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
54 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
55 |
- |
56 |
-if [[ $PV == 9999 ]]; then |
57 |
- SRC_URI="" |
58 |
-else |
59 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
60 |
- 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" |
61 |
-fi |
62 |
- |
63 |
-LICENSE="MIT" |
64 |
-SLOT="0" |
65 |
-RESTRICT="!bindist? ( bindist )" |
66 |
- |
67 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
68 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
69 |
-for card in ${VIDEO_CARDS}; do |
70 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
71 |
-done |
72 |
- |
73 |
-IUSE="${IUSE_VIDEO_CARDS} |
74 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
75 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
76 |
- vdpau vulkan wayland xvmc xa" |
77 |
- |
78 |
-REQUIRED_USE=" |
79 |
- d3d9? ( dri3 gallium ) |
80 |
- llvm? ( gallium ) |
81 |
- opencl? ( gallium llvm ) |
82 |
- openmax? ( gallium ) |
83 |
- gles1? ( egl ) |
84 |
- gles2? ( egl ) |
85 |
- vaapi? ( gallium ) |
86 |
- vdpau? ( gallium ) |
87 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
88 |
- video_cards_radeonsi? ( llvm ) ) |
89 |
- wayland? ( egl gbm ) |
90 |
- xa? ( gallium ) |
91 |
- video_cards_freedreno? ( gallium ) |
92 |
- video_cards_intel? ( classic ) |
93 |
- video_cards_i915? ( || ( classic gallium ) ) |
94 |
- video_cards_i965? ( classic ) |
95 |
- video_cards_imx? ( gallium video_cards_vivante ) |
96 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
97 |
- video_cards_radeon? ( || ( classic gallium ) |
98 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
99 |
- video_cards_r100? ( classic ) |
100 |
- video_cards_r200? ( classic ) |
101 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
102 |
- video_cards_r600? ( gallium ) |
103 |
- video_cards_radeonsi? ( gallium llvm ) |
104 |
- video_cards_vc4? ( gallium ) |
105 |
- video_cards_virgl? ( gallium ) |
106 |
- video_cards_vivante? ( gallium gbm ) |
107 |
- video_cards_vmware? ( gallium ) |
108 |
-" |
109 |
- |
110 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89" |
111 |
-# keep correct libdrm and dri2proto dep |
112 |
-# keep blocks in rdepend for binpkg |
113 |
-RDEPEND=" |
114 |
- !<x11-base/xorg-server-1.7 |
115 |
- !<=x11-proto/xf86driproto-2.0.3 |
116 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
117 |
- classic? ( app-eselect/eselect-mesa ) |
118 |
- gallium? ( app-eselect/eselect-mesa ) |
119 |
- >=app-eselect/eselect-opengl-1.3.0 |
120 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
121 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
122 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
123 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
124 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
125 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
126 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
127 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
128 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
129 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
130 |
- llvm? ( |
131 |
- video_cards_radeonsi? ( |
132 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
133 |
- ) |
134 |
- video_cards_r600? ( |
135 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
136 |
- ) |
137 |
- video_cards_radeon? ( |
138 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
139 |
- ) |
140 |
- ) |
141 |
- opencl? ( |
142 |
- app-eselect/eselect-opencl |
143 |
- dev-libs/libclc |
144 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
145 |
- ) |
146 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
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.11.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-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
257 |
- dri3? ( |
258 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
259 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
260 |
- ) |
261 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
262 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
263 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
264 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
265 |
- vulkan? ( |
266 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
267 |
- ) |
268 |
-" |
269 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
270 |
- sys-devel/bison |
271 |
- sys-devel/flex |
272 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
273 |
-" |
274 |
- |
275 |
-S="${WORKDIR}/${MY_P}" |
276 |
-EGIT_CHECKOUT_DIR=${S} |
277 |
- |
278 |
-QA_WX_LOAD=" |
279 |
-x86? ( |
280 |
- !pic? ( |
281 |
- usr/lib*/libglapi.so.0.0.0 |
282 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
283 |
- usr/lib*/libGLESv2.so.2.0.0 |
284 |
- usr/lib*/libGL.so.1.2.0 |
285 |
- usr/lib*/libOSMesa.so.8.0.0 |
286 |
- ) |
287 |
-)" |
288 |
- |
289 |
-llvm_check_deps() { |
290 |
- local flags=${MULTILIB_USEDEP} |
291 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
292 |
- then |
293 |
- flags+=",llvm_targets_AMDGPU(-)" |
294 |
- fi |
295 |
- |
296 |
- if use opencl; then |
297 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
298 |
- fi |
299 |
- has_version "sys-devel/llvm[${flags}]" |
300 |
-} |
301 |
- |
302 |
-pkg_setup() { |
303 |
- # warning message for bug 459306 |
304 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
305 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
306 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
307 |
- fi |
308 |
- |
309 |
- if use llvm; then |
310 |
- llvm_pkg_setup |
311 |
- fi |
312 |
- python-any-r1_pkg_setup |
313 |
-} |
314 |
- |
315 |
-src_prepare() { |
316 |
- [[ ${PV} == 9999 ]] && eautoreconf |
317 |
- eapply_user |
318 |
-} |
319 |
- |
320 |
-multilib_src_configure() { |
321 |
- local myconf |
322 |
- |
323 |
- if use classic; then |
324 |
- # Configurable DRI drivers |
325 |
- driver_enable swrast |
326 |
- |
327 |
- # Intel code |
328 |
- driver_enable video_cards_i915 i915 |
329 |
- driver_enable video_cards_i965 i965 |
330 |
- if ! use video_cards_i915 && \ |
331 |
- ! use video_cards_i965; then |
332 |
- driver_enable video_cards_intel i915 i965 |
333 |
- fi |
334 |
- |
335 |
- # Nouveau code |
336 |
- driver_enable video_cards_nouveau nouveau |
337 |
- |
338 |
- # ATI code |
339 |
- driver_enable video_cards_r100 radeon |
340 |
- driver_enable video_cards_r200 r200 |
341 |
- if ! use video_cards_r100 && \ |
342 |
- ! use video_cards_r200; then |
343 |
- driver_enable video_cards_radeon radeon r200 |
344 |
- fi |
345 |
- fi |
346 |
- |
347 |
- if use egl; then |
348 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
349 |
- fi |
350 |
- |
351 |
- if use gallium; then |
352 |
- myconf+=" |
353 |
- $(use_enable d3d9 nine) |
354 |
- $(use_enable llvm) |
355 |
- $(use_enable openmax omx-bellagio) |
356 |
- $(use_enable vaapi va) |
357 |
- $(use_enable vdpau) |
358 |
- $(use_enable xa) |
359 |
- $(use_enable xvmc) |
360 |
- " |
361 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
362 |
- |
363 |
- gallium_enable swrast |
364 |
- gallium_enable video_cards_vc4 vc4 |
365 |
- gallium_enable video_cards_vivante etnaviv |
366 |
- gallium_enable video_cards_vmware svga |
367 |
- gallium_enable video_cards_nouveau nouveau |
368 |
- gallium_enable video_cards_i915 i915 |
369 |
- gallium_enable video_cards_imx imx |
370 |
- if ! use video_cards_i915 && \ |
371 |
- ! use video_cards_i965; then |
372 |
- gallium_enable video_cards_intel i915 |
373 |
- fi |
374 |
- |
375 |
- gallium_enable video_cards_r300 r300 |
376 |
- gallium_enable video_cards_r600 r600 |
377 |
- gallium_enable video_cards_radeonsi radeonsi |
378 |
- if ! use video_cards_r300 && \ |
379 |
- ! use video_cards_r600; then |
380 |
- gallium_enable video_cards_radeon r300 r600 |
381 |
- fi |
382 |
- |
383 |
- gallium_enable video_cards_freedreno freedreno |
384 |
- # opencl stuff |
385 |
- if use opencl; then |
386 |
- myconf+=" |
387 |
- $(use_enable opencl) |
388 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
389 |
- " |
390 |
- fi |
391 |
- |
392 |
- gallium_enable video_cards_virgl virgl |
393 |
- fi |
394 |
- |
395 |
- if use vulkan; then |
396 |
- vulkan_enable video_cards_i965 intel |
397 |
- vulkan_enable video_cards_radeonsi radeon |
398 |
- fi |
399 |
- |
400 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
401 |
- if [[ ${ABI} == x86 ]]; then |
402 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
403 |
- fi |
404 |
- |
405 |
- # on abi_x86_32 hardened we need to have asm disable |
406 |
- if [[ ${ABI} == x86* ]] && use pic; then |
407 |
- myconf+=" --disable-asm" |
408 |
- fi |
409 |
- |
410 |
- if use gallium; then |
411 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
412 |
- else |
413 |
- myconf+=" $(use_enable osmesa)" |
414 |
- fi |
415 |
- |
416 |
- # build fails with BSD indent, bug #428112 |
417 |
- use userland_GNU || export INDENT=cat |
418 |
- |
419 |
- ECONF_SOURCE="${S}" \ |
420 |
- econf \ |
421 |
- --enable-dri \ |
422 |
- --enable-glx \ |
423 |
- --enable-shared-glapi \ |
424 |
- $(use_enable !bindist texture-float) \ |
425 |
- $(use_enable d3d9 nine) \ |
426 |
- $(use_enable debug) \ |
427 |
- $(use_enable dri3) \ |
428 |
- $(use_enable egl) \ |
429 |
- $(use_enable gbm) \ |
430 |
- $(use_enable gles1) \ |
431 |
- $(use_enable gles2) \ |
432 |
- $(use_enable nptl glx-tls) \ |
433 |
- $(use_enable unwind libunwind) \ |
434 |
- --enable-valgrind=$(usex valgrind auto no) \ |
435 |
- --enable-llvm-shared-libs \ |
436 |
- --disable-opencl-icd \ |
437 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
438 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
439 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
440 |
- PYTHON2="${PYTHON}" \ |
441 |
- ${myconf} |
442 |
-} |
443 |
- |
444 |
-multilib_src_install() { |
445 |
- emake install DESTDIR="${D}" |
446 |
- |
447 |
- if use classic || use gallium; then |
448 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
449 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
450 |
- keepdir /usr/$(get_libdir)/dri |
451 |
- dodir /usr/$(get_libdir)/mesa |
452 |
- for x in ${gallium_drivers[@]}; do |
453 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
454 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
455 |
- || die "Failed to move ${x}" |
456 |
- fi |
457 |
- done |
458 |
- if use classic; then |
459 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
460 |
- fi |
461 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
462 |
- if [ -f ${x} -o -L ${x} ]; then |
463 |
- mv -f "${x}" "${x/dri/mesa}" \ |
464 |
- || die "Failed to move ${x}" |
465 |
- fi |
466 |
- done |
467 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
468 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
469 |
- # remove symlinks to drivers known to eselect |
470 |
- for x in ${gallium_drivers[@]}; do |
471 |
- if [ -f ${x} -o -L ${x} ]; then |
472 |
- rm "${x}" || die "Failed to remove ${x}" |
473 |
- fi |
474 |
- done |
475 |
- popd |
476 |
- eend $? |
477 |
- fi |
478 |
- if use opencl; then |
479 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
480 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
481 |
- dodir ${cl_dir}/{lib,include} |
482 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
483 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
484 |
- "${ED}"${cl_dir} |
485 |
- fi |
486 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
487 |
- mv -f "${ED}"/usr/include/CL \ |
488 |
- "${ED}"${cl_dir}/include |
489 |
- fi |
490 |
- eend $? |
491 |
- fi |
492 |
- |
493 |
- if use openmax; then |
494 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
495 |
- doenvd "${T}"/99mesaxdgomx |
496 |
- keepdir /usr/share/mesa/xdg |
497 |
- fi |
498 |
-} |
499 |
- |
500 |
-multilib_src_install_all() { |
501 |
- find "${ED}" -name '*.la' -delete |
502 |
- einstalldocs |
503 |
- |
504 |
- if use !bindist; then |
505 |
- dodoc docs/patents.txt |
506 |
- fi |
507 |
- |
508 |
- # Install config file for eselect mesa |
509 |
- insinto /usr/share/mesa |
510 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
511 |
-} |
512 |
- |
513 |
-multilib_src_test() { |
514 |
- if use llvm; then |
515 |
- 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' |
516 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
517 |
- emake ${llvm_tests} |
518 |
- pax-mark m ${llvm_tests} |
519 |
- popd >/dev/null || die |
520 |
- fi |
521 |
- emake check |
522 |
-} |
523 |
- |
524 |
-pkg_postinst() { |
525 |
- # Switch to the xorg implementation. |
526 |
- echo |
527 |
- eselect opengl set --use-old ${OPENGL_DIR} |
528 |
- |
529 |
- # Select classic/gallium drivers |
530 |
- if use classic || use gallium; then |
531 |
- eselect mesa set --auto |
532 |
- fi |
533 |
- |
534 |
- # Switch to mesa opencl |
535 |
- if use opencl; then |
536 |
- eselect opencl set --use-old ${PN} |
537 |
- fi |
538 |
- |
539 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
540 |
- if use openmax; then |
541 |
- ebegin "Registering OpenMAX drivers" |
542 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
543 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
544 |
- omxregister-bellagio |
545 |
- eend $? |
546 |
- fi |
547 |
- |
548 |
- # warn about patent encumbered texture-float |
549 |
- if use !bindist; then |
550 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
551 |
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
552 |
- elog "explanation." |
553 |
- fi |
554 |
-} |
555 |
- |
556 |
-pkg_prerm() { |
557 |
- if use openmax; then |
558 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
559 |
- fi |
560 |
-} |
561 |
- |
562 |
-# $1 - VIDEO_CARDS flag |
563 |
-# other args - names of DRI drivers to enable |
564 |
-# TODO: avoid code duplication for a more elegant implementation |
565 |
-driver_enable() { |
566 |
- case $# in |
567 |
- # for enabling unconditionally |
568 |
- 1) |
569 |
- DRI_DRIVERS+=",$1" |
570 |
- ;; |
571 |
- *) |
572 |
- if use $1; then |
573 |
- shift |
574 |
- for i in $@; do |
575 |
- DRI_DRIVERS+=",${i}" |
576 |
- done |
577 |
- fi |
578 |
- ;; |
579 |
- esac |
580 |
-} |
581 |
- |
582 |
-gallium_enable() { |
583 |
- case $# in |
584 |
- # for enabling unconditionally |
585 |
- 1) |
586 |
- GALLIUM_DRIVERS+=",$1" |
587 |
- ;; |
588 |
- *) |
589 |
- if use $1; then |
590 |
- shift |
591 |
- for i in $@; do |
592 |
- GALLIUM_DRIVERS+=",${i}" |
593 |
- done |
594 |
- fi |
595 |
- ;; |
596 |
- esac |
597 |
-} |
598 |
- |
599 |
-vulkan_enable() { |
600 |
- case $# in |
601 |
- # for enabling unconditionally |
602 |
- 1) |
603 |
- VULKAN_DRIVERS+=",$1" |
604 |
- ;; |
605 |
- *) |
606 |
- if use $1; then |
607 |
- shift |
608 |
- for i in $@; do |
609 |
- VULKAN_DRIVERS+=",${i}" |
610 |
- done |
611 |
- fi |
612 |
- ;; |
613 |
- esac |
614 |
-} |
615 |
|
616 |
diff --git a/media-libs/mesa/mesa-18.0.0_rc3.ebuild b/media-libs/mesa/mesa-18.0.0_rc3.ebuild |
617 |
deleted file mode 100644 |
618 |
index e2f425d49ac..00000000000 |
619 |
--- a/media-libs/mesa/mesa-18.0.0_rc3.ebuild |
620 |
+++ /dev/null |
621 |
@@ -1,582 +0,0 @@ |
622 |
-# Copyright 1999-2018 Gentoo Foundation |
623 |
-# Distributed under the terms of the GNU General Public License v2 |
624 |
- |
625 |
-EAPI=6 |
626 |
- |
627 |
-EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
628 |
- |
629 |
-if [[ ${PV} = 9999 ]]; then |
630 |
- GIT_ECLASS="git-r3" |
631 |
- EXPERIMENTAL="true" |
632 |
-fi |
633 |
- |
634 |
-PYTHON_COMPAT=( python2_7 ) |
635 |
- |
636 |
-inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
637 |
- |
638 |
-OPENGL_DIR="xorg-x11" |
639 |
- |
640 |
-MY_P="${P/_/-}" |
641 |
- |
642 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
643 |
-HOMEPAGE="https://www.mesa3d.org/ https://mesa.freedesktop.org/" |
644 |
- |
645 |
-if [[ $PV == 9999 ]]; then |
646 |
- SRC_URI="" |
647 |
-else |
648 |
- SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
649 |
- 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" |
650 |
-fi |
651 |
- |
652 |
-LICENSE="MIT" |
653 |
-SLOT="0" |
654 |
-RESTRICT="!bindist? ( bindist )" |
655 |
- |
656 |
-RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
657 |
-VIDEO_CARDS="${RADEON_CARDS} freedreno i915 i965 imx intel nouveau vc4 virgl vivante vmware" |
658 |
-for card in ${VIDEO_CARDS}; do |
659 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
660 |
-done |
661 |
- |
662 |
-IUSE="${IUSE_VIDEO_CARDS} |
663 |
- bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
664 |
- +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
665 |
- vdpau vulkan wayland xvmc xa" |
666 |
- |
667 |
-REQUIRED_USE=" |
668 |
- d3d9? ( dri3 gallium ) |
669 |
- llvm? ( gallium ) |
670 |
- opencl? ( gallium llvm ) |
671 |
- openmax? ( gallium ) |
672 |
- gles1? ( egl ) |
673 |
- gles2? ( egl ) |
674 |
- vaapi? ( gallium ) |
675 |
- vdpau? ( gallium ) |
676 |
- vulkan? ( || ( video_cards_i965 video_cards_radeonsi ) |
677 |
- video_cards_radeonsi? ( llvm ) ) |
678 |
- wayland? ( egl gbm ) |
679 |
- xa? ( gallium ) |
680 |
- video_cards_freedreno? ( gallium ) |
681 |
- video_cards_intel? ( classic ) |
682 |
- video_cards_i915? ( || ( classic gallium ) ) |
683 |
- video_cards_i965? ( classic ) |
684 |
- video_cards_imx? ( gallium video_cards_vivante ) |
685 |
- video_cards_nouveau? ( || ( classic gallium ) ) |
686 |
- video_cards_radeon? ( || ( classic gallium ) |
687 |
- gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
688 |
- video_cards_r100? ( classic ) |
689 |
- video_cards_r200? ( classic ) |
690 |
- video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
691 |
- video_cards_r600? ( gallium ) |
692 |
- video_cards_radeonsi? ( gallium llvm ) |
693 |
- video_cards_vc4? ( gallium ) |
694 |
- video_cards_virgl? ( gallium ) |
695 |
- video_cards_vivante? ( gallium gbm ) |
696 |
- video_cards_vmware? ( gallium ) |
697 |
-" |
698 |
- |
699 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.89" |
700 |
-# keep correct libdrm and dri2proto dep |
701 |
-# keep blocks in rdepend for binpkg |
702 |
-RDEPEND=" |
703 |
- !<x11-base/xorg-server-1.7 |
704 |
- !<=x11-proto/xf86driproto-2.0.3 |
705 |
- abi_x86_32? ( !app-emulation/emul-linux-x86-opengl[-abi_x86_32(-)] ) |
706 |
- classic? ( app-eselect/eselect-mesa ) |
707 |
- gallium? ( app-eselect/eselect-mesa ) |
708 |
- >=app-eselect/eselect-opengl-1.3.0 |
709 |
- >=dev-libs/expat-2.1.0-r3:=[${MULTILIB_USEDEP}] |
710 |
- >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
711 |
- >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
712 |
- >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
713 |
- >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
714 |
- >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
715 |
- >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
716 |
- >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
717 |
- x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
718 |
- unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
719 |
- llvm? ( |
720 |
- video_cards_radeonsi? ( |
721 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
722 |
- ) |
723 |
- video_cards_r600? ( |
724 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
725 |
- ) |
726 |
- video_cards_radeon? ( |
727 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
728 |
- ) |
729 |
- ) |
730 |
- opencl? ( |
731 |
- app-eselect/eselect-opencl |
732 |
- dev-libs/libclc |
733 |
- virtual/libelf:0=[${MULTILIB_USEDEP}] |
734 |
- ) |
735 |
- openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
736 |
- vaapi? ( |
737 |
- >=x11-libs/libva-1.7.3:=[${MULTILIB_USEDEP}] |
738 |
- video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
739 |
- ) |
740 |
- vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
741 |
- wayland? ( |
742 |
- >=dev-libs/wayland-1.11.0:=[${MULTILIB_USEDEP}] |
743 |
- >=dev-libs/wayland-protocols-1.8 |
744 |
- ) |
745 |
- xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
746 |
- ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
747 |
- |
748 |
- video_cards_intel? ( |
749 |
- !video_cards_i965? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
750 |
- ) |
751 |
- video_cards_i915? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
752 |
-" |
753 |
-for card in ${RADEON_CARDS}; do |
754 |
- RDEPEND="${RDEPEND} |
755 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
756 |
- " |
757 |
-done |
758 |
-RDEPEND="${RDEPEND} |
759 |
- video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
760 |
-" |
761 |
- |
762 |
-# Please keep the LLVM dependency block separate. Since LLVM is slotted, |
763 |
-# we need to *really* make sure we're not pulling one than more slot |
764 |
-# simultaneously. |
765 |
-# |
766 |
-# How to use it: |
767 |
-# 1. List all the working slots (with min versions) in ||, newest first. |
768 |
-# 2. Update the := to specify *max* version, e.g. < 7. |
769 |
-# 3. Specify LLVM_MAX_SLOT, e.g. 6. |
770 |
-LLVM_DEPSTR=" |
771 |
- || ( |
772 |
- sys-devel/llvm:7[${MULTILIB_USEDEP}] |
773 |
- sys-devel/llvm:6[${MULTILIB_USEDEP}] |
774 |
- sys-devel/llvm:5[${MULTILIB_USEDEP}] |
775 |
- sys-devel/llvm:4[${MULTILIB_USEDEP}] |
776 |
- >=sys-devel/llvm-3.9.0:0[${MULTILIB_USEDEP}] |
777 |
- ) |
778 |
- sys-devel/llvm:=[${MULTILIB_USEDEP}] |
779 |
-" |
780 |
-LLVM_DEPSTR_AMDGPU=${LLVM_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
781 |
-CLANG_DEPSTR=${LLVM_DEPSTR//llvm/clang} |
782 |
-CLANG_DEPSTR_AMDGPU=${CLANG_DEPSTR//]/,llvm_targets_AMDGPU(-)]} |
783 |
-RDEPEND="${RDEPEND} |
784 |
- llvm? ( |
785 |
- opencl? ( |
786 |
- video_cards_r600? ( |
787 |
- ${CLANG_DEPSTR_AMDGPU} |
788 |
- ) |
789 |
- !video_cards_r600? ( |
790 |
- video_cards_radeonsi? ( |
791 |
- ${CLANG_DEPSTR_AMDGPU} |
792 |
- ) |
793 |
- ) |
794 |
- !video_cards_r600? ( |
795 |
- !video_cards_radeonsi? ( |
796 |
- video_cards_radeon? ( |
797 |
- ${CLANG_DEPSTR_AMDGPU} |
798 |
- ) |
799 |
- ) |
800 |
- ) |
801 |
- !video_cards_r600? ( |
802 |
- !video_cards_radeon? ( |
803 |
- !video_cards_radeonsi? ( |
804 |
- ${CLANG_DEPSTR} |
805 |
- ) |
806 |
- ) |
807 |
- ) |
808 |
- ) |
809 |
- !opencl? ( |
810 |
- video_cards_r600? ( |
811 |
- ${LLVM_DEPSTR_AMDGPU} |
812 |
- ) |
813 |
- !video_cards_r600? ( |
814 |
- video_cards_radeonsi? ( |
815 |
- ${LLVM_DEPSTR_AMDGPU} |
816 |
- ) |
817 |
- ) |
818 |
- !video_cards_r600? ( |
819 |
- !video_cards_radeonsi? ( |
820 |
- video_cards_radeon? ( |
821 |
- ${LLVM_DEPSTR_AMDGPU} |
822 |
- ) |
823 |
- ) |
824 |
- ) |
825 |
- !video_cards_r600? ( |
826 |
- !video_cards_radeon? ( |
827 |
- !video_cards_radeonsi? ( |
828 |
- ${LLVM_DEPSTR} |
829 |
- ) |
830 |
- ) |
831 |
- ) |
832 |
- ) |
833 |
- ) |
834 |
-" |
835 |
-unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} |
836 |
- |
837 |
-DEPEND="${RDEPEND} |
838 |
- ${PYTHON_DEPS} |
839 |
- opencl? ( |
840 |
- >=sys-devel/gcc-4.6 |
841 |
- ) |
842 |
- sys-devel/gettext |
843 |
- virtual/pkgconfig |
844 |
- valgrind? ( dev-util/valgrind ) |
845 |
- >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
846 |
- dri3? ( |
847 |
- >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
848 |
- >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
849 |
- ) |
850 |
- >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
851 |
- >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
852 |
- >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
853 |
- >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
854 |
- vulkan? ( |
855 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
856 |
- ) |
857 |
-" |
858 |
-[[ ${PV} == 9999 ]] && DEPEND+=" |
859 |
- sys-devel/bison |
860 |
- sys-devel/flex |
861 |
- $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
862 |
-" |
863 |
- |
864 |
-S="${WORKDIR}/${MY_P}" |
865 |
-EGIT_CHECKOUT_DIR=${S} |
866 |
- |
867 |
-QA_WX_LOAD=" |
868 |
-x86? ( |
869 |
- !pic? ( |
870 |
- usr/lib*/libglapi.so.0.0.0 |
871 |
- usr/lib*/libGLESv1_CM.so.1.1.0 |
872 |
- usr/lib*/libGLESv2.so.2.0.0 |
873 |
- usr/lib*/libGL.so.1.2.0 |
874 |
- usr/lib*/libOSMesa.so.8.0.0 |
875 |
- ) |
876 |
-)" |
877 |
- |
878 |
-llvm_check_deps() { |
879 |
- local flags=${MULTILIB_USEDEP} |
880 |
- if use video_cards_r600 || use video_cards_radeon || use video_cards_radeonsi |
881 |
- then |
882 |
- flags+=",llvm_targets_AMDGPU(-)" |
883 |
- fi |
884 |
- |
885 |
- if use opencl; then |
886 |
- has_version "sys-devel/clang[${flags}]" || return 1 |
887 |
- fi |
888 |
- has_version "sys-devel/llvm[${flags}]" |
889 |
-} |
890 |
- |
891 |
-pkg_setup() { |
892 |
- # warning message for bug 459306 |
893 |
- if use llvm && has_version sys-devel/llvm[!debug=]; then |
894 |
- ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
895 |
- ewarn "detected! This can cause problems. For details, see bug 459306." |
896 |
- fi |
897 |
- |
898 |
- if use llvm; then |
899 |
- llvm_pkg_setup |
900 |
- fi |
901 |
- python-any-r1_pkg_setup |
902 |
-} |
903 |
- |
904 |
-src_prepare() { |
905 |
- [[ ${PV} == 9999 ]] && eautoreconf |
906 |
- eapply_user |
907 |
-} |
908 |
- |
909 |
-multilib_src_configure() { |
910 |
- local myconf |
911 |
- |
912 |
- if use classic; then |
913 |
- # Configurable DRI drivers |
914 |
- driver_enable swrast |
915 |
- |
916 |
- # Intel code |
917 |
- driver_enable video_cards_i915 i915 |
918 |
- driver_enable video_cards_i965 i965 |
919 |
- if ! use video_cards_i915 && \ |
920 |
- ! use video_cards_i965; then |
921 |
- driver_enable video_cards_intel i915 i965 |
922 |
- fi |
923 |
- |
924 |
- # Nouveau code |
925 |
- driver_enable video_cards_nouveau nouveau |
926 |
- |
927 |
- # ATI code |
928 |
- driver_enable video_cards_r100 radeon |
929 |
- driver_enable video_cards_r200 r200 |
930 |
- if ! use video_cards_r100 && \ |
931 |
- ! use video_cards_r200; then |
932 |
- driver_enable video_cards_radeon radeon r200 |
933 |
- fi |
934 |
- fi |
935 |
- |
936 |
- if use egl; then |
937 |
- myconf+=" --with-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
938 |
- fi |
939 |
- |
940 |
- if use gallium; then |
941 |
- myconf+=" |
942 |
- $(use_enable d3d9 nine) |
943 |
- $(use_enable llvm) |
944 |
- $(use_enable openmax omx-bellagio) |
945 |
- $(use_enable vaapi va) |
946 |
- $(use_enable vdpau) |
947 |
- $(use_enable xa) |
948 |
- $(use_enable xvmc) |
949 |
- " |
950 |
- use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
951 |
- |
952 |
- gallium_enable swrast |
953 |
- gallium_enable video_cards_vc4 vc4 |
954 |
- gallium_enable video_cards_vivante etnaviv |
955 |
- gallium_enable video_cards_vmware svga |
956 |
- gallium_enable video_cards_nouveau nouveau |
957 |
- gallium_enable video_cards_i915 i915 |
958 |
- gallium_enable video_cards_imx imx |
959 |
- if ! use video_cards_i915 && \ |
960 |
- ! use video_cards_i965; then |
961 |
- gallium_enable video_cards_intel i915 |
962 |
- fi |
963 |
- |
964 |
- gallium_enable video_cards_r300 r300 |
965 |
- gallium_enable video_cards_r600 r600 |
966 |
- gallium_enable video_cards_radeonsi radeonsi |
967 |
- if ! use video_cards_r300 && \ |
968 |
- ! use video_cards_r600; then |
969 |
- gallium_enable video_cards_radeon r300 r600 |
970 |
- fi |
971 |
- |
972 |
- gallium_enable video_cards_freedreno freedreno |
973 |
- # opencl stuff |
974 |
- if use opencl; then |
975 |
- myconf+=" |
976 |
- $(use_enable opencl) |
977 |
- --with-clang-libdir="${EPREFIX}/usr/lib" |
978 |
- " |
979 |
- fi |
980 |
- |
981 |
- gallium_enable video_cards_virgl virgl |
982 |
- fi |
983 |
- |
984 |
- if use vulkan; then |
985 |
- vulkan_enable video_cards_i965 intel |
986 |
- vulkan_enable video_cards_radeonsi radeon |
987 |
- fi |
988 |
- |
989 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
990 |
- if [[ ${ABI} == x86 ]]; then |
991 |
- myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
992 |
- fi |
993 |
- |
994 |
- # on abi_x86_32 hardened we need to have asm disable |
995 |
- if [[ ${ABI} == x86* ]] && use pic; then |
996 |
- myconf+=" --disable-asm" |
997 |
- fi |
998 |
- |
999 |
- if use gallium; then |
1000 |
- myconf+=" $(use_enable osmesa gallium-osmesa)" |
1001 |
- else |
1002 |
- myconf+=" $(use_enable osmesa)" |
1003 |
- fi |
1004 |
- |
1005 |
- # build fails with BSD indent, bug #428112 |
1006 |
- use userland_GNU || export INDENT=cat |
1007 |
- |
1008 |
- ECONF_SOURCE="${S}" \ |
1009 |
- econf \ |
1010 |
- --enable-dri \ |
1011 |
- --enable-glx \ |
1012 |
- --enable-shared-glapi \ |
1013 |
- $(use_enable !bindist texture-float) \ |
1014 |
- $(use_enable d3d9 nine) \ |
1015 |
- $(use_enable debug) \ |
1016 |
- $(use_enable dri3) \ |
1017 |
- $(use_enable egl) \ |
1018 |
- $(use_enable gbm) \ |
1019 |
- $(use_enable gles1) \ |
1020 |
- $(use_enable gles2) \ |
1021 |
- $(use_enable nptl glx-tls) \ |
1022 |
- $(use_enable unwind libunwind) \ |
1023 |
- --enable-valgrind=$(usex valgrind auto no) \ |
1024 |
- --enable-llvm-shared-libs \ |
1025 |
- --disable-opencl-icd \ |
1026 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
1027 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
1028 |
- --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
1029 |
- PYTHON2="${PYTHON}" \ |
1030 |
- ${myconf} |
1031 |
-} |
1032 |
- |
1033 |
-multilib_src_install() { |
1034 |
- emake install DESTDIR="${D}" |
1035 |
- |
1036 |
- if use classic || use gallium; then |
1037 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
1038 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
1039 |
- keepdir /usr/$(get_libdir)/dri |
1040 |
- dodir /usr/$(get_libdir)/mesa |
1041 |
- for x in ${gallium_drivers[@]}; do |
1042 |
- if [ -f "$(get_libdir)/gallium/${x}" ]; then |
1043 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
1044 |
- || die "Failed to move ${x}" |
1045 |
- fi |
1046 |
- done |
1047 |
- if use classic; then |
1048 |
- emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
1049 |
- fi |
1050 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
1051 |
- if [ -f ${x} -o -L ${x} ]; then |
1052 |
- mv -f "${x}" "${x/dri/mesa}" \ |
1053 |
- || die "Failed to move ${x}" |
1054 |
- fi |
1055 |
- done |
1056 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
1057 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
1058 |
- # remove symlinks to drivers known to eselect |
1059 |
- for x in ${gallium_drivers[@]}; do |
1060 |
- if [ -f ${x} -o -L ${x} ]; then |
1061 |
- rm "${x}" || die "Failed to remove ${x}" |
1062 |
- fi |
1063 |
- done |
1064 |
- popd |
1065 |
- eend $? |
1066 |
- fi |
1067 |
- if use opencl; then |
1068 |
- ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
1069 |
- local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
1070 |
- dodir ${cl_dir}/{lib,include} |
1071 |
- if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
1072 |
- mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
1073 |
- "${ED}"${cl_dir} |
1074 |
- fi |
1075 |
- if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
1076 |
- mv -f "${ED}"/usr/include/CL \ |
1077 |
- "${ED}"${cl_dir}/include |
1078 |
- fi |
1079 |
- eend $? |
1080 |
- fi |
1081 |
- |
1082 |
- if use openmax; then |
1083 |
- echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
1084 |
- doenvd "${T}"/99mesaxdgomx |
1085 |
- keepdir /usr/share/mesa/xdg |
1086 |
- fi |
1087 |
-} |
1088 |
- |
1089 |
-multilib_src_install_all() { |
1090 |
- find "${ED}" -name '*.la' -delete |
1091 |
- einstalldocs |
1092 |
- |
1093 |
- if use !bindist; then |
1094 |
- dodoc docs/patents.txt |
1095 |
- fi |
1096 |
- |
1097 |
- # Install config file for eselect mesa |
1098 |
- insinto /usr/share/mesa |
1099 |
- newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
1100 |
-} |
1101 |
- |
1102 |
-multilib_src_test() { |
1103 |
- if use llvm; then |
1104 |
- 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' |
1105 |
- pushd src/gallium/drivers/llvmpipe >/dev/null || die |
1106 |
- emake ${llvm_tests} |
1107 |
- pax-mark m ${llvm_tests} |
1108 |
- popd >/dev/null || die |
1109 |
- fi |
1110 |
- emake check |
1111 |
-} |
1112 |
- |
1113 |
-pkg_postinst() { |
1114 |
- # Switch to the xorg implementation. |
1115 |
- echo |
1116 |
- eselect opengl set --use-old ${OPENGL_DIR} |
1117 |
- |
1118 |
- # Select classic/gallium drivers |
1119 |
- if use classic || use gallium; then |
1120 |
- eselect mesa set --auto |
1121 |
- fi |
1122 |
- |
1123 |
- # Switch to mesa opencl |
1124 |
- if use opencl; then |
1125 |
- eselect opencl set --use-old ${PN} |
1126 |
- fi |
1127 |
- |
1128 |
- # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
1129 |
- if use openmax; then |
1130 |
- ebegin "Registering OpenMAX drivers" |
1131 |
- BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
1132 |
- OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
1133 |
- omxregister-bellagio |
1134 |
- eend $? |
1135 |
- fi |
1136 |
- |
1137 |
- # warn about patent encumbered texture-float |
1138 |
- if use !bindist; then |
1139 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
1140 |
- elog "enabled. Please see /usr/share/doc/${P}/patents.txt.bz2 for an" |
1141 |
- elog "explanation." |
1142 |
- fi |
1143 |
-} |
1144 |
- |
1145 |
-pkg_prerm() { |
1146 |
- if use openmax; then |
1147 |
- rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
1148 |
- fi |
1149 |
-} |
1150 |
- |
1151 |
-# $1 - VIDEO_CARDS flag |
1152 |
-# other args - names of DRI drivers to enable |
1153 |
-# TODO: avoid code duplication for a more elegant implementation |
1154 |
-driver_enable() { |
1155 |
- case $# in |
1156 |
- # for enabling unconditionally |
1157 |
- 1) |
1158 |
- DRI_DRIVERS+=",$1" |
1159 |
- ;; |
1160 |
- *) |
1161 |
- if use $1; then |
1162 |
- shift |
1163 |
- for i in $@; do |
1164 |
- DRI_DRIVERS+=",${i}" |
1165 |
- done |
1166 |
- fi |
1167 |
- ;; |
1168 |
- esac |
1169 |
-} |
1170 |
- |
1171 |
-gallium_enable() { |
1172 |
- case $# in |
1173 |
- # for enabling unconditionally |
1174 |
- 1) |
1175 |
- GALLIUM_DRIVERS+=",$1" |
1176 |
- ;; |
1177 |
- *) |
1178 |
- if use $1; then |
1179 |
- shift |
1180 |
- for i in $@; do |
1181 |
- GALLIUM_DRIVERS+=",${i}" |
1182 |
- done |
1183 |
- fi |
1184 |
- ;; |
1185 |
- esac |
1186 |
-} |
1187 |
- |
1188 |
-vulkan_enable() { |
1189 |
- case $# in |
1190 |
- # for enabling unconditionally |
1191 |
- 1) |
1192 |
- VULKAN_DRIVERS+=",$1" |
1193 |
- ;; |
1194 |
- *) |
1195 |
- if use $1; then |
1196 |
- shift |
1197 |
- for i in $@; do |
1198 |
- VULKAN_DRIVERS+=",${i}" |
1199 |
- done |
1200 |
- fi |
1201 |
- ;; |
1202 |
- esac |
1203 |
-} |