diff options
author | Andrew Bevitt <cyfred@gentoo.org> | 2004-04-08 00:10:51 +0000 |
---|---|---|
committer | Andrew Bevitt <cyfred@gentoo.org> | 2004-04-08 00:10:51 +0000 |
commit | 2ce25d661885a834cd4138e73a8f59fb252c2727 (patch) | |
tree | 8f1af34b18b7ce22b6c240430ab6adff47843a8f /media-video/nvidia-kernel | |
parent | fixing Manifest (diff) | |
download | gentoo-2-2ce25d661885a834cd4138e73a8f59fb252c2727.tar.gz gentoo-2-2ce25d661885a834cd4138e73a8f59fb252c2727.tar.bz2 gentoo-2-2ce25d661885a834cd4138e73a8f59fb252c2727.zip |
Updated ebuilds to stop devices being created if using udev on top of devfsd
Diffstat (limited to 'media-video/nvidia-kernel')
6 files changed, 367 insertions, 15 deletions
diff --git a/media-video/nvidia-kernel/ChangeLog b/media-video/nvidia-kernel/ChangeLog index b826db06318a..5a4ba6d0e50b 100644 --- a/media-video/nvidia-kernel/ChangeLog +++ b/media-video/nvidia-kernel/ChangeLog @@ -1,6 +1,12 @@ # 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.64 2004/02/07 22:28:25 brad_mssw Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-video/nvidia-kernel/ChangeLog,v 1.65 2004/04/08 00:10:51 cyfred Exp $ + +*nvidia-kernel-1.0.5332-r1 (07 May 2004) + + 07 May 2004; Andrew Bevitt <cyfred@gentoo.org>; + nvidia-kernel-1.0.5332-r1.ebuild, nvidia-kernel-1.0.5336-r2.ebuild: + Updated ebuilds to stop devices being created if using udev on top of devfsd 07 Feb 2004; Brad House <brad_mssw@gentoo.org> nvidia-kernel-1.0.5332.ebuild: diff --git a/media-video/nvidia-kernel/Manifest b/media-video/nvidia-kernel/Manifest index 5c2dc42b9a36..b2fea4b49268 100644 --- a/media-video/nvidia-kernel/Manifest +++ b/media-video/nvidia-kernel/Manifest @@ -1,8 +1,26 @@ MD5 a3d4eb8d53311beaafcb9a3a1965babb nvidia-kernel-1.0.5332.ebuild 4433 MD5 b8610631a36058cb13964ae2b6dc0bee nvidia-kernel-1.0.5328.ebuild 4269 MD5 a84c6099ac721e55e50bc35cdf443837 nvidia-kernel-1.0.4499.ebuild 4080 +MD5 6ce6540461b32a4439a8e13c6ad8f80f nvidia-kernel-1.0.4496-r4.ebuild 4272 +MD5 04368157b6fc7854f447acbb45af836a nvidia-kernel-1.0.5336-r1.ebuild 4497 +MD5 612cbf0e55fc59281a6b7510bd5be604 nvidia-kernel-1.0.5332-r1.ebuild 4456 +MD5 76bd72f89f94d77d6bf86d8e122f5100 nvidia-kernel-1.0.2880-r1.ebuild 1966 +MD5 a2954410aed3b91f7f5324169e43ab3f nvidia-kernel-1.0.4349-r2.ebuild 3543 +MD5 d07c7e8805ac45db9ec99be3e86dee70 nvidia-kernel-1.0.2960-r1.ebuild 1987 +MD5 6a0f2239670a3c0d900f6c410d54073a nvidia-kernel-1.0.5336.ebuild 4379 +MD5 6c62870aa5220d0967df5827dca75563 nvidia-kernel-1.0.4180.ebuild 3714 +MD5 d12e78297c403467ea2e4144729ece91 nvidia-kernel-1.0.3123-r2.ebuild 3118 +MD5 fadfc42ac1a37efefe5e9b19e54ce03b nvidia-kernel-1.0.4191-r2.ebuild 3715 +MD5 ad9be703f3ba183bf2b5d9a9765619fa nvidia-kernel-1.0.5328-r1.ebuild 4562 +MD5 4a974d08882d93cd47de68935cd97d96 nvidia-kernel-1.0.4496-r3.ebuild 4249 +MD5 4b4feee053e7d6b736fc1e7d5071f3e5 nvidia-kernel-1.0.4363-r3.ebuild 4043 +MD5 ab8b998861c66a52ef742ad4394bebc2 nvidia-kernel-1.0.5336-r2.ebuild 4520 +MD5 104f92511dac2c81ce6a7ff0becfd5a2 ChangeLog 14293 +MD5 fe2f0a492565eb0ae0831e308df50664 metadata.xml 158 MD5 497ffcbd6a91ed9447dfdf7b736925bd files/digest-nvidia-kernel-1.0.5328-r1 80 +MD5 cf7b2bb276c568f0f66d10951b4ce3ad files/digest-nvidia-kernel-1.0.5332-r1 83 MD5 1316f73c0eecd8832bb362a3d5ca4892 files/digest-nvidia-kernel-1.0.5336-r1 80 +MD5 1316f73c0eecd8832bb362a3d5ca4892 files/digest-nvidia-kernel-1.0.5336-r2 80 MD5 059b3ddf8944dce6c9184d11d15abd71 files/NVIDIA_kernel-1.0-3123-2.5-tl.diff 31614 MD5 57f69061f52fd98e20c7d62882af2757 files/NVIDIA_kernel-1.0-4191-2.5.54.diff 1228 MD5 441b29e8f10b6620c4dd4fc01528f172 files/NVIDIA_kernel-1.0-3123-2.5-module.diff 5569 @@ -39,17 +57,3 @@ MD5 f04497fe1a0f76fcc41a93b554072c4a files/1.0.5328/NVIDIA_kernel-1.0-5328-2.6-2 MD5 4c7749ca72483547e15031a2af560415 files/1.0.5332/NVIDIA-Linux-x86_64-1.0-5332-2.6.diff 7216 MD5 6b364c4b64c6de0aea70163850fa3914 files/1.0.5336/Makefile 4410 MD5 7bf40e44b8f2181a1047ddfd13acd6b3 files/1.0.5336/NVIDIA_kernel-1.0-5336-basic-sysfs-support.patch 5439 -MD5 6ce6540461b32a4439a8e13c6ad8f80f nvidia-kernel-1.0.4496-r4.ebuild 4272 -MD5 04368157b6fc7854f447acbb45af836a nvidia-kernel-1.0.5336-r1.ebuild 4497 -MD5 76bd72f89f94d77d6bf86d8e122f5100 nvidia-kernel-1.0.2880-r1.ebuild 1966 -MD5 a2954410aed3b91f7f5324169e43ab3f nvidia-kernel-1.0.4349-r2.ebuild 3543 -MD5 d07c7e8805ac45db9ec99be3e86dee70 nvidia-kernel-1.0.2960-r1.ebuild 1987 -MD5 6a0f2239670a3c0d900f6c410d54073a nvidia-kernel-1.0.5336.ebuild 4379 -MD5 6c62870aa5220d0967df5827dca75563 nvidia-kernel-1.0.4180.ebuild 3714 -MD5 d12e78297c403467ea2e4144729ece91 nvidia-kernel-1.0.3123-r2.ebuild 3118 -MD5 fadfc42ac1a37efefe5e9b19e54ce03b nvidia-kernel-1.0.4191-r2.ebuild 3715 -MD5 ad9be703f3ba183bf2b5d9a9765619fa nvidia-kernel-1.0.5328-r1.ebuild 4562 -MD5 4a974d08882d93cd47de68935cd97d96 nvidia-kernel-1.0.4496-r3.ebuild 4249 -MD5 4b4feee053e7d6b736fc1e7d5071f3e5 nvidia-kernel-1.0.4363-r3.ebuild 4043 -MD5 104f92511dac2c81ce6a7ff0becfd5a2 ChangeLog 14293 -MD5 fe2f0a492565eb0ae0831e308df50664 metadata.xml 158 diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.5332-r1 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.5332-r1 new file mode 100644 index 000000000000..943071e25292 --- /dev/null +++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.5332-r1 @@ -0,0 +1 @@ +MD5 eede761ab428ff0d27e5f67e8c555972 NVIDIA-Linux-x86_64-1.0-5332-pkg0.run 5597826 diff --git a/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.5336-r2 b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.5336-r2 new file mode 100644 index 000000000000..56ddf0d273b7 --- /dev/null +++ b/media-video/nvidia-kernel/files/digest-nvidia-kernel-1.0.5336-r2 @@ -0,0 +1 @@ +MD5 6d7361347ebbef5dfdbe6bdcb560fda8 NVIDIA-Linux-x86-1.0-5336-pkg1.run 6821193 diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.5332-r1.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.5332-r1.ebuild new file mode 100644 index 000000000000..98b4e66726d0 --- /dev/null +++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.5332-r1.ebuild @@ -0,0 +1,175 @@ +# 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.5332-r1.ebuild,v 1.1 2004/04/08 00:10:51 cyfred Exp $ + +inherit eutils + +PKG_V="pkg0" +NV_V="${PV/1.0./1.0-}" +NV_PACKAGE="NVIDIA-Linux-x86_64-${NV_V}" +S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}/usr/src/nv" +DESCRIPTION="Linux kernel module for the NVIDIA's X driver" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="ftp://download.nvidia.com/XFree86/Linux-x86_64/${NV_V}/${NV_PACKAGE}-${PKG_V}.run" + +# The slot needs to be set to $KV to prevent unmerges of modules for other kernels. +LICENSE="NVIDIA" +SLOT="${KV}" +KEYWORDS="-* amd64" +RESTRICT="nostrip" + +DEPEND="virtual/linux-sources" +export _POSIX2_VERSION="199209" + + +pkg_setup() { + if [ ! -f /proc/mtrr ] + 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 -> [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi + + check_version_h +} + +check_version_h() { + if [ ! -f "${ROOT}/usr/src/linux/include/linux/version.h" ] + then + eerror "Please verify that your /usr/src/linux symlink is pointing" + eerror "to your current kernel sources, and that you did run:" + eerror + eerror " # make dep" + die "/usr/src/linux symlink not setup!" + fi +} + +get_KV_info() { + check_version_h + + # 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_4_kernel() { + get_KV_info + + if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 4 ] + then + return 0 + else + return 1 + fi +} + +is_2_5_kernel() { + get_KV_info + + if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 5 ] + then + return 0 + else + return 1 + fi +} + +is_2_6_kernel() { + get_KV_info + + if [ "${KV_major}" -eq 2 -a "${KV_minor}" -eq 6 ] + then + return 0 + else + return 1 + fi +} + +src_unpack() { + cd ${WORKDIR} + bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only + + # Next section applies patches for linux-2.5 kernel, and/or + # bugfixes for linux-2.4. All these are from: + # + # http://www.minion.de/nvidia/ + # + # Many thanks to Christian Zander <zander@minion.de> for bringing + # these to us, and being so helpful to select which to use. + + get_KV_info + + cd ${S} + einfo "Linux kernel ${KV_major}.${KV_minor}.${KV_micro}" + + if is_2_5_kernel || is_2_6_kernel + then + # Kbuild have issues currently (sandbox related). + EPATCH_SINGLE_MSG="Applying 2.6.x patch ..." \ + epatch ${FILESDIR}/${PV}/NVIDIA-Linux-x86_64-1.0-5332-2.6.diff + fi + + # if you set this then it's your own fault when stuff breaks :) + [ ! -z "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile +} + +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 + # kernel outside the chroot rather than within. + make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \ + clean nvidia.o || die +} + +src_install() { + # The driver goes into the standard modules location + insinto /lib/modules/${KV}/video + if is_2_5_kernel || is_2_6_kernel + then + doins nvidia.ko + else + doins nvidia.o + fi + + # Add the aliases + insinto /etc/modules.d + newins ${FILESDIR}/nvidia-1.1 nvidia + + # Docs + dodoc ${S}/README + + # The device creation script + into / + newsbin ${S}/makedevices.sh NVmakedevices.sh +} + +pkg_postinst() { + if [ "${ROOT}" = "/" ] + then + # Update module dependency + [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules + if [ ! -e /dev/.devfsd ] && [ ! -e /dev/.udev ] && [ -x /sbin/NVmakedevices.sh ] + then + /sbin/NVmakedevices.sh >/dev/null 2>&1 + fi + fi + + echo + einfo "If you are not using devfs, loading the module automatically at" + einfo "boot up, you need to add \"nvidia\" to your /etc/modules.autoload." + echo + ewarn "Please note that the driver name changed from \"NVdriver\"" + ewarn "to \"nvidia.o\"." + echo +} diff --git a/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r2.ebuild b/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r2.ebuild new file mode 100644 index 000000000000..1cbf812ce415 --- /dev/null +++ b/media-video/nvidia-kernel/nvidia-kernel-1.0.5336-r2.ebuild @@ -0,0 +1,165 @@ +# 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-r2.ebuild,v 1.1 2004/04/08 00:10:51 cyfred Exp $ + +inherit eutils + +PKG_V="pkg1" +NV_V="${PV/1.0./1.0-}" +NV_PACKAGE="NVIDIA-Linux-x86-${NV_V}" +S="${WORKDIR}/${NV_PACKAGE}-${PKG_V}/usr/src/nv" +DESCRIPTION="Linux kernel module for the NVIDIA's X driver" +HOMEPAGE="http://www.nvidia.com/" +SRC_URI="ftp://download.nvidia.com/XFree86/Linux-x86/${NV_V}/${NV_PACKAGE}-${PKG_V}.run" + +# The slot needs to be set to $KV to prevent unmerges of modules for other kernels. +LICENSE="NVIDIA" +SLOT="${KV}" +KEYWORDS="-* ~x86" +RESTRICT="nostrip" + +DEPEND="virtual/linux-sources" +export _POSIX2_VERSION="199209" + + +pkg_setup() { + if [ ! -f /proc/mtrr ] + 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 -> [*] MTRR (Memory Type Range Register) support" + eerror + eerror "and recompile your kernel ..." + die "MTRR support not detected!" + fi + + check_version_h +} + +check_version_h() { + if [ ! -f "${ROOT}/usr/src/linux/include/linux/version.h" ] + then + eerror "Please verify that your /usr/src/linux symlink is pointing" + eerror "to your current kernel sources, and that you did run:" + eerror + eerror " # make dep" + die "/usr/src/linux symlink not setup!" + fi +} + +get_KV_info() { + check_version_h + + # 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_kernel() { + [ -z "$1" -o -z "$2" ] && return 1 + + get_KV_info + + if [ "${KV_major}" -eq "$1" -a "${KV_minor}" -eq "$2" ] + then + return 0 + else + return 1 + fi +} + +src_unpack() { + cd ${WORKDIR} + bash ${DISTDIR}/${NV_PACKAGE}-${PKG_V}.run --extract-only + + # Next section applies patches for linux-2.5 kernel, and/or + # bugfixes for linux-2.4. All these are from: + # + # http://www.minion.de/nvidia/ + # + # Many thanks to Christian Zander <zander@minion.de> for bringing + # these to us, and being so helpful to select which to use. + + get_KV_info + + cd ${S} + einfo "Linux kernel ${KV_major}.${KV_minor}.${KV_micro}" + + if is_kernel 2 5 || is_kernel 2 6 + then + EPATCH_SINGLE_MSG="Applying basic sysfs patch ..." \ + epatch ${FILESDIR}/${PV}/NVIDIA_kernel-${NV_V}-basic-sysfs-support.patch + + # Kbuild have issues currently (sandbox related). +# ln -snf Makefile.nvidia 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 :) + [ ! -z "${USE_CRAZY_OPTS}" ] && sed -i "s:-O:${CFLAGS}:" Makefile +} + +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 + # kernel outside the chroot rather than within. + if is_kernel 2 5 || is_kernel 2 6 + then + make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \ + clean nvidia.o || die + else + make IGNORE_CC_MISMATCH="yes" KERNDIR="/usr/src/linux" \ + clean module || die + fi +} + +src_install() { + # The driver goes into the standard modules location + insinto /lib/modules/${KV}/video + if is_kernel 2 5 || is_kernel 2 6 + then + newins nvidia.o nvidia.ko + else + doins nvidia.o + fi + + # Add the aliases + insinto /etc/modules.d + newins ${FILESDIR}/nvidia-1.1 nvidia + + # Docs + dodoc ${S}/README + + # The device creation script + into / + newsbin ${S}/makedevices.sh NVmakedevices.sh +} + +pkg_postinst() { + if [ "${ROOT}" = "/" ] + then + # Update module dependency + [ -x /usr/sbin/update-modules ] && /usr/sbin/update-modules + if [ ! -e /dev/.devfsd ] && [ ! -e /dev/.udev ] && [ -x /sbin/NVmakedevices.sh ] + then + /sbin/NVmakedevices.sh >/dev/null 2>&1 + fi + fi + + echo + einfo "If you are not using devfs, loading the module automatically at" + einfo "boot up, you need to add \"nvidia\" to your /etc/modules.autoload." + echo + ewarn "Please note that the driver name changed from \"NVdriver\"" + ewarn "to \"nvidia.o\"." + echo +} |