Gentoo Archives: gentoo-user

From: Rumen Yotov <rumen@××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Howto patch ebuilds?
Date: Fri, 30 Jun 2006 09:31:34
Message-Id: 44A4EF49.5050602@qrypto.org
In Reply to: Re: [gentoo-user] Howto patch ebuilds? by Leonardo
1 Leonardo wrote:
2 > Thanks Rumen,
3 > that was it; now I have problems applying the patch, but I think
4 > I can figure it out.
5 >
6 > Thanks to Neil too.
7 >
8 > Ciao, Leo
9 >
10 > --- Rumen Yotov <rumen@××××××.org> wrote:
11 >> Hi,
12 >> If you don't have portage-overlay configured:
13 >> #mkdir /usr/local/portage
14 >> #echo "PORTDIR_OVERLAY=/usr/local/portage" >> /etc/make.conf
15 >> ...SKIP ABOVE... if PORTDIR_OVERLAY etc. already there
16 >> category=category package belongs to (e.g. sys-apps)
17 >> package=package-name (e.g. 'acl')
18 >> #mkdir /usr/local/portage/$category
19 >> #mkdir /usr/local/portage/$category/$package
20 >> #cp -arv /usr/portage/$category/$package/*
21 >> /usr/local/portage/$category/$package
22 >> copy "patch-name..." in
23 >> /usr/local/portage/$category/$package/files
24 >> Edit
25 >>
26 > /usr/local/portage/$category/$package/$package-version-rev.ebuild
27 >> adding in src_unpack() function:
28 >> epatch ${FILESDIR}/"patch-name..."
29 >> Save&exit
30 >> #ebuild
31 >>
32 > /usr/local/portage/$category/$package/$package-version-rev.ebuild
33 >> digest
34 >> #emerge $category/$package -av
35 >> Hope i didn't screwed something so check it again (some things
36 >> might be
37 >> made shorter though).
38 >> HTH.Rumen
39 >>
40 >
41 >
42 > __________________________________________________
43 > Do You Yahoo!?
44 > Tired of spam? Yahoo! Mail has the best spam protection around
45 > http://mail.yahoo.com
46 Hi,
47 To trouble-shoot the patching process try the following:
48 1.Comment the "epatch ..." line in src_unpack();
49 #ebuild /usr/local/portage/$category/$package-version-rev.ebuild unpack
50 #cd /var/tmp/portage/$package-version-rev./work/$package-version-rev./
51 patch -pX[0|1|2] --dry-run -i /path/to/patch/file/file-patch
52 Watch for errors, if any.
53 If patching is successful run:
54 #ebuild /usr/local/portage/$category/$package-version-rev.ebuild compile
55 #ebuild /usr/local/portage/$category/$package-version-rev.ebuild install
56 #ebuild /usr/local/portage/$category/$package-version-rev.ebuild qmerge
57 #ebuild /usr/local/portage/$category/$package-version-rev.ebuild clean
58 Last one is optional (it just cleans the WORKDIR under /var/tmp/portage)
59 Replace "epatch ..." with patch...-optional(watch out for path issues).
60 PS: please don't top-post (preferred ML-policy).
61 HTH.Rumen

Attachments

File name MIME type
smime.p7s application/x-pkcs7-signature

Replies

Subject Author
Re: [gentoo-user] Howto patch ebuilds? Leonardo <leodp@×××××.com>