[arch-commits] Commit in nvidia/trunk (PKGBUILD linux-3.7.6.patch linux-3.7.patch)

Evangelos Foutras foutrelis at nymeria.archlinux.org
Wed Feb 20 09:12:05 UTC 2013


    Date: Wednesday, February 20, 2013 @ 10:12:05
  Author: foutrelis
Revision: 178324

Use more generic patch for building against Linux 3.7.6+.

Added:
  nvidia/trunk/linux-3.7.patch
Modified:
  nvidia/trunk/PKGBUILD
Deleted:
  nvidia/trunk/linux-3.7.6.patch

-------------------+
 PKGBUILD          |   16 +++++++---------
 linux-3.7.6.patch |   11 -----------
 linux-3.7.patch   |   24 ++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 20 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-02-20 08:58:09 UTC (rev 178323)
+++ PKGBUILD	2013-02-20 09:12:05 UTC (rev 178324)
@@ -14,21 +14,19 @@
 license=('custom')
 install=nvidia.install
 options=(!strip)
+source=("linux-3.7.patch")
+md5sums=('7c684fab691b15d55a79fd8f9b1a224d')
 
 if [ "$CARCH" = "i686" ]; then
     _arch='x86'
     _pkg="NVIDIA-Linux-${_arch}-${pkgver}"
-    source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run"
-            "linux-3.7.6.patch")
-    md5sums=('780c37c28a6e06e9571cafe348b7da64'
-             '2627107ebbd930389b00a9a2cd5e6f42')
+    source+=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
+    md5sums+=('780c37c28a6e06e9571cafe348b7da64')
 elif [ "$CARCH" = "x86_64" ]; then
     _arch='x86_64'
    _pkg="NVIDIA-Linux-${_arch}-${pkgver}-no-compat32"
-    source=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run"
-            "linux-3.7.6.patch")
-    md5sums=('fa17a260793a38b4b8ae367db2e03b39'
-             '2627107ebbd930389b00a9a2cd5e6f42')
+    source+=("ftp://download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
+    md5sums+=('fa17a260793a38b4b8ae367db2e03b39')
 fi
 
 build() {
@@ -36,7 +34,7 @@
     cd "${srcdir}"
     sh "${_pkg}.run" --extract-only
     cd "${_pkg}/kernel"
-    patch -Np3 -i "${srcdir}"/linux-3.7.6.patch
+    patch -Np3 -i "${srcdir}"/linux-3.7.patch
     make SYSSRC=/usr/lib/modules/"${_kernver}/build" module
 }
 

Deleted: linux-3.7.6.patch
===================================================================
--- linux-3.7.6.patch	2013-02-20 08:58:09 UTC (rev 178323)
+++ linux-3.7.6.patch	2013-02-20 09:12:05 UTC (rev 178324)
@@ -1,11 +0,0 @@
---- a/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh	2013-02-04 15:10:20.669633666 -0500
-+++ b/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh	2013-02-04 15:10:34.283334673 -0500
-@@ -1701,7 +1701,7 @@
-                 SUBLEVEL=$(grep "^SUBLEVEL =" $MAKEFILE | cut -d " " -f 3)
- 
-                 if [ -n "$PATCHLEVEL" -a $PATCHLEVEL -ge 6 \
--                        -a -n "$SUBLEVEL" -a $SUBLEVEL -le 5 ]; then
-+                        -a -n "$SUBLEVEL" -a $SUBLEVEL -le 6 ]; then
-                     SELECTED_MAKEFILE=Makefile.kbuild
-                     RET=0
-                 fi

Added: linux-3.7.patch
===================================================================
--- linux-3.7.patch	                        (rev 0)
+++ linux-3.7.patch	2013-02-20 09:12:05 UTC (rev 178324)
@@ -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/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh	2013-02-04 15:10:20.669633666 -0500
++++ b/NVIDIA-Linux-x86_64-313.18-no-compat32/kernel/conftest.sh	2013-02-04 15:10:34.283334673 -0500
+@@ -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




More information about the arch-commits mailing list