2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2007-07-23 11:06:34 +02:00
|
|
|
#
|
|
|
|
# imagemagick
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2011-02-02 13:22:21 +01:00
|
|
|
|
2019-08-09 18:19:15 +02:00
|
|
|
IMAGEMAGICK_VERSION = 7.0.8-59
|
2017-06-18 09:45:37 +02:00
|
|
|
IMAGEMAGICK_SOURCE = $(IMAGEMAGICK_VERSION).tar.gz
|
|
|
|
IMAGEMAGICK_SITE = https://github.com/ImageMagick/ImageMagick/archive
|
2014-01-02 14:01:48 +01:00
|
|
|
IMAGEMAGICK_LICENSE = Apache-2.0
|
2012-11-21 15:18:17 +01:00
|
|
|
IMAGEMAGICK_LICENSE_FILES = LICENSE
|
|
|
|
|
2010-10-02 22:51:22 +02:00
|
|
|
IMAGEMAGICK_INSTALL_STAGING = YES
|
2013-02-07 13:35:05 +01:00
|
|
|
IMAGEMAGICK_CONFIG_SCRIPTS = \
|
2016-06-15 14:34:21 +02:00
|
|
|
$(addsuffix -config,MagickCore MagickWand)
|
2013-02-09 12:13:59 +01:00
|
|
|
|
2013-08-12 14:06:58 +02:00
|
|
|
ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy)
|
2013-02-09 12:13:59 +01:00
|
|
|
IMAGEMAGICK_CONFIG_SCRIPTS += Magick++-config
|
|
|
|
endif
|
2007-07-23 11:06:34 +02:00
|
|
|
|
2010-10-02 22:51:22 +02:00
|
|
|
IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64
|
2010-02-21 13:35:19 +01:00
|
|
|
|
2014-12-24 08:54:24 +01:00
|
|
|
IMAGEMAGICK_CONF_OPTS = \
|
|
|
|
--program-transform-name='s,,,' \
|
|
|
|
--disable-openmp \
|
|
|
|
--without-djvu \
|
|
|
|
--without-dps \
|
2016-06-15 14:34:21 +02:00
|
|
|
--without-flif \
|
2014-12-24 08:54:24 +01:00
|
|
|
--without-fpx \
|
2016-06-15 14:34:21 +02:00
|
|
|
--without-gslib \
|
|
|
|
--without-gvc \
|
|
|
|
--without-jbig \
|
|
|
|
--without-lqr \
|
|
|
|
--without-openexr \
|
|
|
|
--without-perl \
|
|
|
|
--without-raqm \
|
|
|
|
--without-wmf \
|
2016-07-04 17:46:28 +02:00
|
|
|
--without-x \
|
|
|
|
--with-gs-font-dir=/usr/share/fonts/gs
|
2007-07-27 09:48:56 +02:00
|
|
|
|
2012-10-22 17:47:52 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES = host-pkgconf
|
2012-03-03 22:52:14 +01:00
|
|
|
|
2019-03-09 15:51:25 +01:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
|
# Like postgreSQL, imagemagick does not build against uClibc with
|
|
|
|
# locales enabled, due to an uClibc bug, see
|
|
|
|
# http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html
|
|
|
|
# so overwrite automatic detection and disable locale support
|
|
|
|
IMAGEMAGICK_CONF_ENV += ac_cv_func_newlocale=no
|
|
|
|
endif
|
|
|
|
|
2010-10-04 21:11:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-fontconfig
|
2010-10-04 21:11:10 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += fontconfig
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-fontconfig
|
2010-10-04 21:11:10 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FREETYPE),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-freetype
|
2012-06-25 23:25:44 +02:00
|
|
|
IMAGEMAGICK_CONF_ENV += \
|
|
|
|
ac_cv_path_freetype_config=$(STAGING_DIR)/usr/bin/freetype-config
|
2010-10-04 21:11:10 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += freetype
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-freetype
|
2010-10-04 21:11:10 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-jpeg
|
2010-10-04 21:11:10 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += jpeg
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-jpeg
|
2010-10-04 21:11:10 +02:00
|
|
|
endif
|
|
|
|
|
2016-02-21 11:51:23 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LCMS2),y)
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-lcms
|
|
|
|
IMAGEMAGICK_DEPENDENCIES += lcms2
|
|
|
|
else
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-lcms
|
|
|
|
endif
|
|
|
|
|
2010-10-04 21:11:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBPNG),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-png
|
2010-10-04 21:11:10 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += libpng
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-png
|
2010-10-04 21:11:10 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBRSVG),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-rsvg
|
2010-10-04 21:11:10 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += librsvg
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-rsvg
|
2010-10-04 21:11:10 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBXML2),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-xml
|
2012-03-03 22:52:14 +01:00
|
|
|
IMAGEMAGICK_CONF_ENV += ac_cv_path_xml2_config=$(STAGING_DIR)/usr/bin/xml2-config
|
2010-10-04 21:11:10 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += libxml2
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-xml
|
2010-10-04 21:11:10 +02:00
|
|
|
endif
|
|
|
|
|
2016-06-15 14:34:22 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_PANGO),y)
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-pango
|
|
|
|
IMAGEMAGICK_DEPENDENCIES += pango
|
|
|
|
else
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-pango
|
|
|
|
endif
|
|
|
|
|
2010-10-04 21:11:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_TIFF),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-tiff
|
2010-10-04 21:11:10 +02:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += tiff
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-tiff
|
2010-10-04 21:11:10 +02:00
|
|
|
endif
|
|
|
|
|
2016-06-15 14:34:23 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_XZ),y)
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-lzma
|
|
|
|
IMAGEMAGICK_DEPENDENCIES += xz
|
|
|
|
else
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-lzma
|
|
|
|
endif
|
|
|
|
|
2019-01-21 14:51:06 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
|
2011-10-05 00:15:47 +02:00
|
|
|
# configure script misdetects these leading to build errors
|
|
|
|
IMAGEMAGICK_CONF_ENV += ac_cv_func_creal=yes ac_cv_func_cimag=yes
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-fftw
|
2019-01-21 14:51:06 +01:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += fftw-double
|
2011-10-05 00:15:47 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-fftw
|
2011-10-05 00:15:47 +02:00
|
|
|
endif
|
|
|
|
|
2016-02-21 18:57:30 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_WEBP),y)
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-webp
|
|
|
|
IMAGEMAGICK_DEPENDENCIES += webp
|
|
|
|
else
|
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-webp
|
|
|
|
endif
|
|
|
|
|
2012-03-03 22:52:14 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-zlib
|
2012-03-03 22:52:14 +01:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += zlib
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-zlib
|
2012-03-03 22:52:14 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --with-bzlib
|
2012-03-03 22:52:14 +01:00
|
|
|
IMAGEMAGICK_DEPENDENCIES += bzip2
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
IMAGEMAGICK_CONF_OPTS += --without-bzlib
|
2012-03-03 22:52:14 +01:00
|
|
|
endif
|
|
|
|
|
2018-08-24 15:44:57 +02:00
|
|
|
HOST_IMAGEMAGICK_CONF_OPTS = \
|
|
|
|
--disable-openmp \
|
|
|
|
--without-djvu \
|
|
|
|
--without-dps \
|
|
|
|
--without-flif \
|
|
|
|
--without-fpx \
|
|
|
|
--without-gslib \
|
|
|
|
--without-gvc \
|
|
|
|
--without-jbig \
|
|
|
|
--without-lqr \
|
|
|
|
--without-openexr \
|
|
|
|
--without-perl \
|
|
|
|
--without-raqm \
|
|
|
|
--without-wmf \
|
|
|
|
--without-x \
|
|
|
|
--without-bzlib \
|
|
|
|
--without-fftw \
|
|
|
|
--without-lcms \
|
|
|
|
--without-lzma \
|
|
|
|
--without-tiff \
|
|
|
|
--without-webp \
|
|
|
|
--with-jpeg \
|
|
|
|
--with-png \
|
|
|
|
--with-zlib
|
|
|
|
|
2019-08-02 15:40:44 +02:00
|
|
|
# uses clock_gettime, which was provided by librt in glibc < 2.17
|
|
|
|
HOST_IMAGEMAGICK_CONF_ENV = LIBS="-lrt"
|
|
|
|
|
2018-08-24 15:44:57 +02:00
|
|
|
HOST_IMAGEMAGICK_DEPENDENCIES = \
|
|
|
|
host-libjpeg \
|
|
|
|
host-libpng \
|
|
|
|
host-pkgconf \
|
|
|
|
host-zlib
|
|
|
|
|
package/imagemagick: add optional SVG support to host variant
SVG can be regarded as the "source code" for assets, like logos or other
graphical elements.
However, SVG needs to be rendered, which requires an XML parser and an
SVG "parser/rendered". As such, it has various runtime impacts, like
bad performance or security. As such, SVG are often pre-rendered to the
required sizes/depths/resolutions into other format, such as PNG, at
build time.
While rsvg-convert (from host-librsvg) would allow the rendering, it
does not allow more complex tasks taht ImageMagick allows for:
compositing more than one image, 2D transforamtions (rotation, skew...).
Yet, SVG support in ImageMagick relies on librsvg, which adds quite a
few dependencies, and thus has a noticeable impact on the build time.
Add an option to allow concerned users to enable/disable SVG support
in ImageMagick.
Enabling SVG support relies on librsvg, which in turns relies on a few
additional packages that ImageMagick can also optionally use. So,
automatically enable the corresponding support as well.
Signed-off-by: "Yann E. MORIN" <yann.morin@orange.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-02-19 14:15:30 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_HOST_IMAGEMAGICK_SVG),y)
|
|
|
|
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
|
|
|
|
else
|
|
|
|
HOST_IMAGEMAGICK_CONF_OPTS += \
|
|
|
|
--without-fontconfig \
|
|
|
|
--without-freetype \
|
|
|
|
--without-pango \
|
|
|
|
--without-rsvg \
|
|
|
|
--without-xml
|
|
|
|
endif
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|
2018-08-24 15:44:57 +02:00
|
|
|
$(eval $(host-autotools-package))
|