From 98c429c6576e6b04b49e4a5745eb9513f950e922 Mon Sep 17 00:00:00 2001 From: Sandro Mani Date: Wed, 2 Oct 2013 21:44:07 +0200 Subject: [PATCH] Update to 2.2.1 --- .gitignore | 1 + python-pillow.spec | 22 +++++++++------------ python-pillow_bytearray.patch | 37 ----------------------------------- python-pillow_tupleargs.patch | 12 ------------ sources | 2 +- 5 files changed, 11 insertions(+), 63 deletions(-) delete mode 100644 python-pillow_bytearray.patch delete mode 100644 python-pillow_tupleargs.patch diff --git a/.gitignore b/.gitignore index a38fb11..7cb5a57 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /python-imaging-Pillow-2.0.0-58-g93a488e.tar.gz /python-imaging-Pillow-2.0.0-105-gd1c6db8.tar.gz /python-imaging-Pillow-2.1.0-0-g75af7e0.tar.gz +/python-imaging-Pillow-2.2.1-0-g3c2496e.tar.gz diff --git a/python-pillow.spec b/python-pillow.spec index b110ec2..97c8167 100644 --- a/python-pillow.spec +++ b/python-pillow.spec @@ -14,7 +14,7 @@ # Refer to the comment for Source0 below on how to obtain the source tarball # The saved file has format python-imaging-Pillow-$version-$ahead-g$shortcommit.tar.gz -%global commit 75af7e00db304ed34557c856c609d10ecf44d49c +%global commit 3c2496e117f4d045a99d7e376133e67b47217ce2 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global ahead 0 @@ -24,8 +24,8 @@ %endif Name: python-pillow -Version: 2.1.0 -Release: 4%{?snap}%{?dist} +Version: 2.2.1 +Release: 1%{?snap}%{?dist} Summary: Python image processing library # License: see http://www.pythonware.com/products/pil/license.htm @@ -38,10 +38,6 @@ Source0: https://github.com/python-imaging/Pillow/tarball/%{commit}/pytho # Add s390* and ppc* archs Patch0: python-pillow-archs.patch -# Fix memory corruption caused by incorrect palette size -Patch1: python-pillow_bytearray.patch -# Fix incorrect PyArg_ParseTuple -Patch2: python-pillow_tupleargs.patch BuildRequires: python2-devel BuildRequires: python-setuptools @@ -53,10 +49,8 @@ BuildRequires: zlib-devel BuildRequires: freetype-devel BuildRequires: lcms-devel BuildRequires: sane-backends-devel -# Don't build with webp support on s390* archs -# see bug #962091 (s390*) -# see bug #988767 (ppc*) -%ifnarch s390 s390x ppc %{power64} +# Don't build with webp support on s390* archs, see bug #962091 (s390*) +%ifnarch s390 s390x BuildRequires: libwebp-devel %endif BuildRequires: PyQt4 @@ -211,8 +205,6 @@ PIL image wrapper for Qt. %prep %setup -q -n python-imaging-Pillow-%{shortcommit} %patch0 -p1 -b .archs -%patch1 -p1 -b .bytes -%patch2 -p1 -b .tupleargs %if %{with_python3} # Create Python 3 source tree @@ -364,6 +356,10 @@ popd %endif %changelog +* Wed Oct 02 2013 Sandro Mani - 2.2.1-1 +- Update to 2.2.1 +- Really enable webp on ppc, but leave disabled on s390 + * Thu Aug 29 2013 Sandro Mani - 2.1.0-4 - Add patch to fix incorrect PyArg_ParseTuple tuple signature, fixes rhbz#962091 and rhbz#988767. - Renable webp support on bigendian arches diff --git a/python-pillow_bytearray.patch b/python-pillow_bytearray.patch deleted file mode 100644 index 1b8d2f0..0000000 --- a/python-pillow_bytearray.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/PIL/Image.py b/PIL/Image.py -index cafc5a2..794ee49 100644 ---- a/PIL/Image.py -+++ b/PIL/Image.py -@@ -718,7 +718,7 @@ class Image: - if self.mode == "L" and mode == "RGBA" and "transparency" in self.info: - from PIL import ImagePalette - self.mode = "P" -- bytePalette = bytes([i//3 for i in range(768)]) -+ bytePalette = bytes(bytearray([i//3 for i in range(768)])) - self.palette = ImagePalette.raw("RGB", bytePalette) - self.palette.dirty = 1 - self.load() -diff --git a/_imaging.c b/_imaging.c -index 2ee7eef..6ec7346 100644 ---- a/_imaging.c -+++ b/_imaging.c -@@ -286,6 +286,7 @@ static const char* wrong_mode = "unrecognized image mode"; - static const char* wrong_raw_mode = "unrecognized raw mode"; - static const char* outside_image = "image index out of range"; - static const char* outside_palette = "palette index out of range"; -+static const char* wrong_palette_size = "invalid palette size"; - static const char* no_palette = "image has no palette"; - static const char* readonly = "image is readonly"; - /* static const char* no_content = "image has no content"; */ -@@ -1412,6 +1413,11 @@ _putpalette(ImagingObject* self, PyObject* args) - return NULL; - } - -+ if ( palettesize * 8 / bits > 256) { -+ PyErr_SetString(PyExc_ValueError, wrong_palette_size); -+ return NULL; -+ } -+ - ImagingPaletteDelete(self->image->palette); - - strcpy(self->image->mode, "P"); diff --git a/python-pillow_tupleargs.patch b/python-pillow_tupleargs.patch deleted file mode 100644 index 4612115..0000000 --- a/python-pillow_tupleargs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -rupN python-imaging-Pillow-75af7e0/_webp.c python-imaging-Pillow-75af7e0-new/_webp.c ---- python-imaging-Pillow-75af7e0/_webp.c 2013-07-02 14:52:49.000000000 +0200 -+++ python-imaging-Pillow-75af7e0-new/_webp.c 2013-08-29 13:03:34.558822782 +0200 -@@ -17,7 +17,7 @@ PyObject* WebPEncode_wrapper(PyObject* s - Py_ssize_t size; - size_t ret_size; - -- if (!PyArg_ParseTuple(args, "s#nifs",(char**)&rgb, &size, &width, &height, &quality_factor, &mode)) { -+ if (!PyArg_ParseTuple(args, "s#iifs",(char**)&rgb, &size, &width, &height, &quality_factor, &mode)) { - Py_RETURN_NONE; - } - diff --git a/sources b/sources index 3ae66f5..362a6ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d6679b1db8370bca59304caf005d8791 python-imaging-Pillow-2.1.0-0-g75af7e0.tar.gz +6ab6a72b1b4350fa8dac454e7c5ad9b0 python-imaging-Pillow-2.2.1-0-g3c2496e.tar.gz