diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 20:00:35 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 14:18:41 +0100 |
commit | 6770db0bdd89b3da6bff9bbae9cf49c5d5e4cea9 (patch) | |
tree | 13ec512a59363a9f83719aad3f37773c0c069a6b /main/py-pillow/APKBUILD | |
parent | bebd96ad32a0681f44897753d1c11e7d820670c7 (diff) | |
download | aports-6770db0bdd89b3da6bff9bbae9cf49c5d5e4cea9.tar.bz2 aports-6770db0bdd89b3da6bff9bbae9cf49c5d5e4cea9.tar.xz |
main/py-pillow: upgrade to 3.4.2 and add py2/py3 subpackages
Diffstat (limited to 'main/py-pillow/APKBUILD')
-rw-r--r-- | main/py-pillow/APKBUILD | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/main/py-pillow/APKBUILD b/main/py-pillow/APKBUILD index 272aeeab09..fcbfdb923e 100644 --- a/main/py-pillow/APKBUILD +++ b/main/py-pillow/APKBUILD @@ -2,44 +2,50 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-pillow _pkgname=Pillow -pkgver=3.3.0 -pkgrel=2 +pkgver=3.4.2 +pkgrel=0 pkgdesc="A Python Imaging Library" url="http://python-pillow.org/" arch="all" license="PSF" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools freetype-dev jpeg-dev libwebp-dev tiff-dev - libpng-dev lcms2-dev openjpeg-dev zlib-dev" -install="" -subpackages="" -replaces="py-imaging" -source="https://pypi.io/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +depends="" +makedepends="python2-dev python3-dev py-setuptools freetype-dev jpeg-dev libwebp-dev + tiff-dev libpng-dev lcms2-dev openjpeg-dev zlib-dev" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" build() { - cd "$_builddir" + cd "$builddir" + # zlib resides in lib export CFLAGS="$CFLAGS -L/lib" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname py-imaging" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } -md5sums="aaf059abcd174b13d90dd77b18d8e67b Pillow-3.3.0.zip" -sha256sums="6ac87ba1e63cbd11c9e34b5e8e962ddd0b0869d8fedafeb2f7e6d049e9153027 Pillow-3.3.0.zip" -sha512sums="7cb5ae2727c23ce30a124c66013cd38516a298d63144ea5cae6521237fd3b5f526dce62c548cd0fe7c5a896e5046e18ce1288090097ad25d8e8a1887d551007f Pillow-3.3.0.zip" +md5sums="09ebb92ec5cbba13ff1acf139caf6b66 Pillow-3.4.2.tar.gz" +sha256sums="0ee9975c05602e755ff5000232e0335ba30d507f6261922a658ee11b1cec36d1 Pillow-3.4.2.tar.gz" +sha512sums="a8b6711d28ad94f568e836f3eca313cf5c4277a5c9dd6accdb1cc2b0abdc47cd79bd850baf96e33a24a251e8011b67e80d2bea0395105a8c03e198d4caa70e47 Pillow-3.4.2.tar.gz" |