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