1 |
commit: 0fb0b7b410d8a80f032e05bc861d75c803e4b6e8 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 28 21:21:02 2017 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 28 22:38:56 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fb0b7b4 |
7 |
|
8 |
media-libs/mesa: Version bump to 17.1.8 |
9 |
|
10 |
media-libs/mesa/Manifest | 1 + |
11 |
media-libs/mesa/mesa-17.1.8.ebuild | 503 +++++++++++++++++++++++++++++++++++++ |
12 |
2 files changed, 504 insertions(+) |
13 |
|
14 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
15 |
index 43484696451..b82b86af6ea 100644 |
16 |
--- a/media-libs/mesa/Manifest |
17 |
+++ b/media-libs/mesa/Manifest |
18 |
@@ -10,6 +10,7 @@ DIST mesa-17.1.4.tar.xz 9899196 SHA256 06f3b0e6a28f0d20b7f3391cf67fe89ae98ecd0a6 |
19 |
DIST mesa-17.1.5.tar.xz 9901876 SHA256 378516b171712687aace4c7ea8b37c85895231d7a6d61e1e27362cf6034fded9 SHA512 a12671afd812b304e1db690b123a9de16332608541f71cc3ee9128a3630c81416d46255e5bdbf19e14e85716b218f447987b555e3bc0081b8b6f392556fa21e2 WHIRLPOOL b3a94172df5061774e7746ca9f2191f0f04ff375cb76406e22a694141d185f650ce04b3fa4f89b054aa3348f3562886982b5b725680d9ab1cdd6108900da91b7 |
20 |
DIST mesa-17.1.6.tar.xz 9868932 SHA256 0686deadde1f126b20aa67e47e8c50502043eee4ecdf60d5009ffda3cebfee50 SHA512 cf57f29a21208f0a9bc84157f806bcaf6fd0583352449fcb986b05773eeefc99c4040dc41b242782dd5aa9ff7f9c5312b17a4db82d87f600acf165b6acdfc95a WHIRLPOOL 38d6043001798ea9876b55a45222b129596ae92ebb1cc2af36bb0cc8523acce11b38a658d0e8a8afad1b99a49f7d4cdc229b7a3cbb7c15d9858614a91a4994f8 |
21 |
DIST mesa-17.1.7.tar.xz 9903812 SHA256 69f472a874b1122404fa0bd13e2d6bf87eb3b9ad9c21d2f39872a96d83d9e5f5 SHA512 a1cb22b78c74572bef720c132294a028413402520260afff3d46e79f8837dce35aafd8675a8d6834574a4a15ded3611f06dddd5a9fc5882a6dcedab63d0b3e35 WHIRLPOOL 100948b3b436e2331c6251adeb875efd0c316aa1442972d3e1060316bb2c37dc42a8d9a98a1eb31ebf1f680b836c81ee53a8091d32ddb939f113f71fa3d4480a |
22 |
+DIST mesa-17.1.8.tar.xz 9902800 SHA256 75ed2eaeae26ddd536150f294386468ae2e1a7717948c41cd14b7875be5269db SHA512 d29fd999d75967683f5aa836cf0b701705f54de428ebbbac059c3e335e94552c0b455aa67fa2870464a086dc58994f2f320710a1abc265dea363241aede71c5b WHIRLPOOL 8faad2f3da8546d48ee9b5470d147de7507a0dc39787a876f6513933e958baa94571d285095fced7c34c674364ab897a896acc39374849fb22026dd05a9bd27f |
23 |
DIST mesa-17.2.0-rc3.tar.xz 10405100 SHA256 bd417166bc55a74a20e7687738c2f081364637e40a0712989e04b3ba7e404ff2 SHA512 34cc307e82f227fc0398185ac8a349c96631c47e407e883e80523850eeeb0eb4cc445780f61494c2ba81856965d8ae06819330fa54c149808a18db9e872c12b6 WHIRLPOOL 8ea40f6b4a6366b502cd2f2f1ab4bf371dab695b0ed86825a0f0abb36198adfd2d335cf43b668acc4606216a736be41fc735daee1b1b6b6060f4f044bc6f948f |
24 |
DIST mesa-17.2.0-rc4.tar.xz 10404796 SHA256 b1dffaf414c9ef3df23ddf1f3ae4d35e85e296bf2def2fc9c0b402ff9d9a48fb SHA512 a5e2727bd91185db440d94b273cc32e9907d3a64b3f5ea33d5888f7aa2bfec54d7db57eeee6109a8dc28e9efec97ea23e895117ba52f1963cb2bc2b22b718595 WHIRLPOOL fea274533b7cf1652f7823afabf65b36a3d42fab957e604ee907ef281ccec5db82e25cfa171910dae25f2cc59eaff18a3340ce2464f7b5c0415a206d259bb4b5 |
25 |
DIST mesa-17.2.0-rc5.tar.xz 10406640 SHA256 c4c270c1326ed8e7c1dc3e38243bfe67f11124da89f2d86f53cbd9a4da30d0ba SHA512 c6e6f2dea0d612800a9b6a4247ff7656dadb6e2f1fa87e6118502a52b53f9f64f5c88f7300a038231b502b1a7c9aa84532826b94a313182da3fba22e0d7f48ec WHIRLPOOL f2482796db9433ddc3468187b225d180fabb7038dea8c1239d7457e5ab8952f993238ffaaea82f114637739ca952c4d96951b13d3f48984913101987130a65b6 |
26 |
|
27 |
diff --git a/media-libs/mesa/mesa-17.1.8.ebuild b/media-libs/mesa/mesa-17.1.8.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..e331fde780d |
30 |
--- /dev/null |
31 |
+++ b/media-libs/mesa/mesa-17.1.8.ebuild |
32 |
@@ -0,0 +1,503 @@ |
33 |
+# Copyright 1999-2017 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/mesa/mesa.git" |
39 |
+ |
40 |
+if [[ ${PV} = 9999 ]]; then |
41 |
+ GIT_ECLASS="git-r3" |
42 |
+ EXPERIMENTAL="true" |
43 |
+fi |
44 |
+ |
45 |
+PYTHON_COMPAT=( python2_7 ) |
46 |
+ |
47 |
+inherit autotools llvm multilib-minimal python-any-r1 pax-utils ${GIT_ECLASS} |
48 |
+ |
49 |
+OPENGL_DIR="xorg-x11" |
50 |
+ |
51 |
+MY_P="${P/_/-}" |
52 |
+ |
53 |
+DESCRIPTION="OpenGL-like graphic library for Linux" |
54 |
+HOMEPAGE="https://www.mesa3d.org/" |
55 |
+ |
56 |
+if [[ $PV == 9999 ]]; then |
57 |
+ SRC_URI="" |
58 |
+else |
59 |
+ SRC_URI="https://mesa.freedesktop.org/archive/${MY_P}.tar.xz" |
60 |
+ 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" |
61 |
+fi |
62 |
+ |
63 |
+LICENSE="MIT" |
64 |
+SLOT="0" |
65 |
+RESTRICT="!bindist? ( bindist )" |
66 |
+ |
67 |
+INTEL_CARDS="i915 i965 intel" |
68 |
+RADEON_CARDS="r100 r200 r300 r600 radeon radeonsi" |
69 |
+VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} freedreno imx nouveau vc4 vivante vmware" |
70 |
+for card in ${VIDEO_CARDS}; do |
71 |
+ IUSE_VIDEO_CARDS+=" video_cards_${card}" |
72 |
+done |
73 |
+ |
74 |
+IUSE="${IUSE_VIDEO_CARDS} |
75 |
+ bindist +classic d3d9 debug +dri3 +egl +gallium +gbm gles1 gles2 unwind |
76 |
+ +llvm +nptl opencl osmesa pax_kernel openmax pic selinux vaapi valgrind |
77 |
+ vdpau vulkan wayland xvmc xa" |
78 |
+ |
79 |
+REQUIRED_USE=" |
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 |
+ video_cards_radeonsi? ( llvm ) ) |
90 |
+ wayland? ( egl gbm ) |
91 |
+ xa? ( gallium ) |
92 |
+ video_cards_freedreno? ( gallium ) |
93 |
+ video_cards_intel? ( classic ) |
94 |
+ video_cards_i915? ( || ( classic gallium ) ) |
95 |
+ video_cards_i965? ( classic ) |
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_vc4? ( gallium ) |
106 |
+ video_cards_vivante? ( gallium gbm ) |
107 |
+ video_cards_vmware? ( gallium ) |
108 |
+" |
109 |
+ |
110 |
+LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.77" |
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 |
+ >=sys-libs/zlib-1.2.8[${MULTILIB_USEDEP}] |
122 |
+ >=x11-libs/libX11-1.6.2:=[${MULTILIB_USEDEP}] |
123 |
+ >=x11-libs/libxshmfence-1.1:=[${MULTILIB_USEDEP}] |
124 |
+ >=x11-libs/libXdamage-1.1.4-r1:=[${MULTILIB_USEDEP}] |
125 |
+ >=x11-libs/libXext-1.3.2:=[${MULTILIB_USEDEP}] |
126 |
+ >=x11-libs/libXxf86vm-1.1.3:=[${MULTILIB_USEDEP}] |
127 |
+ >=x11-libs/libxcb-1.9.3:=[${MULTILIB_USEDEP}] |
128 |
+ x11-libs/libXfixes:=[${MULTILIB_USEDEP}] |
129 |
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
130 |
+ llvm? ( |
131 |
+ video_cards_radeonsi? ( |
132 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
133 |
+ vulkan? ( >=sys-devel/llvm-3.9.0:=[${MULTILIB_USEDEP}] ) |
134 |
+ ) |
135 |
+ video_cards_r600? ( |
136 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
137 |
+ ) |
138 |
+ video_cards_radeon? ( |
139 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
140 |
+ ) |
141 |
+ >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
142 |
+ ) |
143 |
+ opencl? ( |
144 |
+ app-eselect/eselect-opencl |
145 |
+ dev-libs/libclc |
146 |
+ virtual/libelf:0=[${MULTILIB_USEDEP}] |
147 |
+ ) |
148 |
+ openmax? ( >=media-libs/libomxil-bellagio-0.9.3:=[${MULTILIB_USEDEP}] ) |
149 |
+ vaapi? ( |
150 |
+ >=x11-libs/libva-1.7.3:=[${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.11.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 |
+ ${PYTHON_DEPS} |
177 |
+ llvm? ( |
178 |
+ video_cards_radeonsi? ( || ( |
179 |
+ sys-devel/llvm[llvm_targets_AMDGPU] |
180 |
+ sys-devel/llvm[video_cards_radeon] |
181 |
+ ) ) |
182 |
+ ) |
183 |
+ opencl? ( |
184 |
+ >=sys-devel/llvm-3.6.0:=[${MULTILIB_USEDEP}] |
185 |
+ >=sys-devel/clang-3.6.0:=[${MULTILIB_USEDEP}] |
186 |
+ >=sys-devel/gcc-4.6 |
187 |
+ ) |
188 |
+ sys-devel/gettext |
189 |
+ virtual/pkgconfig |
190 |
+ valgrind? ( dev-util/valgrind ) |
191 |
+ >=x11-proto/dri2proto-2.8-r1:=[${MULTILIB_USEDEP}] |
192 |
+ dri3? ( |
193 |
+ >=x11-proto/dri3proto-1.0:=[${MULTILIB_USEDEP}] |
194 |
+ >=x11-proto/presentproto-1.0:=[${MULTILIB_USEDEP}] |
195 |
+ ) |
196 |
+ >=x11-proto/glproto-1.4.17-r1:=[${MULTILIB_USEDEP}] |
197 |
+ >=x11-proto/xextproto-7.2.1-r1:=[${MULTILIB_USEDEP}] |
198 |
+ >=x11-proto/xf86driproto-2.1.1-r1:=[${MULTILIB_USEDEP}] |
199 |
+ >=x11-proto/xf86vidmodeproto-2.3.1-r1:=[${MULTILIB_USEDEP}] |
200 |
+" |
201 |
+[[ ${PV} == 9999 ]] && DEPEND+=" |
202 |
+ sys-devel/bison |
203 |
+ sys-devel/flex |
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 |
+ if use llvm || use opencl; then |
229 |
+ llvm_pkg_setup |
230 |
+ fi |
231 |
+ python-any-r1_pkg_setup |
232 |
+} |
233 |
+ |
234 |
+src_prepare() { |
235 |
+ [[ ${PV} == 9999 ]] && eautoreconf |
236 |
+ eapply_user |
237 |
+} |
238 |
+ |
239 |
+multilib_src_configure() { |
240 |
+ local myconf |
241 |
+ |
242 |
+ if use classic; then |
243 |
+ # Configurable DRI drivers |
244 |
+ driver_enable swrast |
245 |
+ |
246 |
+ # Intel code |
247 |
+ driver_enable video_cards_i915 i915 |
248 |
+ driver_enable video_cards_i965 i965 |
249 |
+ if ! use video_cards_i915 && \ |
250 |
+ ! use video_cards_i965; then |
251 |
+ driver_enable video_cards_intel i915 i965 |
252 |
+ fi |
253 |
+ |
254 |
+ # Nouveau code |
255 |
+ driver_enable video_cards_nouveau nouveau |
256 |
+ |
257 |
+ # ATI code |
258 |
+ driver_enable video_cards_r100 radeon |
259 |
+ driver_enable video_cards_r200 r200 |
260 |
+ if ! use video_cards_r100 && \ |
261 |
+ ! use video_cards_r200; then |
262 |
+ driver_enable video_cards_radeon radeon r200 |
263 |
+ fi |
264 |
+ fi |
265 |
+ |
266 |
+ if use egl; then |
267 |
+ myconf+=" --with-egl-platforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm")" |
268 |
+ fi |
269 |
+ |
270 |
+ if use gallium; then |
271 |
+ myconf+=" |
272 |
+ $(use_enable d3d9 nine) |
273 |
+ $(use_enable llvm) |
274 |
+ $(use_enable openmax omx) |
275 |
+ $(use_enable vaapi va) |
276 |
+ $(use_enable vdpau) |
277 |
+ $(use_enable xa) |
278 |
+ $(use_enable xvmc) |
279 |
+ " |
280 |
+ use vaapi && myconf+=" --with-va-libdir=/usr/$(get_libdir)/va/drivers" |
281 |
+ |
282 |
+ gallium_enable swrast |
283 |
+ gallium_enable video_cards_vc4 vc4 |
284 |
+ gallium_enable video_cards_vivante etnaviv |
285 |
+ gallium_enable video_cards_vmware svga |
286 |
+ gallium_enable video_cards_nouveau nouveau |
287 |
+ gallium_enable video_cards_i915 i915 |
288 |
+ gallium_enable video_cards_imx imx |
289 |
+ if ! use video_cards_i915 && \ |
290 |
+ ! use video_cards_i965; then |
291 |
+ gallium_enable video_cards_intel i915 |
292 |
+ fi |
293 |
+ |
294 |
+ gallium_enable video_cards_r300 r300 |
295 |
+ gallium_enable video_cards_r600 r600 |
296 |
+ gallium_enable video_cards_radeonsi radeonsi |
297 |
+ if ! use video_cards_r300 && \ |
298 |
+ ! use video_cards_r600; then |
299 |
+ gallium_enable video_cards_radeon r300 r600 |
300 |
+ fi |
301 |
+ |
302 |
+ gallium_enable video_cards_freedreno freedreno |
303 |
+ # opencl stuff |
304 |
+ if use opencl; then |
305 |
+ myconf+=" |
306 |
+ $(use_enable opencl) |
307 |
+ --with-clang-libdir="${EPREFIX}/usr/lib" |
308 |
+ " |
309 |
+ fi |
310 |
+ fi |
311 |
+ |
312 |
+ if use vulkan; then |
313 |
+ vulkan_enable video_cards_i965 intel |
314 |
+ vulkan_enable video_cards_radeonsi radeon |
315 |
+ fi |
316 |
+ |
317 |
+ # x86 hardened pax_kernel needs glx-rts, bug 240956 |
318 |
+ if [[ ${ABI} == x86 ]]; then |
319 |
+ myconf+=" $(use_enable pax_kernel glx-read-only-text)" |
320 |
+ fi |
321 |
+ |
322 |
+ # on abi_x86_32 hardened we need to have asm disable |
323 |
+ if [[ ${ABI} == x86* ]] && use pic; then |
324 |
+ myconf+=" --disable-asm" |
325 |
+ fi |
326 |
+ |
327 |
+ if use gallium; then |
328 |
+ myconf+=" $(use_enable osmesa gallium-osmesa)" |
329 |
+ else |
330 |
+ myconf+=" $(use_enable osmesa)" |
331 |
+ fi |
332 |
+ |
333 |
+ # build fails with BSD indent, bug #428112 |
334 |
+ use userland_GNU || export INDENT=cat |
335 |
+ |
336 |
+ ECONF_SOURCE="${S}" \ |
337 |
+ econf \ |
338 |
+ --enable-dri \ |
339 |
+ --enable-glx \ |
340 |
+ --enable-shared-glapi \ |
341 |
+ $(use_enable !bindist texture-float) \ |
342 |
+ $(use_enable d3d9 nine) \ |
343 |
+ $(use_enable debug) \ |
344 |
+ $(use_enable dri3) \ |
345 |
+ $(use_enable egl) \ |
346 |
+ $(use_enable gbm) \ |
347 |
+ $(use_enable gles1) \ |
348 |
+ $(use_enable gles2) \ |
349 |
+ $(use_enable nptl glx-tls) \ |
350 |
+ $(use_enable unwind libunwind) \ |
351 |
+ --enable-valgrind=$(usex valgrind auto no) \ |
352 |
+ --enable-llvm-shared-libs \ |
353 |
+ --with-dri-drivers=${DRI_DRIVERS} \ |
354 |
+ --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
355 |
+ --with-vulkan-drivers=${VULKAN_DRIVERS} \ |
356 |
+ PYTHON2="${PYTHON}" \ |
357 |
+ ${myconf} |
358 |
+} |
359 |
+ |
360 |
+multilib_src_install() { |
361 |
+ emake install DESTDIR="${D}" |
362 |
+ |
363 |
+ if use classic || use gallium; then |
364 |
+ ebegin "Moving DRI/Gallium drivers for dynamic switching" |
365 |
+ local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
366 |
+ keepdir /usr/$(get_libdir)/dri |
367 |
+ dodir /usr/$(get_libdir)/mesa |
368 |
+ for x in ${gallium_drivers[@]}; do |
369 |
+ if [ -f "$(get_libdir)/gallium/${x}" ]; then |
370 |
+ mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
371 |
+ || die "Failed to move ${x}" |
372 |
+ fi |
373 |
+ done |
374 |
+ if use classic; then |
375 |
+ emake -C "${BUILD_DIR}/src/mesa/drivers/dri" DESTDIR="${D}" install |
376 |
+ fi |
377 |
+ for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
378 |
+ if [ -f ${x} -o -L ${x} ]; then |
379 |
+ mv -f "${x}" "${x/dri/mesa}" \ |
380 |
+ || die "Failed to move ${x}" |
381 |
+ fi |
382 |
+ done |
383 |
+ pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
384 |
+ ln -s ../mesa/*.so . || die "Creating symlink failed" |
385 |
+ # remove symlinks to drivers known to eselect |
386 |
+ for x in ${gallium_drivers[@]}; do |
387 |
+ if [ -f ${x} -o -L ${x} ]; then |
388 |
+ rm "${x}" || die "Failed to remove ${x}" |
389 |
+ fi |
390 |
+ done |
391 |
+ popd |
392 |
+ eend $? |
393 |
+ fi |
394 |
+ if use opencl; then |
395 |
+ ebegin "Moving Gallium/Clover OpenCL implementation for dynamic switching" |
396 |
+ local cl_dir="/usr/$(get_libdir)/OpenCL/vendors/mesa" |
397 |
+ dodir ${cl_dir}/{lib,include} |
398 |
+ if [ -f "${ED}/usr/$(get_libdir)/libOpenCL.so" ]; then |
399 |
+ mv -f "${ED}"/usr/$(get_libdir)/libOpenCL.so* \ |
400 |
+ "${ED}"${cl_dir} |
401 |
+ fi |
402 |
+ if [ -f "${ED}/usr/include/CL/opencl.h" ]; then |
403 |
+ mv -f "${ED}"/usr/include/CL \ |
404 |
+ "${ED}"${cl_dir}/include |
405 |
+ fi |
406 |
+ eend $? |
407 |
+ fi |
408 |
+ |
409 |
+ if use openmax; then |
410 |
+ echo "XDG_DATA_DIRS=\"${EPREFIX}/usr/share/mesa/xdg\"" > "${T}/99mesaxdgomx" |
411 |
+ doenvd "${T}"/99mesaxdgomx |
412 |
+ keepdir /usr/share/mesa/xdg |
413 |
+ fi |
414 |
+} |
415 |
+ |
416 |
+multilib_src_install_all() { |
417 |
+ find "${ED}" -name '*.la' -delete |
418 |
+ einstalldocs |
419 |
+ |
420 |
+ if use !bindist; then |
421 |
+ dodoc docs/patents.txt |
422 |
+ fi |
423 |
+ |
424 |
+ # Install config file for eselect mesa |
425 |
+ insinto /usr/share/mesa |
426 |
+ newins "${FILESDIR}/eselect-mesa.conf.9.2" eselect-mesa.conf |
427 |
+} |
428 |
+ |
429 |
+multilib_src_test() { |
430 |
+ if use llvm; then |
431 |
+ 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' |
432 |
+ pushd src/gallium/drivers/llvmpipe >/dev/null || die |
433 |
+ emake ${llvm_tests} |
434 |
+ pax-mark m ${llvm_tests} |
435 |
+ popd >/dev/null || die |
436 |
+ fi |
437 |
+ emake check |
438 |
+} |
439 |
+ |
440 |
+pkg_postinst() { |
441 |
+ # Switch to the xorg implementation. |
442 |
+ echo |
443 |
+ eselect opengl set --use-old ${OPENGL_DIR} |
444 |
+ |
445 |
+ # Select classic/gallium drivers |
446 |
+ if use classic || use gallium; then |
447 |
+ eselect mesa set --auto |
448 |
+ fi |
449 |
+ |
450 |
+ # Switch to mesa opencl |
451 |
+ if use opencl; then |
452 |
+ eselect opencl set --use-old ${PN} |
453 |
+ fi |
454 |
+ |
455 |
+ # run omxregister-bellagio to make the OpenMAX drivers known system-wide |
456 |
+ if use openmax; then |
457 |
+ ebegin "Registering OpenMAX drivers" |
458 |
+ BELLAGIO_SEARCH_PATH="${EPREFIX}/usr/$(get_libdir)/libomxil-bellagio0" \ |
459 |
+ OMX_BELLAGIO_REGISTRY=${EPREFIX}/usr/share/mesa/xdg/.omxregister \ |
460 |
+ omxregister-bellagio |
461 |
+ eend $? |
462 |
+ fi |
463 |
+ |
464 |
+ # warn about patent encumbered texture-float |
465 |
+ if use !bindist; then |
466 |
+ elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
467 |
+ elog "enabled. Please see patents.txt for an explanation." |
468 |
+ fi |
469 |
+ |
470 |
+ if ! has_version media-libs/libtxc_dxtn; then |
471 |
+ elog "Note that in order to have full S3TC support, it is necessary to install" |
472 |
+ elog "media-libs/libtxc_dxtn as well. This may be necessary to get nice" |
473 |
+ elog "textures in some apps, and some others even require this to run." |
474 |
+ fi |
475 |
+} |
476 |
+ |
477 |
+pkg_prerm() { |
478 |
+ if use openmax; then |
479 |
+ rm "${EPREFIX}"/usr/share/mesa/xdg/.omxregister |
480 |
+ fi |
481 |
+} |
482 |
+ |
483 |
+# $1 - VIDEO_CARDS flag |
484 |
+# other args - names of DRI drivers to enable |
485 |
+# TODO: avoid code duplication for a more elegant implementation |
486 |
+driver_enable() { |
487 |
+ case $# in |
488 |
+ # for enabling unconditionally |
489 |
+ 1) |
490 |
+ DRI_DRIVERS+=",$1" |
491 |
+ ;; |
492 |
+ *) |
493 |
+ if use $1; then |
494 |
+ shift |
495 |
+ for i in $@; do |
496 |
+ DRI_DRIVERS+=",${i}" |
497 |
+ done |
498 |
+ fi |
499 |
+ ;; |
500 |
+ esac |
501 |
+} |
502 |
+ |
503 |
+gallium_enable() { |
504 |
+ case $# in |
505 |
+ # for enabling unconditionally |
506 |
+ 1) |
507 |
+ GALLIUM_DRIVERS+=",$1" |
508 |
+ ;; |
509 |
+ *) |
510 |
+ if use $1; then |
511 |
+ shift |
512 |
+ for i in $@; do |
513 |
+ GALLIUM_DRIVERS+=",${i}" |
514 |
+ done |
515 |
+ fi |
516 |
+ ;; |
517 |
+ esac |
518 |
+} |
519 |
+ |
520 |
+vulkan_enable() { |
521 |
+ case $# in |
522 |
+ # for enabling unconditionally |
523 |
+ 1) |
524 |
+ VULKAN_DRIVERS+=",$1" |
525 |
+ ;; |
526 |
+ *) |
527 |
+ if use $1; then |
528 |
+ shift |
529 |
+ for i in $@; do |
530 |
+ VULKAN_DRIVERS+=",${i}" |
531 |
+ done |
532 |
+ fi |
533 |
+ ;; |
534 |
+ esac |
535 |
+} |