summaryrefslogtreecommitdiff
blob: 8c9ec1100d54d13a8712855fca62e446bf1078c6 (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
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/mips-prepatch-sources/mips-prepatch-sources-2.4.23_rc2.ebuild,v 1.1 2003/11/21 00:40:47 kumba Exp $


# Version Data
OKV=${PV/_/-}
CVSDATE="20031120"
EXTRAVERSION="-mipscvs-${CVSDATE}"
KV="${OKV}-${CVSDATE}"
STABLEVERSION="2.4.22"

# Miscellaneous
S=${WORKDIR}/linux-${OKV}-${CVSDATE}

# Eclass Stuff
ETYPE="sources"
inherit kernel


# INCLUDED:
# 1) linux stable sources from kernel.org
# 2) patch to latest linux prepatch sources
# 3) linux-mips.org CVS snapshot diff from 20 Nov 2003
# 4) patch to fix Makefile(s) to pass appropriate CFLAGS

DESCRIPTION="Linux-Mips CVS pre-patch sources for MIPS-based machines"
SRC_URI="mirror://kernel/linux/kernel/v2.4/linux-${STABLEVERSION}.tar.bz2
		mirror://kernel/linux/kernel/v2.4/testing/patch-${OKV}.bz2
		mirror://gentoo/mipscvs-${OKV}-${CVSDATE}.diff.bz2"
HOMEPAGE="http://www.kernel.org   http://www.linux-mips.org/"
SLOT="${OKV}"
PROVIDE="virtual/linux-sources"
KEYWORDS="-* ~mips"


src_unpack() {
	unpack ${A}
	mv ${WORKDIR}/linux-${STABLEVERSION} ${S}
	cd ${S}

	# Update the vanilla sources with prepatch diff
	einfo ">>> Patching linux-${STABLEVERSION} to linux-${OKV} ..."
	epatch ${WORKDIR}/patch-${OKV}
	echo -e ""

	# Update the vanilla prepatch sources with linux-mips CVS changes
	einfo ">>> Patching linux-${OKV} to linux-${OKV}${EXTRAVERSION} ..."
	epatch ${WORKDIR}/mipscvs-${OKV}-${CVSDATE}.diff
	echo -e ""

	# Patch arch/mips/Makefile & arch/mips64/Makefile
	einfo ">>> Patching Makefile(s) ..."
	epatch ${FILESDIR}/mips-gcc-makefile-fix-${CVSDATE}.patch
	echo -e ""

	kernel_universal_unpack
}