Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#15447 closed defect (fixed)

inkscape: configure fails to recognize presence of ImageMagick

Reported by: dbevans (David B. Evans) Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: inkscape ImageMagick raster effects Cc: gui-dos (Guido Soranzio)
Port:

Description

With recent versions of ImageMagick, inkscape fails to recognize the presence of ImageMagick during configure. This appears to be the result of the refactoring of ImageMagick that occurred in 6.3.8-5 and is described by takeshi here:

http://lists.macosforge.org/pipermail/macports-dev/2008-April/005016.html

As a result, the optional raster effects that are dependent on ImageMagick are not enabled in the build.

Although the problem has been fixed in inkscape svn trunk, it is not scheduled for release (0.47) until September.

The attached patches back-port the trunk fixes to version 0.46 and add a new raster_effects variant that adds the necessary ImageMagick dependency if these optional effects are desired.

Tested on Mac OS X 10.4.11 PPC

Attachments (3)

patch-configure.diff (12.4 KB) - added by dbevans (David B. Evans) 16 years ago.
Patch for configure. Replaces existing patch file of same name.
patch-src-Makefile.in.diff (563 bytes) - added by dbevans (David B. Evans) 16 years ago.
Patch for src/Makefile.in
patch-inkscape-Portfile.diff (655 bytes) - added by dbevans (David B. Evans) 16 years ago.
Modified Portfile patch per discussion below

Download all attachments as: .zip

Change History (11)

Changed 16 years ago by dbevans (David B. Evans)

Attachment: patch-configure.diff added

Patch for configure. Replaces existing patch file of same name.

Changed 16 years ago by dbevans (David B. Evans)

Attachment: patch-src-Makefile.in.diff added

Patch for src/Makefile.in

comment:1 Changed 16 years ago by dbevans (David B. Evans)

I think that a variant to enable optional support for Word Perfect Graphics (WPG) format could also be added to this port in the same manner as for the ImageMagick extensions (raster_effects) but this would require a dependency on a yet to be committed new port (see #15448 - graphics/libwpg) and I didn't want to mix issues in one ticket. As it stands, if that port were committed and one installed it prior to installing inkscape, inkscape's configure would recognize it and enable the corresponding functionality.

comment:2 Changed 16 years ago by jmroot (Joshua Root)

The way you've done the variant means that inkscape will use ImageMagick if it happens to be present even if the raster_effects variant is deselected. If there is a suitable configure option like --[enable|disable]-raster-effects, you should disable it by default and enable it in the variant. If there is no such configure option, you'll need to disable it with a patch in the default case and delete the patch from patchfiles in the variant.

comment:3 in reply to:  2 ; Changed 16 years ago by dbevans (David B. Evans)

Replying to jmr@macports.org:

The way you've done the variant means that inkscape will use ImageMagick if it happens to be present even if the raster_effects variant is deselected. If there is a suitable configure option like --[enable|disable]-raster-effects, you should disable it by default and enable it in the variant. If there is no such configure option, you'll need to disable it with a patch in the default case and delete the patch from patchfiles in the variant.

Well, this is the discussion I was hoping to provoke. The overall style of inkscape's configure is to enable various extensions/optional features if the requisites for those features are detected but there are no switches to force them off. This is normally visible to the builder as the output of configure which ends with a nice report of what has been included but unless the MacPorts user is running configure in the debug mode he never sees this and so has no clue as to what he is getting (missing) unless he is intimate with the varous extensions available.

In the raster_effects case, a large Raster submenu appears under effects if ImageMagick is present. If libwpg is present, an option to open WPG files is present in the Open menu. Otherwise not. And the distributed binary for Mac OS X is built without these extensions.

So my addition of the variant was not to enable the option per se but to make it visible to the user that there IS an option and help him make sure he has the dependencies if he wants it.

I agree that it would be better if these things could just be turned on and off and will look at that but the main point of this ticket is to make it possible to build the raster extensions at all (or WPG support) at all which just can't be done with the unpatched port.

So some options might be

1) Further patch the configure code to add standard style enable-disable switches for these optional features (are there others I haven't noticed?). But this adds non-inkscape options to their configure and will need constant updating in future releases. The current patch only back-ports code from trunk that will appear in a later release.

2) Add a more brute force patch that just turns off the extensions unless the variant is selected. Again this adds an ongoing maintenance requirement independent of inkscape's development.

3) Remove the variant and just let things work the way the Inkscape people have it -- you get it if you have the right prerequisites installed. And you need to know this.

4) No variants and just add the dependencies so that the extensions are enabled. Perhaps this is closest to the Inkscape concept. We have the ports available so use them.

What do you think? In the interest of getting the configure bug with regard to ImageMagick committed, I propose removing the variant now if you are opposed to it (go with 3 or 4).

By the way, configure for the WPG extension worked ok as it was -- we just didn't have a port for libwpg available.

comment:4 in reply to:  3 ; Changed 16 years ago by jmroot (Joshua Root)

Cc: jmr@… added

Replying to db.evans@gmail.com:

3) Remove the variant and just let things work the way the Inkscape people have it -- you get it if you have the right prerequisites installed.

This one is not an option. The functionality of a port should not change depending on which other ports the user happens to have installed at build time. if inkscape will link against ImageMagick, it needs to declare a dependency on ImageMagick.

Any of the other three options would be acceptable. Option 1 would be the best and the most work, but if the patch were accepted upstream, there would be no more need for ongoing maintenance of it by us. Option 4 is the easiest but least flexible.

comment:5 in reply to:  4 Changed 16 years ago by dbevans (David B. Evans)

Replying to jmr@macports.org:

Any of the other three options would be acceptable. Option 1 would be the best and the most work, but if the patch were accepted upstream, there would be no more need for ongoing maintenance of it by us. Option 4 is the easiest but least flexible.

OK, so in the interest of addressing the actual bug in the configuring of ImageMagick effects ASAP, I am going with Option 4 now, but will follow through with the idea of adding variants to enable/disable the various extensions as per Option 1 after consulting with the Inkscape development team upstream.

I have modified the Portfile patch attached to remove the raster_effects variant and add dependencies on ImageMagick and libwpg (ticket #15448 needs to be committed as well for this to work). Have also added myself as maintainer of inkscape at least until the issue of the additional variants has been resolved.

Thanks for all the input

Changed 16 years ago by dbevans (David B. Evans)

Modified Portfile patch per discussion below

comment:6 Changed 16 years ago by jmroot (Joshua Root)

Cc: jmr@… removed
Owner: changed from macports-tickets@… to jmr@…
Status: newassigned

comment:7 Changed 16 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

Committed in r37259. Thanks for stepping up as maintainer!

comment:8 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.