db-move: moved webkit2gtk from [testing] to [extra] (x86_64)
[arch-packages.git] / graphicsmagick / trunk / PKGBUILD
blob91ada39c97963fddd58e75e3729a4388bf8bee26
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>
6 pkgname=graphicsmagick
7 pkgver=1.3.40
8 pkgrel=2
9 pkgdesc='Image processing system'
10 url='http://www.graphicsmagick.org/'
11 arch=('x86_64')
12 license=('MIT')
13 optdepends=('jasper: jp2 module'
14             'libwmf: wmf 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')
27 prepare() {
28         cd "${srcdir}/GraphicsMagick-${pkgver}"
29         sed -e "s:freetype_config='':freetype_config='/usr/bin/pkg-config freetype2':g" -i configure
32 build() {
33         cd "${srcdir}/GraphicsMagick-${pkgver}"
34         ./configure \
35                 --prefix=/usr \
36                 --enable-shared \
37                 --with-modules \
38                 --with-perl \
39                 --with-quantum-depth=16 \
40                 --with-threads
41         make
44 package() {
45         cd "${srcdir}/GraphicsMagick-${pkgver}"
47         make DESTDIR="${pkgdir}" install
49         # Install MIT license
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
55         cd PerlMagick
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
59         make
60         make install
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