/[gentoo-x86]/eclass/linux-info.eclass
Gentoo

Diff of /eclass/linux-info.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.19 Revision 1.20
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 Gentoo Foundation
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# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.19 2005/01/18 21:38:59 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.20 2005/01/23 20:47:42 eradicator Exp $
4# 4#
5# Description: This eclass is used as a central eclass for accessing kernel 5# Description: This eclass is used as a central eclass for accessing kernel
6# related information for sources already installed. 6# related information for sources already installed.
7# It is vital for linux-mod to function correctly, and is split 7# It is vital for linux-mod to function correctly, and is split
8# out so that any ebuild behaviour "templates" are abstracted out 8# out so that any ebuild behaviour "templates" are abstracted out
51 51
52ECLASS=linux-info 52ECLASS=linux-info
53INHERITED="$INHERITED $ECLASS" 53INHERITED="$INHERITED $ECLASS"
54EXPORT_FUNCTIONS pkg_setup 54EXPORT_FUNCTIONS pkg_setup
55 55
56inherit toolchain-funcs
57
56# Overwritable environment Var's 58# Overwritable environment Var's
57# --------------------------------------- 59# ---------------------------------------
58KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}" 60KERNEL_DIR="${KERNEL_DIR:-/usr/src/linux}"
59 61
60 62
67esac 69esac
68 70
69# Pulled from eutils as it might be more useful only being here since 71# Pulled from eutils as it might be more useful only being here since
70# very few ebuilds which dont use this eclass will ever ever use these functions 72# very few ebuilds which dont use this eclass will ever ever use these functions
71set_arch_to_kernel() { 73set_arch_to_kernel() {
72 export PORTAGE_ARCH="${ARCH}" 74 export ARCH="$(tc-arch-kernel)"
73 case ${ARCH} in
74 x86) export ARCH="i386";;
75 amd64) export ARCH="x86_64";;
76 hppa) export ARCH="parisc";;
77 mips) export ARCH="mips";;
78 *) export ARCH="${ARCH}";;
79 esac
80} 75}
81 76
82# set's ARCH back to what portage expects 77# set's ARCH back to what portage expects
83set_arch_to_portage() { 78set_arch_to_portage() {
84 export ARCH="${PORTAGE_ARCH}" 79 export ARCH="$(tc-arch)"
85} 80}
86 81
87 82
88# 83#
89# qeinfo "Message" 84# qeinfo "Message"

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.20