Author: thl
Update of /cvs/free/rpms/compat-python24-imaging/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv31409
Modified Files:
.cvsignore sources
Added Files:
compat-python-imaging-1.1.6-sane-types.patch
compat-python-imaging-giftrans.patch
compat-python-imaging-lib64.patch
compat-python-imaging-no-xv.patch compat-python24-imaging.spec
Log Message:
initial import from the F-9 branch
compat-python-imaging-1.1.6-sane-types.patch:
--- NEW FILE compat-python-imaging-1.1.6-sane-types.patch ---
--- Imaging-1.1.6/Sane/_sane.c.types 2006-12-03 13:12:22.000000000 +0100
+++ Imaging-1.1.6/Sane/_sane.c 2007-04-28 11:41:19.000000000 +0200
@@ -1152,8 +1152,8 @@
static PyObject *
PySane_get_devices(PyObject *self, PyObject *args)
{
- SANE_Device **devlist;
- SANE_Device *dev;
+ const SANE_Device **devlist;
+ const SANE_Device *dev;
SANE_Status st;
PyObject *list;
int local_only, i;
compat-python-imaging-giftrans.patch:
--- NEW FILE compat-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):
compat-python-imaging-lib64.patch:
--- NEW FILE compat-python-imaging-lib64.patch ---
--- setup-old.py 2005-03-23 18:16:40.000000000 +0000
+++ setup.py 2006-04-02 22:34:04.000000000 +0100
@@ -180,6 +180,7 @@
add_directory(library_dirs, "/usr/local/lib")
add_directory(include_dirs, "/usr/local/include")
+ add_directory(library_dirs, "/usr/lib64")
add_directory(library_dirs, "/usr/lib")
add_directory(include_dirs, "/usr/include")
compat-python-imaging-no-xv.patch:
--- NEW FILE compat-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
--- NEW FILE compat-python24-imaging.spec ---
%{!?python_sitelib: %define python_sitelib %(/usr/bin/python2.4 -c "from
distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define pyver 2.4
%define py_incdir %{_includedir}/python%{pyver}
Summary: Python's own image processing library
Name: compat-python24-imaging
Version: 1.1.6
Release: 2%{?dist}
License: BSD
Group: System Environment/Libraries
Source0:
http://effbot.org/downloads/Imaging-%{version}.tar.gz
Patch0: compat-python-imaging-no-xv.patch
Patch1: compat-python-imaging-lib64.patch
Patch2: compat-python-imaging-giftrans.patch
Patch3: compat-python-imaging-1.1.6-sane-types.patch
URL:
http://www.pythonware.com/products/pil/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: compat-python24-devel, libjpeg-devel, zlib-devel, freetype-devel
BuildRequires: compat-tkinter24, tk-devel
BuildRequires: sane-backends-devel
Requires: python(abi) = 2.4
%description
Python Imaging Library
The Python Imaging Library (PIL) adds image processing capabilities
to your Python interpreter.
This library provides extensive file format support, an efficient
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/Libraries
Requires: %{name} = %{version}-%{release}, compat-python24-devel
Requires: libjpeg-devel
Requires: zlib-devel
%description devel
Development files for python-imaging.
%package sane
Summary: Python Module for using scanners
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
%description sane
This package contains the sane module for Python which provides access to
various raster scanning devices such as flatbed scanners and digital cameras.
%package tk
Summary: Tk interface for python-imaging
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: compat-tkinter24
%description tk
This package contains a Tk interface for python-imaging.
%prep
%setup -q -n Imaging-%{version}
%patch0 -p1
%patch1 -p0
%patch2 -p1
%patch3 -p1 -b .sane-types
# fix the interpreter path for Scripts/*.py
cd Scripts
for scr in *.py
do
sed -e "s|/usr/local/bin/python|%{_bindir}/python2.4|" $scr > tmp.py
mv tmp.py $scr
chmod 755 $scr
done
%build
# Is this still relevant? (It was used in 1.1.4)
#%ifarch x86_64
# CFLAGS="$RPM_OPT_FLAGS -fPIC -DPIC" \
#%endif
CFLAGS="$RPM_OPT_FLAGS" %{_bindir}/python2.4 setup.py build
pushd Sane
CFLAGS="$RPM_OPT_FLAGS" %{_bindir}/python2.4 setup.py build
popd
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{py_incdir}/Imaging
install -m 644 libImaging/*.h $RPM_BUILD_ROOT/%{py_incdir}/Imaging
%{_bindir}/python2.4 setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
pushd Sane
%{_bindir}/python2.4 setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
# There is no need to ship the binaries since they are already packaged
# in %doc
rm -rf $RPM_BUILD_ROOT%{_bindir}
# Separate files that need Tk and files that don't
echo '%%defattr (0644,root,root,755)' > files.main
echo '%%defattr (0644,root,root,755)' > files.tk
p="$PWD"
pushd $RPM_BUILD_ROOT%{python_sitelib}/PIL
for file in *; do
case "$file" in
ImageTk*|SpiderImagePlugin*|_imagingtk.so)
what=files.tk
;;
*)
what=files.main
;;
esac
echo %{python_sitelib}/PIL/$file >> "$p/$what"
done
popd
%check || :
PYTHONPATH=$(ls -1d build/lib.linux*) %{_bindir}/python2.4 selftest.py
%clean
rm -rf $RPM_BUILD_ROOT
%files -f files.main
%defattr (-,root,root)
%doc README CHANGES
%{python_sitelib}/PIL.pth
%dir %{python_sitelib}/PIL
%files devel
%defattr (0644,root,root,755)
%{py_incdir}/Imaging
%doc Docs Scripts Images
%files sane
%defattr (0644,root,root,755)
%doc Sane/CHANGES Sane/demo*.py Sane/sanedoc.txt
%{python_sitelib}/_sane.so
%{python_sitelib}/sane.py*
%files tk -f files.tk
%changelog
* Sun Aug 10 2008 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info - 1.1.6-2
- rebuild for RPM Fusion
* Mon Jun 18 2007 Jonathan Steffan <jon a fedoraunity.org> 1.1.6-1
- Initial build from fc6 srpm
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/compat-python24-imaging/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Jul 2008 16:49:02 -0000 1.1
+++ .cvsignore 28 Sep 2008 05:58:59 -0000 1.2
@@ -0,0 +1 @@
+Imaging-1.1.6.tar.gz
Index: sources
===================================================================
RCS file: /cvs/free/rpms/compat-python24-imaging/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 22 Jul 2008 16:49:02 -0000 1.1
+++ sources 28 Sep 2008 05:58:59 -0000 1.2
@@ -0,0 +1 @@
+3a9b5c20ca52f0a9900512d2c7347622 Imaging-1.1.6.tar.gz