Skip to content

Commit

Permalink
sci-mathematics/octave-4.4.0: Fix build with media-gfx/graphicsmagick…
Browse files Browse the repository at this point in the history
…-1.3.30[imagemagick]

With USE="graphicsmagick imagemagick", the build would previously fail with:
```
libinterp/corefcn/__magick_read__.cc:801:11: error: ‘MAGICKCORE_QUANTUM_DEPTH’ was not declared in this scope
```

Closes: https://bugs.gentoo.org/661046
  • Loading branch information
devurandom committed Jul 13, 2018
1 parent 75689f4 commit 8ac4522
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions sci-mathematics/octave/files/octave-4.4.0-imagemagick.patch
@@ -1,16 +1,22 @@
--- a/libinterp/corefcn/__magick_read__.cc 2018-05-22 12:25:37.688173855 +0200
+++ a/libinterp/corefcn/__magick_read__.cc.new 2018-05-22 12:32:51.475172200 +0200
@@ -817,10 +817,11 @@
@@ -817,10 +817,19 @@
// depth is 8, there's a good chance that we will be limited. It
// is also the GraphicsMagick recommended setting and the default
// for ImageMagick.
- if (QuantumDepth < 16)
+#ifdef QuantumDepth
if (QuantumDepth < 16)
+#else
+ using namespace Magick;
+ if (MAGICKCORE_QUANTUM_DEPTH < 16)
+#endif
warning_with_id ("Octave:GraphicsMagick-Quantum-Depth",
"your version of %s limits images to %d bits per pixel\n",
- MagickPackageName, QuantumDepth);
+#ifdef QuantumDepth
MagickPackageName, QuantumDepth);
+#else
+ MagickPackageName, MAGICKCORE_QUANTUM_DEPTH);
+#endif

initialized = true;
}

0 comments on commit 8ac4522

Please sign in to comment.