Peter Alfredsen wrote:
On Sun, 17 May 2009 09:42:20 +0100 Neil Bothwick <[email protected]> wrote:I think you can redefine ebuild functions in /etc/portage/env/cat/pkg, so you could out a custom src_unpack() in there. It should work if the ebuild has no src_unoack, so you could do something like src_unpack() { unpack ${A} epatch mypatch } I don't know how this would work with an existing src_unpack in the ebuild, if you copied the existing function and added your patch.I use /etc/portage/bashrc for the same purpose. For instance, this is a patch I'm tacking onto portage ATM: if [[ ${CATEGORY}/${PN} == sys-apps/portage ]] then post_src_unpack() { cd "${S}"/bin epatch "/etc/portage/patches/misc-functions.patch" } fi As you can see, there are post_ and pre_ phases for all phase functions which can be used to do fancy stuff like this. I prefer /etc/portage/bashrc for this, since these hacks are usually only needed for a short time, so having them all in one place for an easy overview helps to keep the cruft down.
Thanks. I already have a /etc/portage/bashrc in place, which pulls packages out of /etc/portage/package.icc to be compiled with Intel C++. I'll try to use the same mechanism to pull patches from /etc/portage/package.patch for packages listed there.

