/[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.244 Revision 1.245
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.244 2011/02/18 20:07:18 mpagano Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.245 2011/03/10 01:04:03 vapier 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# Original author: John Mylchreest <johnm@gentoo.org> 8# Original author: John Mylchreest <johnm@gentoo.org>
583 return 0 583 return 0
584 fi 584 fi
585 585
586 # Do not use "linux/*" as that can cause problems with very long 586 # Do not use "linux/*" as that can cause problems with very long
587 # $S values where the cmdline to cp is too long 587 # $S values where the cmdline to cp is too long
588 cd "${S}" 588 pushd "${S}" >/dev/null
589 dodir ${ddir}/linux 589 dodir ${ddir}/linux
590 cp -pPR "${S}"/include/linux "${D}"/${ddir}/ || die 590 cp -pPR "${S}"/include/linux "${D}"/${ddir}/ || die
591 rm -rf "${D}"/${ddir}/linux/modules 591 rm -rf "${D}"/${ddir}/linux/modules
592 592
593 # Handle multilib headers and crap
594 local multi_dirs="" multi_defs=""
595 case $(tc-arch-kernel) in
596 sparc64)
597 multi_dirs="sparc sparc64"
598 multi_defs="!__arch64__ __arch64__"
599 ;;
600 x86_64)
601 multi_dirs="i386 x86_64"
602 multi_defs="__i386__ __x86_64__"
603 ;;
604 ppc64)
605 multi_dirs="ppc ppc64"
606 multi_defs="!__powerpc64__ __powerpc64__"
607 ;;
608 s390x)
609 multi_dirs="s390 s390x"
610 multi_defs="!__s390x__ __s390x__"
611 ;;
612 arm)
613 dodir ${ddir}/asm 593 dodir ${ddir}/asm
614 cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm 594 cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm
615 [[ ! -e ${D}/${ddir}/asm/arch ]] && ln -sf arch-ebsa285 "${D}"/${ddir}/asm/arch
616 [[ ! -e ${D}/${ddir}/asm/proc ]] && ln -sf proc-armv "${D}"/${ddir}/asm/proc
617 ;;
618 powerpc)
619 dodir ${ddir}/asm
620 cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm
621 if [[ -e "${S}"/include/asm-ppc ]] ; then
622 dodir ${ddir}/asm-ppc
623 cp -pPR "${S}"/include/asm-ppc/* "${D}"/${ddir}/asm-ppc
624 fi
625 ;;
626 *)
627 dodir ${ddir}/asm
628 cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm
629 ;;
630 esac
631 if [[ -n ${multi_dirs} ]] ; then
632 local d ml_inc=""
633 for d in ${multi_dirs} ; do
634 dodir ${ddir}/asm-${d}
635 cp -pPR "${S}"/include/asm-${d}/* "${D}"/${ddir}/asm-${d}/ || die "cp asm-${d} failed"
636 595
637 ml_inc="${ml_inc} ${multi_defs%% *}:${ddir}/asm-${d}"
638 multi_defs=${multi_defs#* }
639 done
640 create_ml_includes ${ddir}/asm ${ml_inc}
641 fi
642
643 if kernel_is 2 6; then 596 if kernel_is 2 6 ; then
644 dodir ${ddir}/asm-generic 597 dodir ${ddir}/asm-generic
645 cp -pPR "${S}"/include/asm-generic/* "${D}"/${ddir}/asm-generic 598 cp -pPR "${S}"/include/asm-generic/* "${D}"/${ddir}/asm-generic
646 fi 599 fi
647 600
648 # clean up 601 # clean up
649 find "${D}" -name '*.orig' -exec rm -f {} \; 602 find "${D}" -name '*.orig' -exec rm -f {} \;
650 603
651 cd ${OLDPWD} 604 popd >/dev/null
652} 605}
653 606
654install_sources() { 607install_sources() {
655 local file 608 local file
656 609

Legend:
Removed from v.1.244  
changed lines
  Added in v.1.245

  ViewVC Help
Powered by ViewVC 1.1.20