1 |
commit: 757121ce5abed563609610918426879c3235f60a |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 21 12:18:59 2019 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 21 12:18:59 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=757121ce |
7 |
|
8 |
dev-python/reportlab: Add patch for >=pillow-6 |
9 |
|
10 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
.../files/reportlab-3.5.13-pillow-VERSION.patch | 17 +++++++++++++++++ |
14 |
...portlab-3.5.13.ebuild => reportlab-3.5.13-r1.ebuild} | 1 + |
15 |
2 files changed, 18 insertions(+) |
16 |
|
17 |
diff --git a/dev-python/reportlab/files/reportlab-3.5.13-pillow-VERSION.patch b/dev-python/reportlab/files/reportlab-3.5.13-pillow-VERSION.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..3b2093d9a8c |
20 |
--- /dev/null |
21 |
+++ b/dev-python/reportlab/files/reportlab-3.5.13-pillow-VERSION.patch |
22 |
@@ -0,0 +1,17 @@ |
23 |
+--- a/src/reportlab/lib/utils.py |
24 |
++++ b/src/reportlab/lib/utils.py |
25 |
+@@ -883,7 +883,13 @@ |
26 |
+ im = self._image |
27 |
+ mode = self.mode = im.mode |
28 |
+ if mode in ('LA','RGBA'): |
29 |
+- if Image.VERSION.startswith('1.1.7'): im.load() |
30 |
++ # Pillow 6.0.0 and above have removed the 'VERSION' attribute |
31 |
++ # https://bitbucket.org/rptlab/reportlab/issues/176/incompatibility-with-pillow-600 |
32 |
++ try: |
33 |
++ im_ver = Image.__version__ |
34 |
++ except AttributeError: |
35 |
++ im_ver = Image.VERSION |
36 |
++ if im_ver.startswith('1.1.7'): im.load() |
37 |
+ self._dataA = ImageReader(im.split()[3 if mode=='RGBA' else 1]) |
38 |
+ nm = mode[:-1] |
39 |
+ im = im.convert(nm) |
40 |
|
41 |
diff --git a/dev-python/reportlab/reportlab-3.5.13.ebuild b/dev-python/reportlab/reportlab-3.5.13-r1.ebuild |
42 |
similarity index 96% |
43 |
rename from dev-python/reportlab/reportlab-3.5.13.ebuild |
44 |
rename to dev-python/reportlab/reportlab-3.5.13-r1.ebuild |
45 |
index 26d754790dd..77800e21ecc 100644 |
46 |
--- a/dev-python/reportlab/reportlab-3.5.13.ebuild |
47 |
+++ b/dev-python/reportlab/reportlab-3.5.13-r1.ebuild |
48 |
@@ -29,6 +29,7 @@ DEPEND="${RDEPEND} |
49 |
|
50 |
PATCHES=( |
51 |
"${FILESDIR}/${PN}-3.5.13-disable-network-tests.patch" |
52 |
+ "${FILESDIR}/${PN}-3.5.13-pillow-VERSION.patch" |
53 |
) |
54 |
|
55 |
src_unpack() { |