/[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.229 Revision 1.230
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.229 2010/04/26 07:15:03 robbat2 Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.230 2010/04/26 07:26:06 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>
43# combination of "base" and "extras" 43# combination of "base" and "extras"
44# K_GENPATCHES_VER - The version of the genpatches tarball(s) to apply. 44# K_GENPATCHES_VER - The version of the genpatches tarball(s) to apply.
45# A value of "5" would apply genpatches-2.6.12-5 to 45# A value of "5" would apply genpatches-2.6.12-5 to
46# my-sources-2.6.12.ebuild 46# my-sources-2.6.12.ebuild
47# K_SECURITY_UNSUPPORTED- If set, this kernel is unsupported by Gentoo Security 47# K_SECURITY_UNSUPPORTED- If set, this kernel is unsupported by Gentoo Security
48# K_DEBLOB_AVAILABLE - A value of "0" will disable all of the optional deblob
49# code. If empty, will be set to "1" if deblobbing is
50# possible. Test ONLY for "1".
51# K_PREDEBLOBBED - This kernel was already deblobbed elsewhere.
52# If false, either optional deblobbing will be available
53# or the license will note the inclusion of freedist
54# code.
48 55
49# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which 56# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which
50# can be supported by the headers ebuild 57# can be supported by the headers ebuild
51 58
52# UNIPATCH_LIST - space delimetered list of patches to be applied to the 59# UNIPATCH_LIST - space delimetered list of patches to be applied to the
299 SLOT="${PVR}" 306 SLOT="${PVR}"
300 DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR} linux kernel" 307 DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR} linux kernel"
301 IUSE="symlink build" 308 IUSE="symlink build"
302 309
303 # Bug #266157, deblob for libre support 310 # Bug #266157, deblob for libre support
304 if [[ -z ${KERNEL_DEBLOBBED} ]] ; then 311 if [[ -z ${K_PREDEBLOBBED} ]] ; then
305 if kernel_is ge 2 6 27 ; then 312 if kernel_is ge 2 6 27 && [[ -z ${K_DEBLOB_AVAILABLE} ]] ; then
306 IUSE="${IUSE} deblob" 313 IUSE="${IUSE} deblob"
307 # Reflect that kernels contain firmware blobs unless otherwise 314 # Reflect that kernels contain firmware blobs unless otherwise
308 # stripped 315 # stripped
309 LICENSE="${LICENSE} !deblob? ( freedist )" 316 LICENSE="${LICENSE} !deblob? ( freedist )"
310 317
311 # This to to avoid us triggering some QA warnings 318 # This to to avoid us triggering some QA warnings
312 DEBLOB_AVAILABLE=1 319 K_DEBLOB_AVAILABLE=1
313 320
314 DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 321 DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
315 DEBLOB_A="deblob-${DEBLOB_PV}" 322 DEBLOB_A="deblob-${DEBLOB_PV}"
316 DEBLOB_HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" 323 DEBLOB_HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/"
317 HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}" 324 HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}"
652 659
653 # if we have USE=symlink, then force K_SYMLINK=1 660 # if we have USE=symlink, then force K_SYMLINK=1
654 use symlink && K_SYMLINK=1 661 use symlink && K_SYMLINK=1
655 662
656 # if we're using a deblobbed kernel, it's not supported 663 # if we're using a deblobbed kernel, it's not supported
657 [[ $DEBLOB_AVAILABLE == "1" ]] && \ 664 [[ $K_DEBLOB_AVAILABLE == 1 ]] && \
658 use deblob && \ 665 use deblob && \
659 K_SECURITY_UNSUPPORTED=1 666 K_SECURITY_UNSUPPORTED=1
660 667
661 # if we are to forcably symlink, delete it if it already exists first. 668 # if we are to forcably symlink, delete it if it already exists first.
662 if [[ ${K_SYMLINK} > 0 ]]; then 669 if [[ ${K_SYMLINK} > 0 ]]; then
1097 if [[ ${ETYPE} == headers ]]; then 1104 if [[ ${ETYPE} == headers ]]; then
1098 kernel_is 2 4 && unpack_2_4 1105 kernel_is 2 4 && unpack_2_4
1099 kernel_is 2 6 && unpack_2_6 1106 kernel_is 2 6 && unpack_2_6
1100 fi 1107 fi
1101 1108
1102 if [[ $DEBLOB_AVAILABLE == "1" ]] && use deblob ; then 1109 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
1103 cp "${DISTDIR}/${DEBLOB_A}" "${T}" 1110 cp "${DISTDIR}/${DEBLOB_A}" "${T}"
1104 chmod +x "${T}/${DEBLOB_A}" 1111 chmod +x "${T}/${DEBLOB_A}"
1105 fi 1112 fi
1106} 1113}
1107 1114
1108kernel-2_src_compile() { 1115kernel-2_src_compile() {
1109 cd "${S}" 1116 cd "${S}"
1110 [[ ${ETYPE} == headers ]] && compile_headers 1117 [[ ${ETYPE} == headers ]] && compile_headers
1111 1118
1112 if [[ $DEBLOB_AVAILABLE == "1" ]] && use deblob ; then 1119 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
1113 echo ">>> Running deblob script ..." 1120 echo ">>> Running deblob script ..."
1114 sh "${T}/${DEBLOB_A}" --force || \ 1121 sh "${T}/${DEBLOB_A}" --force || \
1115 die "Deblob script failed to run!!!" 1122 die "Deblob script failed to run!!!"
1116 fi 1123 fi
1117} 1124}

Legend:
Removed from v.1.229  
changed lines
  Added in v.1.230

  ViewVC Help
Powered by ViewVC 1.1.20