# Contributor: Ɓukasz Jendrysik # Contributor: Carlo Landmeter # Maintainer: Jakub Jirutka pkgname=imagemagick6 _pkgname=ImageMagick pkgver=6.9.10.39 _pkgver=${pkgver%.*}-${pkgver##*.} _abiver=${pkgname#imagemagick} pkgrel=0 pkgdesc="A collection of tools and libraries for many image formats (legacy version $_abiver)" url="https://www.imagemagick.org/" arch="all" license="Apache-2.0" options="libtool" depends_dev="!${pkgname%$_abiver}-dev" makedepends="fontconfig-dev freetype-dev ghostscript-dev lcms2-dev libjpeg-turbo-dev libpng-dev librsvg-dev libtool libxml2-dev tiff-dev zlib-dev" checkdepends="freetype fontconfig ghostscript ghostscript-fonts lcms2 graphviz" subpackages="$pkgname-doc $pkgname-dev $pkgname-c++:_cxx $pkgname-libs" source="https://www.imagemagick.org/download/releases/$_pkgname-$_pkgver.tar.xz" builddir="$srcdir/$_pkgname-$_pkgver" # secfixes: # 6.9.10.37-r0: # - CVE-2019-10649 # - CVE-2019-10650 # - CVE-2019-7175 # - CVE-2019-7395 # - CVE-2019-7396 # - CVE-2019-7397 # - CVE-2019-7398 # - CVE-2019-9956 # - CVE-2018-12599 # - CVE-2018-12600 # - CVE-2018-13153 # - CVE-2018-14434 # - CVE-2018-14435 # - CVE-2018-14436 # - CVE-2018-14437 # - CVE-2018-14551 # - CVE-2018-15607 # - CVE-2018-16329 # - CVE-2018-16412 # - CVE-2018-16413 # - CVE-2018-16640 # - CVE-2018-16642 # - CVE-2018-16643 # - CVE-2018-16644 # - CVE-2018-16645 # - CVE-2018-16749 # - CVE-2018-16750 # - CVE-2018-17965 # - CVE-2018-17966 # - CVE-2018-17967 # - CVE-2018-18016 # - CVE-2018-18024 # - CVE-2018-18025 # - CVE-2018-18544 # - CVE-2018-20467 # - CVE-2018-5246 # - CVE-2018-5247 # - CVE-2018-5357 # - CVE-2018-5358 # - CVE-2018-6405 # - CVE-2018-7443 # - CVE-2018-7470 # - CVE-2018-8804 # - CVE-2018-8960 # - CVE-2018-9133 # - CVE-2018-9135 prepare() { default_prepare if [ "${pkgver%%.*}" != "$_abiver" ]; then error "This abuild is for major version $_abiver, but pkgver=$pkgver!" return 1 fi } build() { cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --program-suffix="-$_abiver" \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --disable-docs \ --disable-static \ --with-threads \ --without-x \ --without-perl \ --with-tiff \ --with-png \ --with-rsvg \ --with-gslib \ --with-gs-font-dir=/usr/share/fonts/Type1 \ --with-modules \ --with-xml make } check() { cd "$builddir" make check } package() { cd "$builddir" make -j1 DESTDIR="$pkgdir" install if [ ! -e "$pkgdir"/usr/lib/libMagickCore-$_abiver.Q16.so ]; then error "Has ABI verision changed? (current is $_abiver)" return 1 fi # We cannot let abuild delete the *.la files due to we need *.la # for the modules. rm "$pkgdir"/usr/lib/*.la find "$pkgdir" -name '.packlist' -o -name 'perllocal.pod' \ -o -name '*.bs' -delete install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } dev() { default_dev cd "$subpkgdir" mkdir -p ./usr/bin mv "$pkgdir"/usr/bin/*-config-$_abiver ./usr/bin/ cd ./usr/bin local f; for f in *; do ln -s $f ${f%-$_abiver} done } libs() { default_libs cd "$subpkgdir" mv "$pkgdir"/etc . mv "$pkgdir"/usr/lib/* ./usr/lib/ mv "$pkgdir"/usr/share ./usr/ } _cxx() { pkgdesc="ImageMagick Magick++ library (C++ bindings)" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libMagick++*.so.* "$subpkgdir"/usr/lib/ } sha512sums="82a0aa990ce3a146e02b02a9674340209bf58ce8edd694b8884509423f3503925b085496e7f299ea4a66c177420dde3e347ac4ea21dd9611ede892faf2425e34 ImageMagick-6.9.10-39.tar.xz"