47 lines
1.3 KiB
Plaintext
47 lines
1.3 KiB
Plaintext
# Description: Image manipulation wizard (version 6)
|
|
# URL: https://legacy.imagemagick.org/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: lcms2 pango xorg-libxt
|
|
|
|
name=imagemagick-compat
|
|
version=6.9.11-44
|
|
release=1
|
|
source=(https://www.imagemagick.org/download/ImageMagick-$version.tar.xz
|
|
IM6-GS-policy.patch)
|
|
|
|
build () {
|
|
cd ImageMagick-$version
|
|
|
|
# Workaround ghostscript security issues
|
|
patch -p1 -i $SRC/IM6-GS-policy.patch
|
|
|
|
./configure \
|
|
PKG_CONFIG="/usr/bin/env PKG_CONFIG_PATH=/usr/lib/$name/pkgconfig pkg-config" \
|
|
--prefix=/usr \
|
|
--enable-shared \
|
|
--with-modules \
|
|
--with-perl=yes \
|
|
--with-lcms=yes
|
|
|
|
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
|
|
|
|
make
|
|
make DESTDIR=$PKG install pkgconfigdir="/usr/lib/$name/pkgconfig"
|
|
|
|
# rebuild perl binding .so files to remove bogus workdir rpath
|
|
cd PerlMagick
|
|
find . -name '*.so' -delete
|
|
sed -i 's,LD_RUN_PATH="$(LD_RUN_PATH)" ,,' quantum/Makefile
|
|
make DESTDIR=$PKG install
|
|
|
|
rm -r $PKG/usr/share/doc
|
|
find $PKG -regex '.*\(ChangeLog\|LICENSE\|NEWS\.txt\)$' -delete
|
|
find $PKG -regex '.*\(\.packlist\|perllocal.pod\|\.bs\)$' -delete
|
|
find $PKG -type d -empty -delete
|
|
|
|
rm -r $PKG/usr/{bin,share/man}
|
|
rm $PKG/usr/lib/*.la
|
|
|
|
rm $PKG/usr/lib/perl5/site_perl/5.28/linux-thread-multi/Image/Magick.pm
|
|
}
|