PKGNAME=imagemagick
PKGSEC=utils
PKGDES="Image viewing and manipulation program (version 7)"
PKGDEP="lcms2 fontconfig ghostscript openexr libwmf librsvg libxml2 \
        liblqr openjpeg perl libxml2 libwebp djvulibre fftw libheif"
PKGDEP__RETRO="lcms2 fontconfig ghostscript libwmf librsvg libxml2 \
        liblqr openjpeg libwebp fftw libheif"
BUILDDEP="libtool"
BUILDDEP__RETRO="libtool perl"

ABTYPE=autotools
AUTOTOOLS_AFTER=(
	'--with-modules'
	'--enable-hdri'
	'--with-wmf'
	'--with-openexr'
	'--with-xml'
	'--with-webp'
	'--with-gslib'
	'--with-gs-font-dir=/usr/share/fonts/Type1'
	'--with-lqr'
	'--with-rsvg'
	'--with-openjp2'
	'--without-gvc'
	'--with-djvu'
	'--without-autotrace'
	'--without-jbig'
	'--without-fpx'
	'--without-dps'
	'--with-fftw'
	'--with-magick-plus-plus'
	'LIBS=-ldl'
	'--disable-docs'
)
AUTOTOOLS_AFTER__RETRO=(
	"${AUTOTOOLS_AFTER[@]}"
	'--without-openexr'
	'--without-gslib'
	'--without-djvu'
	'--without-gslib'
)

# Required for loadable modules
NOLIBTOOL=0
AB_FLAGS_O3=1

PKGBREAK="digikam<=9.1.0-1 dvdauthor<=0.7.2-5 freeciv<=3.2.2-1 \
          inkscape<=1.4.4 libvips<=8.18.4-1 psiconv<=0.9.9-6 \
          pstoedit<=4.02-2 synfig<=1.5.3-3 xine-lib<=1.2.13-11 \
          zbar<=0.23.93-1 imagemagick+7"
PKGREP="imagemagick+7"

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
