dev-python/pillow: major version bump with new features.

Package-Manager: Portage-2.3.6, Repoman-2.3.2
This commit is contained in:
Sébastien Fabbro
2017-07-11 20:17:53 +00:00
parent 8fc9e7a586
commit 2123861a97
3 changed files with 87 additions and 2 deletions

View File

@@ -1 +1,2 @@
DIST Pillow-3.4.2.zip 11042238 SHA256 85b237840ad8b30a1572bf9e3898a26c77910a56554d73ed4f58a42197c2e4c2 SHA512 5e05206db5bc1b4177384f7e91ee79015c6e1bbdc7c31c997da054391b9b5ec7c1ebdec258a33f598986533894f3324b03d0b4b385b94e72a0517a3437553b39 WHIRLPOOL f92d4320ca5fd3e004a2ace41d14f0816dbea6fcfc9b10739a59d2dd393725a47c28f5b9f643d0b3243b9003701094ee953b38118412647155e8ba13fafe0582
DIST Pillow-4.2.1.tar.gz 12673417 SHA256 c724f65870e545316f9e82e4c6d608ab5aa9dd82d5185e5b2e72119378740073 SHA512 8a1c691f067c1127b941a94ae991c728c94eab876fe2a511ed0ad8af9702d4969325bd565b11e656ffefe867bf385725a5c14e3c28f8945730fa21986f934f69 WHIRLPOOL af93b67a60843d9f853921d5dd1332209cefc87a9680201cca5010f935527abcacac57e9d2afeac6bd3ccf8ab6636ffc2321e0888b73babfdb9ff0a933a77951

View File

@@ -6,10 +6,11 @@
<name>Python</name>
</maintainer>
<use>
<flag name="webp">Enable support for webp image format.</flag>
<flag name="ole">Add support for OLE2 image format</flag>
<flag name="imagequant">Build with Image Quantization Library support</flag>
</use>
<upstream>
<remote-id type="pypi">Pillow</remote-id>
<remote-id type="github">python-imaging/Pillow</remote-id>
<remote-id type="github">pillow-dev/pillow</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,83 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
PYTHON_REQ_USE='tk?,threads(+)'
inherit distutils-r1 eutils virtualx
MY_PN=Pillow
MY_P=${MY_PN}-${PV}
DESCRIPTION="Python Imaging Library (fork)"
HOMEPAGE="https://python-pillow.org/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
LICENSE="HPND"
SLOT="0"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="doc examples imagequant jpeg jpeg2k ole lcms test tiff tk truetype webp zlib"
REQUIRED_USE="test? ( jpeg tiff )"
RDEPEND="
imagequant? ( media-gfx/libimagequant:0 )
jpeg? ( virtual/jpeg:0 )
jpeg2k? ( media-libs/openjpeg:2= )
lcms? ( media-libs/lcms:2= )
ole? ( dev-python/olefile[${PYTHON_USEDEP}] )
tiff? ( media-libs/tiff:0=[jpeg?] )
truetype? ( media-libs/freetype:2= )
webp? ( media-libs/libwebp:0= )
zlib? ( sys-libs/zlib:0= )"
DEPEND="${RDEPEND}
dev-python/setuptools[${PYTHON_USEDEP}]
doc? (
dev-python/sphinx[${PYTHON_USEDEP}]
dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
)
test? ( dev-python/nose[${PYTHON_USEDEP}] )
"
S="${WORKDIR}/${MY_P}"
src_compile() {
# raqm not in portage yet
distutils-r1_src_compile \
--disable-raqm \
$(use_enable truetype freetype) \
$(use_enable jpeg) \
$(use_enable jpeg2k jpeg2000) \
$(use_enable lcms) \
$(use_enable tiff) \
$(use_enable imagequant) \
$(use_enable webp) \
$(use_enable webp webpmux) \
$(use_enable zlib)
}
python_compile_all() {
use doc && emake -C docs html
}
python_test() {
"${PYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}"
virtx nosetests -vx Tests/test_*.py
}
python_install() {
python_doheader libImaging/*.h
distutils-r1_python_install
}
python_install_all() {
use doc && local HTML_DOCS=( docs/_build/html/. )
if use examples ; then
docinto examples
dodoc Scripts/*
docompress -x /usr/share/doc/${PF}/examples
fi
distutils-r1_python_install_all
}