Changeset from: scop
Update of /cvs/extras/rpms/python-imaging/devel
In directory cvs.fedora.redhat.com:/tmp/cvs-serv10328
Modified Files:
python-imaging.spec
Added Files:
python-imaging-build.patch python-imaging-ft2.patch
python-imaging-giftrans.patch python-imaging-no-rexec.patch
python-imaging-no-xv.patch python-imaging-olefileio.patch
python-imaging-png.patch
Log Message:
Sync with fedora.us 1.1.4-0.fdr.6.
python-imaging-build.patch:
--- NEW FILE python-imaging-build.patch ---
diff -Naru Imaging-1.1.4.orig/libImaging/Makefile.in Imaging-1.1.4/libImaging/Makefile.in
--- Imaging-1.1.4.orig/libImaging/Makefile.in 2003-04-22 19:11:26.000000000 +0300
+++ Imaging-1.1.4/libImaging/Makefile.in 2004-10-09 21:15:49.416221082 +0300
@@ -30,10 +30,9 @@
# Other things that are customizable but not by configure
INCLDIR= $(srcdir)/.
-JPEGINCLUDE= /usr/local/include
OPT= @OPT@
#OPT= -g
-CFLAGS= $(OPT) -I$(INCLDIR) -I$(JPEGINCLUDE) $(DEFS)
+CFLAGS= $(RPM_OPT_FLAGS) -I. -I$(INCLDIR) $(DEFS)
MKDEP= mkdep
SHELL= /bin/sh
python-imaging-ft2.patch:
--- NEW FILE python-imaging-ft2.patch ---
diff -Naru Imaging-1.1.4.orig/_imagingft.c Imaging-1.1.4/_imagingft.c
--- Imaging-1.1.4.orig/_imagingft.c 2003-04-22 19:11:25.000000000 +0300
+++ Imaging-1.1.4/_imagingft.c 2004-10-09 21:16:23.446131359 +0300
@@ -15,7 +15,8 @@
#include "Python.h"
#include "Imaging.h"
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
#if PY_VERSION_HEX < 0x01060000
#define PyObject_DEL(op) PyMem_DEL((op))
python-imaging-giftrans.patch:
--- NEW FILE python-imaging-giftrans.patch ---
See
http://bugs.debian.org/159693
diff -Naru Imaging-1.1.4.orig/PIL/GifImagePlugin.py Imaging-1.1.4/PIL/GifImagePlugin.py
--- Imaging-1.1.4.orig/PIL/GifImagePlugin.py 2003-05-06 23:44:16.000000000 +0300
+++ Imaging-1.1.4/PIL/GifImagePlugin.py 2004-10-09 21:12:12.635957206 +0300
@@ -346,6 +346,11 @@
for i in range(maxcolor):
s.append(chr(i) * 3)
+ if im.info.has_key('transparency'):
+ transparentIndex = im.info['transparency']
+ s.append('!' + chr(0xf9) + chr(4) + chr(1) + chr(0) + chr(0) +
+ chr(transparentIndex) + chr(0))
+
return s
def getdata(im, offset = (0, 0), **params):
python-imaging-no-rexec.patch:
--- NEW FILE python-imaging-no-rexec.patch ---
See
http://bugs.debian.org/182149
diff -Naru Imaging-1.1.4.orig/PIL/ArgImagePlugin.py Imaging-1.1.4/PIL/ArgImagePlugin.py
--- Imaging-1.1.4.orig/PIL/ArgImagePlugin.py 2003-05-06 23:44:16.000000000 +0300
+++ Imaging-1.1.4/PIL/ArgImagePlugin.py 2004-10-09 21:13:08.083849091 +0300
@@ -19,7 +19,7 @@
__version__ = "0.3"
-import marshal, rexec, string
+import marshal, string
import Image, ImageFile, ImagePalette
@@ -457,12 +457,10 @@
def __applet(self, code):
- if not APPLET_HOOK:
+ if 1: # not APPLET_HOOK:
return
# run script in safe environment
- safe = rexec.RExec()
- safe.r_exec(code)
# must convert images to Image object form
images = {}
python-imaging-no-xv.patch:
--- NEW FILE python-imaging-no-xv.patch ---
diff -Naru Imaging-1.1.4.orig/PIL/Image.py Imaging-1.1.4/PIL/Image.py
--- Imaging-1.1.4.orig/PIL/Image.py 2003-05-08 23:48:47.000000000 +0300
+++ Imaging-1.1.4/PIL/Image.py 2004-10-09 21:11:16.547285512 +0300
@@ -1722,9 +1722,7 @@
else:
format = None
if not command:
- command = "xv"
- if title:
- command = command + " -name \"%s\"" % title
+ command = "eog"
if self.mode == "I;16":
# @PIL88 @PIL101
python-imaging-olefileio.patch:
--- NEW FILE python-imaging-olefileio.patch ---
See
http://bugs.debian.org/197165
diff -Naru Imaging-1.1.4.orig/PIL/OleFileIO.py Imaging-1.1.4/PIL/OleFileIO.py
--- Imaging-1.1.4.orig/PIL/OleFileIO.py 2003-04-26 14:50:24.000000000 +0300
+++ Imaging-1.1.4/PIL/OleFileIO.py 2004-10-09 21:14:58.156932792 +0300
@@ -295,7 +295,7 @@
fat = []
for i in range(0, len(sect), 4):
ix = i32(sect, i)
- if ix == 0xFFFFFFFEL or x == 0xFFFFFFFFL:
+ if ix == 0xFFFFFFFEL or ix == 0xFFFFFFFFL:
break
s = self.getsect(ix)
fat = fat + map(lambda i, s=s: i32(s, i), range(0, len(s), 4))
python-imaging-png.patch:
--- NEW FILE python-imaging-png.patch ---
See
http://bugs.debian.org/211712
diff -Naru Imaging-1.1.4.orig/PIL/PngImagePlugin.py Imaging-1.1.4/PIL/PngImagePlugin.py
--- Imaging-1.1.4.orig/PIL/PngImagePlugin.py 2003-05-06 23:44:17.000000000 +0300
+++ Imaging-1.1.4/PIL/PngImagePlugin.py 2004-10-09 21:14:03.843649797 +0300
@@ -206,8 +206,9 @@
# text
s = self.fp.read(len)
- [k, v] = string.split(s, "\0")
- self.im_info[k] = v
+ if "\0" in s:
+ [k, v] = string.split(s, "\0", 1)
+ self.im_info[k] = v
return s
Index: python-imaging.spec
===================================================================
RCS file: /cvs/extras/rpms/python-imaging/devel/python-imaging.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- python-imaging.spec 8 Nov 2004 05:15:21 -0000 1.1
+++ python-imaging.spec 4 Dec 2004 13:34:07 -0000 1.2
@@ -1,17 +1,27 @@
-%define project fdr
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%define pyver %(%{__python} -c "import sys ; print sys.version[:3]")
+%define py_incdir %{_includedir}/python%{pyver}
Summary: Python's own image processing library
Name: python-imaging
Epoch: 0
Version: 1.1.4
-Release: 0.%{project}.4.rh90
+Release: 6
License: Distributable
Group: Development/Languages
Source0:
http://effbot.org/downloads/Imaging-1.1.4.tar.gz
+Patch0: %{name}-ft2.patch
+Patch1: %{name}-build.patch
+Patch2: %{name}-no-xv.patch
+Patch3: %{name}-olefileio.patch
+Patch4: %{name}-png.patch
+Patch5: %{name}-no-rexec.patch
+Patch6: %{name}-giftrans.patch
URL:
http://www.pythonware.com/products/pil/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildRequires: python, python-devel, libjpeg-devel, zlib-devel, XFree86-devel, tkinter
-Requires: python
+BuildRequires: python-devel, libjpeg-devel, zlib-devel, XFree86-devel
+BuildRequires: tkinter, %{_includedir}/tcl.h, %{_includedir}/tk.h
+Requires: python-abi = %{pyver}
%description
Python Imaging Library
@@ -23,26 +33,48 @@
internal representation, and powerful image processing capabilities.
Details about licensing can be found from README file.
+
+%package devel
+Summary: Development files for python-imaging.
+Group: Development/Languages
+Requires: %{name} = %{epoch}:%{version}-%{release}, python-devel, %{py_incdir}
+
+%description devel
+Development files for python-imaging.
+
#---------------------------------------------------------------------
%prep
%setup -q -n Imaging-%{version}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
#---------------------------------------------------------------------
%build
cd libImaging
%configure
-make OPT="$RPM_OPT_FLAGS" %{?_smp_mflags}
+make %{?_smp_mflags}
cd ..
-python setup.py build
-PYTHONPATH=$(ls -1d build/lib.linux*) python selftest.py
+%{__python} setup.py build
#---------------------------------------------------------------------
%install
rm -rf $RPM_BUILD_ROOT
-python setup.py install --root $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT/%{py_incdir}/Imaging
+install -m 644 libImaging/*.h $RPM_BUILD_ROOT/%{py_incdir}/Imaging
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+#---------------------------------------------------------------------
+
+%check || :
+PYTHONPATH=$(ls -1d build/lib.linux*) %{__python} selftest.py
#---------------------------------------------------------------------
@@ -50,13 +82,33 @@
rm -rf $RPM_BUILD_ROOT
#---------------------------------------------------------------------
+
%files
%defattr (-,root,root)
%doc README CHANGES-114
-%{_libdir}/python2.2/site-packages/PIL.pth
-%{_libdir}/python2.2/site-packages/PIL/
+%{python_sitearch}/PIL.pth
+%dir %{python_sitearch}/PIL
+%{python_sitearch}/PIL/*.so
+%{python_sitearch}/PIL/*.py
+%{python_sitearch}/PIL/*.pyc
+%ghost %{python_sitearch}/PIL/*.pyo
+
+%files devel
+%defattr (0644,root,root,755)
+%{py_incdir}/Imaging
+%doc Doc Scripts Images Sane
%changelog
+* Sat Oct 9 2004 Ville Skytt�� <ville.skytta at iki.fi> - 0:1.1.4-6
+- Borrow parts from patch in Debian's 1.1.4-3 to fix issues in bug 1038 as
+ well as a bunch of others.
+- Bring up to date with current fedora.us Python spec template recommendations.
+- Fix -devel directory permissions.
+
+* Sun Nov 30 2003 Juha Ylitalo <jylitalo(a)iki.fi> - 0:1.1.4-0.fdr.5
+- added -devel package (thanks to patch from pmatilai(a)welho.com)
+- FC1 requires dependency to tcl-devel and tk-devel package
+
* Wed Jul 16 2003 Juha Ylitalo <jylitalo(a)iki.fi> - 0:1.1.4-0.fdr.4
- bumped release
- implemented changes from Ville, which basically means that: