blob: 0af6cad2507c284d4f97c148e815b4999a211c6d (
plain)
1 # Description: Image manipulation wizard (version 6)
2 # URL: https://legacy.imagemagick.org/
3 # Maintainer: Danny Rawlins, crux at romster dot me
4 # Depends on: lcms2 pango xorg-libxt
5
6 name=imagemagick-compat
7 version=6.9.11-19
8 release=1
9 source=(https://www.imagemagick.org/download/ImageMagick-$version.tar.xz
10 IM6-GS-policy.patch)
11
12 build () {
13 cd ImageMagick-$version
14
15 # Workaround ghostscript security issues
16 patch -p1 -i $SRC/IM6-GS-policy.patch
17
18 ./configure \
19 PKG_CONFIG="/usr/bin/env PKG_CONFIG_PATH=/usr/lib/$name/pkgconfig pkg-config" \
20 --prefix=/usr \
21 --enable-shared \
22 --with-modules \
23 --with-perl=yes \
24 --with-lcms=yes
25
26 sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
27
28 make
29 make DESTDIR=$PKG install pkgconfigdir="/usr/lib/$name/pkgconfig"
30
31 # rebuild perl binding .so files to remove bogus workdir rpath
32 cd PerlMagick
33 find . -name '*.so' -delete
34 sed -i 's,LD_RUN_PATH="$(LD_RUN_PATH)" ,,' quantum/Makefile
35 make DESTDIR=$PKG install
36
37 rm -r $PKG/usr/share/doc
38 find $PKG -regex '.*\(ChangeLog\|LICENSE\|NEWS\.txt\)$' -delete
39 find $PKG -regex '.*\(\.packlist\|perllocal.pod\|\.bs\)$' -delete
40 find $PKG -type d -empty -delete
41
42 rm -r $PKG/usr/{bin,share/man}
43 rm $PKG/usr/lib/*.la
44
45 rm $PKG/usr/lib/perl5/site_perl/5.28/linux-thread-multi/Image/Magick.pm
46 }
|