1 |
commit: efcab2281cb6950279008b79bce808bdc8358083 |
2 |
Author: Emil Karlson <jekarlson <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Feb 27 05:30:03 2014 +0000 |
4 |
Commit: Emil Karlson <jekarlson <AT> gmail <DOT> com> |
5 |
CommitDate: Thu Feb 27 05:30:03 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=efcab228 |
7 |
|
8 |
x11-drivers/ati-drivers: version bump |
9 |
|
10 |
new prestripped files noted to silence QA |
11 |
|
12 |
--- |
13 |
...e897-r1.ebuild => ati-drivers-14.2_beta.ebuild} | 260 +++++++++------------ |
14 |
1 file changed, 114 insertions(+), 146 deletions(-) |
15 |
|
16 |
diff --git a/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897-r1.ebuild b/x11-drivers/ati-drivers/ati-drivers-14.2_beta.ebuild |
17 |
similarity index 74% |
18 |
rename from x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897-r1.ebuild |
19 |
rename to x11-drivers/ati-drivers/ati-drivers-14.2_beta.ebuild |
20 |
index 02e33b7..331c28d 100644 |
21 |
--- a/x11-drivers/ati-drivers/ati-drivers-12.6_beta_pre897-r1.ebuild |
22 |
+++ b/x11-drivers/ati-drivers/ati-drivers-14.2_beta.ebuild |
23 |
@@ -4,26 +4,27 @@ |
24 |
|
25 |
EAPI=5 |
26 |
|
27 |
-inherit eutils multilib linux-info linux-mod toolchain-funcs versionator |
28 |
+inherit eutils multilib linux-info linux-mod toolchain-funcs versionator pax-utils |
29 |
|
30 |
-DESCRIPTION="Ati precompiled drivers for radeon r600 (HD Series) and newer chipsets" |
31 |
+DESCRIPTION="Ati precompiled drivers for Radeon Evergreen (HD5000 Series) and newer chipsets" |
32 |
HOMEPAGE="http://www.amd.com" |
33 |
-MY_V=( $(get_version_components) ) |
34 |
-#RUN="${WORKDIR}/amd-driver-installer-9.00-x86.x86_64.run" |
35 |
-DRIVERS_URI="http://www2.ati.com/drivers/legacy/amd-driver-installer-12.6-legacy-x86.x86_64.zip" |
36 |
+RUN="${WORKDIR}/amd-driver-installer-13.35.1005-x86.x86_64.run" |
37 |
+SLOT="1" |
38 |
+# Uses javascript for download YESSSS |
39 |
+#DRIVERS_URI="http://www2.ati.com/drivers/linux/amd-catalyst-13.12-linux-x86.x86_64.zip" |
40 |
+DRIVERS_URI="http://dev.gentooexperimental.org/~scarabeus/amd-catalyst-14.2-betav1.3-linux-x86.x86_64.zip" |
41 |
XVBA_SDK_URI="http://developer.amd.com/wordpress/media/2012/10/xvba-sdk-0.74-404001.tar.gz" |
42 |
SRC_URI="${DRIVERS_URI} ${XVBA_SDK_URI}" |
43 |
FOLDER_PREFIX="common/" |
44 |
-IUSE="debug +modules multilib qt4 static-libs" |
45 |
+IUSE="debug +modules multilib qt4 static-libs pax_kernel" |
46 |
|
47 |
LICENSE="AMD GPL-2 QPL-1.0" |
48 |
-KEYWORDS="-* amd64 x86" |
49 |
-SLOT="legacy" |
50 |
+KEYWORDS="-* ~amd64 ~x86" |
51 |
|
52 |
-RESTRICT="bindist" |
53 |
+RESTRICT="bindist test" |
54 |
|
55 |
RDEPEND=" |
56 |
- <=x11-base/xorg-server-1.12.49[-minimal] |
57 |
+ <=x11-base/xorg-server-1.15.49[-minimal] |
58 |
>=app-admin/eselect-opengl-1.0.7 |
59 |
app-admin/eselect-opencl |
60 |
sys-power/acpid |
61 |
@@ -36,7 +37,16 @@ RDEPEND=" |
62 |
virtual/glu |
63 |
multilib? ( |
64 |
app-emulation/emul-linux-x86-opengl |
65 |
- app-emulation/emul-linux-x86-xlibs |
66 |
+ || ( |
67 |
+ ( |
68 |
+ x11-libs/libX11[abi_x86_32] |
69 |
+ x11-libs/libXext[abi_x86_32] |
70 |
+ x11-libs/libXinerama[abi_x86_32] |
71 |
+ x11-libs/libXrandr[abi_x86_32] |
72 |
+ x11-libs/libXrender[abi_x86_32] |
73 |
+ ) |
74 |
+ app-emulation/emul-linux-x86-xlibs |
75 |
+ ) |
76 |
) |
77 |
qt4? ( |
78 |
x11-libs/libICE |
79 |
@@ -48,6 +58,13 @@ RDEPEND=" |
80 |
dev-qt/qtgui:4[accessibility] |
81 |
) |
82 |
" |
83 |
+if [[ legacy != ${SLOT} ]]; then |
84 |
+ RDEPEND="${RDEPEND} |
85 |
+ !x11-drivers/ati-drivers:legacy" |
86 |
+else |
87 |
+ RDEPEND="${RDEPEND} |
88 |
+ !x11-drivers/ati-drivers:1" |
89 |
+fi |
90 |
|
91 |
DEPEND="${RDEPEND} |
92 |
x11-proto/inputproto |
93 |
@@ -93,6 +110,8 @@ QA_PRESTRIPPED=" |
94 |
usr/lib\(32\|64\)\?/libAMDXvBA.so.1.0 |
95 |
usr/lib\(32\|64\)\?/libaticaldd.so |
96 |
usr/lib\(32\|64\)\?/dri/fglrx_dri.so |
97 |
+ usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 |
98 |
+ usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libamdocl\(32\|64\).so |
99 |
" |
100 |
|
101 |
QA_SONAME=" |
102 |
@@ -133,104 +152,39 @@ QA_DT_HASH=" |
103 |
usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 |
104 |
" |
105 |
|
106 |
-_check_kernel_config() { |
107 |
- local failed=0 |
108 |
- local error="" |
109 |
- if ! kernel_is ge 2 6; then |
110 |
- eerror "You need a 2.6 linux kernel to compile against!" |
111 |
- die "No 2.6 Kernel found" |
112 |
- fi |
113 |
- |
114 |
- if ! linux_chkconfig_present MTRR; then |
115 |
- ewarn "You don't have MTRR support enabled in the kernel." |
116 |
- ewarn "Direct rendering will not work." |
117 |
- fi |
118 |
- |
119 |
- if linux_chkconfig_builtin DRM; then |
120 |
- ewarn "You have DRM support built in to the kernel" |
121 |
- ewarn "Direct rendering will not work." |
122 |
- fi |
123 |
- |
124 |
- if ! linux_chkconfig_present AGP && \ |
125 |
- ! linux_chkconfig_present PCIEPORTBUS; then |
126 |
- ewarn "You don't have AGP and/or PCIe support enabled in the kernel" |
127 |
- ewarn "Direct rendering will not work." |
128 |
- fi |
129 |
- |
130 |
- if ! linux_chkconfig_present ACPI; then |
131 |
- eerror "${P} requires the ACPI support in the kernel" |
132 |
- eerror "Please enable it:" |
133 |
- eerror " CONFIG_ACPI=y" |
134 |
- eerror "in /usr/src/linux/.config or" |
135 |
- eerror " Power management and ACPI options --->" |
136 |
- eerror " [*] Power Management support" |
137 |
- eerror "in the 'menuconfig'" |
138 |
- error+=" CONFIG_ACPI disabled;" |
139 |
- failed=1 |
140 |
- fi |
141 |
- |
142 |
- if ! linux_chkconfig_present PCI_MSI; then |
143 |
- eerror "${P} requires MSI in the kernel." |
144 |
- eerror "Please enable it:" |
145 |
- eerror " CONFIG_PCI_MSI=y" |
146 |
- eerror "in /usr/src/linux/.config or" |
147 |
- eerror " Bus options (PCI etc.) --->" |
148 |
- eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" |
149 |
- eerror "in the kernel config." |
150 |
- error+=" CONFIG_PCI_MSI disabled;" |
151 |
- failed=1 |
152 |
- fi |
153 |
- |
154 |
- if linux_chkconfig_present LOCKDEP; then |
155 |
- eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." |
156 |
- eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." |
157 |
- eerror "This prevents ${P} from compiling with an error like this:" |
158 |
- eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" |
159 |
- eerror "Please make sure the following options have been unset:" |
160 |
- eerror " Kernel hacking --->" |
161 |
- eerror " [ ] Lock debugging: detect incorrect freeing of live locks" |
162 |
- eerror " [ ] Lock debugging: prove locking correctness" |
163 |
- eerror " [ ] Lock usage statistics" |
164 |
- eerror "in 'menuconfig'" |
165 |
- error+=" LOCKDEP enabled;" |
166 |
- failed=1 |
167 |
- fi |
168 |
- |
169 |
- use amd64 && if ! linux_chkconfig_present COMPAT; then |
170 |
- eerror "${P} requires COMPAT." |
171 |
- eerror "Please enable the 32 bit emulation:" |
172 |
- eerror "Executable file formats / Emulations --->" |
173 |
- eerror " [*] IA32 Emulation" |
174 |
- eerror "in the kernel config." |
175 |
- eerror "if this doesn't enable CONFIG_COMPAT add" |
176 |
- eerror " CONFIG_COMPAT=y" |
177 |
- eerror "in /usr/src/linux/.config" |
178 |
- error+=" COMPAT disabled;" |
179 |
- failed=1 |
180 |
- fi |
181 |
- |
182 |
- kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then |
183 |
- eerror "${P} requires BKL." |
184 |
- eerror "Please enable the Big Kernel Lock:" |
185 |
- eerror "Kernel hacking --->" |
186 |
- eerror " [*] Big Kernel Lock" |
187 |
- eerror "in the kernel config." |
188 |
- eerror "or add" |
189 |
- eerror " CONFIG_BKL=y" |
190 |
- eerror "in /usr/src/linux/.config" |
191 |
- error+=" BKL disabled;" |
192 |
- failed=1 |
193 |
- fi |
194 |
- |
195 |
- [[ ${failed} -ne 0 ]] && die "${error}" |
196 |
-} |
197 |
- |
198 |
pkg_pretend() { |
199 |
+ local CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP !PAX_KERNEXEC_PLUGIN_METHOD_OR" |
200 |
+ use amd64 && CONFIG_CHECK+=" COMPAT" |
201 |
+ |
202 |
+ local ERROR_MTRR="CONFIG_MTRR required for direct rendering." |
203 |
+ local ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module and not loaded for direct |
204 |
+ rendering to work." |
205 |
+ local ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire |
206 |
+ as GPL-only. This prevents ${P} from compiling with an error like this: |
207 |
+ FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" |
208 |
+ local ERROR_PAX_KERNEXEC_PLUGIN_METHOD_OR="This config option will cause |
209 |
+ kernel to reject loading the fglrx module with |
210 |
+ \"ERROR: could not insert 'fglrx': Exec format error.\" |
211 |
+ You may want to try CONFIG_PAX_KERNEXEC_PLUGIN_METHOD_BTS instead." |
212 |
+ local ERROR_BKL="CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38." |
213 |
+ |
214 |
# workaround until bug 365543 is solved |
215 |
if use modules; then |
216 |
linux-info_pkg_setup |
217 |
require_configured_kernel |
218 |
- _check_kernel_config |
219 |
+ kernel_is ge 2 6 37 && kernel_is le 2 6 38 && CONFIG_CHECK+=" BKL" |
220 |
+ check_extra_config |
221 |
+ if ! linux_chkconfig_present AGP && \ |
222 |
+ ! linux_chkconfig_present PCIEPORTBUS; then |
223 |
+ ewarn "You don't have AGP and/or PCIe support enabled in the kernel" |
224 |
+ ewarn "Direct rendering will not work." |
225 |
+ fi |
226 |
+ fi |
227 |
+ |
228 |
+ if ! has XT ${PAX_MARKINGS} && use pax_kernel; then |
229 |
+ ewarn "You have disabled xattr pax markings for portage." |
230 |
+ ewarn "This will likely cause programs using ati-drivers provided" |
231 |
+ ewarn "libraries to be killed kernel." |
232 |
fi |
233 |
} |
234 |
|
235 |
@@ -264,20 +218,20 @@ pkg_setup() { |
236 |
fi |
237 |
|
238 |
elog |
239 |
- elog "Please note that this driver supports only graphic cards based on" |
240 |
- elog "r600 chipset and newer." |
241 |
- elog "This represent the AMD Radeon HD series at this moment." |
242 |
+ elog "Please note that this driver only supports graphic cards based on" |
243 |
+ elog "Evergreen chipset and newer." |
244 |
+ elog "This includes the AMD Radeon HD 5400+ series at this moment." |
245 |
elog |
246 |
elog "If your card is older then use ${CATEGORY}/xf86-video-ati" |
247 |
- elog "For migration informations please reffer to:" |
248 |
+ elog "For migration informations please refer to:" |
249 |
elog "http://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 |
+ DRIVERS_DISTFILE=${DRIVERS_URI##*/} |
258 |
+ XVBA_SDK_DISTFILE=${XVBA_SDK_URI##*/} |
259 |
|
260 |
if [[ ${DRIVERS_DISTFILE} =~ .*\.tar\.gz ]]; then |
261 |
unpack ${DRIVERS_DISTFILE} |
262 |
@@ -289,19 +243,20 @@ src_unpack() { |
263 |
else |
264 |
RUN="${DISTDIR}/${DRIVERS_DISTFILE}" |
265 |
fi |
266 |
- sh ${RUN} --extract "${S}" 2>&1 > /dev/null || die |
267 |
+ sh "${RUN}" --extract "${S}" 2>&1 > /dev/null || die |
268 |
fi |
269 |
|
270 |
mkdir xvba_sdk |
271 |
cd xvba_sdk |
272 |
unpack ${XVBA_SDK_DISTFILE} |
273 |
+ |
274 |
+ mkdir -p "${WORKDIR}/extra" || die "mkdir extra failed" |
275 |
+ cd "${WORKDIR}/extra" |
276 |
+ tar -xf "../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz" |
277 |
} |
278 |
|
279 |
src_prepare() { |
280 |
- # All kernel options for prepare are ment to be in here |
281 |
if use modules; then |
282 |
- # version patches |
283 |
- # epatch "${FILESDIR}"/kernel/${PV}-*.patch |
284 |
if use debug; then |
285 |
sed -i '/^#define DRM_DEBUG_CODE/s/0/1/' \ |
286 |
"${MODULE_DIR}/firegl_public.c" \ |
287 |
@@ -323,7 +278,7 @@ src_prepare() { |
288 |
-e "s:/var/lib/xdm/authdir/authfiles/:/var/run/xauth/:" \ |
289 |
-e "s:/var/lib/gdm/:/var/gdm/:" \ |
290 |
"${S}/${FOLDER_PREFIX}etc/ati/authatieventsd.sh" \ |
291 |
- || die "sed failed." |
292 |
+ || die "ACPI fixups failed." |
293 |
|
294 |
# Since "who" is in coreutils, we're using that one instead of "finger". |
295 |
sed -i -e 's:finger:who:' \ |
296 |
@@ -331,18 +286,34 @@ src_prepare() { |
297 |
|| die "Replacing 'finger' with 'who' failed." |
298 |
# Adjust paths in the script from /usr/X11R6/bin/ to /opt/bin/ and |
299 |
# add function to detect default state. |
300 |
- epatch "${FILESDIR}"/ati-powermode-opt-path-2.patch |
301 |
+ epatch "${FILESDIR}"/ati-powermode-opt-path-3.patch |
302 |
+ |
303 |
+ # see http://ati.cchtml.com/show_bug.cgi?id=495 |
304 |
+ #epatch "${FILESDIR}"/ati-drivers-old_rsp.patch |
305 |
+ # first hunk applied upstream second (x32 related) was not |
306 |
+ epatch "${FILESDIR}"/ati-drivers-x32_something_something.patch |
307 |
+ |
308 |
+ # compile fix for AGP-less kernel, bug #435322 |
309 |
+ epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch |
310 |
+ |
311 |
+ # Compile fix for kernel typesafe uid types #469160 |
312 |
+ epatch "${FILESDIR}/typesafe-kuid.diff" |
313 |
+ |
314 |
+ epatch "${FILESDIR}/ati-drivers-13.8-beta-include-seq_file.patch" |
315 |
+ |
316 |
+ epatch "${FILESDIR}/check-for-iommu-only-if-iommu-is-supported.patch" |
317 |
+ |
318 |
+ # Fix #483400 |
319 |
+ epatch "${FILESDIR}/fgl_glxgears-do-not-include-glATI.patch" |
320 |
|
321 |
- #fixes bug #420751 |
322 |
- epatch "${FILESDIR}"/ati-drivers-do_mmap.patch |
323 |
+ # Fix build on new kernels |
324 |
+ #epatch "${FILESDIR}/ati-drivers-13.12-acpi.patch" |
325 |
|
326 |
- # compile fix for linux-3.7 |
327 |
- # https://bugs.gentoo.org/show_bug.cgi?id=438516 |
328 |
- epatch "${FILESDIR}/ati-drivers-vm-reserverd.patch" |
329 |
+ # Add support for linux-3.13. See #498766 |
330 |
+ #epatch "${FILESDIR}/ati-drivers-linux-3.13-acpi-handle.patch" |
331 |
|
332 |
- # Use ACPI_DEVICE_HANDLE wrapper to make driver build on linux-3.8 |
333 |
- # see https://bugs.gentoo.org/show_bug.cgi?id=448216 |
334 |
- epatch "${FILESDIR}/ati-drivers-kernel-3.8-acpihandle.patch" |
335 |
+ # Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870 |
336 |
+ use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch" |
337 |
|
338 |
cd "${MODULE_DIR}" |
339 |
|
340 |
@@ -359,20 +330,6 @@ src_prepare() { |
341 |
sed -i -e 's/__SMP__/CONFIG_SMP/' *.c *h || die "SMP sed failed" |
342 |
sed -i -e 's/ifdef MODVERSIONS/ifdef CONFIG_MODVERSIONS/' *.c *.h \ |
343 |
|| die "MODVERSIONS sed failed" |
344 |
- cd "${S}" |
345 |
- |
346 |
- mkdir extra || die "mkdir failed" |
347 |
- cd extra |
348 |
- unpack ./../${FOLDER_PREFIX}usr/src/ati/fglrx_sample_source.tgz |
349 |
- |
350 |
- # Get rid of watermark. Oldest known reference: |
351 |
- # http://phoronix.com/forums/showthread.php?19875-Unsupported-Hardware-watermark |
352 |
- ebegin "Disabling watermark" |
353 |
- driver="${MY_BASE_DIR}"/usr/X11R6/${PKG_LIBDIR}/modules/drivers/fglrx_drv.so |
354 |
- for x in $(objdump -d ${driver}|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do |
355 |
- sed -i "s/${x}/\x90\x90\x90\x90\x90/g" ${driver} || break 1 |
356 |
- done |
357 |
- eend $? || die "Disabling watermark failed" |
358 |
} |
359 |
|
360 |
src_compile() { |
361 |
@@ -391,8 +348,6 @@ src_compile() { |
362 |
eend $? |
363 |
} |
364 |
|
365 |
-src_test() { :; } # no tests present |
366 |
- |
367 |
src_install() { |
368 |
use modules && linux-mod_src_install |
369 |
|
370 |
@@ -467,7 +422,7 @@ src_install() { |
371 |
insinto /etc/ati |
372 |
exeinto /etc/ati |
373 |
# Everything except for the authatieventsd.sh script. |
374 |
- doins ${FOLDER_PREFIX}etc/ati/{logo*,control,atiogl.xml,signature,amdpcsdb.default} |
375 |
+ doins ${FOLDER_PREFIX}etc/ati/{logo*,control,signature,amdpcsdb.default} |
376 |
doexe ${FOLDER_PREFIX}etc/ati/authatieventsd.sh |
377 |
|
378 |
# include. |
379 |
@@ -604,14 +559,13 @@ src_install-libs() { |
380 |
|
381 |
#install xvba sdk headers |
382 |
doheader xvba_sdk/include/amdxvba.h |
383 |
-} |
384 |
|
385 |
-pkg_postinst() { |
386 |
- if has_version ">=x11-base/xorg-server-1.11.99"; then |
387 |
- ewarn "Problems have been reported with this driver and xorg-server-1.12." |
388 |
- ewarn "Stay with xorg-server-1.11 if you experience hangs (bug #436252)." |
389 |
+ if use pax_kernel; then |
390 |
+ pax-mark m "${D}"/usr/lib*/opengl/ati/lib/libGL.so.1.2 || die "pax-mark failed" |
391 |
fi |
392 |
+} |
393 |
|
394 |
+pkg_postinst() { |
395 |
elog "To switch to AMD OpenGL, run \"eselect opengl set ati\"" |
396 |
elog "To change your xorg.conf you can use the bundled \"aticonfig\"" |
397 |
elog |
398 |
@@ -630,6 +584,20 @@ pkg_postinst() { |
399 |
use modules && linux-mod_pkg_postinst |
400 |
"${ROOT}"/usr/bin/eselect opengl set --use-old ati |
401 |
"${ROOT}"/usr/bin/eselect opencl set --use-old amd |
402 |
+ |
403 |
+ if has_version "x11-drivers/xf86-video-intel[sna]"; then |
404 |
+ ewarn "It is reported that xf86-video-intel built with USE=\"sna\" causes the X server" |
405 |
+ ewarn "to crash on systems that use hybrid AMD/Intel graphics. If you experience" |
406 |
+ ewarn "this crash, downgrade to xf86-video-intel-2.20.2 or earlier or" |
407 |
+ ewarn "try disabling sna for xf86-video-intel." |
408 |
+ ewarn "For details, see https://bugs.gentoo.org/show_bug.cgi?id=430000" |
409 |
+ fi |
410 |
+ |
411 |
+ if use pax_kernel; then |
412 |
+ ewarn "Please run \"revdep-pax -s libGL.so.1 -me\" after installation and" |
413 |
+ ewarn "after you have run \"eselect opengl set ati\". Executacle" |
414 |
+ ewarn "revdep-pax is part of package sys-apps/elfix." |
415 |
+ fi |
416 |
} |
417 |
|
418 |
pkg_preinst() { |