Description: Replace ImageMagick with GraphicsMagick for build
 Current security policies in ImageMagick disable reading from PDFs, which
 is used in parts of the manual build.  There's no stock CMake module (yet)
 to substitute for FindImageMagick.cmake, so fill in the required variables
 manually.
Author: Nicholas Breen
Origin: vendor
Forwarded: no
Last-Update: 2021-05-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: gromacs/cmake/gmxTestImageMagick.cmake
===================================================================
--- gromacs.orig/cmake/gmxTestImageMagick.cmake
+++ gromacs/cmake/gmxTestImageMagick.cmake
@@ -52,7 +52,7 @@ function(GMX_TEST_IMAGEMAGICK VARIABLE)
         set(SAMPLE_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/cmake/TestImageMagickConvert.pdf")
         set(SAMPLE_OUTPUT "${TEMPDIR}/TestImageMagickConvert.png")
         execute_process(
-            COMMAND ${ImageMagick_convert_EXECUTABLE}  ${SAMPLE_INPUT} -antialias -quality 03 -quiet -pointsize 12 -density 1200 -units PixelsPerInch ${SAMPLE_OUTPUT}
+            COMMAND ${ImageMagick_convert_EXECUTABLE}  ${SAMPLE_INPUT} -antialias -quality 03 -pointsize 12 -density 1200 -units PixelsPerInch ${SAMPLE_OUTPUT}
             RESULT_VARIABLE TEST_OUTPUT
             OUTPUT_QUIET
             ERROR_QUIET
Index: gromacs/CMakeLists.txt
===================================================================
--- gromacs.orig/CMakeLists.txt
+++ gromacs/CMakeLists.txt
@@ -972,7 +972,9 @@ option(GMX_PYTHON_PACKAGE
        OFF)
 mark_as_advanced(GMX_PYTHON_PACKAGE)
 
-find_package(ImageMagick QUIET COMPONENTS convert)
+# find_package(ImageMagick QUIET COMPONENTS convert)
+set(ImageMagick_convert_EXECUTABLE "/usr/bin/gm" "convert")
+set(ImageMagick_convert_FOUND TRUE)
 mark_as_advanced(ImageMagick_EXECUTABLE_DIR)
 include(gmxTestImageMagick)
 GMX_TEST_IMAGEMAGICK(IMAGE_CONVERT_POSSIBLE)
Index: gromacs/docs/SphinxMacros.cmake
===================================================================
--- gromacs.orig/docs/SphinxMacros.cmake
+++ gromacs/docs/SphinxMacros.cmake
@@ -110,7 +110,7 @@ function(gmx_add_sphinx_image_conversion
         endif()
         add_custom_command(
             OUTPUT  ${_target}
-            COMMAND ${ImageMagick_convert_EXECUTABLE} ${_source} -antialias -quality 03 -quiet -pointsize 12 -density 1200 -units PixelsPerInch  ${_target}
+            COMMAND ${ImageMagick_convert_EXECUTABLE} ${_source} -antialias -quality 03 -pointsize 12 -density 1200 -units PixelsPerInch  ${_target}
             DEPENDS ${_source}
             COMMENT "Converting Sphinx input graphics file ${_file} to png"
             VERBATIM)
