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