Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-drivers/ati-drivers/
Date: Sat, 02 Jan 2016 16:06:57
Message-Id: 1451750795.cc2055cb24ae64e2316c5091e548dc6eaee248dd.mrueg@gentoo
1 commit: cc2055cb24ae64e2316c5091e548dc6eaee248dd
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 2 16:06:35 2016 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 2 16:06:35 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc2055cb
7
8 x11-drivers/ati-drivers: Remove old
9
10 Package-Manager: portage-2.2.26
11
12 x11-drivers/ati-drivers/Manifest | 3 -
13 .../ati-drivers/ati-drivers-14.12-r3.ebuild | 607 --------------------
14 x11-drivers/ati-drivers/ati-drivers-15.1.ebuild | 614 ---------------------
15 x11-drivers/ati-drivers/ati-drivers-15.7-r1.ebuild | 613 --------------------
16 4 files changed, 1837 deletions(-)
17
18 diff --git a/x11-drivers/ati-drivers/Manifest b/x11-drivers/ati-drivers/Manifest
19 index da240b5..0c4db94 100644
20 --- a/x11-drivers/ati-drivers/Manifest
21 +++ b/x11-drivers/ati-drivers/Manifest
22 @@ -1,5 +1,2 @@
23 DIST amd-catalyst-15.9-linux-installer-15.201.1151-x86.x86_64.zip 180990551 SHA256 bf3e6e7d5c51db3d075410a3f116f865b82823debc1d66698d187249feec6a91 SHA512 4fc2b3626b818027da974836fc77c436185f08dfb6cdce301a251c129e3d601092e114e4ea15c598845f9e76c57f37f6161cff2b4992f43a990982c8baa76cb4 WHIRLPOOL 2453179cf8599cdaf039689b8625001bbb85c5ad1a174c71cf3f6bac3711d4050bcc8b1d216d69db8c16060119ac28c7f9792632fb5db76cf6fcd949697e5324
24 -DIST amd-catalyst-omega-14.12-linux-run-installers.zip 155616187 SHA256 68669836f20ad4351e08b13c5766c6b2ffc6b8cd2a37e9baf55779da32d3a249 SHA512 f87be6a56c03ca4aae3782668af8700d83c85872387753cf002ba4a0e0816fae9af29841a4390db972bfe2f7fb853571b32f8434c2008983461b80699347ac21 WHIRLPOOL 2675a387abd372b34c51f4e8ebfd6547300a8c3ffcc0562633838bc0cdaec3675ca3f4cfa2ab7481c8fa1238a46059f5f848611780638ef6d2301a527d900326
25 -DIST amd-driver-installer-15.20.1046-x86.x86_64.zip 180105224 SHA256 ffde64203f49d9288eaa25f4d744187b6f4f14a87a444bab6a001d822b327a9d SHA512 8a04a524f64af5620eb39bc22cd869551f1b1ea7f6e3349258f70305c84ba45d36355c16348e2e286f8f74f3657cae283f0bb911b3f819995f1933999fd6ef0f WHIRLPOOL f7a7e705cd56cf2ef9557416a4fba6b98704e971e0d18daf27b5f73052df7f61240693522b8e02b53f3cba714a5b99c3bf65cc1aba6d0802858adc896852cc08
26 -DIST fglrx-installer_15.200.orig.tar.gz 202964824 SHA256 a4ad20d53f790d5105351a5627fadbf02fe4945582abf2b93a337b1bbaa0b033 SHA512 499fd955a170d8157a974acdee981ce0a444262465624bacea38a23421f9d80ce3481b20a0d0daa4469eba85a69ec9278026c127a2a1995f52573adc5b1808c7 WHIRLPOOL 00ccd79433499133367b669740b494de33ec9de17c2a45f3d1222ee8d8cb9c40d4ad8d7043a2593bb3e1fbc66a4f65a7fd756c61a40fdbc9cf9b6cb1d693e25f
27 DIST xvba-sdk-0.74-404001.tar.gz 583847 SHA256 731a2c489f2fb5d7318c1976061b26c1057a696f46d09dcf55fbada97fed17eb SHA512 aa1dd52b59eeeabd026d8b76e3b75eaf02587ef286438ba28884afeef5a5efaf50283b5ee4f5b81b12cf79cb4ec77c9a235a886b29fb7cdf850c9779f4b07b35 WHIRLPOOL 69917b746d353a884512e97b9d9a9b89e6f51add3119e69ddd119d51c0c3f2820b93a449fe42bd76d671dc505f92bf25b7f2c5868b33768fc68a19596e460951
28
29 diff --git a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild b/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
30 deleted file mode 100644
31 index e7ee9bc..0000000
32 --- a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
33 +++ /dev/null
34 @@ -1,607 +0,0 @@
35 -# Copyright 1999-2015 Gentoo Foundation
36 -# Distributed under the terms of the GNU General Public License v2
37 -# $Id$
38 -
39 -EAPI=5
40 -
41 -MULTILIB_COMPAT=( abi_x86_{32,64} )
42 -inherit eutils multilib-build linux-info linux-mod toolchain-funcs versionator pax-utils
43 -
44 -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
45 -HOMEPAGE="http://www.amd.com"
46 -RUN="${WORKDIR}/fglrx-14.501.1003/amd-driver-installer-14.501.1003-x86.x86_64.run"
47 -SLOT="1"
48 -# Uses javascript for download YESSSS
49 -#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip"
50 -DRIVERS_URI="mirror://gentoo/amd-catalyst-omega-14.12-linux-run-installers.zip"
51 -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
52 -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
53 -FOLDER_PREFIX="common/"
54 -IUSE="debug +modules qt4 static-libs pax_kernel"
55 -
56 -LICENSE="AMD GPL-2 QPL-1.0"
57 -KEYWORDS="-* amd64 x86"
58 -
59 -RESTRICT="bindist test"
60 -
61 -RDEPEND="
62 - <=x11-base/xorg-server-1.16.49[-minimal]
63 - >=app-eselect/eselect-opengl-1.0.7
64 - app-eselect/eselect-opencl
65 - sys-power/acpid
66 - x11-apps/xauth
67 - x11-libs/libX11
68 - x11-libs/libXext
69 - x11-libs/libXinerama
70 - x11-libs/libXrandr
71 - x11-libs/libXrender
72 - virtual/glu
73 - !x11-libs/xvba-video
74 - abi_x86_32? (
75 - virtual/glu[abi_x86_32]
76 - x11-libs/libX11[abi_x86_32]
77 - x11-libs/libXext[abi_x86_32]
78 - x11-libs/libXinerama[abi_x86_32]
79 - x11-libs/libXrandr[abi_x86_32]
80 - x11-libs/libXrender[abi_x86_32]
81 - )
82 - qt4? (
83 - x11-libs/libICE
84 - x11-libs/libSM
85 - x11-libs/libXcursor
86 - x11-libs/libXfixes
87 - x11-libs/libXxf86vm
88 - dev-qt/qtcore:4
89 - dev-qt/qtgui:4[accessibility]
90 - )
91 -"
92 -if [[ legacy != ${SLOT} ]]; then
93 - RDEPEND="${RDEPEND}
94 - !x11-drivers/ati-drivers:legacy"
95 -else
96 - RDEPEND="${RDEPEND}
97 - !x11-drivers/ati-drivers:1"
98 -fi
99 -
100 -DEPEND="${RDEPEND}
101 - x11-proto/inputproto
102 - x11-proto/xf86miscproto
103 - x11-proto/xf86vidmodeproto
104 - x11-proto/xineramaproto
105 - x11-libs/libXtst
106 - sys-apps/findutils
107 - app-misc/pax-utils
108 - app-arch/unzip
109 -"
110 -
111 -EMULTILIB_PKG="true"
112 -
113 -S="${WORKDIR}"
114 -
115 -# QA Silencing
116 -QA_TEXTRELS="
117 - usr/lib*/opengl/ati/lib/libGL.so.1.2
118 - usr/lib*/libatiadlxx.so
119 - usr/lib*/xorg/modules/glesx.so
120 - usr/lib*/libaticaldd.so
121 - usr/lib*/dri/fglrx_dri.so
122 -"
123 -
124 -QA_EXECSTACK="
125 - opt/bin/atiode
126 - opt/bin/amdcccle
127 - usr/lib*/opengl/ati/lib/libGL.so.1.2
128 - usr/lib*/dri/fglrx_dri.so
129 -"
130 -
131 -QA_WX_LOAD="
132 - usr/lib*/opengl/ati/lib/libGL.so.1.2
133 - usr/lib*/dri/fglrx_dri.so
134 -"
135 -
136 -QA_PRESTRIPPED="
137 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
138 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
139 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
140 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
141 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
142 - usr/lib\(32\|64\)\?/libaticaldd.so
143 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
144 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
145 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so
146 -"
147 -
148 -QA_SONAME="
149 - usr/lib\(32\|64\)\?/libatiadlxx.so
150 - usr/lib\(32\|64\)\?/libaticalcl.so
151 - usr/lib\(32\|64\)\?/libaticaldd.so
152 - usr/lib\(32\|64\)\?/libaticalrt.so
153 - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
154 - usr/lib\(32\|64\)\?/libamdhsasc\(32\|64\)\?.so
155 -"
156 -
157 -QA_DT_HASH="
158 - opt/bin/amdcccle
159 - opt/bin/aticonfig
160 - opt/bin/atiodcli
161 - opt/bin/atiode
162 - opt/bin/clinfo
163 - opt/bin/fglrxinfo
164 - opt/sbin/atieventsd
165 - opt/sbin/amdnotifyui
166 - usr/lib\(32\|64\)\?/libaticalcl.so
167 - usr/lib\(32\|64\)\?/libaticalrt.so
168 - usr/lib\(32\|64\)\?/libatiuki.so.1.0
169 - usr/lib\(32\|64\)\?/libatiadlxx.so
170 - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
171 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
172 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
173 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
174 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
175 - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
176 - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
177 - usr/lib\(32\|64\)\?/libaticaldd.so
178 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
179 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
180 - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
181 - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
182 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
183 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so
184 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
185 -"
186 -
187 -pkg_nofetch() {
188 - einfo "The driver packages"
189 - einfo ${A}
190 - einfo "need to be downloaded manually from"
191 - einfo "http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64"
192 - einfo "and ${XVBA_SDK_URI}"
193 -}
194 -
195 -pkg_pretend() {
196 - local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR"
197 - use amd64 && CONFIG_CHECK+=" COMPAT"
198 -
199 - local ERROR_MTRR="CONFIG_MTRR required for direct rendering."
200 - local ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct
201 - rendering to work."
202 - local ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire
203 - as GPL-only. This prevents ${P} from compiling with an error like this:
204 - FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
205 - local ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause
206 - kernel to reject loading the fglrx module with
207 - \"ERROR: could not insert 'fglrx': Exec format error.\"
208 - You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead."
209 - local ERROR_BKL="CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38."
210 -
211 - # workaround until bug 365543 is solved
212 - if use modules; then
213 - linux-info_pkg_setup
214 - require_configured_kernel
215 - kernel_is ge 2 6 37 && kernel_is le 2 6 38 && CONFIG_CHECK+=" BKL"
216 - check_extra_config
217 - if ! linux_chkconfig_present AGP && \
218 - ! linux_chkconfig_present PCIEPORTBUS; then
219 - ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
220 - ewarn "Direct rendering will not work."
221 - fi
222 - fi
223 -
224 - if ! has XT ${PAX_MARKINGS} && use pax_kernel; then
225 - ewarn "You have disabled xattr pax markings for portage."
226 - ewarn "This will likely cause programs using ati-drivers provided"
227 - ewarn "libraries to be killed kernel."
228 - fi
229 -}
230 -
231 -pkg_setup() {
232 - if use modules; then
233 - MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
234 - BUILD_TARGETS="kmod_build"
235 - linux-mod_pkg_setup
236 - BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_OUT_DIR}"
237 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
238 - if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
239 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
240 - else
241 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space"
242 - fi
243 - fi
244 - # Define module dir.
245 - MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod"
246 - # get the xorg-server version and set BASE_DIR for that
247 - BASE_DIR="${S}/xpic"
248 -
249 - # amd64/x86
250 - if use amd64 ; then
251 - MY_BASE_DIR="${BASE_DIR}_64a"
252 - PKG_LIBDIR=lib64
253 - ARCH_DIR="${S}/arch/x86_64"
254 - else
255 - MY_BASE_DIR="${BASE_DIR}"
256 - PKG_LIBDIR=lib
257 - ARCH_DIR="${S}/arch/x86"
258 - fi
259 -
260 - elog
261 - elog "Please note that this driver only supports graphic cards based on"
262 - elog "Evergreen chipset and newer."
263 - elog "This includes the AMD Radeon HD 5400+ series at this moment."
264 - elog
265 - elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
266 - elog "For migration informations please refer to:"
267 - elog "https://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
268 - einfo
269 -}
270 -
271 -src_unpack() {
272 - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
273 - DRIVERS_DISTFILE=${DRIVERS_URI##*/}
274 - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
275 -
276 - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
277 - unpack ${DRIVERS_DISTFILE}
278 - else
279 - #please note, RUN may be insanely assigned at top near SRC_URI
280 - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
281 - unpack ${DRIVERS_DISTFILE}
282 - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
283 - else
284 - RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
285 - fi
286 - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die
287 - fi
288 -
289 - mkdir xvba_sdk
290 - cd xvba_sdk
291 - unpack ${XVBA_SDK_DISTFILE}
292 -
293 - mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed"
294 - cd "${WORKDIR}/extra"
295 - tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz"
296 -}
297 -
298 -src_prepare() {
299 - if use modules; then
300 - if use debug; then
301 - sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
302 - "${MODULE_DIR}/firegl_public.c" \
303 - || die "Failed to enable debug output."
304 - fi
305 - fi
306 -
307 - # These are the userspace utilities that we also have source for.
308 - # We rebuild these later.
309 - rm \
310 - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
311 - || die "bin rm failed"
312 -
313 - # in this version amdcccle isn't static, thus we depend on qt4
314 - use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle
315 -
316 - # ACPI fixups
317 - sed -i \
318 - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
319 - -e "s:/var/lib/gdm/:/var/gdm/:" \
320 - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
321 - || die "ACPI fixups failed."
322 -
323 - # Since "who" is in coreutils, we're using that one instead of "finger".
324 - sed -i -e 's:finger:who:' \
325 - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
326 - || die "Replacing 'finger' with 'who' failed."
327 - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
328 - # add function to detect default state.
329 - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch
330 -
331 - # see http://ati.cchtml.com/show_bug.cgi?id=495
332 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
333 - # first hunk applied upstream second (x32 related) was not
334 - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
335 -
336 - # compile fix for AGP-less kernel, bug #435322
337 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
338 -
339 - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch"
340 -
341 - # Fix #483400
342 - epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
343 -
344 - # Fix #524658
345 - epatch "${FILESDIR}/fix-the-linux-3.17-no_hotplug-error.patch"
346 -
347 - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
348 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
349 -
350 - # Compile fix, #526602
351 - epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
352 -
353 - cd "${MODULE_DIR}"
354 -
355 - # bugged fglrx build system, this file should be copied by hand
356 - cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
357 -
358 - convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
359 -
360 - # When built with ati's make.sh it defines a bunch of macros if
361 - # certain .config values are set, falling back to less reliable
362 - # detection methods if linux/autoconf.h is not available. We
363 - # simply use the linux/autoconf.h settings directly, bypassing the
364 - # detection script.
365 - sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
366 - sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
367 - || die "MODVERSIONS sed 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 - # The -DUSE_GLU is needed to compile using nvidia headers
379 - # according to a comment in ati-drivers-extra-8.33.6.ebuild.
380 - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
381 - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
382 - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
383 - eend $?
384 -}
385 -
386 -src_install() {
387 - use modules && linux-mod_src_install
388 -
389 - # We can do two things here, and neither of them is very nice.
390 -
391 - # For direct rendering libGL has to be able to load one or more
392 - # dri modules (files ending in _dri.so, like fglrx_dri.so).
393 - # Gentoo's mesa looks for these files in the location specified by
394 - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
395 - # location /usr/$(get_libdir)/dri. Ati's libGL does the same
396 - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
397 - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
398 - # 64bit. So we can either put the .so files in that (unusual,
399 - # compared to "normal" mesa libGL) location or set
400 - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
401 - # 101539.
402 -
403 - # The problem with this approach is that LIBGL_DRIVERS_PATH
404 - # *overrides* the default hardcoded location, it does not extend
405 - # it. So if ati-drivers is merged but a non-ati libGL is selected
406 - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
407 - # (because it changed in a newer mesa or because it was compiled
408 - # for a different set of multilib abis than we are) stuff breaks.
409 -
410 - # We create one file per ABI to work with "native" multilib, see
411 - # below.
412 -
413 - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
414 - doenvd "${T}/03ati-colon-sep" || die
415 -
416 - # All libraries that we have a 32 bit and 64 bit version of on
417 - # amd64 are installed in src_install-libs. Everything else
418 - # (including libraries only available in native 64bit on amd64)
419 - # goes in here.
420 - multilib_foreach_abi src_install-libs
421 -
422 - # This is sorted by the order the files occur in the source tree.
423 -
424 - # X modules.
425 - exeinto /usr/$(get_libdir)/xorg/modules/drivers
426 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
427 - exeinto /usr/$(get_libdir)/xorg/modules/linux
428 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
429 - exeinto /usr/$(get_libdir)/xorg/modules
430 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
431 -
432 - # Arch-specific files.
433 - # (s)bin.
434 - into /opt
435 - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
436 - use qt4 && dosbin "${ARCH_DIR}"/usr/sbin/amdnotifyui
437 - dobin "${ARCH_DIR}"/usr/bin/clinfo
438 - # We cleaned out the compilable stuff in src_unpack
439 - dobin "${ARCH_DIR}"/usr/X11R6/bin/*
440 -
441 - # Common files.
442 - # etc.
443 - insinto /etc/ati
444 - exeinto /etc/ati
445 - # Everything except for the authatieventsd.sh script.
446 - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default}
447 - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
448 -
449 - # include.
450 - insinto /usr
451 - doins -r ${FOLDER_PREFIX}usr/include
452 - insinto /usr/include/X11/extensions
453 -
454 - # Just the atigetsysteminfo.sh script.
455 - into /usr
456 - dosbin ${FOLDER_PREFIX}usr/sbin/*
457 -
458 - # data files for the control panel.
459 - if use qt4 ; then
460 - insinto /usr/share
461 - doins -r ${FOLDER_PREFIX}usr/share/ati
462 - insinto /usr/share/pixmaps
463 - doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm
464 - make_desktop_entry amdcccle 'AMD Catalyst Control Center' \
465 - ccc_large System
466 - fi
467 -
468 - # doc.
469 - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
470 -
471 - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
472 -
473 - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null
474 -
475 - exeinto /etc/acpi
476 - doexe ati-powermode.sh
477 - insinto /etc/acpi/events
478 - doins events/*
479 -
480 - popd > /dev/null
481 -
482 - # Done with the "source" tree. Install tools we rebuilt:
483 - dobin extra/fgl_glxgears/fgl_glxgears
484 - newdoc extra/fgl_glxgears/README README.fgl_glxgears
485 -
486 - # Gentoo-specific stuff:
487 - newinitd "${FILESDIR}"/atieventsd.init atieventsd
488 - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
489 - newconfd "${T}"/atieventsd.conf atieventsd
490 -
491 - # PowerXpress stuff
492 - exeinto /usr/$(get_libdir)/fglrx
493 - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
494 - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
495 - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
496 -}
497 -
498 -src_install-libs() {
499 - if [[ "${ABI}" == "amd64" ]]; then
500 - local EX_BASE_DIR="${BASE_DIR}_64a"
501 - local pkglibdir=lib64
502 - local MY_ARCH_DIR="${S}/arch/x86_64"
503 - local oclsuffix=64
504 - else
505 - local EX_BASE_DIR="${BASE_DIR}"
506 - local pkglibdir=lib
507 - local MY_ARCH_DIR="${S}/arch/x86"
508 - local oclsuffix=32
509 - fi
510 - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
511 -
512 - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
513 - # To make sure we do not miss a spot when these change.
514 - local libmajor=1 libminor=2
515 - local libver=${libmajor}.${libminor}
516 -
517 - # The GLX libraries
518 - # (yes, this really is "lib" even on amd64/multilib --marienz)
519 - exeinto ${ATI_ROOT}/lib
520 - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
521 - libGL.so.${libver}
522 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
523 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
524 -
525 - if multilib_is_native_abi; then
526 - exeinto ${ATI_ROOT}/extensions
527 - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
528 - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
529 - fi
530 -
531 - # other libs
532 - exeinto /usr/$(get_libdir)
533 - # Everything except for the libGL.so installed some row above
534 - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
535 - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
536 - insinto /usr/$(get_libdir)
537 - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
538 - -maxdepth 1 -type f -not -name '*.so*')
539 -
540 - # DRI modules, installed into the path used by recent versions of mesa.
541 - exeinto /usr/$(get_libdir)/dri
542 - doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
543 -
544 - # AMD Cal and OpenCL libraries
545 - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd
546 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so*
547 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so*
548 - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so
549 - exeinto /usr/$(get_libdir)
550 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
551 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdhsasc*.so
552 -
553 - # OpenCL vendor files
554 - insinto /etc/OpenCL/vendors/
555 - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF
556 - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so
557 - EOF
558 - doins "${T}"/amdocl${oclsuffix}.icd
559 -
560 - local envname="${T}"/04ati-dri-path
561 - if [[ -n ${ABI} ]]; then
562 - envname="${envname}-${ABI}"
563 - fi
564 - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
565 - doenvd "${envname}"
566 -
567 - # Silence the QA notice by creating missing soname symlinks
568 - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9])
569 - do
570 - local soname=${so##*/}
571 - local soname_one=${soname%.[0-9]}
572 - local soname_zero=${soname_one%.[0-9]}
573 - dosym ${soname} /usr/$(get_libdir)/${soname_one}
574 - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero}
575 - done
576 -
577 - # See https://bugs.gentoo.org/show_bug.cgi?id=443466
578 - dodir /etc/revdep-rebuild/
579 - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers"
580 -
581 - #remove static libs if not wanted
582 - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a
583 -
584 - #install xvba sdk headers
585 - doheader xvba_sdk/include/amdxvba.h
586 -
587 - # VA-API internal wrapper
588 - dosym /usr/$(get_libdir)/libXvBAW.so.1.0 /usr/$(get_libdir)/va/drivers/fglrx_drv_video.so
589 -
590 - if use pax_kernel; then
591 - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
592 - fi
593 -}
594 -
595 -pkg_postinst() {
596 - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\""
597 - elog "To change your xorg.conf you can use the bundled \"aticonfig\""
598 - elog
599 - elog "If you experience unexplained segmentation faults and kernel crashes"
600 - elog "with this driver and multi-threaded applications such as wine,"
601 - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
602 - elog
603 - elog "Fully rebooting the system after an ${PN} update is recommended"
604 - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
605 - elog "might not work"
606 - elog
607 - elog "Some cards need acpid running to handle events"
608 - elog "Please add it to boot runlevel with rc-update add acpid boot"
609 - elog
610 -
611 - use modules && linux-mod_pkg_postinst
612 - "${ROOT}"/usr/bin/eselect opengl set --use-old ati
613 - "${ROOT}"/usr/bin/eselect opencl set --use-old amd
614 -
615 - if has_version "x11-drivers/xf86-video-intel[sna]"; then
616 - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server"
617 - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience"
618 - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or"
619 - ewarn "try disabling sna for xf86-video-intel."
620 - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000"
621 - fi
622 -
623 - if use pax_kernel; then
624 - ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and"
625 - ewarn "after you have run \"eselect opengl set ati\". Executacle"
626 - ewarn "revdep-pax is part of package sys-apps/elfix."
627 - fi
628 -}
629 -
630 -pkg_preinst() {
631 - use modules && linux-mod_pkg_preinst
632 -}
633 -
634 -pkg_prerm() {
635 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
636 -}
637 -
638 -pkg_postrm() {
639 - use modules && linux-mod_pkg_postrm
640 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
641 -}
642
643 diff --git a/x11-drivers/ati-drivers/ati-drivers-15.1.ebuild b/x11-drivers/ati-drivers/ati-drivers-15.1.ebuild
644 deleted file mode 100644
645 index 72b3629..0000000
646 --- a/x11-drivers/ati-drivers/ati-drivers-15.1.ebuild
647 +++ /dev/null
648 @@ -1,614 +0,0 @@
649 -# Copyright 1999-2015 Gentoo Foundation
650 -# Distributed under the terms of the GNU General Public License v2
651 -# $Id$
652 -
653 -EAPI=5
654 -
655 -MULTILIB_COMPAT=( abi_x86_{32,64} )
656 -inherit eutils multilib-build linux-info linux-mod toolchain-funcs versionator pax-utils
657 -
658 -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
659 -HOMEPAGE="http://www.amd.com"
660 -#RUN="${WORKDIR}/fglrx-14.501.1003/amd-driver-installer-14.501.1003-x86.x86_64.run"
661 -SLOT="1"
662 -# Uses javascript for download YESSSS
663 -#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip"
664 -DRIVERS_URI="mirror://ubuntu/pool/restricted/f/fglrx-installer/fglrx-installer_15.200.orig.tar.gz"
665 -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
666 -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
667 -FOLDER_PREFIX="common/"
668 -IUSE="debug +modules qt4 static-libs pax_kernel gdm-hack"
669 -
670 -LICENSE="AMD GPL-2 QPL-1.0"
671 -KEYWORDS="-* ~amd64 ~x86"
672 -
673 -RESTRICT="bindist test"
674 -
675 -RDEPEND="
676 - <=x11-base/xorg-server-1.17.49[-minimal]
677 - >=app-eselect/eselect-opengl-1.0.7
678 - app-eselect/eselect-opencl
679 - sys-power/acpid
680 - x11-apps/xauth
681 - !x11-libs/xvba-video
682 - virtual/glu[${MULTILIB_USEDEP}]
683 - x11-libs/libX11[${MULTILIB_USEDEP}]
684 - x11-libs/libXext[${MULTILIB_USEDEP}]
685 - x11-libs/libXinerama[${MULTILIB_USEDEP}]
686 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
687 - x11-libs/libXrender[${MULTILIB_USEDEP}]
688 - qt4? (
689 - x11-libs/libICE
690 - x11-libs/libSM
691 - x11-libs/libXcursor
692 - x11-libs/libXfixes
693 - x11-libs/libXxf86vm
694 - dev-qt/qtcore:4
695 - dev-qt/qtgui:4[accessibility]
696 - )
697 - gdm-hack? (
698 - x11-base/xorg-server:=
699 - )
700 -"
701 -if [[ legacy != ${SLOT} ]]; then
702 - RDEPEND="${RDEPEND}
703 - !x11-drivers/ati-drivers:legacy"
704 -else
705 - RDEPEND="${RDEPEND}
706 - !x11-drivers/ati-drivers:1"
707 -fi
708 -
709 -DEPEND="${RDEPEND}
710 - x11-proto/inputproto
711 - x11-proto/xf86miscproto
712 - x11-proto/xf86vidmodeproto
713 - x11-proto/xineramaproto
714 - x11-libs/libXtst
715 - sys-apps/findutils
716 - app-misc/pax-utils
717 - app-arch/unzip
718 -"
719 -
720 -EMULTILIB_PKG="true"
721 -
722 -S="${WORKDIR}"
723 -
724 -# QA Silencing
725 -QA_TEXTRELS="
726 - usr/lib*/opengl/ati/lib/libGL.so.1.2
727 - usr/lib*/libatiadlxx.so
728 - usr/lib*/xorg/modules/glesx.so
729 - usr/lib*/libaticaldd.so
730 - usr/lib*/dri/fglrx_dri.so
731 -"
732 -
733 -QA_EXECSTACK="
734 - opt/bin/atiode
735 - opt/bin/amdcccle
736 - usr/lib*/opengl/ati/lib/libGL.so.1.2
737 - usr/lib*/dri/fglrx_dri.so
738 -"
739 -
740 -QA_WX_LOAD="
741 - usr/lib*/opengl/ati/lib/libGL.so.1.2
742 - usr/lib*/dri/fglrx_dri.so
743 -"
744 -
745 -QA_PRESTRIPPED="
746 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
747 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
748 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
749 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
750 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
751 - usr/lib\(32\|64\)\?/libaticaldd.so
752 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
753 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
754 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so
755 -"
756 -
757 -QA_SONAME="
758 - usr/lib\(32\|64\)\?/libatiadlxx.so
759 - usr/lib\(32\|64\)\?/libaticalcl.so
760 - usr/lib\(32\|64\)\?/libaticaldd.so
761 - usr/lib\(32\|64\)\?/libaticalrt.so
762 - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
763 - usr/lib\(32\|64\)\?/libamdhsasc\(32\|64\)\?.so
764 -"
765 -
766 -QA_DT_HASH="
767 - opt/bin/amdcccle
768 - opt/bin/aticonfig
769 - opt/bin/atiodcli
770 - opt/bin/atiode
771 - opt/bin/clinfo
772 - opt/bin/fglrxinfo
773 - opt/sbin/atieventsd
774 - opt/sbin/amdnotifyui
775 - usr/lib\(32\|64\)\?/libaticalcl.so
776 - usr/lib\(32\|64\)\?/libaticalrt.so
777 - usr/lib\(32\|64\)\?/libatiuki.so.1.0
778 - usr/lib\(32\|64\)\?/libatiadlxx.so
779 - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
780 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
781 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
782 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
783 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
784 - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
785 - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
786 - usr/lib\(32\|64\)\?/libaticaldd.so
787 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
788 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
789 - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
790 - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
791 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
792 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so
793 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
794 -"
795 -
796 -pkg_nofetch() {
797 - einfo "The driver packages"
798 - einfo ${A}
799 - einfo "need to be downloaded manually from"
800 - einfo "http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64"
801 - einfo "and ${XVBA_SDK_URI}"
802 -}
803 -
804 -pkg_pretend() {
805 - local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR"
806 - use amd64 && CONFIG_CHECK+=" COMPAT"
807 -
808 - local ERROR_MTRR="CONFIG_MTRR required for direct rendering."
809 - local ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct
810 - rendering to work."
811 - local ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire
812 - as GPL-only. This prevents ${P} from compiling with an error like this:
813 - FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
814 - local ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause
815 - kernel to reject loading the fglrx module with
816 - \"ERROR: could not insert 'fglrx': Exec format error.\"
817 - You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead."
818 - local ERROR_BKL="CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38."
819 -
820 - # workaround until bug 365543 is solved
821 - if use modules; then
822 - linux-info_pkg_setup
823 - require_configured_kernel
824 - kernel_is ge 2 6 37 && kernel_is le 2 6 38 && CONFIG_CHECK+=" BKL"
825 - check_extra_config
826 - if ! linux_chkconfig_present AGP && \
827 - ! linux_chkconfig_present PCIEPORTBUS; then
828 - ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
829 - ewarn "Direct rendering will not work."
830 - fi
831 - fi
832 -
833 - if ! has XT ${PAX_MARKINGS} && use pax_kernel; then
834 - ewarn "You have disabled xattr pax markings for portage."
835 - ewarn "This will likely cause programs using ati-drivers provided"
836 - ewarn "libraries to be killed kernel."
837 - fi
838 -}
839 -
840 -pkg_setup() {
841 - if use modules; then
842 - MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
843 - BUILD_TARGETS="kmod_build"
844 - linux-mod_pkg_setup
845 - BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_OUT_DIR}"
846 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
847 - if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
848 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
849 - else
850 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space"
851 - fi
852 - fi
853 - # Define module dir.
854 - MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod"
855 - # get the xorg-server version and set BASE_DIR for that
856 - BASE_DIR="${S}/xpic"
857 -
858 - # amd64/x86
859 - if use amd64 ; then
860 - MY_BASE_DIR="${BASE_DIR}_64a"
861 - PKG_LIBDIR=lib64
862 - ARCH_DIR="${S}/arch/x86_64"
863 - else
864 - MY_BASE_DIR="${BASE_DIR}"
865 - PKG_LIBDIR=lib
866 - ARCH_DIR="${S}/arch/x86"
867 - fi
868 -
869 - elog
870 - elog "Please note that this driver only supports graphic cards based on"
871 - elog "Evergreen chipset and newer."
872 - elog "This includes the AMD Radeon HD 5400+ series at this moment."
873 - elog
874 - elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
875 - elog "For migration informations please refer to:"
876 - elog "https://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
877 - einfo
878 -}
879 -
880 -src_unpack() {
881 - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
882 - DRIVERS_DISTFILE=${DRIVERS_URI##*/}
883 - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
884 -
885 - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
886 - unpack ${DRIVERS_DISTFILE}
887 - mkdir -p common
888 - mv etc lib usr common || die "Assumed to find etc lib and usr for common"
889 - else
890 - #please note, RUN may be insanely assigned at top near SRC_URI
891 - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
892 - unpack ${DRIVERS_DISTFILE}
893 - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
894 - else
895 - RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
896 - fi
897 - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die
898 - fi
899 -
900 - mkdir xvba_sdk
901 - cd xvba_sdk
902 - unpack ${XVBA_SDK_DISTFILE}
903 -
904 - mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed"
905 - cd "${WORKDIR}/extra"
906 - tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz"
907 -}
908 -
909 -src_prepare() {
910 - if use modules; then
911 - if use debug; then
912 - sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
913 - "${MODULE_DIR}/firegl_public.c" \
914 - || die "Failed to enable debug output."
915 - fi
916 - fi
917 -
918 - # These are the userspace utilities that we also have source for.
919 - # We rebuild these later.
920 - rm \
921 - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
922 - || die "bin rm failed"
923 -
924 - # in this version amdcccle isn't static, thus we depend on qt4
925 - use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle
926 -
927 - # ACPI fixups
928 - sed -i \
929 - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
930 - -e "s:/var/lib/gdm/:/var/gdm/:" \
931 - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
932 - || die "ACPI fixups failed."
933 -
934 - # Since "who" is in coreutils, we're using that one instead of "finger".
935 - sed -i -e 's:finger:who:' \
936 - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
937 - || die "Replacing 'finger' with 'who' failed."
938 - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
939 - # add function to detect default state.
940 - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch
941 -
942 - # see http://ati.cchtml.com/show_bug.cgi?id=495
943 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
944 - # first hunk applied upstream second (x32 related) was not
945 - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
946 -
947 - # compile fix for AGP-less kernel, bug #435322
948 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
949 -
950 - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch"
951 -
952 - # Fix #483400
953 - epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
954 -
955 - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
956 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
957 -
958 - # Compile fix, #526602
959 - epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
960 -
961 - cd "${MODULE_DIR}"
962 -
963 - # bugged fglrx build system, this file should be copied by hand
964 - cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
965 -
966 - convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
967 -
968 - # When built with ati's make.sh it defines a bunch of macros if
969 - # certain .config values are set, falling back to less reliable
970 - # detection methods if linux/autoconf.h is not available. We
971 - # simply use the linux/autoconf.h settings directly, bypassing the
972 - # detection script.
973 - sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
974 - sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
975 - || die "MODVERSIONS sed failed"
976 -}
977 -
978 -src_compile() {
979 - use modules && linux-mod_src_compile
980 -
981 - ebegin "Building fgl_glxgears"
982 - cd "${S}"/extra/fgl_glxgears
983 - # These extra libs/utils either have an Imakefile that does not
984 - # work very well without tweaking or a Makefile ignoring CFLAGS
985 - # and the like. We bypass those.
986 - # The -DUSE_GLU is needed to compile using nvidia headers
987 - # according to a comment in ati-drivers-extra-8.33.6.ebuild.
988 - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
989 - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
990 - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
991 - eend $?
992 -}
993 -
994 -src_install() {
995 - use modules && linux-mod_src_install
996 -
997 - # We can do two things here, and neither of them is very nice.
998 -
999 - # For direct rendering libGL has to be able to load one or more
1000 - # dri modules (files ending in _dri.so, like fglrx_dri.so).
1001 - # Gentoo's mesa looks for these files in the location specified by
1002 - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
1003 - # location /usr/$(get_libdir)/dri. Ati's libGL does the same
1004 - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
1005 - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
1006 - # 64bit. So we can either put the .so files in that (unusual,
1007 - # compared to "normal" mesa libGL) location or set
1008 - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
1009 - # 101539.
1010 -
1011 - # The problem with this approach is that LIBGL_DRIVERS_PATH
1012 - # *overrides* the default hardcoded location, it does not extend
1013 - # it. So if ati-drivers is merged but a non-ati libGL is selected
1014 - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
1015 - # (because it changed in a newer mesa or because it was compiled
1016 - # for a different set of multilib abis than we are) stuff breaks.
1017 -
1018 - # We create one file per ABI to work with "native" multilib, see
1019 - # below.
1020 -
1021 - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
1022 - doenvd "${T}/03ati-colon-sep" || die
1023 -
1024 - # All libraries that we have a 32 bit and 64 bit version of on
1025 - # amd64 are installed in src_install-libs. Everything else
1026 - # (including libraries only available in native 64bit on amd64)
1027 - # goes in here.
1028 - multilib_foreach_abi src_install-libs
1029 -
1030 - # This is sorted by the order the files occur in the source tree.
1031 -
1032 - # X modules.
1033 - exeinto /usr/$(get_libdir)/xorg/modules/drivers
1034 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
1035 - exeinto /usr/$(get_libdir)/xorg/modules/linux
1036 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
1037 - exeinto /usr/$(get_libdir)/xorg/modules
1038 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
1039 -
1040 - #516816
1041 - if use gdm-hack; then
1042 - sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/usr/$(get_libdir)/xorg/modules/drivers/fglrx_drv.so" || die "Applying gdm-hack failed"
1043 - fi
1044 -
1045 - # Arch-specific files.
1046 - # (s)bin.
1047 - into /opt
1048 - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
1049 - use qt4 && dosbin "${ARCH_DIR}"/usr/sbin/amdnotifyui
1050 - dobin "${ARCH_DIR}"/usr/bin/clinfo
1051 - # We cleaned out the compilable stuff in src_unpack
1052 - dobin "${ARCH_DIR}"/usr/X11R6/bin/*
1053 -
1054 - # Common files.
1055 - # etc.
1056 - insinto /etc/ati
1057 - exeinto /etc/ati
1058 - # Everything except for the authatieventsd.sh script.
1059 - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default}
1060 - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
1061 -
1062 - # include.
1063 - insinto /usr
1064 - doins -r ${FOLDER_PREFIX}usr/include
1065 - insinto /usr/include/X11/extensions
1066 -
1067 - # Just the atigetsysteminfo.sh script.
1068 - into /usr
1069 - dosbin ${FOLDER_PREFIX}usr/sbin/*
1070 -
1071 - # data files for the control panel.
1072 - if use qt4 ; then
1073 - insinto /usr/share
1074 - doins -r ${FOLDER_PREFIX}usr/share/ati
1075 - insinto /usr/share/pixmaps
1076 - doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm
1077 - make_desktop_entry amdcccle 'AMD Catalyst Control Center' \
1078 - ccc_large System
1079 - fi
1080 -
1081 - # doc.
1082 - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
1083 -
1084 - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
1085 -
1086 - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null
1087 -
1088 - exeinto /etc/acpi
1089 - doexe ati-powermode.sh
1090 - insinto /etc/acpi/events
1091 - doins events/*
1092 -
1093 - popd > /dev/null
1094 -
1095 - # Done with the "source" tree. Install tools we rebuilt:
1096 - dobin extra/fgl_glxgears/fgl_glxgears
1097 - newdoc extra/fgl_glxgears/README README.fgl_glxgears
1098 -
1099 - # Gentoo-specific stuff:
1100 - newinitd "${FILESDIR}"/atieventsd.init atieventsd
1101 - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
1102 - newconfd "${T}"/atieventsd.conf atieventsd
1103 -
1104 - # PowerXpress stuff
1105 - exeinto /usr/$(get_libdir)/fglrx
1106 - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
1107 - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
1108 - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
1109 -
1110 - #516816
1111 - use gdm-hack && Xorg -version > "${D}/etc/ati/xvrn" 2>&1
1112 -}
1113 -
1114 -src_install-libs() {
1115 - if [[ "${ABI}" == "amd64" ]]; then
1116 - local EX_BASE_DIR="${BASE_DIR}_64a"
1117 - local pkglibdir=lib64
1118 - local MY_ARCH_DIR="${S}/arch/x86_64"
1119 - local oclsuffix=64
1120 - else
1121 - local EX_BASE_DIR="${BASE_DIR}"
1122 - local pkglibdir=lib
1123 - local MY_ARCH_DIR="${S}/arch/x86"
1124 - local oclsuffix=32
1125 - fi
1126 - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
1127 -
1128 - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
1129 - # To make sure we do not miss a spot when these change.
1130 - local libmajor=1 libminor=2
1131 - local libver=${libmajor}.${libminor}
1132 -
1133 - # The GLX libraries
1134 - # (yes, this really is "lib" even on amd64/multilib --marienz)
1135 - exeinto ${ATI_ROOT}/lib
1136 - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
1137 - libGL.so.${libver}
1138 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
1139 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
1140 -
1141 - if multilib_is_native_abi; then
1142 - exeinto ${ATI_ROOT}/extensions
1143 - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
1144 - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
1145 -
1146 - #516816
1147 - if use gdm-hack; then
1148 - sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/${ATI_ROOT}/extensions/libglx.so" || die "Applying gdm-hack failed"
1149 - fi
1150 - fi
1151 -
1152 - # other libs
1153 - exeinto /usr/$(get_libdir)
1154 - # Everything except for the libGL.so installed some row above
1155 - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
1156 - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
1157 - insinto /usr/$(get_libdir)
1158 - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
1159 - -maxdepth 1 -type f -not -name '*.so*')
1160 -
1161 - # DRI modules, installed into the path used by recent versions of mesa.
1162 - exeinto /usr/$(get_libdir)/dri
1163 - doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
1164 -
1165 - # AMD Cal and OpenCL libraries
1166 - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd
1167 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so*
1168 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so*
1169 - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so
1170 - exeinto /usr/$(get_libdir)
1171 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
1172 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdhsasc*.so
1173 -
1174 - # OpenCL vendor files
1175 - insinto /etc/OpenCL/vendors/
1176 - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF
1177 - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so
1178 - EOF
1179 - doins "${T}"/amdocl${oclsuffix}.icd
1180 -
1181 - local envname="${T}"/04ati-dri-path
1182 - if [[ -n ${ABI} ]]; then
1183 - envname="${envname}-${ABI}"
1184 - fi
1185 - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
1186 - doenvd "${envname}"
1187 -
1188 - # Silence the QA notice by creating missing soname symlinks
1189 - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9])
1190 - do
1191 - local soname=${so##*/}
1192 - local soname_one=${soname%.[0-9]}
1193 - local soname_zero=${soname_one%.[0-9]}
1194 - dosym ${soname} /usr/$(get_libdir)/${soname_one}
1195 - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero}
1196 - done
1197 -
1198 - # See https://bugs.gentoo.org/show_bug.cgi?id=443466
1199 - dodir /etc/revdep-rebuild/
1200 - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers"
1201 -
1202 - #remove static libs if not wanted
1203 - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a
1204 -
1205 - #install xvba sdk headers
1206 - doheader xvba_sdk/include/amdxvba.h
1207 -
1208 - # VA-API internal wrapper
1209 - dosym /usr/$(get_libdir)/libXvBAW.so.1.0 /usr/$(get_libdir)/va/drivers/fglrx_drv_video.so
1210 -
1211 - if use pax_kernel; then
1212 - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
1213 - fi
1214 -}
1215 -
1216 -pkg_postinst() {
1217 - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\""
1218 - elog "To change your xorg.conf you can use the bundled \"aticonfig\""
1219 - elog
1220 - elog "If you experience unexplained segmentation faults and kernel crashes"
1221 - elog "with this driver and multi-threaded applications such as wine,"
1222 - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
1223 - elog
1224 - elog "Fully rebooting the system after an ${PN} update is recommended"
1225 - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
1226 - elog "might not work"
1227 - elog
1228 - elog "Some cards need acpid running to handle events"
1229 - elog "Please add it to boot runlevel with rc-update add acpid boot"
1230 - elog
1231 -
1232 - use modules && linux-mod_pkg_postinst
1233 - "${ROOT}"/usr/bin/eselect opengl set --use-old ati
1234 - "${ROOT}"/usr/bin/eselect opencl set --use-old amd
1235 -
1236 - if has_version "x11-drivers/xf86-video-intel[sna]"; then
1237 - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server"
1238 - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience"
1239 - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or"
1240 - ewarn "try disabling sna for xf86-video-intel."
1241 - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000"
1242 - fi
1243 -
1244 - if use pax_kernel; then
1245 - ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and"
1246 - ewarn "after you have run \"eselect opengl set ati\". Executacle"
1247 - ewarn "revdep-pax is part of package sys-apps/elfix."
1248 - fi
1249 -}
1250 -
1251 -pkg_preinst() {
1252 - use modules && linux-mod_pkg_preinst
1253 -}
1254 -
1255 -pkg_prerm() {
1256 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1257 -}
1258 -
1259 -pkg_postrm() {
1260 - use modules && linux-mod_pkg_postrm
1261 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1262 -}
1263
1264 diff --git a/x11-drivers/ati-drivers/ati-drivers-15.7-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-15.7-r1.ebuild
1265 deleted file mode 100644
1266 index 1d45690..0000000
1267 --- a/x11-drivers/ati-drivers/ati-drivers-15.7-r1.ebuild
1268 +++ /dev/null
1269 @@ -1,613 +0,0 @@
1270 -# Copyright 1999-2015 Gentoo Foundation
1271 -# Distributed under the terms of the GNU General Public License v2
1272 -# $Id$
1273 -
1274 -EAPI=5
1275 -
1276 -MULTILIB_COMPAT=( abi_x86_{32,64} )
1277 -inherit eutils multilib-build linux-info linux-mod systemd toolchain-funcs versionator pax-utils
1278 -
1279 -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
1280 -HOMEPAGE="http://www.amd.com"
1281 -#RUN="${WORKDIR}/fglrx-14.501.1003/amd-driver-installer-14.501.1003-x86.x86_64.run"
1282 -SLOT="1"
1283 -# Uses javascript for download YESSSS
1284 -#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip"
1285 -DRIVERS_URI="mirror://gentoo/amd-driver-installer-15.20.1046-x86.x86_64.zip"
1286 -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
1287 -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
1288 -FOLDER_PREFIX="common/"
1289 -IUSE="debug +modules qt4 static-libs pax_kernel gdm-hack"
1290 -
1291 -LICENSE="AMD GPL-2 QPL-1.0"
1292 -KEYWORDS="-* ~amd64 ~x86"
1293 -
1294 -RESTRICT="bindist test fetch"
1295 -
1296 -RDEPEND="
1297 - <=x11-base/xorg-server-1.17.49[-minimal]
1298 - >=app-eselect/eselect-opengl-1.0.7
1299 - app-eselect/eselect-opencl
1300 - sys-power/acpid
1301 - x11-apps/xauth
1302 - !x11-libs/xvba-video
1303 - virtual/glu[${MULTILIB_USEDEP}]
1304 - x11-libs/libX11[${MULTILIB_USEDEP}]
1305 - x11-libs/libXext[${MULTILIB_USEDEP}]
1306 - x11-libs/libXinerama[${MULTILIB_USEDEP}]
1307 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1308 - x11-libs/libXrender[${MULTILIB_USEDEP}]
1309 - qt4? (
1310 - x11-libs/libICE
1311 - x11-libs/libSM
1312 - x11-libs/libXcursor
1313 - x11-libs/libXfixes
1314 - x11-libs/libXxf86vm
1315 - dev-qt/qtcore:4
1316 - dev-qt/qtgui:4[accessibility]
1317 - )
1318 - gdm-hack? (
1319 - x11-base/xorg-server:=
1320 - )
1321 -"
1322 -if [[ legacy != ${SLOT} ]]; then
1323 - RDEPEND="${RDEPEND}
1324 - !x11-drivers/ati-drivers:legacy"
1325 -else
1326 - RDEPEND="${RDEPEND}
1327 - !x11-drivers/ati-drivers:1"
1328 -fi
1329 -
1330 -DEPEND="${RDEPEND}
1331 - x11-proto/inputproto
1332 - x11-proto/xf86miscproto
1333 - x11-proto/xf86vidmodeproto
1334 - x11-proto/xineramaproto
1335 - x11-libs/libXtst
1336 - sys-apps/findutils
1337 - app-misc/pax-utils
1338 - app-arch/unzip
1339 -"
1340 -
1341 -EMULTILIB_PKG="true"
1342 -
1343 -S="${WORKDIR}"
1344 -
1345 -# QA Silencing
1346 -QA_TEXTRELS="
1347 - usr/lib*/opengl/ati/lib/libGL.so.1.2
1348 - usr/lib*/libatiadlxx.so
1349 - usr/lib*/xorg/modules/glesx.so
1350 - usr/lib*/libaticaldd.so
1351 - usr/lib*/dri/fglrx_dri.so
1352 -"
1353 -
1354 -QA_EXECSTACK="
1355 - opt/bin/atiode
1356 - opt/bin/amdcccle
1357 - usr/lib*/opengl/ati/lib/libGL.so.1.2
1358 - usr/lib*/dri/fglrx_dri.so
1359 -"
1360 -
1361 -QA_WX_LOAD="
1362 - usr/lib*/opengl/ati/lib/libGL.so.1.2
1363 - usr/lib*/dri/fglrx_dri.so
1364 -"
1365 -
1366 -QA_PRESTRIPPED="
1367 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
1368 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
1369 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
1370 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
1371 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
1372 - usr/lib\(32\|64\)\?/libaticaldd.so
1373 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
1374 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
1375 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so
1376 -"
1377 -
1378 -QA_SONAME="
1379 - usr/lib\(32\|64\)\?/libatiadlxx.so
1380 - usr/lib\(32\|64\)\?/libaticalcl.so
1381 - usr/lib\(32\|64\)\?/libaticaldd.so
1382 - usr/lib\(32\|64\)\?/libaticalrt.so
1383 - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
1384 - usr/lib\(32\|64\)\?/libamdhsasc\(32\|64\)\?.so
1385 -"
1386 -
1387 -QA_DT_HASH="
1388 - opt/bin/amdcccle
1389 - opt/bin/aticonfig
1390 - opt/bin/atiodcli
1391 - opt/bin/atiode
1392 - opt/bin/clinfo
1393 - opt/bin/fglrxinfo
1394 - opt/sbin/atieventsd
1395 - opt/sbin/amdnotifyui
1396 - usr/lib\(32\|64\)\?/libaticalcl.so
1397 - usr/lib\(32\|64\)\?/libaticalrt.so
1398 - usr/lib\(32\|64\)\?/libatiuki.so.1.0
1399 - usr/lib\(32\|64\)\?/libatiadlxx.so
1400 - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
1401 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
1402 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
1403 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
1404 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
1405 - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
1406 - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
1407 - usr/lib\(32\|64\)\?/libaticaldd.so
1408 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
1409 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
1410 - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
1411 - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
1412 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
1413 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so
1414 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
1415 -"
1416 -
1417 -pkg_nofetch() {
1418 - einfo "The driver packages"
1419 - einfo ${A}
1420 - einfo "need to be downloaded manually from"
1421 - einfo "http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64"
1422 - einfo "and ${XVBA_SDK_URI}"
1423 -}
1424 -
1425 -pkg_pretend() {
1426 - local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR"
1427 - use amd64 && CONFIG_CHECK+=" COMPAT"
1428 -
1429 - local ERROR_MTRR="CONFIG_MTRR required for direct rendering."
1430 - local ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct
1431 - rendering to work."
1432 - local ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire
1433 - as GPL-only. This prevents ${P} from compiling with an error like this:
1434 - FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
1435 - local ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause
1436 - kernel to reject loading the fglrx module with
1437 - \"ERROR: could not insert 'fglrx': Exec format error.\"
1438 - You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead."
1439 - local ERROR_BKL="CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38."
1440 -
1441 - # workaround until bug 365543 is solved
1442 - if use modules; then
1443 - linux-info_pkg_setup
1444 - require_configured_kernel
1445 - kernel_is ge 2 6 37 && kernel_is le 2 6 38 && CONFIG_CHECK+=" BKL"
1446 - check_extra_config
1447 - if ! linux_chkconfig_present AGP && \
1448 - ! linux_chkconfig_present PCIEPORTBUS; then
1449 - ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
1450 - ewarn "Direct rendering will not work."
1451 - fi
1452 - fi
1453 -
1454 - if ! has XT ${PAX_MARKINGS} && use pax_kernel; then
1455 - ewarn "You have disabled xattr pax markings for portage."
1456 - ewarn "This will likely cause programs using ati-drivers provided"
1457 - ewarn "libraries to be killed kernel."
1458 - fi
1459 -}
1460 -
1461 -pkg_setup() {
1462 - if use modules; then
1463 - MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
1464 - BUILD_TARGETS="kmod_build"
1465 - linux-mod_pkg_setup
1466 - BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_OUT_DIR}"
1467 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
1468 - if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
1469 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
1470 - else
1471 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space"
1472 - fi
1473 - fi
1474 - # Define module dir.
1475 - MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod"
1476 - # get the xorg-server version and set BASE_DIR for that
1477 - BASE_DIR="${S}/xpic"
1478 -
1479 - # amd64/x86
1480 - if use amd64 ; then
1481 - MY_BASE_DIR="${BASE_DIR}_64a"
1482 - PKG_LIBDIR=lib64
1483 - ARCH_DIR="${S}/arch/x86_64"
1484 - else
1485 - MY_BASE_DIR="${BASE_DIR}"
1486 - PKG_LIBDIR=lib
1487 - ARCH_DIR="${S}/arch/x86"
1488 - fi
1489 -
1490 - elog
1491 - elog "Please note that this driver only supports graphic cards based on"
1492 - elog "Evergreen chipset and newer."
1493 - elog "This includes the AMD Radeon HD 5400+ series at this moment."
1494 - elog
1495 - elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
1496 - elog "For migration informations please refer to:"
1497 - elog "https://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
1498 - einfo
1499 -}
1500 -
1501 -src_unpack() {
1502 - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
1503 - DRIVERS_DISTFILE=${DRIVERS_URI##*/}
1504 - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
1505 -
1506 - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
1507 - unpack ${DRIVERS_DISTFILE}
1508 - mkdir -p common
1509 - mv etc lib usr common || die "Assumed to find etc lib and usr for common"
1510 - else
1511 - #please note, RUN may be insanely assigned at top near SRC_URI
1512 - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
1513 - unpack ${DRIVERS_DISTFILE}
1514 - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
1515 - else
1516 - RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
1517 - fi
1518 - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die
1519 - fi
1520 -
1521 - mkdir xvba_sdk
1522 - cd xvba_sdk
1523 - unpack ${XVBA_SDK_DISTFILE}
1524 -
1525 - mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed"
1526 - cd "${WORKDIR}/extra"
1527 - tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz"
1528 -}
1529 -
1530 -src_prepare() {
1531 - if use modules; then
1532 - if use debug; then
1533 - sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
1534 - "${MODULE_DIR}/firegl_public.c" \
1535 - || die "Failed to enable debug output."
1536 - fi
1537 - fi
1538 -
1539 - # These are the userspace utilities that we also have source for.
1540 - # We rebuild these later.
1541 - rm \
1542 - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
1543 - || die "bin rm failed"
1544 -
1545 - # in this version amdcccle isn't static, thus we depend on qt4
1546 - use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle
1547 -
1548 - # ACPI fixups
1549 - sed -i \
1550 - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
1551 - -e "s:/var/lib/gdm/:/var/gdm/:" \
1552 - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
1553 - || die "ACPI fixups failed."
1554 -
1555 - # Since "who" is in coreutils, we're using that one instead of "finger".
1556 - sed -i -e 's:finger:who:' \
1557 - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
1558 - || die "Replacing 'finger' with 'who' failed."
1559 - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
1560 - # add function to detect default state.
1561 - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch
1562 -
1563 - # see http://ati.cchtml.com/show_bug.cgi?id=495
1564 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
1565 - # first hunk applied upstream second (x32 related) was not
1566 - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
1567 -
1568 - # compile fix for AGP-less kernel, bug #435322
1569 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
1570 -
1571 - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch"
1572 -
1573 - # Fix #483400
1574 - epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
1575 -
1576 - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
1577 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
1578 -
1579 - # Compile fix, #526602
1580 - epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
1581 -
1582 - epatch_user
1583 -
1584 - cd "${MODULE_DIR}"
1585 -
1586 - # bugged fglrx build system, this file should be copied by hand
1587 - cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
1588 -
1589 - convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
1590 -
1591 - # When built with ati's make.sh it defines a bunch of macros if
1592 - # certain .config values are set, falling back to less reliable
1593 - # detection methods if linux/autoconf.h is not available. We
1594 - # simply use the linux/autoconf.h settings directly, bypassing the
1595 - # detection script.
1596 - sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
1597 - sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
1598 - || die "MODVERSIONS sed failed"
1599 -}
1600 -
1601 -src_compile() {
1602 - use modules && linux-mod_src_compile
1603 -
1604 - ebegin "Building fgl_glxgears"
1605 - cd "${S}"/extra/fgl_glxgears
1606 - # These extra libs/utils either have an Imakefile that does not
1607 - # work very well without tweaking or a Makefile ignoring CFLAGS
1608 - # and the like. We bypass those.
1609 - # The -DUSE_GLU is needed to compile using nvidia headers
1610 - # according to a comment in ati-drivers-extra-8.33.6.ebuild.
1611 - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
1612 - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
1613 - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
1614 - eend $?
1615 -}
1616 -
1617 -src_install() {
1618 - use modules && linux-mod_src_install
1619 -
1620 - # We can do two things here, and neither of them is very nice.
1621 -
1622 - # For direct rendering libGL has to be able to load one or more
1623 - # dri modules (files ending in _dri.so, like fglrx_dri.so).
1624 - # Gentoo's mesa looks for these files in the location specified by
1625 - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
1626 - # location /usr/$(get_libdir)/dri. Ati's libGL does the same
1627 - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
1628 - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
1629 - # 64bit. So we can either put the .so files in that (unusual,
1630 - # compared to "normal" mesa libGL) location or set
1631 - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
1632 - # 101539.
1633 -
1634 - # The problem with this approach is that LIBGL_DRIVERS_PATH
1635 - # *overrides* the default hardcoded location, it does not extend
1636 - # it. So if ati-drivers is merged but a non-ati libGL is selected
1637 - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
1638 - # (because it changed in a newer mesa or because it was compiled
1639 - # for a different set of multilib abis than we are) stuff breaks.
1640 -
1641 - # We create one file per ABI to work with "native" multilib, see
1642 - # below.
1643 -
1644 - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
1645 - doenvd "${T}/03ati-colon-sep" || die
1646 -
1647 - # All libraries that we have a 32 bit and 64 bit version of on
1648 - # amd64 are installed in src_install-libs. Everything else
1649 - # (including libraries only available in native 64bit on amd64)
1650 - # goes in here.
1651 - multilib_foreach_abi src_install-libs
1652 -
1653 - # This is sorted by the order the files occur in the source tree.
1654 -
1655 - # X modules.
1656 - exeinto /usr/$(get_libdir)/xorg/modules/drivers
1657 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
1658 - exeinto /usr/$(get_libdir)/xorg/modules/linux
1659 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
1660 - exeinto /usr/$(get_libdir)/xorg/modules
1661 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
1662 -
1663 - #516816
1664 - if use gdm-hack; then
1665 - sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/usr/$(get_libdir)/xorg/modules/drivers/fglrx_drv.so" || die "Applying gdm-hack failed"
1666 - fi
1667 -
1668 - # Arch-specific files.
1669 - # (s)bin.
1670 - into /opt
1671 - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
1672 - use qt4 && dosbin "${ARCH_DIR}"/usr/sbin/amdnotifyui
1673 - dobin "${ARCH_DIR}"/usr/bin/clinfo
1674 - # We cleaned out the compilable stuff in src_unpack
1675 - dobin "${ARCH_DIR}"/usr/X11R6/bin/*
1676 -
1677 - # Common files.
1678 - # etc.
1679 - insinto /etc/ati
1680 - exeinto /etc/ati
1681 - # Everything except for the authatieventsd.sh script.
1682 - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default}
1683 - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
1684 -
1685 - # include.
1686 - insinto /usr
1687 - doins -r ${FOLDER_PREFIX}usr/include
1688 - insinto /usr/include/X11/extensions
1689 -
1690 - # Just the atigetsysteminfo.sh script.
1691 - into /usr
1692 - dosbin ${FOLDER_PREFIX}usr/sbin/*
1693 -
1694 - # data files for the control panel.
1695 - if use qt4 ; then
1696 - insinto /usr/share
1697 - doins -r ${FOLDER_PREFIX}usr/share/ati
1698 - insinto /usr/share/pixmaps
1699 - doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm
1700 - make_desktop_entry amdcccle 'AMD Catalyst Control Center' \
1701 - ccc_large System
1702 - fi
1703 -
1704 - # doc.
1705 - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
1706 -
1707 - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
1708 -
1709 - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null
1710 -
1711 - exeinto /etc/acpi
1712 - doexe ati-powermode.sh
1713 - insinto /etc/acpi/events
1714 - doins events/*
1715 -
1716 - popd > /dev/null
1717 -
1718 - # Done with the "source" tree. Install tools we rebuilt:
1719 - dobin extra/fgl_glxgears/fgl_glxgears
1720 - newdoc extra/fgl_glxgears/README README.fgl_glxgears
1721 -
1722 - # Gentoo-specific stuff:
1723 - newinitd "${FILESDIR}"/atieventsd.init atieventsd
1724 - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
1725 - newconfd "${T}"/atieventsd.conf atieventsd
1726 - systemd_dounit "${FILESDIR}/atieventsd.service"
1727 -
1728 - # PowerXpress stuff
1729 - exeinto /usr/$(get_libdir)/fglrx
1730 - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
1731 - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
1732 - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
1733 -
1734 - #516816
1735 - use gdm-hack && Xorg -version > "${D}/etc/ati/xvrn" 2>&1
1736 -}
1737 -
1738 -src_install-libs() {
1739 - if [[ "${ABI}" == "amd64" ]]; then
1740 - local EX_BASE_DIR="${BASE_DIR}_64a"
1741 - local pkglibdir=lib64
1742 - local MY_ARCH_DIR="${S}/arch/x86_64"
1743 - local oclsuffix=64
1744 - else
1745 - local EX_BASE_DIR="${BASE_DIR}"
1746 - local pkglibdir=lib
1747 - local MY_ARCH_DIR="${S}/arch/x86"
1748 - local oclsuffix=32
1749 - fi
1750 - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
1751 -
1752 - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
1753 - # To make sure we do not miss a spot when these change.
1754 - local libmajor=1 libminor=2
1755 - local libver=${libmajor}.${libminor}
1756 -
1757 - # The GLX libraries
1758 - # (yes, this really is "lib" even on amd64/multilib --marienz)
1759 - exeinto ${ATI_ROOT}/lib
1760 - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
1761 - libGL.so.${libver}
1762 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
1763 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
1764 -
1765 - if multilib_is_native_abi; then
1766 - exeinto ${ATI_ROOT}/extensions
1767 - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
1768 - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
1769 -
1770 - #516816
1771 - if use gdm-hack; then
1772 - sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/${ATI_ROOT}/extensions/libglx.so" || die "Applying gdm-hack failed"
1773 - fi
1774 - fi
1775 -
1776 - # other libs
1777 - exeinto /usr/$(get_libdir)
1778 - # Everything except for the libGL.so installed some row above
1779 - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
1780 - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
1781 - insinto /usr/$(get_libdir)
1782 - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
1783 - -maxdepth 1 -type f -not -name '*.so*')
1784 -
1785 - # DRI modules, installed into the path used by recent versions of mesa.
1786 - exeinto /usr/$(get_libdir)/dri
1787 - doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
1788 -
1789 - # AMD Cal and OpenCL libraries
1790 - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd
1791 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so*
1792 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so*
1793 - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so
1794 - exeinto /usr/$(get_libdir)
1795 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
1796 -
1797 - # OpenCL vendor files
1798 - insinto /etc/OpenCL/vendors/
1799 - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF
1800 - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so
1801 - EOF
1802 - doins "${T}"/amdocl${oclsuffix}.icd
1803 -
1804 - local envname="${T}"/04ati-dri-path
1805 - if [[ -n ${ABI} ]]; then
1806 - envname="${envname}-${ABI}"
1807 - fi
1808 - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
1809 - doenvd "${envname}"
1810 -
1811 - # Silence the QA notice by creating missing soname symlinks
1812 - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9])
1813 - do
1814 - local soname=${so##*/}
1815 - local soname_one=${soname%.[0-9]}
1816 - local soname_zero=${soname_one%.[0-9]}
1817 - dosym ${soname} /usr/$(get_libdir)/${soname_one}
1818 - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero}
1819 - done
1820 -
1821 - # See https://bugs.gentoo.org/show_bug.cgi?id=443466
1822 - dodir /etc/revdep-rebuild/
1823 - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers"
1824 -
1825 - #remove static libs if not wanted
1826 - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a
1827 -
1828 - #install xvba sdk headers
1829 - doheader xvba_sdk/include/amdxvba.h
1830 -
1831 - # VA-API internal wrapper
1832 - dosym /usr/$(get_libdir)/libXvBAW.so.1.0 /usr/$(get_libdir)/va/drivers/fglrx_drv_video.so
1833 -
1834 - if use pax_kernel; then
1835 - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
1836 - fi
1837 -}
1838 -
1839 -pkg_postinst() {
1840 - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\""
1841 - elog "To change your xorg.conf you can use the bundled \"aticonfig\""
1842 - elog
1843 - elog "If you experience unexplained segmentation faults and kernel crashes"
1844 - elog "with this driver and multi-threaded applications such as wine,"
1845 - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
1846 - elog
1847 - elog "Fully rebooting the system after an ${PN} update is recommended"
1848 - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
1849 - elog "might not work"
1850 - elog
1851 -
1852 - use modules && linux-mod_pkg_postinst
1853 - "${ROOT}"/usr/bin/eselect opengl set --use-old ati
1854 - "${ROOT}"/usr/bin/eselect opencl set --use-old amd
1855 -
1856 - if has_version "x11-drivers/xf86-video-intel[sna]"; then
1857 - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server"
1858 - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience"
1859 - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or"
1860 - ewarn "try disabling sna for xf86-video-intel."
1861 - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000"
1862 - fi
1863 -
1864 - if use pax_kernel; then
1865 - ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and"
1866 - ewarn "after you have run \"eselect opengl set ati\". Executacle"
1867 - ewarn "revdep-pax is part of package sys-apps/elfix."
1868 - fi
1869 -}
1870 -
1871 -pkg_preinst() {
1872 - use modules && linux-mod_pkg_preinst
1873 -}
1874 -
1875 -pkg_prerm() {
1876 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1877 -}
1878 -
1879 -pkg_postrm() {
1880 - use modules && linux-mod_pkg_postrm
1881 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
1882 -}