I recently had a few compiling failures with some packages, which could be easily fixed by adding a patch to the ebuild. So what (of course) I do is, I copy the ebuild to an overlay and add the necessary stuff to apply to patch. Then it came to my mind, that there could be an easy way to make this a lot easier. Portage could read a variable in make.conf $PATCHDIR, in which it search for patches for the current ebuild. For example it first looks in $PATCHDIR/category/${PN}/ for patches named [NNNN-]${PN}-*.patch (NNNN to provide the ability to select patches, that should be applied first). Then it looks in $PATCHDIR/category/${PN}/SLOT for patches named [NNNN-]${PN}-*.patch, then in $PATCHDIR/category/${PN}/SLOT/${PV} for patches named [NNNN-]${P}-*.patch and after that, it sorts patches after there prefix NNNN (if provided, with [] I mean, that it should be optional) and applies them automatically at the end of src_unpack. For example this could also be useful for the kernel sources. I currently have three patches, which I apply to the kernel sources after I emerged them. With this ability I could just place them in one of the directories and they would automatically be applied. Are there problems with this, other than the implementation (which I guess isn't that trivial)? The only problem, that I thought of is that those files in $PATCHDIR aren't listed in the manifest and don't have digests. Is that problem a blocker?
See Bug 189018 please, you can use /etc/portage/bashrc for this. *** This bug has been marked as a duplicate of bug 189018 ***
(In reply to comment #1) > See Bug 189018 please, you can use /etc/portage/bashrc for this. > Hm, why didn't I find this one? Thanks.