buildrootschalter/package/imagemagick/imagemagick.mk
Peter Korsgaard eb54983fdf imagemagick: bump version, fix build with zlib
The recent zlib bump broke imagemagick. This has been fixed upstream
in 6.7.5, but the xml2-config fix is still not upstream and 6.7.5
needs autoconf 2.67 to autoreconf (and we have 2.65), so we cannot
easily use that.

Instead move to the most recent version using autoconf 2.64 and
backport the fix from imagemagick svn. At the same time also
ensure zlib+bzip2 support is picked up if enabled.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-03-03 22:56:23 +01:00

119 lines
2.9 KiB
Makefile

#############################################################
#
# imagemagick
#
#############################################################
IMAGEMAGICK_MAJOR = 6.7.2
IMAGEMAGICK_VERSION = $(IMAGEMAGICK_MAJOR)-10
IMAGEMAGICK_SOURCE = ImageMagick-$(IMAGEMAGICK_VERSION).tar.bz2
IMAGEMAGICK_SITE = ftp://ftp.imagemagick.org/pub/ImageMagick/legacy
IMAGEMAGICK_INSTALL_STAGING = YES
IMAGEMAGICK_AUTORECONF = YES
ifeq ($(BR2_LARGEFILE),y)
IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64
else
IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=32
endif
IMAGEMAGICK_CONF_OPT = --program-transform-name='s,,,' \
--without-perl \
--without-wmf \
--without-openexr \
--without-jp2 \
--without-jbig \
--without-gvc \
--without-djvu \
--without-dps \
--without-gslib \
--without-fpx \
--without-x
IMAGEMAGICK_DEPENDENCIES = host-pkg-config
ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
IMAGEMAGICK_CONF_OPT += --with-fontconfig
IMAGEMAGICK_DEPENDENCIES += fontconfig
else
IMAGEMAGICK_CONF_OPT += --without-fontconfig
endif
ifeq ($(BR2_PACKAGE_FREETYPE),y)
IMAGEMAGICK_CONF_OPT += --with-freetype
IMAGEMAGICK_DEPENDENCIES += freetype
else
IMAGEMAGICK_CONF_OPT += --without-freetype
endif
ifeq ($(BR2_PACKAGE_JPEG),y)
IMAGEMAGICK_CONF_OPT += --with-jpeg
IMAGEMAGICK_DEPENDENCIES += jpeg
else
IMAGEMAGICK_CONF_OPT += --without-jpeg
endif
ifeq ($(BR2_PACKAGE_LIBPNG),y)
IMAGEMAGICK_CONF_OPT += --with-png
IMAGEMAGICK_DEPENDENCIES += libpng
else
IMAGEMAGICK_CONF_OPT += --without-png
endif
ifeq ($(BR2_PACKAGE_LIBRSVG),y)
IMAGEMAGICK_CONF_OPT += --with-rsvg
IMAGEMAGICK_DEPENDENCIES += librsvg
else
IMAGEMAGICK_CONF_OPT += --without-rsvg
endif
ifeq ($(BR2_PACKAGE_LIBXML2),y)
IMAGEMAGICK_CONF_OPT += --with-xml
IMAGEMAGICK_CONF_ENV += ac_cv_path_xml2_config=$(STAGING_DIR)/usr/bin/xml2-config
IMAGEMAGICK_DEPENDENCIES += libxml2
else
IMAGEMAGICK_CONF_OPT += --without-xml
endif
ifeq ($(BR2_PACKAGE_TIFF),y)
IMAGEMAGICK_CONF_OPT += --with-tiff
IMAGEMAGICK_DEPENDENCIES += tiff
else
IMAGEMAGICK_CONF_OPT += --without-tiff
endif
ifeq ($(BR2_PACKAGE_FFTW),y)
# configure script misdetects these leading to build errors
IMAGEMAGICK_CONF_ENV += ac_cv_func_creal=yes ac_cv_func_cimag=yes
IMAGEMAGICK_CONF_OPT += --with-fftw
IMAGEMAGICK_DEPENDENCIES += fftw
else
IMAGEMAGICK_CONF_OPT += --without-fftw
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
IMAGEMAGICK_CONF_OPT += --with-zlib
IMAGEMAGICK_DEPENDENCIES += zlib
else
IMAGEMAGICK_CONF_OPT += --without-zlib
endif
ifeq ($(BR2_PACKAGE_BZIP2),y)
IMAGEMAGICK_CONF_OPT += --with-bzlib
IMAGEMAGICK_DEPENDENCIES += bzip2
else
IMAGEMAGICK_CONF_OPT += --without-bzip2
endif
define IMAGEMAGICK_REMOVE_CONFIG_SCRIPTS
$(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/, \
$(addsuffix -config, \
Magick MagickCore MagickWand Wand Magick++))
endef
ifneq ($(BR2_HAVE_DEVFILES),y)
IMAGEMAGICK_POST_INSTALL_TARGET_HOOKS += IMAGEMAGICK_REMOVE_CONFIG_SCRIPTS
endif
$(eval $(call AUTOTARGETS))