I'm one of the developers of Inkscape. We incorporate a few modified chunks of various free libraries, in our code-base and we'd really like to handle our patches to the software in a more maintainable way.
I've used the Quilt patch tool to apply patches to upstream code in Debian packages, and we have considered using it in the build for Inkscape
i.e.,
- Patch all relevant upstream files using Quilt
- Compile source
This would allow us to maintain a pristine copy of the upstream library and a separate patch set, which we can then forward upstream.
My problem is that aside from the Debian documentation, I haven't found any examples of how to neatly include Quilt in a Makefile. Can anyone point me to a project that does this?
We currently use Automake, so if there is an elegant way of running a "patch" rule before the main build, that would be great.
I can't point you to a project which does that, but I've done that for myself before by creating a new patch (which would be the last one) that creates a file named
patched.txtin some convenient spot. TheMakefilefor a simple project looks like this:You may or may not wish to have
quilt pop -aas part of thecleantarget. In other projects, I've created a separatereverttarget which does only that. I haven't incorporated that into a project which also uses Autotools, but it shouldn't be too hard.In my case
patched.txtis created manually usingdate >patched.txtso that it's easy to see the date of the patch set.