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