The GIMP is an open source image manipulation program. It's available from Macports and I'd previously installed it, apart from gimp-app which wouldn't install due to the extras that it tried to build depending on old MacOS features that got removed in 10.6 (Snow Leopard). That worked fairly well until recently when another port upgrade brought in a new libjpeg, which caused various things that depended on it to break, including several GIMP libraries -- for which the solution is to rebuild the packages which depend on it (port -R upgrade --force FOO should normally do this, if you were installing one thing at a time). (There's an open issue to make the packaging system able to specify when this should be done automatically; Gentoo seems to have a dedicated tool for detecting what needs to be rebuilt (basically, things that fail to dynamically link).)

Unfortunately rebuilding The GIMP on Snow Leopard is still problematic due to 64-bit platform issues so the approach required is:

  1. Download patch-plug-ins-twain-tw_mac.c.diff and put in files subdirectory of port

  2. Download Portfile-gimp2.diff) and apply to Portfile

  3. Build port

viz (assuming you have the wget port installed):

 cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/graphics/gimp2
 (cd files && wget -c http://trac.macports.org/raw-attachment/ticket/21011/patch-plug-ins-twain-tw_mac.c.diff)
 wget -O - http://trac.macports.org/raw-attachment/ticket/21011/Portfile-gimp2.diff | patch -p0
 sudo port -v install gimp2

(If you don't have wget installed, these are the best step by step patch instructions on the ticket.)

Then it's just a matter of throwing lots of CPU at the problem, which is more than enough to make the fan in my laptop sound angry (instead of not needing to run, as it normally doesn't). I'm reminded of the disadvantages of build-from-source distributions.

(I thought I'd documented this previously but it appears that I did it once then assumed that they'd have merged the fix before I had to rebuild it again; alas 2 months later it still doesn't seem to have been merged.)

Also worth noting: it appears that wine cannot be built 64-bit, so always builds 32-bit, and needs all its dependencies built as universal (32-bit + 64-bit). (The ticket is closed so I'm not sure if they made this automatic or not.)

ETA, 2010-01-15: The latest gimp in MacPorts (2.6.8) appears to build properly on OS X 10.6 (64-bit) without any special effort.