1 |
commit: 9c70f60899fb02d18acd8dee54d8a9b1b4ccacec |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 7 08:50:55 2017 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 7 08:51:16 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c70f608 |
7 |
|
8 |
media-libs/mesa: Version bump to 17.0.0_rc3. |
9 |
|
10 |
media-libs/mesa/Manifest | 1 + |
11 |
media-libs/mesa/mesa-17.0.0_rc3.ebuild | 501 +++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 502 insertions(+) |
13 |
|
14 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
15 |
index 4e07df9..a269884 100644 |
16 |
--- a/media-libs/mesa/Manifest |
17 |
+++ b/media-libs/mesa/Manifest |
18 |
@@ -6,3 +6,4 @@ DIST mesa-12.0.6.tar.xz 8662900 SHA256 7d6da9744c1022a4c2ab6ad01a206984d00443fb6 |
19 |
DIST mesa-13.0.3.tar.xz 9162036 SHA256 d9aa8be5c176d00d0cd503cb2f64a5a403ea471ec819c022581414860d7ba40e SHA512 e94a60f7e3b2c64d7b44130ccac95fef8edb74ee1574125aa9ec8ceecb1819df26b0fb08369254aaee6cd6df4eecea814783351e604d4c39b0130746b15a3c1e WHIRLPOOL 02b980a02c862d52395f4b5cbec4e02d16b3d5b9d01c29f3b58538574b1401635b5c39bd5d94a026d4ada6ea2583118542d1eaccac64cc7cd3286e1ecfb5d30c |
20 |
DIST mesa-13.0.4.tar.xz 9164612 SHA256 a95d7ce8f7bd5f88585e4be3144a341236d8c0fc91f6feaec59bb8ba3120e726 SHA512 5f4d8ad12389a32c028cf3c5289fe285892e2b241220c5c6d04cda5748240e8b13289c4537ac7a6b58d87d6ca4111031e15ad37c9b008777be71918e42e88817 WHIRLPOOL 041cb8db42cd2126b108f8e5d0f105f96882bb4f75808f859d4789b05ffc2b6d98a2b348ebff8abfa507ffb71e7ec757e7dd85ca81e77a264f477296f40b50ed |
21 |
DIST mesa-17.0.0-rc2.tar.xz 9438192 SHA256 1788e124c0198cb76e0409aaf883855861d2c697ee895a84137026fffa62aba4 SHA512 3a1c285b600b91667a8fe4f3c2b3063520eb7e60e50e51d56d0265bd4d05fc6dda8f0ed14ce5637375caf7803a896dd5311dfb166dc7a52aea51d5a6efced43a WHIRLPOOL 92d153bd535b69c16e2f3de0bada8781d6c92dc0a09918170392fb2a44f471819129afeb65fe0a4523fdbbcd8d321a3544750fe1d4efdd61a54d049419b99871 |
22 |
+DIST mesa-17.0.0-rc3.tar.xz 9440336 SHA256 e60e50b186159c0140e4bb9141d16933f6cf15cf2039d284a8fb5461b49ec99e SHA512 f37ad3182ae59838dd94dbfa03165a81ae1cbd5ee1a30e5d9a90b75abe4452c8632738ac445fd97927eaea4d6e1cccbd03349e2b7602696a48febc6fdd9aea41 WHIRLPOOL 5335f865b50acb6580a579b53d6bf33f0e9a42d5293c16a9a4ce14664f74b633d35213a0eb3ceccdbd19654a5a9d936e65ed7effb5ff3d0a4c4ce1a6c545aff2 |
23 |
|
24 |
diff --git a/media-libs/mesa/mesa-17.0.0_rc3.ebuild b/media-libs/mesa/mesa-17.0.0_rc3.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000..cf4f273 |
27 |
--- /dev/null |
28 |
+++ b/media-libs/mesa/mesa-17.0.0_rc3.ebuild |
29 |
@@ -0,0 +1,501 @@ |
30 |
+# Copyright 1999-2017 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+# $Id$ |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
37 |
+ |
38 |
+if [[ ${PV} = 9999 ]]; then |
39 |
+ GIT_ECLASS="git-r3" |
40 |
+ EXPERIMENTAL="true" |
41 |
+fi |
42 |
+ |
43 |
+PYTHON_COMPAT=( python2_7 ) |
44 |
+ |
45 |
+inherit autotools multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
46 |
+ |
47 |
+OPENGL_DIR="xorg-x11" |
48 |
+ |
49 |
+MY_P="${P/_/-}" |
50 |
+ |
51 |
+DESCRIPTION="OpenGL-like graphic library for Linux" |
52 |
+HOMEPAGE="http://mesa3d.sourceforge.net/" |
53 |
+ |
54 |
+if [[ $PV == 9999 ]]; then |
55 |
+ SRC_URI="" |
56 |
+ KEYWORDS="" |
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 ilo 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_ilo? ( gallium ) |
96 |
+ video_cards_imx? ( gallium ) |
97 |
+ video_cards_nouveau? ( || ( classic gallium ) ) |
98 |
+ video_cards_radeon? ( || ( classic gallium ) |
99 |
+ gallium? ( x86? ( llvm ) amd64? ( llvm ) ) ) |
100 |
+ video_cards_r100? ( classic ) |
101 |
+ video_cards_r200? ( classic ) |
102 |
+ video_cards_r300? ( gallium x86? ( llvm ) amd64? ( llvm ) ) |
103 |
+ video_cards_r600? ( gallium ) |
104 |
+ video_cards_radeonsi? ( gallium llvm ) |
105 |
+ video_cards_vivante? ( gallium gbm ) |
106 |
+ video_cards_vmware? ( gallium ) |
107 |
+ ${PYTHON_REQUIRED_USE} |
108 |
+" |
109 |
+ |
110 |
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.72" |
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 |
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
122 |
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
123 |
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
124 |
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
125 |
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
126 |
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
127 |
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
128 |
+ llvm? ( |
129 |
+ video_cards_radeonsi? ( |
130 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
131 |
+ vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] ) |
132 |
+ ) |
133 |
+ >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
134 |
+ ) |
135 |
+ opencl? ( |
136 |
+ app-eselect/eselect-opencl |
137 |
+ dev-libs/libclc |
138 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
139 |
+ ) |
140 |
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
141 |
+ vaapi? ( |
142 |
+ >=x11-libs/libva-1.6.0:=[${MULTILIB_USEDEP}] |
143 |
+ video_cards_nouveau? ( !<=x11-libs/libva-vdpau-driver-0.7.4-r3 ) |
144 |
+ ) |
145 |
+ vdpau? ( >=x11-libs/libvdpau-1.1:=[${MULTILIB_USEDEP}] ) |
146 |
+ wayland? ( >=dev-libs/wayland-1.2.0:=[${MULTILIB_USEDEP}] ) |
147 |
+ xvmc? ( >=x11-libs/libXvMC-1.0.8:=[${MULTILIB_USEDEP}] ) |
148 |
+ ${LIBDRM_DEPSTRING}[video_cards_freedreno?,video_cards_nouveau?,video_cards_vc4?,video_cards_vivante?,video_cards_vmware?,${MULTILIB_USEDEP}] |
149 |
+" |
150 |
+for card in ${INTEL_CARDS}; do |
151 |
+ RDEPEND="${RDEPEND} |
152 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
153 |
+ " |
154 |
+done |
155 |
+ |
156 |
+for card in ${RADEON_CARDS}; do |
157 |
+ RDEPEND="${RDEPEND} |
158 |
+ video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
159 |
+ " |
160 |
+done |
161 |
+RDEPEND="${RDEPEND} |
162 |
+ video_cards_radeonsi? ( ${LIBDRM_DEPSTRING}[video_cards_amdgpu] ) |
163 |
+" |
164 |
+ |
165 |
+# FIXME: kill the sys-devel/llvm[video_cards_radeon] compat once |
166 |
+# LLVM < 3.9 is out of the game |
167 |
+DEPEND="${RDEPEND} |
168 |
+ llvm? ( |
169 |
+ video_cards_radeonsi? ( || ( |
170 |
+ sys-devel/llvm[llvm_targets_AMDGPU] |
171 |
+ sys-devel/llvm[video_cards_radeon] |
172 |
+ ) ) |
173 |
+ ) |
174 |
+ opencl? ( |
175 |
+ >=sys-devel/llvm-3.4.2:=[${MULTILIB_USEDEP}] |
176 |
+ >=sys-devel/clang-3.4.2:=[${MULTILIB_USEDEP}] |
177 |
+ >=sys-devel/gcc-4.6 |
178 |
+ ) |
179 |
+ sys-devel/gettext |
180 |
+ virtual/pkgconfig |
181 |
+ valgrind? ( dev-util/valgrind ) |
182 |
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
183 |
+ dri3? ( |
184 |
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
185 |
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
186 |
+ ) |
187 |
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
188 |
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
189 |
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
190 |
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
191 |
+" |
192 |
+[[ ${PV} == 9999 ]] && DEPEND+=" |
193 |
+ sys-devel/bison |
194 |
+ sys-devel/flex |
195 |
+ ${PYTHON_DEPS} |
196 |
+ $(python_gen_any_dep ">=dev-python/mako-0.7.3[\${PYTHON_USEDEP}]") |
197 |
+" |
198 |
+ |
199 |
+S="${WORKDIR}/${MY_P}" |
200 |
+EGIT_CHECKOUT_DIR=${S} |
201 |
+ |
202 |
+QA_WX_LOAD=" |
203 |
+x86? ( |
204 |
+ !pic? ( |
205 |
+ usr/lib*/libglapi.so.0.0.0 |
206 |
+ usr/lib*/libGLESv1_CM.so.1.1.0 |
207 |
+ usr/lib*/libGLESv2.so.2.0.0 |
208 |
+ usr/lib*/libGL.so.1.2.0 |
209 |
+ usr/lib*/libOSMesa.so.8.0.0 |
210 |
+ ) |
211 |
+)" |
212 |
+ |
213 |
+pkg_setup() { |
214 |
+ # warning message for bug 459306 |
215 |
+ if use llvm && has_version sys-devel/llvm[!debug=]; then |
216 |
+ ewarn "Mismatch between debug USE flags in media-libs/mesa and sys-devel/llvm" |
217 |
+ ewarn "detected! This can cause problems. For details, see bug 459306." |
218 |
+ fi |
219 |
+ |
220 |
+ python-any-r1_pkg_setup |
221 |
+} |
222 |
+ |
223 |
+src_prepare() { |
224 |
+ [[ ${PV} == 9999 ]] && eautoreconf |
225 |
+ eapply_user |
226 |
+} |
227 |
+ |
228 |
+multilib_src_configure() { |
229 |
+ local myconf |
230 |
+ |
231 |
+ if use classic; then |
232 |
+ # Configurable DRI drivers |
233 |
+ driver_enable swrast |
234 |
+ |
235 |
+ # Intel code |
236 |
+ driver_enable video_cards_i915 i915 |
237 |
+ driver_enable video_cards_i965 i965 |
238 |
+ if ! use video_cards_i915 && \ |
239 |
+ ! use video_cards_i965; then |
240 |
+ driver_enable video_cards_intel i915 i965 |
241 |
+ fi |
242 |
+ |
243 |
+ # Nouveau code |
244 |
+ driver_enable video_cards_nouveau nouveau |
245 |
+ |
246 |
+ # ATI code |
247 |
+ driver_enable video_cards_r100 radeon |
248 |
+ driver_enable video_cards_r200 r200 |
249 |
+ if ! use video_cards_r100 && \ |
250 |
+ ! use video_cards_r200; then |
251 |
+ driver_enable video_cards_radeon radeon r200 |
252 |
+ fi |
253 |
+ fi |
254 |
+ |
255 |
+ if use egl; then |
256 |
+ myconf+=" --with-egl-platforms=x11$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
257 |
+ fi |
258 |
+ |
259 |
+ if use gallium; then |
260 |
+ myconf+=" |
261 |
+ $(use_enable d3d9 nine) |
262 |
+ $(use_enable llvm gallium-llvm) |
263 |
+ $(use_enable openmax omx) |
264 |
+ $(use_enable vaapi va) |
265 |
+ $(use_enable vdpau) |
266 |
+ $(use_enable xa) |
267 |
+ $(use_enable xvmc) |
268 |
+ " |
269 |
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
270 |
+ |
271 |
+ gallium_enable swrast |
272 |
+ gallium_enable video_cards_vc4 vc4 |
273 |
+ gallium_enable video_cards_vivante etnaviv |
274 |
+ gallium_enable video_cards_vmware svga |
275 |
+ gallium_enable video_cards_nouveau nouveau |
276 |
+ gallium_enable video_cards_i915 i915 |
277 |
+ gallium_enable video_cards_ilo ilo |
278 |
+ gallium_enable video_cards_imx imx |
279 |
+ if ! use video_cards_i915 && \ |
280 |
+ ! use video_cards_i965; then |
281 |
+ gallium_enable video_cards_intel i915 |
282 |
+ fi |
283 |
+ |
284 |
+ gallium_enable video_cards_r300 r300 |
285 |
+ gallium_enable video_cards_r600 r600 |
286 |
+ gallium_enable video_cards_radeonsi radeonsi |
287 |
+ if ! use video_cards_r300 && \ |
288 |
+ ! use video_cards_r600; then |
289 |
+ gallium_enable video_cards_radeon r300 r600 |
290 |
+ fi |
291 |
+ |
292 |
+ gallium_enable video_cards_freedreno freedreno |
293 |
+ # opencl stuff |
294 |
+ if use opencl; then |
295 |
+ myconf+=" |
296 |
+ $(use_enable opencl) |
297 |
+ --with-clang-libdir="${EPREFIX}/usr/lib" |
298 |
+ " |
299 |
+ fi |
300 |
+ fi |
301 |
+ |
302 |
+ if use vulkan; then |
303 |
+ vulkan_enable video_cards_i965 intel |
304 |
+ vulkan_enable video_cards_radeonsi radeon |
305 |
+ fi |
306 |
+ |
307 |
+ # x86 hardened pax_kernel needs glx-rts, bug 240956 |
308 |
+ if [[ ${ABI} == x86 ]]; then |
309 |
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
310 |
+ fi |
311 |
+ |
312 |
+ # on abi_x86_32 hardened we need to have asm disable |
313 |
+ if [[ ${ABI} == x86* ]] && use pic; then |
314 |
+ myconf+=" --disable-asm" |
315 |
+ fi |
316 |
+ |
317 |
+ if use gallium; then |
318 |
+ myconf+=" $(use_enable osmesa gallium-osmesa)" |
319 |
+ else |
320 |
+ myconf+=" $(use_enable osmesa)" |
321 |
+ fi |
322 |
+ |
323 |
+ # build fails with BSD indent, bug #428112 |
324 |
+ use userland_GNU || export INDENT=cat |
325 |
+ |
326 |
+ ECONF_SOURCE="${S}" \ |
327 |
+ econf \ |
328 |
+ --enable-dri \ |
329 |
+ --enable-glx \ |
330 |
+ --enable-shared-glapi \ |
331 |
+ --disable-shader-cache \ |
332 |
+ $(use_enable !bindist texture-float) \ |
333 |
+ $(use_enable d3d9 nine) \ |
334 |
+ $(use_enable debug) \ |
335 |
+ $(use_enable dri3) \ |
336 |
+ $(use_enable egl) \ |
337 |
+ $(use_enable gbm) \ |
338 |
+ $(use_enable gles1) \ |
339 |
+ $(use_enable gles2) \ |
340 |
+ $(use_enable nptl glx-tls) \ |
341 |
+ --enable-valgrind=$(usex valgrind auto no) \ |
342 |
+ --enable-llvm-shared-libs \ |
343 |
+ --with-dri-drivers=${DRI_DRIVERS} \ |
344 |
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
345 |
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
346 |
+ PYTHON2="${PYTHON}" \ |
347 |
+ ${myconf} |
348 |
+} |
349 |
+ |
350 |
+multilib_src_install() { |
351 |
+ emake install DESTDIR="${D}" |
352 |
+ |
353 |
+ if use classic || use gallium; then |
354 |
+ ebegin "Moving DRI/Gallium drivers for dynamic switching" |
355 |
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
356 |
+ keepdir /usr/$(get_libdir)/dri |
357 |
+ dodir /usr/$(get_libdir)/mesa |
358 |
+ for x in ${gallium_drivers[@]}; do |
359 |
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then |
360 |
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
361 |
+ || die "Failed to move ${x}" |
362 |
+ fi |
363 |
+ done |
364 |
+ if use classic; then |
365 |
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
366 |
+ fi |
367 |
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
368 |
+ if [ -f ${x} -o -L ${x} ]; then |
369 |
+ mv -f "${x}" "${x/dri/mesa}" \ |
370 |
+ || die "Failed to move ${x}" |
371 |
+ fi |
372 |
+ done |
373 |
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
374 |
+ ln -s ../mesa/*.so . || die "Creating symlink failed" |
375 |
+ # remove symlinks to drivers known to eselect |
376 |
+ for x in ${gallium_drivers[@]}; do |
377 |
+ if [ -f ${x} -o -L ${x} ]; then |
378 |
+ rm "${x}" || die "Failed to remove ${x}" |
379 |
+ fi |
380 |
+ done |
381 |
+ popd |
382 |
+ eend $? |
383 |
+ fi |
384 |
+ if use opencl; then |
385 |
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
386 |
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
387 |
+ dodir ${cl_dir}/{lib,include} |
388 |
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
389 |
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
390 |
+ "${ED}"${cl_dir} |
391 |
+ fi |
392 |
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
393 |
+ mv -f "${ED}"/usr/include/CL \ |
394 |
+ "${ED}"${cl_dir}/include |
395 |
+ fi |
396 |
+ eend $? |
397 |
+ fi |
398 |
+ |
399 |
+ if use openmax; then |
400 |
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
401 |
+ doenvd "${T}"/99mesaxdgomx |
402 |
+ keepdir /usr/share/mesa/xdg |
403 |
+ fi |
404 |
+} |
405 |
+ |
406 |
+multilib_src_install_all() { |
407 |
+ prune_libtool_files --all |
408 |
+ einstalldocs |
409 |
+ |
410 |
+ if use !bindist; then |
411 |
+ dodoc docs/patents.txt |
412 |
+ fi |
413 |
+ |
414 |
+ # Install config file for eselect mesa |
415 |
+ insinto /usr/share/mesa |
416 |
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
417 |
+ |
418 |
+ # Mesa should not install these |
419 |
+ if use vulkan; then |
420 |
+ rm "${ED}"/usr/include/vulkan/{vulkan.h,vk_platform.h} || die |
421 |
+ fi |
422 |
+} |
423 |
+ |
424 |
+multilib_src_test() { |
425 |
+ if use llvm; then |
426 |
+ 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' |
427 |
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die |
428 |
+ emake ${llvm_tests} |
429 |
+ pax-mark m ${llvm_tests} |
430 |
+ popd >/dev/null || die |
431 |
+ fi |
432 |
+ emake check |
433 |
+} |
434 |
+ |
435 |
+pkg_postinst() { |
436 |
+ # Switch to the xorg implementation. |
437 |
+ echo |
438 |
+ eselect opengl set --use-old ${OPENGL_DIR} |
439 |
+ |
440 |
+ # Select classic/gallium drivers |
441 |
+ if use classic || use gallium; then |
442 |
+ eselect mesa set --auto |
443 |
+ fi |
444 |
+ |
445 |
+ # Switch to mesa opencl |
446 |
+ if use opencl; then |
447 |
+ eselect opencl set --use-old ${PN} |
448 |
+ fi |
449 |
+ |
450 |
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
451 |
+ if use openmax; then |
452 |
+ ebegin "Registering OpenMAX drivers" |
453 |
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
454 |
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
455 |
+ omxregister-bellagio |
456 |
+ eend $? |
457 |
+ fi |
458 |
+ |
459 |
+ # warn about patent encumbered texture-float |
460 |
+ if use !bindist; then |
461 |
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
462 |
+ elog "enabled. Please see patents.txt for an explanation." |
463 |
+ fi |
464 |
+ |
465 |
+ if ! has_version media-libs/libtxc_dxtn; then |
466 |
+ elog "Note that in order to have full S3TC support, it is necessary to install" |
467 |
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
468 |
+ elog "textures in some apps, and some others even require this to run." |
469 |
+ fi |
470 |
+} |
471 |
+ |
472 |
+pkg_prerm() { |
473 |
+ if use openmax; then |
474 |
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
475 |
+ fi |
476 |
+} |
477 |
+ |
478 |
+# $1 - VIDEO_CARDS flag |
479 |
+# other args - names of DRI drivers to enable |
480 |
+# TODO: avoid code duplication for a more elegant implementation |
481 |
+driver_enable() { |
482 |
+ case $# in |
483 |
+ # for enabling unconditionally |
484 |
+ 1) |
485 |
+ DRI_DRIVERS+=",$1" |
486 |
+ ;; |
487 |
+ *) |
488 |
+ if use $1; then |
489 |
+ shift |
490 |
+ for i in $@; do |
491 |
+ DRI_DRIVERS+=",${i}" |
492 |
+ done |
493 |
+ fi |
494 |
+ ;; |
495 |
+ esac |
496 |
+} |
497 |
+ |
498 |
+gallium_enable() { |
499 |
+ case $# in |
500 |
+ # for enabling unconditionally |
501 |
+ 1) |
502 |
+ GALLIUM_DRIVERS+=",$1" |
503 |
+ ;; |
504 |
+ *) |
505 |
+ if use $1; then |
506 |
+ shift |
507 |
+ for i in $@; do |
508 |
+ GALLIUM_DRIVERS+=",${i}" |
509 |
+ done |
510 |
+ fi |
511 |
+ ;; |
512 |
+ esac |
513 |
+} |
514 |
+ |
515 |
+vulkan_enable() { |
516 |
+ case $# in |
517 |
+ # for enabling unconditionally |
518 |
+ 1) |
519 |
+ VULKAN_DRIVERS+=",$1" |
520 |
+ ;; |
521 |
+ *) |
522 |
+ if use $1; then |
523 |
+ shift |
524 |
+ for i in $@; do |
525 |
+ VULKAN_DRIVERS+=",${i}" |
526 |
+ done |
527 |
+ fi |
528 |
+ ;; |
529 |
+ esac |
530 |
+} |