summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2013-02-12 04:40:01 +0000
committerMike Frysinger <vapier@gentoo.org>2013-02-12 04:40:01 +0000
commit12ab191c0506cd7d47c97915733e7e638b2b6f8c (patch)
tree23299b5a30494d2339443c6ddaf542d152325d9b /x11-drivers
parentRemove .la files (bug #456164, thanks to Paolo Pedroni). (diff)
downloadgentoo-2-12ab191c0506cd7d47c97915733e7e638b2b6f8c.tar.gz
gentoo-2-12ab191c0506cd7d47c97915733e7e638b2b6f8c.tar.bz2
gentoo-2-12ab191c0506cd7d47c97915733e7e638b2b6f8c.zip
Fix building with kernels that split obj & src dirs. Fix building against linux-3.7+ #447566 by Martin Väth.
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key FB7C4156)
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/nvidia-drivers/ChangeLog8
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-builddir-config.patch42
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-linux-3.7+.patch24
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild5
4 files changed, 77 insertions, 2 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog
index ed6031d79df5..426abfc155e8 100644
--- a/x11-drivers/nvidia-drivers/ChangeLog
+++ b/x11-drivers/nvidia-drivers/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-drivers/nvidia-drivers
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.418 2013/01/20 10:09:13 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.419 2013/02/12 04:40:01 vapier Exp $
+
+ 12 Feb 2013; Mike Frysinger <vapier@gentoo.org>
+ +files/nvidia-drivers-313.18-builddir-config.patch,
+ +files/nvidia-drivers-313.18-linux-3.7+.patch, nvidia-drivers-313.18.ebuild:
+ Fix building with kernels that split obj & src dirs. Fix building against
+ linux-3.7+ #447566 by Martin Väth.
20 Jan 2013; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Cleanup due retirement, bug #35242
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-builddir-config.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-builddir-config.patch
new file mode 100644
index 000000000000..65c6f67154b1
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-builddir-config.patch
@@ -0,0 +1,42 @@
+the .config file is found in the output dir, not the source dir.
+search for it in the right place to fix kernels that are built
+via standard out-of-tree methods (KBUILD_OUTPUT).
+
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -63,7 +63,7 @@ test_xen() {
+ XEN_PRESENT=0
+ fi
+ else
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+ if [ -f $CONFIG ]; then
+ if [ -z "$(grep "^CONFIG_XEN=y" $CONFIG)" ]; then
+ XEN_PRESENT="0"
+@@ -1688,7 +1688,7 @@ case "$6" in
+ rm -f conftest.h
+ else
+ MAKEFILE=$HEADERS/../Makefile
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+
+ if [ -f $MAKEFILE -a -f $CONFIG ]; then
+ #
+@@ -1857,7 +1857,7 @@ case "$6" in
+ rm -f conftest$$.c conftest$$.o
+ rm -f conftest.h
+ else
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+ if [ -f $CONFIG ]; then
+ if [ -z "$(grep "^CONFIG_FB_RIVA=y" $CONFIG)" ]; then
+ RET=0
+@@ -1923,7 +1923,7 @@ case "$6" in
+ rm -f conftest$$.c conftest$$.o
+ rm -f conftest.h
+ else
+- CONFIG=$HEADERS/../.config
++ CONFIG=$OUTPUT/.config
+ if [ -f $CONFIG ]; then
+ if [ -z "$(grep "^CONFIG_FB_NVIDIA=y" $CONFIG)" ]; then
+ RET=0
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-linux-3.7+.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-linux-3.7+.patch
new file mode 100644
index 000000000000..024ca348121c
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-313.18-linux-3.7+.patch
@@ -0,0 +1,24 @@
+the nvidia drivers are trying to test for version 2.6.6, but fail to take into
+account the first digit. so 3.7.0+ ends up failing the test.
+
+https://bugs.gentoo.org/447566
+
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -1697,13 +1697,15 @@
+ # kernel older than 2.6.6, that's all we require to
+ # build the module.
+ #
++ VERSION=$(grep "^VERSION =" $MAKEFILE | cut -d " " -f 3)
+ PATCHLEVEL=$(grep "^PATCHLEVEL =" $MAKEFILE | cut -d " " -f 3)
+ SUBLEVEL=$(grep "^SUBLEVEL =" $MAKEFILE | cut -d " " -f 3)
+
+- if [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
++ if [ -n "$VERSION" -a $VERSION -ge 3 ] || \
++ [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
+ -a -n "$SUBLEVEL" -a $SUBLEVEL -le 5 ]; then
+ SELECTED_MAKEFILE=Makefile.kbuild
+ RET=0
+ fi
+ fi
+ fi
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild
index 3dc5972c058e..0fb04da3154c 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild,v 1.2 2013/01/17 18:29:22 cardoe Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-313.18.ebuild,v 1.3 2013/02/12 04:40:01 vapier Exp $
EAPI=5
@@ -147,6 +147,9 @@ src_prepare() {
epatch "${FILESDIR}"/nvidia-drivers-pax-usercopy.patch
fi
+ epatch "${FILESDIR}"/${PN}-313.18-builddir-config.patch
+ epatch "${FILESDIR}"/${PN}-313.18-linux-3.7+.patch #447566
+
# Allow user patches so they can support RC kernels and whatever else
epatch_user
}