Lines 1-6
Link Here
|
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.225 2010/04/01 21:12:20 robbat2 Exp $ |
3 |
# $Header$ |
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 |
Lines 74-82
if [[ ${CTARGET} == ${CHOST} && ${CATEGO
Link Here
|
74 |
fi |
74 |
fi |
75 |
|
75 |
|
76 |
HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/ ${HOMEPAGE}" |
76 |
HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/ ${HOMEPAGE}" |
77 |
# Reflect that kernels contain firmware blobs unless otherwise stripped |
|
|
78 |
[[ -z ${LICENSE} ]] && \ |
77 |
[[ -z ${LICENSE} ]] && \ |
79 |
LICENSE="GPL-2 freedist" |
78 |
LICENSE="GPL-2" |
80 |
|
79 |
|
81 |
# No need to run scanelf/strip on kernel sources/headers (bug #134453). |
80 |
# No need to run scanelf/strip on kernel sources/headers (bug #134453). |
82 |
RESTRICT="binchecks strip" |
81 |
RESTRICT="binchecks strip" |
Lines 300-305
if [[ ${ETYPE} == sources ]]; then
Link Here
|
300 |
SLOT="${PVR}" |
299 |
SLOT="${PVR}" |
301 |
DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR} linux kernel" |
300 |
DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR} linux kernel" |
302 |
IUSE="symlink build" |
301 |
IUSE="symlink build" |
|
|
302 |
|
303 |
# Bug #266157, deblob for libre support |
304 |
# libre-sources is already pre-cleaned for cases where you care about even |
305 |
# downloading the tarball with non-libre content. |
306 |
if kernel_is ge 2 6 27 && [[ "${PN}" != "libre-sources" ]] ; then |
307 |
IUSE="${IUSE} deblob" |
308 |
# Reflect that kernels contain firmware blobs unless otherwise stripped |
309 |
LICENSE="${LICENSE} !deblob? ( freedist )" |
310 |
|
311 |
# This to to avoid us triggering some QA warnings |
312 |
DEBLOB_AVAILABLE=1 |
313 |
|
314 |
# Can't do this in detect_version, since it breaks deblobbing of |
315 |
# openvz-sources |
316 |
DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" |
317 |
DEBLOB_A="deblob-${DEBLOB_PV}" |
318 |
DEBLOB_HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" |
319 |
HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}" |
320 |
|
321 |
KERNEL_URI="${KERNEL_URI} |
322 |
deblob? ( |
323 |
${DEBLOB_HOMEPAGE}/download/releases/LATEST-${DEBLOB_PV}.N/${DEBLOB_A} |
324 |
)" |
325 |
else |
326 |
# We have no way to deblob older kernels, so just mark them as tainted |
327 |
# with non-libre materials. libre-sources never made such a release so |
328 |
# that is ok too. |
329 |
LICENSE="${LICENSE} freedist" |
330 |
fi |
331 |
|
303 |
elif [[ ${ETYPE} == headers ]]; then |
332 |
elif [[ ${ETYPE} == headers ]]; then |
304 |
DESCRIPTION="Linux system headers" |
333 |
DESCRIPTION="Linux system headers" |
305 |
|
334 |
|
Lines 626-631
postinst_sources() {
Link Here
|
626 |
# if we have USE=symlink, then force K_SYMLINK=1 |
655 |
# if we have USE=symlink, then force K_SYMLINK=1 |
627 |
use symlink && K_SYMLINK=1 |
656 |
use symlink && K_SYMLINK=1 |
628 |
|
657 |
|
|
|
658 |
# if we're using a deblobbed kernel, it's not supported |
659 |
[[ $DEBLOB_AVAILABLE == "1" ]] && \ |
660 |
use deblob && \ |
661 |
K_SECURITY_UNSUPPORTED=1 |
662 |
|
629 |
# if we are to forcably symlink, delete it if it already exists first. |
663 |
# if we are to forcably symlink, delete it if it already exists first. |
630 |
if [[ ${K_SYMLINK} > 0 ]]; then |
664 |
if [[ ${K_SYMLINK} > 0 ]]; then |
631 |
[[ -h ${ROOT}usr/src/linux ]] && rm ${ROOT}usr/src/linux |
665 |
[[ -h ${ROOT}usr/src/linux ]] && rm ${ROOT}usr/src/linux |
Lines 1066-1076
kernel-2_src_unpack() {
Link Here
|
1066 |
kernel_is 2 4 && unpack_2_4 |
1100 |
kernel_is 2 4 && unpack_2_4 |
1067 |
kernel_is 2 6 && unpack_2_6 |
1101 |
kernel_is 2 6 && unpack_2_6 |
1068 |
fi |
1102 |
fi |
|
|
1103 |
|
1104 |
if [[ $DEBLOB_AVAILABLE == "1" ]] && use deblob ; then |
1105 |
cp "${DISTDIR}/${DEBLOB_A}" "${T}" |
1106 |
chmod +x "${T}/${DEBLOB_A}" |
1107 |
fi |
1069 |
} |
1108 |
} |
1070 |
|
1109 |
|
1071 |
kernel-2_src_compile() { |
1110 |
kernel-2_src_compile() { |
1072 |
cd "${S}" |
1111 |
cd "${S}" |
1073 |
[[ ${ETYPE} == headers ]] && compile_headers |
1112 |
[[ ${ETYPE} == headers ]] && compile_headers |
|
|
1113 |
|
1114 |
if [[ $DEBLOB_AVAILABLE == "1" ]] && use deblob ; then |
1115 |
echo ">>> Running deblob script ..." |
1116 |
sh "${T}/${DEBLOB_A}" --force || \ |
1117 |
die "Deblob script failed to run!!!" |
1118 |
fi |
1074 |
} |
1119 |
} |
1075 |
|
1120 |
|
1076 |
kernel-2_pkg_preinst() { |
1121 |
kernel-2_pkg_preinst() { |