2011/03/12: (Ab)using EXTRA_PATCHES for site specific patches

Maybe it's not the official way, but it work's great and There's more than one way to do it!

So imagine, you want (on your FreeBSD machine) some patch in some port, but it's not worth trying to get it in the official ports collection (say, because it's very specific to one particular machine). What I do, is to put the patch to some place outside the ports tree (I use /usr/sitepatches/category/portname/ for that) and then add something like the following to /etc/make.conf.


.if !empty(.CURDIR:M*/ports/sysutils/munin-node*)
EXTRA_PATCHES += /usr/site-patches/sysutils/munin-node/patch-plugins__node.d.freebsd__load.in
.endif
download

And that's it. The nice thing is, that I don't fork the port; I still get all the updates of the maintainer (or otherwise committed to that port).

Happy patching! (but remember to be faithful to upstream; only patch where really necessary)



Cross-referenced by: