/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

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

Revision 1.47 Revision 1.48
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/kernel-2.eclass,v 1.47 2004/11/24 16:36:38 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.48 2004/11/25 15:41:06 johnm Exp $
4 4
5# kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel 5# kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel
6# with back-compatibility for 2.4 6# with back-compatibility for 2.4
7# 7#
8# Author: John Mylchreest <johnm@gentoo.org> 8# Author: John Mylchreest <johnm@gentoo.org>
30# package revision 30# package revision
31# K_EXTRAEINFO - this is a new-line seperated list of einfo displays in 31# K_EXTRAEINFO - this is a new-line seperated list of einfo displays in
32# postinst and can be used to carry additional postinst 32# postinst and can be used to carry additional postinst
33# messages 33# messages
34# K_EXTRAEWARN - same as K_EXTRAEINFO except ewarn's instead of einfo's 34# K_EXTRAEWARN - same as K_EXTRAEINFO except ewarn's instead of einfo's
35# K_NODETECTVER - Dont try to detect_version in pkg_setup. we will specify KV, OKV and EXTRAVERSION ourselves.
35# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which 36# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which
36# can be supported by the headers ebuild 37# can be supported by the headers ebuild
37# UNIPATCH_LIST - space delimetered list of patches to be applied to the 38# UNIPATCH_LIST - space delimetered list of patches to be applied to the
38# kernel 39# kernel
39# UNIPATCH_EXCLUDE - an additional var to support exlusion based completely 40# UNIPATCH_EXCLUDE - an additional var to support exlusion based completely
59SLOT="${KV}" 60SLOT="${KV}"
60 61
61# Grab kernel version from KV 62# Grab kernel version from KV
62KV_MAJOR=$(echo ${KV} | cut -d. -f1) 63KV_MAJOR=$(echo ${KV} | cut -d. -f1)
63KV_MINOR=$(echo ${KV} | cut -d. -f2) 64KV_MINOR=$(echo ${KV} | cut -d. -f2)
64KV_PATCH=$(echo ${KV} | cut -d. -f3-) 65KV_PATCH=$(echo ${KV} | cut -d. -f3)
65KV_PATCH=${KV_PATCH/[-_]*/} 66KV_PATCH=${KV_PATCH/[-_]*/}
66 67
67# set LINUX_HOSTCFLAGS if not already set 68# set LINUX_HOSTCFLAGS if not already set
68[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include" 69[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"
69 70
140 141
141universal_unpack() { 142universal_unpack() {
142 [ -z "${OKV}" ] && OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 143 [ -z "${OKV}" ] && OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
143 144
144 cd ${WORKDIR} 145 cd ${WORKDIR}
146
145 unpack linux-${OKV}.tar.bz2 147 unpack linux-${OKV}.tar.bz2
146 if [ "${OKV}" != "${KV}" ] 148 if [ "${OKV}" != "${KV}" ]
147 then 149 then
148 mv linux-${OKV} linux-${KV} || \ 150 mv linux-${OKV} linux-${KV} || \
149 die "Unable to move source tree to ${KV}." 151 die "Unable to move source tree to ${KV}."
152
153 # since pkg_setup sets S, and then portage resets S we
154 # need to re-set S= or it wont be correct.
155 S="${WORKDIR}/linux-${KV}"
150 fi 156 fi
157
151 cd ${S} 158 cd ${S}
152
153 # change incorrect install path 159 # change incorrect install path
154 [ -z "${K_NOFIXINSTALL_PATH}" ] && \ 160 [ -z "${K_NOFIXINSTALL_PATH}" ] && \
155 sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile 161 sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile
156 162
157 # remove all backup files 163 # remove all backup files
713 719
714kernel-2_pkg_setup() { 720kernel-2_pkg_setup() {
715 [ "${ETYPE}" == "headers" ] && setup_headers 721 [ "${ETYPE}" == "headers" ] && setup_headers
716 722
717 # This is to fix some weird portage bug? in stable versions of portage. 723 # This is to fix some weird portage bug? in stable versions of portage.
718 [ "${ETYPE}" == "sources" ] && echo ">>> Preparing to unpack..." 724 if [ "${ETYPE}" == "sources" ] ;
725 then
726 [ -z "${K_NODETECTVER}" ] && detect_version
727 detect_arch
728 fi
719} 729}

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

  ViewVC Help
Powered by ViewVC 1.1.20