# 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>
#
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}"
+}
# 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
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