[csw-maintainers] mgar: how to maintain a patch?

William Bonnet william at wbonnet.net
Thu May 14 20:52:53 CEST 2009

Hi John
> I'm trying to package gts with mgar.  Its an optional dependency for 
> graphviz and its a smaller
> package for me to learn about mgar.
> gts-0.7.6 doesn't build on Solaris (it uses fabsf() which isn't 
> available).   The patch is easy, and I've reported the
> problem upstream and provided them with a patch.
> Meanwhile, how do I maintain and apply a patch in mgar?     A pointer 
> to an example pkg with patches would be fine...
Many packages are using patches, You can have a look to x11/libX11 for 
an example.

Basically it is easy to create.

1/ Extract the sources
    gmake extract

2/ Patch manually the files

3/ Create the patch file
    gmake makepatch

4/ Add the following line to your Makefile

PATCHFILES = gar-base.diff

5/ rebuild your package (at least go until patching)

gmake clean && gmake patch

This should clean sources, download, extract and apply patch file. The 
new sources should have the modification you made

Here is for the short version :)


William                  http://www.wbonnet.net

http://www.sunwizard.net Le site français des amateurs de stations Unix
http://www.opencsw.org 	 Community SoftWare for Solaris
http://www.guses.org     French speaking Solaris User Group

More information about the maintainers mailing list