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 makedepends=('perl' 'jasper' 'libwmf' 'libxml2')
18 depends=('freetype2' 'libxext' 'libsm' 'lcms2' 'libltdl' 'bzip2' 'xz'
19 'libpng' 'libtiff' 'libwebp')
20 source=("https://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/GraphicsMagick-${pkgver}.tar.xz")
21 sha256sums=('90dc22f1a7bd240e4c9065a940962bf13da43c99bcc36cb111cc3c1a0d7477d4')
23 options=('!emptydirs' 'libtool')
26 cd "${srcdir}/GraphicsMagick-${pkgver}"
27 sed -e "s:freetype_config='':freetype_config='/usr/bin/pkg-config freetype2':g" -i configure
31 cd "${srcdir}/GraphicsMagick-${pkgver}"
37 --with-quantum-depth=16 \
43 cd "${srcdir}/GraphicsMagick-${pkgver}"
45 make DESTDIR="${pkgdir}" install
48 install -Dm644 "Copyright.txt" "${pkgdir}/usr/share/licenses/${pkgname}/Copyright.txt"
50 # Install perl bindings
51 # The patching was introduced in order to build perl module without installing package itself and
52 # not to introduce unnecessary path into LD_RUN_PATH
54 sed -i -e "s:'LDDLFLAGS' => \"\(.*\)\":'LDDLFLAGS' => \"-L${pkgdir}/usr/lib \1\":" Makefile.PL
55 perl Makefile.PL INSTALLDIRS=vendor PREFIX=/usr DESTDIR="${pkgdir}"
56 sed -i -e "s/LDLOADLIBS =/LDLOADLIBS = -lGraphicsMagick/" Makefile
60 # Remove perllocal.pod and .packlist
61 rm -r "${pkgdir}"/usr/lib/perl5/*/core_perl
62 rm "${pkgdir}"/usr/lib/perl5/*/vendor_perl/auto/Graphics/Magick/.packlist