1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
7 _relname=ImageMagick-${pkgver%%.*}
8 _tarname=ImageMagick-${pkgver%.*}-${pkgver##*.}
9 pkgdesc='An image viewing/manipulation program'
10 url='https://www.imagemagick.org/'
13 depends=(libltdl lcms2 fontconfig libxext liblqr libraqm libpng libxml2)
14 optdepends=('ghostscript: PS/PDF support'
15 'libheif: HEIF support'
16 'libjxl: JPEG XL support'
18 'librsvg: SVG support'
19 'libwebp: WEBP support'
21 'libxml2: Magick Scripting Language'
22 'libzip: OpenRaster support'
23 'ocl-icd: OpenCL support'
24 'openexr: OpenEXR support'
25 'openjpeg2: JPEG2000 support'
26 'djvulibre: DJVU support'
27 'pango: Text rendering')
28 options+=(!emptydirs libtool)
29 backup=(etc/$_relname/{colors,delegates,log,mime,policy,quantization-table,thresholds,type,type-{dejavu,ghostscript}}.xml)
31 makedepends=(ghostscript openexr libwmf librsvg openjpeg2 libraw opencl-headers libwebp libzip libjxl
32 chrpath ocl-icd glu ghostpcl ghostxps libheif jbigkit djvulibre)
33 checkdepends=(gsfonts ttf-dejavu)
34 replaces=(imagemagick-doc)
35 source=(https://imagemagick.org/archive/$_tarname.tar.xz{,.asc}
37 sha256sums=('05a24995cb4ad1c1185255fa0d65c24842a71972336cda20f9fbd330299d160a'
39 'a85b744c61b1b563743ecb7c7adad999d7ed9a8af816650e3ab9321b2b102e73')
40 validpgpkeys=(D8272EF51DA223E4D05B466989AB63D48277377A) # Lexie Parsimoniae
45 mkdir -p docpkg/usr/share
49 # Fix up typemaps to match our packages, where possible
50 patch -p1 -i ../arch-fonts.diff
60 --with-dejavu-font-dir=/usr/share/fonts/TTF \
61 --with-gs-font-dir=/usr/share/fonts/gsfonts \
62 PSDelegate=/usr/bin/gs \
63 XPSDelegate=/usr/bin/gxps \
64 PCLDelegate=/usr/bin/gpcl6 \
75 --with-perl-options=INSTALLDIRS=vendor \
86 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
98 make DESTDIR="$pkgdir" install
100 find "$pkgdir/usr/lib/perl5" -name '*.so' -exec chrpath -d {} +
101 rm "$pkgdir"/etc/$_relname/type-{apple,urw-base35,windows}.xml
102 rm "$pkgdir"/usr/lib/*.la
104 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE NOTICE