# Contributor: Fabian Affolter # Maintainer: Fabian Affolter setvar pkgname = 'py-pillow' setvar _pkgname = 'Pillow' setvar pkgver = '4.3.0' setvar pkgrel = '0' setvar pkgdesc = ""A Python Imaging Library"" setvar url = ""http://python-pillow.org/"" setvar arch = ""all"" setvar license = ""PSF"" setvar depends = ""py-olefile"" setvar makedepends = ""python2-dev python3-dev py-setuptools freetype-dev jpeg-dev libwebp-dev tiff-dev libpng-dev lcms2-dev openjpeg-dev zlib-dev"" setvar subpackages = ""py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc::noarch"" setvar source = ""https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"" setvar builddir = ""$srcdir/$_pkgname-$pkgver"" proc build { cd $builddir # zlib resides in lib export CFLAGS="$CFLAGS -L/lib" python2 setup.py build python3 setup.py build } proc package { mkdir -p $pkgdir } proc _py2 { setvar replaces = ""$pkgname py-imaging"" setvar depends = "${depends//py-/py2-}" _py python2 } proc _py3 { setvar depends = "${depends//py-/py3-}" _py python3 } proc _py { local python="$1" setvar pkgdesc = ""$pkgdesc (for $python)"" setvar install_if = ""$pkgname=$pkgver-r$pkgrel $python"" cd $builddir $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1 # The scripts are packages in -doc, they should not be here. rm -r "$subpkgdir"/usr/bin } proc doc { setvar pkgdesc = ""$pkgdesc (documentation)"" local destdir="$subpkgdir/usr/share/doc/$pkgname" cd $builddir install -d "$destdir"/Scripts install -m 644 Scripts/* "$destdir"/Scripts/ } setvar sha512sums = ""5811252802bd01ac86157235d42138685e746723df48b67ec7c7ebd3f172532b40cf86ca9d3d792e82f03986303a084bf3491c0d511dc068dea1bc631afdeabb Pillow-4.3.0.tar.gz""