summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/pillow
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/pillow')
-rw-r--r--dev-python/pillow/Manifest4
-rw-r--r--dev-python/pillow/files/imaging-1.1.7-no-xv.patch18
-rw-r--r--dev-python/pillow/files/pillow-2.0.0-delete_hardcoded_paths.patch178
-rw-r--r--dev-python/pillow/files/pillow-2.0.0-libm_linking.patch20
-rw-r--r--dev-python/pillow/files/pillow-2.8.1-ico-backport.patch36
-rw-r--r--dev-python/pillow/files/pillow-freetype-2.5.1.patch28
-rw-r--r--dev-python/pillow/metadata.xml12
-rw-r--r--dev-python/pillow/pillow-2.5.3-r1.ebuild109
-rw-r--r--dev-python/pillow/pillow-2.8.1.ebuild90
-rw-r--r--dev-python/pillow/pillow-2.8.2.ebuild90
-rw-r--r--dev-python/pillow/pillow-2.9.0.ebuild90
11 files changed, 675 insertions, 0 deletions
diff --git a/dev-python/pillow/Manifest b/dev-python/pillow/Manifest
new file mode 100644
index 000000000000..e5be260f342c
--- /dev/null
+++ b/dev-python/pillow/Manifest
@@ -0,0 +1,4 @@
+DIST Pillow-2.5.3.zip 6873222 SHA256 62ff6c6cb88d4a1d6e856315b1691186b06cb923f18fde86d6abac9eeb9096d1 SHA512 09d8cb9391f1627e01898eef15109ddd1deecc0bcd342f35e85b7cc0eacc61952ed8c297c460b858815d05ed9ab65c3674ef1c4b73d583ff37fd7eed7368af35 WHIRLPOOL 99f8bd559eaad619db872bb29673abd0073dc5e3f4f85056e51a4e59c5e85193de10934e4b725ef9b40af535c8dac7128debf441982fa3a2355411944d495527
+DIST Pillow-2.8.1.zip 9275663 SHA256 4363b52527c263e77f5b18c3dfffd15ae454edf0c4457197ecbe29863a651938 SHA512 75c0cfb53530549a2bac66cc3457747c239779233c64fe944fa661e7401acd915700e0dfd74e13c93d96afb9b50a112f09cbaea49205e83d8797e832a52534e4 WHIRLPOOL e71a39be415c2b83b7d554af7ad86652c08594c302344c919352a64ca48cfc7c1a88ca8dacccdacb283d8a42ad14cd3cb230c2900a9f11dc31ad20e203d6596d
+DIST Pillow-2.8.2.zip 9402887 SHA256 57a900c2f30e53ed054adad401ab69643d9ab21e3acb0a647749a168e4e24446 SHA512 2bc1e17cb65d5e953e30ea1606dbf79059d51f60ff5c2b000869fc2d9f93f8bbf5cf41b0147fc83974c48341cc68df6964d3d8203e0d6cc6a45ede95f3e0bc2f WHIRLPOOL 4b5ad1db34427a161ce1885a858df72e4aaffd61b5bf9010702803874f44391678d228f71777fca058f424c6ac6208e8c3d7421eeff88c42bb6df94d1d13d771
+DIST Pillow-2.9.0.zip 9612840 SHA256 d1db8dfed77547076037d589b598e04f2cbc1a7835d3d3f137bf20c8994854d5 SHA512 d06371fbe67eca66229cdec7896423f55c9335be50698168c7bf4f4635352454b2f946eae90b404c68d6b939ec1d7353916d32bc9964d5b8986b8098381d5180 WHIRLPOOL c664fec07c6634cad37791375fb1cb38b0edd542d93e099703dbc520e0d54125a1f00f205bbcdb8493df4dfd05ae1c2088ba305f23e66f0cc3e309f446c44fa5
diff --git a/dev-python/pillow/files/imaging-1.1.7-no-xv.patch b/dev-python/pillow/files/imaging-1.1.7-no-xv.patch
new file mode 100644
index 000000000000..1cbaf515bd4a
--- /dev/null
+++ b/dev-python/pillow/files/imaging-1.1.7-no-xv.patch
@@ -0,0 +1,18 @@
+--- PIL/ImageShow.py.old 2009-11-30 10:28:37.000000000 +0100
++++ PIL/ImageShow.py 2009-11-30 10:29:02.000000000 +0100
+@@ -149,13 +149,10 @@
+ def get_command_ex(self, file, title=None, **options):
+ # note: xv is pretty outdated. most modern systems have
+ # imagemagick's display command instead.
+- command = executable = "xv"
+- if title:
+- # FIXME: do full escaping
+- command = command + " -name \"%s\"" % title
++ command = executable = "xdg-open"
+ return command, executable
+
+- if which("xv"):
++ if which("xdg-open"):
+ register(XVViewer)
+
+ if __name__ == "__main__":
diff --git a/dev-python/pillow/files/pillow-2.0.0-delete_hardcoded_paths.patch b/dev-python/pillow/files/pillow-2.0.0-delete_hardcoded_paths.patch
new file mode 100644
index 000000000000..ed5bdca65cb3
--- /dev/null
+++ b/dev-python/pillow/files/pillow-2.0.0-delete_hardcoded_paths.patch
@@ -0,0 +1,178 @@
+--- setup.py
++++ setup.py
+@@ -56,11 +56,6 @@
+ return None
+
+
+-def _lib_include(root):
+- # map root to (root/lib, root/include)
+- return os.path.join(root, "lib"), os.path.join(root, "include")
+-
+-
+ def _read(file):
+ return open(file, 'rb').read()
+
+@@ -105,102 +100,17 @@
+ _add_directory(include_dirs, include_root)
+
+ #
+- # add platform directories
+-
+- if sys.platform == "cygwin":
+- # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory
+- _add_directory(library_dirs, os.path.join(
+- "/usr/lib", "python%s" % sys.version[:3], "config"))
+-
+- elif sys.platform == "darwin":
+- # attempt to make sure we pick freetype2 over other versions
+- _add_directory(include_dirs, "/sw/include/freetype2")
+- _add_directory(include_dirs, "/sw/lib/freetype2/include")
+- # fink installation directories
+- _add_directory(library_dirs, "/sw/lib")
+- _add_directory(include_dirs, "/sw/include")
+- # darwin ports installation directories
+- _add_directory(library_dirs, "/opt/local/lib")
+- _add_directory(include_dirs, "/opt/local/include")
+- # freetype2 ships with X11
+- _add_directory(library_dirs, "/usr/X11/lib")
+- _add_directory(include_dirs, "/usr/X11/include")
+-
+- elif sys.platform.startswith("linux"):
+- for platform_ in (platform.processor(),platform.architecture()[0]):
+- if not platform_: continue
+-
+- if platform_ in ["x86_64", "64bit"]:
+- _add_directory(library_dirs, "/lib64")
+- _add_directory(library_dirs, "/usr/lib64")
+- _add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu")
+- break
+- elif platform_ in ["i386", "i686", "32bit"]:
+- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
+- break
+- else:
+- raise ValueError("Unable to identify Linux platform: `%s`" % platform_)
+-
+- # XXX Kludge. Above /\ we brute force support multiarch. Here we
+- # try Barry's more general approach. Afterward, something should
+- # work ;-)
+- self.add_multiarch_paths()
+-
+- _add_directory(library_dirs, "/usr/local/lib")
+- # FIXME: check /opt/stuff directories here?
+-
+- prefix = sysconfig.get_config_var("prefix")
+- if prefix:
+- _add_directory(library_dirs, os.path.join(prefix, "lib"))
+- _add_directory(include_dirs, os.path.join(prefix, "include"))
+-
+- #
+ # locate tkinter libraries
+
+
+ if _tkinter:
+ TCL_VERSION = _tkinter.TCL_VERSION[:3]
+
+- if _tkinter and not TCL_ROOT:
+- # we have Tkinter but the TCL_ROOT variable was not set;
+- # try to locate appropriate Tcl/Tk libraries
+- PYVERSION = sys.version[0] + sys.version[2]
+- TCLVERSION = TCL_VERSION[0] + TCL_VERSION[2]
+- roots = [
+- # common installation directories, mostly for Windows
+- # (for Unix-style platforms, we'll check in well-known
+- # locations later)
+- os.path.join("/py" + PYVERSION, "Tcl"),
+- os.path.join("/python" + PYVERSION, "Tcl"),
+- "/Tcl", "/Tcl" + TCLVERSION, "/Tcl" + TCL_VERSION,
+- os.path.join(os.environ.get("ProgramFiles", ""), "Tcl"),
+- ]
+- for TCL_ROOT in roots:
+- TCL_ROOT = os.path.abspath(TCL_ROOT)
+- if os.path.isfile(os.path.join(TCL_ROOT, "include", "tk.h")):
+- # FIXME: use distutils logging (?)
+- print("--- using Tcl/Tk libraries at", TCL_ROOT)
+- print("--- using Tcl/Tk version", TCL_VERSION)
+- TCL_ROOT = _lib_include(TCL_ROOT)
+- break
+- else:
+- TCL_ROOT = None
+-
+
+ #
+ # add standard directories
+
+- # look for tcl specific subdirectory (e.g debian)
+- if _tkinter:
+- tcl_dir = "/usr/include/tcl" + TCL_VERSION
+- if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
+- _add_directory(include_dirs, tcl_dir)
+-
+ # standard locations
+- _add_directory(library_dirs, "/usr/local/lib")
+- _add_directory(include_dirs, "/usr/local/include")
+-
+- _add_directory(library_dirs, "/usr/lib")
+ _add_directory(include_dirs, "/usr/include")
+
+ #
+@@ -333,28 +243,7 @@
+ "_webp", ["_webp.c"], libraries=["webp"]))
+
+
+- if sys.platform == "darwin":
+- # locate Tcl/Tk frameworks
+- frameworks = []
+- framework_roots = [
+- "/Library/Frameworks",
+- "/System/Library/Frameworks"]
+- for root in framework_roots:
+- if (os.path.exists(os.path.join(root, "Tcl.framework")) and
+- os.path.exists(os.path.join(root, "Tk.framework"))):
+- print("--- using frameworks at %s" % root)
+- frameworks = ["-framework", "Tcl", "-framework", "Tk"]
+- dir = os.path.join(root, "Tcl.framework", "Headers")
+- _add_directory(self.compiler.include_dirs, dir, 0)
+- dir = os.path.join(root, "Tk.framework", "Headers")
+- _add_directory(self.compiler.include_dirs, dir, 1)
+- break
+- if frameworks:
+- exts.append(Extension(
+- "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"],
+- extra_compile_args=frameworks, extra_link_args=frameworks))
+- feature.tcl = feature.tk = 1 # mark as present
+- elif feature.tcl and feature.tk:
++ if feature.tcl and feature.tk:
+ exts.append(Extension(
+ "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"],
+ libraries=[feature.tcl, feature.tk]))
+@@ -445,30 +334,6 @@
+ if m.group(1) < "1.2.3":
+ return m.group(1)
+
+- # http://hg.python.org/users/barry/rev/7e8deab93d5a
+- def add_multiarch_paths(self):
+- # Debian/Ubuntu multiarch support.
+- # https://wiki.ubuntu.com/MultiarchSpec
+- # self.build_temp
+- tmpfile = os.path.join(self.build_temp, 'multiarch')
+- if not os.path.exists(self.build_temp):
+- os.makedirs(self.build_temp)
+- ret = os.system('dpkg-architecture -qDEB_HOST_MULTIARCH > %s' %
+- tmpfile)
+- ret = os.system(
+- 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
+- tmpfile)
+- try:
+- if ret >> 8 == 0:
+- fp = open(tmpfile, 'r')
+- multiarch_path_component = fp.readline().strip()
+- _add_directory(self.compiler.library_dirs,
+- '/usr/lib/' + multiarch_path_component)
+- _add_directory(self.compiler.include_dirs,
+- '/usr/include/' + multiarch_path_component)
+- finally:
+- os.unlink(tmpfile)
+-
+ setup(
+ name=NAME,
+ version=VERSION,
diff --git a/dev-python/pillow/files/pillow-2.0.0-libm_linking.patch b/dev-python/pillow/files/pillow-2.0.0-libm_linking.patch
new file mode 100644
index 000000000000..35d1df5a406b
--- /dev/null
+++ b/dev-python/pillow/files/pillow-2.0.0-libm_linking.patch
@@ -0,0 +1,20 @@
+--- setup.py
++++ setup.py
+@@ -197,7 +197,7 @@
+ for file in _LIB_IMAGING:
+ files.append(os.path.join("libImaging", file + ".c"))
+
+- libs = []
++ libs = ["m"]
+ defs = []
+ if feature.jpeg:
+ libs.append(feature.jpeg)
+@@ -249,7 +249,7 @@
+ libraries=[feature.tcl, feature.tk]))
+
+ if os.path.isfile("_imagingmath.c"):
+- exts.append(Extension("_imagingmath", ["_imagingmath.c"]))
++ exts.append(Extension("_imagingmath", ["_imagingmath.c"], libraries=["m"]))
+
+ self.extensions[:] = exts
+
diff --git a/dev-python/pillow/files/pillow-2.8.1-ico-backport.patch b/dev-python/pillow/files/pillow-2.8.1-ico-backport.patch
new file mode 100644
index 000000000000..a4214f332ee9
--- /dev/null
+++ b/dev-python/pillow/files/pillow-2.8.1-ico-backport.patch
@@ -0,0 +1,36 @@
+ PIL/IcoImagePlugin.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/PIL/IcoImagePlugin.py b/PIL/IcoImagePlugin.py
+index b4817db..dff4efc 100644
+--- a/PIL/IcoImagePlugin.py
++++ b/PIL/IcoImagePlugin.py
+@@ -49,7 +49,7 @@ def _save(im, fp, filename):
+ filter(lambda x: False if (x[0] > width or x[1] > height or
+ x[0] > 255 or x[1] > 255) else True, sizes)
+ sizes = sorted(sizes, key=lambda x: x[0])
+- fp.write(struct.pack("H", len(sizes))) # idCount(2)
++ fp.write(struct.pack("<H", len(sizes))) # idCount(2)
+ offset = fp.tell() + len(sizes)*16
+ for size in sizes:
+ width, height = size
+@@ -58,7 +58,7 @@ def _save(im, fp, filename):
+ fp.write(b"\0") # bColorCount(1)
+ fp.write(b"\0") # bReserved(1)
+ fp.write(b"\0\0") # wPlanes(2)
+- fp.write(struct.pack("H", 32)) # wBitCount(2)
++ fp.write(struct.pack("<H", 32)) # wBitCount(2)
+
+ image_io = BytesIO()
+ tmp = im.copy()
+@@ -67,8 +67,8 @@ def _save(im, fp, filename):
+ image_io.seek(0)
+ image_bytes = image_io.read()
+ bytes_len = len(image_bytes)
+- fp.write(struct.pack("I", bytes_len)) # dwBytesInRes(4)
+- fp.write(struct.pack("I", offset)) # dwImageOffset(4)
++ fp.write(struct.pack("<I", bytes_len)) # dwBytesInRes(4)
++ fp.write(struct.pack("<I", offset)) # dwImageOffset(4)
+ current = fp.tell()
+ fp.seek(offset)
+ fp.write(image_bytes)
diff --git a/dev-python/pillow/files/pillow-freetype-2.5.1.patch b/dev-python/pillow/files/pillow-freetype-2.5.1.patch
new file mode 100644
index 000000000000..5e949e4f241a
--- /dev/null
+++ b/dev-python/pillow/files/pillow-freetype-2.5.1.patch
@@ -0,0 +1,28 @@
+From c6040f618d8f2706a7b46d1cdf37d1a587f9701f Mon Sep 17 00:00:00 2001
+From: Andrew Stromnov <stromnov@gmail.com>
+Date: Thu, 28 Nov 2013 16:58:43 +0400
+Subject: [PATCH] fix compiling with FreeType 2.5.1
+
+---
+ _imagingft.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/_imagingft.c b/_imagingft.c
+index 47d50bd..f19555b 100644
+--- a/_imagingft.c
++++ b/_imagingft.c
+@@ -59,7 +59,11 @@ struct {
+ const char* message;
+ } ft_errors[] =
+
++#if defined(USE_FREETYPE_2_1)
++#include FT_ERRORS_H
++#else
+ #include <freetype/fterrors.h>
++#endif
+
+ /* -------------------------------------------------------------------- */
+ /* font objects */
+--
+1.8.5.1
+
diff --git a/dev-python/pillow/metadata.xml b/dev-python/pillow/metadata.xml
new file mode 100644
index 000000000000..848581db03a4
--- /dev/null
+++ b/dev-python/pillow/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <use>
+ <flag name="webp">Enable support for webp image format.</flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">Pillow</remote-id>
+ <remote-id type="github">python-imaging/Pillow</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-python/pillow/pillow-2.5.3-r1.ebuild b/dev-python/pillow/pillow-2.5.3-r1.ebuild
new file mode 100644
index 000000000000..23478dfcdb92
--- /dev/null
+++ b/dev-python/pillow/pillow-2.5.3-r1.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy )
+PYTHON_REQ_USE='tk?'
+
+inherit distutils-r1 eutils
+
+MY_PN=Pillow
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python Imaging Library (fork)"
+HOMEPAGE="https://github.com/python-imaging/Pillow https://pypi.python.org/pypi/Pillow"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="doc examples jpeg jpeg2k lcms scanner test tiff tk truetype webp zlib"
+REQUIRED_USE="test? ( jpeg )"
+
+RDEPEND="
+ truetype? ( media-libs/freetype:2= )
+ jpeg? ( virtual/jpeg:0 )
+ jpeg2k? ( media-libs/openjpeg:2= )
+ lcms? ( media-libs/lcms:2= )
+ scanner? ( media-gfx/sane-backends:0= )
+ tiff? ( media-libs/tiff:0= )
+ webp? ( media-libs/libwebp:0= )
+ zlib? ( sys-libs/zlib:0= )"
+DEPEND="${RDEPEND}
+ app-arch/unzip
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? (
+ dev-python/sphinx
+ dev-python/sphinx-better-theme
+ )"
+RDEPEND+=" !dev-python/imaging"
+
+S="${WORKDIR}/${MY_P}"
+
+# See _render and _clean in Tests/test_imagefont.py
+DISTUTILS_IN_SOURCE_BUILD=1
+
+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
+
+ distutils-r1_python_prepare_all
+}
+
+# XXX: split into two ebuilds?
+wrap_phase() {
+ "${@}"
+
+ if use scanner; then
+ cd Sane || die
+ "${@}"
+ fi
+}
+
+python_compile() {
+ wrap_phase distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use doc && emake -C docs html
+}
+
+python_test() {
+ "${PYTHON}" selftest.py --installed || die "selftest failed with ${EPYTHON}"
+ nosetests -v Tests/test_*.py || die "Testing failed with ${EPYTHON}"
+}
+
+python_install() {
+ python_doheader libImaging/{Imaging.h,ImPlatform.h}
+
+ wrap_phase distutils-r1_python_install
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ use examples && local EXAMPLES=( Scripts/. )
+
+ distutils-r1_python_install_all
+
+ if use scanner; then
+ docinto sane
+ dodoc Sane/{CHANGES,README.rst,sanedoc.txt}
+ fi
+
+ if use examples && use scanner; then
+ docinto examples/sane
+ dodoc Sane/demo_*.py
+ fi
+}
diff --git a/dev-python/pillow/pillow-2.8.1.ebuild b/dev-python/pillow/pillow-2.8.1.ebuild
new file mode 100644
index 000000000000..a8764f99d7b8
--- /dev/null
+++ b/dev-python/pillow/pillow-2.8.1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} pypy )
+PYTHON_REQ_USE='tk?'
+
+inherit distutils-r1 eutils
+
+MY_PN=Pillow
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python Imaging Library (fork)"
+HOMEPAGE="https://github.com/python-imaging/Pillow https://pypi.python.org/pypi/Pillow"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="doc examples jpeg jpeg2k lcms test tiff tk truetype webp zlib"
+
+REQUIRED_USE="test? ( jpeg )"
+
+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}]
+ )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+ "
+RDEPEND+=" !dev-python/imaging"
+
+S="${WORKDIR}/${MY_P}"
+
+# See _render and _clean in Tests/test_imagefont.py
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=( "${FILESDIR}"/${P}-ico-backport.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
+
+ 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}"
+ nosetests -vx Tests/test_*.py || die "Testing failed with ${EPYTHON}"
+}
+
+python_install() {
+ python_doheader libImaging/{Imaging.h,ImPlatform.h}
+
+ distutils-r1_python_install
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ use examples && local EXAMPLES=( Scripts/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pillow/pillow-2.8.2.ebuild b/dev-python/pillow/pillow-2.8.2.ebuild
new file mode 100644
index 000000000000..4d30a97cbaa0
--- /dev/null
+++ b/dev-python/pillow/pillow-2.8.2.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} pypy )
+PYTHON_REQ_USE='tk?'
+
+inherit distutils-r1 eutils
+
+MY_PN=Pillow
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python Imaging Library (fork)"
+HOMEPAGE="https://github.com/python-imaging/Pillow https://pypi.python.org/pypi/Pillow"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="doc examples jpeg jpeg2k lcms test tiff tk truetype webp zlib"
+
+REQUIRED_USE="test? ( jpeg )"
+
+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}]
+ )
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+ "
+RDEPEND+=" !dev-python/imaging"
+
+S="${WORKDIR}/${MY_P}"
+
+# See _render and _clean in Tests/test_imagefont.py
+DISTUTILS_IN_SOURCE_BUILD=1
+
+PATCHES=( "${FILESDIR}"/${PN}-2.8.1-ico-backport.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
+
+ 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}"
+ nosetests -vx Tests/test_*.py || die "Testing failed with ${EPYTHON}"
+}
+
+python_install() {
+ python_doheader libImaging/{Imaging.h,ImPlatform.h}
+
+ distutils-r1_python_install
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ use examples && local EXAMPLES=( Scripts/. )
+
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/pillow/pillow-2.9.0.ebuild b/dev-python/pillow/pillow-2.9.0.ebuild
new file mode 100644
index 000000000000..a5e8507fe090
--- /dev/null
+++ b/dev-python/pillow/pillow-2.9.0.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} pypy )
+PYTHON_REQ_USE='tk?'
+
+inherit distutils-r1 eutils
+
+MY_PN=Pillow
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python Imaging Library (fork)"
+HOMEPAGE="https://github.com/python-imaging/Pillow https://pypi.python.org/pypi/Pillow"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
+
+LICENSE="HPND"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x86-solaris"
+IUSE="doc examples jpeg jpeg2k lcms test tiff tk truetype webp zlib"
+
+REQUIRED_USE="test? ( jpeg )"
+
+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}] )
+ "
+RDEPEND+=" !dev-python/imaging"
+
+S="${WORKDIR}/${MY_P}"
+
+# See _render and _clean in Tests/test_imagefont.py
+DISTUTILS_IN_SOURCE_BUILD=1
+
+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
+
+ 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}"
+ nosetests -vx Tests/test_*.py || die "Testing failed with ${EPYTHON}"
+}
+
+python_install() {
+ python_doheader libImaging/{Imaging.h,ImPlatform.h}
+
+ distutils-r1_python_install
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( docs/_build/html/. )
+ use examples && local EXAMPLES=( Scripts/. )
+
+ distutils-r1_python_install_all
+}