blob: 8ec4a6ceda7238ba453958d1ef6bdaa7b62e7407 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/planet-ccrma-sources/planet-ccrma-sources-2.4.21-r9.ebuild,v 1.1 2004/06/14 19:24:24 plasmaroo Exp $
#OKV=original kernel version, KV=patched kernel version. They can be the same.
ETYPE="sources"
inherit kernel rpm eutils
IUSE=""
OKV=2.4.21
EXTRAVERSION="-1.ll.acpi"
KV=${OKV}${EXTRAVERSION}
S=${WORKDIR}/linux-${KV}-${PR}
# This package contains the Linux Kernel source for the version of the
# RedHat Linux Kernel modified by the Planet CCRMA project.
#
# Do not report problems with this source package or the resulting compiled
# compiled kernel to Red Hat, Inc. Red Hat is not responsible for this
# package and has offered no warranties or promises that the kernels
# resulting from the compilation of this package will work on anything
# except specific versions of the Red Hat distribution and specific
# compiler revisions.
#
# Gentoo provides this package without any guarantees that this kernel
# will compile and run correctly and will only respond to bug reports
# dealing with Gentoo specific packaging problems.
# The easiest way to grab Red Hat kernel sources is from the rpm file
# itself. We used to generate a patch against vanilla sources trees but
# the added dependency of rpm2targz is minimal compared with having to
# generate a new diff for every minor version update. (Also not to many
# people have 2.4.18 vanilla source tarballs floating around these days)
DEPEND="virtual/glibc"
DESCRIPTION="Kernel source used in Planet CCRMA custom audio upgrade (based on RedHat)"
SRC_URI="http://ccrma-www.stanford.edu/planetccrma/mirror/redhat/linux/planetcore/9/en/os/i386/kernel-source-${KV}.i386.rpm mirror://gentoo/${P}.tar.gz"
HOMEPAGE="http://ccrma-www.stanford.edu/ http://www.kernel.org/ http://www.redhat.com/"
KEYWORDS="x86 -ppc"
SLOT="${KV}"
src_unpack() {
rpm_unpack ${DISTDIR}/kernel-source-${KV}.i386.rpm
cd ${WORKDIR}
tar xvzf ${DISTDIR}/${P}.tar.gz || die
mv usr/src/linux-${KV} ${WORKDIR}/linux-${KV}-${PR} || die
cd ${S}
epatch ${FILESDIR}/do_brk_fix.patch || die "Failed to patch do_brk() vulnerability!"
epatch ${FILESDIR}/${PN}.munmap.patch || die "Failed to apply munmap patch!"
epatch ${FILESDIR}/${PN}.rtc_fix.patch || die "Failed to patch RTC vulnerabilities!"
epatch ${FILESDIR}/${PN}.CAN-2003-0985.patch || die "Failed to patch mremap() vulnerability!"
epatch ${FILESDIR}/${PN}.CAN-2004-0010.patch || die "Failed to add the CAN-2004-0010 patch!"
epatch ${FILESDIR}/${PN}.CAN-2004-0109.patch || die "Failed to add the CAN-2004-0109 patch!"
epatch ${FILESDIR}/${PN}.CAN-2004-0177.patch || die "Failed to add the CAN-2004-0177 patch!"
epatch ${FILESDIR}/${PN}.CAN-2004-0178.patch || die "Failed to add the CAN-2004-0178 patch!"
epatch ${FILESDIR}/${PN}.CAN-2004-0181.patch || die "Failed to add the CAN-2004-0181 patch!"
epatch ${FILESDIR}/${PN}.CAN-2004-0394.patch || die "Failed to add the CAN-2004-0394 patch!"
epatch ${FILESDIR}/${PN}.CAN-2004-0427.patch || die "Failed to add the CAN-2004-0427 patch!"
epatch ${FILESDIR}/${PN}.FPULockup-53804.patch || die "Failed to apply FPU-lockup patch!"
EXTRAVERSION="$EXTRAVERSION-${PR}" kernel_universal_unpack
}
pkg_postinst() {
ewarn "This kernel should now work with ALSA 0.9.6 or better."
ewarn "You'll need ~x86 for ALSA greater than 0.9.2"
einfo "A default kernel config has been provided in"
einfo "distfiles/planet-ccrma-sources-2.4.21.tar.gz."
einfo "Copy it to /usr/src/linux/.config and run make oldconfig."
einfo "Then edit to taste, but be careful not to tweak too much."
einfo "Just make sure to enable the devfs support."
einfo "And never run with scissors..."
ewarn "Mount your /boot partition and copy the file"
ewarn "PORTDIR/sys-kernel/planet-ccrma-sources/files/kernel.h"
ewarn "to /boot before you configure and build the kernel."
einfo "Don't ask why; it's a RedHat thing..."
}
|