Use ImageMagick on OS X Server

Apr 24, '02 11:43:39PM

Contributed by: Anonymous

I'm running OSX as an internet server, and recently installed the killer blog app Movable Type (MT), an absolute poster child for server applications. MT uses ImageMagick, a very powerful, but, uh, tersely documented suite of command-line image-manipulation utilities to provide resizing and so forth for in-browser file uploads. Installing ImageMagick, or even finding comprehensible documentation on the installation process, is very difficult.

Read the rest of the article to see how I got it running on my system...

You'll need to have the Developer Tools installed as well as fink downloaded and installed, and to have a reasonably fast permanent connection to the net (which you do, since this is a server-oriented installation, right?). A quick step by step (how I did it, anyway - no promises, your mileage may vary, by reading this you indemnify my descendants from etc, etc):

  1. Run fink self-update - this will update fink and the associated packages.

  2. Run fink install imagemagick Take a break. On a 500 Mbps DSL line, it took my G3 server about twelve hours to complete this process.

  3. Edit the file (props to the everlovin' Peter N Lewis for this!):
    /sw/fink/dists/stable/main/finkinfo/graphics/imagemagick-5.4.1-3.patch
    So that the top of the file says this:
    @@ -7720,6 +7720,28 @@
    # FIXME: insert proper C++ library support
    ld_shlibs_CXX=no
    ;;
    + darwin* | rhapsody*)
    + case "$host_os" in
    + rhapsody* | darwin1.[012])
    + allow_undefined_flag_CXX='-undefined suppress'
    + ;;
    + *) # Darwin 1.3 on
    + allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
    + ;;
    + esac
    + with_x=no
    The changes are, as Peter Lewis points out in his original post:
    Edit:
    /sw/fink/dists/stable/main/finkinfo/graphics/imagemagick-5.4.1-3.patch
    And add a line to disable X windows support (add the line with_x=no, and change the 27 to 28 on the first line of the patch hunk).
  4. Run fink rebuild imagemagick
    Run fink reinstall imagemagick
    [NOTE: these commands took very much less time than the initial effort.]

  5. Add the line use lib '/sw/lib/perl5/darwin'; to the perl that needs to access the imagemagick stuph.
Good Luck!

[Editor's note: I have not tested this hint!]

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2002042423433924