summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorBrian Jackson <iggy@gentoo.org>2004-10-02 17:47:48 +0000
committerBrian Jackson <iggy@gentoo.org>2004-10-02 17:47:48 +0000
commit747c35441f246fd4650dc27929ecf46f84644257 (patch)
tree4ebb4bf662b3c2666ef03539104c4f7722d79556 /eclass
parentmoving set_arch_ functions to eutils from kernel (diff)
downloadhistorical-747c35441f246fd4650dc27929ecf46f84644257.tar.gz
historical-747c35441f246fd4650dc27929ecf46f84644257.tar.bz2
historical-747c35441f246fd4650dc27929ecf46f84644257.zip
moving set_arch_ functions to eutils from kernel
Diffstat (limited to 'eclass')
-rw-r--r--eclass/eutils.eclass25
-rw-r--r--eclass/kernel.eclass19
2 files changed, 28 insertions, 16 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass
index 3a720a55c2a1..ce8857c3ecef 100644
--- a/eclass/eutils.eclass
+++ b/eclass/eutils.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.109 2004/10/02 01:42:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.110 2004/10/02 17:47:48 iggy Exp $
#
# Author: Martin Schlemmer <azarah@gentoo.org>
#
@@ -1438,3 +1438,26 @@ strip-linguas() {
export LINGUAS="${newls}"
fi
}
+
+# moved from kernel.eclass since they are generally useful outside of
+# kernel.eclass -iggy (20041002)
+
+# the following functions are useful in kernel module ebuilds, etc.
+# for an example see ivtv or drbd ebuilds
+
+# set's ARCH to match what the kernel expects
+set_arch_to_kernel() {
+ export EUTILS_ECLASS_PORTAGE_ARCH="${ARCH}"
+ case ${ARCH} in
+ x86) export ARCH="i386";;
+ amd64) export ARCH="x86_64";;
+ hppa) export ARCH="parisc";;
+ mips) export ARCH="mips";;
+ *) export ARCH="${ARCH}";;
+ esac
+}
+
+# set's ARCH back to what portage expects
+set_arch_to_portage() {
+ export ARCH="${EUTILS_ECLASS_PORTAGE_ARCH}"
+}
diff --git a/eclass/kernel.eclass b/eclass/kernel.eclass
index 87034905c302..4f1bc27f718b 100644
--- a/eclass/kernel.eclass
+++ b/eclass/kernel.eclass
@@ -1,11 +1,14 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel.eclass,v 1.50 2004/08/30 21:38:28 kumba Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel.eclass,v 1.51 2004/10/02 17:47:48 iggy Exp $
#
# This eclass contains the common functions to be used by all lostlogic
# based kernel ebuilds
# with error handling contributions by gerk, and small fixes by zwelch
# small naming fix by kain
+# moved set_arch_to_ functions to eutils -iggy (20041002)
+
+inherit eutils
ECLASS=kernel
EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst
@@ -69,20 +72,6 @@ kernel_exclude() {
done
}
-set_arch_to_kernel() {
- export KERNEL_ECLASS_PORTAGE_ARCH="${ARCH}"
- case ${ARCH} in
- x86) export ARCH="i386";;
- amd64) export ARCH="x86_64";;
- hppa) export ARCH="parisc";;
- mips) export ARCH="mips";;
- *) export ARCH="${ARCH}";;
- esac
-}
-set_arch_to_portage() {
- export ARCH="${KERNEL_ECLASS_PORTAGE_ARCH}"
-}
-
kernel_universal_unpack() {
find . -iname "*~" -exec rm {} \; 2> /dev/null