From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A27C313863A for ; Thu, 24 Jan 2013 00:41:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2AD8321C130; Thu, 24 Jan 2013 00:41:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7344B21C12F for ; Thu, 24 Jan 2013 00:41:02 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0D8F633DB6C for ; Thu, 24 Jan 2013 00:40:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C7164E4083 for ; Thu, 24 Jan 2013 00:40:53 +0000 (UTC) From: "Emil Karlson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Emil Karlson" Message-ID: <1358986166.8a04fe69fd1b3798ab931b0ac3d68df7fc080212.emil_karlson@gentoo> Subject: [gentoo-commits] proj/x11:master commit in: x11-drivers/ati-drivers/ X-VCS-Repository: proj/x11 X-VCS-Files: x11-drivers/ati-drivers/ati-drivers-13.1.ebuild X-VCS-Directories: x11-drivers/ati-drivers/ X-VCS-Committer: emil_karlson X-VCS-Committer-Name: Emil Karlson X-VCS-Revision: 8a04fe69fd1b3798ab931b0ac3d68df7fc080212 X-VCS-Branch: master Date: Thu, 24 Jan 2013 00:40:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 987ece11-a196-482a-8107-1706d26e4905 X-Archives-Hash: a67d0666023a99c3976315a204a951d7 commit: 8a04fe69fd1b3798ab931b0ac3d68df7fc080212 Author: Emil Karlson gmail com> AuthorDate: Thu Jan 24 00:09:26 2013 +0000 Commit: Emil Karlson gmail com> CommitDate: Thu Jan 24 00:09:26 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=8a04fe69 x11-drivers/ati-drivers simplify kernel config checks. Thanks to Alex Xu yahoo.ca> https://bugs.gentoo.org/show_bug.cgi?id=453192 --- x11-drivers/ati-drivers/ati-drivers-13.1.ebuild | 91 +++-------------------- 1 files changed, 10 insertions(+), 81 deletions(-) diff --git a/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild index 1bc147f..d3795d7 100644 --- a/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild +++ b/x11-drivers/ati-drivers/ati-drivers-13.1.ebuild @@ -133,96 +133,25 @@ QA_DT_HASH=" usr/lib\(32\|64\)\?/OpenCL/vendors/amd/libOpenCL.so.1 " -_check_kernel_config() { - local failed=0 - local error="" - if ! kernel_is ge 2 6; then - eerror "You need a 2.6 linux kernel to compile against!" - die "No 2.6 Kernel found" - fi - - if ! linux_chkconfig_present MTRR; then - ewarn "You don't have MTRR support enabled in the kernel." - ewarn "Direct rendering will not work." - fi - - if linux_chkconfig_builtin DRM; then - ewarn "You have DRM support built in to the kernel" - ewarn "Direct rendering will not work." - fi +CONFIG_CHECK="~MTRR ~!DRM ACPI PCI_MSI !LOCKDEP" +use amd64 && CONFIG_CHECK="${CONFIG_CHECK} COMPAT" +ERROR_MTRR="CONFIG_MTRR required for direct rendering." +ERROR_DRM="CONFIG_DRM must be disabled or compiled as a module for direct + rendering." +ERROR_LOCKDEP="CONFIG_LOCKDEP (lock tracking) exports the symbol lock_acquire + as GPL-only. This prevents ${P} from compiling with an error like this: + FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" +_check_kernel_config() { if ! linux_chkconfig_present AGP && \ ! linux_chkconfig_present PCIEPORTBUS; then ewarn "You don't have AGP and/or PCIe support enabled in the kernel" ewarn "Direct rendering will not work." fi - if ! linux_chkconfig_present ACPI; then - eerror "${P} requires the ACPI support in the kernel" - eerror "Please enable it:" - eerror " CONFIG_ACPI=y" - eerror "in /usr/src/linux/.config or" - eerror " Power management and ACPI options --->" - eerror " [*] Power Management support" - eerror "in the 'menuconfig'" - error+=" CONFIG_ACPI disabled;" - failed=1 - fi - - if ! linux_chkconfig_present PCI_MSI; then - eerror "${P} requires MSI in the kernel." - eerror "Please enable it:" - eerror " CONFIG_PCI_MSI=y" - eerror "in /usr/src/linux/.config or" - eerror " Bus options (PCI etc.) --->" - eerror " [*] Message Signaled Interrupts (MSI and MSI-X)" - eerror "in the kernel config." - error+=" CONFIG_PCI_MSI disabled;" - failed=1 - fi - - if linux_chkconfig_present LOCKDEP; then - eerror "You've enabled LOCKDEP -- lock tracking -- in the kernel." - eerror "Unfortunately, this option exports the symbol lock_acquire as GPL-only." - eerror "This prevents ${P} from compiling with an error like this:" - eerror "FATAL: modpost: GPL-incompatible module fglrx.ko uses GPL-only symbol 'lock_acquire'" - eerror "Please make sure the following options have been unset:" - eerror " Kernel hacking --->" - eerror " [ ] Lock debugging: detect incorrect freeing of live locks" - eerror " [ ] Lock debugging: prove locking correctness" - eerror " [ ] Lock usage statistics" - eerror "in 'menuconfig'" - error+=" LOCKDEP enabled;" - failed=1 - fi - - use amd64 && if ! linux_chkconfig_present COMPAT; then - eerror "${P} requires COMPAT." - eerror "Please enable the 32 bit emulation:" - eerror "Executable file formats / Emulations --->" - eerror " [*] IA32 Emulation" - eerror "in the kernel config." - eerror "if this doesn't enable CONFIG_COMPAT add" - eerror " CONFIG_COMPAT=y" - eerror "in /usr/src/linux/.config" - error+=" COMPAT disabled;" - failed=1 - fi - kernel_is ge 2 6 37 && kernel_is le 2 6 38 && if ! linux_chkconfig_present BKL ; then - eerror "${P} requires BKL." - eerror "Please enable the Big Kernel Lock:" - eerror "Kernel hacking --->" - eerror " [*] Big Kernel Lock" - eerror "in the kernel config." - eerror "or add" - eerror " CONFIG_BKL=y" - eerror "in /usr/src/linux/.config" - error+=" BKL disabled;" - failed=1 + die "CONFIG_BKL must be enabled for kernels 2.6.37-2.6.38." fi - - [[ ${failed} -ne 0 ]] && die "${error}" } pkg_pretend() {