1 |
lu_zero 10/10/01 12:10:25 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: ati-drivers-8.780.ebuild |
5 |
Log: |
6 |
New beta version, thanks to Enrico Tagliavini <enrico.tagliavini@×××××.com> as usual |
7 |
|
8 |
(Portage version: 2.2_rc84/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.228 x11-drivers/ati-drivers/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.228&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?rev=1.228&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ChangeLog?r1=1.227&r2=1.228 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v |
20 |
retrieving revision 1.227 |
21 |
retrieving revision 1.228 |
22 |
diff -u -r1.227 -r1.228 |
23 |
--- ChangeLog 26 Sep 2010 00:01:56 -0000 1.227 |
24 |
+++ ChangeLog 1 Oct 2010 12:10:25 -0000 1.228 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for x11-drivers/ati-drivers |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.227 2010/09/26 00:01:56 lu_zero Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.228 2010/10/01 12:10:25 lu_zero Exp $ |
30 |
+ |
31 |
+*ati-drivers-8.780 (01 Oct 2010) |
32 |
+ |
33 |
+ 01 Oct 2010; Luca Barbato <lu_zero@g.o> +ati-drivers-8.780.ebuild: |
34 |
+ New beta version, thanks to Enrico Tagliavini |
35 |
+ <enrico.tagliavini@×××××.com> as usual |
36 |
|
37 |
*ati-drivers-10.9-r1 (26 Sep 2010) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 x11-drivers/ati-drivers/ati-drivers-8.780.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.780.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.780.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: ati-drivers-8.780.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2010 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-8.780.ebuild,v 1.1 2010/10/01 12:10:25 lu_zero 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 |
# 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/maverick/+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.9* |
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/libXinerama |
82 |
x11-libs/libXrandr |
83 |
multilib? ( app-emulation/emul-linux-x86-opengl ) |
84 |
qt4? ( |
85 |
x11-libs/qt-core |
86 |
x11-libs/qt-gui |
87 |
) |
88 |
" |
89 |
|
90 |
DEPEND="${RDEPEND} |
91 |
x11-proto/inputproto |
92 |
x11-proto/xf86miscproto |
93 |
x11-proto/xf86vidmodeproto |
94 |
x11-proto/xineramaproto |
95 |
x11-libs/libXtst |
96 |
" |
97 |
|
98 |
EMULTILIB_PKG="true" |
99 |
|
100 |
S="${WORKDIR}" |
101 |
|
102 |
# QA Silencing |
103 |
QA_TEXTRELS=" |
104 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
105 |
usr/lib*/libatiadlxx.so |
106 |
usr/lib*/xorg/modules/glesx.so |
107 |
usr/lib*/libaticaldd.so |
108 |
usr/lib*/dri/fglrx_dri.so |
109 |
" |
110 |
|
111 |
QA_EXECSTACK=" |
112 |
opt/bin/atiode |
113 |
opt/bin/amdcccle |
114 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
115 |
usr/lib*/dri/fglrx_dri.so |
116 |
" |
117 |
|
118 |
QA_WX_LOAD=" |
119 |
usr/lib*/opengl/ati/lib/libGL.so.1.2 |
120 |
usr/lib*/dri/fglrx_dri.so |
121 |
" |
122 |
|
123 |
QA_PRESTRIPPED=" |
124 |
usr/lib\(32\|64\)\?/libXvBAW.so.1.0 |
125 |
usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 |
126 |
usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so |
127 |
usr/lib\(32\|64\)\?/xorg/modules/glesx.so |
128 |
usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 |
129 |
usr/lib\(32\|64\)\?/libaticaldd.so |
130 |
usr/lib\(32\|64\)\?/dri/fglrx_dri.so |
131 |
" |
132 |
|
133 |
QA_SONAME=" |
134 |
usr/lib\(32\|64\)\?/libatiadlxx.so |
135 |
usr/lib\(32\|64\)\?/libaticalcl.so |
136 |
usr/lib\(32\|64\)\?/libaticaldd.so |
137 |
usr/lib\(32\|64\)\?/libaticalrt.so |
138 |
" |
139 |
|
140 |
QA_DT_HASH=" |
141 |
opt/bin/amdcccle |
142 |
opt/bin/aticonfig |
143 |
opt/bin/atiodcli |
144 |
opt/bin/atiode |
145 |
opt/bin/fglrxinfo |
146 |
opt/sbin/atieventsd |
147 |
usr/lib\(32\|64\)\?/libaticalcl.so |
148 |
usr/lib\(32\|64\)\?/libaticalrt.so |
149 |
usr/lib\(32\|64\)\?/libatiuki.so.1.0 |
150 |
usr/lib\(32\|64\)\?/libatiadlxx.so |
151 |
usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0 |
152 |
usr/lib\(32\|64\)\?/libXvBAW.so.1.0 |
153 |
usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 |
154 |
usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so |
155 |
usr/lib\(32\|64\)\?/xorg/modules/glesx.so |
156 |
usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so |
157 |
usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so |
158 |
usr/lib\(32\|64\)\?/libaticaldd.so |
159 |
usr/lib\(32\|64\)\?/dri/fglrx_dri.so |
160 |
usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so |
161 |
usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2 |
162 |
" |
163 |
|
164 |
_check_kernel_config() { |
165 |
if ! kernel_is 2 6; then |
166 |
eerror "You need a 2.6 linux kernel to compile against!" |
167 |
die "No 2.6 Kernel found" |
168 |
fi |
169 |
|
170 |
if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then |
171 |
eerror "${P} is incompatible with RCU preemption (bug #223281)." |
172 |
eerror "Please disable it:" |
173 |
eerror " CONFIG_PREEMT_RCU=n" |
174 |
eerror "in /usr/src/linux/.config or" |
175 |
eerror " Processor type and features --->" |
176 |
eerror " [ ] Preemptible RCU" |
177 |
eerror "in the 'menuconfig'" |
178 |
die "CONFIG_PREEMT_RCU enabled" |
179 |
fi |
180 |
|
181 |
if ! linux_chkconfig_present MTRR; then |
182 |
ewarn "You don't have MTRR support enabled in the kernel." |
183 |
ewarn "Direct rendering will not work." |
184 |
fi |
185 |
|
186 |
if linux_chkconfig_builtin DRM; then |
187 |
ewarn "You have DRM support built in to the kernel" |
188 |
ewarn "Direct rendering will not work." |
189 |
fi |
190 |
|
191 |
if ! linux_chkconfig_present AGP && \ |
192 |
! linux_chkconfig_present PCIEPORTBUS; then |
193 |
ewarn "You don't have AGP and/or PCIe support enabled in the kernel" |
194 |
ewarn "Direct rendering will not work." |
195 |
fi |
196 |
|
197 |
if ! linux_chkconfig_present ACPI; then |
198 |
eerror "${P} requires the ACPI support in the kernel" |
199 |
eerror "Please enable it:" |
200 |
eerror " CONFIG_ACPI=y" |
201 |
eerror "in /usr/src/linux/.config or" |
202 |
eerror " Power management and ACPI options --->" |
203 |
eerror " [*] Power Management support" |
204 |
eerror "in the 'menuconfig'" |
205 |
die "CONFIG_ACPI disabled" |
206 |
fi |
207 |
|
208 |
if ! linux_chkconfig_present MAGIC_SYSRQ; then |
209 |
eerror "${P} requires the magic SysRq keys in the kernel." |
210 |
eerror "Please enable it:" |
211 |
eerror " CONFIG_MAGIC_SYSRQ=y" |
212 |
eerror "in /usr/src/linux/.config or" |
213 |
eerror " Kernel hacking --->" |
214 |
eerror " [*] Magic SysRq key" |
215 |
eerror "in the 'menuconfig'" |
216 |
die "CONFIG_MAGIC_SYSRQ disabled" |
217 |
fi |
218 |
|
219 |
if ! linux_chkconfig_present PCI_MSI; then |
220 |
eerror "${P} requires MSI in the kernel." |
221 |
eerror "Please enable it:" |
222 |
eerror " CONFIG_PCI_MSI=y" |
223 |
eerror "in /usr/src/linux/.config or" |
224 |
eerror " Bus options (PCI etc.) --->" |
225 |
eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" |
226 |
eerror "in the kernel config." |
227 |
die "CONFIG_PCI_MSI disabled" |
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 |
die "LOCKDEP enabled" |
242 |
fi |
243 |
} |
244 |
|
245 |
pkg_setup() { |
246 |
# Define module dir. |
247 |
MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod" |
248 |
# xorg folder |
249 |
BASE_DIR="${S}/x760" |
250 |
|
251 |
# amd64/x86 |
252 |
if use amd64 ; then |
253 |
MY_BASE_DIR="${BASE_DIR}_64a" |
254 |
PKG_LIBDIR=lib64 |
255 |
ARCH_DIR="${S}/arch/x86_64" |
256 |
else |
257 |
MY_BASE_DIR="${BASE_DIR}" |
258 |
PKG_LIBDIR=lib |
259 |
ARCH_DIR="${S}/arch/x86" |
260 |
fi |
261 |
|
262 |
if use modules; then |
263 |
MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)" |
264 |
BUILD_TARGETS="kmod_build" |
265 |
linux-mod_pkg_setup |
266 |
BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_DIR}" |
267 |
BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\"" |
268 |
if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then |
269 |
BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" |
270 |
else |
271 |
BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space" |
272 |
fi |
273 |
_check_kernel_config |
274 |
fi |
275 |
|
276 |
elog |
277 |
elog "Please note that this driver supports only graphic cards based on" |
278 |
elog "r600 chipset and newer." |
279 |
elog "This represent the ATI Radeon HD series at this moment." |
280 |
elog |
281 |
elog "If your card is older then usage of ${CATEGORY}/xf86-video-ati" |
282 |
elog "as replacement is highly recommended. Rather than staying with" |
283 |
elog "old versions of this driver." |
284 |
elog "For migration informations please reffer to:" |
285 |
elog "http://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml" |
286 |
einfo |
287 |
} |
288 |
|
289 |
src_unpack() { |
290 |
if [[ $(get_major_version) -gt 8 ]]; then |
291 |
# Switching to a standard way to extract the files since otherwise no signature file |
292 |
# would be created |
293 |
local src="${DISTDIR}/${A}" |
294 |
sh "${src}" --extract "${S}" 2&>1 /dev/null |
295 |
else |
296 |
unpack ${A} |
297 |
fi |
298 |
} |
299 |
|
300 |
src_prepare() { |
301 |
# All kernel options for prepare are ment to be in here |
302 |
if use modules; then |
303 |
# version patches |
304 |
# epatch "${FILESDIR}"/kernel/${PV}-*.patch |
305 |
if use debug; then |
306 |
sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ |
307 |
"${MODULE_DIR}/firegl_public.c" \ |
308 |
|| die "Failed to enable debug output." |
309 |
fi |
310 |
fi |
311 |
|
312 |
# Fix a known compilation error |
313 |
epatch "${FILESDIR}"/ati-drivers-fix_compilation-bug-297322.patch |
314 |
# Patch for 3.6.36 kernel |
315 |
if kernel_is eq 2 6 36 ; then |
316 |
epatch "${FILESDIR}"/ati-drivers-2.6.36.patch || \ |
317 |
die "epatch ati-drivers-2.6.36.patch failed" |
318 |
fi |
319 |
|
320 |
# These are the userspace utilities that we also have source for. |
321 |
# We rebuild these later. |
322 |
rm \ |
323 |
"${ARCH_DIR}"/usr/X11R6/bin/{fgl_glxgears,fglrx_xgamma} \ |
324 |
"${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR}/libfglrx_gamma* \ |
325 |
|| die "bin rm failed" |
326 |
|
327 |
# in this version amdcccle isn't static, thus we depend on qt4 |
328 |
use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle |
329 |
|
330 |
# ACPI fixups |
331 |
sed -i \ |
332 |
-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ |
333 |
-e "s:/var/lib/gdm/:/var/gdm/:" \ |
334 |
"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ |
335 |
|| die "sed failed." |
336 |
|
337 |
# Since "who" is in coreutils, we're using that one instead of "finger". |
338 |
sed -i -e 's:finger:who:' \ |
339 |
"${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \ |
340 |
|| die "Replacing 'finger' with 'who' failed." |
341 |
# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and |
342 |
# add function to detect default state. |
343 |
epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch || die "Failed to epatch powermode-opt-path-2.patch" |
344 |
|
345 |
cd "${MODULE_DIR}" |
346 |
ln -s "${ARCH_DIR}"/lib/modules/fglrx/build_mod/libfglrx_ip.a.GCC$(gcc-major-version) \ |
347 |
|| die "symlinking precompiled core failed" |
348 |
|
349 |
convert_to_m 2.6.x/Makefile || die "convert_to_m failed" |
350 |
|
351 |
# When built with ati's make.sh it defines a bunch of macros if |
352 |
# certain .config values are set, falling back to less reliable |
353 |
# detection methods if linux/autoconf.h is not available. We |
354 |
# simply use the linux/autoconf.h settings directly, bypassing the |
355 |
# detection script. |
356 |
sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed" |
357 |
sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \ |
358 |
|| die "MODVERSIONS sed failed" |
359 |
cd "${S}" |
360 |
|
361 |
mkdir extra || die "mkdir failed" |
362 |
cd extra |
363 |
unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz |
364 |
sed -i -e 's:include/extensions/extutil.h:X11/extensions/extutil.h:' \ |
365 |
lib/fglrx_gamma/fglrx_gamma.c || die "include fixup failed" |
366 |
# Add a category. |
367 |
mv programs/fglrx_gamma/fglrx_xgamma.{man,1} || die "man mv failed" |
368 |
} |
369 |
|
370 |
src_compile() { |
371 |
use modules && linux-mod_src_compile |
372 |
|
373 |
ebegin "Building fgl_glxgears" |
374 |
cd "${S}"/extra/fgl_glxgears |
375 |
# These extra libs/utils either have an Imakefile that does not |
376 |
# work very well without tweaking or a Makefile ignoring CFLAGS |
377 |
# and the like. We bypass those. |
378 |
|
379 |
# The -DUSE_GLU is needed to compile using nvidia headers |
380 |
# according to a comment in ati-drivers-extra-8.33.6.ebuild. |
381 |
"$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \ |
382 |
-I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \ |
383 |
-lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed" |
384 |
eend $? |
385 |
|
386 |
ebegin "Building fglrx_gamma lib" |
387 |
cd "${S}"/extra/lib/fglrx_gamma |
388 |
"$(tc-getCC)" -shared -fpic -o libfglrx_gamma.so.1.0 ${CFLAGS} ${LDFLAGS} \ |
389 |
-DXF86MISC -Wl,-soname,libfglrx_gamma.so.1.0 fglrx_gamma.c \ |
390 |
-lXext || die "fglrx_gamma lib build failed" |
391 |
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so || die "ln failed" |
392 |
ln -s libfglrx_gamma.so.1.0 libfglrx_gamma.so.1 || die "ln failed" |
393 |
eend $? |
394 |
|
395 |
ebegin "Building fglrx_gamma util" |
396 |
cd "${S}"/extra/programs/fglrx_gamma |
397 |
"$(tc-getCC)" -o fglrx_xgamma ${CFLAGS} ${LDFLAGS} \ |
398 |
-I../../../${FOLDER_PREFIX}usr/X11R6/include -L../../lib/fglrx_gamma \ |
399 |
fglrx_xgamma.c -lm -lfglrx_gamma -lX11 \ |
400 |
|| die "fglrx_gamma util build failed" |
401 |
eend $? |
402 |
|
403 |
} |
404 |
|
405 |
src_install() { |
406 |
use modules && linux-mod_src_install |
407 |
|
408 |
# We can do two things here, and neither of them is very nice. |
409 |
|
410 |
# For direct rendering libGL has to be able to load one or more |
411 |
# dri modules (files ending in _dri.so, like fglrx_dri.so). |
412 |
# Gentoo's mesa looks for these files in the location specified by |
413 |
# LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded |
414 |
# location /usr/$(get_libdir)/dri. Ati's libGL does the same |
415 |
# thing, but the hardcoded location is /usr/X11R6/lib/modules/dri |
416 |
# on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64 |
417 |
# 64bit. So we can either put the .so files in that (unusual, |
418 |
# compared to "normal" mesa libGL) location or set |
419 |
# LIBGL_DRIVERS_PATH. We currently do the latter. See also bug |
420 |
# 101539. |
421 |
|
422 |
# The problem with this approach is that LIBGL_DRIVERS_PATH |
423 |
# *overrides* the default hardcoded location, it does not extend |
424 |
# it. So if ati-drivers is merged but a non-ati libGL is selected |
425 |
# and its hardcoded path does not match our LIBGL_DRIVERS_PATH |
426 |
# (because it changed in a newer mesa or because it was compiled |
427 |
# for a different set of multilib abis than we are) stuff breaks. |
428 |
|
429 |
# We create one file per ABI to work with "native" multilib, see |
430 |
# below. |
431 |
|
432 |
echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep" |
433 |
doenvd "${T}/03ati-colon-sep" || die |
434 |
|
435 |
# All libraries that we have a 32 bit and 64 bit version of on |
436 |
# amd64 are installed in src_install-libs. Everything else |
437 |
# (including libraries only available in native 64bit on amd64) |
438 |
# goes in here. |
439 |
|
440 |
# There used to be some code here that tried to detect running |
441 |
# under a "native multilib" portage ((precursor of) |
442 |
# http://dev.gentoo.org/~kanaka/auto-multilib/). I removed that, it |
443 |
# should just work (only doing some duplicate work). --marienz |
444 |
if has_multilib_profile; then |
445 |
local OABI=${ABI} |
446 |
for ABI in $(get_install_abis); do |
447 |
src_install-libs |
448 |
done |
449 |
ABI=${OABI} |
450 |
unset OABI |
451 |
else |
452 |
src_install-libs |
453 |
fi |
454 |
|
455 |
# This is sorted by the order the files occur in the source tree. |
456 |
|
457 |
# X modules. |
458 |
exeinto /usr/$(get_libdir)/xorg/modules/drivers |
459 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so || die |
460 |
exeinto /usr/$(get_libdir)/xorg/modules/linux |
461 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so || die |
462 |
exeinto /usr/$(get_libdir)/xorg/modules |
463 |
doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so} || die |
464 |
|
465 |
# Arch-specific files. |
466 |
# (s)bin. |
467 |
into /opt |
468 |
dosbin "${ARCH_DIR}"/usr/sbin/atieventsd || die |
469 |
# We cleaned out the compilable stuff in src_unpack |
470 |
dobin "${ARCH_DIR}"/usr/X11R6/bin/* || die |
471 |
|
472 |
# lib. |
473 |
exeinto /usr/$(get_libdir) |
474 |
# Everything except for the libGL.so installed in src_install-libs. |
475 |
doexe $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
476 |
-maxdepth 1 -type f -name '*.so*' -not -name 'libGL.so*') |
477 |
insinto /usr/$(get_libdir) |
478 |
doins $(find "${ARCH_DIR}"/usr/X11R6/${PKG_LIBDIR} \ |
479 |
-maxdepth 1 -type f -not -name '*.so*') |
480 |
|
481 |
# Common files. |
482 |
# etc. |
483 |
insinto /etc/ati |
484 |
# Everything except for the authatieventsd.sh script. |
485 |
doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} |
486 |
insopts -m0755 |
487 |
doins ${FOLDER_PREFIX}etc/ati/authatieventsd.sh || die |
488 |
|
489 |
# include. |
490 |
insinto /usr |
491 |
doins -r ${FOLDER_PREFIX}usr/include || die |
492 |
insinto /usr/include/X11/extensions |
493 |
doins ${FOLDER_PREFIX}usr/X11R6/include/X11/extensions/fglrx_gamma.h || die |
494 |
|
495 |
# Just the atigetsysteminfo.sh script. |
496 |
into /usr |
497 |
dosbin ${FOLDER_PREFIX}usr/sbin/* || die |
498 |
|
499 |
# data files for the control panel. |
500 |
if use qt4 ; then |
501 |
insinto /usr/share |
502 |
doins -r ${FOLDER_PREFIX}usr/share/ati || die |
503 |
insinto /usr/share/pixmaps |
504 |
doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm || die |
505 |
make_desktop_entry amdcccle 'ATI Catalyst Control Center' \ |
506 |
ccc_large System |
507 |
fi |
508 |
|
509 |
# doc. |
510 |
dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx || die |
511 |
|
512 |
doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8 || die |
513 |
|
514 |
pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null |
515 |
|
516 |
exeinto /etc/acpi |
517 |
doexe ati-powermode.sh || die |
518 |
insinto /etc/acpi/events |
519 |
doins events/* || die |
520 |
|
521 |
popd > /dev/null |
522 |
|
523 |
# Done with the "source" tree. Install tools we rebuilt: |
524 |
dobin extra/fgl_glxgears/fgl_glxgears || die |
525 |
newdoc extra/fgl_glxgears/README README.fgl_glxgears || die |
526 |
|
527 |
dolib extra/lib/fglrx_gamma/*so* || die |
528 |
newdoc extra/lib/fglrx_gamma/README README.libfglrx_gamma || die |
529 |
|
530 |
dobin extra/programs/fglrx_gamma/fglrx_xgamma || die |
531 |
doman extra/programs/fglrx_gamma/fglrx_xgamma.1 || die |
532 |
newdoc extra/programs/fglrx_gamma/README README.fglrx_gamma || die |
533 |
|
534 |
# Gentoo-specific stuff: |
535 |
newinitd "${FILESDIR}"/atieventsd.init atieventsd \ |
536 |
|| die "Failed to install atieventsd.init.d" |
537 |
echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf |
538 |
insopts -m0644 |
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 |
local envname="${T}"/04ati-dri-path |
578 |
if [[ -n ${ABI} ]]; then |
579 |
envname="${envname}-${ABI}" |
580 |
fi |
581 |
echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}" |
582 |
doenvd "${envname}" || die |
583 |
} |
584 |
|
585 |
pkg_postinst() { |
586 |
elog "To switch to ATI OpenGL, run \"eselect opengl set ati\"" |
587 |
elog "To change your xorg.conf you can use the bundled \"aticonfig\"" |
588 |
elog |
589 |
elog "If you experience unexplained segmentation faults and kernel crashes" |
590 |
elog "with this driver and multi-threaded applications such as wine," |
591 |
elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2." |
592 |
elog |
593 |
elog "You will have to source /etc/profile (or logout and back in) for dri" |
594 |
elog "to work, unless you previously had ati-drivers installed." |
595 |
|
596 |
use modules && linux-mod_pkg_postinst |
597 |
"${ROOT}"/usr/bin/eselect opengl set --use-old ati |
598 |
} |
599 |
|
600 |
pkg_preinst() { |
601 |
use modules && linux-mod_pkg_preinst |
602 |
} |
603 |
|
604 |
pkg_prerm() { |
605 |
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 |
606 |
} |
607 |
|
608 |
pkg_postrm() { |
609 |
use modules && linux-mod_pkg_postrm |
610 |
"${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11 |
611 |
} |