Whilst I am warming to the “Mac way” of doing things, I do like making use of F/OSS where I can. A case in point is processing photos, for which – of course – all free software fans should be using Gimp. Whilst it’s probably not quite Photoshop, it is well featured, powerful, and (as far as I can recall) stable. On Linux it’s all I use for bitmap editing.
Now, on a Mac, the easiest approach to installing Gimp is to use one of the pre-compiled binaries available on the download page – version 2.6.x at the time of writing. However, when it comes to building plugins, it gets a bit tricky. Here’s my use case: I had 118 photographs in JPEG format, taking over 1GB, and wanted to upload them to Flickr. So, I needed to re-size all of them down to 40% to fit into Flickr’s bandwidth limit, and to achieve this fancied trying David’s Batch Processor plugin. But my attempts at installing it dissolved in a pretty shower of CLI errors (note: am pasting from the interwebs here, since I’ve now solved the problem and can’t easily get it to fail again):
$ make install Package gimpui-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gimpui-2.0.pc' to the PKG_CONFIG_PATH environment variable
This was on the same machine as a binary install of 2.6.10. So, it looked like the compiler needed a dependency but couldn’t find it (with hindsight I did wonder if it was available in the binary version, but just required the setting of a suitable path). Anyway I installed the bleeding-edge dev copy (version 2.7.1) via MacPorts, and this fixed the problem. Don’t try this at home if you can help it though: I think it took at least an overnight to compile, around 10 hours at least.
So, this produced a binary, which works really well, on both my stable 2.6.x and my dev 2.7.x. I am not sure how much of a difference it makes, but I’m on OS X 10.6.8. I attach a copy below, to save on duplicated hassle. Simply download, unzip, drop into your “plug-ins” folder and restart; if it’s worked you’ll get a new option at the bottom of your Filters menu. Obviously, if it blows up your house or runs off with your credit card, don’t blame me. But it works here!
Tip: bear in mind that the binary install of Gimp puts the plugin folder in an odd place (i.e. not in the user’s home). So, if you can’t find your plugin folder, open Edit->Preferences and get the location from Folders->Plugins.
Update 12 Aug
Whether this works on any given Mac probably depends on what libraries are installed in the system already. I’ve found that my binary no longer works for me if I port deactivate the bleeding-edge version of Gimp; accordingly I am having a dig about to see if the plugin can be compiled with dependencies statically linked.
Update 2, 12 Aug
OK, solved it – dependencies are still not statically linked, but instead I’ve brought them in manually. So, here’s how to do it, if the plugin above does not work for you on its own (in particular, crashing was reported in the comments). Download the below zipfile in addition to the plugin above, and put it somewhere permanent (here I’ll assume you’ve put it in your home folder).
unzip ~/gimp-deps.zip sudo ln -s ~/gimp-deps/* /opt/local/lib
The dependencies are taken from my machine whilst gimp2-devel is activated, and were copied from /opt/local/lib if they started with “libgimp” – so some may strictly be unnecessary. As always, YMMV, but it works for me even after my MacPorts copy is deactivated. Comments welcome, of course.