summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2004-01-23 21:43:47 +0000
committerJohn Mylchreest <johnm@gentoo.org>2004-01-23 21:43:47 +0000
commitc44a46ba1d4262b9486304b40a819dfbfe8e9200 (patch)
tree21c8ce5e6eaea2f82a505f9eee1fbf247218e766 /eclass/kernel-2.eclass
parentminor fix in alsa virtual code (diff)
downloadhistorical-c44a46ba1d4262b9486304b40a819dfbfe8e9200.tar.gz
historical-c44a46ba1d4262b9486304b40a819dfbfe8e9200.tar.bz2
historical-c44a46ba1d4262b9486304b40a819dfbfe8e9200.zip
minor fix in alsa virtual code
Diffstat (limited to 'eclass/kernel-2.eclass')
-rw-r--r--eclass/kernel-2.eclass45
1 files changed, 22 insertions, 23 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 9faa948734d0..aa034ece9c4c 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.17 2004/01/23 21:41:23 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.18 2004/01/23 21:43:47 johnm Exp $
# kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel
# with back-compatibility for 2.4
@@ -38,6 +38,26 @@ LICENSE="GPL-2"
IUSE="${IUSE} build"
SLOT="${KV}"
+# Grab kernel version from KV
+KV_MAJOR=$(echo ${KV} | cut -d. -f1)
+KV_MINOR=$(echo ${KV} | cut -d. -f2)
+KV_PATCH=$(echo ${KV} | cut -d. -f3)
+KV_PATCH=${KV_PATCH/[-_]*/}
+
+# set LINUX_HOSTCFLAGS if not already set
+[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"
+
+
+#eclass functions only from here onwards.
+#==============================================================
+kernel_is_2_4() {
+ [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 4 ] && return 0 || return 1
+}
+
+kernel_is_2_6() {
+ [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 5 -o ${KV_MINOR} -eq 6 ] && return 0 || return 1
+}
+
# capture the sources type and set depends
if [ "${ETYPE}" == "sources" ]
then
@@ -50,7 +70,7 @@ then
dev-lang/perl
sys-apps/module-init-tools
sys-devel/make )"
-
+
[ $(kernel_is_2_4) $? == 0 ] && PROVIDE="virtual/linux-sources" || PROVIDE="virtual/linux-sources virtual/alsa"
elif [ "${ETYPE}" == "headers" ]
@@ -61,27 +81,6 @@ else
die
fi
-# Grab kernel version from KV
-KV_MAJOR=$(echo ${KV} | cut -d. -f1)
-KV_MINOR=$(echo ${KV} | cut -d. -f2)
-KV_PATCH=$(echo ${KV} | cut -d. -f3)
-KV_PATCH=${KV_PATCH/[-_]*/}
-
-# set LINUX_HOSTCFLAGS if not already set
-[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"
-
-
-#eclass functions only from here onwards.
-#==============================================================
-kernel_is_2_4() {
- [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 4 ] && return 0 || return 1
-}
-
-kernel_is_2_6() {
- [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 5 -o ${KV_MINOR} -eq 6 ] && return 0 || return 1
-}
-
-
# Unpack functions
#==============================================================
unpack_2_4() {