-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Conversation
When trying to install, the patch utterly fails:
Is there some way we could do away with that thing? Perhaps by using https://github.com/mxcl/homebrew/wiki/Formula-Cookbook |
It did work on my machine but I had a lot of trouble with the CR LF characters and creating the patch. I'll try your suggestion tonight. |
I looked at using inreplace and change_make_var but would end up being mainly gsub and rewriting most the file. I could add a changle_make_var that not only changed the value but changed the variable name and search for instances of that variable. Also, would need to add a prepend_make_var(before_var, var, value). I redid the patch, and I changed the unzip argument to -aa which treats every file as text and corrects the line endings. Another option would be just to supply a Makefile that includes the Makefile.srcs since the patch is rewriting it almost entirely. The Makefile.osx that comes with FreeImage builds a universal binary and doesn't work on Lion. Maybe I should try to get a non universal Makefile submitted back to FreeImage that is less fragile with OS upgrades. Anyway, can you try the above patch? Let me know, if you still have problems I'll look at a different approach but unzip -a on my machine did not catch the line endings, only -aa. |
I'll try the new patch when I get the chance.
Please do this---we try to get patches pushed back into upstream if possible. Thanks for all the effort! |
Freeimage is now at 3.15.1 in Homebrew. |
hate to say this, but the patch now fails when i try to upgrade freeiamge: ==> Downloading http://downloads.sourceforge.net/project/freeimage/Source%20Dist |
Hmm... the patch isn't commented at all, so I have no idea what it does, why it is needed or how to fix it. Looks like you were the original author of this patch---any ideas? |
Wow, that's a long time ago! Don't be harsh, I'm 99% sure I just did a direct port of what macports decided was necessary to do at the time. Looks like things have improved, but the distributed Makefile.osx still contains a lot of things pertaining to building fat libs with ppc+i386+x86_64 support, specific OSX SDK versions, ignoring all of homebrew's optimization flags, etc., so I'd say it's still best to use the Makefile.gnu with some minor tweaks to accomodate linking on OSX (vs Linux.) My quick version of bringing it up to date would be the following formula: https://gist.github.com/1403082 I don't know anything about freeimageplus, but imagine it's trivial, though. |
The FreeImage Makefile.mac hardcodes paths to the system libraries that are OS version specific in order to build a fat binary for the binary dist. The patch modifies the generic unix version of the makefile for the mac to avoid the hardcoded system paths so it works across OS versions and doesn't try to generate a fat binary. When I first sent a pull request, my patch had whitespace issues, which I had thought I had addressed is the second version. The Makefile has windows new lines, and the unzip command line arg to deal with that is -aa not -a as it was in the original but maybe that is version specific to the unzip command? |
Awesome! Thanks for the info. I don't see any patchfiles attached to FreeImage over on MacPorts: https://trac.macports.org/browser/trunk/dports/graphics/freeimage/Portfile So, was this patch generated by applying the |
Previous versions of FreeImage will segfault on bad Exif data.