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