Gentoo Archives: gentoo-commits

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