summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r2.ebuild')
-rw-r--r--media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r2.ebuild64
1 files changed, 31 insertions, 33 deletions
diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r2.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r2.ebuild
index 777503044966..137e778bec7c 100644
--- a/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r2.ebuild
+++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 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.4363-r2.ebuild,v 1.1 2003/05/26 20:11:32 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.4363-r2.ebuild,v 1.2 2003/06/22 15:02:23 azarah Exp $
inherit eutils
@@ -20,7 +20,7 @@ HOMEPAGE="http://www.nvidia.com/"
# modules for other kernels.
LICENSE="NVIDIA"
SLOT="${KV}"
-KEYWORDS="~x86 -ppc -sparc -alpha -hppa -mips -arm"
+KEYWORDS="x86 -ppc -sparc -alpha -hppa -mips -arm"
DEPEND="virtual/linux-sources
>=sys-apps/portage-1.9.10"
@@ -49,6 +49,26 @@ pkg_setup() {
fi
}
+get_KV_info() {
+ # Get the kernel version of sources in /usr/src/linux ...
+ export KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \
+ "${ROOT}/usr/src/linux/include/linux/version.h")"
+ export KV_major="$(echo "${KV_full}" | cut -d. -f1)"
+ export KV_minor="$(echo "${KV_full}" | cut -d. -f2)"
+ export KV_micro="$(echo "${KV_full}" | cut -d. -f3 | sed -e 's:[^0-9].*::')"
+}
+
+is_2_5_kernel() {
+ get_KV_info
+
+ if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 5 ]
+ then
+ return 0
+ else
+ return 1
+ fi
+}
+
src_unpack() {
unpack ${A}
@@ -60,49 +80,27 @@ src_unpack() {
# Many thanks to Christian Zander <zander@minion.de> for bringing
# these to us, and being so helpful to select which to use.
- # Get the kernel version of sources in /usr/src/linux ...
- local KV_full="$(awk '/UTS_RELEASE/ { gsub("\"", "", $3); print $3 }' \
- "${ROOT}/usr/src/linux/include/linux/version.h")"
- local KV_major="$(echo "${KV_full}" | cut -d. -f1)"
- local KV_minor="$(echo "${KV_full}" | cut -d. -f2)"
- local KV_micro="$(echo "${KV_full}" | cut -d. -f3 | sed -e 's:[^0-9].*::')"
+ get_KV_info
cd ${S}
einfo "Linux kernel ${KV_major}.${KV_minor}.${KV_micro}"
- if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 5 ]
+
+ if is_2_5_kernel
then
EPATCH_SINGLE_MSG="Applying tasklet patch for kernel 2.5..." \
- epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5-20030424.diff
-
- if [ "${KV_micro}" -ge 68 ] && \
- [ -n "`grep irqreturn_t /usr/src/linux/include/linux/interrupt.h`" ]
- then
- EPATCH_SINGLE_MSG="Applying patch for devfs/irq changes in 2.5.68+..." \
- epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5.68.diff
- fi
+ epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5-20030614.diff
- if [ "${KV_micro}" -ge 69 ]
- then
- if [ -z "`grep devfs_handle_t /usr/src/linux/include/linux/devfs_fs_kernel.h`" ]
- then
- EPATCH_SINGLE_MSG="Applying patch for devfs changes in 2.5.69+..." \
- epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5.69.diff
- fi
- if [ -n "`grep "struct agp_memory" /usr/src/linux/drivers/char/agp/agp.h`" ]
- then
- EPATCH_SINGLE_MSG="Applying patch for agp changes in 2.5.69+..." \
- epatch ${FILESDIR}/${PV}/${NV_PACKAGE}-2.5.69-agp.diff
- fi
- fi
-
- # Some problems with kbuild one ..
- ln -s Makefile.nvidia Makefile
+ # Kbuild have issues currently (sandbox related).
+ ln -snf Makefile.nvidia Makefile
+ else
+ ln -snf Makefile.nvidia Makefile
fi
}
src_compile() {
# Portage should determine the version of the kernel sources
check_KV
+
# IGNORE_CC_MISMATCH disables a sanity check that's needed when gcc has been
# updated but the running kernel is still compiled with an older gcc. This is
# needed for chrooted building, where the sanity check detects the gcc of the