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