summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2004-02-06 19:27:52 +0000
committerMartin Schlemmer <azarah@gentoo.org>2004-02-06 19:27:52 +0000
commit5bf5c9e5f6256a49c8fe31a1e302dc162e3034fe (patch)
treeea6f4d9afdc78335022b4497e709d98dd2f2f95a
parentslang is crap (diff)
downloadgentoo-2-5bf5c9e5f6256a49c8fe31a1e302dc162e3034fe.tar.gz
gentoo-2-5bf5c9e5f6256a49c8fe31a1e302dc162e3034fe.tar.bz2
gentoo-2-5bf5c9e5f6256a49c8fe31a1e302dc162e3034fe.zip
Fix class_simple patch to actually not compile in sysfs support if
class_simple support is missing, bug #40107. Add sed to fix version of module build. Fix Makefile to actually honour KERNDIR.
-rw-r--r--media-video/nvidia-kernel/ChangeLog9
-rw-r--r--media-video/nvidia-kernel/files/1.0.5336/Makefile10
-rw-r--r--media-video/nvidia-kernel/files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch15
-rw-r--r--media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild5
4 files changed, 24 insertions, 15 deletions
diff --git a/media-video/nvidia-kernel/ChangeLog b/media-video/nvidia-kernel/ChangeLog
index 72209e236274..09a4c222dc3e 100644
--- a/media-video/nvidia-kernel/ChangeLog
+++ b/media-video/nvidia-kernel/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-video/nvidia-kernel
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.62 2004/02/01 17:16:29 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.63 2004/02/06 19:27:52 azarah Exp $
+
+ 06 Feb 2004; Martin Schlemmer <azarah@gentoo.org>
+ nvidia-kernel-1.0.5336-r1.ebuild, files/1.0.5336/Makefile,
+ files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch:
+ Fix class_simple patch to actually not compile in sysfs support if
+ class_simple support is missing, bug #40107. Add sed to fix version of module
+ build. Fix Makefile to actually honour KERNDIR.
01 Feb 2004; Donnie Berkholz <spyderous@gentoo.org>;
nvidia-kernel-1.0.5336-r1.ebuild:
diff --git a/media-video/nvidia-kernel/files/1.0.5336/Makefile b/media-video/nvidia-kernel/files/1.0.5336/Makefile
index e120c77ff2cd..8d37a89022f0 100644
--- a/media-video/nvidia-kernel/files/1.0.5336/Makefile
+++ b/media-video/nvidia-kernel/files/1.0.5336/Makefile
@@ -2,7 +2,7 @@
# Generated on 'builder3.nvidia.com' on Thu Jun 19 04:05:35 PDT 2003
LINUX_MODULE=nv-linux.o
-DEFINES=-D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DKBUILD_MODNAME="nvidia" -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=5328 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86
+DEFINES=-D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DKBUILD_MODNAME="nvidia" -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=5328 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86
INCLUDES=-I.
OBJECTS=nv.o os-agp.o os-interface.o os-registry.o
@@ -12,7 +12,9 @@ CFLAGS=-Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wpare
RESMAN_KERNEL_MODULE=nv-kernel.o
+ifeq ($(KERNDIR),)
KERNDIR=/lib/modules/$(shell uname -r)
+endif
# check for newer paths. if found, use them, otherwise use old paths
# these wouldn't work with the gnu make included with rh6.2
@@ -23,7 +25,11 @@ KERNDIR=/lib/modules/$(shell uname -r)
ifeq ($(shell if test -d $(KERNDIR)/build; then echo yes; fi),yes)
KERNINC=$(KERNDIR)/build/include
else
-KERNINC=/usr/src/linux/include
+ ifeq ($(shell if test -d $(KERNDIR)/include; then echo yes; fi),yes)
+ KERNINC=$(KERNDIR)/include
+ else
+ KERNINC=/usr/src/linux/include
+ endif
endif
ifeq ($(shell if test -d $(KERNDIR)/kernel; then echo yes; fi),yes)
diff --git a/media-video/nvidia-kernel/files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch b/media-video/nvidia-kernel/files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch
index a10db7f43c14..bf90073adb56 100644
--- a/media-video/nvidia-kernel/files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch
+++ b/media-video/nvidia-kernel/files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch
@@ -12,11 +12,6 @@ diff -urpN NVIDIA-Linux-x86-1.0-5336/usr/src/nv/Makefile.kbuild NVIDIA-Linux-x86
#
# NVIDIA binary object file includes .common section.
#
-diff -urpN NVIDIA-Linux-x86-1.0-5336/usr/src/nv/built-in.o NVIDIA-Linux-x86-1.0-5336.sysfs/usr/src/nv/built-in.o
---- NVIDIA-Linux-x86-1.0-5336/usr/src/nv/built-in.o 1970-01-01 02:00:00.000000000 +0200
-+++ NVIDIA-Linux-x86-1.0-5336.sysfs/usr/src/nv/built-in.o 2004-02-01 16:11:27.428340072 +0200
-@@ -0,0 +1 @@
-+!<arch>
diff -urpN NVIDIA-Linux-x86-1.0-5336/usr/src/nv/conftest.sh NVIDIA-Linux-x86-1.0-5336.sysfs/usr/src/nv/conftest.sh
--- NVIDIA-Linux-x86-1.0-5336/usr/src/nv/conftest.sh 2004-01-15 05:29:11.000000000 +0200
+++ NVIDIA-Linux-x86-1.0-5336.sysfs/usr/src/nv/conftest.sh 2004-02-01 16:19:19.079638176 +0200
@@ -31,20 +26,20 @@ diff -urpN NVIDIA-Linux-x86-1.0-5336/usr/src/nv/conftest.sh NVIDIA-Linux-x86-1.0
+ # support in 2.6
+ #
+ echo "#include <linux/device.h>
-+ struct class_simple *test_class;
-+ int add_test_class() {
++ void add_test_class(void) {
++ struct class_simple *test_class;
+ test_class = class_simple_create(THIS_MODULE, \"test\");
+ }" > conftest.c
+
-+ gcc -c conftest.c -o conftest.o $* -D__KERNEL__ > /dev/null 2>&1
++ gcc -Wall -c conftest.c -o conftest.o $* -D__KERNEL__ > output.log 2>&1
+
-+ if test -f conftest.o; then
++ if test -f conftest.o && test -z "`cat output.log`"; then
+ echo "yes"
+ else
+ echo "no"
+ fi
+
-+ rm -f conftest.{c,o}
++ rm -f conftest.{c,o} output.log
+ ;;
+
cc_sanity_check)
diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild
index 23e0cde97e81..5eb350fbd7ae 100644
--- a/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild
+++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild,v 1.2 2004/02/01 17:16:29 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r1.ebuild,v 1.3 2004/02/06 19:27:52 azarah Exp $
inherit eutils
@@ -96,7 +96,8 @@ src_unpack() {
# Kbuild have issues currently (sandbox related).
# ln -snf Makefile.nvidia Makefile
- cp -f ${FILESDIR}/${PV}/Makefile ${S}/makefile
+ sed -e "s:5328:${NV_V/1.0-/}:g" \
+ ${FILESDIR}/${PV}/Makefile > ${S}/makefile
fi
# if you set this then it's your own fault when stuff breaks :)