On 01/04/2012 07:47 AM, [email protected] wrote:
> Hello!
> I have noticed that with portage version changes its behaviour
> regarding the automatic patch catching (from /etc/portage/patches, for
> example) also changes. Some previous versions of portage did apply the
> patches from that directory while the most recent one does not.
>
> I consider this auto-patching feature quite useful and would like to
> use it, but currently I don't know how to do that.
> And also, is portage supposed to pick the patches up automatically or
> not in general?
They are only picked up if the ebuild specifically calls epatch_user
function.
However, you can define this in your /etc/portage/bashrc to have
appended to all ebuilds (who don't already define this function):
post_src_prepare() {
epatch_user
}
then it will call it after it does its normal patching...
For example, I dropped a patch from BGO for xloadimage to make it build
against new libtiff into
/etc/portage/patches/media-gfx/xloadimage-4.1-r11 and emerge, I see this
in emerge output:
>>> Preparing source in
/var/tmp/portage/media-gfx/xloadimage-4.1-r11/work/xloadimage.4.1 ...
* Applying xloadimage-4.1-gentoo-r1.diff ... [ ok ]
* Applying xloadimage-4.1-zio-shell-meta-char.diff ... [ ok ]
* Applying xloadimage-4.1-endif.patch ... [ ok ]
* Applying xloadimage-4.1-include-errno_h.patch ... [ ok ]
* Applying xloadimage-gentoo.patch ... [ ok ]
* Applying xloadimage-4.1-unaligned-access.patch ... [ ok ]
* Applying xloadimage-4.1-ldflags_and_exit.patch ... [ ok ]
* Applying xloadimage-4.1-libpng15.patch ... [ ok ]
* Applying xloadimage-4.1-bracket.patch ... [ ok ]
* Running eautoreconf in
'/var/tmp/portage/media-gfx/xloadimage-4.1-r11/work/xloadimage.4.1' ...
* Running aclocal ... [ ok ]
* Running autoconf ... [ ok ]
* Running autoheader ... [ ok ]
>>> Source prepared.
* Applying user patches from
/etc/portage/patches//media-gfx/xloadimage-4.1-r11 ...
* xloadimage-4.1-tiff.patch ... [ ok ]
* Done with patching
>>> Configuring source in
/var/tmp/portage/media-gfx/xloadimage-4.1-r11/work/xloadimage.4.1 ...