1 |
On Fri, Dec 11, 2009 at 06:47, Shinkan <shinkan@×××××.com> wrote: |
2 |
> That's what I try to do, but as I don't get kernel ebuilds fully, I don't |
3 |
> understand how I can tell ebuild to fetch and apply a patch from the file/ |
4 |
> ebuild dir itself. |
5 |
> I don't want the patch to be fetched from Internet. |
6 |
|
7 |
The kernel ebuilds use an eclass (kernel-2) that handles most of that |
8 |
patching for them, since they regularly have a large number of |
9 |
well-defined patches. Your best bet is to take one of the existing |
10 |
patch tarballs (e.g. genpatches-2.6.32-1.extras.tar.bz2), unpack it, |
11 |
add your patch to the end (the numeric ordering will be apparent), |
12 |
then re-pack it with an incremented version number ("2") and note that |
13 |
in the ebuild. A more immediate result would be to create an EAPI=2 |
14 |
ebuild (which you should be doing anyway), add your patch to |
15 |
${FILESDIR}, then add an explicit src_prepare to your ebuild like the |
16 |
following: |
17 |
|
18 |
src_prepare() { |
19 |
default_src_prepare # do the eclass/ebuild default unpack/patch cycle |
20 |
epatch ${FILESDIR}/my_extra_patch-1.0.patch |
21 |
} |
22 |
|
23 |
I'd suggest cutting your teeth on a 'simpler' set of ebuilds before |
24 |
trying to go all out and do a kernel one. |