/[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.232 Revision 1.235
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2009 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.232 2010/05/02 08:48:16 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.235 2010/05/28 20:59:59 robbat2 Exp $
4 4
5# Description: kernel.eclass rewrite for a clean base regarding the 2.6 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
6# series of kernel with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
7# 7#
8# Original author: John Mylchreest <johnm@gentoo.org> 8# Original author: John Mylchreest <johnm@gentoo.org>
84[[ -z ${LICENSE} ]] && \ 84[[ -z ${LICENSE} ]] && \
85 LICENSE="GPL-2" 85 LICENSE="GPL-2"
86 86
87# This is the latest KV_PATCH of the deblob tool available from the 87# This is the latest KV_PATCH of the deblob tool available from the
88# libre-sources upstream. 88# libre-sources upstream.
89[[ -z ${DEBLOB_MAX_VERSION} ]] && DEBLOB_MAX_VERSION=33 89[[ -z ${DEBLOB_MAX_VERSION} ]] && DEBLOB_MAX_VERSION=34
90 90
91# No need to run scanelf/strip on kernel sources/headers (bug #134453). 91# No need to run scanelf/strip on kernel sources/headers (bug #134453).
92RESTRICT="binchecks strip" 92RESTRICT="binchecks strip"
93 93
94# set LINUX_HOSTCFLAGS if not already set 94# set LINUX_HOSTCFLAGS if not already set
156 KV_EXTRA=${KV_EXTRA/[-_]*} 156 KV_EXTRA=${KV_EXTRA/[-_]*}
157 else 157 else
158 KV_PATCH=$(get_version_component_range 3- ${OKV}) 158 KV_PATCH=$(get_version_component_range 3- ${OKV})
159 fi 159 fi
160 KV_PATCH=${KV_PATCH/[-_]*} 160 KV_PATCH=${KV_PATCH/[-_]*}
161
162 local v n=0 missing
163 for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
164 [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
165 done
166 [[ $n -eq 1 ]] && \
167 eerror "Missing variables: ${missing}" && \
168 die "Failed to extract kernel version (try explicit CKV in ebuild)!"
169 unset v n missing
161 170
162 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2" 171 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
163 172
164 RELEASE=${CKV/${OKV}} 173 RELEASE=${CKV/${OKV}}
165 RELEASE=${RELEASE/_beta} 174 RELEASE=${RELEASE/_beta}
166 RELEASE=${RELEASE/_rc/-rc} 175 RELEASE=${RELEASE/_rc/-rc}
167 RELEASE=${RELEASE/_pre/-pre} 176 RELEASE=${RELEASE/_pre/-pre}
177 # We cannot trivally call kernel_is here, because it calls us to detect the
178 # version
168 kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git} 179 #kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git}
180 [ $(($KV_MAJOR * 1000 + $KV_MINOR)) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git}
169 RELEASETYPE=${RELEASE//[0-9]} 181 RELEASETYPE=${RELEASE//[0-9]}
170 182
171 # Now we know that RELEASE is the -rc/-git 183 # Now we know that RELEASE is the -rc/-git
172 # and RELEASETYPE is the same but with its numerics stripped 184 # and RELEASETYPE is the same but with its numerics stripped
173 # we can work on better sorting EXTRAVERSION. 185 # we can work on better sorting EXTRAVERSION.
714 fi 726 fi
715 727
716 # optionally display security unsupported message 728 # optionally display security unsupported message
717 # Start with why 729 # Start with why
718 if [[ ${K_SECURITY_UNSUPPORTED} = deblob ]]; then 730 if [[ ${K_SECURITY_UNSUPPORTED} = deblob ]]; then
719 ewarn "Deblobbed kernels are UNSUPPORTED by Gentoo Security" 731 ewarn "Deblobbed kernels are UNSUPPORTED by Gentoo Security."
720 elif [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then 732 elif [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then
721 ewarn "${PN} is UNSUPPORTED by Gentoo Security." 733 ewarn "${PN} is UNSUPPORTED by Gentoo Security."
722 fi 734 fi
723 # And now the general message. 735 # And now the general message.
724 if [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then 736 if [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then

Legend:
Removed from v.1.232  
changed lines
  Added in v.1.235

  ViewVC Help
Powered by ViewVC 1.1.20