pillow: upgraded package to upstream

Upgraded dev-python/pillow to version 7.2.0 on amd64, arm

BUG=b:164293929
TEST=emerge and cros deploy it to DUT.

Change-Id: I3f4c3ccf9d646c0cb8514dfbb6a3b1fb76377fc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/overlays/portage-stable/+/2372065
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Pin-yen Lin <treapking@chromium.org>
Tested-by: Ching-Kang Yen <chingkang@chromium.org>
Commit-Queue: Ching-Kang Yen <chingkang@chromium.org>
diff --git a/dev-python/pillow/Manifest b/dev-python/pillow/Manifest
index 6f06fbc..1917ec1 100644
--- a/dev-python/pillow/Manifest
+++ b/dev-python/pillow/Manifest
@@ -1 +1 @@
-DIST Pillow-3.4.2.zip 11042238 SHA256 85b237840ad8b30a1572bf9e3898a26c77910a56554d73ed4f58a42197c2e4c2 SHA512 5e05206db5bc1b4177384f7e91ee79015c6e1bbdc7c31c997da054391b9b5ec7c1ebdec258a33f598986533894f3324b03d0b4b385b94e72a0517a3437553b39 WHIRLPOOL f92d4320ca5fd3e004a2ace41d14f0816dbea6fcfc9b10739a59d2dd393725a47c28f5b9f643d0b3243b9003701094ee953b38118412647155e8ba13fafe0582
+DIST pillow-7.2.0.tar.gz 39125407 BLAKE2B f49015922c34473590740c9fa63435f85f9a517b3295abd2e758941b95162cef0fb1fa2a0e6ee0ac86323709ee3af02888f6e029a1905f13698e82c1f38d5d94 SHA512 ac9c7c8f445b3f67f51bea13fad118d1612c45272c26d33bec286f3c2e198912b934378c4bf986b409aaa2a83d92ff176ee4d25f28701d61746c9cb86d0f412b
diff --git a/dev-python/pillow/files/pillow-3.4.2-no-scripts.patch b/dev-python/pillow/files/pillow-3.4.2-no-scripts.patch
deleted file mode 100644
index a8aa0ec..0000000
--- a/dev-python/pillow/files/pillow-3.4.2-no-scripts.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/setup.py b/setup.py
-index 5257e748..410ce788 100644
---- a/setup.py
-+++ b/setup.py
-@@ -746,7 +746,6 @@ setup(name=NAME,
-       ext_modules=[Extension("PIL._imaging", ["_imaging.c"])],
-       include_package_data=True,
-       packages=find_packages(),
--      scripts=glob.glob("Scripts/*.py"),
-       test_suite='nose.collector',
-       keywords=["Imaging", ],
-       license='Standard PIL License',
diff --git a/dev-python/pillow/metadata.xml b/dev-python/pillow/metadata.xml
index c3f74b9..f350483 100644
--- a/dev-python/pillow/metadata.xml
+++ b/dev-python/pillow/metadata.xml
@@ -10,6 +10,6 @@
   </use>
   <upstream>
     <remote-id type="pypi">Pillow</remote-id>
-    <remote-id type="github">pillow-dev/pillow</remote-id>
+    <remote-id type="github">python-pillow/Pillow</remote-id>
   </upstream>
 </pkgmetadata>
diff --git a/dev-python/pillow/pillow-3.4.2-r1.ebuild b/dev-python/pillow/pillow-3.4.2-r1.ebuild
deleted file mode 100644
index 6e35dc1..0000000
--- a/dev-python/pillow/pillow-3.4.2-r1.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# 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} pypy )
-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://github.com/python-imaging/Pillow https://pypi.org/project/Pillow/"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
-
-LICENSE="HPND"
-SLOT="0"
-KEYWORDS="*"
-IUSE="doc examples jpeg jpeg2k lcms test tiff tk truetype webp zlib"
-
-REQUIRED_USE="test? ( jpeg tiff )"
-
-RDEPEND="
-	jpeg? ( virtual/jpeg:0 )
-	jpeg2k? ( media-libs/openjpeg:2= )
-	lcms? ( media-libs/lcms:2= )
-	tiff? ( media-libs/tiff:0= )
-	truetype? ( media-libs/freetype:2= )
-	webp? ( media-libs/libwebp:0= )
-	zlib? ( sys-libs/zlib:0= )"
-DEPEND="${RDEPEND}
-	app-arch/unzip
-	dev-python/setuptools[${PYTHON_USEDEP}]
-	doc? (
-		dev-python/sphinx[${PYTHON_USEDEP}]
-		dev-python/sphinx-better-theme[${PYTHON_USEDEP}]
-		>=dev-python/sphinx_rtd_theme-0.1[${PYTHON_USEDEP}]
-		<dev-python/sphinx_rtd_theme-0.2[${PYTHON_USEDEP}]
-	)
-	test? (	dev-python/nose[${PYTHON_USEDEP}] )
-	"
-
-S="${WORKDIR}/${MY_P}"
-
-# See _render and _clean in Tests/test_imagefont.py
-DISTUTILS_IN_SOURCE_BUILD=1
-
-PATCHES=(
-	"${FILESDIR}/pillow-3.4.2-no-scripts.patch"
-)
-
-python_prepare_all() {
-	# Disable all the stuff we don't want.
-	local f
-	for f in jpeg lcms tiff tk webp zlib; do
-		if ! use ${f}; then
-			sed -i -e "s:feature.${f} =:& None #:" setup.py || die
-		fi
-	done
-	if ! use truetype; then
-		sed -i -e 's:feature.freetype =:& None #:' setup.py || die
-	fi
-	if ! use jpeg2k; then
-		sed -i -e 's:feature.jpeg2000 =:& None #:' setup.py || die
-	fi
-
-	sed \
-		-e "/required/s:=.*:= set():g" \
-		-e "/if f in/s:'jpeg', 'libz'::g" \
-		-i setup.py || die
-
-	distutils-r1_python_prepare_all
-}
-
-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/{Imaging.h,ImPlatform.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
-}
diff --git a/dev-python/pillow/pillow-7.2.0.ebuild b/dev-python/pillow/pillow-7.2.0.ebuild
new file mode 100644
index 0000000..8c79b0e
--- /dev/null
+++ b/dev-python/pillow/pillow-7.2.0.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+PYTHON_REQ_USE='tk?,threads(+)'
+
+inherit distutils-r1 toolchain-funcs virtualx
+
+MY_PN=Pillow
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python Imaging Library (fork)"
+HOMEPAGE="https://python-pillow.org/"
+SRC_URI="https://github.com/python-pillow/Pillow/archive/${PV}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="*"
+IUSE="examples imagequant jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib"
+REQUIRED_USE="test? ( jpeg tiff )"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	dev-python/olefile[${PYTHON_USEDEP}]
+	imagequant? ( media-gfx/libimagequant:0 )
+	jpeg? ( virtual/jpeg:0 )
+	jpeg2k? ( media-libs/openjpeg:2= )
+	lcms? ( media-libs/lcms:2= )
+	tiff? ( media-libs/tiff:0=[jpeg,zlib] )
+	truetype? ( media-libs/freetype:2= )
+	webp? ( media-libs/libwebp:0= )
+	xcb? ( x11-libs/libxcb )
+	zlib? ( sys-libs/zlib:0= )"
+DEPEND="${RDEPEND}
+	dev-python/setuptools[${PYTHON_USEDEP}]
+	test? (
+		dev-python/pytest[${PYTHON_USEDEP}]
+		media-gfx/imagemagick[png]
+	)
+"
+
+distutils_enable_sphinx docs \
+	dev-python/sphinx_rtd_theme
+
+python_configure_all() {
+	# It's important that these flags are also passed during the install phase
+	# as well. Make sure of that if you change the lines below. See bug 661308.
+	mydistutilsargs=(
+		build_ext
+		--disable-platform-guessing
+		$(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 xcb)
+		$(use_enable zlib)
+	)
+
+	# setup.py sucks at adding the right toolchain paths but it does
+	# accept additional ones from INCLUDE and LIB so set these. You
+	# wouldn't normally need these at all as the toolchain should look
+	# here anyway but this setup.py does stupid things.
+	export \
+		INCLUDE=${ESYSROOT}/usr/include \
+		LIB=${ESYSROOT}/usr/$(get_libdir)
+
+	# We have patched in this env var.
+	tc-export PKG_CONFIG
+}
+
+src_test() {
+	virtx distutils-r1_src_test
+}
+
+python_test() {
+	"${EPYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}"
+	# no:relaxed: pytest-relaxed plugin make our tests fail. deactivate if installed
+	pytest -vv -p no:relaxed || die "Tests fail with ${EPYTHON}"
+}
+
+python_install() {
+	python_doheader src/libImaging/*.h
+	distutils-r1_python_install
+}
+
+python_install_all() {
+	if use examples ; then
+		docinto example
+		dodoc docs/example/*
+		docompress -x /usr/share/doc/${PF}/example
+	fi
+	distutils-r1_python_install_all
+}
diff --git a/metadata/md5-cache/dev-python/pillow-3.4.2-r1 b/metadata/md5-cache/dev-python/pillow-3.4.2-r1
deleted file mode 100644
index d5084ff..0000000
--- a/metadata/md5-cache/dev-python/pillow-3.4.2-r1
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFINED_PHASES=compile configure install prepare test
-DEPEND=jpeg? ( virtual/jpeg:0 ) jpeg2k? ( media-libs/openjpeg:2= ) lcms? ( media-libs/lcms:2= ) tiff? ( media-libs/tiff:0= ) truetype? ( media-libs/freetype:2= ) webp? ( media-libs/libwebp:0= ) zlib? ( sys-libs/zlib:0= ) app-arch/unzip dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] doc? ( dev-python/sphinx[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] dev-python/sphinx-better-theme[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] >=dev-python/sphinx_rtd_theme-0.1[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] <dev-python/sphinx_rtd_theme-0.2[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] ) test? ( dev-python/nose[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[tk?,threads(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[tk?,threads(+)] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] dev-python/setuptools[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)] test? ( !prefix? ( x11-base/xorg-server ) x11-apps/xhost )
-DESCRIPTION=Python Imaging Library (fork)
-EAPI=6
-HOMEPAGE=https://github.com/python-imaging/Pillow https://pypi.org/project/Pillow/
-IUSE=doc examples jpeg jpeg2k lcms test tiff tk truetype webp zlib python_targets_python2_7 python_targets_python3_6 test
-KEYWORDS=*
-LICENSE=HPND
-RDEPEND=jpeg? ( virtual/jpeg:0 ) jpeg2k? ( media-libs/openjpeg:2= ) lcms? ( media-libs/lcms:2= ) tiff? ( media-libs/tiff:0= ) truetype? ( media-libs/freetype:2= ) webp? ( media-libs/libwebp:0= ) zlib? ( sys-libs/zlib:0= ) python_targets_python2_7? ( >=dev-lang/python-2.7.5-r2:2.7[tk?,threads(+)] ) python_targets_python3_6? ( dev-lang/python:3.6[tk?,threads(+)] ) >=dev-lang/python-exec-2:=[python_targets_python2_7(-)?,python_targets_python3_6(-)?,-python_single_target_python2_7(-),-python_single_target_python3_6(-)]
-REQUIRED_USE=test? ( jpeg tiff ) || ( python_targets_python2_7 python_targets_python3_6 )
-SLOT=0
-SRC_URI=mirror://pypi/P/Pillow/Pillow-3.4.2.zip
-_eclasses_=distutils-r1	198e3b9ddb55ae36b2a50b07ca2877ef	eutils	06133990e861be0fe60c2b428fd025d9	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multiprocessing	e32940a7b2a9992ad217eccddb84d548	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	virtualx	e9162f65645513120b4e12863a5fa972	xdg-utils	ff2ff954e6b17929574eee4efc5152ba
-_md5_=8a7aee8f3e23ec792ce1c005789444af
diff --git a/metadata/md5-cache/dev-python/pillow-7.2.0 b/metadata/md5-cache/dev-python/pillow-7.2.0
new file mode 100644
index 0000000..a6f65b2
--- /dev/null
+++ b/metadata/md5-cache/dev-python/pillow-7.2.0
@@ -0,0 +1,16 @@
+BDEPEND=doc? ( || ( ( dev-lang/python:3.9[tk?,threads(+)] dev-python/sphinx[python_targets_python3_9(-),python_single_target_python3_9(+)] dev-python/sphinx_rtd_theme[python_targets_python3_9(-),python_single_target_python3_9(+)] ) ( dev-lang/python:3.8[tk?,threads(+)] dev-python/sphinx[python_targets_python3_8(-),python_single_target_python3_8(+)] dev-python/sphinx_rtd_theme[python_targets_python3_8(-),python_single_target_python3_8(+)] ) ( dev-lang/python:3.7[tk?,threads(+)] dev-python/sphinx[python_targets_python3_7(-),python_single_target_python3_7(+)] dev-python/sphinx_rtd_theme[python_targets_python3_7(-),python_single_target_python3_7(+)] ) ( dev-lang/python:3.6[tk?,threads(+)] dev-python/sphinx[python_targets_python3_6(-),python_single_target_python3_6(+)] dev-python/sphinx_rtd_theme[python_targets_python3_6(-),python_single_target_python3_6(+)] ) ) ) python_targets_python3_6? ( dev-lang/python:3.6[tk?,threads(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[tk?,threads(+)] ) python_targets_python3_8? ( dev-lang/python:3.8[tk?,threads(+)] ) python_targets_python3_9? ( dev-lang/python:3.9[tk?,threads(+)] ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] dev-python/setuptools[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+DEFINED_PHASES=compile configure install prepare test
+DEPEND=dev-python/olefile[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] imagequant? ( media-gfx/libimagequant:0 ) jpeg? ( virtual/jpeg:0 ) jpeg2k? ( media-libs/openjpeg:2= ) lcms? ( media-libs/lcms:2= ) tiff? ( media-libs/tiff:0=[jpeg,zlib] ) truetype? ( media-libs/freetype:2= ) webp? ( media-libs/libwebp:0= ) xcb? ( x11-libs/libxcb ) zlib? ( sys-libs/zlib:0= ) dev-python/setuptools[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] test? ( dev-python/pytest[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] media-gfx/imagemagick[png] ) test? ( !prefix? ( x11-base/xorg-server ) x11-apps/xhost )
+DESCRIPTION=Python Imaging Library (fork)
+EAPI=7
+HOMEPAGE=https://python-pillow.org/
+IUSE=examples imagequant jpeg jpeg2k lcms test tiff tk truetype webp xcb zlib doc python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9 test
+KEYWORDS=*
+LICENSE=HPND
+RDEPEND=dev-python/olefile[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)] imagequant? ( media-gfx/libimagequant:0 ) jpeg? ( virtual/jpeg:0 ) jpeg2k? ( media-libs/openjpeg:2= ) lcms? ( media-libs/lcms:2= ) tiff? ( media-libs/tiff:0=[jpeg,zlib] ) truetype? ( media-libs/freetype:2= ) webp? ( media-libs/libwebp:0= ) xcb? ( x11-libs/libxcb ) zlib? ( sys-libs/zlib:0= ) python_targets_python3_6? ( dev-lang/python:3.6[tk?,threads(+)] ) python_targets_python3_7? ( dev-lang/python:3.7[tk?,threads(+)] ) python_targets_python3_8? ( dev-lang/python:3.8[tk?,threads(+)] ) python_targets_python3_9? ( dev-lang/python:3.9[tk?,threads(+)] ) >=dev-lang/python-exec-2:=[python_targets_python3_6(-)?,python_targets_python3_7(-)?,python_targets_python3_8(-)?,python_targets_python3_9(-)?,-python_single_target_python3_6(-),-python_single_target_python3_7(-),-python_single_target_python3_8(-),-python_single_target_python3_9(-)]
+REQUIRED_USE=test? ( jpeg tiff ) || ( python_targets_python3_6 python_targets_python3_7 python_targets_python3_8 python_targets_python3_9 )
+RESTRICT=!test? ( test )
+SLOT=0
+SRC_URI=https://github.com/python-pillow/Pillow/archive/7.2.0.tar.gz -> pillow-7.2.0.tar.gz
+_eclasses_=distutils-r1	198e3b9ddb55ae36b2a50b07ca2877ef	multibuild	40fe59465edacd730c644ec2bc197809	multilib	2477ebe553d3e4d2c606191fe6c33602	multiprocessing	e32940a7b2a9992ad217eccddb84d548	python-r1	79e26ce8f853c9daebe9a4956e37cc1b	python-utils-r1	157a6a7a3e99c7dbdf81acc9dd4f57cd	toolchain-funcs	605c126bed8d87e4378d5ff1645330cb	virtualx	e9162f65645513120b4e12863a5fa972
+_md5_=513559ede4c101e4fe28cc2c84650d1d