Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 18031 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/sys-kernel/linux-headers/linux-headers-2.4.20.ebuild (-29 / +35 lines)
Lines 1-7 Link Here
1
# Copyright 1999-2003 Gentoo Technologies, Inc.
1
# Copyright 1999-2002 Gentoo Technologies, Inc.
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
#OKV=original kernel version, KV=patched kernel version.  They can be the same.
3
#OKV=original kernel version, KV=patched kernel version.  They can be the same.
4
4
5
inherit crosscompile
6
7
# For want of a better spot this will do
8
5
#we use this next variable to avoid duplicating stuff on cvs
9
#we use this next variable to avoid duplicating stuff on cvs
6
GFILESDIR=${PORTDIR}/sys-kernel/linux-sources/files
10
GFILESDIR=${PORTDIR}/sys-kernel/linux-sources/files
7
SPARCFILEDIR=${PORTDIR}/sys-kernel/sparc-sources/files
11
SPARCFILEDIR=${PORTDIR}/sys-kernel/sparc-sources/files
Lines 13-23 Link Here
13
17
14
DESCRIPTION="Full sources for the Gentoo Linux kernel"
18
DESCRIPTION="Full sources for the Gentoo Linux kernel"
15
SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2"
19
SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2"
16
PROVIDE="virtual/kernel virtual/os-headers"
20
PROVIDE="virtual/os-headers"
17
HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/"
21
HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/"
18
LICENSE="GPL-2"
22
LICENSE="GPL-2"
19
SLOT="${KV}"
23
20
KEYWORDS="hppa -x86 -ppc -sparc -alpha"
24
#SLOT="${KV}"
25
# Use cross-check instead to set the SLOT
26
cross-check ${KV}
27
28
KEYWORDS="hppa x86 ppc sparc alpha"
21
29
22
KERNEL_ARCH=`echo $ARCH |\
30
KERNEL_ARCH=`echo $ARCH |\
23
  sed -e s/[i]*.86/i386/ -e s/sun4u// -e s/arm.*/arm/ -e s/sa110/arm/ -e s/hppa*/parisc/`
31
  sed -e s/[i]*.86/i386/ -e s/sun4u// -e s/arm.*/arm/ -e s/sa110/arm/ -e s/hppa*/parisc/`
Lines 29-35 Link Here
29
37
30
# Download the latest hppa patch
38
# Download the latest hppa patch
31
HPPA_PATCH_LEVEL="26"
39
HPPA_PATCH_LEVEL="26"
32
if [ `use hppa` ]
40
if [ "`use hppa`" ]
33
then
41
then
34
	SRC_URI="${SRC_URI} http://ftp.parisc-linux.org/cvs/patch-${OKV}-pa${HPPA_PATCH_LEVEL}.diff.gz"
42
	SRC_URI="${SRC_URI} http://ftp.parisc-linux.org/cvs/patch-${OKV}-pa${HPPA_PATCH_LEVEL}.diff.gz"
35
	KV="${OKV}-pa${HPPA_PATCH_LEVEL}"
43
	KV="${OKV}-pa${HPPA_PATCH_LEVEL}"
Lines 55-61 Link Here
55
	cd ${S}
63
	cd ${S}
56
	
64
	
57
	# glibc need patched headers for hppa
65
	# glibc need patched headers for hppa
58
	if [ ${ARCH} = "hppa" ]
66
	if [ "${ARCH}" = "hppa" ]
59
	then
67
	then
60
		einfo "Applying patches for hppa ..."
68
		einfo "Applying patches for hppa ..."
61
		unpack patch-${OKV}-pa${HPPA_PATCH_LEVEL}.diff.gz
69
		unpack patch-${OKV}-pa${HPPA_PATCH_LEVEL}.diff.gz
Lines 85-91 Link Here
85
src_compile() {
93
src_compile() {
86
	if [ "$PN" = "linux-headers" ]
94
	if [ "$PN" = "linux-headers" ]
87
	then
95
	then
88
		yes "" | make oldconfig		
96
		# Added ARCH= so that the kernel knows which
97
		# arch to configure for and links to the correct
98
		# asm directory
99
		#   Aiken 22/03/2003
100
		yes "" | make ARCH="${KERNEL_ARCH}" oldconfig		
89
		echo "Ignore any errors from the yes command above."
101
		echo "Ignore any errors from the yes command above."
90
	fi
102
	fi
91
}
103
}
Lines 102-130 Link Here
102
		cp -ax ${S}/include/linux/* ${D}/usr/include/linux
114
		cp -ax ${S}/include/linux/* ${D}/usr/include/linux
103
		rm -rf ${D}/usr/include/linux/modules
115
		rm -rf ${D}/usr/include/linux/modules
104
		dodir /usr/include/asm
116
		dodir /usr/include/asm
105
		if [ `expr $KERNEL_ARCH ":" "sparc"` -eq 5 ]
106
		then
107
			dodir /usr/include/asm-{sparc,sparc64}
108
			if [ "$KERNEL_ARCH" = "sparc64" ]
109
			then
110
				cp -ax ${S}/include/asm-sparc64/* ${D}/usr/include/asm-sparc64
111
				if [ ! -r ${D}/usr/include/asm-sparc64/asm_offsets.h ]
112
				then
113
					cp ${SPARCFILEDIR}/${OKV}/sparc64-asm_offsets.h \
114
						${D}/usr/include/asm-sparc64/asm_offsets.h
115
				fi
116
			fi
117
118
			cp -ax ${S}/include/asm-sparc/* ${D}/usr/include/asm-sparc
119
			if [ ! -r ${D}/usr/include/asm-sparc/asm_offsets.h ]
120
			then
121
				cp ${SPARCFILEDIR}/${OKV}/sparc-asm_offsets.h \
122
					${D}/usr/include/asm-sparc/asm_offsets.h
123
			fi
124
			${SPARCFILEDIR}/generate-asm-sparc ${D}/usr/include
125
117
126
		else
118
		# I have removed all the code here that selects which
127
			cp  -ax ${S}/include/asm-${KERNEL_ARCH}/* ${D}/usr/include/asm
119
		# asm directory to copy. During the make oldconfig the
120
		# correct asm directory is selected so why duplicate
121
		# something that has already been done.
122
		#  Aiken 22/03/2003
123
		cp  -ax ${S}/include/asm/* ${D}/usr/include/asm
124
125
		# If this is for a cross compiler move the headers into position.
126
		# Aiken 23/02/2003
127
		if cross-target
128
		then
129
			cd ${D}
130
			mkdir -p usr/${CCHOST}/include
131
			cd usr/${CCHOST}/include
132
			cp -avf ${D}/usr/include/* . 
133
			rm -rf ${D}/usr/include
128
		fi
134
		fi
129
	fi
135
	fi
130
}
136
}

Return to bug 18031