Help with applying a patch to a port

Kevin Windham kevo at gatorgraphics.com
Wed Mar 21 19:19:47 PDT 2007


On Mar 21, 2007, at 5:37 PM, Ryan Schmidt wrote:

>
> On Mar 21, 2007, at 15:07, Kevin Windham wrote:
>
>> I am trying to figure out the easiest way to apply a patch to a  
>> port and still use the port command to install and uninstall etc.
>>
>> The port is giflib and the patch file is here.
>>
>> <http://users.own-hero.net/~decoder/fuzzyocr/giftext-segfault.patch>
>>
>> Is there a simple way to modify the local portfile to install this  
>> patch for me.
>
> If you find that the patch works, and you would like to submit  
> these changes to the Portfile for all to enjoy, create a ticket in  
> Trac, attach you patchfile, and also a unified diff of your changes  
> for the Portfile, and tell us here what the ticket number is, and  
> someone can commit it. Also, note that giflib has no maintainer; if  
> you would like to become the maintainer, just say so, or you can  
> also just change the maintainers line in the Portfile to your email  
> address and include that in the Portfile diff in the ticket.

I managed to get this working and the patch seems to work as well,  
although I am not the originator of the patch. I am actually trying  
to install fuzzyocr and they recommended this patch on their site as  
the giftext tool would crash on certain malformed gifs. I don't have  
any of those gifs to test with, and I didn't find any with google  
when I went to try and test their fix.

Anyway, I think it would probably be a good idea to update the port  
for anyone else who wants to use this. In order to get the patch to  
work properly I needed to run the diff tool from the giflib directory  
and pass it relative paths to the giftext.c file. Is there any  
similar convention that would need to be followed for making the diff  
of the portfile? I don't have a clue how the backend works as far as  
maintaining the ports, so I want to make sure I do that properly  
before I create the ticket in Trac.

Thanks for your help,
Kevin



More information about the macports-users mailing list