1 |
je_fro 08/09/29 23:24:49 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: ati-drivers-8.532.ebuild |
5 |
Log: |
6 |
Latest version, thanks to everyone on bug #238143. |
7 |
(Portage version: 2.2_rc11/cvs/Linux 2.6.26-gentoo-r1 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.126 x11-drivers/ati-drivers/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.126&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.126&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?r1=1.125&r2=1.126 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v |
19 |
retrieving revision 1.125 |
20 |
retrieving revision 1.126 |
21 |
diff -u -r1.125 -r1.126 |
22 |
--- ChangeLog 9 Sep 2008 10:14:45 -0000 1.125 |
23 |
+++ ChangeLog 29 Sep 2008 23:24:49 -0000 1.126 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for x11-drivers/ati-drivers |
26 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.125 2008/09/09 10:14:45 b33fc0d3 Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.126 2008/09/29 23:24:49 je_fro Exp $ |
29 |
+ |
30 |
+*ati-drivers-8.532 (29 Sep 2008) |
31 |
+ |
32 |
+ 29 Sep 2008; Jeff Gardner <je_fro@g.o> |
33 |
+ +files/8.532/ati-powermode-opt-path-2.patch, +ati-drivers-8.532.ebuild: |
34 |
+ Latest driver for testing, thanks to everyone on bug #238143. |
35 |
|
36 |
09 Sep 2008; <b33fc0d3@g.o> ati-drivers-8.493.ebuild, |
37 |
ati-drivers-8.501.ebuild, ati-drivers-8.512.ebuild, |
38 |
|
39 |
|
40 |
|
41 |
1.1 x11-drivers/ati-drivers/ati-drivers-8.532.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.532.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.532.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: ati-drivers-8.532.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2008 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.532.ebuild,v 1.1 2008/09/29 23:24:49 je_fro Exp $ |
51 |
|
52 |
IUSE="acpi debug" |
53 |
|
54 |
inherit eutils multilib linux-mod toolchain-funcs versionator |
55 |
|
56 |
DESCRIPTION="Ati precompiled drivers for recent chipsets" |
57 |
HOMEPAGE="http://www.ati.com" |
58 |
ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/" |
59 |
SRC_URI="${ATI_URL}/ati-driver-installer-8-9-x86.x86_64.run" |
60 |
|
61 |
LICENSE="AMD GPL-2 QPL-1.0 as-is" |
62 |
KEYWORDS="~amd64 ~x86" |
63 |
|
64 |
# The portage dep is for COLON_SEPARATED support in env-update. |
65 |
# The eselect dep (>=1.0.9) is for COLON_SEPARATED in eselect env update. |
66 |
RDEPEND="x11-base/xorg-server |
67 |
!x11-apps/ati-drivers-extra |
68 |
>=app-admin/eselect-1.0.9 |
69 |
app-admin/eselect-opengl |
70 |
amd64? ( app-emulation/emul-linux-x86-xlibs ) |
71 |
acpi? ( |
72 |
x11-apps/xauth |
73 |
sys-power/acpid |
74 |
) |
75 |
x11-libs/libXrandr |
76 |
>=sys-apps/portage-2.1.1-r1" |
77 |
|
78 |
DEPEND="${RDEPEND} |
79 |
x11-proto/xf86miscproto |
80 |
x11-proto/xf86vidmodeproto |
81 |
x11-proto/inputproto" |
82 |
|
83 |
EMULTILIB_PKG="true" |
84 |
|
85 |
QA_EXECSTACK_x86="usr/lib/dri/fglrx_dri.so |
86 |
usr/lib/opengl/ati/lib/libGL.so.1.2 |
87 |
opt/bin/amdcccle" |
88 |
QA_EXECSTACK_amd64="usr/lib64/dri/fglrx_dri.so |
89 |
usr/lib32/dri/fglrx_dri.so |
90 |
usr/lib64/opengl/ati/lib/libGL.so.1.2 |
91 |
usr/lib32/opengl/ati/lib/libGL.so.1.2 |
92 |
opt/bin/amdcccle" |
93 |
QA_TEXTRELS_x86="usr/lib/dri/fglrx_dri.so |
94 |
usr/lib/xorg/modules/drivers/fglrx_drv.so |
95 |
usr/lib/opengl/ati/lib/libGL.so.1.2 |
96 |
usr/lib/xorg/modules/glesx.so |
97 |
usr/lib/xorg/modules/amdxmm.so" |
98 |
QA_TEXTRELS_amd64=" |
99 |
usr/lib64/opengl/ati/lib/libGL.so.1.2 |
100 |
usr/lib32/opengl/ati/lib/libGL.so.1.2 |
101 |
usr/lib64/dri/fglrx_dri.so |
102 |
usr/lib32/dri/fglrx_dri.so |
103 |
usr/lib32/xorg/modules/glesx.so |
104 |
usr/lib64/xorg/modules/glesx.so" |
105 |
|
106 |
S="${WORKDIR}" |
107 |
|
108 |
pkg_setup() { |
109 |
|
110 |
# Define module dir. |
111 |
MODULE_DIR="${S}/common/lib/modules/fglrx/build_mod" |
112 |
|
113 |
#check kernel and sets up KV_OBJ |
114 |
MODULE_NAMES="fglrx(video:${S}/common/lib/modules/fglrx/build_mod/2.6.x)" |
115 |
BUILD_TARGETS="kmod_build" |
116 |
linux-mod_pkg_setup |
117 |
BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}" |
118 |
|
119 |
if ! kernel_is 2 6; then |
120 |
eerror "Need a 2.6 kernel to compile against!" |
121 |
die "Need a 2.6 kernel to compile against!" |
122 |
fi |
123 |
|
124 |
if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then |
125 |
die "${P} is not compatible with RCU Preemption (bug #223281), please disable it" |
126 |
fi |
127 |
|
128 |
if ! linux_chkconfig_present UNUSED_SYMBOLS; then |
129 |
ewarn "You have to Enable unused/obsolete exported symbols in Kernel hacking section of kernel config for fglrx to load" |
130 |
fi |
131 |
|
132 |
if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then |
133 |
eerror "${P} requires support for pci_find_slot." |
134 |
die "${P} requires support for pci_find_slot." |
135 |
fi |
136 |
|
137 |
if ! linux_chkconfig_present MTRR; then |
138 |
ewarn "You don't have MTRR support enabled, the direct rendering will not work." |
139 |
fi |
140 |
|
141 |
if linux_chkconfig_builtin DRM; then |
142 |
ewarn "You have DRM support enabled builtin, the direct rendering will not work." |
143 |
fi |
144 |
|
145 |
if ! linux_chkconfig_present AGP && \ |
146 |
! linux_chkconfig_present PCIEPORTBUS; then |
147 |
ewarn "You need AGP and/or PCI Express support for direct rendering to work." |
148 |
fi |
149 |
|
150 |
if linux_chkconfig_present PARAVIRT; then |
151 |
eerror "The current ati-drivers don't compile when having" |
152 |
eerror "paravirtualization active due to GPL symbol export" |
153 |
eerror "restrictions." |
154 |
eerror "Please disable it:" |
155 |
eerror " CONFIG_PARAVIRT=n" |
156 |
eerror "in /usr/src/linux/.config or" |
157 |
eerror " Processor type and features -->" |
158 |
eerror " [ ] Paravirtualization support (EXPERIMENTAL)" |
159 |
eerror "in 'menuconfig'" |
160 |
die "CONFIG_PARAVIRT enabled" |
161 |
fi |
162 |
|
163 |
# Only support xorg-server >=1.1 |
164 |
BASE_DIR="${S}/x710" |
165 |
|
166 |
# This is used like $(get_libdir) for paths in ati's package. |
167 |
if use amd64 ; then |
168 |
BASE_DIR="${BASE_DIR}_64a" |
169 |
PKG_LIBDIR=lib64 |
170 |
ARCH_DIR="${S}/arch/x86_64" |
171 |
else |
172 |
PKG_LIBDIR=lib |
173 |
ARCH_DIR="${S}/arch/x86" |
174 |
fi |
175 |
} |
176 |
|
177 |
src_unpack() { |
178 |
#Switching to a standard way to extract the files since otherwise no signature file |
179 |
#would be created |
180 |
local src="${DISTDIR}/${A}" |
181 |
sh "${src}" --extract "${S}" 2&>1 /dev/null |
182 |
|
183 |
# These are the userspace utilities that we also have source for. |
184 |
# We rebuild these later. |
185 |
rm \ |
186 |
"${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \ |
187 |
"${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \ |
188 |
|| die "bin rm failed" |
189 |
|
190 |
if use debug; then |
191 |
# Enable debug mode in the Source Code. |
192 |
sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ |
193 |
"${MODULE_DIR}/firegl_public.c" \ |
194 |
|| die "Failed to enable debug output." |
195 |
fi |
196 |
|
197 |
if use acpi; then |
198 |
sed -i \ |
199 |
-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ |
200 |
-e "s:/var/lib/gdm/:/var/gdm/:" \ |
201 |
"${S}/common/etc/ati/authatieventsd.sh" \ |
202 |
|| die "sed failed." |
203 |
|
204 |
# Since "who" is in coreutils, we're using that one instead of "finger". |
205 |
sed -i -e 's:finger:who:' \ |
206 |
"${S}/common/usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ |
207 |
|| die "Replacing 'finger' with 'who' failed." |
208 |
# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and |
209 |
# add funktion to detect default state. |
210 |
epatch "${FILESDIR}"/8.532/ati-powermode-opt-path-2.patch |
211 |
fi |
212 |
|
213 |
pushd ${MODULE_DIR} >/dev/null |
214 |
ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \ |
215 |
|| die "symlinking precompiled core failed" |
216 |
|
217 |
convert_to_m 2.6.x/Makefile || die "convert_to_m failed" |
218 |
|
219 |
# When built with ati's make.sh it defines a bunch of macros if |
220 |
# certain .config values are set, falling back to less reliable |
221 |
# detection methods if linux/autoconf.h is not available. We |
222 |
# simply use the linux/autoconf.h settings directly, bypassing the |
223 |
# detection script. |
224 |
sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed" |
225 |
sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \ |
226 |
|| die "MODVERSIONS sed failed" |
227 |
popd >/dev/null |
228 |
|
229 |
mkdir extra || die "mkdir failed" |
230 |
cd extra |
231 |
unpack ./../common/usr/src/ati/fglrx_sample_source.tgz |
232 |
sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \ |
233 |
lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed" |
234 |
# Add a category. |
235 |
mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed" |
236 |
cd .. |
237 |
} |
238 |
|
239 |
src_compile() { |
240 |
linux-mod_src_compile |
241 |
|
242 |
einfo "Building fgl_glxgears" |
243 |
cd "${S}"/extra/fgl_glxgears |
244 |
# These extra libs/utils either have an Imakefile that does not |
245 |
# work very well without tweaking or a Makefile ignoring CFLAGS |
246 |
# and the like. We bypass those. |
247 |
|
248 |
# The -DUSE_GLU is needed to compile using nvidia headers |
249 |
# according to a comment in ati-drivers-extra-8.33.6.ebuild. |
250 |
"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ |
251 |
-I"${S}"/common/usr/include fgl_glxgears.c \ |
252 |
-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" |
253 |
|
254 |
einfo "Building fglrx_gamma lib" |
255 |
cd "${S}"/extra/lib/fglrx_gamma |
256 |
"$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \ |
257 |
-DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \ |
258 |
-lXext || die "fglrx_gamma lib build failed" |
259 |
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed" |
260 |
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed" |
261 |
|
262 |
einfo "Building fglrx_gamma util" |
263 |
cd "${S}"/extra/programs/fglrx_gamma |
264 |
"$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \ |
265 |
-I../../../common/usr/X11R6/include -L../../lib/fglrx_gamma \ |
266 |
fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \ |
267 |
|| die "fglrx_gamma util build failed" |
268 |
|
269 |
} |
270 |
|
271 |
src_install() { |
272 |
linux-mod_src_install |
273 |
|
274 |
# We can do two things here, and neither of them is very nice. |
275 |
|
276 |
# For direct rendering libGL has to be able to load one or more |
277 |
# dri modules (files ending in _dri.so, like fglrx_dri.so). |
278 |
# Gentoo's mesa looks for these files in the location specified by |
279 |
# LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded |
280 |
# location /usr/$(get_libdir)/dri. Ati's libGL does the same |
281 |
# thing, but the hardcoded location is /usr/X11R6/lib/modules/dri |
282 |
# on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 |
283 |
# 64bit. So we can either put the .so files in that (unusual, |
284 |
# compared to "normal" mesa libGL) location or set |
285 |
# LIBGL_DRIVERS_PATH. We currently do the latter. See also bug |
286 |
# 101539. |
287 |
|
288 |
# The problem with this approach is that LIBGL_DRIVERS_PATH |
289 |
# *overrides* the default hardcoded location, it does not extend |
290 |
# it. So if ati-drivers is merged but a non-ati libGL is selected |
291 |
# and its hardcoded path does not match our LIBGL_DRIVERS_PATH |
292 |
# (because it changed in a newer mesa or because it was compiled |
293 |
# for a different set of multilib abis than we are) stuff breaks. |
294 |
|
295 |
# We create one file per ABI to work with "native" multilib, see |
296 |
# below. |
297 |
|
298 |
echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep" |
299 |
doenvd "${T}/03ati-colon-sep" |
300 |
|
301 |
# All libraries that we have a 32 bit and 64 bit version of on |
302 |
# amd64 are installed in src_install-libs. Everything else |
303 |
# (including libraries only available in native 64bit on amd64) |
304 |
# goes in here. |
305 |
|
306 |
# There used to be some code here that tried to detect running |
307 |
# under a "native multilib" portage ((precursor of) |
308 |
# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it |
309 |
# should just work (only doing some duplicate work). --marienz |
310 |
if has_multilib_profile; then |
311 |
local OABI=${ABI} |
312 |
for ABI in $(get_install_abis); do |
313 |
src_install-libs |
314 |
done |
315 |
ABI=${OABI} |
316 |
unset OABI |
317 |
else |
318 |
src_install-libs |
319 |
fi |
320 |
|
321 |
# This is sorted by the order the files occur in the source tree. |
322 |
|
323 |
# X modules. |
324 |
exeinto /usr/$(get_libdir)/xorg/modules/drivers |
325 |
doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so |
326 |
exeinto /usr/$(get_libdir)/xorg/modules/linux |
327 |
doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so |
328 |
exeinto /usr/$(get_libdir)/xorg/modules |
329 |
doexe "${BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{esut.a,glesx.so,amdxmm.so} |
330 |
|
331 |
# Arch-specific files. |
332 |
# (s)bin. |
333 |
into /opt |
334 |
if use acpi; then |
335 |
dosbin "${ARCH_DIR}"/usr/sbin/atieventsd |
336 |
fi |
337 |
# We cleaned out the compilable stuff in src_unpack |
338 |
dobin "${ARCH_DIR}"/usr/X11R6/bin/* |
339 |
|
340 |
# lib. |
341 |
exeinto /usr/$(get_libdir) |
342 |
# Everything except for the libGL.so installed in src_install-libs. |
343 |
doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
344 |
-maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*') |
345 |
insinto /usr/$(get_libdir) |
346 |
doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
347 |
-maxdepth 1 -type f -not -name '*.so*') |
348 |
|
349 |
# Common files. |
350 |
# etc. |
351 |
insinto /etc/ati |
352 |
# Everything except for the authatieventsd.sh script. |
353 |
doins common/etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} |
354 |
if use acpi; then |
355 |
doins common/etc/ati/authatieventsd.sh |
356 |
fi |
357 |
|
358 |
# include. |
359 |
insinto /usr |
360 |
doins -r common/usr/include |
361 |
insinto /usr/include/X11/extensions |
362 |
doins common/usr/X11R6/include/X11/extensions/fglrx_gamma.h |
363 |
|
364 |
# Just the atigetsysteminfo.sh script. |
365 |
into /usr |
366 |
dosbin common/usr/sbin/* |
367 |
|
368 |
# data files for the control panel. |
369 |
insinto /usr/share |
370 |
doins -r common/usr/share/ati |
371 |
insinto /usr/share/pixmaps |
372 |
doins common/usr/share/icons/ccc_{large,small}.xpm |
373 |
make_desktop_entry amdcccle 'ATI Catalyst Control Center' \ |
374 |
ccc_large System |
375 |
|
376 |
# doc. |
377 |
dohtml -r common/usr/share/doc/fglrx |
378 |
|
379 |
if use acpi; then |
380 |
doman common/usr/share/man/man8/atieventsd.8 |
381 |
|
382 |
pushd common/usr/share/doc/fglrx/examples/etc/acpi >/dev/null |
383 |
|
384 |
exeinto /etc/acpi |
385 |
doexe ati-powermode.sh |
386 |
insinto /etc/acpi/events |
387 |
doins events/* |
388 |
|
389 |
popd >/dev/null |
390 |
fi |
391 |
|
392 |
# Done with the "source" tree. Install tools we rebuilt: |
393 |
dobin extra/fgl_glxgears/fgl_glxgears |
394 |
newdoc extra/fgl_glxgears/README README.fgl_glxgears |
395 |
|
396 |
dolib extra/lib/fglrx_gamma/*so* |
397 |
newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma |
398 |
|
399 |
dobin extra/programs/fglrx_gamma/fglrx_xgamma |
400 |
doman extra/programs/fglrx_gamma/fglrx_xgamma.1 |
401 |
newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma |
402 |
|
403 |
# Gentoo-specific stuff: |
404 |
if use acpi; then |
405 |
newinitd "${FILESDIR}"/atieventsd.init atieventsd \ |
406 |
|| die "Failed to install atieventsd.init.d" |
407 |
echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf |
408 |
newconfd "${T}"/atieventsd.conf atieventsd |
409 |
fi |
410 |
} |
411 |
|
412 |
src_install-libs() { |
413 |
if [[ "${ABI}" == "amd64" ]]; then |
414 |
local pkglibdir=lib64 |
415 |
local MY_ARCH_DIR="${S}/arch/x86_64" |
416 |
else |
417 |
local pkglibdir=lib |
418 |
local MY_ARCH_DIR="${S}/arch/x86" |
419 |
fi |
420 |
einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" |
421 |
|
422 |
local ATI_ROOT=/usr/$(get_libdir)/opengl/ati |
423 |
# To make sure we do not miss a spot when these change. |
424 |
local libmajor=1 libminor=2 |
425 |
local libver=${libmajor}.${libminor} |
426 |
|
427 |
# The GLX libraries |
428 |
# (yes, this really is "lib" even on amd64/multilib --marienz) |
429 |
exeinto ${ATI_ROOT}/lib |
430 |
doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver} |
431 |
dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} |
432 |
dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so |
433 |
|
434 |
# Same as the xorg implementation (eselect opengl does not fall |
435 |
# back to xorg-x11 if we omit this symlink, meaning no glx). |
436 |
dosym ../xorg-x11/extensions ${ATI_ROOT}/extensions |
437 |
|
438 |
# DRI modules, installed into the path used by recent versions of mesa. |
439 |
exeinto /usr/$(get_libdir)/dri |
440 |
doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so |
441 |
|
442 |
# Make up a libGL.la. Ati does not provide one, but mesa does. If |
443 |
# a (libtool-based) libfoo is built with libGL.la present a |
444 |
# reference to it is put into libfoo.la, and compiling |
445 |
# (libtool-based) things that link too libfoo.la will complain if |
446 |
# libGL.la disappears. So if we do not make up a libGL.la |
447 |
# switching between mesa and ati becomes painful. |
448 |
local revision=$(printf '%d%02d%02d' $(get_version_components)) |
449 |
sed -e "s:\${libmajor}:${libmajor}:g" \ |
450 |
-e "s:\${libminor}:${libminor}:g" \ |
451 |
-e "s:\${libdir}:$(get_libdir):g" \ |
452 |
-e "s:\${revision}:${revision}:g" \ |
453 |
"${FILESDIR}"/libGL.la.in > "${D}"/${ATI_ROOT}/lib/libGL.la \ |
454 |
|| die "sed failed to make libGL.la" |
455 |
|
456 |
local envname="${T}"/04ati-dri-path |
457 |
if [[ -n ${ABI} ]]; then |
458 |
envname="${envname}-${ABI}" |
459 |
fi |
460 |
echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" |
461 |
doenvd "${envname}" |
462 |
} |
463 |
|
464 |
pkg_postinst() { |
465 |
/usr/bin/eselect opengl set --use-old ati |
466 |
|
467 |
elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" |
468 |
elog "To change your xorg.conf you can use the bundled \"aticonfig\"" |
469 |
elog |
470 |
elog "If you experience unexplained segmentation faults and kernel crashes" |
471 |
elog "with this driver and multi-threaded applications such as wine," |
472 |
elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." |
473 |
elog |
474 |
elog "You will have to source /etc/profile (or logout and back in) for dri" |
475 |
elog "to work, unless you previously had ati-drivers installed." |
476 |
|
477 |
# Workaroud screen corruption |
478 |
ewarn "If you experience screen corruption with this driver, try putting" |
479 |
ewarn ' Option "XAANoOffscreenPixmaps" "true"' |
480 |
ewarn "in the Device Section of /etc/X11/xorg.conf." |
481 |
|
482 |
linux-mod_pkg_postinst |
483 |
} |
484 |
|
485 |
pkg_postrm() { |
486 |
linux-mod_pkg_postrm |
487 |
/usr/bin/eselect opengl set --use-old xorg-x11 |
488 |
} |