/[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.248 Revision 1.249
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2011 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.248 2011/03/22 00:39:09 mpagano Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.249 2011/04/14 06:10:32 ulm 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>
51# K_PREDEBLOBBED - This kernel was already deblobbed elsewhere. 51# K_PREDEBLOBBED - This kernel was already deblobbed elsewhere.
52# If false, either optional deblobbing will be available 52# If false, either optional deblobbing will be available
53# or the license will note the inclusion of freedist 53# or the license will note the inclusion of freedist
54# code. 54# code.
55# K_LONGTERM - If set, the eclass will search for the kernel source 55# K_LONGTERM - If set, the eclass will search for the kernel source
56# in the long term directories on the upstream servers 56# in the long term directories on the upstream servers
57# as the location has been changed by upstream 57# as the location has been changed by upstream
58# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which 58# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which
59# can be supported by the headers ebuild 59# can be supported by the headers ebuild
60 60
61# UNIPATCH_LIST - space delimetered list of patches to be applied to the 61# UNIPATCH_LIST - space delimetered list of patches to be applied to the
159 KV_EXTRA=${KV_EXTRA/[-_]*} 159 KV_EXTRA=${KV_EXTRA/[-_]*}
160 else 160 else
161 KV_PATCH=$(get_version_component_range 3- ${OKV}) 161 KV_PATCH=$(get_version_component_range 3- ${OKV})
162 fi 162 fi
163 KV_PATCH=${KV_PATCH/[-_]*} 163 KV_PATCH=${KV_PATCH/[-_]*}
164 164
165 local v n=0 missing 165 local v n=0 missing
166 for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do 166 for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
167 [[ -z ${!v} ]] && n=1 && missing="${missing}${v} "; 167 [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
168 done 168 done
169 [[ $n -eq 1 ]] && \ 169 [[ $n -eq 1 ]] && \
170 eerror "Missing variables: ${missing}" && \ 170 eerror "Missing variables: ${missing}" && \
171 die "Failed to extract kernel version (try explicit CKV in ebuild)!" 171 die "Failed to extract kernel version (try explicit CKV in ebuild)!"
172 unset v n missing 172 unset v n missing
173 173
174 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}" 174 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
175 [[ -n "${K_LONGTERM}" ]] && 175 [[ -n "${K_LONGTERM}" ]] &&
176 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 176 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
221 # The only messing around which should actually effect this is for KV_EXTRA 221 # The only messing around which should actually effect this is for KV_EXTRA
222 # since this has to limit OKV to MAJ.MIN.PAT and strip EXTRA off else 222 # since this has to limit OKV to MAJ.MIN.PAT and strip EXTRA off else
223 # KV_FULL evaluates to MAJ.MIN.PAT.EXT.EXT after EXTRAVERSION 223 # KV_FULL evaluates to MAJ.MIN.PAT.EXT.EXT after EXTRAVERSION
224 if [[ -n ${KV_EXTRA} ]]; then 224 if [[ -n ${KV_EXTRA} ]]; then
225 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}" 225 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
226 KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.bz2 226 KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.bz2
227 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2" 227 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
228 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2" 228 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2"
229 fi 229 fi
230 230
231 # We need to set this using OKV, but we need to set it before we do any 231 # We need to set this using OKV, but we need to set it before we do any
242 # will pull: 242 # will pull:
243 # linux-2.6.10.tar.bz2 & patch-2.6.11-rc3.bz2 & patch-2.6.11-rc3-git2.bz2 243 # linux-2.6.10.tar.bz2 & patch-2.6.11-rc3.bz2 & patch-2.6.11-rc3-git2.bz2
244 244
245 if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then 245 if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
246 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))" 246 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
247 KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.bz2 247 KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.bz2
248 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2" 248 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
249 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2" 249 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2"
250 fi 250 fi
251 251
252 if [[ ${RELEASETYPE} == -git ]]; then 252 if [[ ${RELEASETYPE} == -git ]]; then
253 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.bz2 253 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.bz2
254 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2" 254 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
255 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.bz2" 255 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.bz2"
256 fi 256 fi
257 257
258 if [[ ${RELEASETYPE} == -rc-git ]]; then 258 if [[ ${RELEASETYPE} == -rc-git ]]; then
259 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))" 259 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
260 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2 260 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2
261 ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2 261 ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2
262 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2" 262 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
263 263
264 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2 ${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2" 264 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2 ${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2"
265 fi 265 fi
266 266
319# Capture the sources type and set DEPENDs 319# Capture the sources type and set DEPENDs
320if [[ ${ETYPE} == sources ]]; then 320if [[ ${ETYPE} == sources ]]; then
321 DEPEND="!build? ( sys-apps/sed 321 DEPEND="!build? ( sys-apps/sed
322 >=sys-devel/binutils-2.11.90.0.31 )" 322 >=sys-devel/binutils-2.11.90.0.31 )"
323 RDEPEND="!build? ( >=sys-libs/ncurses-5.2 323 RDEPEND="!build? ( >=sys-libs/ncurses-5.2
324 sys-devel/make )" 324 sys-devel/make )"
325 PDEPEND="!build? ( virtual/dev-manager )" 325 PDEPEND="!build? ( virtual/dev-manager )"
326 326
327 PROVIDE="virtual/linux-sources" 327 PROVIDE="virtual/linux-sources"
328 328
329 SLOT="${PVR}" 329 SLOT="${PVR}"
353 else 353 else
354 DEBLOB_CHECK_URI="mirror://gentoo/${DEBLOB_CHECK_A}" 354 DEBLOB_CHECK_URI="mirror://gentoo/${DEBLOB_CHECK_A}"
355 fi 355 fi
356 DEBLOB_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/${DEBLOB_A}" 356 DEBLOB_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/${DEBLOB_A}"
357 HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}" 357 HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}"
358 358
359 KERNEL_URI="${KERNEL_URI} 359 KERNEL_URI="${KERNEL_URI}
360 deblob? ( 360 deblob? (
361 ${DEBLOB_URI} 361 ${DEBLOB_URI}
362 ${DEBLOB_CHECK_URI} 362 ${DEBLOB_CHECK_URI}
363 )" 363 )"
374 # Since we should NOT honour KBUILD_OUTPUT in headers 374 # Since we should NOT honour KBUILD_OUTPUT in headers
375 # lets unset it here. 375 # lets unset it here.
376 unset KBUILD_OUTPUT 376 unset KBUILD_OUTPUT
377 377
378 if [[ ${CTARGET} = ${CHOST} ]]; then 378 if [[ ${CTARGET} = ${CHOST} ]]; then
379 DEPEND="!virtual/os-headers"
380 PROVIDE="virtual/os-headers"
381 SLOT="0" 379 SLOT="0"
382 else 380 else
383 SLOT="${CTARGET}" 381 SLOT="${CTARGET}"
384 fi 382 fi
385else 383else

Legend:
Removed from v.1.248  
changed lines
  Added in v.1.249

  ViewVC Help
Powered by ViewVC 1.1.20