archrelease: copy trunk to extra-x86_64
[arch-packages.git] / imagemagick / trunk / PKGBUILD
blob9599b9f2fcc1fb5cf2606571079ffa82d884e13a
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Eric BĂ©langer <eric@archlinux.org>
4 pkgname=imagemagick
5 pkgver=7.1.1.9
6 pkgrel=1
7 _relname=ImageMagick-${pkgver%%.*}
8 _tarname=ImageMagick-${pkgver%.*}-${pkgver##*.}
9 pkgdesc='An image viewing/manipulation program'
10 url='https://www.imagemagick.org/'
11 arch=(x86_64)
12 license=(custom)
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'
17             'libraw: DNG support'
18             'librsvg: SVG support'
19             'libwebp: WEBP support'
20             'libwmf: WMF 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)
30 provides=(libmagick)
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}
36         arch-fonts.diff)
37 sha256sums=('fbe6290c790231d4cd773c573fd09a931c9d384aecb0e18ed1b4d9f63ad43192'
38             'SKIP'
39             'a85b744c61b1b563743ecb7c7adad999d7ed9a8af816650e3ab9321b2b102e73')
40 validpgpkeys=(D8272EF51DA223E4D05B466989AB63D48277377A)  # Lexie Parsimoniae
42 shopt -s extglob
44 prepare() {
45   mkdir -p docpkg/usr/share
47   cd $_tarname
49   # Fix up typemaps to match our packages, where possible
50   patch -p1 -i ../arch-fonts.diff
53 build() {
54   cd $_tarname
55   ./configure \
56     --prefix=/usr \
57     --sysconfdir=/etc \
58     --enable-shared \
59     --disable-static \
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 \
65     --enable-hdri \
66     --enable-opencl \
67     --without-gslib \
68     --with-djvu \
69     --with-jxl \
70     --with-lqr \
71     --with-modules \
72     --with-openexr \
73     --with-openjp2 \
74     --with-perl \
75     --with-perl-options=INSTALLDIRS=vendor \
76     --with-rsvg \
77     --with-webp \
78     --with-wmf \
79     --with-xml \
80     --without-autotrace \
81     --without-dps \
82     --without-fftw \
83     --without-fpx \
84     --without-gcc-arch \
85     --without-gvc
86   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
87   make
90 check() (
91   cd $_tarname
92   ulimit -n 4096
93   make check
96 package() {
97   cd $_tarname
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