/[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.93 Revision 1.103
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2011 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.93 2008/11/05 12:00:19 dsd Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.103 2011/08/09 22:11:53 vapier Exp $
4 4
5# Author(s): John Mylchreest <johnm@gentoo.org>, 5# Author(s): John Mylchreest <johnm@gentoo.org>,
6# Stefan Schweizer <genstef@gentoo.org> 6# Stefan Schweizer <genstef@gentoo.org>
7# Maintainer: kernel-misc@gentoo.org 7# Maintainer: kernel-misc@gentoo.org
8# 8#
55# srcdir = place for ebuild to cd to before running make (by default it's ${S}) 55# srcdir = place for ebuild to cd to before running make (by default it's ${S})
56# objdir = place the .ko and objects are located after make runs (by default it's set to srcdir) 56# objdir = place the .ko and objects are located after make runs (by default it's set to srcdir)
57# 57#
58# To get an idea of how these variables are used, here's a few lines 58# To get an idea of how these variables are used, here's a few lines
59# of code from around line 540 in this eclass: 59# of code from around line 540 in this eclass:
60# 60#
61# einfo "Installing ${modulename} module" 61# einfo "Installing ${modulename} module"
62# cd ${objdir} || die "${objdir} does not exist" 62# cd ${objdir} || die "${objdir} does not exist"
63# insinto /lib/modules/${KV_FULL}/${libdir} 63# insinto /lib/modules/${KV_FULL}/${libdir}
64# doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" 64# doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed"
65# 65#
123 123
124# @ECLASS-VARIABLE: KV_OBJ 124# @ECLASS-VARIABLE: KV_OBJ
125# @DESCRIPTION: 125# @DESCRIPTION:
126# It's a read-only variable. It contains the extension of the kernel modules. 126# It's a read-only variable. It contains the extension of the kernel modules.
127 127
128# The order of these is important as both of linux-info and eutils contain
129# set_arch_to_kernel and set_arch_to_portage functions and the ones in eutils
130# are deprecated in favor of the ones in linux-info.
131# See http://bugs.gentoo.org/show_bug.cgi?id=127506
132
133inherit eutils linux-info multilib 128inherit eutils linux-info multilib
134EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm 129EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst src_install src_compile pkg_postrm
135 130
136IUSE="kernel_linux" 131IUSE="kernel_linux"
137SLOT="0" 132SLOT="0"
138DESCRIPTION="Based on the $ECLASS eclass" 133DESCRIPTION="Based on the $ECLASS eclass"
139RDEPEND="kernel_linux? ( virtual/modutils )" 134RDEPEND="kernel_linux? ( sys-apps/module-init-tools )"
140DEPEND="${RDEPEND} 135DEPEND="${RDEPEND}
141 sys-apps/sed" 136 sys-apps/sed
137 kernel_linux? ( virtual/linux-sources )"
142 138
143# eclass utilities 139# eclass utilities
144# ---------------------------------- 140# ----------------------------------
145 141
146check_vermagic() { 142check_vermagic() {
147 debug-print-function ${FUNCNAME} $* 143 debug-print-function ${FUNCNAME} $*
148 144
149 local curr_gcc_ver=$(gcc -dumpversion) 145 local curr_gcc_ver=$(gcc -dumpversion)
150 local tmpfile old_chost old_gcc_ver result=0 146 local tmpfile old_chost old_gcc_ver result=0
151 147
152 tmpfile=`find ${KV_DIR}/ -iname "*.o.cmd" -exec grep usr/lib/gcc {} \; -quit` 148 tmpfile=`find "${KV_DIR}/" -iname "*.o.cmd" -exec grep usr/lib/gcc {} \; -quit`
153 tmpfile=${tmpfile//*usr/lib} 149 tmpfile=${tmpfile//*usr/lib}
154 tmpfile=${tmpfile//\/include*} 150 tmpfile=${tmpfile//\/include*}
155 old_chost=${tmpfile//*gcc\/} 151 old_chost=${tmpfile//*gcc\/}
156 old_chost=${old_chost//\/*} 152 old_chost=${old_chost//\/*}
157 old_gcc_ver=${tmpfile//*\/} 153 old_gcc_ver=${tmpfile//*\/}
192 # if we haven't determined the version yet, we need too. 188 # if we haven't determined the version yet, we need too.
193 get_version; 189 get_version;
194 190
195 # if the kernel version is greater than 2.6.6 then we should use 191 # if the kernel version is greater than 2.6.6 then we should use
196 # M= instead of SUBDIRS= 192 # M= instead of SUBDIRS=
193 [ ${KV_MAJOR} -eq 3 ] && return 0
197 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \ 194 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -gt 5 -a ${KV_PATCH} -gt 5 ] && \
198 return 0 || return 1 195 return 0 || return 1
199} 196}
200 197
201# @FUNCTION: convert_to_m 198# @FUNCTION: convert_to_m
208 if use_m 205 if use_m
209 then 206 then
210 [ ! -f "${1}" ] && \ 207 [ ! -f "${1}" ] && \
211 die "convert_to_m() requires a filename as an argument" 208 die "convert_to_m() requires a filename as an argument"
212 ebegin "Converting ${1/${WORKDIR}\//} to use M= instead of SUBDIRS=" 209 ebegin "Converting ${1/${WORKDIR}\//} to use M= instead of SUBDIRS="
213 sed -i 's:SUBDIRS=:M=:g' ${1} 210 sed -i 's:SUBDIRS=:M=:g' "${1}"
214 eend $? 211 eend $?
215 fi 212 fi
216} 213}
217 214
218# internal function 215# internal function
225 222
226 # if we haven't determined the version yet, we need too. 223 # if we haven't determined the version yet, we need too.
227 get_version; 224 get_version;
228 225
229 ebegin "Updating module dependencies for ${KV_FULL}" 226 ebegin "Updating module dependencies for ${KV_FULL}"
230 if [ -r ${KV_OUT_DIR}/System.map ] 227 if [ -r "${KV_OUT_DIR}"/System.map ]
231 then 228 then
232 depmod -ae -F ${KV_OUT_DIR}/System.map -b ${ROOT} -r ${KV_FULL} 229 depmod -ae -F "${KV_OUT_DIR}"/System.map -b "${ROOT}" -r ${KV_FULL}
233 eend $? 230 eend $?
234 else 231 else
235 ewarn 232 ewarn
236 ewarn "${KV_OUT_DIR}/System.map not found." 233 ewarn "${KV_OUT_DIR}/System.map not found."
237 ewarn "You must manually update the kernel module dependencies using depmod." 234 ewarn "You must manually update the kernel module dependencies using depmod."
247# It calls the update-modules utility. 244# It calls the update-modules utility.
248update_modules() { 245update_modules() {
249 debug-print-function ${FUNCNAME} $* 246 debug-print-function ${FUNCNAME} $*
250 247
251 if [ -x /sbin/update-modules ] && \ 248 if [ -x /sbin/update-modules ] && \
252 grep -v -e "^#" -e "^$" ${D}/etc/modules.d/* >/dev/null 2>&1; then 249 grep -v -e "^#" -e "^$" "${D}"/etc/modules.d/* >/dev/null 2>&1; then
253 ebegin "Updating modules.conf" 250 ebegin "Updating modules.conf"
254 /sbin/update-modules 251 /sbin/update-modules
255 eend $? 252 eend $?
256 elif [ -x /sbin/update-modules ] && \ 253 elif [ -x /sbin/update-modules ] && \
257 grep -v -e "^#" -e "^$" ${D}/etc/modules.d/* >/dev/null 2>&1; then 254 grep -v -e "^#" -e "^$" "${D}"/etc/modules.d/* >/dev/null 2>&1; then
258 ebegin "Updating modules.conf" 255 ebegin "Updating modules.conf"
259 /sbin/update-modules 256 /sbin/update-modules
260 eend $? 257 eend $?
261 fi 258 fi
262} 259}
267# DESCRIPTION: 264# DESCRIPTION:
268# It updates the location of the database used by the module-rebuild utility. 265# It updates the location of the database used by the module-rebuild utility.
269move_old_moduledb() { 266move_old_moduledb() {
270 debug-print-function ${FUNCNAME} $* 267 debug-print-function ${FUNCNAME} $*
271 268
272 local OLDDIR=${ROOT}/usr/share/module-rebuild/ 269 local OLDDIR="${ROOT}"/usr/share/module-rebuild/
273 local NEWDIR=${ROOT}/var/lib/module-rebuild/ 270 local NEWDIR="${ROOT}"/var/lib/module-rebuild/
274 271
275 if [[ -f ${OLDDIR}/moduledb ]]; then 272 if [[ -f "${OLDDIR}"/moduledb ]]; then
276 [[ ! -d ${NEWDIR} ]] && mkdir -p ${NEWDIR} 273 [[ ! -d "${NEWDIR}" ]] && mkdir -p "${NEWDIR}"
277 [[ ! -f ${NEWDIR}/moduledb ]] && \ 274 [[ ! -f "${NEWDIR}"/moduledb ]] && \
278 mv ${OLDDIR}/moduledb ${NEWDIR}/moduledb 275 mv "${OLDDIR}"/moduledb "${NEWDIR}"/moduledb
279 rm -f ${OLDDIR}/* 276 rm -f "${OLDDIR}"/*
280 rmdir ${OLDDIR} 277 rmdir "${OLDDIR}"
281 fi 278 fi
282} 279}
283 280
284# internal function 281# internal function
285# 282#
287# DESCRIPTION: 284# DESCRIPTION:
288# It adds the package to the /var/lib/module-rebuild/moduledb database used by the module-rebuild utility. 285# It adds the package to the /var/lib/module-rebuild/moduledb database used by the module-rebuild utility.
289update_moduledb() { 286update_moduledb() {
290 debug-print-function ${FUNCNAME} $* 287 debug-print-function ${FUNCNAME} $*
291 288
292 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/ 289 local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
293 move_old_moduledb 290 move_old_moduledb
294 291
295 if [[ ! -f ${MODULEDB_DIR}/moduledb ]]; then 292 if [[ ! -f "${MODULEDB_DIR}"/moduledb ]]; then
296 [[ ! -d ${MODULEDB_DIR} ]] && mkdir -p ${MODULEDB_DIR} 293 [[ ! -d "${MODULEDB_DIR}" ]] && mkdir -p "${MODULEDB_DIR}"
297 touch ${MODULEDB_DIR}/moduledb 294 touch "${MODULEDB_DIR}"/moduledb
298 fi 295 fi
299 296
300 if ! grep -qs ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb ; then 297 if ! grep -qs ${CATEGORY}/${PN}-${PVR} "${MODULEDB_DIR}"/moduledb ; then
301 einfo "Adding module to moduledb." 298 einfo "Adding module to moduledb."
302 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> ${MODULEDB_DIR}/moduledb 299 echo "a:1:${CATEGORY}/${PN}-${PVR}" >> "${MODULEDB_DIR}"/moduledb
303 fi 300 fi
304} 301}
305 302
306# internal function 303# internal function
307# 304#
310# It removes the package from the /var/lib/module-rebuild/moduledb database used by 307# It removes the package from the /var/lib/module-rebuild/moduledb database used by
311# the module-rebuild utility. 308# the module-rebuild utility.
312remove_moduledb() { 309remove_moduledb() {
313 debug-print-function ${FUNCNAME} $* 310 debug-print-function ${FUNCNAME} $*
314 311
315 local MODULEDB_DIR=${ROOT}/var/lib/module-rebuild/ 312 local MODULEDB_DIR="${ROOT}"/var/lib/module-rebuild/
316 move_old_moduledb 313 move_old_moduledb
317 314
318 if grep -qs ${CATEGORY}/${PN}-${PVR} ${MODULEDB_DIR}/moduledb ; then 315 if grep -qs ${CATEGORY}/${PN}-${PVR} "${MODULEDB_DIR}"/moduledb ; then
319 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb." 316 einfo "Removing ${CATEGORY}/${PN}-${PVR} from moduledb."
320 sed -i -e "/.*${CATEGORY}\/${PN}-${PVR}.*/d" ${MODULEDB_DIR}/moduledb 317 sed -i -e "/.*${CATEGORY}\/${PN}-${PVR}.*/d" "${MODULEDB_DIR}"/moduledb
321 fi 318 fi
322} 319}
323 320
324# @FUNCTION: set_kvobj 321# @FUNCTION: set_kvobj
325# @DESCRIPTION: 322# @DESCRIPTION:
326# It sets the KV_OBJ variable. 323# It sets the KV_OBJ variable.
327set_kvobj() { 324set_kvobj() {
328 debug-print-function ${FUNCNAME} $* 325 debug-print-function ${FUNCNAME} $*
329 326
330 if kernel_is 2 6 327 if kernel_is ge 2 6
331 then 328 then
332 KV_OBJ="ko" 329 KV_OBJ="ko"
333 else 330 else
334 KV_OBJ="o" 331 KV_OBJ="o"
335 fi 332 fi
413 module_modinfo="$(modinfo -p ${currm_path}.${KV_OBJ})" 410 module_modinfo="$(modinfo -p ${currm_path}.${KV_OBJ})"
414 module_config="${T}/modulesd-${currm}" 411 module_config="${T}/modulesd-${currm}"
415 412
416 ebegin "Preparing file for modules.d" 413 ebegin "Preparing file for modules.d"
417 #----------------------------------------------------------------------- 414 #-----------------------------------------------------------------------
418 echo "# modules.d configuration file for ${currm}" >> ${module_config} 415 echo "# modules.d configuration file for ${currm}" >> "${module_config}"
419 #----------------------------------------------------------------------- 416 #-----------------------------------------------------------------------
420 [[ -n ${module_docs} ]] && \ 417 [[ -n ${module_docs} ]] && \
421 echo "# For more information please read:" >> ${module_config} 418 echo "# For more information please read:" >> "${module_config}"
422 for t in ${module_docs} 419 for t in ${module_docs}
423 do 420 do
424 echo "# ${t//*\/}" >> ${module_config} 421 echo "# ${t//*\/}" >> "${module_config}"
425 done 422 done
426 echo >> ${module_config} 423 echo >> "${module_config}"
427 424
428 #----------------------------------------------------------------------- 425 #-----------------------------------------------------------------------
429 if [[ ${module_aliases} -gt 0 ]] 426 if [[ ${module_aliases} -gt 0 ]]
430 then 427 then
431 echo "# Internal Aliases - Do not edit" >> ${module_config} 428 echo "# Internal Aliases - Do not edit" >> "${module_config}"
432 echo "# ------------------------------" >> ${module_config} 429 echo "# ------------------------------" >> "${module_config}"
433 430
434 for((t=0; t<${module_aliases}; t++)) 431 for((t=0; t<${module_aliases}; t++))
435 do 432 do
436 echo "alias $(eval echo \${MODULESD_${currm}_ALIASES[$t]})" \ 433 echo "alias $(eval echo \${MODULESD_${currm}_ALIASES[$t]})" \
437 >> ${module_config} 434 >> "${module_config}"
438 done 435 done
439 echo '' >> ${module_config} 436 echo '' >> "${module_config}"
440 fi 437 fi
441 438
442 #----------------------------------------------------------------------- 439 #-----------------------------------------------------------------------
443 if [[ -n ${module_modinfo} ]] 440 if [[ -n ${module_modinfo} ]]
444 then 441 then
445 echo >> ${module_config} 442 echo >> "${module_config}"
446 echo "# Configurable module parameters" >> ${module_config} 443 echo "# Configurable module parameters" >> "${module_config}"
447 echo "# ------------------------------" >> ${module_config} 444 echo "# ------------------------------" >> "${module_config}"
448 myIFS="${IFS}" 445 myIFS="${IFS}"
449 IFS="$(echo -en "\n\b")" 446 IFS="$(echo -en "\n\b")"
450 447
451 for t in ${module_modinfo} 448 for t in ${module_modinfo}
452 do 449 do
453 myVAR="$(echo ${t#*:} | grep -e " [0-9][ =]" | sed "s:.*\([01][= ]\).*:\1:")" 450 myVAR="$(echo ${t#*:} | grep -e " [0-9][ =]" | sed "s:.*\([01][= ]\).*:\1:")"
454 if [[ -n ${myVAR} ]] 451 if [[ -n ${myVAR} ]]
455 then 452 then
456 module_opts="${module_opts} ${t%%:*}:${myVAR}" 453 module_opts="${module_opts} ${t%%:*}:${myVAR}"
457 fi 454 fi
458 echo -e "# ${t%%:*}:\t${t#*:}" >> ${module_config} 455 echo -e "# ${t%%:*}:\t${t#*:}" >> "${module_config}"
459 done 456 done
460 IFS="${myIFS}" 457 IFS="${myIFS}"
461 echo '' >> ${module_config} 458 echo '' >> "${module_config}"
462 fi 459 fi
463 460
464 #----------------------------------------------------------------------- 461 #-----------------------------------------------------------------------
465 if [[ $(eval echo \${MODULESD_${currm}_ALIASES[0]}) == guess ]] 462 if [[ $(eval echo \${MODULESD_${currm}_ALIASES[0]}) == guess ]]
466 then 463 then
467 # So lets do some guesswork eh? 464 # So lets do some guesswork eh?
468 if [[ -n ${module_opts} ]] 465 if [[ -n ${module_opts} ]]
469 then 466 then
470 echo "# For Example..." >> ${module_config} 467 echo "# For Example..." >> "${module_config}"
471 echo "# --------------" >> ${module_config} 468 echo "# --------------" >> "${module_config}"
472 for t in ${module_opts} 469 for t in ${module_opts}
473 do 470 do
474 echo "# options ${currm} ${t//:*}=${t//*:}" >> ${module_config} 471 echo "# options ${currm} ${t//:*}=${t//*:}" >> "${module_config}"
475 done 472 done
476 echo '' >> ${module_config} 473 echo '' >> "${module_config}"
477 fi 474 fi
478 elif [[ ${module_examples} -gt 0 ]] 475 elif [[ ${module_examples} -gt 0 ]]
479 then 476 then
480 echo "# For Example..." >> ${module_config} 477 echo "# For Example..." >> "${module_config}"
481 echo "# --------------" >> ${module_config} 478 echo "# --------------" >> "${module_config}"
482 for((t=0; t<${module_examples}; t++)) 479 for((t=0; t<${module_examples}; t++))
483 do 480 do
484 echo "options $(eval echo \${MODULESD_${currm}_EXAMPLES[$t]})" \ 481 echo "options $(eval echo \${MODULESD_${currm}_EXAMPLES[$t]})" \
485 >> ${module_config} 482 >> "${module_config}"
486 done 483 done
487 echo '' >> ${module_config} 484 echo '' >> "${module_config}"
488 fi 485 fi
489 486
490 #----------------------------------------------------------------------- 487 #-----------------------------------------------------------------------
491 if [[ ${module_additions} -gt 0 ]] 488 if [[ ${module_additions} -gt 0 ]]
492 then 489 then
493 for((t=0; t<${module_additions}; t++)) 490 for((t=0; t<${module_additions}; t++))
494 do 491 do
495 echo "$(eval echo \${MODULESD_${currm}_ADDITIONS[$t]})" \ 492 echo "$(eval echo \${MODULESD_${currm}_ADDITIONS[$t]})" \
496 >> ${module_config} 493 >> "${module_config}"
497 done 494 done
498 echo '' >> ${module_config} 495 echo '' >> "${module_config}"
499 fi 496 fi
500 497
501 #----------------------------------------------------------------------- 498 #-----------------------------------------------------------------------
502 499
503 # then we install it 500 # then we install it
504 if kernel_is ge 2 6; then 501 if kernel_is ge 2 6; then
505 insinto /etc/modprobe.d 502 insinto /etc/modprobe.d
506 else 503 else
507 insinto /etc/modules.d 504 insinto /etc/modules.d
508 fi 505 fi
509 newins ${module_config} ${currm_path//*\/} 506 newins "${module_config}" "${currm_path//*\/}.conf"
510 507
511 # and install any documentation we might have. 508 # and install any documentation we might have.
512 [[ -n ${module_docs} ]] && dodoc ${module_docs} 509 [[ -n ${module_docs} ]] && dodoc ${module_docs}
513 done 510 done
514 eend 0 511 eend 0
573# configured, verifies that the sources are prepared, verifies that the modules support is builtin 570# configured, verifies that the sources are prepared, verifies that the modules support is builtin
574# in the kernel and sets the object extension KV_OBJ. 571# in the kernel and sets the object extension KV_OBJ.
575linux-mod_pkg_setup() { 572linux-mod_pkg_setup() {
576 debug-print-function ${FUNCNAME} $* 573 debug-print-function ${FUNCNAME} $*
577 574
575 local is_bin="${MERGE_TYPE}"
576
577 # If we are installing a binpkg, take a different path.
578 # use MERGE_TYPE if available (eapi>=4); else use non-PMS EMERGE_FROM (eapi<4)
579 if has ${EAPI} 0 1 2 3; then
580 is_bin=${EMERGE_FROM}
581 fi
582
583 if [[ ${is_bin} == binary ]]; then
584 linux-mod_pkg_setup_binary
585 return
586 fi
587
578 linux-info_pkg_setup; 588 linux-info_pkg_setup;
579 require_configured_kernel 589 require_configured_kernel
580 check_kernel_built; 590 check_kernel_built;
581 strip_modulenames; 591 strip_modulenames;
582 [[ -n ${MODULE_NAMES} ]] && check_modules_supported 592 [[ -n ${MODULE_NAMES} ]] && check_modules_supported
583 set_kvobj; 593 set_kvobj;
584 # Commented out with permission from johnm until a fixed version for arches 594 # Commented out with permission from johnm until a fixed version for arches
585 # who intentionally use different kernel and userland compilers can be 595 # who intentionally use different kernel and userland compilers can be
586 # introduced - Jason Wever <weeve@gentoo.org>, 23 Oct 2005 596 # introduced - Jason Wever <weeve@gentoo.org>, 23 Oct 2005
587 #check_vermagic; 597 #check_vermagic;
598}
599
600# @FUNCTION: linux-mod_pkg_setup_binary
601# @DESCRIPTION:
602# Perform all kernel option checks non-fatally, as the .config and
603# /proc/config.gz might not be present. Do not do anything that requires kernel
604# sources.
605linux-mod_pkg_setup_binary() {
606 debug-print-function ${FUNCNAME} $*
607 local new_CONFIG_CHECK
608 # ~ needs always to be quoted, else bash expands it.
609 for config in $CONFIG_CHECK ; do
610 optional='~'
611 [[ ${config:0:1} == "~" ]] && optional=''
612 new_CONFIG_CHECK="${new_CONFIG_CHECK} ${optional}${config}"
613 done
614 export CONFIG_CHECK="${new_CONFIG_CHECK}"
615 linux-info_pkg_setup;
588} 616}
589 617
590strip_modulenames() { 618strip_modulenames() {
591 debug-print-function ${FUNCNAME} $* 619 debug-print-function ${FUNCNAME} $*
592 620
626 srcdir=${srcdir:-${S}} 654 srcdir=${srcdir:-${S}}
627 objdir=${objdir:-${srcdir}} 655 objdir=${objdir:-${srcdir}}
628 656
629 if [ ! -f "${srcdir}/.built" ]; 657 if [ ! -f "${srcdir}/.built" ];
630 then 658 then
631 cd ${srcdir} 659 cd "${srcdir}"
632 ln -s "${S}"/Module.symvers Module.symvers 660 ln -s "${S}"/Module.symvers Module.symvers
633 einfo "Preparing ${modulename} module" 661 einfo "Preparing ${modulename} module"
634 if [[ -n ${ECONF_PARAMS} ]] 662 if [[ -n ${ECONF_PARAMS} ]]
635 then 663 then
636 econf ${ECONF_PARAMS} || \ 664 econf ${ECONF_PARAMS} || \
647 LDFLAGS=\"$(get_abi_LDFLAGS)\" \ 675 LDFLAGS=\"$(get_abi_LDFLAGS)\" \
648 ${BUILD_FIXES} \ 676 ${BUILD_FIXES} \
649 ${BUILD_PARAMS} \ 677 ${BUILD_PARAMS} \
650 ${BUILD_TARGETS} " \ 678 ${BUILD_TARGETS} " \
651 || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}" 679 || die "Unable to emake HOSTCC="$(tc-getBUILD_CC)" CROSS_COMPILE=${CHOST}- LDFLAGS="$(get_abi_LDFLAGS)" ${BUILD_FIXES} ${BUILD_PARAMS} ${BUILD_TARGETS}"
652 cd ${OLDPWD} 680 cd "${OLDPWD}"
653 touch ${srcdir}/.built 681 touch "${srcdir}"/.built
654 fi 682 fi
655 done 683 done
656 684
657 set_arch_to_portage 685 set_arch_to_portage
658 ABI="${myABI}" 686 ABI="${myABI}"
685 libdir=${libdir:-misc} 713 libdir=${libdir:-misc}
686 srcdir=${srcdir:-${S}} 714 srcdir=${srcdir:-${S}}
687 objdir=${objdir:-${srcdir}} 715 objdir=${objdir:-${srcdir}}
688 716
689 einfo "Installing ${modulename} module" 717 einfo "Installing ${modulename} module"
690 cd ${objdir} || die "${objdir} does not exist" 718 cd "${objdir}" || die "${objdir} does not exist"
691 insinto /lib/modules/${KV_FULL}/${libdir} 719 insinto /lib/modules/${KV_FULL}/${libdir}
692 doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed" 720 doins ${modulename}.${KV_OBJ} || die "doins ${modulename}.${KV_OBJ} failed"
693 cd ${OLDPWD} 721 cd "${OLDPWD}"
694 722
695 generate_modulesd ${objdir}/${modulename} 723 generate_modulesd "${objdir}/${modulename}"
696 done 724 done
697} 725}
698 726
699# @FUNCTION: linux-mod_pkg_preinst 727# @FUNCTION: linux-mod_pkg_preinst
700# @DESCRIPTION: 728# @DESCRIPTION:

Legend:
Removed from v.1.93  
changed lines
  Added in v.1.103

  ViewVC Help
Powered by ViewVC 1.1.20