/[gentoo-x86]/eclass/linux-mod.eclass
Gentoo

Diff of /eclass/linux-mod.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.54 Revision 1.59
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.54 2005/10/22 17:35:39 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.59 2006/03/03 20:57:15 johnm Exp $
4 4
5# Description: This eclass is used to interface with linux-info in such a way 5# Description: This eclass is used to interface with linux-info in such a way
6# to provide the functionality required and initial functions 6# to provide the functionality required and initial functions
7# required to install external modules against a kernel source 7# required to install external modules against a kernel source
8# tree. 8# tree.
85IUSE="" # don't put pcmcia here, rather in the ebuilds that actually support pcmcia 85IUSE="" # don't put pcmcia here, rather in the ebuilds that actually support pcmcia
86SLOT="0" 86SLOT="0"
87DESCRIPTION="Based on the $ECLASS eclass" 87DESCRIPTION="Based on the $ECLASS eclass"
88RDEPEND="virtual/modutils 88RDEPEND="virtual/modutils
89 pcmcia? ( virtual/pcmcia )" 89 pcmcia? ( virtual/pcmcia )"
90DEPEND="virtual/linux-sources 90DEPEND="sys-apps/sed
91 sys-apps/sed
92 pcmcia? ( virtual/pcmcia )" 91 pcmcia? ( virtual/pcmcia )"
93 92
94# eclass utilities 93# eclass utilities
95# ---------------------------------- 94# ----------------------------------
96 95
255 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/ 254 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/
256 move_old_moduledb 255 move_old_moduledb
257 256
258 if [[ -n $(grep ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb) ]]; then 257 if [[ -n $(grep ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb) ]]; then
259 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb." 258 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb."
260 sed -ie "/.*${CATEGORY}\/${P}.*/d" ${MODULEDB_DIR}/moduledb 259 sed -ie "/.*${CATEGORY}\/${PN}-${PVR}.*/d" ${MODULEDB_DIR}/moduledb
261 fi 260 fi
262} 261}
263 262
264set_kvobj() { 263set_kvobj() {
265 if kernel_is 2 6 264 if kernel_is 2 6
461linux-mod_pkg_setup() { 460linux-mod_pkg_setup() {
462 linux-info_pkg_setup; 461 linux-info_pkg_setup;
463 check_kernel_built; 462 check_kernel_built;
464 check_modules_supported; 463 check_modules_supported;
465 set_kvobj; 464 set_kvobj;
465 # Commented out with permission from johnm until a fixed version for arches
466 # who intentionally use different kernel and userland compilers can be
467 # introduced - Jason Wever <weeve@gentoo.org>, 23 Oct 2005
466 check_vermagic; 468 #check_vermagic;
467} 469}
468 470
469linux-mod_src_compile() { 471linux-mod_src_compile() {
470 local modulename libdir srcdir objdir i n myARCH="${ARCH}" 472 local modulename libdir srcdir objdir i n myARCH="${ARCH}"
471 ARCH="$(tc-arch-kernel)" 473 ARCH="$(tc-arch-kernel)"
527 libdir=${libdir:-misc} 529 libdir=${libdir:-misc}
528 srcdir=${srcdir:-${S}} 530 srcdir=${srcdir:-${S}}
529 objdir=${objdir:-${srcdir}} 531 objdir=${objdir:-${srcdir}}
530 532
531 einfo "Installing ${modulename} module" 533 einfo "Installing ${modulename} module"
532 cd ${objdir} 534 cd ${objdir} || die "${objdir} does not exist"
533 insinto ${ROOT}lib/modules/${KV_FULL}/${libdir} 535 insinto /lib/modules/${KV_FULL}/${libdir}
534 doins ${modulename}.${KV_OBJ} 536 doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed"
535 cd ${OLDPWD} 537 cd ${OLDPWD}
536 538
537 generate_modulesd ${objdir}/${modulename} 539 generate_modulesd ${objdir}/${modulename}
538 done 540 done
539} 541}

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.20