# Contributor: Ɓukasz Jendrysik # Contributor: Carlo Landmeter # Maintainer: Jakub Jirutka setvar pkgname = 'imagemagick6' setvar _pkgname = 'ImageMagick' setvar pkgver = '6.9.9.19' setvar _pkgver = "${pkgver%.*}-${pkgver##*.}" setvar _abiver = ${pkgname#imagemagick} setvar pkgrel = '0' setvar pkgdesc = ""A collection of tools and libraries for many image formats (legacy version $_abiver)"" setvar url = ""https://www.imagemagick.org/"" setvar arch = ""all"" setvar license = ""custom"" setvar options = ""libtool"" setvar depends_dev = ""!${pkgname%$_abiver}-dev"" setvar makedepends = ""fontconfig-dev freetype-dev ghostscript-dev lcms2-dev libjpeg-turbo-dev libpng-dev librsvg-dev libtool libxml2-dev tiff-dev zlib-dev"" setvar subpackages = ""$pkgname-doc $pkgname-dev $pkgname-c++:_cxx $pkgname-libs"" setvar source = ""http://www.imagemagick.org/download/releases/$_pkgname-$_pkgver.tar.xz"" setvar builddir = ""$srcdir/$_pkgname-$_pkgver"" proc prepare { default_prepare if test ${pkgver%%.*} != $_abiver { error "This abuild is for major version $_abiver, but pkgver=$pkgver!" return 1 } } proc 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 } proc package { cd $builddir make -j1 DESTDIR="$pkgdir" install if test ! -e "$pkgdir"/usr/lib/libMagickCore-$_abiver.Q16.so { error "Has ABI verision changed? (current is $_abiver)" return 1 } # 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 } proc 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 * { ln -s $f ${f%-$_abiver} } } proc libs { default_libs cd $subpkgdir mv "$pkgdir"/etc . mv "$pkgdir"/usr/lib/* ./usr/lib/ mv "$pkgdir"/usr/share ./usr/ } proc _cxx { setvar pkgdesc = ""ImageMagick Magick++ library (C++ bindings)"" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libMagick++*.so.* "$subpkgdir"/usr/lib/ } setvar sha512sums = ""f73efdd4fab52ba90d4ab13626ff153ca74a7134090f199f1618fef172c537132bd27b243ea40640bcb83e2d2a4c19edd1af83c752722ca2a2d20526fbd6cc34 ImageMagick-6.9.9-19.tar.xz""