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