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/files/, x11-drivers/ati-drivers/
Date: Sat, 02 Jan 2016 16:45:12
Message-Id: 1451753094.e43ab84ee51bf7e7e6aa9e70946c12d033d138a1.mrueg@gentoo
1 commit: e43ab84ee51bf7e7e6aa9e70946c12d033d138a1
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 2 16:44:54 2016 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 2 16:44:54 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e43ab84e
7
8 x11-drivers/ati-drivers: Remove old
9
10 Package-Manager: portage-2.2.26
11
12 x11-drivers/ati-drivers/ati-drivers-15.9.ebuild | 613 ---------------------
13 .../fix-the-linux-3.17-no_hotplug-error.patch | 18 -
14 2 files changed, 631 deletions(-)
15
16 diff --git a/x11-drivers/ati-drivers/ati-drivers-15.9.ebuild b/x11-drivers/ati-drivers/ati-drivers-15.9.ebuild
17 deleted file mode 100644
18 index 0d90755..0000000
19 --- a/x11-drivers/ati-drivers/ati-drivers-15.9.ebuild
20 +++ /dev/null
21 @@ -1,613 +0,0 @@
22 -# Copyright 1999-2015 Gentoo Foundation
23 -# Distributed under the terms of the GNU General Public License v2
24 -# $Id$
25 -
26 -EAPI=5
27 -
28 -MULTILIB_COMPAT=( abi_x86_{32,64} )
29 -inherit eutils multilib-build linux-info linux-mod systemd toolchain-funcs versionator pax-utils
30 -
31 -DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets"
32 -HOMEPAGE="http://www.amd.com"
33 -RUN="${WORKDIR}/AMD-Catalyst-15.9-Linux-installer-15.201.1151-x86.x86_64.run"
34 -SLOT="1"
35 -# Uses javascript for download YESSSS
36 -#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip"
37 -DRIVERS_URI="mirror://gentoo/amd-catalyst-${PV}-linux-installer-15.201.1151-x86.x86_64.zip"
38 -XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz"
39 -SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}"
40 -FOLDER_PREFIX="common/"
41 -IUSE="debug +modules qt4 static-libs pax_kernel gdm-hack"
42 -
43 -LICENSE="AMD GPL-2 QPL-1.0"
44 -KEYWORDS="-* ~amd64 ~x86"
45 -
46 -RESTRICT="bindist test fetch"
47 -
48 -RDEPEND="
49 - <=x11-base/xorg-server-1.17.49[-minimal]
50 - >=app-eselect/eselect-opengl-1.0.7
51 - app-eselect/eselect-opencl
52 - sys-power/acpid
53 - x11-apps/xauth
54 - !x11-libs/xvba-video
55 - virtual/glu[${MULTILIB_USEDEP}]
56 - x11-libs/libX11[${MULTILIB_USEDEP}]
57 - x11-libs/libXext[${MULTILIB_USEDEP}]
58 - x11-libs/libXinerama[${MULTILIB_USEDEP}]
59 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
60 - x11-libs/libXrender[${MULTILIB_USEDEP}]
61 - qt4? (
62 - x11-libs/libICE
63 - x11-libs/libSM
64 - x11-libs/libXcursor
65 - x11-libs/libXfixes
66 - x11-libs/libXxf86vm
67 - dev-qt/qtcore:4
68 - dev-qt/qtgui:4[accessibility]
69 - )
70 - gdm-hack? (
71 - x11-base/xorg-server:=
72 - )
73 -"
74 -if [[ legacy != ${SLOT} ]]; then
75 - RDEPEND="${RDEPEND}
76 - !x11-drivers/ati-drivers:legacy"
77 -else
78 - RDEPEND="${RDEPEND}
79 - !x11-drivers/ati-drivers:1"
80 -fi
81 -
82 -DEPEND="${RDEPEND}
83 - x11-proto/inputproto
84 - x11-proto/xf86miscproto
85 - x11-proto/xf86vidmodeproto
86 - x11-proto/xineramaproto
87 - x11-libs/libXtst
88 - sys-apps/findutils
89 - app-misc/pax-utils
90 - app-arch/unzip
91 -"
92 -
93 -EMULTILIB_PKG="true"
94 -
95 -S="${WORKDIR}"
96 -
97 -# QA Silencing
98 -QA_TEXTRELS="
99 - usr/lib*/opengl/ati/lib/libGL.so.1.2
100 - usr/lib*/libatiadlxx.so
101 - usr/lib*/xorg/modules/glesx.so
102 - usr/lib*/libaticaldd.so
103 - usr/lib*/dri/fglrx_dri.so
104 -"
105 -
106 -QA_EXECSTACK="
107 - opt/bin/atiode
108 - opt/bin/amdcccle
109 - usr/lib*/opengl/ati/lib/libGL.so.1.2
110 - usr/lib*/dri/fglrx_dri.so
111 -"
112 -
113 -QA_WX_LOAD="
114 - usr/lib*/opengl/ati/lib/libGL.so.1.2
115 - usr/lib*/dri/fglrx_dri.so
116 -"
117 -
118 -QA_PRESTRIPPED="
119 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
120 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
121 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
122 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
123 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
124 - usr/lib\(32\|64\)\?/libaticaldd.so
125 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
126 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
127 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so
128 -"
129 -
130 -QA_SONAME="
131 - usr/lib\(32\|64\)\?/libatiadlxx.so
132 - usr/lib\(32\|64\)\?/libaticalcl.so
133 - usr/lib\(32\|64\)\?/libaticaldd.so
134 - usr/lib\(32\|64\)\?/libaticalrt.so
135 - usr/lib\(32\|64\)\?/libamdocl\(32\|64\)\?.so
136 - usr/lib\(32\|64\)\?/libamdhsasc\(32\|64\)\?.so
137 -"
138 -
139 -QA_DT_HASH="
140 - opt/bin/amdcccle
141 - opt/bin/aticonfig
142 - opt/bin/atiodcli
143 - opt/bin/atiode
144 - opt/bin/clinfo
145 - opt/bin/fglrxinfo
146 - opt/sbin/atieventsd
147 - opt/sbin/amdnotifyui
148 - usr/lib\(32\|64\)\?/libaticalcl.so
149 - usr/lib\(32\|64\)\?/libaticalrt.so
150 - usr/lib\(32\|64\)\?/libatiuki.so.1.0
151 - usr/lib\(32\|64\)\?/libatiadlxx.so
152 - usr/lib\(32\|64\)\?/libfglrx_dm.so.1.0
153 - usr/lib\(32\|64\)\?/libXvBAW.so.1.0
154 - usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0
155 - usr/lib\(32\|64\)\?/xorg/modules/amdxmm.so
156 - usr/lib\(32\|64\)\?/xorg/modules/glesx.so
157 - usr/lib\(32\|64\)\?/xorg/modules/linux/libfglrxdrm.so
158 - usr/lib\(32\|64\)\?/xorg/modules/drivers/fglrx_drv.so
159 - usr/lib\(32\|64\)\?/libaticaldd.so
160 - usr/lib\(32\|64\)\?/dri/fglrx_dri.so
161 - usr/lib\(32\|64\)\?/opengl/ati/extensions/libglx.so
162 - usr/lib\(32\|64\)\?/opengl/ati/extensions/fglrx-libglx.so
163 - usr/lib\(32\|64\)\?/opengl/ati/lib/fglrx-libGL.so.1.2
164 - usr/lib\(32\|64\)\?/opengl/ati/lib/libGL.so.1.2
165 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\)\?.so
166 - usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1
167 -"
168 -
169 -pkg_nofetch() {
170 - einfo "The driver packages"
171 - einfo ${A}
172 - einfo "need to be downloaded manually from"
173 - einfo "http://support.amd.com/en-us/download/desktop?os=Linux%20x86_64"
174 - einfo "and ${XVBA_SDK_URI}"
175 -}
176 -
177 -pkg_pretend() {
178 - local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR"
179 - use amd64 && CONFIG_CHECK+=" COMPAT"
180 -
181 - local ERROR_MTRR="CONFIG_MTRR required for direct rendering."
182 - local ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct
183 - rendering to work."
184 - local ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire
185 - as GPL-only. This prevents ${P} from compiling with an error like this:
186 - FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'"
187 - local ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause
188 - kernel to reject loading the fglrx module with
189 - \"ERROR: could not insert 'fglrx': Exec format error.\"
190 - You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead."
191 - local ERROR_BKL="CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38."
192 -
193 - # workaround until bug 365543 is solved
194 - if use modules; then
195 - linux-info_pkg_setup
196 - require_configured_kernel
197 - kernel_is ge 2 6 37 && kernel_is le 2 6 38 && CONFIG_CHECK+=" BKL"
198 - check_extra_config
199 - if ! linux_chkconfig_present AGP && \
200 - ! linux_chkconfig_present PCIEPORTBUS; then
201 - ewarn "You don't have AGP and/or PCIe support enabled in the kernel"
202 - ewarn "Direct rendering will not work."
203 - fi
204 - fi
205 -
206 - if ! has XT ${PAX_MARKINGS} && use pax_kernel; then
207 - ewarn "You have disabled xattr pax markings for portage."
208 - ewarn "This will likely cause programs using ati-drivers provided"
209 - ewarn "libraries to be killed kernel."
210 - fi
211 -}
212 -
213 -pkg_setup() {
214 - if use modules; then
215 - MODULE_NAMES="fglrx(video:${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod/2.6.x)"
216 - BUILD_TARGETS="kmod_build"
217 - linux-mod_pkg_setup
218 - BUILD_PARAMS="GCC_VER_MAJ=$(gcc-major-version) KVER=${KV_FULL} KDIR=${KV_OUT_DIR}"
219 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=\"-DMODULE -DATI -DFGL\""
220 - if grep -q arch_compat_alloc_user_space ${KV_DIR}/arch/x86/include/asm/compat.h ; then
221 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
222 - else
223 - BUILD_PARAMS="${BUILD_PARAMS} CFLAGS_MODULE+=-DCOMPAT_ALLOC_USER_SPACE=compat_alloc_user_space"
224 - fi
225 - fi
226 - # Define module dir.
227 - MODULE_DIR="${S}/${FOLDER_PREFIX}/lib/modules/fglrx/build_mod"
228 - # get the xorg-server version and set BASE_DIR for that
229 - BASE_DIR="${S}/xpic"
230 -
231 - # amd64/x86
232 - if use amd64 ; then
233 - MY_BASE_DIR="${BASE_DIR}_64a"
234 - PKG_LIBDIR=lib64
235 - ARCH_DIR="${S}/arch/x86_64"
236 - else
237 - MY_BASE_DIR="${BASE_DIR}"
238 - PKG_LIBDIR=lib
239 - ARCH_DIR="${S}/arch/x86"
240 - fi
241 -
242 - elog
243 - elog "Please note that this driver only supports graphic cards based on"
244 - elog "Evergreen chipset and newer."
245 - elog "This includes the AMD Radeon HD 5400+ series at this moment."
246 - elog
247 - elog "If your card is older then use ${CATEGORY}/xf86-video-ati"
248 - elog "For migration informations please refer to:"
249 - elog "https://www.gentoo.org/proj/en/desktop/x/x11/ati-migration-guide.xml"
250 - einfo
251 -}
252 -
253 -src_unpack() {
254 - local DRIVERS_DISTFILE XVBA_SDK_DISTFILE
255 - DRIVERS_DISTFILE=${DRIVERS_URI##*/}
256 - XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/}
257 -
258 - if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then
259 - unpack ${DRIVERS_DISTFILE}
260 - mkdir -p common
261 - mv etc lib usr common || die "Assumed to find etc lib and usr for common"
262 - else
263 - #please note, RUN may be insanely assigned at top near SRC_URI
264 - if [[ ${DRIVERS_DISTFILE} =~ .*\.zip ]]; then
265 - unpack ${DRIVERS_DISTFILE}
266 - [[ -z "$RUN" ]] && RUN="${S}/${DRIVERS_DISTFILE/%.zip/.run}"
267 - else
268 - RUN="${DISTDIR}/${DRIVERS_DISTFILE}"
269 - fi
270 - sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die
271 - fi
272 -
273 - mkdir xvba_sdk
274 - cd xvba_sdk
275 - unpack ${XVBA_SDK_DISTFILE}
276 -
277 - mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed"
278 - cd "${WORKDIR}/extra"
279 - tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz"
280 -}
281 -
282 -src_prepare() {
283 - if use modules; then
284 - if use debug; then
285 - sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \
286 - "${MODULE_DIR}/firegl_public.c" \
287 - || die "Failed to enable debug output."
288 - fi
289 - fi
290 -
291 - # These are the userspace utilities that we also have source for.
292 - # We rebuild these later.
293 - rm \
294 - "${ARCH_DIR}"/usr/X11R6/bin/fgl_glxgears \
295 - || die "bin rm failed"
296 -
297 - # in this version amdcccle isn't static, thus we depend on qt4
298 - use qt4 || rm "${ARCH_DIR}"/usr/X11R6/bin/amdcccle
299 -
300 - # ACPI fixups
301 - sed -i \
302 - -e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \
303 - -e "s:/var/lib/gdm/:/var/gdm/:" \
304 - "${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \
305 - || die "ACPI fixups failed."
306 -
307 - # Since "who" is in coreutils, we're using that one instead of "finger".
308 - sed -i -e 's:finger:who:' \
309 - "${S}/${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi/ati-powermode.sh" \
310 - || die "Replacing 'finger' with 'who' failed."
311 - # Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and
312 - # add function to detect default state.
313 - epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch
314 -
315 - # see http://ati.cchtml.com/show_bug.cgi?id=495
316 - #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch
317 - # first hunk applied upstream second (x32 related) was not
318 - epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch
319 -
320 - # compile fix for AGP-less kernel, bug #435322
321 - epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
322 -
323 - epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch"
324 -
325 - # Fix #483400
326 - epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch"
327 -
328 - # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
329 - use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
330 -
331 - # Compile fix, #526602
332 - epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
333 -
334 - epatch_user
335 -
336 - cd "${MODULE_DIR}"
337 -
338 - # bugged fglrx build system, this file should be copied by hand
339 - cp ${ARCH_DIR}/lib/modules/fglrx/build_mod/libfglrx_ip.a 2.6.x
340 -
341 - convert_to_m 2.6.x/Makefile || die "convert_to_m failed"
342 -
343 - # When built with ati's make.sh it defines a bunch of macros if
344 - # certain .config values are set, falling back to less reliable
345 - # detection methods if linux/autoconf.h is not available. We
346 - # simply use the linux/autoconf.h settings directly, bypassing the
347 - # detection script.
348 - sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed"
349 - sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \
350 - || die "MODVERSIONS sed failed"
351 -}
352 -
353 -src_compile() {
354 - use modules && linux-mod_src_compile
355 -
356 - ebegin "Building fgl_glxgears"
357 - cd "${S}"/extra/fgl_glxgears
358 - # These extra libs/utils either have an Imakefile that does not
359 - # work very well without tweaking or a Makefile ignoring CFLAGS
360 - # and the like. We bypass those.
361 - # The -DUSE_GLU is needed to compile using nvidia headers
362 - # according to a comment in ati-drivers-extra-8.33.6.ebuild.
363 - "$(tc-getCC)" -o fgl_glxgears ${CFLAGS} ${LDFLAGS} -DUSE_GLU \
364 - -I"${S}"/${FOLDER_PREFIX}usr/include fgl_glxgears.c \
365 - -lGL -lGLU -lX11 -lm || die "fgl_glxgears build failed"
366 - eend $?
367 -}
368 -
369 -src_install() {
370 - use modules && linux-mod_src_install
371 -
372 - # We can do two things here, and neither of them is very nice.
373 -
374 - # For direct rendering libGL has to be able to load one or more
375 - # dri modules (files ending in _dri.so, like fglrx_dri.so).
376 - # Gentoo's mesa looks for these files in the location specified by
377 - # LIBGL_DRIVERS_PATH or LIBGL_DRIVERS_DIR, then in the hardcoded
378 - # location /usr/$(get_libdir)/dri. Ati's libGL does the same
379 - # thing, but the hardcoded location is /usr/X11R6/lib/modules/dri
380 - # on x86 and amd64 32bit, /usr/X11R6/lib64/modules/dri on amd64
381 - # 64bit. So we can either put the .so files in that (unusual,
382 - # compared to "normal" mesa libGL) location or set
383 - # LIBGL_DRIVERS_PATH. We currently do the latter. See also bug
384 - # 101539.
385 -
386 - # The problem with this approach is that LIBGL_DRIVERS_PATH
387 - # *overrides* the default hardcoded location, it does not extend
388 - # it. So if ati-drivers is merged but a non-ati libGL is selected
389 - # and its hardcoded path does not match our LIBGL_DRIVERS_PATH
390 - # (because it changed in a newer mesa or because it was compiled
391 - # for a different set of multilib abis than we are) stuff breaks.
392 -
393 - # We create one file per ABI to work with "native" multilib, see
394 - # below.
395 -
396 - echo "COLON_SEPARATED=LIBGL_DRIVERS_PATH" > "${T}/03ati-colon-sep"
397 - doenvd "${T}/03ati-colon-sep" || die
398 -
399 - # All libraries that we have a 32 bit and 64 bit version of on
400 - # amd64 are installed in src_install-libs. Everything else
401 - # (including libraries only available in native 64bit on amd64)
402 - # goes in here.
403 - multilib_foreach_abi src_install-libs
404 -
405 - # This is sorted by the order the files occur in the source tree.
406 -
407 - # X modules.
408 - exeinto /usr/$(get_libdir)/xorg/modules/drivers
409 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so
410 - exeinto /usr/$(get_libdir)/xorg/modules/linux
411 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/linux/libfglrxdrm.so
412 - exeinto /usr/$(get_libdir)/xorg/modules
413 - doexe "${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/{glesx.so,amdxmm.so}
414 -
415 - #516816
416 - if use gdm-hack; then
417 - 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"
418 - fi
419 -
420 - # Arch-specific files.
421 - # (s)bin.
422 - into /opt
423 - dosbin "${ARCH_DIR}"/usr/sbin/atieventsd
424 - use qt4 && dosbin "${ARCH_DIR}"/usr/sbin/amdnotifyui
425 - dobin "${ARCH_DIR}"/usr/bin/clinfo
426 - # We cleaned out the compilable stuff in src_unpack
427 - dobin "${ARCH_DIR}"/usr/X11R6/bin/*
428 -
429 - # Common files.
430 - # etc.
431 - insinto /etc/ati
432 - exeinto /etc/ati
433 - # Everything except for the authatieventsd.sh script.
434 - doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default}
435 - doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh
436 -
437 - # include.
438 - insinto /usr
439 - doins -r ${FOLDER_PREFIX}usr/include
440 - insinto /usr/include/X11/extensions
441 -
442 - # Just the atigetsysteminfo.sh script.
443 - into /usr
444 - dosbin ${FOLDER_PREFIX}usr/sbin/*
445 -
446 - # data files for the control panel.
447 - if use qt4 ; then
448 - insinto /usr/share
449 - doins -r ${FOLDER_PREFIX}usr/share/ati
450 - insinto /usr/share/pixmaps
451 - doins ${FOLDER_PREFIX}usr/share/icons/ccc_large.xpm
452 - make_desktop_entry amdcccle 'AMD Catalyst Control Center' \
453 - ccc_large System
454 - fi
455 -
456 - # doc.
457 - dohtml -r ${FOLDER_PREFIX}usr/share/doc/fglrx
458 -
459 - doman ${FOLDER_PREFIX}usr/share/man/man8/atieventsd.8
460 -
461 - pushd ${FOLDER_PREFIX}usr/share/doc/fglrx/examples/etc/acpi > /dev/null
462 -
463 - exeinto /etc/acpi
464 - doexe ati-powermode.sh
465 - insinto /etc/acpi/events
466 - doins events/*
467 -
468 - popd > /dev/null
469 -
470 - # Done with the "source" tree. Install tools we rebuilt:
471 - dobin extra/fgl_glxgears/fgl_glxgears
472 - newdoc extra/fgl_glxgears/README README.fgl_glxgears
473 -
474 - # Gentoo-specific stuff:
475 - newinitd "${FILESDIR}"/atieventsd.init atieventsd
476 - echo 'ATIEVENTSDOPTS=""' > "${T}"/atieventsd.conf
477 - newconfd "${T}"/atieventsd.conf atieventsd
478 - systemd_dounit "${FILESDIR}/atieventsd.service"
479 -
480 - # PowerXpress stuff
481 - exeinto /usr/$(get_libdir)/fglrx
482 - doexe "${FILESDIR}"/switchlibGL || die "doexe switchlibGL failed"
483 - cp "${FILESDIR}"/switchlibGL "${T}"/switchlibglx
484 - doexe "${T}"/switchlibglx || die "doexe switchlibglx failed"
485 -
486 - #516816
487 - use gdm-hack && Xorg -version > "${D}/etc/ati/xvrn" 2>&1
488 -}
489 -
490 -src_install-libs() {
491 - if [[ "${ABI}" == "amd64" ]]; then
492 - local EX_BASE_DIR="${BASE_DIR}_64a"
493 - local pkglibdir=lib64
494 - local MY_ARCH_DIR="${S}/arch/x86_64"
495 - local oclsuffix=64
496 - else
497 - local EX_BASE_DIR="${BASE_DIR}"
498 - local pkglibdir=lib
499 - local MY_ARCH_DIR="${S}/arch/x86"
500 - local oclsuffix=32
501 - fi
502 - einfo "ati tree '${pkglibdir}' -> '$(get_libdir)' on system"
503 -
504 - local ATI_ROOT=/usr/$(get_libdir)/opengl/ati
505 - # To make sure we do not miss a spot when these change.
506 - local libmajor=1 libminor=2
507 - local libver=${libmajor}.${libminor}
508 -
509 - # The GLX libraries
510 - # (yes, this really is "lib" even on amd64/multilib --marienz)
511 - exeinto ${ATI_ROOT}/lib
512 - newexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/fglrx/fglrx-libGL.so.${libver} \
513 - libGL.so.${libver}
514 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so.${libmajor}
515 - dosym libGL.so.${libver} ${ATI_ROOT}/lib/libGL.so
516 -
517 - if multilib_is_native_abi; then
518 - exeinto ${ATI_ROOT}/extensions
519 - doexe "${EX_BASE_DIR}"/usr/X11R6/${pkglibdir}/modules/extensions/fglrx/fglrx-libglx.so
520 - mv "${D}"/${ATI_ROOT}/extensions/{fglrx-,}libglx.so
521 -
522 - #516816
523 - if use gdm-hack; then
524 - sed -i 's#/proc/%i/fd/0#/etc/ati/xvrn#g' "${D}/${ATI_ROOT}/extensions/libglx.so" || die "Applying gdm-hack failed"
525 - fi
526 - fi
527 -
528 - # other libs
529 - exeinto /usr/$(get_libdir)
530 - # Everything except for the libGL.so installed some row above
531 - doexe $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
532 - -maxdepth 1 -type f -name '*.so*' -not -name '*libGL.so*')
533 - insinto /usr/$(get_libdir)
534 - doins $(find "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir} \
535 - -maxdepth 1 -type f -not -name '*.so*')
536 -
537 - # DRI modules, installed into the path used by recent versions of mesa.
538 - exeinto /usr/$(get_libdir)/dri
539 - doexe "${MY_ARCH_DIR}"/usr/X11R6/${pkglibdir}/modules/dri/fglrx_dri.so
540 -
541 - # AMD Cal and OpenCL libraries
542 - exeinto /usr/$(get_libdir)/OpenCL/vendors/amd
543 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libamdocl*.so*
544 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libOpenCL*.so*
545 - dosym libOpenCL.so.${libmajor} /usr/$(get_libdir)/OpenCL/vendors/amd/libOpenCL.so
546 - exeinto /usr/$(get_libdir)
547 - doexe "${MY_ARCH_DIR}"/usr/${pkglibdir}/libati*.so*
548 -
549 - # OpenCL vendor files
550 - insinto /etc/OpenCL/vendors/
551 - cat > "${T}"/amdocl${oclsuffix}.icd <<-EOF
552 - /usr/$(get_libdir)/OpenCL/vendors/amd/libamdocl${oclsuffix}.so
553 - EOF
554 - doins "${T}"/amdocl${oclsuffix}.icd
555 -
556 - local envname="${T}"/04ati-dri-path
557 - if [[ -n ${ABI} ]]; then
558 - envname="${envname}-${ABI}"
559 - fi
560 - echo "LIBGL_DRIVERS_PATH=/usr/$(get_libdir)/dri" > "${envname}"
561 - doenvd "${envname}"
562 -
563 - # Silence the QA notice by creating missing soname symlinks
564 - for so in $(find "${D}"/usr/$(get_libdir) -maxdepth 1 -name *.so.[0-9].[0-9])
565 - do
566 - local soname=${so##*/}
567 - local soname_one=${soname%.[0-9]}
568 - local soname_zero=${soname_one%.[0-9]}
569 - dosym ${soname} /usr/$(get_libdir)/${soname_one}
570 - dosym ${soname_one} /usr/$(get_libdir)/${soname_zero}
571 - done
572 -
573 - # See https://bugs.gentoo.org/show_bug.cgi?id=443466
574 - dodir /etc/revdep-rebuild/
575 - echo "SEARCH_DIRS_MASK=\"/opt/bin/clinfo\"" > "${ED}/etc/revdep-rebuild/62-ati-drivers"
576 -
577 - #remove static libs if not wanted
578 - use static-libs || rm -rf "${D}"/usr/$(get_libdir)/libfglrx_dm.a
579 -
580 - #install xvba sdk headers
581 - doheader xvba_sdk/include/amdxvba.h
582 -
583 - # VA-API internal wrapper
584 - dosym /usr/$(get_libdir)/libXvBAW.so.1.0 /usr/$(get_libdir)/va/drivers/fglrx_drv_video.so
585 -
586 - if use pax_kernel; then
587 - pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed"
588 - fi
589 -}
590 -
591 -pkg_postinst() {
592 - elog "To switch to AMD OpenGL, run \"eselect opengl set ati\""
593 - elog "To change your xorg.conf you can use the bundled \"aticonfig\""
594 - elog
595 - elog "If you experience unexplained segmentation faults and kernel crashes"
596 - elog "with this driver and multi-threaded applications such as wine,"
597 - elog "set UseFastTLS in xorg.conf to either 0 or 1, but not 2."
598 - elog
599 - elog "Fully rebooting the system after an ${PN} update is recommended"
600 - elog "Stopping Xorg, reloading fglrx kernel module and restart Xorg"
601 - elog "might not work"
602 - elog
603 -
604 - use modules && linux-mod_pkg_postinst
605 - "${ROOT}"/usr/bin/eselect opengl set --use-old ati
606 - "${ROOT}"/usr/bin/eselect opencl set --use-old amd
607 -
608 - if has_version "x11-drivers/xf86-video-intel[sna]"; then
609 - ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server"
610 - ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience"
611 - ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or"
612 - ewarn "try disabling sna for xf86-video-intel."
613 - ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000"
614 - fi
615 -
616 - if use pax_kernel; then
617 - ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and"
618 - ewarn "after you have run \"eselect opengl set ati\". Executacle"
619 - ewarn "revdep-pax is part of package sys-apps/elfix."
620 - fi
621 -}
622 -
623 -pkg_preinst() {
624 - use modules && linux-mod_pkg_preinst
625 -}
626 -
627 -pkg_prerm() {
628 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
629 -}
630 -
631 -pkg_postrm() {
632 - use modules && linux-mod_pkg_postrm
633 - "${ROOT}"/usr/bin/eselect opengl set --use-old xorg-x11
634 -}
635
636 diff --git a/x11-drivers/ati-drivers/files/fix-the-linux-3.17-no_hotplug-error.patch b/x11-drivers/ati-drivers/files/fix-the-linux-3.17-no_hotplug-error.patch
637 deleted file mode 100644
638 index a8b5462..0000000
639 --- a/x11-drivers/ati-drivers/files/fix-the-linux-3.17-no_hotplug-error.patch
640 +++ /dev/null
641 @@ -1,18 +0,0 @@
642 ---- common/lib/modules/fglrx/build_mod/kcl_acpi.c.orig 2014-07-11 11:46:19.000000000 +0200
643 -+++ common/lib/modules/fglrx/build_mod/kcl_acpi.c 2014-10-08 15:12:55.535638391 +0200
644 -@@ -829,6 +829,7 @@
645 -
646 - static acpi_status KCL_ACPI_Slot_No_Hotplug(KCL_ACPI_DevHandle handle, u32 lvl, void *data, void **rv)
647 - {
648 -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
649 - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,7)
650 - struct acpi_device *tdev;
651 - struct pci_dev *pdev = (struct pci_dev *)data;
652 -@@ -844,6 +845,7 @@
653 - }
654 - }
655 - #endif
656 -+#endif
657 - return 0;
658 - }
659 -