Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Adding an extra patch to an ebuild
Date: Wed, 21 Nov 2012 10:43:07
Message-Id: 20121121104136.1032871b@digimed.co.uk
In Reply to: [gentoo-user] Adding an extra patch to an ebuild by Adam Carter
1 On Wed, 21 Nov 2012 19:38:26 +1100, Adam Carter wrote:
2
3 > Theres a patch attached to the bug i'd like to apply. Unfortunately the
4 > gcc 4.7.2 ebuild doesnt have "epatch_user", so i need to take the other
5 > approach listed in the handbook. It suggests i use a custom environment
6 > but i dont understand how i would apply a patch by setting an
7 > environment variable. Can anyone explain?
8
9 Create /etc/portage/env/sys-devel/gcc-4.7.2 containing
10
11 post_src_unpack() {
12 cd "${S}"
13 epatch_user
14 }
15
16 to run epatch_user after the source has been unpacked. If you need to run
17 epatch_user after the other patches have been applied, change the function
18 name to post_src_prepare.
19
20 Alternatively, if this is a one-off, you could run
21
22 ebuild /path/to/ebuild prepare
23
24 then apply the patch manually in $PORTAGE_TMPDIR and complete the emerge
25 with
26
27 ebuild /path/to/ebuild merge
28
29
30 --
31 Neil Bothwick
32
33 Those who live by the sword get shot by those who don't.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Adding an extra patch to an ebuild Adam Carter <adamcarter3@×××××.com>