If you need PerlMagick on a Mac, there was (and still is) a p5-perlmagick package. If you try to install that package now, you’ll find it doesn’t compile (!!). You don’t have to resort to compiling from source, though.
According to this MacPorts ticket, p5-perlmagick has been deprecated in favor of recompiling the imagemagick port with the +perl variant:
sudo port -nu uninstall p5-perlmagick imagemagick sudo port clean imagemagick sudo port install imagemagick +perl
Before you just add the perl variant, though, you might want these other goodies:
$ port variants imagemagick ImageMagick has the variants: graphviz: Support Graphviz gs: Include Ghostscript library support hdri: Support High Dynamic Range Imaging using OpenEXR jbig: Support JBIG jpeg2: Support JPEG-2000 using JasPer lcms: Support the Little Color Management System lqr: Support Liquid Rescale (experimental) mpeg: Support MPEG-1 and MPEG-2 video no_plus_plus: Do not install Magick++ no_x11: Disable support for X11 perl: Install PerlMagick [+]q16: Use 16 bits per pixel quantum * conflicts with q32 q8 q32: Use 32 bits per pixel quantum * conflicts with q16 q8 q8: Use 8 bits per pixel quantum * conflicts with q16 q32 rsvg: Support SVG using librsvg universal: Build for multiple architectures wmf: Support the Windows Metafile Format
To make it easier for search engines to find this, here’s the compilation failure:
$ sudo port install p5-perlmagick Password: ---> Computing dependencies for p5-perlmagick ---> Fetching p5-perlmagick ---> Verifying checksum(s) for p5-perlmagick ---> Extracting p5-perlmagick ---> Configuring p5-perlmagick ---> Building p5-perlmagick Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_perl_p5-perlmagick/work/PerlMagick-6.32" && /usr/bin/make -j2 all " returned error 2 Command output: Magick.xs:10918: error: request for member 'severity' in something not a structure or union Magick.xs:10918: error: 'ErrorException' undeclared (first use in this function) Magick.xs:10919: error: 'struct Methods' has no member named 'exception' Magick.xs:10920: warning: implicit declaration of function 'GetImageException' Magick.xs:10922: error: dereferencing pointer to incomplete type Magick.xs:10922: error: request for member 'image_info' in something not a structure or union Magick.xs:10922: error: 'struct Methods' has no member named 'adjoin' Magick.xs:10929: error: request for member 'severity' in something not a structure or union Magick.xs:10929: error: 'UndefinedException' undeclared (first use in this function) Magick.xs:10929: error: request for member 'severity' in something not a structure or union Magick.xs:10929: error: request for member 'reason' in something not a structure or union Magick.xs:10929: error: request for member 'severity' in something not a structure or union Magick.xs:10929: error: request for member 'reason' in something not a structure or union Magick.xs:10929: warning: pointer/integer type mismatch in conditional expression Magick.xs:10929: error: request for member 'description' in something not a structure or union Magick.xs:10929: error: request for member 'description' in something not a structure or union Magick.xs:10929: error: request for member 'severity' in something not a structure or union Magick.xs:10929: error: request for member 'description' in something not a structure or union Magick.xs:10929: warning: pointer/integer type mismatch in conditional expression Magick.xs:10929: error: request for member 'description' in something not a structure or union Magick.xs:10929: warning: passing argument 2 of 'Perl_sv_catpv' from incompatible pointer type Magick.xs:10929: warning: unused variable 'message' Magick.xs:10856: warning: unused variable 'filename' Magick.c:10784: warning: unused variable 'ref' Magick.c:10777: warning: unused variable 'ix' Magick.xs: In function 'boot_Image__Magick': Magick.xs:2122: warning: implicit declaration of function 'InitializeMagick' Magick.xs:2123: warning: implicit declaration of function 'SetWarningHandler' Magick.xs:2124: warning: implicit declaration of function 'SetErrorHandler' make: *** [Magick.o] Error 1 Error: Status 1 encountered during processing.
Related posts:
- Installing git with MacPorts
The Good: MacPorts makes git, the new source version control system hotness, available to Mac users. The Bad: MacPorts sometimes has attitude, and poops out trying to compile or install...... - Quick MacPorts Installation of Ruby on Rails
I finally got to walking through a great gentle introductory ALA article on Ruby on Rails. I wanted to run rails Demo to build my first project, but I got...... - Apache2, PHP, and MySQL on Mac OS X using MacPorts
1. Install MacPorts Follow the instructions here: http://www.macports.org/install.php. 2. Install apache2 sudo port install apache2 Note that the macports instructions suggest installing the launchctl script now, but we’ll do that...... - How to Convert Your Book’s Images to Kindle
Taking your painstakingly typeset book and shoving it through the kindle “conversion” meatgrinder was an exercise in wincing. Most of the images were corrupted, there was whitespace sprinkled randomly throughout......