1 |
chithanh 11/05/02 15:42:38 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: ati-drivers-11.4.ebuild |
5 |
Log: |
6 |
Version bump, bug #365201 thanks to Enrico Tagliavini |
7 |
|
8 |
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.247 x11-drivers/ati-drivers/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.247&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.247&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?r1=1.246&r2=1.247 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v |
20 |
retrieving revision 1.246 |
21 |
retrieving revision 1.247 |
22 |
diff -u -r1.246 -r1.247 |
23 |
--- ChangeLog 28 Apr 2011 18:56:33 -0000 1.246 |
24 |
+++ ChangeLog 2 May 2011 15:42:38 -0000 1.247 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for x11-drivers/ati-drivers |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.246 2011/04/28 18:56:33 hwoarang Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.247 2011/05/02 15:42:38 chithanh Exp $ |
30 |
+ |
31 |
+*ati-drivers-11.4 (02 May 2011) |
32 |
+ |
33 |
+ 02 May 2011; Chí-Thanh Christopher Nguyễn <chithanh@g.o> |
34 |
+ +ati-drivers-11.4.ebuild: |
35 |
+ Version bump, bug #365201 thanks to Enrico Tagliavini |
36 |
|
37 |
28 Apr 2011; Markos Chandras <hwoarang@g.o> ati-drivers-11.3.ebuild: |
38 |
Stable on amd64 wrt bug #363965 |
39 |
|
40 |
|
41 |
|
42 |
1.1 x11-drivers/ati-drivers/ati-drivers-11.4.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-11.4.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-11.4.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: ati-drivers-11.4.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2011 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-11.4.ebuild,v 1.1 2011/05/02 15:42:38 chithanh Exp $ |
52 |
|
53 |
EAPI=4 |
54 |
|
55 |
inherit eutils multilib linux-info 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 |
# 8.ble will be used for beta releases. |
60 |
if [[ $(get_major_version) -gt 8 ]]; then |
61 |
ATI_URL="https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/" |
62 |
SRC_URI="${ATI_URL}/ati-driver-installer-${PV/./-}-x86.x86_64.run" |
63 |
FOLDER_PREFIX="common/" |
64 |
else |
65 |
SRC_URI="https://launchpad.net/ubuntu/natty/+source/fglrx-installer/2:${PV}-0ubuntu1/+files/fglrx-installer_${PV}.orig.tar.gz" |
66 |
FOLDER_PREFIX="" |
67 |
fi |
68 |
IUSE="debug +modules multilib qt4" |
69 |
|
70 |
LICENSE="AMD GPL-2 QPL-1.0 as-is" |
71 |
KEYWORDS="~amd64 ~x86" |
72 |
SLOT="1" |
73 |
|
74 |
RDEPEND=" |
75 |
<=x11-base/xorg-server-1.10.99 |
76 |
!x11-drivers/ati-drivers:0 |
77 |
!x11-apps/ati-drivers-extra |
78 |
>=app-admin/eselect-opengl-1.0.7 |
79 |
sys-power/acpid |
80 |
x11-apps/xauth |
81 |
x11-libs/libX11 |
82 |
x11-libs/libXext |
83 |
x11-libs/libXinerama |
84 |
x11-libs/libXrandr |
85 |
x11-libs/libXrender |
86 |
multilib? ( app-emulation/emul-linux-x86-opengl ) |
87 |
qt4? ( |
88 |
x11-libs/libICE |
89 |
x11-libs/libSM |
90 |
x11-libs/libXcursor |
91 |
x11-libs/libXfixes |
92 |
x11-libs/libXxf86vm |
93 |
x11-libs/qt-core |
94 |
x11-libs/qt-gui |
95 |
) |
96 |
" |
97 |
|
98 |
DEPEND="${RDEPEND} |
99 |
app-portage/portage-utils |
100 |
x11-proto/inputproto |
101 |
x11-proto/xf86miscproto |
102 |
x11-proto/xf86vidmodeproto |
103 |
x11-proto/xineramaproto |
104 |
x11-libs/libXtst |
105 |
" |
106 |
|
107 |
EMULTILIB_PKG="true" |
108 |
|
109 |
S="${WORKDIR}" |
110 |
|
111 |
# QA Silencing |
112 |
QA_TEXTRELS=" |
113 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
114 |
usr/lib*/libatiadlxx.so |
115 |
usr/lib*/xorg/modules/glesx.so |
116 |
usr/lib*/libaticaldd.so |
117 |
usr/lib*/dri/fglrx_dri.so |
118 |
" |
119 |
|
120 |
QA_EXECSTACK=" |
121 |
opt/bin/atiode |
122 |
opt/bin/amdcccle |
123 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
124 |
usr/lib*/dri/fglrx_dri.so |
125 |
" |
126 |
|
127 |
QA_WX_LOAD=" |
128 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
129 |
usr/lib*/dri/fglrx_dri.so |
130 |
" |
131 |
|
132 |
QA_PRESTRIPPED=" |
133 |
usr/lib\(32\|64\)\?/libXvBAW.so.1.0 |
134 |
usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 |
135 |
usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so |
136 |
usr/lib\(32\|64\)\?/xorg/modules/glesx.so |
137 |
usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 |
138 |
usr/lib\(32\|64\)\?/libaticaldd.so |
139 |
usr/lib\(32\|64\)\?/dri/fglrx_dri.so |
140 |
" |
141 |
|
142 |
QA_SONAME=" |
143 |
usr/lib\(32\|64\)\?/libatiadlxx.so |
144 |
usr/lib\(32\|64\)\?/libaticalcl.so |
145 |
usr/lib\(32\|64\)\?/libaticaldd.so |
146 |
usr/lib\(32\|64\)\?/libaticalrt.so |
147 |
" |
148 |
|
149 |
QA_DT_HASH=" |
150 |
opt/bin/amdcccle |
151 |
opt/bin/aticonfig |
152 |
opt/bin/atiodcli |
153 |
opt/bin/atiode |
154 |
opt/bin/fglrxinfo |
155 |
opt/sbin/atieventsd |
156 |
usr/lib\(32\|64\)\?/libaticalcl.so |
157 |
usr/lib\(32\|64\)\?/libaticalrt.so |
158 |
usr/lib\(32\|64\)\?/libatiuki.so.1.0 |
159 |
usr/lib\(32\|64\)\?/libatiadlxx.so |
160 |
usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 |
161 |
usr/lib\(32\|64\)\?/libXvBAW.so.1.0 |
162 |
usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 |
163 |
usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so |
164 |
usr/lib\(32\|64\)\?/xorg/modules/glesx.so |
165 |
usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so |
166 |
usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so |
167 |
usr/lib\(32\|64\)\?/libaticaldd.so |
168 |
usr/lib\(32\|64\)\?/dri/fglrx_dri.so |
169 |
usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so |
170 |
usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so |
171 |
usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2 |
172 |
usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 |
173 |
" |
174 |
|
175 |
_check_kernel_config() { |
176 |
local failed=0 |
177 |
local error="" |
178 |
if ! kernel_is 2 6; then |
179 |
eerror "You need a 2.6 linux kernel to compile against!" |
180 |
die "No 2.6 Kernel found" |
181 |
fi |
182 |
|
183 |
if ! linux_chkconfig_present MTRR; then |
184 |
ewarn "You don't have MTRR support enabled in the kernel." |
185 |
ewarn "Direct rendering will not work." |
186 |
fi |
187 |
|
188 |
if linux_chkconfig_builtin DRM; then |
189 |
ewarn "You have DRM support built in to the kernel" |
190 |
ewarn "Direct rendering will not work." |
191 |
fi |
192 |
|
193 |
if ! linux_chkconfig_present AGP && \ |
194 |
! linux_chkconfig_present PCIEPORTBUS; then |
195 |
ewarn "You don't have AGP and/or PCIe support enabled in the kernel" |
196 |
ewarn "Direct rendering will not work." |
197 |
fi |
198 |
|
199 |
if ! linux_chkconfig_present ACPI; then |
200 |
eerror "${P} requires the ACPI support in the kernel" |
201 |
eerror "Please enable it:" |
202 |
eerror " CONFIG_ACPI=y" |
203 |
eerror "in /usr/src/linux/.config or" |
204 |
eerror " Power management and ACPI options --->" |
205 |
eerror " [*] Power Management support" |
206 |
eerror "in the 'menuconfig'" |
207 |
error+=" CONFIG_ACPI disabled;" |
208 |
failed=1 |
209 |
fi |
210 |
|
211 |
if ! linux_chkconfig_present PCI_MSI; then |
212 |
eerror "${P} requires MSI in the kernel." |
213 |
eerror "Please enable it:" |
214 |
eerror " CONFIG_PCI_MSI=y" |
215 |
eerror "in /usr/src/linux/.config or" |
216 |
eerror " Bus options (PCI etc.) --->" |
217 |
eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" |
218 |
eerror "in the kernel config." |
219 |
error+=" CONFIG_PCI_MSI disabled;" |
220 |
failed=1 |
221 |
fi |
222 |
|
223 |
if linux_chkconfig_present LOCKDEP; then |
224 |
eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." |
225 |
eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." |
226 |
eerror "This prevents ${P} from compiling with an error like this:" |
227 |
eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" |
228 |
eerror "Please make sure the following options have been unset:" |
229 |
eerror " Kernel hacking --->" |
230 |
eerror " [ ] Lock debugging: detect incorrect freeing of live locks" |
231 |
eerror " [ ] Lock debugging: prove locking correctness" |
232 |
eerror " [ ] Lock usage statistics" |
233 |
eerror "in 'menuconfig'" |
234 |
error+=" LOCKDEP enabled;" |
235 |
failed=1 |
236 |
fi |
237 |
|
238 |
use amd64 && if ! linux_chkconfig_present COMPAT; then |
239 |
eerror "${P} requires COMPAT." |
240 |
eerror "Please enable the 32 bit emulation:" |
241 |
eerror "Executable file formats / Emulations --->" |
242 |
eerror " [*] IA32 Emulation" |
243 |
eerror "in the kernel config." |
244 |
eerror "if this doesn't enable CONFIG_COMPAT add" |
245 |
eerror " CONFIG_COMPAT=y" |
246 |
eerror "in /usr/src/linux/.config" |
247 |
error+=" COMPAT disabled;" |
248 |
failed=1 |
249 |
fi |
250 |
|
251 |
kernel_is ge 2 6 37 && if ! linux_chkconfig_present BKL ; then |
252 |
eerror "${P} requires BKL." |
253 |
eerror "Please enable the Big Kernel Lock:" |
254 |
eerror "Kernel hacking --->" |
255 |
eerror " [*] Big Kernel Lock" |
256 |
eerror "in the kernel config." |
257 |
eerror "or add" |
258 |
eerror " CONFIG_BKL=y" |
259 |
eerror "in /usr/src/linux/.config" |
260 |
error+=" BKL disabled;" |
261 |
failed=1 |
262 |
fi |
263 |
|
264 |
[[ ${failed} -ne 0 ]] && die "${error}" |
265 |
} |
266 |
|
267 |
pkg_pretend() { |
268 |
# workaround until bug 365543 is solved |
269 |
if use modules; then |
270 |
linux-info_pkg_setup |
271 |
require_configured_kernel |
272 |
_check_kernel_config |
273 |
fi |
274 |
} |
275 |
|
276 |
pkg_setup() { |
277 |
if use modules; then |
278 |
MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)" |
279 |
BUILD_TARGETS="kmod_build" |
280 |
linux-mod_pkg_setup |
281 |
BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}" |
282 |
BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" |
283 |
if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then |
284 |
BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" |
285 |
else |
286 |
BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" |
287 |
fi |
288 |
fi |
289 |
# Define module dir. |
290 |
MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" |
291 |
# get the xorg-server version and set BASE_DIR for that |
292 |
BASE_DIR="${S}/xpic" |
293 |
|
294 |
# amd64/x86 |
295 |
if use amd64 ; then |
296 |
MY_BASE_DIR="${BASE_DIR}_64a" |
297 |
PKG_LIBDIR=lib64 |
298 |
ARCH_DIR="${S}/arch/x86_64" |
299 |
else |
300 |
MY_BASE_DIR="${BASE_DIR}" |
301 |
PKG_LIBDIR=lib |
302 |
ARCH_DIR="${S}/arch/x86" |
303 |
fi |
304 |
|
305 |
elog |
306 |
elog "Please note that this driver supports only graphic cards based on" |
307 |
elog "r600 chipset and newer." |
308 |
elog "This represent the ATI Radeon HD series at this moment." |
309 |
elog |
310 |
elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" |
311 |
elog "as replacement is highly recommended. Rather than staying with" |
312 |
elog "old versions of this driver." |
313 |
elog "For migration informations please reffer to:" |
314 |
elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" |
315 |
einfo |
316 |
} |
317 |
|
318 |
src_unpack() { |
319 |
if [[ $(get_major_version) -gt 8 ]]; then |
320 |
# Switching to a standard way to extract the files since otherwise no signature file |
321 |
# would be created |
322 |
local src="${DISTDIR}/${A}" |
323 |
sh "${src}" --extract "${S}" 2&>1 /dev/null |
324 |
else |
325 |
unpack ${A} |
326 |
fi |
327 |
} |
328 |
|
329 |
src_prepare() { |
330 |
# All kernel options for prepare are ment to be in here |
331 |
if use modules; then |
332 |
# version patches |
333 |
# epatch "${FILESDIR}"/kernel/${PV}-*.patch |
334 |
if use debug; then |
335 |
sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ |
336 |
"${MODULE_DIR}/firegl_public.c" \ |
337 |
|| die "Failed to enable debug output." |
338 |
fi |
339 |
fi |
340 |
|
341 |
# Fix a known compilation error |
342 |
epatch "${FILESDIR}"/ati-drivers-fix_compilation-bug-297322.patch |
343 |
|
344 |
# These are the userspace utilities that we also have source for. |
345 |
# We rebuild these later. |
346 |
rm \ |
347 |
"${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \ |
348 |
|| die "bin rm failed" |
349 |
|
350 |
# in this version amdcccle isn't static, thus we depend on qt4 |
351 |
use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle |
352 |
|
353 |
# ACPI fixups |
354 |
sed -i \ |
355 |
-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ |
356 |
-e "s:/var/lib/gdm/:/var/gdm/:" \ |
357 |
"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ |
358 |
|| die "sed failed." |
359 |
|
360 |
# Since "who" is in coreutils, we're using that one instead of "finger". |
361 |
sed -i -e 's:finger:who:' \ |
362 |
"${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ |
363 |
|| die "Replacing 'finger' with 'who' failed." |
364 |
# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and |
365 |
# add function to detect default state. |
366 |
epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" |
367 |
|
368 |
cd "${MODULE_DIR}" |
369 |
|
370 |
# bugged fglrx build system, this file should be copied by hand |
371 |
cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x |
372 |
|
373 |
convert_to_m 2.6.x/Makefile || die "convert_to_m failed" |
374 |
|
375 |
# When built with ati's make.sh it defines a bunch of macros if |
376 |
# certain .config values are set, falling back to less reliable |
377 |
# detection methods if linux/autoconf.h is not available. We |
378 |
# simply use the linux/autoconf.h settings directly, bypassing the |
379 |
# detection script. |
380 |
sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed" |
381 |
sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \ |
382 |
|| die "MODVERSIONS sed failed" |
383 |
cd "${S}" |
384 |
|
385 |
mkdir extra || die "mkdir failed" |
386 |
cd extra |
387 |
unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz |
388 |
} |
389 |
|
390 |
src_compile() { |
391 |
use modules && linux-mod_src_compile |
392 |
|
393 |
ebegin "Building fgl_glxgears" |
394 |
cd "${S}"/extra/fgl_glxgears |
395 |
# These extra libs/utils either have an Imakefile that does not |
396 |
# work very well without tweaking or a Makefile ignoring CFLAGS |
397 |
# and the like. We bypass those. |
398 |
|
399 |
# The -DUSE_GLU is needed to compile using nvidia headers |
400 |
# according to a comment in ati-drivers-extra-8.33.6.ebuild. |
401 |
"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ |
402 |
-I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ |
403 |
-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" |
404 |
eend $? |
405 |
} |
406 |
|
407 |
src_install() { |
408 |
use modules && linux-mod_src_install |
409 |
|
410 |
# We can do two things here, and neither of them is very nice. |
411 |
|
412 |
# For direct rendering libGL has to be able to load one or more |
413 |
# dri modules (files ending in _dri.so, like fglrx_dri.so). |
414 |
# Gentoo's mesa looks for these files in the location specified by |
415 |
# LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded |
416 |
# location /usr/$(get_libdir)/dri. Ati's libGL does the same |
417 |
# thing, but the hardcoded location is /usr/X11R6/lib/modules/dri |
418 |
# on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 |
419 |
# 64bit. So we can either put the .so files in that (unusual, |
420 |
# compared to "normal" mesa libGL) location or set |
421 |
# LIBGL_DRIVERS_PATH. We currently do the latter. See also bug |
422 |
# 101539. |
423 |
|
424 |
# The problem with this approach is that LIBGL_DRIVERS_PATH |
425 |
# *overrides* the default hardcoded location, it does not extend |
426 |
# it. So if ati-drivers is merged but a non-ati libGL is selected |
427 |
# and its hardcoded path does not match our LIBGL_DRIVERS_PATH |
428 |
# (because it changed in a newer mesa or because it was compiled |
429 |
# for a different set of multilib abis than we are) stuff breaks. |
430 |
|
431 |
# We create one file per ABI to work with "native" multilib, see |
432 |
# below. |
433 |
|
434 |
echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep" |
435 |
doenvd "${T}/03ati-colon-sep" || die |
436 |
|
437 |
# All libraries that we have a 32 bit and 64 bit version of on |
438 |
# amd64 are installed in src_install-libs. Everything else |
439 |
# (including libraries only available in native 64bit on amd64) |
440 |
# goes in here. |
441 |
|
442 |
# There used to be some code here that tried to detect running |
443 |
# under a "native multilib" portage ((precursor of) |
444 |
# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it |
445 |
# should just work (only doing some duplicate work). --marienz |
446 |
if has_multilib_profile; then |
447 |
local OABI=${ABI} |
448 |
for ABI in $(get_install_abis); do |
449 |
src_install-libs |
450 |
done |
451 |
ABI=${OABI} |
452 |
unset OABI |
453 |
else |
454 |
src_install-libs |
455 |
fi |
456 |
|
457 |
# This is sorted by the order the files occur in the source tree. |
458 |
|
459 |
# X modules. |
460 |
exeinto /usr/$(get_libdir)/xorg/modules/drivers |
461 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so |
462 |
exeinto /usr/$(get_libdir)/xorg/modules/linux |
463 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so |
464 |
exeinto /usr/$(get_libdir)/xorg/modules |
465 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} |
466 |
|
467 |
# Arch-specific files. |
468 |
# (s)bin. |
469 |
into /opt |
470 |
dosbin "${ARCH_DIR}"/usr/sbin/atieventsd |
471 |
# We cleaned out the compilable stuff in src_unpack |
472 |
dobin "${ARCH_DIR}"/usr/X11R6/bin/* |
473 |
|
474 |
# lib. |
475 |
exeinto /usr/$(get_libdir) |
476 |
# Everything except for the libGL.so installed in src_install-libs. |
477 |
doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
478 |
-maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*') |
479 |
insinto /usr/$(get_libdir) |
480 |
doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
481 |
-maxdepth 1 -type f -not -name '*.so*') |
482 |
|
483 |
# Common files. |
484 |
# etc. |
485 |
insinto /etc/ati |
486 |
exeinto /etc/ati |
487 |
# Everything except for the authatieventsd.sh script. |
488 |
doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} |
489 |
doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh |
490 |
|
491 |
# include. |
492 |
insinto /usr |
493 |
doins -r ${FOLDER_PREFIX}usr/include |
494 |
insinto /usr/include/X11/extensions |
495 |
|
496 |
# Just the atigetsysteminfo.sh script. |
497 |
into /usr |
498 |
dosbin ${FOLDER_PREFIX}usr/sbin/* |
499 |
|
500 |
# data files for the control panel. |
501 |
if use qt4 ; then |
502 |
insinto /usr/share |
503 |
doins -r ${FOLDER_PREFIX}usr/share/ati |
504 |
insinto /usr/share/pixmaps |
505 |
doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm |
506 |
make_desktop_entry amdcccle 'ATI Catalyst Control Center' \ |
507 |
ccc_large System |
508 |
fi |
509 |
|
510 |
# doc. |
511 |
dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx |
512 |
|
513 |
doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 |
514 |
|
515 |
pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null |
516 |
|
517 |
exeinto /etc/acpi |
518 |
doexe ati-powermode.sh |
519 |
insinto /etc/acpi/events |
520 |
doins events/* |
521 |
|
522 |
popd > /dev/null |
523 |
|
524 |
# Done with the "source" tree. Install tools we rebuilt: |
525 |
dobin extra/fgl_glxgears/fgl_glxgears |
526 |
newdoc extra/fgl_glxgears/README README.fgl_glxgears |
527 |
|
528 |
# Gentoo-specific stuff: |
529 |
newinitd "${FILESDIR}"/atieventsd.init atieventsd |
530 |
echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf |
531 |
newconfd "${T}"/atieventsd.conf atieventsd |
532 |
} |
533 |
|
534 |
src_install-libs() { |
535 |
if [[ "${ABI}" == "amd64" ]]; then |
536 |
local EX_BASE_DIR="${BASE_DIR}_64a" |
537 |
local pkglibdir=lib64 |
538 |
local MY_ARCH_DIR="${S}/arch/x86_64" |
539 |
else |
540 |
local EX_BASE_DIR="${BASE_DIR}" |
541 |
local pkglibdir=lib |
542 |
local MY_ARCH_DIR="${S}/arch/x86" |
543 |
fi |
544 |
einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system" |
545 |
|
546 |
local ATI_ROOT=/usr/$(get_libdir)/opengl/ati |
547 |
# To make sure we do not miss a spot when these change. |
548 |
local libmajor=1 libminor=2 |
549 |
local libver=${libmajor}.${libminor} |
550 |
|
551 |
# The GLX libraries |
552 |
# (yes, this really is "lib" even on amd64/multilib --marienz) |
553 |
exeinto ${ATI_ROOT}/lib |
554 |
doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/libGL.so.${libver} |
555 |
dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor} |
556 |
dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so |
557 |
|
558 |
exeinto ${ATI_ROOT}/extensions |
559 |
doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/libglx.so |
560 |
|
561 |
# DRI modules, installed into the path used by recent versions of mesa. |
562 |
exeinto /usr/$(get_libdir)/dri |
563 |
doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so |
564 |
|
565 |
# AMD Cal libraries |
566 |
exeinto /usr/$(get_libdir) |
567 |
doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so* |
568 |
|
569 |
local envname="${T}"/04ati-dri-path |
570 |
if [[ -n ${ABI} ]]; then |
571 |
envname="${envname}-${ABI}" |
572 |
fi |
573 |
echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" |
574 |
doenvd "${envname}" |
575 |
} |
576 |
|
577 |
pkg_postinst() { |
578 |
elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" |
579 |
elog "To change your xorg.conf you can use the bundled \"aticonfig\"" |
580 |
elog |
581 |
elog "If you experience unexplained segmentation faults and kernel crashes" |
582 |
elog "with this driver and multi-threaded applications such as wine," |
583 |
elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." |
584 |
elog |
585 |
elog "Fully rebooting the system after an ${PN} update is recommended" |
586 |
elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg" |
587 |
elog "might not work" |
588 |
|
589 |
use modules && linux-mod_pkg_postinst |
590 |
"${ROOT}"/usr/bin/eselect opengl set --use-old ati |
591 |
} |
592 |
|
593 |
pkg_preinst() { |
594 |
use modules && linux-mod_pkg_preinst |
595 |
} |
596 |
|
597 |
pkg_prerm() { |
598 |
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 |
599 |
} |
600 |
|
601 |
pkg_postrm() { |
602 |
use modules && linux-mod_pkg_postrm |
603 |
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 |
604 |
} |