--- linux-headers-2.4.20.ebuild-orig 2003-03-24 03:56:22.000000000 +0000 +++ linux-headers-2.4.20.ebuild 2003-03-24 03:56:34.000000000 +0000 @@ -1,7 +1,11 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. +# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 #OKV=original kernel version, KV=patched kernel version. They can be the same. +inherit crosscompile + +# For want of a better spot this will do + #we use this next variable to avoid duplicating stuff on cvs GFILESDIR=${PORTDIR}/sys-kernel/linux-sources/files SPARCFILEDIR=${PORTDIR}/sys-kernel/sparc-sources/files @@ -17,7 +21,7 @@ HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/" LICENSE="GPL-2" SLOT="${KV}" -KEYWORDS="hppa -x86 -ppc -sparc -alpha" +KEYWORDS="hppa x86 -ppc -sparc -alpha" KERNEL_ARCH=`echo $ARCH |\ sed -e s/[i]*.86/i386/ -e s/sun4u// -e s/arm.*/arm/ -e s/sa110/arm/ -e s/hppa*/parisc/` @@ -29,7 +33,7 @@ # Download the latest hppa patch HPPA_PATCH_LEVEL="26" -if [ `use hppa` ] +if [ "`use hppa`" ] then SRC_URI="${SRC_URI} http://ftp.parisc-linux.org/cvs/patch-${OKV}-pa${HPPA_PATCH_LEVEL}.diff.gz" KV="${OKV}-pa${HPPA_PATCH_LEVEL}" @@ -126,6 +130,17 @@ else cp -ax ${S}/include/asm-${KERNEL_ARCH}/* ${D}/usr/include/asm fi + + # If this is for a cross compiler move the headers into position. + # Aiken 24/02/2003 + if cross-target + then + cd ${D} + mkdir -p usr/${CCHOST}/include + cd usr/${CCHOST}/include + cp ${D}/usr/include/* . -avf + rm -rf ${D}/usr/include + fi fi }