/[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.12 Revision 1.246
1# Copyright 1999-2009 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.246 2011/03/15 13:16:26 mpagano Exp $
4
1# kernel.eclass rewrite for a clean base regarding the 2.6 series of kernel 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
2# with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
3# 7#
4# Author: John Mylchreest <johnm@gentoo.org> 8# Original author: John Mylchreest <johnm@gentoo.org>
5# Copyright 2004 Gentoo Linux 9# Maintainer: kernel-misc@gentoo.org
6# 10#
7# Please direct your bugs to the current eclass maintainer :) 11# Please direct your bugs to the current eclass maintainer :)
8# thatll be: johnm
9 12
10# added functionality: 13# added functionality:
11# unipatch - a flexible, singular method to extract, add and remove patches. 14# unipatch - a flexible, singular method to extract, add and remove patches.
12 15
13# A Couple of env vars are available to effect usage of this eclass 16# A Couple of env vars are available to effect usage of this eclass
14# These are as follows: 17# These are as follows:
15# 18#
19# K_USEPV - When setting the EXTRAVERSION variable, it should
20# add PV to the end.
21# this is useful for thigns like wolk. IE:
22# EXTRAVERSION would be something like : -wolk-4.19-r1
16# K_NOSETEXTRAVERSION - if this is set then EXTRAVERSION will not be automatically set within the kernel Makefile 23# K_NOSETEXTRAVERSION - if this is set then EXTRAVERSION will not be
24# automatically set within the kernel Makefile
17# K_NOUSENAME - if this is set then EXTRAVERSION will not include the first part of ${PN} in EXTRAVERSION 25# K_NOUSENAME - if this is set then EXTRAVERSION will not include the
18# K_PREPATCHED - if the patchset is prepatched (ie: mm-sources, ck-sources, ac-sources) it will use PR (ie: -r5) as the patchset version for EXTRAVERSION 26# first part of ${PN} in EXTRAVERSION
27# K_NOUSEPR - if this is set then EXTRAVERSION will not include the
28# anything based on ${PR}.
29# K_PREPATCHED - if the patchset is prepatched (ie: mm-sources,
30# ck-sources, ac-sources) it will use PR (ie: -r5) as
31# the patchset version for
19# - and not use it as a true package revision 32# and not use it as a true package revision
20# K_EXTRAEINFO - this is a new-line seperated list of einfo displays in postinst and can be used to carry additional postinst messages 33# K_EXTRAEINFO - this is a new-line seperated list of einfo displays in
34# postinst and can be used to carry additional postinst
35# messages
36# K_EXTRAELOG - same as K_EXTRAEINFO except using elog instead of einfo
21# K_EXTRAEWARN - same as K_EXTRAEINFO except ewarn's instead of einfo's 37# K_EXTRAEWARN - same as K_EXTRAEINFO except using ewarn instead of einfo
22 38# K_SYMLINK - if this is set, then forcably create symlink anyway
39#
40# K_DEFCONFIG - Allow specifying a different defconfig target.
41# If length zero, defaults to "defconfig".
42# K_WANT_GENPATCHES - Apply genpatches to kernel source. Provide any
43# combination of "base" and "extras"
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
46# my-sources-2.6.12.ebuild
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.
55# K_LONGTERM - If set, the eclass will search for the kernel source
56# in the long term directories on the upstream servers
57# as the location has been changed by upstream
23# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which can be supported by the headers ebuild 58# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which
59# can be supported by the headers ebuild
24 60
25# UNIPATCH_LIST - space delimetered list of patches to be applied to the kernel 61# UNIPATCH_LIST - space delimetered list of patches to be applied to the
62# kernel
63# UNIPATCH_EXCLUDE - an addition var to support exlusion based completely
64# on "<passedstring>*" and not "<passedno#>_*"
65# - this should _NOT_ be used from the ebuild as this is
66# reserved for end users passing excludes from the cli
26# UNIPATCH_DOCS - space delimemeted list of docs to be installed to the doc dir 67# UNIPATCH_DOCS - space delimemeted list of docs to be installed to
68# the doc dir
69# UNIPATCH_STRICTORDER - if this is set places patches into directories of
70# order, so they are applied in the order passed
27 71
28ECLASS="kernel-2" 72inherit eutils toolchain-funcs versionator multilib
29EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst 73EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_preinst pkg_postinst
30 74
75# Added by Daniel Ostrow <dostrow@gentoo.org>
76# This is an ugly hack to get around an issue with a 32-bit userland on ppc64.
77# I will remove it when I come up with something more reasonable.
78[[ ${PROFILE_ARCH} == "ppc64" ]] && CHOST="powerpc64-${CHOST#*-}"
79
80export CTARGET=${CTARGET:-${CHOST}}
81if [[ ${CTARGET} == ${CHOST} && ${CATEGORY/cross-} != ${CATEGORY} ]]; then
82 export CTARGET=${CATEGORY/cross-}
83fi
84
31HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/" 85HOMEPAGE="http://www.kernel.org/ http://www.gentoo.org/ ${HOMEPAGE}"
86[[ -z ${LICENSE} ]] && \
32LICENSE="GPL-2" 87 LICENSE="GPL-2"
33IUSE="${IUSE} build"
34SLOT="${KV}"
35 88
89# This is the latest KV_PATCH of the deblob tool available from the
90# libre-sources upstream. If you bump this, you MUST regenerate the Manifests
91# for ALL kernel-2 consumer packages where deblob is available.
92[[ -z ${DEBLOB_MAX_VERSION} ]] && DEBLOB_MAX_VERSION=37
93
94# No need to run scanelf/strip on kernel sources/headers (bug #134453).
95RESTRICT="binchecks strip"
96
97# set LINUX_HOSTCFLAGS if not already set
98[[ -z ${LINUX_HOSTCFLAGS} ]] && \
99 LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"
100
101# debugging functions
102#==============================================================
103# this function exists only to help debug kernel-2.eclass
104# if you are adding new functionality in, put a call to it
105# at the start of src_unpack, or during SRC_URI/dep generation.
106debug-print-kernel2-variables() {
107 for v in PVR CKV OKV KV KV_FULL KV_MAJOR KV_MINOR KV_PATCH RELEASETYPE \
108 RELEASE UNIPATCH_LIST_DEFAULT UNIPATCH_LIST_GENPATCHES \
109 UNIPATCH_LIST S KERNEL_URI ; do
110 debug-print "${v}: ${!v}"
111 done
112}
113
114#Eclass functions only from here onwards ...
115#==============================================================
116handle_genpatches() {
117 local tarball
118 [[ -z ${K_WANT_GENPATCHES} || -z ${K_GENPATCHES_VER} ]] && return 1
119
120 for i in ${K_WANT_GENPATCHES} ; do
121 tarball="genpatches-${OKV}-${K_GENPATCHES_VER}.${i}.tar.bz2"
122 GENPATCHES_URI="${GENPATCHES_URI} mirror://gentoo/${tarball}"
123 UNIPATCH_LIST_GENPATCHES="${UNIPATCH_LIST_GENPATCHES} ${DISTDIR}/${tarball}"
124 done
125}
126
127detect_version() {
128 # this function will detect and set
129 # - OKV: Original Kernel Version (2.6.0/2.6.0-test11)
130 # - KV: Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1)
131 # - EXTRAVERSION: The additional version appended to OKV (-gentoo/-gentoo-r1)
132
133 if [[ -n ${KV_FULL} ]]; then
134 # we will set this for backwards compatibility.
135 KV=${KV_FULL}
136
137 # we know KV_FULL so lets stop here. but not without resetting S
138 S=${WORKDIR}/linux-${KV_FULL}
139 return
140 fi
141
142 # CKV is used as a comparison kernel version, which is used when
143 # PV doesnt reflect the genuine kernel version.
144 # this gets set to the portage style versioning. ie:
145 # CKV=2.6.11_rc4
146 CKV=${CKV:-${PV}}
147 OKV=${OKV:-${CKV}}
148 OKV=${OKV/_beta/-test}
149 OKV=${OKV/_rc/-rc}
150 OKV=${OKV/-r*}
151 OKV=${OKV/_p*}
152
153 KV_MAJOR=$(get_version_component_range 1 ${OKV})
154 KV_MINOR=$(get_version_component_range 2 ${OKV})
155 KV_PATCH=$(get_version_component_range 3 ${OKV})
156
157 if [[ ${KV_MAJOR}${KV_MINOR}${KV_PATCH} -ge 269 ]]; then
158 KV_EXTRA=$(get_version_component_range 4- ${OKV})
159 KV_EXTRA=${KV_EXTRA/[-_]*}
160 else
161 KV_PATCH=$(get_version_component_range 3- ${OKV})
162 fi
163 KV_PATCH=${KV_PATCH/[-_]*}
164
165 local v n=0 missing
166 for v in CKV OKV KV_{MAJOR,MINOR,PATCH} ; do
167 [[ -z ${!v} ]] && n=1 && missing="${missing}${v} ";
168 done
169 [[ $n -eq 1 ]] && \
170 eerror "Missing variables: ${missing}" && \
171 die "Failed to extract kernel version (try explicit CKV in ebuild)!"
172 unset v n missing
173
174 KERNEL_BASE_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}"
175 [[ -n "${K_LONGTERM}" ]] &&
176 KERNEL_BASE_URI="${KERNEL_BASE_URI}/longterm/v${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
177
178 KERNEL_URI="${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
179
180 RELEASE=${CKV/${OKV}}
181 RELEASE=${RELEASE/_beta}
182 RELEASE=${RELEASE/_rc/-rc}
183 RELEASE=${RELEASE/_pre/-pre}
184 # We cannot trivally call kernel_is here, because it calls us to detect the
185 # version
186 #kernel_is ge 2 6 && RELEASE=${RELEASE/-pre/-git}
187 [ $(($KV_MAJOR * 1000 + $KV_MINOR)) -ge 2006 ] && RELEASE=${RELEASE/-pre/-git}
188 RELEASETYPE=${RELEASE//[0-9]}
189
190 # Now we know that RELEASE is the -rc/-git
191 # and RELEASETYPE is the same but with its numerics stripped
192 # we can work on better sorting EXTRAVERSION.
193 # first of all, we add the release
194 EXTRAVERSION="${RELEASE}"
195 debug-print "0 EXTRAVERSION:${EXTRAVERSION}"
196 [[ -n ${KV_EXTRA} ]] && EXTRAVERSION=".${KV_EXTRA}${EXTRAVERSION}"
197
198 debug-print "1 EXTRAVERSION:${EXTRAVERSION}"
199 if [[ -n "${K_NOUSEPR}" ]]; then
200 # Don't add anything based on PR to EXTRAVERSION
201 debug-print "1.0 EXTRAVERSION:${EXTRAVERSION}"
202 elif [[ -n ${K_PREPATCHED} ]]; then
203 debug-print "1.1 EXTRAVERSION:${EXTRAVERSION}"
204 EXTRAVERSION="${EXTRAVERSION}-${PN/-*}${PR/r}"
205 elif [[ "${ETYPE}" = "sources" ]]; then
206 debug-print "1.2 EXTRAVERSION:${EXTRAVERSION}"
207 # For some sources we want to use the PV in the extra version
208 # This is because upstream releases with a completely different
209 # versioning scheme.
210 case ${PN/-*} in
211 wolk) K_USEPV=1;;
212 vserver) K_USEPV=1;;
213 esac
214
215 [[ -z "${K_NOUSENAME}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PN/-*}"
216 [[ -n "${K_USEPV}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PV//_/-}"
217 [[ -n "${PR//r0}" ]] && EXTRAVERSION="${EXTRAVERSION}-${PR}"
218 fi
219 debug-print "2 EXTRAVERSION:${EXTRAVERSION}"
220
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
223 # KV_FULL evaluates to MAJ.MIN.PAT.EXT.EXT after EXTRAVERSION
224 if [[ -n ${KV_EXTRA} ]]; then
225 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
226 KERNEL_URI="${KERNEL_BASE_URI}/patch-${CKV}.bz2
227 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
228 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV}.bz2"
229 fi
230
231 # We need to set this using OKV, but we need to set it before we do any
232 # messing around with OKV based on RELEASETYPE
233 KV_FULL=${OKV}${EXTRAVERSION}
234
235 # we will set this for backwards compatibility.
236 S=${WORKDIR}/linux-${KV_FULL}
237 KV=${KV_FULL}
238
239 # -rc-git pulls can be achieved by specifying CKV
240 # for example:
241 # CKV="2.6.11_rc3_pre2"
242 # will pull:
243 # linux-2.6.10.tar.bz2 & patch-2.6.11-rc3.bz2 & patch-2.6.11-rc3-git2.bz2
244
245 if [[ ${RELEASETYPE} == -rc ]] || [[ ${RELEASETYPE} == -pre ]]; then
246 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))"
247 KERNEL_URI="${KERNEL_BASE_URI}/testing/patch-${CKV//_/-}.bz2
248 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
249 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${CKV//_/-}.bz2"
250 fi
251
252 if [[ ${RELEASETYPE} == -git ]]; then
253 KERNEL_URI="${KERNEL_BASE_URI}/snapshots/patch-${OKV}${RELEASE}.bz2
254 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
255 UNIPATCH_LIST_DEFAULT="${DISTDIR}/patch-${OKV}${RELEASE}.bz2"
256 fi
257
258 if [[ ${RELEASETYPE} == -rc-git ]]; then
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
261 ${KERNEL_BASE_URI}/testing/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE/-git*}.bz2
262 ${KERNEL_BASE_URI}/linux-${OKV}.tar.bz2"
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"
265 fi
266
267 debug-print-kernel2-variables
268
269 handle_genpatches
270}
271
272kernel_is() {
273 # ALL of these should be set before we can safely continue this function.
274 # some of the sources have in the past had only one set.
275 local v n=0
276 for v in OKV KV_{MAJOR,MINOR,PATCH} ; do [[ -z ${!v} ]] && n=1 ; done
277 [[ $n -eq 1 ]] && detect_version
278 unset v n
279
280 # Now we can continue
281 local operator test value x=0 y=0 z=0
282
283 case ${1} in
284 lt) operator="-lt"; shift;;
285 gt) operator="-gt"; shift;;
286 le) operator="-le"; shift;;
287 ge) operator="-ge"; shift;;
288 eq) operator="-eq"; shift;;
289 *) operator="-eq";;
290 esac
291
292 for x in ${@}; do
293 for((y=0; y<$((3 - ${#x})); y++)); do value="${value}0"; done
294 value="${value}${x}"
295 z=$((${z} + 1))
296
297 case ${z} in
298 1) for((y=0; y<$((3 - ${#KV_MAJOR})); y++)); do test="${test}0"; done;
299 test="${test}${KV_MAJOR}";;
300 2) for((y=0; y<$((3 - ${#KV_MINOR})); y++)); do test="${test}0"; done;
301 test="${test}${KV_MINOR}";;
302 3) for((y=0; y<$((3 - ${#KV_PATCH})); y++)); do test="${test}0"; done;
303 test="${test}${KV_PATCH}";;
304 *) die "Error in kernel-2_kernel_is(): Too many parameters.";;
305 esac
306 done
307
308 [ ${test} ${operator} ${value} ] && return 0 || return 1
309}
310
311kernel_is_2_4() {
312 kernel_is 2 4
313}
314
315kernel_is_2_6() {
316 kernel_is 2 6 || kernel_is 2 5
317}
318
36# capture the sources type and set depends 319# Capture the sources type and set DEPENDs
37if [ "${ETYPE}" == "sources" ] 320if [[ ${ETYPE} == sources ]]; then
38then
39 #console-tools is needed to solve the loadkeys fiasco; binutils version needed to avoid Athlon/PIII/SSE assembler bugs.
40 DEPEND="!build? ( sys-apps/sed 321 DEPEND="!build? ( sys-apps/sed
41 >=sys-devel/binutils-2.11.90.0.31 )" 322 >=sys-devel/binutils-2.11.90.0.31 )"
42
43 RDEPEND="${DEPEND}
44 !build? ( >=sys-libs/ncurses-5.2 323 RDEPEND="!build? ( >=sys-libs/ncurses-5.2
45 dev-lang/perl
46 sys-apps/module-init-tools
47 sys-devel/make )" 324 sys-devel/make )"
325 PDEPEND="!build? ( virtual/dev-manager )"
48 326
49 PROVIDE="virtual/linux-sources virtual/alsa" 327 PROVIDE="virtual/linux-sources"
328 kernel_is gt 2 4 && PROVIDE="${PROVIDE} virtual/alsa"
50 329
330 SLOT="${PVR}"
331 DESCRIPTION="Sources for the ${KV_MAJOR}.${KV_MINOR} linux kernel"
332 IUSE="symlink build"
333
334 # Bug #266157, deblob for libre support
335 if [[ -z ${K_PREDEBLOBBED} ]] ; then
336 if [[ -z ${K_DEBLOB_AVAILABLE} ]] ; then
337 kernel_is ge 2 6 27 && \
338 kernel_is le 2 6 ${DEBLOB_MAX_VERSION} && \
339 K_DEBLOB_AVAILABLE=1
340 fi
341 if [[ ${K_DEBLOB_AVAILABLE} == "1" ]] ; then
342 IUSE="${IUSE} deblob"
343 # Reflect that kernels contain firmware blobs unless otherwise
344 # stripped
345 LICENSE="${LICENSE} !deblob? ( freedist )"
346
347 DEBLOB_PV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
348 DEBLOB_A="deblob-${DEBLOB_PV}"
349 DEBLOB_CHECK_A="deblob-check-${DEBLOB_PV}"
350 DEBLOB_HOMEPAGE="http://www.fsfla.org/svnwiki/selibre/linux-libre/"
351 DEBLOB_URI_PATH="download/releases/LATEST-${DEBLOB_PV}.N"
352 if ! has "${EAPI:-0}" 0 1 ; then
353 DEBLOB_CHECK_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/deblob-check -> ${DEBLOB_CHECK_A}"
354 else
355 DEBLOB_CHECK_URI="mirror://gentoo/${DEBLOB_CHECK_A}"
356 fi
357 DEBLOB_URI="${DEBLOB_HOMEPAGE}/${DEBLOB_URI_PATH}/${DEBLOB_A}"
358 HOMEPAGE="${HOMEPAGE} ${DEBLOB_HOMEPAGE}"
359
360 KERNEL_URI="${KERNEL_URI}
361 deblob? (
362 ${DEBLOB_URI}
363 ${DEBLOB_CHECK_URI}
364 )"
365 else
366 # We have no way to deblob older kernels, so just mark them as
367 # tainted with non-libre materials.
368 LICENSE="${LICENSE} freedist"
369 fi
370 fi
371
51elif [ "${ETYPE}" == "headers" ] 372elif [[ ${ETYPE} == headers ]]; then
52then 373 DESCRIPTION="Linux system headers"
374
375 # Since we should NOT honour KBUILD_OUTPUT in headers
376 # lets unset it here.
377 unset KBUILD_OUTPUT
378
379 if [[ ${CTARGET} = ${CHOST} ]]; then
380 DEPEND="!virtual/os-headers"
53 PROVIDE="virtual/kernel virtual/os-headers" 381 PROVIDE="virtual/os-headers"
382 SLOT="0"
383 else
384 SLOT="${CTARGET}"
385 fi
54else 386else
55 eerror "Unknown ETYPE=\"${ETYPE}\", must be either \"sources\" or \"headers\"" 387 eerror "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
56 die 388 die "Unknown ETYPE=\"${ETYPE}\", must be \"sources\" or \"headers\""
57fi 389fi
58 390
59# Grab kernel version from KV 391# Cross-compile support functions
60KV_MAJOR=$(echo ${KV} | cut -d. -f1)
61KV_MINOR=$(echo ${KV} | cut -d. -f2)
62KV_PATCH=$(echo ${KV} | cut -d. -f3)
63KV_PATCH=${KV_PATCH/[-_]*/}
64
65# set LINUX_HOSTCFLAGS if not already set
66[ -z "$LINUX_HOSTCFLAGS" ] && LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -I${S}/include"
67
68
69#eclass functions only from here onwards.
70#============================================================== 392#==============================================================
71kernel_is_2_4() { 393kernel_header_destdir() {
72 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 4 ] && return 0 || return 1 394 [[ ${CTARGET} == ${CHOST} ]] \
395 && echo /usr/include \
396 || echo /usr/${CTARGET}/usr/include
73} 397}
74 398
75kernel_is_2_6() { 399cross_pre_c_headers() {
76 [ ${KV_MAJOR} -eq 2 -a ${KV_MINOR} -eq 5 -o ${KV_MINOR} -eq 6 ] && return 0 || return 1 400 use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]]
77} 401}
78 402
403env_setup_xmakeopts() {
404 # Kernel ARCH != portage ARCH
405 export KARCH=$(tc-arch-kernel)
406
407 # When cross-compiling, we need to set the ARCH/CROSS_COMPILE
408 # variables properly or bad things happen !
409 xmakeopts="ARCH=${KARCH}"
410 if [[ ${CTARGET} != ${CHOST} ]] && ! cross_pre_c_headers ; then
411 xmakeopts="${xmakeopts} CROSS_COMPILE=${CTARGET}-"
412 elif type -p ${CHOST}-ar > /dev/null ; then
413 xmakeopts="${xmakeopts} CROSS_COMPILE=${CHOST}-"
414 fi
415 export xmakeopts
416}
79 417
80# Unpack functions 418# Unpack functions
81#============================================================== 419#==============================================================
82unpack_2_4() { 420unpack_2_4() {
83 cd ${S}
84 # this file is required for other things to build properly, 421 # this file is required for other things to build properly,
85 # so we autogenerate it 422 # so we autogenerate it
86 make mrproper || die "make mrproper died" 423 make -s mrproper ${xmakeopts} || die "make mrproper failed"
424 make -s symlinks ${xmakeopts} || die "make symlinks failed"
87 make include/linux/version.h || die "make include/linux/version.h failed" 425 make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed"
88 echo ">>> version.h compiled successfully." 426 echo ">>> version.h compiled successfully."
89} 427}
90 428
429unpack_2_6() {
430 # this file is required for other things to build properly, so we
431 # autogenerate it ... generate a .config to keep version.h build from
432 # spitting out an annoying warning
433 make -s mrproper ${xmakeopts} 2>/dev/null \
434 || die "make mrproper failed"
435
436 # quick fix for bug #132152 which triggers when it cannot include linux
437 # headers (ie, we have not installed it yet)
438 if ! make -s defconfig ${xmakeopts} &>/dev/null 2>&1 ; then
439 touch .config
440 eerror "make defconfig failed."
441 eerror "assuming you dont have any headers installed yet and continuing"
442 epause 5
443 fi
444
445 make -s include/linux/version.h ${xmakeopts} 2>/dev/null \
446 || die "make include/linux/version.h failed"
447 rm -f .config >/dev/null
448}
449
91universal_unpack() { 450universal_unpack() {
451 cd "${WORKDIR}"
452 unpack linux-${OKV}.tar.bz2
453 if [[ -d "linux" ]]; then
454 mv linux linux-${KV_FULL} \
455 || die "Unable to move source tree to ${KV_FULL}."
456 elif [[ "${OKV}" != "${KV_FULL}" ]]; then
457 mv linux-${OKV} linux-${KV_FULL} \
458 || die "Unable to move source tree to ${KV_FULL}."
459 fi
460 cd "${S}"
461
92 # remove all backup files 462 # remove all backup files
93 find . -iname "*~" -exec rm {} \; 2> /dev/null 463 find . -iname "*~" -exec rm {} \; 2> /dev/null
94 464
95 if [ -d "${S}/Documentation/DocBook" ] 465 # fix a problem on ppc where TOUT writes to /usr/src/linux breaking sandbox
466 # only do this for kernel < 2.6.27 since this file does not exist in later
467 # kernels
468 if [[ ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} < 2.6.27 ]]
96 then 469 then
97 cd ${S}/Documentation/DocBook 470 sed -i \
98 sed -e "s:db2:docbook2:g" Makefile > Makefile.new \ 471 -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \
99 && mv Makefile.new Makefile 472 "${S}"/arch/ppc/Makefile
100 cd ${S} 473 else
474 sed -i \
475 -e 's|TOUT := .tmp_gas_check|TOUT := $(T).tmp_gas_check|' \
476 "${S}"/arch/powerpc/Makefile
101 fi 477 fi
102} 478}
103 479
104unpack_set_extraversion() { 480unpack_set_extraversion() {
105 # Gentoo Linux uses /boot, so fix 'make install' to work properly and fix EXTRAVERSION
106 cd ${S} 481 cd "${S}"
107 mv Makefile Makefile.orig 482 sed -i -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" Makefile
483 cd "${OLDPWD}"
484}
485
486# Should be done after patches have been applied
487# Otherwise patches that modify the same area of Makefile will fail
488unpack_fix_install_path() {
489 cd "${S}"
108 sed -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' \ 490 sed -i -e 's:#export\tINSTALL_PATH:export\tINSTALL_PATH:' Makefile
109 -e "s:^\(EXTRAVERSION =\).*:\1 ${EXTRAVERSION}:" \
110 Makefile.orig > Makefile
111 rm Makefile.orig
112} 491}
113 492
114# Compile Functions 493# Compile Functions
115#============================================================== 494#==============================================================
116compile_headers() { 495compile_headers() {
117 local MY_ARCH 496 env_setup_xmakeopts
118 497
119 MY_ARCH=${ARCH} 498 # if we couldnt obtain HOSTCFLAGS from the Makefile,
120 unset ${ARCH} 499 # then set it to something sane
500 local HOSTCFLAGS=$(getfilevar HOSTCFLAGS "${S}"/Makefile)
501 HOSTCFLAGS=${HOSTCFLAGS:--Wall -Wstrict-prototypes -O2 -fomit-frame-pointer}
502
503 if kernel_is 2 4; then
121 yes "" | make oldconfig 504 yes "" | make oldconfig ${xmakeopts}
122 echo ">>> make oldconfig complete" 505 echo ">>> make oldconfig complete"
123 ARCH=${MY_ARCH} 506 make dep ${xmakeopts}
507 elif kernel_is 2 6; then
508 # 2.6.18 introduces headers_install which means we dont need any
509 # of this crap anymore :D
510 kernel_is ge 2 6 18 && return 0
511
512 # autoconf.h isnt generated unless it already exists. plus, we have
513 # no guarantee that any headers are installed on the system...
514 [[ -f ${ROOT}/usr/include/linux/autoconf.h ]] \
515 || touch include/linux/autoconf.h
516
517 # if K_DEFCONFIG isn't set, force to "defconfig"
518 # needed by mips
519 if [[ -z ${K_DEFCONFIG} ]]; then
520 if [[ $(KV_to_int ${KV}) -ge $(KV_to_int 2.6.16) ]]; then
521 case ${CTARGET} in
522 powerpc64*) K_DEFCONFIG="ppc64_defconfig";;
523 powerpc*) K_DEFCONFIG="pmac32_defconfig";;
524 *) K_DEFCONFIG="defconfig";;
525 esac
526 else
527 K_DEFCONFIG="defconfig"
528 fi
529 fi
530
531 # if there arent any installed headers, then there also isnt an asm
532 # symlink in /usr/include/, and make defconfig will fail, so we have
533 # to force an include path with $S.
534 HOSTCFLAGS="${HOSTCFLAGS} -I${S}/include/"
535 ln -sf asm-${KARCH} "${S}"/include/asm
536 cross_pre_c_headers && return 0
537
538 make ${K_DEFCONFIG} HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "defconfig failed (${K_DEFCONFIG})"
539 if compile_headers_tweak_config ; then
540 yes "" | make oldconfig HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "2nd oldconfig failed"
541 fi
542 make prepare HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
543 make prepare-all HOSTCFLAGS="${HOSTCFLAGS}" ${xmakeopts} || die "prepare failed"
544 fi
545}
546
547compile_headers_tweak_config() {
548 # some targets can be very very picky, so let's finesse the
549 # .config based upon any info we may have
550 case ${CTARGET} in
551 sh*)
552 sed -i '/CONFIG_CPU_SH/d' .config
553 echo "CONFIG_CPU_SH${CTARGET:2:1}=y" >> .config
554 return 0;;
555 esac
556
557 # no changes, so lets do nothing
558 return 1
124} 559}
125 560
126# install functions 561# install functions
127#============================================================== 562#==============================================================
128install_universal() { 563install_universal() {
129 #fix silly permissions in tarball 564 #fix silly permissions in tarball
130 cd ${WORKDIR} 565 cd "${WORKDIR}"
131 chown -R root:root * 566 chown -R root:0 * >& /dev/null
132 chmod -R a+r-w+X,u+w * 567 chmod -R a+r-w+X,u+w *
568 cd ${OLDPWD}
133} 569}
134 570
135install_headers() { 571install_headers() {
136 [ $(kernel_is_2_4) $? == 0 ] && unpack_2_4 572 local ddir=$(kernel_header_destdir)
137 [ $(kernel_is_2_6) $? == 0 ] && ln -sf ${S}/include/asm-${ARCH} ${S}/include/asm
138 573
139 cd ${S} 574 # 2.6.18 introduces headers_install which means we dont need any
140 dodir /usr/include/linux 575 # of this crap anymore :D
141 cp -ax ${S}/include/linux/* ${D}/usr/include/linux 576 if kernel_is ge 2 6 18 ; then
577 env_setup_xmakeopts
578 emake headers_install INSTALL_HDR_PATH="${D}"/${ddir}/.. ${xmakeopts} || die
579
580 # let other packages install some of these headers
581 rm -rf "${D}"/${ddir}/sound #alsa-headers
582 rm -rf "${D}"/${ddir}/scsi #glibc/uclibc/etc...
583 return 0
584 fi
585
586 # Do not use "linux/*" as that can cause problems with very long
587 # $S values where the cmdline to cp is too long
588 pushd "${S}" >/dev/null
589 dodir ${ddir}/linux
590 cp -pPR "${S}"/include/linux "${D}"/${ddir}/ || die
142 rm -rf ${D}/usr/include/linux/modules 591 rm -rf "${D}"/${ddir}/linux/modules
143 dodir /usr/include/asm 592
144 cp -ax ${S}/include/asm/* ${D}/usr/include/asm 593 dodir ${ddir}/asm
145 594 cp -pPR "${S}"/include/asm/* "${D}"/${ddir}/asm
146 if [ $(kernel_is_2_6) $? == 0 ] 595
147 then 596 if kernel_is 2 6 ; then
148 dodir /usr/include/asm-generic 597 dodir ${ddir}/asm-generic
149 cp -ax ${S}/include/asm-generic/* ${D}/usr/include/asm-generic 598 cp -pPR "${S}"/include/asm-generic/* "${D}"/${ddir}/asm-generic
150 fi 599 fi
600
601 # clean up
602 find "${D}" -name '*.orig' -exec rm -f {} \;
603
604 popd >/dev/null
151} 605}
152 606
153install_sources() { 607install_sources() {
154 local doc 608 local file
155 local docs
156 609
157 cd ${S} 610 cd "${S}"
158 dodir /usr/src 611 dodir /usr/src
159 echo ">>> Copying sources..." 612 echo ">>> Copying sources ..."
160 if [ -d "${WORKDIR}/${KV}/docs/" ] 613
161 then 614 file="$(find ${WORKDIR} -iname "docs" -type d)"
162 for file in $(ls -1 ${WORKDIR}/${KV}/docs/) 615 if [[ -n ${file} ]]; then
163 do 616 for file in $(find ${file} -type f); do
164 echo "XX_${file}*" >> ${S}/patches.txt 617 echo "${file//*docs\/}" >> "${S}"/patches.txt
165 cat ${WORKDIR}/${KV}/docs/${file} >> ${S}/patches.txt 618 echo "===================================================" >> "${S}"/patches.txt
619 cat ${file} >> "${S}"/patches.txt
620 echo "===================================================" >> "${S}"/patches.txt
166 echo "" >> ${S}/patches.txt 621 echo "" >> "${S}"/patches.txt
167 done 622 done
168 fi 623 fi
169 624
170 if [ ! -f ${S}/patches.txt ] 625 if [[ ! -f ${S}/patches.txt ]]; then
171 then
172 # patches.txt is empty so lets use our ChangeLog 626 # patches.txt is empty so lets use our ChangeLog
173 [ -f ${FILESDIR}/../ChangeLog ] && echo "Please check the ebuild ChangeLog for more details." > ${S}/patches.txt 627 [[ -f ${FILESDIR}/../ChangeLog ]] && \
628 echo "Please check the ebuild ChangeLog for more details." \
629 > "${S}"/patches.txt
174 fi 630 fi
175 631
176 for doc in ${UNIPATCH_DOCS}
177 do
178 [ -f ${doc} ] && docs="${docs} ${doc}"
179 done
180
181 if [ -f ${S}/patches.txt ]; then
182 docs="${docs} ${S}/patches.txt"
183 fi
184 dodoc ${docs}
185 mv ${WORKDIR}/linux* ${D}/usr/src 632 mv ${WORKDIR}/linux* "${D}"/usr/src
186} 633}
187 634
188# pkg_preinst functions 635# pkg_preinst functions
189#============================================================== 636#==============================================================
190preinst_headers() { 637preinst_headers() {
191 [ -L ${ROOT}usr/include/linux ] && rm ${ROOT}usr/include/linux 638 local ddir=$(kernel_header_destdir)
192 [ -L ${ROOT}usr/include/asm ] && rm ${ROOT}usr/include/asm 639 [[ -L ${ddir}/linux ]] && rm ${ddir}/linux
640 [[ -L ${ddir}/asm ]] && rm ${ddir}/asm
193} 641}
194 642
195# pkg_postinst functions 643# pkg_postinst functions
196#============================================================== 644#==============================================================
197postinst_sources() { 645postinst_sources() {
646 local MAKELINK=0
647
648 # if we have USE=symlink, then force K_SYMLINK=1
649 use symlink && K_SYMLINK=1
650
651 # if we're using a deblobbed kernel, it's not supported
652 [[ $K_DEBLOB_AVAILABLE == 1 ]] && \
653 use deblob && \
654 K_SECURITY_UNSUPPORTED=deblob
655
656 # if we are to forcably symlink, delete it if it already exists first.
657 if [[ ${K_SYMLINK} > 0 ]]; then
658 [[ -h ${ROOT}usr/src/linux ]] && rm ${ROOT}usr/src/linux
659 MAKELINK=1
660 fi
661
662 # if the link doesnt exist, lets create it
198 if [ ! -h ${ROOT}usr/src/linux ] 663 [[ ! -h ${ROOT}usr/src/linux ]] && MAKELINK=1
664
665 if [[ ${MAKELINK} == 1 ]]; then
666 cd "${ROOT}"usr/src
667 ln -sf linux-${KV_FULL} linux
668 cd ${OLDPWD}
669 fi
670
671 # Don't forget to make directory for sysfs
672 [[ ! -d ${ROOT}sys ]] && kernel_is 2 6 && mkdir ${ROOT}sys
673
674 echo
675 elog "If you are upgrading from a previous kernel, you may be interested"
676 elog "in the following document:"
677 elog " - General upgrade guide: http://www.gentoo.org/doc/en/kernel-upgrade.xml"
678 echo
679
680 # if K_EXTRAEINFO is set then lets display it now
681 if [[ -n ${K_EXTRAEINFO} ]]; then
682 echo ${K_EXTRAEINFO} | fmt |
683 while read -s ELINE; do einfo "${ELINE}"; done
684 fi
685
686 # if K_EXTRAELOG is set then lets display it now
687 if [[ -n ${K_EXTRAELOG} ]]; then
688 echo ${K_EXTRAELOG} | fmt |
689 while read -s ELINE; do elog "${ELINE}"; done
690 fi
691
692 # if K_EXTRAEWARN is set then lets display it now
693 if [[ -n ${K_EXTRAEWARN} ]]; then
694 echo ${K_EXTRAEWARN} | fmt |
695 while read -s ELINE; do ewarn "${ELINE}"; done
696 fi
697
698 # optionally display security unsupported message
699 # Start with why
700 if [[ ${K_SECURITY_UNSUPPORTED} = deblob ]]; then
701 ewarn "Deblobbed kernels are UNSUPPORTED by Gentoo Security."
702 elif [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then
703 ewarn "${PN} is UNSUPPORTED by Gentoo Security."
704 fi
705 # And now the general message.
706 if [[ -n ${K_SECURITY_UNSUPPORTED} ]]; then
707 ewarn "This means that it is likely to be vulnerable to recent security issues."
708 ewarn "For specific information on why this kernel is unsupported, please read:"
709 ewarn "http://www.gentoo.org/proj/en/security/kernel.xml"
710 fi
711
712 # warn sparc users that they need to do cross-compiling with >= 2.6.25(bug #214765)
713 KV_MAJOR=$(get_version_component_range 1 ${OKV})
714 KV_MINOR=$(get_version_component_range 2 ${OKV})
715 KV_PATCH=$(get_version_component_range 3 ${OKV})
716 if [[ "$(tc-arch)" = "sparc" ]] \
717 && [[ ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.24 ]]
199 then 718 then
200 ln -sf ${ROOT}usr/src/linux-${KV} ${ROOT}usr/src/linux
201 fi
202
203 # Don't forget to make directory for sysfs
204 [ ! -d "${ROOT}/sys" -a $(kernel_is_2_6) $? == 0 ] && mkdir /sys
205
206 echo
207 einfo "After installing a new kernel of any version, it is important"
208 einfo "that you have the appropriate /etc/modules.autoload.d/kernel-X.Y"
209 einfo "created (X.Y is the first 2 parts of your new kernel version)"
210 echo
211 einfo "For example, this kernel will require:"
212 einfo "/etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}"
213 echo
214
215 # if K_EXTRAEINFO is set then lets display it now
216 if [ -n "${K_EXTRAEINFO}" ]
217 then
218 echo ${K_EXTRAEINFO} | fmt |
219 while read -s ELINE
220 do
221 einfo "${ELINE}"
222 done
223
224 echo 719 echo
225 fi 720 elog "NOTE: Since 2.6.25 the kernel Makefile has changed in a way that"
226 721 elog "you now need to do"
227 # if K_EXTRAEWARN is set then lets display it now 722 elog " make CROSS_COMPILE=sparc64-unknown-linux-gnu-"
228 if [ -n "${K_EXTRAEWARN}" ] 723 elog "instead of just"
229 then 724 elog " make"
230 echo ${K_EXTRAEWARN} | fmt | 725 elog "to compile the kernel. For more information please browse to"
231 while read -s ELINE 726 elog "https://bugs.gentoo.org/show_bug.cgi?id=214765"
232 do
233 ewarn "${ELINE}"
234 done
235
236 echo 727 echo
237 fi 728 fi
238}
239
240postinst_headers() {
241 echo
242 einfo "Kernel headers are usually only used when recompiling glibc."
243 einfo "Following the installation of newer headers it is advised that"
244 einfo "you re-merge glibc as follows:"
245 einfo "# emerge glibc"
246 einfo "Failure to do so will cause glibc to not make use of newer"
247 einfo "features present in the updated kernelheaders."
248 echo
249} 729}
250 730
251# pkg_setup functions 731# pkg_setup functions
252#============================================================== 732#==============================================================
253setup_headers() { 733setup_headers() {
254 ARCH=$(uname -m | sed -e s/[i].86/i386/ -e s/x86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/amd64/x86_64/)
255 [ "$ARCH" == "sparc" -a "$PROFILE_ARCH" == "sparc64" ] && ARCH="sparc64"
256
257 [ -z "${H_SUPPORTEDARCH}" ] && H_SUPPORTEDARCH="${PN/-*/}" 734 [[ -z ${H_SUPPORTEDARCH} ]] && H_SUPPORTEDARCH=${PN/-*/}
258 for i in ${H_SUPPORTEDARCH} 735 for i in ${H_SUPPORTEDARCH}; do
259 do
260 [ "${ARCH}" == "${i}" ] && H_ACCEPT_ARCH="yes" 736 [[ $(tc-arch) == "${i}" ]] && H_ACCEPT_ARCH="yes"
261 done 737 done
262 738
263 if [ "${H_ACCEPT_ARCH}" != "yes" ] 739 if [[ ${H_ACCEPT_ARCH} != "yes" ]]; then
264 then
265 echo 740 echo
266 eerror "This version of ${PN} does not support ${ARCH}." 741 eerror "This version of ${PN} does not support $(tc-arch)."
267 eerror "Please merge the appropriate sources, in most cases" 742 eerror "Please merge the appropriate sources, in most cases"
268 eerror "this will be ${ARCH}-headers." 743 eerror "(but not all) this will be called $(tc-arch)-headers."
269 die "incorrect headers" 744 die "Package unsupported for $(tc-arch)"
270 fi 745 fi
271} 746}
272 747
273# unipatch 748# unipatch
274#============================================================== 749#==============================================================
275unipatch() { 750unipatch() {
276 local i 751 local i x y z extention PIPE_CMD UNIPATCH_DROP KPATCH_DIR PATCH_DEPTH ELINE
277 local x 752 local STRICT_COUNT PATCH_LEVEL myLC_ALL myLANG
278 local extention 753
279 local PIPE_CMD 754 # set to a standard locale to ensure sorts are ordered properly.
280 local UNIPATCH_EXCLUDE 755 myLC_ALL="${LC_ALL}"
281 local KPATCH_DIR 756 myLANG="${LANG}"
282 local PATCH_DEPTH 757 LC_ALL="C"
283 local ELINE 758 LANG=""
284 759
285 [ -z "${KPATCH_DIR}" ] && KPATCH_DIR="${WORKDIR}/patches/" 760 [ -z "${KPATCH_DIR}" ] && KPATCH_DIR="${WORKDIR}/patches/"
286 [ ! -d ${KPATCH_DIR} ] && mkdir -p ${KPATCH_DIR} 761 [ ! -d ${KPATCH_DIR} ] && mkdir -p ${KPATCH_DIR}
287 762
763 # We're gonna need it when doing patches with a predefined patchlevel
764 eshopts_push -s extglob
765
288 # This function will unpack all passed tarballs, add any passed patches, and remove any passed patchnumbers 766 # This function will unpack all passed tarballs, add any passed patches, and remove any passed patchnumbers
289 # usage can be either via an env var or by params 767 # usage can be either via an env var or by params
768 # although due to the nature we pass this within this eclass
769 # it shall be by param only.
290 [ -z "${UNIPATCH_LIST}" ] && UNIPATCH_LIST="${@}" 770 # -z "${UNIPATCH_LIST}" ] && UNIPATCH_LIST="${@}"
771 UNIPATCH_LIST="${@}"
291 772
292 #unpack any passed tarballs 773 #unpack any passed tarballs
293 for i in ${UNIPATCH_LIST} 774 for i in ${UNIPATCH_LIST}; do
294 do
295 if [ -n "$(echo ${i} | grep -e "\.tar" -e "\.tbz" -e "\.tgz")" ] 775 if echo ${i} | grep -qs -e "\.tar" -e "\.tbz" -e "\.tgz" ; then
296 then 776 if [ -n "${UNIPATCH_STRICTORDER}" ]; then
777 unset z
778 STRICT_COUNT=$((10#${STRICT_COUNT} + 1))
779 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
780 do z="${z}0";
781 done
782 PATCH_ORDER="${z}${STRICT_COUNT}"
783
784 mkdir -p "${KPATCH_DIR}/${PATCH_ORDER}"
785 pushd "${KPATCH_DIR}/${PATCH_ORDER}" >/dev/null
786 unpack ${i##*/}
787 popd >/dev/null
788 else
789 pushd "${KPATCH_DIR}" >/dev/null
790 unpack ${i##*/}
791 popd >/dev/null
792 fi
793
794 [[ ${i} == *:* ]] && echo ">>> Strict patch levels not currently supported for tarballed patchsets"
795 else
297 extention=${i/*./} 796 extention=${i/*./}
797 extention=${extention/:*/}
798 PIPE_CMD=""
298 case ${extention} in 799 case ${extention} in
299 tbz2) PIPE_CMD="tar -xvjf";; 800 xz) PIPE_CMD="xz -dc";;
300 bz2) PIPE_CMD="tar -xvjf";;
301 tgz) PIPE_CMD="tar -xvzf";;
302 gz) PIPE_CMD="tar -xvzf";; 801 lzma) PIPE_CMD="lzma -dc";;
303 *) eerror "Unrecognized tarball compression" 802 bz2) PIPE_CMD="bzip2 -dc";;
304 die "Unrecognized tarball compression";; 803 patch) PIPE_CMD="cat";;
804 diff) PIPE_CMD="cat";;
805 gz|Z|z) PIPE_CMD="gzip -dc";;
806 ZIP|zip) PIPE_CMD="unzip -p";;
807 *) UNIPATCH_DROP="${UNIPATCH_DROP} ${i/:*/}";;
305 esac 808 esac
306 809
307 ${PIPE_CMD} ${i} -C ${KPATCH_DIR} 1>/dev/null 810 PATCH_LEVEL=${i/*([^:])?(:)}
308 if [ $? == 0 ] 811 i=${i/:*/}
309 then 812 x=${i/*\//}
310 einfo "${i/*\//} unpacked" 813 x=${x/\.${extention}/}
814
815 if [ -n "${PIPE_CMD}" ]; then
816 if [ ! -r "${i}" ]; then
817 echo
818 eerror "FATAL: unable to locate:"
819 eerror "${i}"
820 eerror "for read-only. The file either has incorrect permissions"
821 eerror "or does not exist."
822 die Unable to locate ${i}
823 fi
824
825 if [ -n "${UNIPATCH_STRICTORDER}" ]; then
826 unset z
827 STRICT_COUNT=$((10#${STRICT_COUNT} + 1))
828 for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
829 do z="${z}0";
830 done
831 PATCH_ORDER="${z}${STRICT_COUNT}"
832
833 mkdir -p ${KPATCH_DIR}/${PATCH_ORDER}/
834 $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${PATCH_ORDER}/${x}.patch${PATCH_LEVEL}) || die "uncompressing patch failed"
311 else 835 else
312 eerror "Failed to unpack ${i}" 836 $(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${x}.patch${PATCH_LEVEL}) || die "uncompressing patch failed"
313 die "unable to unpack patch tarball" 837 fi
314 fi 838 fi
315
316 UNIPATCH_LIST="${UNIPATCH_LIST/${i}/}"
317 fi 839 fi
318 done
319
320 #so now everything is unpacked, lets work out whats to be dropped and whats to be included.
321 for i in ${UNIPATCH_LIST}
322 do
323 extention=${i/*./}
324 PIPE_CMD=""
325 case ${extention} in
326 bz2) PIPE_CMD="bzip2 -dc";;
327 patch) PIPE_CMD="cat";;
328 diff) PIPE_CMD="cat";;
329 gz|Z|z) PIPE_CMD="gzip -dc";;
330 ZIP|zip) PIPE_CMD="unzip -p";;
331 *) UNIPATCH_EXCLUDE="${UNIPATCH_EXCLUDE} ${i}";;
332 esac
333 x=${i/*\//}
334 x=${x/\.${extention}/}
335 [ -n "${PIPE_CMD}" ] && ${PIPE_CMD} ${i} > ${KPATCH_DIR}/${x}.patch
336 done 840 done
337 841
338 #populate KPATCH_DIRS so we know where to look to remove the excludes 842 #populate KPATCH_DIRS so we know where to look to remove the excludes
339 x=${KPATCH_DIR} 843 x=${KPATCH_DIR}
340 KPATCH_DIR="" 844 KPATCH_DIR=""
341 for i in $(find ${x} -type d) 845 for i in $(find ${x} -type d | sort -n); do
342 do
343 KPATCH_DIR="${KPATCH_DIR} ${i}" 846 KPATCH_DIR="${KPATCH_DIR} ${i}"
344 done 847 done
345 848
849 # do not apply fbcondecor patch to sparc/sparc64 as it breaks boot
850 # bug #272676
851 if [[ "$(tc-arch)" = "sparc" || "$(tc-arch)" = "sparc64" ]]; then
852 if [[ ${KV_MAJOR}.${KV_MINOR}.${KV_PATCH} > 2.6.28 ]]; then
853 UNIPATCH_DROP="${UNIPATCH_DROP} *_fbcondecor-0.9.6.patch"
854 echo
855 ewarn "fbcondecor currently prevents sparc/sparc64 from booting"
856 ewarn "for kernel versions >= 2.6.29. Removing fbcondecor patch."
857 ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=272676 for details"
858 echo
859 fi
860 fi
861
346 #so now lets get rid of the patchno's we want to exclude 862 #so now lets get rid of the patchno's we want to exclude
863 UNIPATCH_DROP="${UNIPATCH_EXCLUDE} ${UNIPATCH_DROP}"
347 for i in ${UNIPATCH_EXCLUDE} 864 for i in ${UNIPATCH_DROP}; do
348 do
349 for x in ${KPATCH_DIR}
350 do
351 rm ${x}/${i}_* 2>/dev/null
352 if [ $? == 0 ]
353 then
354 einfo "Excluding Patch #${i}" 865 ebegin "Excluding Patch #${i}"
355 einfo "From: ${x/${WORKDIR}/}" 866 for x in ${KPATCH_DIR}; do rm -f ${x}/${i}* 2>/dev/null; done
356 fi 867 eend $?
357 done
358 done 868 done
359 869
360 # and now, finally, we patch it :) 870 # and now, finally, we patch it :)
361 for x in ${KPATCH_DIR} 871 for x in ${KPATCH_DIR}; do
362 do
363 for i in $(find ${x} -maxdepth 1 -iname "*.patch" -or -iname "*.diff" | sort -u) 872 for i in $(find ${x} -maxdepth 1 -iname "*.patch*" -or -iname "*.diff*" | sort -n); do
364 do 873 STDERR_T="${T}/${i/*\//}"
874 STDERR_T="${STDERR_T/.patch*/.err}"
365 875
876 [ -z ${i/*.patch*/} ] && PATCH_DEPTH=${i/*.patch/}
877 #[ -z ${i/*.diff*/} ] && PATCH_DEPTH=${i/*.diff/}
366 878
367 PATCH_DEPTH=0 879 if [ -z "${PATCH_DEPTH}" ]; then PATCH_DEPTH=0; fi
880
368 ebegin "Applying ${i/*\//}" 881 ebegin "Applying ${i/*\//} (-p${PATCH_DEPTH}+)"
369 while [ ${PATCH_DEPTH} -lt 5 ] 882 while [ ${PATCH_DEPTH} -lt 5 ]; do
370 do 883 echo "Attempting Dry-run:" >> ${STDERR_T}
371 if (patch -p${PATCH_DEPTH} --dry-run -f < ${i} >/dev/null) 884 echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i}" >> ${STDERR_T}
372 then 885 echo "=======================================================" >> ${STDERR_T}
373 $(patch -p${PATCH_DEPTH} -f < ${i} >/dev/null) 886 if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch --dry-run -f < ${i} >> ${STDERR_T}) $? -eq 0 ]; then
374 if [ "$?" -eq 0 ] 887 echo "Attempting patch:" > ${STDERR_T}
375 then 888 echo "cmd: patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i}" >> ${STDERR_T}
889 echo "=======================================================" >> ${STDERR_T}
890 if [ $(patch -p${PATCH_DEPTH} --no-backup-if-mismatch -f < ${i} >> ${STDERR_T}) "$?" -eq 0 ]; then
376 eend 0 891 eend 0
892 rm ${STDERR_T}
377 break 893 break
378 else 894 else
379 eend 1 895 eend 1
380 eerror "Failed to apply patch ${i/*\//}" 896 eerror "Failed to apply patch ${i/*\//}"
897 eerror "Please attach ${STDERR_T} to any bug you may post."
898 eshopts_pop
381 die "Failed to apply ${i/*\//}" 899 die "Failed to apply ${i/*\//}"
382 fi 900 fi
383 else 901 else
384 PATCH_DEPTH=$((${PATCH_DEPTH} + 1)) 902 PATCH_DEPTH=$((${PATCH_DEPTH} + 1))
385 fi 903 fi
386 done 904 done
387 if [ ${PATCH_DEPTH} -eq 5 ] 905 if [ ${PATCH_DEPTH} -eq 5 ]; then
388 then
389 eend 1 906 eend 1
907 eerror "Please attach ${STDERR_T} to any bug you may post."
908 eshopts_pop
390 die "Unable to dry-run patch." 909 die "Unable to dry-run patch."
391 fi 910 fi
392
393
394 done 911 done
395 done 912 done
396}
397 913
398# custom functions 914 # This is a quick, and kind of nasty hack to deal with UNIPATCH_DOCS which
915 # sit in KPATCH_DIR's. This is handled properly in the unipatch rewrite,
916 # which is why I'm not taking too much time over this.
917 local tmp
918 for i in ${UNIPATCH_DOCS}; do
919 tmp="${tmp} ${i//*\/}"
920 cp -f ${i} "${T}"/
921 done
922 UNIPATCH_DOCS="${tmp}"
923
924 # clean up KPATCH_DIR's - fixes bug #53610
925 for x in ${KPATCH_DIR}; do rm -Rf ${x}; done
926
927 LC_ALL="${myLC_ALL}"
928 LANG="${myLANG}"
929 eshopts_pop
930}
931
932# getfilevar accepts 2 vars as follows:
933# getfilevar <VARIABLE> <CONFIGFILE>
934# pulled from linux-info
935
936getfilevar() {
937 local workingdir basefname basedname xarch=$(tc-arch-kernel)
938
939 if [[ -z ${1} ]] && [[ ! -f ${2} ]]; then
940 echo -e "\n"
941 eerror "getfilevar requires 2 variables, with the second a valid file."
942 eerror " getfilevar <VARIABLE> <CONFIGFILE>"
943 else
944 workingdir=${PWD}
945 basefname=$(basename ${2})
946 basedname=$(dirname ${2})
947 unset ARCH
948
949 cd ${basedname}
950 echo -e "include ${basefname}\ne:\n\t@echo \$(${1})" | \
951 make ${BUILD_FIXES} -s -f - e 2>/dev/null
952 cd ${workingdir}
953
954 ARCH=${xarch}
955 fi
956}
957
958detect_arch() {
959 # This function sets ARCH_URI and ARCH_PATCH
960 # with the neccessary info for the arch sepecific compatibility
961 # patchsets.
962
963 local ALL_ARCH LOOP_ARCH COMPAT_URI i
964
965 # COMPAT_URI is the contents of ${ARCH}_URI
966 # ARCH_URI is the URI for all the ${ARCH}_URI patches
967 # ARCH_PATCH is ARCH_URI broken into files for UNIPATCH
968
969 ARCH_URI=""
970 ARCH_PATCH=""
971 ALL_ARCH="ALPHA AMD64 ARM HPPA IA64 M68K MIPS PPC PPC64 S390 SH SPARC X86"
972
973 for LOOP_ARCH in ${ALL_ARCH}; do
974 COMPAT_URI="${LOOP_ARCH}_URI"
975 COMPAT_URI="${!COMPAT_URI}"
976
977 [[ -n ${COMPAT_URI} ]] && \
978 ARCH_URI="${ARCH_URI} $(echo ${LOOP_ARCH} | tr '[:upper:]' '[:lower:]')? ( ${COMPAT_URI} )"
979
980 if [[ ${LOOP_ARCH} == "$(echo $(tc-arch-kernel) | tr '[:lower:]' '[:upper:]')" ]]; then
981 for i in ${COMPAT_URI}; do
982 ARCH_PATCH="${ARCH_PATCH} ${DISTDIR}/${i/*\//}"
983 done
984 fi
985 done
986}
987
988# sparc nastiness
399#============================================================== 989#==============================================================
400detect_version() { 990# This script generates the files in /usr/include/asm for sparc systems
401 # this function will detect and set 991# during installation of sys-kernel/linux-headers.
402 # - OKV: Original Kernel Version (2.6.0/2.6.0-test11) 992# Will no longer be needed when full 64 bit support is used on sparc64
403 # - KV: Kernel Version (2.6.0-gentoo/2.6.0-test11-gentoo-r1) 993# systems.
404 # - EXTRAVERSION: The additional version appended to OKV (-gentoo/-gentoo-r1) 994#
405 995# Shamefully ripped from Debian
406 OKV=${PV/_beta/-test} 996# ----------------------------------------------------------------------
407 OKV=${OKV/_rc/-rc} 997
408 OKV=${OKV/_pre*/} 998# Idea borrowed from RedHat's kernel package
409 OKV=${OKV/-r*/} 999
410 1000# This is gonna get replaced by something in multilib.eclass soon...
411 KV_MAJOR=$(echo ${OKV} | cut -d. -f1) 1001# --eradicator
412 KV_MINOR=$(echo ${OKV} | cut -d. -f2) 1002generate_sparc_asm() {
413 KV_PATCH=$(echo ${OKV} | cut -d. -f3) 1003 local name
414 KV_PATCH=${KV_PATCH/[-_]*/} 1004
415 1005 cd $1 || die
416 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2" 1006 mkdir asm
417 1007
418 RELEASE=${PV/${OKV}/} 1008 for h in `( ls asm-sparc; ls asm-sparc64 ) | grep '\.h$' | sort -u`; do
419 RELEASE=${RELEASE/_beta/} 1009 name="$(echo $h | tr a-z. A-Z_)"
420 RELEASE=${RELEASE/_rc/-rc} 1010 # common header
421 RELEASE=${RELEASE/_pre/-bk} 1011 echo "/* All asm/ files are generated and point to the corresponding
422 RELEASETYPE=${RELEASE//[0-9]/} 1012 * file in asm-sparc or asm-sparc64.
423 1013 */
424 EXTRAVERSION="${RELEASE}" 1014
425 1015#ifndef __SPARCSTUB__${name}__
426 if [ -n "${K_PREPATCHED}" ] 1016#define __SPARCSTUB__${name}__
427 then 1017" > asm/${h}
428 KV="${OKV}-${PN/-*/}${PR/r/}" 1018
1019 # common for sparc and sparc64
1020 if [ -f asm-sparc/$h -a -f asm-sparc64/$h ]; then
1021 echo "#ifdef __arch64__
1022#include <asm-sparc64/$h>
1023#else
1024#include <asm-sparc/$h>
1025#endif
1026" >> asm/${h}
1027
1028 # sparc only
1029 elif [ -f asm-sparc/$h ]; then
1030echo "#ifndef __arch64__
1031#include <asm-sparc/$h>
1032#endif
1033" >> asm/${h}
1034
1035 # sparc64 only
429 else 1036 else
430 [ -z "${K_NOUSENAME}" ] && EXTRAVERSION="${EXTRAVERSION}-${PN/-*/}" 1037echo "#ifdef __arch64__
431 [ ! "${PR}" == "r0" ] && EXTRAVERSION="${EXTRAVERSION}-${PR}" 1038#include <asm-sparc64/$h>
432 1039#endif
433 KV=${OKV}${EXTRAVERSION} 1040" >> asm/${h}
434 fi 1041 fi
435
436 # -rcXX-bkXX pulls are *IMPOSSIBLE* to support within the portage naming convention
437 # these cannot be supported, but the code here can handle it up until this point
438 # and theoretically thereafter.
439
440 if [ "${RELEASETYPE}" == "-rc" ]
441 then
442 OKV="${KV_MAJOR}.${KV_MINOR}.$([ $((${KV_PATCH} - 1)) -lt 0 ] && echo ${KV_PATCH} || echo $((${KV_PATCH} - 1)))"
443 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/patch-${PV//_/-}.bz2
444 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
445 UNIPATCH_LIST="${DISTDIR}/patch-${PV//_/-}.bz2 ${UNIPATCH_LIST}"
446 [ -n "${K_PREPATCHED}" ] && KV="${PV/[-_]*/}${EXTRAVERSION}-${PN/-*/}${PR/r/}" || KV=${PV/[-_]*/}${EXTRAVERSION}
447 fi
448
449 if [ "${RELEASETYPE}" == "-bk" ]
450 then
451 OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
452 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2
453 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
454 UNIPATCH_LIST="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2 ${UNIPATCH_LIST}"
455 [ -n "${K_PREPATCHED}" ] && KV="${PV/[-_]*/}${EXTRAVERSION}-${PN/-*/}${PR/r/}" || KV=${PV/[-_]*/}${EXTRAVERSION}
456 fi
457
458 if [ "${RELEASETYPE}" == "-rc-bk" ]
459 then
460 OKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_PATCH} - 1))-${RELEASE/-bk*}"
461 EXTRAVERSION="$([ -n "${RELEASE}" ] && echo ${RELEASE/*-bk/-bk})$([ -n "${K_USENAME}" ] && echo -${PN/-*/})$([ ! "${PR}" == "r0" ] && echo -${PR})"
462
463 KERNEL_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/snapshots/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2
464 mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.bz2"
465 UNIPATCH_LIST="${DISTDIR}/patch-${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}${RELEASE}.bz2 ${UNIPATCH_LIST}"
466 [ -n "${K_PREPATCHED}" ] && KV="${PV/[-_]*/}${EXTRAVERSION}-${PN/-*/}${PR/r/}" || KV=${PV/[-_]*/}${EXTRAVERSION}
467 fi
468
469 S=${WORKDIR}/linux-${KV}
470}
471 1042
1043 # common footer
1044 echo "#endif /* !__SPARCSTUB__${name}__ */" >> asm/${h}
1045 done
1046 return 0
1047}
1048
1049headers___fix() {
1050 # Voodoo to partially fix broken upstream headers.
1051 # note: do not put inline/asm/volatile together (breaks "inline asm volatile")
1052 sed -i \
1053 -e '/^\#define.*_TYPES_H/{:loop n; bloop}' \
1054 -e 's:\<\([us]\(8\|16\|32\|64\)\)\>:__\1:g' \
1055 -e "s/\([[:space:]]\)inline\([[:space:](]\)/\1__inline__\2/g" \
1056 -e "s/\([[:space:]]\)asm\([[:space:](]\)/\1__asm__\2/g" \
1057 -e "s/\([[:space:]]\)volatile\([[:space:](]\)/\1__volatile__\2/g" \
1058 "$@"
1059}
472 1060
473# common functions 1061# common functions
474#============================================================== 1062#==============================================================
475src_unpack() { 1063kernel-2_src_unpack() {
476 [ -z "${OKV}" ] && OKV="${KV_MAJOR}.${KV_MINOR}.${KV_PATCH}"
477
478 cd ${WORKDIR}
479 unpack linux-${OKV}.tar.bz2
480 if [ "${OKV}" != "${KV}" ]
481 then
482 mv linux-${OKV} linux-${KV} || die "Unable to move source tree to ${KV}."
483 fi
484 cd ${S}
485
486 universal_unpack 1064 universal_unpack
487 [ -n "${UNIPATCH_LIST}" ] && unipatch ${UNIPATCH_LIST} 1065 debug-print "Doing unipatch"
1066
1067 [[ -n ${UNIPATCH_LIST} || -n ${UNIPATCH_LIST_DEFAULT} || -n ${UNIPATCH_LIST_GENPATCHES} ]] && \
1068 unipatch "${UNIPATCH_LIST_DEFAULT} ${UNIPATCH_LIST_GENPATCHES} ${UNIPATCH_LIST}"
1069
1070 debug-print "Doing premake"
1071
1072 # allow ebuilds to massage the source tree after patching but before
1073 # we run misc `make` functions below
1074 [[ $(type -t kernel-2_hook_premake) == "function" ]] && kernel-2_hook_premake
1075
1076 debug-print "Doing epatch_user"
1077 epatch_user
1078
1079 debug-print "Doing unpack_set_extraversion"
1080
488 [ -z "${K_NOSETEXTRAVERSION}" ] && unpack_set_extraversion 1081 [[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion
1082 unpack_fix_install_path
489 1083
490 [ $(kernel_is_2_4) $? == 0 ] && unpack_2_4 1084 # Setup xmakeopts and cd into sourcetree.
491} 1085 env_setup_xmakeopts
1086 cd "${S}"
492 1087
1088 # We dont need a version.h for anything other than headers
1089 # at least, I should hope we dont. If this causes problems
1090 # take out the if/fi block and inform me please.
1091 # unpack_2_6 should now be 2.6.17 safe anyways
1092 if [[ ${ETYPE} == headers ]]; then
1093 kernel_is 2 4 && unpack_2_4
1094 kernel_is 2 6 && unpack_2_6
1095 fi
1096
1097 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
1098 cp "${DISTDIR}/${DEBLOB_A}" "${T}" || die "cp ${DEBLOB_A} failed"
1099 cp "${DISTDIR}/${DEBLOB_CHECK_A}" "${T}/deblob-check" || die "cp ${DEBLOB_CHECK_A} failed"
1100 chmod +x "${T}/${DEBLOB_A}" "${T}/deblob-check" || die "chmod deblob scripts failed"
1101 fi
1102}
1103
493src_compile() { 1104kernel-2_src_compile() {
1105 cd "${S}"
494 [ "${ETYPE}" == "headers" ] && compile_headers 1106 [[ ${ETYPE} == headers ]] && compile_headers
495}
496 1107
1108 if [[ $K_DEBLOB_AVAILABLE == 1 ]] && use deblob ; then
1109 echo ">>> Running deblob script ..."
1110 sh "${T}/${DEBLOB_A}" --force || \
1111 die "Deblob script failed to run!!!"
1112 fi
1113}
1114
1115# if you leave it to the default src_test, it will run make to
1116# find whether test/check targets are present; since "make test"
1117# actually produces a few support files, they are installed even
1118# though the package is binchecks-restricted.
1119#
1120# Avoid this altogether by making the function moot.
1121kernel-2_src_test() { :; }
1122
497pkg_preinst() { 1123kernel-2_pkg_preinst() {
498 [ "${ETYPE}" == "headers" ] && preinst_headers 1124 [[ ${ETYPE} == headers ]] && preinst_headers
499} 1125}
500 1126
501src_install() { 1127kernel-2_src_install() {
502 install_universal 1128 install_universal
503 [ "${ETYPE}" == "headers" ] && install_headers 1129 [[ ${ETYPE} == headers ]] && install_headers
504 [ "${ETYPE}" == "sources" ] && install_sources 1130 [[ ${ETYPE} == sources ]] && install_sources
505} 1131}
506 1132
507pkg_postinst() { 1133kernel-2_pkg_postinst() {
508 [ "${ETYPE}" == "headers" ] && postinst_headers
509 [ "${ETYPE}" == "sources" ] && postinst_sources 1134 [[ ${ETYPE} == sources ]] && postinst_sources
510} 1135}
511 1136
512pkg_setup() { 1137kernel-2_pkg_setup() {
1138 if kernel_is 2 4; then
1139 if [ "$( gcc-major-version )" -eq "4" ] ; then
1140 echo
1141 ewarn "Be warned !! >=sys-devel/gcc-4.0.0 isn't supported with linux-2.4!"
1142 ewarn "Either switch to another gcc-version (via gcc-config) or use a"
1143 ewarn "newer kernel that supports gcc-4."
1144 echo
1145 ewarn "Also be aware that bugreports about gcc-4 not working"
1146 ewarn "with linux-2.4 based ebuilds will be closed as INVALID!"
1147 echo
1148 epause 10
1149 fi
1150 fi
1151
1152 ABI="${KERNEL_ABI}"
513 [ "${ETYPE}" == "headers" ] && setup_headers 1153 [[ ${ETYPE} == headers ]] && setup_headers
1154 [[ ${ETYPE} == sources ]] && echo ">>> Preparing to unpack ..."
514} 1155}

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.246

  ViewVC Help
Powered by ViewVC 1.1.20