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