archrelease: copy trunk to extra-x86_64
[arch-packages.git] / graphicsmagick / trunk / PKGBUILD
blob2fef524532b77fab204e776fda85e073a0c410a1
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.37
8 pkgrel=1
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 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')
25 prepare() {
26         cd "${srcdir}/GraphicsMagick-${pkgver}"
27         sed -e "s:freetype_config='':freetype_config='/usr/bin/pkg-config freetype2':g" -i configure
30 build() {
31         cd "${srcdir}/GraphicsMagick-${pkgver}"
32         ./configure \
33                 --prefix=/usr \
34                 --enable-shared \
35                 --with-modules \
36                 --with-perl \
37                 --with-quantum-depth=16 \
38                 --with-threads
39         make
42 package() {
43         cd "${srcdir}/GraphicsMagick-${pkgver}"
45         make DESTDIR="${pkgdir}" install
47         # Install MIT license
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
53         cd PerlMagick
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
57         make
58         make install
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