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