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