http://bugs.gentoo.org/show_bug.cgi?id=503692#c7 (This specific comment in the bug, not others.)
The patch for easy fetching, https://503692.bugs.gentoo.org/attachment.cgi?id=374512
However I strongly urge to "grep" the whole source tree of ImageMagick since even with this patch, I see both defines being used, some are in, for example, config.h_vms that this patch doesn't cover.
I see similar issue was reported in past, but only part of the files was fixed for it... likely caused by the lack of double checking by the "grep" like I suggested above.
The patch that fixes the most important parts:
Code: Select all
--- coders/pdf.c
+++ coders/pdf.c
@@ -1276,7 +1276,7 @@ RestoreMSCWarning
break;
}
#endif
-#if !defined(MAGICKCORE_JP2_DELEGATE)
+#if !defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
case JPEG2000Compression:
{
compression=RLECompression;
--- magick/version.c
+++ magick/version.c
@@ -141,7 +141,7 @@ MagickExport const char *GetMagickDelega
#if defined(MAGICKCORE_JPEG_DELEGATE) && defined(MAGICKCORE_PNG_DELEGATE)
"jng "
#endif
-#if defined(MAGICKCORE_JP2_DELEGATE)
+#if defined(MAGICKCORE_LIBOPENJP2_DELEGATE)
"jp2 "
#endif
#if defined(MAGICKCORE_JPEG_DELEGATE)