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