1

How can one add more delegates to ImageMagick? I'm on gentoo (so, emerge), and while I see a plethora of links to different issues, I've not found any general how-to's:

  • This points to the source of the delegate libraries here
  • This points to the need to install underlying image libraries (e.g. libpng), and seems to generally be a repository for everyone's ImageMagick "no decode delegate" questions.
  • This sort of points back to a second person's issue in the first bullet, though it makes use of a ./configure command that I don't see in my ImageMagick directory
  • And finally, this might be the answer I need, though the syntax is garbled such that I cannot tell what the intended command is.

In particular, none of these explain what exactly one must do with the delegate libraries here, if they do indeed need to be installed manually. Anyway, my delegates are currently listed (via convert -list configure|grep -i delegate) as bzlib, mpeg, and zlib. I've installed media-libs/libpng, media-libs/tiff, and media-libs/libjpeg-turbo. I didn't grab media-libs/jasper, as it's not clear whether it is necessary. Removing and then installing ImageMagick anew after this (sudo emerge -cav media-gfx/imagemagick then sudo emerge -v media-gfx/imagemagick) didn't change any of my delegates.

TTT
  • 1,175
  • 2
  • 14
  • 32
  • Sorry, I know little about Gentoo, but doing a Google search, I found this, which may be of use. https://gentoobrowse.randomdan.homeip.net/packages/media-gfx/imagemagick – fmw42 Aug 14 '18 at 02:00

1 Answers1

3

Short Answer

A number of these can be handled by setting the USE flags on the imagemagick package. Some use flags can be found by looking at the package's entry on packages.gentoo.org. For a definitive list, check the ebuild on your machine or use tools such as equery.

Details

Portage, gentoo's package manager, is actually just a list of steps needed to build a package from source. USE flags allow you to customize that process. In this case, it changes which packages are built as dependencies.

Steps

One way to set the USE flags is to create a file in /etc/portage/package.use and write the package name on it's own line followed by all the use flag you would like to set. (eg. =media-gfx/imagemagick-7.0.8.8 png would set the png flag for version 7.0.8.8.

Once the USE flags are set, re-emerge the package to build with the new settings (eg. emerge --ask --verbose =media-gfx/imagemagick-7.0.8.8)

For more details on USE flags, read https://wiki.gentoo.org/wiki/USE_flag

Tsubashi
  • 730
  • 11
  • 26
  • I don't see the `png` USE flag on that first link, is there a more complete list somewhere else? I see more flags listed in the link in @fmw42's comment. You also didn't mention delegate libraries, does that mean I don't need to do anything with them manually? – TTT Aug 14 '18 at 12:12
  • 1
    The ultimate source of truth with regards to use flags is the ebuild file itself. They are usually found in `/usr/portage`. For a more user-friendly interface, you can install `gentoolkit` and use the `equery` command to get details about a package. (eg. `equery u media-gfx/imagemagick` will show all the use flags for the imagemagick package) – Tsubashi Aug 14 '18 at 15:25
  • 1
    I presumed that the official gentoo package site would list all the use flags, but apparently not. You can see from the [ebuild itself](https://gitweb.gentoo.org/repo/gentoo.git/tree/media-gfx/imagemagick/imagemagick-7.0.8.8.ebuild) that there is, indeed, a `png` flag – Tsubashi Aug 14 '18 at 15:27
  • 1
    ...and, yes, the use flags take care of installing and configuring the 'delegates' – Tsubashi Aug 14 '18 at 15:28
  • OK, this works, thanks. Can you revise the first bit of your answer about where to find USE flags? Then, I'll accept. – TTT Aug 14 '18 at 17:43
  • @TTT Sure, I can do that. – Tsubashi Aug 15 '18 at 18:13