summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild')
-rw-r--r--sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild77
1 files changed, 40 insertions, 37 deletions
diff --git a/sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild b/sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild
index 5e1d7ec28fc4..cbeba561a893 100644
--- a/sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild
+++ b/sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild
@@ -1,14 +1,14 @@
-# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild,v 1.1 2003/11/16 18:26:58 kumba Exp $
-
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/linux-headers/linux-headers-2.4.21-r1.ebuild,v 1.1.1.1 2005/11/30 09:49:34 chriswhite Exp $
+ETYPE="headers"
+inherit eutils kernel
+IUSE=""
OKV=${PV/_/-}
KV="${OKV}"
S=${WORKDIR}/linux-${OKV}
-EXTRAVERSION=" "
-ETYPE="headers"
-inherit kernel
+EXTRAVERSION=""
# What's in this kernel?
@@ -21,25 +21,29 @@ SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${OKV}.tar.bz2"
HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/"
LICENSE="GPL-2"
SLOT="0"
-PROVIDE="virtual/kernel virtual/os-headers"
-KEYWORDS="-* amd64 ~sparc ~x86 -mips"
-
-
-# Figure out what architecture we are, and set ARCH appropriately
-ARCH="$(uname -m)"
-ARCH=`echo $ARCH | sed -e s/[i].86/i386/ -e s/x86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/amd64/x86_64/`
-[ "$ARCH" == "sparc" -a "$PROFILE_ARCH" == "sparc64" ] && ARCH=sparc64
+PROVIDE="virtual/os-headers"
+KEYWORDS="-* amd64 sparc x86 -mips s390"
+DEPEND="!virtual/os-headers
+ sparc? ( gcc64? ( sys-devel/gcc-sparc64 ) )"
-# Archs which have their own separate header packages, add a check here
-# and redirect the user to them
-if [ "${ARCH}" = "mips" ] || [ "${ARCH}" = "mips64" ]; then
- eerror "These headers are not appropriate for your architecture."
- eerror "Please use sys-kernel/${ARCH/64/}-headers instead."
- die
-fi
+pkg_setup() {
+ # Figure out what architecture we are, and set ARCH appropriately
+ ARCH="$(uname -m)"
+ ARCH="$(echo ${ARCH} | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)"
+ [ "$ARCH" == "sparc" -a "$PROFILE_ARCH" == "sparc64" ] && ARCH=sparc64
+ # Archs which have their own separate header packages, add a check here
+ # and redirect the user to them
+ case "${ARCH}" in
+ mips|mips64|hppa)
+ eerror "These headers are not appropriate for your architecture."
+ eerror "Please use sys-kernel/${ARCH/64/}-headers instead."
+ die
+ ;;
+ esac
+}
src_unpack() {
unpack ${A}
@@ -49,7 +53,7 @@ src_unpack() {
# Right now, this fix only affects sparc. Other big-endian archs will need to edit this if they need it.
# Issue will be fixed in 2.4.23+ kernel series (issue has been fixed in 2.6.0).
# Closes Bug #26062
- if [ -n "`use sparc`" ]; then
+ if use sparc; then
epatch ${FILESDIR}/bigendian-byteorder-fix.patch
fi
@@ -57,7 +61,7 @@ src_unpack() {
# This patch fixes an issue involving the use of gcc's -ansi flag and the __u64 datatype.
# It only patches asm-i386, so we only apply it if x86. Unknown if this is needed for other archs.
# Closes Bug #32246
- if [ -n "`use x86`" ]; then
+ if use x86; then
epatch ${FILESDIR}/${PN}-strict-ansi-fix.patch
fi
@@ -72,8 +76,8 @@ src_compile() {
kernel_src_compile
# If this is sparc, then generate asm_offsets.h
- if [ -n "`use sparc`" ]; then
- make dep ARCH=sparc || die "Failed to run 'make dep'"
+ if use sparc; then
+ make ARCH=${ARCH} dep || die "Failed to run 'make dep'"
fi
}
@@ -83,7 +87,7 @@ src_install() {
kernel_src_install
# If this is sparc, then we need to place asm_offsets.h in the proper location(s)
- if [ -n "`use sparc`" ]; then
+ if [ "${PROFILE_ARCH}" = "sparc64" ]; then
# We don't need /usr/include/asm, generate-asm-sparc will take care of this
rm -Rf ${D}/usr/include/asm
@@ -91,26 +95,25 @@ src_install() {
# We do need empty directories, though...
dodir /usr/include/asm
dodir /usr/include/asm-sparc
+ dodir /usr/include/asm-sparc64
- # Copy asm-sparc
+ # Copy asm-sparc and asm-sparc64
cp -ax ${S}/include/asm-sparc/* ${D}/usr/include/asm-sparc
-
- # If this is sparc64, then we need asm-sparc64 stuff too
- if [ "${PROFILE_ARCH}" = "sparc64" ]; then
- dodir /usr/include/asm-sparc64
- cp -ax ${S}/include/asm-sparc64/* ${D}/usr/include/asm-sparc64
- fi
+ cp -ax ${S}/include/asm-sparc64/* ${D}/usr/include/asm-sparc64
# Check if generate-asm-sparc exists
if [ -a "${FILESDIR}/generate-asm-sparc" ]; then
- # Just incase generate-asm-sparc isn't executable, make it so
- if [ ! -x "${FILESDIR}/generate-asm-sparc" ]; then
- chmod +x ${FILESDIR}/generate-asm-sparc
+ # Copy generate-asm-sparc into the sandox
+ cp ${FILESDIR}/generate-asm-sparc ${WORKDIR}/generate-asm-sparc
+
+ # Just in case generate-asm-sparc isn't executable, make it so
+ if [ ! -x "${WORKDIR}/generate-asm-sparc" ]; then
+ chmod +x ${WORKDIR}/generate-asm-sparc
fi
# Generate /usr/include/asm for sparc systems
- ${FILESDIR}/generate-asm-sparc ${D}/usr/include
+ ${WORKDIR}/generate-asm-sparc ${D}/usr/include
else
eerror "${FILESDIR}/generate-asm-sparc doesn't exist!"
die