1 |
commit: 94d9187f6b7fbecd941f902d4f0129d13745545c |
2 |
Author: Benda Xu <heroxbd <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Jan 7 12:57:30 2018 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 7 12:57:30 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/android.git/commit/?id=94d9187f |
7 |
|
8 |
mesa: not needed and outdated. |
9 |
|
10 |
media-libs/mesa/Manifest | 5 - |
11 |
media-libs/mesa/files/eselect-mesa.conf.7.11 | 39 --- |
12 |
media-libs/mesa/files/glx_ro_text_segm.patch | 28 -- |
13 |
.../mesa/files/mesa-glibc-2.3.5-initstate_r.patch | 25 -- |
14 |
media-libs/mesa/mesa-7.11.1.ebuild | 370 --------------------- |
15 |
5 files changed, 467 deletions(-) |
16 |
|
17 |
diff --git a/media-libs/mesa/Manifest b/media-libs/mesa/Manifest |
18 |
deleted file mode 100644 |
19 |
index 0b1a7fd..0000000 |
20 |
--- a/media-libs/mesa/Manifest |
21 |
+++ /dev/null |
22 |
@@ -1,5 +0,0 @@ |
23 |
-AUX eselect-mesa.conf.7.11 1670 RMD160 74d85b0481f36a8e2b2e09245d49d09671500946 SHA1 5c5f468feaae946e5901698d1c0ffe8fc480b783 SHA256 448d08e97e931563aa2e33f22feeaf911caf9a2eb9fd7b446485311d1dcc1225 |
24 |
-AUX glx_ro_text_segm.patch 731 RMD160 6d2bd85591d6349fa45a5ee16c724859c640e902 SHA1 3015aa2bd139bcdf2c3fae61f460f0c5aaeb1df7 SHA256 e36af5b530fdbe2b0e62a035bf4bf4baef267c3dc56133d1a58e56899ebffc5c |
25 |
-AUX mesa-glibc-2.3.5-initstate_r.patch 851 RMD160 7719973b9e528aad9be5db555d083a5c50af58dc SHA1 6df8b389f1a70b14f4a4582be6582e07d2799c25 SHA256 b5598436ea525e339d837f740300c35f232967384cad8bb81e7a2ec4990ee734 |
26 |
-DIST MesaLib-7.11.1.tar.bz2 6255382 RMD160 4d63a0485eaa26d61f08249b209245eed16b11bb SHA1 226ce14d3adf8fe5a6d98f785bb5f63d2a8656da SHA256 229a8b38502147fbbb99665ed9b892d194ebcb5f5875a1701a54acea94a9c8c9 |
27 |
-EBUILD mesa-7.11.1.ebuild 10057 RMD160 28bdb30ef5d7468a08af1e5edb9e86f61400972d SHA1 c61fed5bf32845a690f22a5599f22dc266ddeba6 SHA256 8591c63ed4ed9b43c459b73b88a21d7a8ac42f8bc1c93067d38cc88f39d1456d |
28 |
|
29 |
diff --git a/media-libs/mesa/files/eselect-mesa.conf.7.11 b/media-libs/mesa/files/eselect-mesa.conf.7.11 |
30 |
deleted file mode 100644 |
31 |
index 3a1b196..0000000 |
32 |
--- a/media-libs/mesa/files/eselect-mesa.conf.7.11 |
33 |
+++ /dev/null |
34 |
@@ -1,39 +0,0 @@ |
35 |
-# mesa classic/gallium implementations in this release |
36 |
- |
37 |
-# Syntax description: |
38 |
-# * MESA_IMPLEMENTATIONS contains a space-delimited list of switchable |
39 |
-# classic/gallium implementations. |
40 |
-# * MESA_DRIVERS is an associative array, for each member "foo" of |
41 |
-# MESA_IMPLEMENTATIONS it contains the following elements: |
42 |
-# foo,description - Human-readable description of the driver |
43 |
-# foo,classicdriver - Filename of the classic driver |
44 |
-# foo,galliumdriver - Filename of the gallium driver |
45 |
-# foo,default - which of classic or gallium is chosen by default |
46 |
- |
47 |
-MESA_IMPLEMENTATIONS="i915 i965 r300 r600 sw" |
48 |
-declare -A MESA_DRIVERS || die "MESA_DRIVERS already in environment and not associative." |
49 |
- |
50 |
-MESA_DRIVERS[i915,description]="i915 (Intel 915, 945)" |
51 |
-MESA_DRIVERS[i915,classicdriver]="i915_dri.so" |
52 |
-MESA_DRIVERS[i915,galliumdriver]="i915g_dri.so" |
53 |
-MESA_DRIVERS[i915,default]="classic" |
54 |
- |
55 |
-MESA_DRIVERS[i965,description]="i965 (Intel 965, G/Q3x, G/Q4x)" |
56 |
-MESA_DRIVERS[i965,classicdriver]="i965_dri.so" |
57 |
-MESA_DRIVERS[i965,galliumdriver]="i965g_dri.so" |
58 |
-MESA_DRIVERS[i965,default]="classic" |
59 |
- |
60 |
-MESA_DRIVERS[r300,description]="r300 (Radeon R300-R500)" |
61 |
-MESA_DRIVERS[r300,classicdriver]="r300_dri.so" |
62 |
-MESA_DRIVERS[r300,galliumdriver]="r300g_dri.so" |
63 |
-MESA_DRIVERS[r300,default]="gallium" |
64 |
- |
65 |
-MESA_DRIVERS[r600,description]="r600 (Radeon R600-R700, Evergreen, Northern Islands)" |
66 |
-MESA_DRIVERS[r600,classicdriver]="r600_dri.so" |
67 |
-MESA_DRIVERS[r600,galliumdriver]="r600g_dri.so" |
68 |
-MESA_DRIVERS[r600,default]="gallium" |
69 |
- |
70 |
-MESA_DRIVERS[sw,description]="sw (Software renderer)" |
71 |
-MESA_DRIVERS[sw,classicdriver]="swrast_dri.so" |
72 |
-MESA_DRIVERS[sw,galliumdriver]="swrastg_dri.so" |
73 |
-MESA_DRIVERS[sw,default]="gallium" |
74 |
|
75 |
diff --git a/media-libs/mesa/files/glx_ro_text_segm.patch b/media-libs/mesa/files/glx_ro_text_segm.patch |
76 |
deleted file mode 100644 |
77 |
index 495b7dc..0000000 |
78 |
--- a/media-libs/mesa/files/glx_ro_text_segm.patch |
79 |
+++ /dev/null |
80 |
@@ -1,28 +0,0 @@ |
81 |
-2011-02-09 Jeremy Huddleston <jeremyhu@×××××××××××.org |
82 |
- |
83 |
- #240956 |
84 |
- * configure.ac add support to enable readonly test segment on x86 |
85 |
- |
86 |
---- configure.ac.orig 2008-11-17 23:19:38.000000000 +0100 |
87 |
-+++ configure.ac 2008-11-17 23:20:17.000000000 +0100 |
88 |
-@@ -499,6 +499,20 @@ |
89 |
- enable_xcb=no |
90 |
- fi |
91 |
- |
92 |
-+ |
93 |
-+dnl readonly text segment on x86 hardened platforms |
94 |
-+AC_ARG_ENABLE([glx_rts], |
95 |
-+ [AS_HELP_STRING([--enable-glx-rts], |
96 |
-+ [on x86, use a readonly text segment for libGL @<:@default=disabled@:>@])], |
97 |
-+ [enable_glx_rts="$enableval"], |
98 |
-+ [enable_glx_rts=no]) |
99 |
-+if test "x$enable_glx_rts" = xyes; then |
100 |
-+ DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT" |
101 |
-+else |
102 |
-+ enable_glx_rts=no |
103 |
-+fi |
104 |
-+ |
105 |
-+ |
106 |
- dnl |
107 |
- dnl libGL configuration per driver |
108 |
- dnl |
109 |
|
110 |
diff --git a/media-libs/mesa/files/mesa-glibc-2.3.5-initstate_r.patch b/media-libs/mesa/files/mesa-glibc-2.3.5-initstate_r.patch |
111 |
deleted file mode 100644 |
112 |
index 1252965..0000000 |
113 |
--- a/media-libs/mesa/files/mesa-glibc-2.3.5-initstate_r.patch |
114 |
+++ /dev/null |
115 |
@@ -1,25 +0,0 @@ |
116 |
-# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323811 |
117 |
---- src/glx/glxhash.c.old 2011-11-29 23:51:43.000000000 +0900 |
118 |
-+++ src/glx/glxhash.c 2011-11-29 23:52:23.000000000 +0900 |
119 |
-@@ -88,21 +88,10 @@ |
120 |
- |
121 |
- #define HASH_ALLOC malloc |
122 |
- #define HASH_FREE free |
123 |
--#ifndef __GLIBC__ |
124 |
- #define HASH_RANDOM_DECL char *ps, rs[256] |
125 |
- #define HASH_RANDOM_INIT(seed) ps = initstate(seed, rs, sizeof(rs)) |
126 |
- #define HASH_RANDOM random() |
127 |
- #define HASH_RANDOM_DESTROY setstate(ps) |
128 |
--#else |
129 |
--#define HASH_RANDOM_DECL struct random_data rd; int32_t rv; char rs[256] |
130 |
--#define HASH_RANDOM_INIT(seed) \ |
131 |
-- do { \ |
132 |
-- (void) memset(&rd, 0, sizeof(rd)); \ |
133 |
-- (void) initstate_r(seed, rs, sizeof(rs), &rd); \ |
134 |
-- } while(0) |
135 |
--#define HASH_RANDOM ((void) random_r(&rd, &rv), rv) |
136 |
--#define HASH_RANDOM_DESTROY |
137 |
--#endif |
138 |
- |
139 |
- typedef struct __glxHashBucket |
140 |
- { |
141 |
|
142 |
diff --git a/media-libs/mesa/mesa-7.11.1.ebuild b/media-libs/mesa/mesa-7.11.1.ebuild |
143 |
deleted file mode 100644 |
144 |
index 7446587..0000000 |
145 |
--- a/media-libs/mesa/mesa-7.11.1.ebuild |
146 |
+++ /dev/null |
147 |
@@ -1,370 +0,0 @@ |
148 |
-# Copyright 1999-2011 Gentoo Foundation |
149 |
-# Distributed under the terms of the GNU General Public License v2 |
150 |
-# $Header: /var/cvsroot/gentoo-x86/media-libs/mesa/mesa-7.11.1.ebuild,v 1.1 2011/11/18 16:16:49 chithanh Exp $ |
151 |
- |
152 |
-EAPI=3 |
153 |
- |
154 |
-EGIT_REPO_URI="git://anongit.freedesktop.org/mesa/mesa" |
155 |
- |
156 |
-if [[ ${PV} = 9999* ]]; then |
157 |
- GIT_ECLASS="git-2" |
158 |
- EXPERIMENTAL="true" |
159 |
-fi |
160 |
- |
161 |
-inherit base autotools multilib flag-o-matic python toolchain-funcs ${GIT_ECLASS} |
162 |
- |
163 |
-OPENGL_DIR="xorg-x11" |
164 |
- |
165 |
-MY_PN="${PN/m/M}" |
166 |
-MY_P="${MY_PN}-${PV/_/-}" |
167 |
-MY_SRC_P="${MY_PN}Lib-${PV/_/-}" |
168 |
- |
169 |
-FOLDER="${PV/_rc*/}" |
170 |
- |
171 |
-DESCRIPTION="OpenGL-like graphic library for Linux" |
172 |
-HOMEPAGE="http://mesa3d.sourceforge.net/" |
173 |
- |
174 |
-#SRC_PATCHES="mirror://gentoo/${P}-gentoo-patches-01.tar.bz2" |
175 |
-if [[ $PV = 9999* ]]; then |
176 |
- SRC_URI="${SRC_PATCHES}" |
177 |
-else |
178 |
- SRC_URI="ftp://ftp.freedesktop.org/pub/mesa/${FOLDER}/${MY_SRC_P}.tar.bz2 |
179 |
- ${SRC_PATCHES}" |
180 |
-fi |
181 |
- |
182 |
-LICENSE="MIT LGPL-3 SGI-B-2.0" |
183 |
-SLOT="0" |
184 |
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris" |
185 |
- |
186 |
-INTEL_CARDS="intel" |
187 |
-RADEON_CARDS="radeon" |
188 |
-VIDEO_CARDS="${INTEL_CARDS} ${RADEON_CARDS} mach64 mga nouveau r128 savage sis vmware tdfx via" |
189 |
-for card in ${VIDEO_CARDS}; do |
190 |
- IUSE_VIDEO_CARDS+=" video_cards_${card}" |
191 |
-done |
192 |
- |
193 |
-IUSE="${IUSE_VIDEO_CARDS} |
194 |
- bindist +classic debug +egl +gallium gbm gles +llvm motif +nptl openvg osmesa pic pax_kernel selinux shared-dricore +shared-glapi kernel_FreeBSD" |
195 |
- |
196 |
-LIBDRM_DEPSTRING=">=x11-libs/libdrm-2.4.24" |
197 |
-# not a runtime dependency of this package, but dependency of packages which |
198 |
-# depend on this package, bug #342393 |
199 |
-EXTERNAL_DEPEND=" |
200 |
- >=x11-proto/dri2proto-2.2 |
201 |
- >=x11-proto/glproto-1.4.11 |
202 |
-" |
203 |
-# keep correct libdrm and dri2proto dep |
204 |
-# keep blocks in rdepend for binpkg |
205 |
-RDEPEND="${EXTERNAL_DEPEND} |
206 |
- !<x11-base/xorg-server-1.7 |
207 |
- !<=x11-proto/xf86driproto-2.0.3 |
208 |
- classic? ( app-admin/eselect-mesa ) |
209 |
- gallium? ( app-admin/eselect-mesa ) |
210 |
- app-admin/eselect-opengl |
211 |
- dev-libs/expat |
212 |
- gbm? ( sys-fs/udev ) |
213 |
- x11-libs/libICE |
214 |
- >=x11-libs/libX11-1.3.99.901 |
215 |
- x11-libs/libXdamage |
216 |
- x11-libs/libXext |
217 |
- x11-libs/libXi |
218 |
- x11-libs/libXmu |
219 |
- x11-libs/libXxf86vm |
220 |
- motif? ( x11-libs/openmotif ) |
221 |
- gallium? ( |
222 |
- llvm? ( >=sys-devel/llvm-2.8 ) |
223 |
- ) |
224 |
- ${LIBDRM_DEPSTRING}[video_cards_nouveau?,video_cards_vmware?] |
225 |
-" |
226 |
-for card in ${INTEL_CARDS}; do |
227 |
- RDEPEND="${RDEPEND} |
228 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_intel] ) |
229 |
- " |
230 |
-done |
231 |
- |
232 |
-for card in ${RADEON_CARDS}; do |
233 |
- RDEPEND="${RDEPEND} |
234 |
- video_cards_${card}? ( ${LIBDRM_DEPSTRING}[video_cards_radeon] ) |
235 |
- " |
236 |
-done |
237 |
- |
238 |
-DEPEND="${RDEPEND} |
239 |
- =dev-lang/python-2* |
240 |
- dev-libs/libxml2[python] |
241 |
- dev-util/pkgconfig |
242 |
- sys-devel/bison |
243 |
- sys-devel/flex |
244 |
- x11-misc/makedepend |
245 |
- x11-proto/inputproto |
246 |
- >=x11-proto/xextproto-7.0.99.1 |
247 |
- x11-proto/xf86driproto |
248 |
- x11-proto/xf86vidmodeproto |
249 |
-" |
250 |
- |
251 |
-S="${WORKDIR}/${MY_P}" |
252 |
- |
253 |
-# It is slow without texrels, if someone wants slow |
254 |
-# mesa without texrels +pic use is worth the shot |
255 |
-QA_EXECSTACK="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
256 |
-QA_WX_LOAD="usr/lib*/opengl/xorg-x11/lib/libGL.so*" |
257 |
- |
258 |
-# Think about: ggi, fbcon, no-X configs |
259 |
- |
260 |
-pkg_setup() { |
261 |
- # gcc 4.2 has buggy ivopts |
262 |
- if [[ $(gcc-version) = "4.2" ]]; then |
263 |
- append-flags -fno-ivopts |
264 |
- fi |
265 |
- |
266 |
- # recommended by upstream |
267 |
- append-flags -ffast-math |
268 |
- # workaround toc-issue wrt #386545 |
269 |
- use ppc64 && append-flags -mminimal-toc |
270 |
- |
271 |
- python_set_active_version 2 |
272 |
- python_pkg_setup |
273 |
-} |
274 |
- |
275 |
-src_unpack() { |
276 |
- default |
277 |
- [[ $PV = 9999* ]] && git-2_src_unpack |
278 |
-} |
279 |
- |
280 |
-src_prepare() { |
281 |
- # apply patches |
282 |
- if [[ ${PV} != 9999* && -n ${SRC_PATCHES} ]]; then |
283 |
- EPATCH_FORCE="yes" \ |
284 |
- EPATCH_SOURCE="${WORKDIR}/patches" \ |
285 |
- EPATCH_SUFFIX="patch" \ |
286 |
- epatch |
287 |
- fi |
288 |
- # fix for hardened pax_kernel, bug 240956 |
289 |
- [[ ${PV} != 9999* ]] && epatch "${FILESDIR}"/glx_ro_text_segm.patch |
290 |
- [[ -n ${GLIBC2dot3} ]] && epatch "${FILESDIR}"/mesa-glibc-2.3.5-initstate_r.patch |
291 |
- |
292 |
- # FreeBSD 6.* doesn't have posix_memalign(). |
293 |
- if [[ ${CHOST} == *-freebsd6.* ]]; then |
294 |
- sed -i \ |
295 |
- -e "s/-DHAVE_POSIX_MEMALIGN//" \ |
296 |
- configure.ac || die |
297 |
- fi |
298 |
- # Solaris needs some recent POSIX stuff in our case |
299 |
- if [[ ${CHOST} == *-solaris* ]] ; then |
300 |
- sed -i -e "s/-DSVR4/-D_POSIX_C_SOURCE=200112L/" configure.ac || die |
301 |
- sed -i -e 's/uint/unsigned int/g' src/egl/drivers/glx/egl_glx.c || die |
302 |
- fi |
303 |
- |
304 |
- # In order for mesa to complete it's build process we need to use a tool |
305 |
- # that it compiles. When we cross compile this clearly does not work |
306 |
- # so we require mesa to be built on the host system first. -solar |
307 |
- if tc-is-cross-compiler; then |
308 |
- sed -i -e "s#^GLSL_CL = .*\$#GLSL_CL = glsl_compiler#g" \ |
309 |
- "${S}"/src/mesa/shader/slang/library/Makefile || die |
310 |
- fi |
311 |
- |
312 |
- base_src_prepare |
313 |
- |
314 |
- eautoreconf |
315 |
-} |
316 |
- |
317 |
-src_configure() { |
318 |
- local myconf |
319 |
- |
320 |
- if use classic; then |
321 |
- # Configurable DRI drivers |
322 |
- driver_enable swrast |
323 |
- driver_enable video_cards_intel i810 i915 i965 |
324 |
- driver_enable video_cards_nouveau nouveau |
325 |
- driver_enable video_cards_mach64 mach64 |
326 |
- driver_enable video_cards_mga mga |
327 |
- driver_enable video_cards_r128 r128 |
328 |
- driver_enable video_cards_radeon radeon r200 r300 r600 |
329 |
- driver_enable video_cards_savage savage |
330 |
- driver_enable video_cards_sis sis |
331 |
- driver_enable video_cards_tdfx tdfx |
332 |
- driver_enable video_cards_via unichrome |
333 |
- fi |
334 |
- |
335 |
- myconf+=" |
336 |
- $(use_enable !bindist texture-float) |
337 |
- $(use_enable gles gles1) |
338 |
- $(use_enable gles gles2) |
339 |
- $(use_enable egl) |
340 |
- " |
341 |
- if use egl; then |
342 |
- use shared-glapi || die "egl needs shared-glapi. Please either enable shared-glapi or disable the egl use flag ." |
343 |
- myconf+=" |
344 |
- --with-egl-platforms=x11$(use gbm && echo ",drm") |
345 |
- $(use_enable gallium gallium-egl) |
346 |
- " |
347 |
- fi |
348 |
- |
349 |
- if use !gallium && use !classic; then |
350 |
- ewarn "You enabled neither classic nor gallium USE flags. No hardware" |
351 |
- ewarn "drivers will be built." |
352 |
- fi |
353 |
- if use gallium; then |
354 |
- myconf+=" |
355 |
- --with-state-trackers=glx,dri$(use egl && echo ",egl")$(use openvg && echo ",vega") |
356 |
- $(use_enable llvm gallium-llvm) |
357 |
- $(use_enable openvg) |
358 |
- " |
359 |
- gallium_enable swrast |
360 |
- gallium_enable video_cards_vmware svga |
361 |
- gallium_enable video_cards_nouveau nouveau |
362 |
- gallium_enable video_cards_intel i915 i965 |
363 |
- gallium_enable video_cards_radeon r300 r600 |
364 |
- fi |
365 |
- |
366 |
- # x86 hardened pax_kernel needs glx-rts, bug 240956 |
367 |
- if use pax_kernel; then |
368 |
- myconf+=" |
369 |
- $(use_enable x86 glx-rts) |
370 |
- " |
371 |
- fi |
372 |
- |
373 |
- # --with-driver=dri|xlib|osmesa || do we need osmesa? |
374 |
- econf \ |
375 |
- --disable-option-checking \ |
376 |
- --with-driver=dri \ |
377 |
- --disable-glut \ |
378 |
- --without-demos \ |
379 |
- --enable-xcb \ |
380 |
- $(use_enable debug) \ |
381 |
- $(use_enable gbm) \ |
382 |
- $(use_enable motif glw) \ |
383 |
- $(use_enable motif) \ |
384 |
- $(use_enable nptl glx-tls) \ |
385 |
- $(use_enable osmesa) \ |
386 |
- $(use_enable !pic asm) \ |
387 |
- $(use_enable shared-dricore) \ |
388 |
- $(use_enable shared-glapi) \ |
389 |
- --with-dri-drivers=${DRI_DRIVERS} \ |
390 |
- --with-gallium-drivers=${GALLIUM_DRIVERS} \ |
391 |
- ${myconf} |
392 |
-} |
393 |
- |
394 |
-src_install() { |
395 |
- base_src_install |
396 |
- |
397 |
- # Save the glsl-compiler for later use |
398 |
- if ! tc-is-cross-compiler; then |
399 |
- dobin "${S}"/src/glsl/glsl_compiler || die |
400 |
- fi |
401 |
- # Remove redundant headers |
402 |
- # GLUT thing |
403 |
- rm -f "${ED}"/usr/include/GL/glut*.h || die "Removing glut include failed." |
404 |
- # Glew includes |
405 |
- rm -f "${ED}"/usr/include/GL/{glew,glxew,wglew}.h \ |
406 |
- || die "Removing glew includes failed." |
407 |
- |
408 |
- # Install config file for eselect mesa |
409 |
- insinto /usr/share/mesa |
410 |
- newins "${FILESDIR}/eselect-mesa.conf.7.11" eselect-mesa.conf || die |
411 |
- |
412 |
- # Move libGL and others from /usr/lib to /usr/lib/opengl/blah/lib |
413 |
- # because user can eselect desired GL provider. |
414 |
- ebegin "Moving libGL and friends for dynamic switching" |
415 |
- dodir /usr/$(get_libdir)/opengl/${OPENGL_DIR}/{lib,extensions,include} |
416 |
- local x |
417 |
- for x in "${ED}"/usr/$(get_libdir)/libGL.{la,a,so*}; do |
418 |
- if [ -f ${x} -o -L ${x} ]; then |
419 |
- mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/lib \ |
420 |
- || die "Failed to move ${x}" |
421 |
- fi |
422 |
- done |
423 |
- for x in "${ED}"/usr/include/GL/{gl.h,glx.h,glext.h,glxext.h}; do |
424 |
- if [ -f ${x} -o -L ${x} ]; then |
425 |
- mv -f "${x}" "${ED}"/usr/$(get_libdir)/opengl/${OPENGL_DIR}/include \ |
426 |
- || die "Failed to move ${x}" |
427 |
- fi |
428 |
- done |
429 |
- eend $? |
430 |
- |
431 |
- if use classic || use gallium; then |
432 |
- ebegin "Moving DRI/Gallium drivers for dynamic switching" |
433 |
- local gallium_drivers=( i915_dri.so i965_dri.so r300_dri.so r600_dri.so swrast_dri.so ) |
434 |
- keepdir /usr/$(get_libdir)/dri |
435 |
- dodir /usr/$(get_libdir)/mesa |
436 |
- for x in ${gallium_drivers[@]}; do |
437 |
- if [ -f "${S}/$(get_libdir)/gallium/${x}" ]; then |
438 |
- mv -f "${ED}/usr/$(get_libdir)/dri/${x}" "${ED}/usr/$(get_libdir)/dri/${x/_dri.so/g_dri.so}" \ |
439 |
- || die "Failed to move ${x}" |
440 |
- insinto "/usr/$(get_libdir)/dri/" |
441 |
- if [ -f "${S}/$(get_libdir)/${x}" ]; then |
442 |
- insopts -m0755 |
443 |
- doins "${S}/$(get_libdir)/${x}" || die "failed to install ${x}" |
444 |
- fi |
445 |
- fi |
446 |
- done |
447 |
- for x in "${ED}"/usr/$(get_libdir)/dri/*.so; do |
448 |
- if [ -f ${x} -o -L ${x} ]; then |
449 |
- mv -f "${x}" "${x/dri/mesa}" \ |
450 |
- || die "Failed to move ${x}" |
451 |
- fi |
452 |
- done |
453 |
- pushd "${ED}"/usr/$(get_libdir)/dri || die "pushd failed" |
454 |
- ln -s ../mesa/*.so . || die "Creating symlink failed" |
455 |
- # remove symlinks to drivers known to eselect |
456 |
- for x in ${gallium_drivers[@]}; do |
457 |
- if [ -f ${x} -o -L ${x} ]; then |
458 |
- rm "${x}" || die "Failed to remove ${x}" |
459 |
- fi |
460 |
- done |
461 |
- popd |
462 |
- eend $? |
463 |
- fi |
464 |
-} |
465 |
- |
466 |
-pkg_postinst() { |
467 |
- # Switch to the xorg implementation. |
468 |
- echo |
469 |
- eselect opengl set --use-old ${OPENGL_DIR} |
470 |
- # Select classic/gallium drivers |
471 |
- if use classic || use gallium; then |
472 |
- eselect mesa set --auto |
473 |
- fi |
474 |
- |
475 |
- # warn about patent encumbered texture-float |
476 |
- if use !bindist; then |
477 |
- elog "USE=\"bindist\" was not set. Potentially patent encumbered code was" |
478 |
- elog "enabled." |
479 |
- fi |
480 |
-} |
481 |
- |
482 |
-# $1 - VIDEO_CARDS flag |
483 |
-# other args - names of DRI drivers to enable |
484 |
-# TODO: avoid code duplication for a more elegant implementation |
485 |
-driver_enable() { |
486 |
- case $# in |
487 |
- # for enabling unconditionally |
488 |
- 1) |
489 |
- DRI_DRIVERS+=",$1" |
490 |
- ;; |
491 |
- *) |
492 |
- if use $1; then |
493 |
- shift |
494 |
- for i in $@; do |
495 |
- DRI_DRIVERS+=",${i}" |
496 |
- done |
497 |
- fi |
498 |
- ;; |
499 |
- esac |
500 |
-} |
501 |
- |
502 |
-gallium_enable() { |
503 |
- case $# in |
504 |
- # for enabling unconditionally |
505 |
- 1) |
506 |
- GALLIUM_DRIVERS+=",$1" |
507 |
- ;; |
508 |
- *) |
509 |
- if use $1; then |
510 |
- shift |
511 |
- for i in $@; do |
512 |
- GALLIUM_DRIVERS+=",${i}" |
513 |
- done |
514 |
- fi |
515 |
- ;; |
516 |
- esac |
517 |
-} |