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