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