Install ImageMagick configured with Autotrace switch

Warren Block wblock at
Thu Jun 2 14:41:27 UTC 2011

On Wed, 1 Jun 2011, Angelo wrote:

> Thanks Peter but I can't seem to build this thing.

Please don't top-post, and please trim responses.

> I've tried just about everything I can think of to pass the argument
> "--with-autotrace" and it throws exceptions or just ignores the command.

Patching the ImageMagick Makefile is not too bad:

--- graphics/ImageMagick/Makefile.orig	2011-06-02 08:13:35.000000000 -0600
+++ graphics/ImageMagick/Makefile	2011-06-02 08:22:51.000000000 -0600
@@ -40,6 +40,7 @@

  	IMAGEMAGICK_16BIT_PIXEL	"16bit pixel support" on \
+	IMAGEMAGICK_AUTOTRACE	"Autotrace support" off \
  	IMAGEMAGICK_BZLIB	"Bzlib support" on \
  	IMAGEMAGICK_DJVU	"DJVU format support (needs threads)" off \
  	IMAGEMAGICK_DOT		"GraphViz dot graphs support" off \
@@ -228,6 +229,11 @@
  CONFIGURE_ARGS+=	--without-fftw

+LIB_DEPENDS+=           autotrace:${PORTSDIR}/graphics/autotrace
+CONFIGURE_ARGS+=        --with-autotrace
  # Produce BZip compressed MIFF images
  CONFIGURE_ARGS+=	--without-bzlib

And that seems to produce a working ImageMagick, at least one that can 
convert jpeg to svg.  There may be correctness issues, like whether 
autotrace requires other ImageMagick options to be enabled (like SVG).

The problem is that autotrace depends on ImageMagick, and the patched 
ImageMagick now depends on autotrace.  I don't know enough about either 
port to fix that.  Hopefully someone can, because this seems like a 
useful addition.

More information about the freebsd-questions mailing list