diff options
Diffstat (limited to 'media-video')
5 files changed, 460 insertions, 6 deletions
diff --git a/media-video/nvidia-kernel/ChangeLog b/media-video/nvidia-kernel/ChangeLog index 35bbba98fd3d..55dde469691b 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-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.107 2005/01/17 08:45:26 cyfred Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.108 2005/01/26 07:01:43 eradicator Exp $ + +*nvidia-kernel-1.0.6629-r3 (25 Jan 2005) + + 25 Jan 2005; Jeremy Huddleston <eradicator@gentoo.org> + +files/1.0.6629/NVIDIA_kernel-1.0-6629-1201042.diff, + +nvidia-kernel-1.0.6629-r3.ebuild: + Revbump to fix bug #77994. Now works with 2.6.11 kernel rcs. *nvidia-kernel-1.0.6629-r2 (17 Jan 2005) diff --git a/media-video/nvidia-kernel/Manifest b/media-video/nvidia-kernel/Manifest index 02e456bbaddc..95f4a5702e9a 100644 --- a/media-video/nvidia-kernel/Manifest +++ b/media-video/nvidia-kernel/Manifest @@ -3,18 +3,18 @@ MD5 c84a79e7d9b69a204003fb8c2dbaad01 metadata.xml 297 MD5 6efd7d5ad3c7739f685111aa84466b68 nvidia-kernel-1.0.6111-r3.ebuild 4488 MD5 17e5291b91d1eef96d55e54a2cba6d81 nvidia-kernel-1.0.6629-r1.ebuild 4748 MD5 3915412914635df4d7329ad27323f4c5 nvidia-kernel-1.0.6629-r2.ebuild 4264 -MD5 d8fcf2021aa68584d4a4d9e96b671da0 files/nvidia 501 +MD5 796ef1bac2fc398cf5ee08bd35be7177 nvidia-kernel-1.0.6629-r3.ebuild 4326 MD5 ed1e098d85579c75542ef0a49ee4dd5c files/digest-nvidia-kernel-1.0.6111-r3 163 MD5 8a4687b0fc3e7cc0b36c247697d94701 files/digest-nvidia-kernel-1.0.6629-r1 163 MD5 8a4687b0fc3e7cc0b36c247697d94701 files/digest-nvidia-kernel-1.0.6629-r2 163 +MD5 d8fcf2021aa68584d4a4d9e96b671da0 files/nvidia 501 +MD5 8a4687b0fc3e7cc0b36c247697d94701 files/digest-nvidia-kernel-1.0.6629-r3 163 +MD5 b5b7f947ffb9e6c19f7457ff7c14d0db files/1.0.6111/conftest_koutput_includes.patch 1082 MD5 762e6f6e16aa6dd5b2469e99fe8decd3 files/1.0.6111/nv-pci_find_class.patch 2903 MD5 c2b155f40d7b904f07550e8e326969c2 files/1.0.6111/nv-remap-range.patch 5715 MD5 29eafcaf7ab5d59dd90d3d3243bf57c3 files/1.0.6111/nv_enable_pci.patch 3640 -MD5 5177339888e44bb5f4b6124fa5830e7f files/1.0.6111/vmalloc-reserve.patch 542 -MD5 b5b7f947ffb9e6c19f7457ff7c14d0db files/1.0.6111/conftest_koutput_includes.patch 1082 MD5 14924b09123b075f910c73316baff848 files/1.0.6111/power-suspend-2.6.9-changes.patch 856 -MD5 e70739410861defb6bf3d40f2706d554 files/1.0.6629/nv-pgd_offset.patch 3139 -MD5 0009ccc8f3896f22bad06fd549639072 files/1.0.6629/nv-pgprot-speedup.patch 1518 +MD5 5177339888e44bb5f4b6124fa5830e7f files/1.0.6111/vmalloc-reserve.patch 542 MD5 0009ccc8f3896f22bad06fd549639072 files/1.0.6629/NVIDIA_kernel-1.0-6629-1155389.patch 1518 MD5 ddeae194df6bb2112d7de723df8d84c2 files/1.0.6629/NVIDIA_kernel-1.0-6629-1161283.patch 18398 MD5 5a17c3fa427b4d0ff8e38f82e57cd817 files/1.0.6629/NVIDIA_kernel-1.0-6629-1162524.patch 9417 @@ -27,5 +27,8 @@ MD5 dbf80a2cbaf69a10521429e1b2a7e10c files/1.0.6629/conftest_koutput_includes.pa MD5 5aef5c6a394896bbb8392816f6795147 files/1.0.6629/nv-amd64-shutup-warnings.patch 902 MD5 c039797780f78262baa02ff488e822ff files/1.0.6629/nv-disable-preempt-on-smp_processor_id.patch 435 MD5 ddeae194df6bb2112d7de723df8d84c2 files/1.0.6629/nv-fix-memory-limit.patch 18398 +MD5 e70739410861defb6bf3d40f2706d554 files/1.0.6629/nv-pgd_offset.patch 3139 +MD5 0009ccc8f3896f22bad06fd549639072 files/1.0.6629/nv-pgprot-speedup.patch 1518 MD5 64d76075a90dedc83f1dc971389c910e files/1.0.6629/nv-shutup-warnings.patch 712 MD5 7c9db721d244f6ca709e2b8003ce4e0d files/1.0.6629/nv-vm_flags-no-VM_LOCKED.patch 677 +MD5 da7644fcc801d40c26fb22b570a88835 files/1.0.6629/NVIDIA_kernel-1.0-6629-1201042.diff 9445 diff --git a/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1201042.diff b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1201042.diff new file mode 100644 index 000000000000..932e02ffcb29 --- /dev/null +++ b/media-video/nvidia-kernel/files/1.0.6629/NVIDIA_kernel-1.0-6629-1201042.diff @@ -0,0 +1,302 @@ +diff -ru usr/src/nv/nv-linux.h usr/src/nv.1201042/nv-linux.h +--- usr/src/nv/nv-linux.h 2004-11-03 22:53:00.000000000 +0100 ++++ usr/src/nv.1201042/nv-linux.h 2005-01-26 01:56:26.000000000 +0100 +@@ -565,11 +565,6 @@ + #define PCI_CAP_ID_EXP 0x10 + #endif + +-#if defined(KERNEL_2_6) && defined(AGPGART) +-typedef struct agp_kern_info agp_kern_info; +-typedef struct agp_memory agp_memory; +-#endif +- + #if defined(CONFIG_DEVFS_FS) + # if defined(KERNEL_2_6) + typedef void* devfs_handle_t; +diff -ru usr/src/nv/nv.c usr/src/nv.1201042/nv.c +--- usr/src/nv/nv.c 2004-11-03 22:53:00.000000000 +0100 ++++ usr/src/nv.1201042/nv.c 2005-01-26 01:56:28.000000000 +0100 +@@ -2987,32 +2987,47 @@ + */ + if ( (!NV_AGP_ENABLED(nv)) && (config & NVOS_AGP_CONFIG_NVAGP) ) + { +- /* make sure the user does not have agpgart loaded */ +- if (inter_module_get("drm_agp")) { ++#if defined(KERNEL_2_4) ++ if (inter_module_get("drm_agp")) ++ { + inter_module_put("drm_agp"); +- nv_printf(NV_DBG_WARNINGS, "NVRM: not using NVAGP, AGPGART is loaded!!\n"); +- } else { +-#if defined(CONFIG_X86_64) && defined(CONFIG_GART_IOMMU) ++ nv_printf(NV_DBG_WARNINGS, "NVRM: not using NVAGP, AGPGART is loaded!\n"); ++ return status; ++ } ++#elif defined(AGPGART) ++ int error; ++ /* ++ * We can only safely use NvAGP when no backend has been ++ * registered with the AGPGART frontend. This condition ++ * is only met when the acquire function returns -EINVAL. ++ * ++ * Other return codes indicate that a backend is present ++ * and was either acquired, busy or else unavailable. ++ */ ++ if ((error = agp_backend_acquire()) != -EINVAL) ++ { ++ if (!error) agp_backend_release(); + nv_printf(NV_DBG_WARNINGS, +- "NVRM: not using NVAGP, kernel was compiled with GART_IOMMU support!!\n"); +-#else +- status = rm_init_agp(nv); +- if (status == RM_OK) +- { +- nv->agp_config = NVOS_AGP_CONFIG_NVAGP; +- nv->agp_status = NV_AGP_STATUS_ENABLED; +- } ++ "NVRM: not using NVAGP, an AGPGART backend is loaded!\n"); ++ return status; ++ } + #endif ++#if defined(CONFIG_X86_64) && defined(CONFIG_GART_IOMMU) ++ nv_printf(NV_DBG_WARNINGS, ++ "NVRM: not using NVAGP, kernel was compiled with GART_IOMMU support!\n"); ++#else ++ status = rm_init_agp(nv); ++ if (status == RM_OK) ++ { ++ nv->agp_config = NVOS_AGP_CONFIG_NVAGP; ++ nv->agp_status = NV_AGP_STATUS_ENABLED; + } ++#endif + } + + if (NV_AGP_ENABLED(nv)) + old_error = 0; /* report new errors */ + +- nv_printf(NV_DBG_SETUP, +- "NVRM: agp_init finished with status 0x%x and config %d\n", +- status, nv->agp_config); +- + return status; + } + +@@ -3036,9 +3051,6 @@ + nv->agp_config = NVOS_AGP_CONFIG_DISABLE_AGP; + nv->agp_status = NV_AGP_STATUS_DISABLED; + +- nv_printf(NV_DBG_SETUP, "NVRM: teardown finished with status 0x%x\n", +- status); +- + return status; + } + +diff -ru usr/src/nv/os-agp.c usr/src/nv.1201042/os-agp.c +--- usr/src/nv/os-agp.c 2004-11-03 22:53:00.000000000 +0100 ++++ usr/src/nv.1201042/os-agp.c 2005-01-26 01:56:30.000000000 +0100 +@@ -25,6 +25,13 @@ + + #ifdef AGPGART + ++#if defined(KERNEL_2_6) ++typedef struct agp_kern_info agp_kern_info; ++typedef struct agp_memory agp_memory; ++#elif defined(KERNEL_2_4) ++const drm_agp_t *drm_agp_p; /* functions */ ++#endif ++ + typedef struct { + agp_memory *ptr; + int num_pages; +@@ -45,7 +52,6 @@ + + agp_kern_info agpinfo; + agp_gart gart; +-const drm_agp_t *drm_agp_p; + + #if defined(CONFIG_MTRR) + #define MTRR_DEL(gart) if ((gart).mtrr > 0) mtrr_del((gart).mtrr, 0, 0); +@@ -53,6 +59,26 @@ + #define MTRR_DEL(gart) + #endif + ++#if defined(KERNEL_2_6) ++#define NV_AGPGART_BACKEND_ACQUIRE(o) agp_backend_acquire() ++#define NV_AGPGART_BACKEND_ENABLE(o,mode) agp_enable(mode) ++#define NV_AGPGART_BACKEND_RELEASE(o) agp_backend_release() ++#define NV_AGPGART_COPY_INFO(o,p) agp_copy_info(p) ++#define NV_AGPGART_ALLOCATE_MEMORY(o,count,type) agp_allocate_memory(count,type) ++#define NV_AGPGART_FREE_MEMORY(o,p) agp_free_memory(p) ++#define NV_AGPGART_BIND_MEMORY(o,p,offset) agp_bind_memory(p,offset) ++#define NV_AGPGART_UNBIND_MEMORY(o,p) agp_unbind_memory(p) ++#elif defined(KERNEL_2_4) ++#define NV_AGPGART_BACKEND_ACQUIRE(o) ({ (o)->acquire(); 0; }) ++#define NV_AGPGART_BACKEND_ENABLE(o,mode) (o)->enable(mode) ++#define NV_AGPGART_BACKEND_RELEASE(o) ((o)->release()) ++#define NV_AGPGART_COPY_INFO(o,p) ({ (o)->copy_info(p); 0; }) ++#define NV_AGPGART_ALLOCATE_MEMORY(o,count,type) (o)->allocate_memory(count,type) ++#define NV_AGPGART_FREE_MEMORY(o,p) (o)->free_memory(p) ++#define NV_AGPGART_BIND_MEMORY(o,p,offset) (o)->bind_memory(p,offset) ++#define NV_AGPGART_UNBIND_MEMORY(o,p) (o)->unbind_memory(p) ++#endif ++ + #endif /* AGPGART */ + + BOOL KernInitAGP( +@@ -73,8 +99,10 @@ + + memset( (void *) &gart, 0, sizeof(agp_gart)); + ++#if defined(KERNEL_2_4) + if (!(drm_agp_p = inter_module_get_request("drm_agp", "agpgart"))) + return 1; ++#endif + + /* NOTE: from here down, return an error code of '-1' + * that indicates that agpgart is loaded, but we failed to use it +@@ -82,11 +110,10 @@ + * the memory controller. + */ + +- if (drm_agp_p->acquire()) ++ if (NV_AGPGART_BACKEND_ACQUIRE(drm_agp_p)) + { +- nv_printf(NV_DBG_ERRORS, "NVRM: AGPGART: backend in use\n"); +- inter_module_put("drm_agp"); +- return -1; ++ nv_printf(NV_DBG_INFO, "NVRM: AGPGART: no backend available\n"); ++ goto bailout; + } + + if (rm_read_registry_dword(nv, "NVreg", "ReqAGPRate", &agp_rate) == RM_ERROR) +@@ -101,21 +128,12 @@ + agp_fw = 1; + agp_fw &= 0x00000001; + +-#if defined(KERNEL_2_4) +- /* +- * The original Linux 2.4 AGP GART driver interface declared copy_info to +- * return nothing. This changed in Linux 2.5, which reports unsupported +- * chipsets via this function. If this Linux 2.4 kernels behaves the same +- * way, we have no way to know. +- */ +- drm_agp_p->copy_info(&agpinfo); +-#else +- if (drm_agp_p->copy_info(&agpinfo)) { ++ if (NV_AGPGART_COPY_INFO(drm_agp_p, &agpinfo)) ++ { + nv_printf(NV_DBG_ERRORS, + "NVRM: AGPGART: kernel reports chipset as unsupported\n"); + goto failed; + } +-#endif + + #ifdef CONFIG_MTRR + /* +@@ -170,7 +188,7 @@ + if (!(agp_rate & 0x00000004)) agpinfo.mode &= ~0x00000004; + if (!(agp_rate & 0x00000002)) agpinfo.mode &= ~0x00000002; + +- drm_agp_p->enable(agpinfo.mode); ++ NV_AGPGART_BACKEND_ENABLE(drm_agp_p, agpinfo.mode); + + *ap_phys_base = (void*) agpinfo.aper_base; + *ap_mapped_base = (void*) gart.aperture; +@@ -182,8 +200,11 @@ + + failed: + MTRR_DEL(gart); /* checks gart.mtrr */ +- drm_agp_p->release(); ++ NV_AGPGART_BACKEND_RELEASE(drm_agp_p); ++bailout: ++#if defined(KERNEL_2_4) + inter_module_put("drm_agp"); ++#endif + + return -1; + +@@ -213,9 +234,10 @@ + NV_IOUNMAP(gart.aperture, RM_PAGE_SIZE); + } + +- drm_agp_p->release(); +- ++ NV_AGPGART_BACKEND_RELEASE(drm_agp_p); ++#if defined(KERNEL_2_4) + inter_module_put("drm_agp"); ++#endif + + if (rm_clear_agp_bitmap(nv, &bitmap)) + { +@@ -244,7 +266,6 @@ + return RM_ERROR; + #else + agp_memory *ptr; +- int err; + agp_priv_data *data; + RM_STATUS status; + +@@ -262,7 +283,7 @@ + return RM_ERROR; + } + +- ptr = drm_agp_p->allocate_memory(PageCount, AGP_NORMAL_MEMORY); ++ ptr = NV_AGPGART_ALLOCATE_MEMORY(drm_agp_p, PageCount, AGP_NORMAL_MEMORY); + if (ptr == NULL) + { + *pAddress = (void*) 0; +@@ -270,8 +291,7 @@ + return RM_ERR_NO_FREE_MEM; + } + +- err = drm_agp_p->bind_memory(ptr, *Offset); +- if (err) ++ if (NV_AGPGART_BIND_MEMORY(drm_agp_p, ptr, *Offset)) + { + // this happens a lot when the aperture itself fills up.. + // not a big deal, so don't alarm people with an error message +@@ -280,14 +300,11 @@ + goto fail; + } + +- /* return the agp aperture address */ +- *pAddress = (void *) (agpinfo.aper_base + (*Offset << PAGE_SHIFT)); +- + status = os_alloc_mem((void **)&data, sizeof(agp_priv_data)); + if (status != RM_OK) + { + nv_printf(NV_DBG_ERRORS, "NVRM: AGPGART: memory allocation failed\n"); +- drm_agp_p->unbind_memory(ptr); ++ NV_AGPGART_UNBIND_MEMORY(drm_agp_p, ptr); + goto fail; + } + +@@ -302,7 +319,7 @@ + return RM_OK; + + fail: +- drm_agp_p->free_memory(ptr); ++ NV_AGPGART_FREE_MEMORY(drm_agp_p, ptr); + *pAddress = (void*) 0; + + return RM_ERROR; +@@ -342,7 +359,7 @@ + { + nv_printf(NV_DBG_ERRORS, "NVRM: AGPGART: unable to remap %lu pages\n", + (unsigned long)agp_data->num_pages); +- drm_agp_p->unbind_memory(agp_data->ptr); ++ NV_AGPGART_UNBIND_MEMORY(drm_agp_p, agp_data->ptr); + goto fail; + } + +@@ -441,8 +458,8 @@ + { + size_t pages = ptr->page_count; + +- drm_agp_p->unbind_memory(ptr); +- drm_agp_p->free_memory(ptr); ++ NV_AGPGART_UNBIND_MEMORY(drm_agp_p, ptr); ++ NV_AGPGART_FREE_MEMORY(drm_agp_p, ptr); + + nv_printf(NV_DBG_INFO, "NVRM: AGPGART: freed %ld pages\n", + (unsigned long)pages); diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629-r3 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629-r3 new file mode 100644 index 000000000000..9324510b4ef9 --- /dev/null +++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.6629-r3 @@ -0,0 +1,2 @@ +MD5 f7737c1e95371f37a4fd30da2f11e72c NVIDIA-Linux-x86-1.0-6629-pkg1.run 8725221 +MD5 652e69f549c81a7a3f2806daa74b9c36 NVIDIA-Linux-x86_64-1.0-6629-pkg2.run 7777882 diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r3.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r3.ebuild new file mode 100644 index 000000000000..2d61a903f1d3 --- /dev/null +++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r3.ebuild @@ -0,0 +1,140 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/nvidia-kernel-1.0.6629-r3.ebuild,v 1.1 2005/01/26 07:01:43 eradicator Exp $ + +inherit eutils linux-mod + +X86_PKG_V="pkg1" +AMD64_PKG_V="pkg2" +NV_V="${PV/1.0./1.0-}" +X86_NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}" +AMD64_NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}" + +DESCRIPTION="Linux kernel module for the NVIDIA X11 driver" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="x86? (ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${X86_NV_PACKAGE}-${X86_PKG_V}.run) + amd64? (http://download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${AMD64_NV_PACKAGE}-${AMD64_PKG_V}.run)" + +if use x86; then + PKG_V="${X86_PKG_V}" + NV_PACKAGE="${X86_NV_PACKAGE}" +elif use amd64; then + PKG_V="${AMD64_PKG_V}" + NV_PACKAGE="${AMD64_NV_PACKAGE}" +fi + +S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}/usr/src/nv" + +LICENSE="NVIDIA" +SLOT="0" +KEYWORDS="-* ~x86 ~amd64" +RESTRICT="nostrip" +IUSE="" + +DEPEND="virtual/linux-sources" +export _POSIX2_VERSION="199209" + +MODULE_NAMES="nvidia(video:${S})" +BUILD_PARAMS="IGNORE_CC_MISMATCH=yes V=1 SYSSRC=${KV_DIR} SYSOUT=${KV_OUT_DIR}" + +mtrr_check() { + ebegin "Checking for MTRR support" + linux_chkconfig_present MTRR + eend $? + + if [ "$?" != 0 ] + then + eerror "This version needs MTRR support for most chipsets!" + eerror "Please enable MTRR support in your kernel config, found at:" + eerror + eerror " Processor type and features" + eerror " [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi +} + +pkg_setup() { + linux-mod_pkg_setup + mtrr_check; +} + +src_unpack() { + if [ ${KV_MINOR} -ge 6 -a ${KV_PATCH} -lt 7 ] + then + echo + ewarn "Your kernel version is ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" + ewarn "This is not officially supported for ${P}. It is likely you" + ewarn "will not be able to compile or use the kernel module." + ewarn "It is recommended that you upgrade your kernel to a version >= 2.6.7" + echo + ewarn "DO NOT file bug reports for kernel versions less than 2.6.7 as they will be ignored." + fi + + cd ${WORKDIR} + bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only + + # Add patches below, with a breif description. + cd ${S} + # Any general patches should go here + # Shutup pointer arith warnings + use x86 && epatch ${FILESDIR}/${PV}/nv-shutup-warnings.patch + use amd64 && epatch ${FILESDIR}/${PV}/nv-amd64-shutup-warnings.patch + + # Patches from Zander (http://www.minion.de/files/1.0-6629/) + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1155389.patch + #epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1162524.patch + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1165235.patch + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1171869.patch + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1175225.patch + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1182399.patch + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1189413.patch + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1201042.diff + + # Now any patches specific to the 2.6 kernel should go here + if kernel_is 2 6 + then + einfo "Applying 2.6 kernel patches" + # Fix the /usr/src/linux/include/asm not existing on koutput issue #58294 + epatch ${FILESDIR}/${PV}/conftest_koutput_includes.patch + # Fix calling of smp_processor_id() when preempt is enabled + epatch ${FILESDIR}/${PV}/nv-disable-preempt-on-smp_processor_id.patch + # Fix a limitation on available video memory bug #71684 + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-1.0-6629-1161283.patch + fi + + # if you set this then it's your own fault when stuff breaks :) + [ -n "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile.* + + # if greater than 2.6.5 use M= instead of SUBDIR= + convert_to_m ${S}/Makefile.kbuild +} + +src_install() { + linux-mod_src_install + + # Add the aliases + sed -e 's:\${PACKAGE}:'${PF}':g' ${FILESDIR}/nvidia > ${WORKDIR}/nvidia + insinto /etc/modules.d + newins ${WORKDIR}/nvidia nvidia + + # Docs + dodoc ${S}/../../share/doc/README + + # The device creation script + into / + newsbin ${S}/makedevices.sh NVmakedevices.sh +} + +pkg_postinst() { + if [ "${ROOT}" = "/" ] && \ + [ ! -e /dev/.devfsd ] && \ + [ ! -e /dev/.udev ] && \ + [ -x /sbin/NVmakedevices.sh ] + then + /sbin/NVmakedevices.sh >/dev/null 2>&1 + fi + + linux-mod_pkg_postinst +} |