/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

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

Revision 1.175 Revision 1.176
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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/kernel-2.eclass,v 1.175 2006/05/05 13:14:29 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.176 2006/05/06 17:57:16 flameeyes Exp $
4 4
5# Description: kernel.eclass rewrite for a clean base regarding the 2.6 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
6# series of kernel with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
7# 7#
8# Maintainer: John Mylchreest <johnm@gentoo.org> 8# Maintainer: John Mylchreest <johnm@gentoo.org>
468# install functions 468# install functions
469#============================================================== 469#==============================================================
470install_universal() { 470install_universal() {
471 #fix silly permissions in tarball 471 #fix silly permissions in tarball
472 cd ${WORKDIR} 472 cd ${WORKDIR}
473 chown -R root:root * 473 chown -R root:0 *
474 chmod -R a+r-w+X,u+w * 474 chmod -R a+r-w+X,u+w *
475 cd ${OLDPWD} 475 cd ${OLDPWD}
476} 476}
477 477
478install_headers() { 478install_headers() {
479 local ddir=$(kernel_header_destdir) 479 local ddir=$(kernel_header_destdir)
480 480
481 cd "${S}" 481 cd "${S}"
482 dodir ${ddir}/linux 482 dodir ${ddir}/linux
483 cp -ax "${S}"/include/linux/* ${D}/${ddir}/linux 483 cp -pPR "${S}"/include/linux/* ${D}/${ddir}/linux
484 rm -rf ${D}/${ddir}/linux/modules 484 rm -rf ${D}/${ddir}/linux/modules
485 485
486 # Handle multilib headers and crap 486 # Handle multilib headers and crap
487 local multi_dirs="" multi_defs="" 487 local multi_dirs="" multi_defs=""
488 case $(tc-arch-kernel) in 488 case $(tc-arch-kernel) in
502 multi_dirs="s390 s390x" 502 multi_dirs="s390 s390x"
503 multi_defs="!__s390x__ __s390x__" 503 multi_defs="!__s390x__ __s390x__"
504 ;; 504 ;;
505 arm) 505 arm)
506 dodir ${ddir}/asm 506 dodir ${ddir}/asm
507 cp -ax "${S}"/include/asm/* "${D}"/${ddir}/asm 507 cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm
508 [[ ! -e ${D}/${ddir}/asm/arch ]] && ln -sf arch-ebsa285 "${D}"/${ddir}/asm/arch 508 [[ ! -e ${D}/${ddir}/asm/arch ]] && ln -sf arch-ebsa285 "${D}"/${ddir}/asm/arch
509 [[ ! -e ${D}/${ddir}/asm/proc ]] && ln -sf proc-armv "${D}"/${ddir}/asm/proc 509 [[ ! -e ${D}/${ddir}/asm/proc ]] && ln -sf proc-armv "${D}"/${ddir}/asm/proc
510 ;; 510 ;;
511 powerpc) 511 powerpc)
512 dodir ${ddir}/asm 512 dodir ${ddir}/asm
513 cp -ax "${S}"/include/asm/* ${D}/${ddir}/asm 513 cp -pPR "${S}"/include/asm/* ${D}/${ddir}/asm
514 if [[ -e "${S}"/include/asm-ppc ]] ; then 514 if [[ -e "${S}"/include/asm-ppc ]] ; then
515 dodir ${ddir}/asm-ppc 515 dodir ${ddir}/asm-ppc
516 cp -ax "${S}"/include/asm-ppc/* ${D}/${ddir}/asm-ppc 516 cp -pPR "${S}"/include/asm-ppc/* ${D}/${ddir}/asm-ppc
517 fi 517 fi
518 ;; 518 ;;
519 *) 519 *)
520 dodir ${ddir}/asm 520 dodir ${ddir}/asm
521 cp -ax "${S}"/include/asm/* ${D}/${ddir}/asm 521 cp -pPR "${S}"/include/asm/* ${D}/${ddir}/asm
522 ;; 522 ;;
523 esac 523 esac
524 if [[ -n ${multi_dirs} ]] ; then 524 if [[ -n ${multi_dirs} ]] ; then
525 local d ml_inc="" 525 local d ml_inc=""
526 for d in ${multi_dirs} ; do 526 for d in ${multi_dirs} ; do
527 dodir ${ddir}/asm-${d} 527 dodir ${ddir}/asm-${d}
528 cp -ax "${S}"/include/asm-${d}/* ${D}/${ddir}/asm-${d}/ || die "cp asm-${d} failed" 528 cp -pPR "${S}"/include/asm-${d}/* ${D}/${ddir}/asm-${d}/ || die "cp asm-${d} failed"
529 529
530 ml_inc="${ml_inc} ${multi_defs%% *}:${ddir}/asm-${d}" 530 ml_inc="${ml_inc} ${multi_defs%% *}:${ddir}/asm-${d}"
531 multi_defs=${multi_defs#* } 531 multi_defs=${multi_defs#* }
532 done 532 done
533 create_ml_includes ${ddir}/asm ${ml_inc} 533 create_ml_includes ${ddir}/asm ${ml_inc}
534 fi 534 fi
535 535
536 if kernel_is 2 6; then 536 if kernel_is 2 6; then
537 dodir ${ddir}/asm-generic 537 dodir ${ddir}/asm-generic
538 cp -ax "${S}"/include/asm-generic/* ${D}/${ddir}/asm-generic 538 cp -pPR "${S}"/include/asm-generic/* ${D}/${ddir}/asm-generic
539 fi 539 fi
540 540
541 # clean up 541 # clean up
542 find "${D}" -name '*.orig' -exec rm -f {} \; 542 find "${D}" -name '*.orig' -exec rm -f {} \;
543 543

Legend:
Removed from v.1.175  
changed lines
  Added in v.1.176

  ViewVC Help
Powered by ViewVC 1.1.20