Song of The Day: Give Me One Good Reason - Artist: Blink-182



Just a quick note to let folks know that I have an initial i368 port of JMagick, the JNI-based interface into the popular C/C++ ImageMagick API, to OS X Leopard.

For now the binaries and sources are hosted here. It’s based upon ImageMagick version 6.3.6-9_0 (libMagick.10.0.9.dylib).

I’m on the JMagick listserv to see if the development team wants to incorporate any of the changes, etc.

Here’s a quick list of what changed in the code:

  • New configure script option: –with-shared-lib-ext [defaults to .so]. This helped with allowing the extension to be changed during the make process (i.e., looked to be hardcoded to .so in spots or not always appended correctly).

    The build process, for OS X at the moment, creates a dynamic library that can be loaded with dlopen (MH_DYLIB), etc. Although it appears to work, it is just a quick workaround. In the future I imagine it would be better to have the configure script handle dynamic libs and bundles with an option and the extensions then added seamlessly.

  • The binary distribution comes with prebuilt MacPorts dependencies: ibexpat.1.dylib, libtiff.3.dylib, libMagick.10.dylib, libfontconfig.1.dylib, libz.1.dylib, libWand.10.dylib, libfreetype.6.dylib, libbz2.1.dylib, libjpeg.62.dylib.

  • The build process builds the binaries and jar files with a version number (noted below).

Note: The build process attaches the version as a part of the filename. For example the lib name looks something like libJMagick-6.2.6.dylib with a symlink to libJMagick.dylib.

The symlink ensures that Java-based calls to load the shared object work (e.g., make test):

static {
     System.loadLibrary("JMagick");
}

Tags: ,