diff --git a/package/imagemagick/Config.in.host b/package/imagemagick/Config.in.host index 5055101e23..26912e5f04 100644 --- a/package/imagemagick/Config.in.host +++ b/package/imagemagick/Config.in.host @@ -18,6 +18,7 @@ config BR2_PACKAGE_HOST_IMAGEMAGICK_SVG bool "SVG support" depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS # host-librsvg depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-pango -> host-harfbuzz + select BR2_PACKAGE_HOST_IMAGEMAGICK_XML help Say 'y' here is you need ImageMagick tools (like convert) to support SVG. @@ -29,4 +30,14 @@ comment "SVG support needs host gcc >= 4.9" depends on BR2_PACKAGE_HOST_RUSTC_ARCH_SUPPORTS depends on !BR2_HOST_GCC_AT_LEAST_4_9 +config BR2_PACKAGE_HOST_IMAGEMAGICK_XML + bool "XML support" + help + Say 'y' here if you need ImageMagick to support XML. Indeed, + ImageMagick does not trust unvalidated XMP profiles in + images. If such a XML profile is encountered inside e.g. a + PNG image the processing is aborted. Validating the XMP + profile requires that ImageMagick is compiled with XML + support. + endif diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk index 719c6768af..53cf02abf4 100644 --- a/package/imagemagick/imagemagick.mk +++ b/package/imagemagick/imagemagick.mk @@ -238,22 +238,26 @@ HOST_IMAGEMAGICK_DEPENDENCIES += \ host-fontconfig \ host-freetype \ host-librsvg \ - host-libxml2 \ host-pango HOST_IMAGEMAGICK_CONF_ENV += ac_cv_path_xml2_config=$(HOST_DIR)/bin/xml2-config HOST_IMAGEMAGICK_CONF_OPTS += \ --with-fontconfig \ --with-freetype \ --with-pango \ - --with-rsvg \ - --with-xml + --with-rsvg else HOST_IMAGEMAGICK_CONF_OPTS += \ --without-fontconfig \ --without-freetype \ --without-pango \ - --without-rsvg \ - --without-xml + --without-rsvg +endif + +ifeq ($(BR2_PACKAGE_HOST_IMAGEMAGICK_XML),y) +HOST_IMAGEMAGICK_CONF_OPTS += --with-xml +HOST_IMAGEMAGICK_DEPENDENCIES += host-libxml2 +else +HOST_IMAGEMAGICK_CONF_OPTS += --without-xml endif $(eval $(autotools-package))