Gimp Iterative Refocus Plugin for OS X

2007 Jan 29 at 01:53 » Tagged as :photography, wordpress,

RefocusIT is a gimp plugin that allows you to make corrections to images effected by camera shake or focus errors. A Mac OS X specific download isn't avaialble so I tried compiling from the sources. That turns out to be a long and tedious process.

checking whether to enable maintainer-specific portions of Makefiles... no

checking for perl... /usr/bin/perl

configure: error: XML::Parser perl module is required for intltool

The first complaint is about a missing XML::Parser module. In order to install that you have to first install expat and the best way to install expat is using Fink. Installating Fink is a breeze because a dmg is available. Then using the fink commander to installer expat isn't difficult either. From then on you have to return to the commad line something that OS X users hate to do. But I am not an OS X user.

perl -MCPAN -e shell prompts you for a series of configuration options, I just used the defaults for all of then. Unfortunately that will made the system unusable because a mirror list was not made. To make matters worse, LWP , lynx and wget are all missing on my macbook. That makes it impossible for the CPAN installer to download files. Let's go back to fink and install wget

There is more than one way skin a cat. I came up against this link which mentioned two of them: http://www.macosxhints.com/article.php?story=20061101085045782

The painless way is to install the module using fink. Once you pass that hurdle, the next error is about pckconfig.

*** The pkg-config script could not be found. Make sure it is

*** in your path, or set the PKG_CONFIG environment variable

*** to the full path to pkg-config.

*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config.

configure: error: Library requirements (gimp-2.0 gimpui-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

that too can be installed with fink but don't think you are out of the woods yet.

checking for gimp-2.0 gimpui-2.0... Package gimp-2.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `gimp-2.0.pc'

to the PKG_CONFIG_PATH environment variable

No package 'gimp-2.0' found

configure: error: Library requirements (gimp-2.0 gimpui-2.0) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

It's tough but the gimp-2.0.pc file is not present on my macbook even though gimp itself is installed. Gimp 2x is not available if you use fink.

I manually created the .pc files and now, the error is:

checking for gimp-2.0 gimpui-2.0... Package glib-2.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `glib-2.0.pc'

to the PKG_CONFIG_PATH environment variable

Package 'glib-2.0', required by 'GIMP', not found

to overcome that you need to install, glib2 and glib2-devel, then you get another complaint.

checking for gimp-2.0 gimpui-2.0... Package gtk+-2.0 was not found in the pkg-config search path.

Perhaps you should add the directory containing `gtk+-2.0.pc'

to the PKG_CONFIG_PATH environment variable

Package 'gtk+-2.0', required by 'GIMP UI', not found

gtk2 and gtk2-devel have quite a few dependencies. On my macbook it resulted in a total of nine packages being installed. In spite of that the compilation continues to resut in errors.

checking for gimp-2.0 gimpui-2.0... Package pangoxft was not found in the pkg-config search path.

Perhaps you should add the directory containing `pangoxft.pc'

to the PKG_CONFIG_PATH environment variable

Package 'pangoxft', required by 'GDK', not found

The final complaint produced by the configure step is about missing atk. That too was installed. And now for make.

main-gimp.c: In function 'query':

main-gimp.c:365: warning: implicit declaration of function 'setlocale'

main-gimp.c:365: error: 'LC_ALL' undeclared (first use in this function)

main-gimp.c:365: error: (Each undeclared identifier is reported only once

main-gimp.c:365: error: for each function it appears in.)

main-gimp.c: In function 'dialog_parameters_create':

main-gimp.c:489: warning: assignment discards qualifiers from pointer target type

main-gimp.c:490: warning: assignment discards qualifiers from pointer target type

make[2]: *** [main-gimp.o] Error

make[1]: *** [all-recursive] Error

make: *** [all] Error 2

Fix that by adding #include to the main-gimp.c file, that of course leads to another error further download the line.

_libintl_bind_textdomain_codeset referenced from libglib-2 expected to be defined in /usr/local/lib/libintl.3.dylib

_libintl_bindtextdomain referenced from libglib-2 expected to be defined in /usr/local/lib/libintl.3.dylib

_libintl_dgettext referenced from libglib-2 expected to be defined in /usr/local/lib/libintl.3.dylib

This is way too much trouble. For some reason the linker is not looking for the libraries in the /sw/lib path, even though the -L option as used in the Makefile clearly says that the linker should look for those libraries there. Now it's finally time to give up