1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Maintainer: Gaetan Bisson <bisson@archlinux.org>
3 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
4 # Contributor: Anton Leontiev <bunder@t-25.ru>
9 pkgdesc='Image processing system'
10 url='http://www.graphicsmagick.org/'
13 optdepends=('jasper: jp2 module'
15 'libxml2: msl, svg, url modules'
16 'ghostscript: pdf, ps modules'
17 'libheif: heic module'
18 'libjxl: jpeg-xl module')
19 makedepends=('perl' 'jasper' 'libwmf' 'libxml2' 'libjxl' 'libheif')
20 depends=('freetype2' 'libxext' 'libsm' 'lcms2' 'libltdl' 'bzip2' 'xz'
21 'libpng' 'libtiff' 'libwebp')
22 source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/GraphicsMagick-${pkgver}.tar.xz")
23 sha256sums=('97dc1a9d4e89c77b25a3b24505e7ff1653b88f9bfe31f189ce10804b8efa7746')
25 options=('!emptydirs' 'libtool')
28 cd "${srcdir}/GraphicsMagick-${pkgver}"
29 sed -e "s:freetype_config='':freetype_config='/usr/bin/pkg-config freetype2':g" -i configure
33 cd "${srcdir}/GraphicsMagick-${pkgver}"
39 --with-quantum-depth=16 \
45 cd "${srcdir}/GraphicsMagick-${pkgver}"
47 make DESTDIR="${pkgdir}" install
50 install -Dm644 "Copyright.txt" "${pkgdir}/usr/share/licenses/${pkgname}/Copyright.txt"
52 # Install perl bindings
53 # The patching was introduced in order to build perl module without installing package itself and
54 # not to introduce unnecessary path into LD_RUN_PATH
56 sed -i -e "s:'LDDLFLAGS' => \"\(.*\)\":'LDDLFLAGS' => \"-L${pkgdir}/usr/lib \1\":" Makefile.PL
57 perl Makefile.PL INSTALLDIRS=vendor PREFIX=/usr DESTDIR="${pkgdir}"
58 sed -i -e "s/LDLOADLIBS =/LDLOADLIBS = -lGraphicsMagick/" Makefile
62 # Remove perllocal.pod and .packlist
63 rm -r "${pkgdir}"/usr/lib/perl5/*/core_perl
64 rm "${pkgdir}"/usr/lib/perl5/*/vendor_perl/auto/Graphics/Magick/.packlist