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