Help with applying a patch to a port

Kevin Windham kevo at gatorgraphics.com
Thu Mar 22 16:17:05 PDT 2007


On Mar 21, 2007, at 9:19 PM, Kevin Windham wrote:

>
> 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.

I found another port which I think can be updated fairly easily. The  
netpbm graphics routines are required for FuzzyOcr. One of the tools  
FuzzyOcr uses is called pamthreshold and it is only available in  
netpbm 10.34 or later. I edited the portfile to use 10.34 as the  
version, and updated the md5 hash for the 10.34 .tgz archive and  
installed the port. It installed normally, and I tested the several  
of the utilities required for FuzzyOcr including pamthreshold, and  
they seem to work fine.

This may be useful for others who are wanting to get rid of those  
annoying image spams.

Kevin



More information about the macports-users mailing list