GIMP 2.0 and XSane on OS X using Fink

It’s not that hard, but it was hard for me to figure it out how to do, so now that I know, I’m posting it so people who need to do it can find it.

Gimp 2.0 and XSane are both ‘unstable’. If you want to use them, read Q5.8 in the Fink FAQ thoroughly. You do *not* want to enable all of unstable. That way lies madness. You want to snag the .info and .patch files out of the unstable directory and put them in your local directory so you can build them with the least possible use of unstable, have-to-compile packages. I’m not going to go into detail on exactly which packages you need to do this for because I don’t remember all of them. Just do it as much as you need to. It won’t take forever.

Let’s take the Xsane problem first. You can install gimp 1.x from binary. If you want xsane to work as a plugin with your copy of the gimp, you need to install gimp and gimp-dev before you build xsane! If you do not have gimp-dev installed before you build xsane, xsane will happily build and then refuse to work with gimp, because it was compiled without gimp support. It will give you a “gimp support missing” error when you start up gimp. This is frustrating, and it’s hard to find documentation on how to deal with this, which is why I’m writing this blog post. Install xsane using “fink rebuild xsane; fink reinstall xsane” to make sure you get a nice fresh copy with gimp support.

That gets you xsane and gimp 1.x. If you want xsane and gimp 2.x, read on.

If you want gimp2 playing nice with xsane, you do the same thing, but uninstall all the gimp1 stuff, install all the gimp2 stuff (from unstable) (including gimp2-dev), and purge your install of xsane completely. Go edit the local copy of the xsane.info file you copied over from unstable (it should be at something like “/sw/fink/10.4-transitional/local/main/finkinfo/graphics/xsane.info”) and replace ‘gimp’ with ‘gimp2’ everywhere you see it in the file. Then “fink rebuild xsane; fink reinstall xsane” just to be sure.

You should get a working copy of gimp2 with an xsane plugin, and you’ll never have to worry about downloading scanner drivers from the manufacturer again.

(Actually I’m not sure you *have* to blow away your gimp1.x install to get it working with gimp2.x, but if you’ve got gimp2.x, why would you want to keep gimp1.x around? Gimp 2 crushes 1 like a ripe grape.)