# # spec file for package python-imaging # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: python-imaging BuildRequires: freetype2-devel BuildRequires: giflib-devel BuildRequires: libgphoto2-devel BuildRequires: liblcms-devel BuildRequires: libpng-devel BuildRequires: libtiff-devel BuildRequires: netpbm BuildRequires: python-devel BuildRequires: python-tk BuildRequires: tix BuildRequires: tk-devel BuildRequires: xorg-x11-devel %if 0%{?suse_version} > 1210 BuildRequires: libjpeg8-devel %endif %if 0%{?suse_version} > 1130 BuildRequires: sane-backends-devel %else BuildRequires: sane-backends %endif Url: http://www.pythonware.com/products/pil/index.htm %define pyver %(python -c 'import sys; print sys.version[:3]') Version: 1.1.7 Release: 26.3 Provides: _imaging.so Provides: _imagingtk.so Provides: pyimglib Provides: python_imaging_lib Requires: python < %{pyver}.99 Requires: python >= %pyver Requires: python-tk Requires: tix Requires: tk Obsoletes: pyimglib Provides: python-imaging-tk Conflicts: python-Pillow-tk Summary: The Python Imaging Library - PIL License: HPND Group: Development/Libraries/Python Source: Imaging-%{version}.tar.bz2 Source1: pil-handbook.pdf Patch2: Imaging-1.1.7-64bit.patch Patch3: Imaging-1.1.7-ssize.patch # PATCH-FIX-UPSTREAM use-recommended-freetype-include.patch -- Freetype upstream recommends using their macros together with # ft2build include. Positive sideeffect is that this patch makes it build with both freetype2 2.5.1, and older versions Patch4: use-recommended-freetype-include.patch # CVE-2014-1932 - insecure use of `mktemp` Patch5: CVE-2014-1932-mktemp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description The Python Imaging Library adds fairly powerful image processing capabilities to the Python interpreter and provides extensive file format support, and efficient internal representation. %package sane Provides: python_imaging_sane Summary: Python SANE module Group: Development/Libraries/Python %description sane The SANE module provides an interface to the SANE scanner and frame grabber interface for Linux. It is a part of the Python Imaging Library. %prep %setup -n Imaging-%{version} %patch2 %patch3 %patch4 -p1 %patch5 -p1 cp %{S:1} . %build # # Change python files header for f in `find . -type f -exec grep -l /usr/local/bin/python \{\} \;` ; do rm -f tmp sed -e "s:^#!.*/usr/local/bin/python:#!/usr/bin/env python:g" $f > tmp cp -f tmp $f done # # Build sane lib #cd Sane #python setup.py build #cd .. # # Build python things export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" python setup.py build_ext -i python selftest.py %install python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=INSTALLED_FILES install -d -m 755 $RPM_BUILD_ROOT/usr/include/python%pyver install -m 644 libImaging/Imaging.h \ libImaging/ImPlatform.h \ $RPM_BUILD_ROOT/usr/include/python%pyver #cd Sane #python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT --record-rpm=../INSTALLED_FILES_SANE #cat INSTALLED_FILES >> ../INSTALLED_FILES #cd .. %clean rm -rf ${RPM_BUILD_ROOT} %files -f INSTALLED_FILES %defattr(-,root,root) %doc CHANGES README Docs Scripts Images pil-handbook.pdf /usr/include/python%pyver/* #%files sane -f INSTALLED_FILES_SANE #%defattr(-,root,root) #%doc Sane/sanedoc.txt Sane/README Sane/CHANGES %changelog * Mon Jun 23 2014 coolo@suse.com - simplify the previous fix by plainly conflicting with python-Pillow * Fri May 30 2014 toddrme2178@gmail.com - Provide python-imaging-tk to guarantee conflict with python-Pillow * Thu Apr 17 2014 jmatejek@suse.com - added CVE-2014-1932-mktemp.patch: insecure temporary file creation CVE-2014-1932, bnc#863541 * Wed Dec 11 2013 hrvoje.senjan@gmail.com - Added use-recommended-freetype-include.patch -- Freetype upstream recommends using their macros together with ft2build include. Positive sideeffect is that this patch makes it build with both freetype2 2.5.1, and older version * Thu Feb 28 2013 cfarrell@suse.com - license update: HPND * Wed Feb 27 2013 coolo@suse.com - update license to new format * Mon Mar 26 2012 dhall@wustl.edu - add lcms support - spec file clean up * Wed Mar 14 2012 dhall@wustl.edu - fixed jpeg support so factory passes tests * Wed Sep 15 2010 aj@suse.de - Change BuildRequires for sane-backends devel split. * Thu May 6 2010 jfunk@funktronics.ca - Update to 1.1.7 - Improved PNG compression - Read interlaced PNG files - Added various TGA improvements - Added Kevin Cazabon's pyCMS package - Improved support for layer names in PSD files - Added zTXT support - Added sample ICC profiles - Added Chroma subsampling support for JPEG - Support for preserving ICC profiles - Added resolution save option for PDF files - Added simple transparency support for RGB images - Added support for Unicode filenames in ImageFont.truetype - Performance improvements - Bug fixes * Wed Dec 23 2009 aj@suse.de - Apply patches with fuzz=0 * Tue Sep 8 2009 max@suse.de - removed blt from BuildRequires so that it can be dropped. * Tue Jun 3 2008 crrodriguez@suse.de - needs fno-strict-aliasing * Thu Mar 29 2007 matejcik@suse.cz - update to 1.1.6 - threading support for sane module - NumPy array interface support - converter to QImage - new ImageMath module - bugfixes * Mon Oct 23 2006 meissner@suse.de - buildrequires libgphoto2-devel * Fri Oct 20 2006 jmatejek@suse.cz - fixed minor 64bit PEP353 related problems * Thu Apr 20 2006 jmatejek@suse.cz - fixed dependency resolving on 64bit platforms * Thu Apr 20 2006 jmatejek@suse.cz - selftest now breaks build process * Tue Feb 28 2006 jmatejek@suse.cz - updated to reflect python changes due to #149809 * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Fri Dec 23 2005 matejcik@suse.cz - branched off -sane package * Wed Dec 21 2005 jmatejek@suse.cz - fixed bad use of realloc() * Fri Oct 7 2005 matejcik@suse.cz - updated to 1.1.5 - further cleanup of build process - removed ImConfig.h, as it is no longer provided - cleaned up specfile * Fri Apr 16 2004 mcihar@suse.cz - -fno-strict-aliasing * Tue Jan 6 2004 mcihar@suse.cz - fix permissions for directory - add %%clean * Tue Jan 6 2004 mcihar@suse.cz - fix build with current freetype - no root for build * Mon Aug 11 2003 mcihar@suse.cz - include headers * Sat Jul 26 2003 kukuk@suse.de - Add tk-devel to neededforbuild * Mon Jun 16 2003 mcihar@suse.cz - use --record-rpm instead of --record * Thu May 29 2003 mcihar@suse.cz - added libdir for linking with sane * Tue May 27 2003 mcihar@suse.cz - update to 1.1.4: Version 1.1.4 adds improved build scripts, truetype/opentype font support, memory mapping support also for non-Windows platforms, screen and clipboard grabbing on Windows, support for CSS-style color strings, support for IPTC/NAA and EXIF metadata, and more. - built sane and freetype module - using distutils for build - cleaned up spec file * Tue May 13 2003 mcihar@suse.cz - use %%defattr * Mon May 12 2003 mcihar@suse.cz - use versioned dependency on python * Thu Mar 6 2003 kukuk@suse.de - Remove conflict to python-tkinter [Bug #24784] * Tue Mar 4 2003 mcihar@suse.cz - included needed _imagingtk.so in package * Wed Nov 6 2002 mcihar@suse.cz - no more tkinter included in this: Starting with 1.0 final (release candidate 2 and later, to be precise), PIL can attach itself to Tkinter in flight. As a result, you no longer need to rebuild the Tkinter extension to be able to use PIL. * Mon Aug 12 2002 vinil@suse.cz - new version: 1.1.3 - Fixed build for Tcl/Tk 8.4 * Fri Jul 26 2002 adrian@suse.de - fix neededforbuild * Fri Jul 12 2002 max@suse.de - Fixed build for Tcl/Tk 8.4 * Mon Jun 3 2002 ro@suse.de - fix build for lib64 platforms - use -fPIC for compiling libImaging * Thu Jan 31 2002 ro@suse.de - changed neededforbuild to * Wed Jan 9 2002 rvasice@suse.cz - replaced old Tkinter to compile with python 2.2 * Tue Aug 28 2001 rvasice@suse.cz - update to version 1.1.2 - adapted for python 2.1 - regex module -> re - fixed broken "show" method, TIFF "save" bug - added transparency support to the PNG codec * Wed Dec 6 2000 mt@suse.de - cleaned up tk dependencies * Thu Nov 30 2000 ro@suse.de - tix link fixed * Wed Nov 29 2000 ro@suse.de - changed neededforbuild to * Mon Nov 27 2000 mt@suse.de - replaced old thinter with new Tkinter-2.0-8.0.tar.gz * Mon Nov 20 2000 mt@suse.de - changed spec to be independed of python version * Sat Oct 28 2000 kukuk@suse.de - Add python-devel to need for build * Wed Jun 21 2000 mt@suse.de - updated to pil v1.1 * Tue Jun 20 2000 mt@suse.de - added PIL.pth to the file list * Wed Jun 7 2000 ro@suse.de - fixed to compile with tcl/tk 8.3 * Mon Dec 6 1999 mt@suse.de - added includes to the package (bugzilla #1490) * Fri Nov 5 1999 max@suse.de - changed dependencies from tk_new and tix_new to tk and tix. * Mon Oct 11 1999 max@suse.de - ready for the new Tcl/Tk packages * Mon Sep 20 1999 ro@suse.de - added provides python_image_lib * Mon Sep 13 1999 bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Wed May 26 1999 ro@suse.de - added blt and libpng to neededforbuild * Wed May 26 1999 mt@suse.de - created package