I've been maintaining my own, local Apache ebuild for years. The main reason was that I wanted things in other places and the configuration needs special patches. While the first can be easily circumented by moving to Gentoo's default layout, the second one isn't. I added a variable to mail-mta/netqmail which can point to a directory of custom patches to be applied (QMAIL_PATCH_DIR) and it works beautifully there. The file attached to this bug contains a diff doing the same for the latest Apache ebuild. It would be great if it could be added because then I could give up on my own ebuild.
Created attachment 128190 [details, diff] Patch implementing APACHE_PATCH_DIR
why not adding this as a feature globally - so that (in theory) *any* ebuild could make use of it. so we would need a central place the ebuild is looking at, for example: /etc/portage/patches/CATEGORY/PACKAGE/* and standard pkg_unpack() could load ecustompatch, which *could* look like this: ecustompatch() { if [[ -f /etc/portage/patches/CATEGORY/${PN}/* ]]; then ewarn "WARN THE USER HERE - just like the notice you proposed." epatch "/etc/portage/patches/CATEGORY/${PN}"/* || die "..." fi } i would prefer this way, and i guess lots of (power) users would appreciate it. maybe CC portage devs about it?
(In reply to comment #2) > why not adding this as a feature globally - so that (in theory) *any* ebuild > could make use of it. > > so we would need a central place the ebuild is looking at, for example: > > /etc/portage/patches/CATEGORY/PACKAGE/* > > and standard pkg_unpack() could load ecustompatch, which *could* look like > this: > > ecustompatch() { > if [[ -f /etc/portage/patches/CATEGORY/${PN}/* ]]; then > ewarn "WARN THE USER HERE - just like the notice you proposed." > epatch "/etc/portage/patches/CATEGORY/${PN}"/* || die "..." > fi > } > > i would prefer this way, and i guess lots of (power) users would appreciate it. > > maybe CC portage devs about it? They're going to say the same as I would ... Use /etc/portage/bashrc, since it's already doable with that.
(In reply to comment #3) > They're going to say the same as I would ... Use /etc/portage/bashrc, since > it's already doable with that. /etc/portage/bashrc allows only hooks before something is done, not after it. Patching the code on EBUILD_PHASE=compile isn't clean.
(In reply to comment #4) > (In reply to comment #3) > > They're going to say the same as I would ... Use /etc/portage/bashrc, since > > it's already doable with that. > > /etc/portage/bashrc allows only hooks before something is done, not after it. Incorrect. Use post_src_unpack().
*** Bug 196535 has been marked as a duplicate of this bug. ***