Recipe: Installing ImageMagick Perl Bindings on Mac OSX
Ideally, one would expect that this works the orthodox way using MacPorts:
$ port install p5-perlmagick
The first problem here is ImageMagick itself, as it depends on xorg-libX11 and that expects xproto which I do not have. And do not care to have.
Luckily the port supports variants:
ImageMagick @6.5.1-0 (graphics, devel)
Variants: darwin_6, graphviz, ..., no_x11, perl, ....
So if you do not care about display images with ImageMagick, then you can suppress building of X11 specific parts:
Now I thought that a followup
will add Perl binding support, but instead I was confronted with pretty unfriendly checksum problems:
Portfile checksum: PerlMagick-6.32.tar.gz md5 a341de8299859630ca82b74ee7173204
Distfile checksum: PerlMagick-6.32.tar.gz md5 6b6e7ee0cdda9610e97e2ffa281a780b
Error: Target org.macports.checksum returned: Unable to verify file checksums
That looks pretty suspicious as I am not the only one to report this. What is equally suspicious is that the port has version 6.32
p5-perlmagick @6.32 (perl)
and the latest version on CPAN is 6.40. What is even more suspicious is that that is marked as UNAUTHORIZED RELEASE , there are no earlier versions unless you go to the Backpan, and even then there is a version gap.
Anyway, the installation via cpan also fails
cpan> install Image::Magick
# lots of compilation warnings and errors
# ... error: too few arguments ...
indicating that there is a version mismatch between what the current ImageMagick offers and what the Perl bindings expect.
But then I noticed that the MacPorts port also has a Perl variant:
And voila, the bindings are there. Once I had found my own solution, it was easy to find it with Google (inside the comments).
So much about post-mortem search engines.