View previous topic :: View next topic |
Author |
Message |
Wintershade n00b
Joined: 21 Jul 2007 Posts: 32 Location: Croatia
|
Posted: Mon Nov 04, 2013 1:34 pm Post subject: [SOLVED] Trouble applying patches from /etc/portage/patches |
|
|
Ok, so I added a sunrise overlay via layman, and found an ebuild for a package called media-gfx/gimp-texturize-plugin. The package doesn't currently compile, but I found a few patches that would theoretically make it compile. I haven't tried the patches out, because I'm trying to make portage patch it automatically, and I'm clearly doing something wrong here.
Anyway, I've put these few patches into /etc/portage/patches directory, under the path of /etc/portage/patches/media-gfx/gimp-texturize-plugin-2.1 (since portage is trying to emerge the 2.1 version), however when I try to emerge the package (by typing emerge -av gimp-texturize-plugin), the patches don't apply.
The source is downloaded and extracted, but the "Applying user patches from /etc/portage/patches/..." is not there.
On the other hand, when I try to emerge nvidia-drivers (from gentoo), the patch for kernel 3.11 (from /etc/portage/patches) applies normally and it compiles.
Does this happen because I'm trying to emerge a package from outside the gentoo repository, i.e. from a sunrise overlay? Or is there some other reason? I've tried making a "patches" directory in "/var/lib/layman", and putting the patches there,
In any case, I'd like to know how to apply these patches properly, and if at all possible, while emerging the package.
Thanks in advance! _________________ Only the best is good enough.
My make.conf file
Last edited by Wintershade on Mon Nov 04, 2013 3:45 pm; edited 1 time in total |
|
Back to top |
|
|
TomWij Retired Dev
Joined: 04 Jul 2012 Posts: 1553
|
Posted: Mon Nov 04, 2013 1:36 pm Post subject: |
|
|
The ebuild needs to have support for it by calling epatch_user or using an eclass that calls epatch_user. |
|
Back to top |
|
|
Wintershade n00b
Joined: 21 Jul 2007 Posts: 32 Location: Croatia
|
Posted: Mon Nov 04, 2013 3:02 pm Post subject: |
|
|
Ok, I've copied the ebuild into my local portage overlay, and added the following block into it:
Code: | src_prepare(){
epatch_user
}
|
...as well as at the beginning of the ebuild.
However, it appears I'm missing something major (or minor?) here, since it's still not patching.
Where can I find any documentation regarding this? Thanks again _________________ Only the best is good enough.
My make.conf file |
|
Back to top |
|
|
TomWij Retired Dev
Joined: 04 Jul 2012 Posts: 1553
|
|
Back to top |
|
|
Wintershade n00b
Joined: 21 Jul 2007 Posts: 32 Location: Croatia
|
Posted: Mon Nov 04, 2013 3:45 pm Post subject: |
|
|
OK, so I added this...
before the 5th line, then this...
before src_prepare, and this...
Code: | src_prepare() {
epatch_user
} |
...before the src_install in the ebuild.
That did it. Thanks a lot!
Anyway, I'll try to report this to someone. This is my 2nd sunrise ebuild that failed to compile (fixed the first one without any help on this forum), so I suppose someone should know about it... or not? _________________ Only the best is good enough.
My make.conf file |
|
Back to top |
|
|
radio_flyer Guru
Joined: 04 Nov 2004 Posts: 317 Location: Northern California
|
Posted: Mon Nov 04, 2013 3:57 pm Post subject: |
|
|
FYI, what I've done to get around this issue of ebuilds not calling epatch_user is to add an /etc/portage/bashrc file containing:
Code: |
# Run epatch automatically to pick up patches in /etc/portage/patches
post_src_prepare() {
epatch_user
}
|
Now every ebuild calls it. |
|
Back to top |
|
|
Wintershade n00b
Joined: 21 Jul 2007 Posts: 32 Location: Croatia
|
Posted: Mon Nov 04, 2013 4:27 pm Post subject: |
|
|
Sadly, this method of yours yields this kind of error for me:
Code: | /etc/portage/bashrc: line 3: epatch_user: command not found |
...at least in case of this particular ebuild. What I have to do is edit the ebuild file anyway, and add the and lines into it. It works then. Thanks again! _________________ Only the best is good enough.
My make.conf file |
|
Back to top |
|
|
|