add s390* and ppc* to arch detection

This commit is contained in:
Karsten Hopp 2013-03-12 14:59:23 +01:00
parent 08526f0566
commit 5a7afeafff
2 changed files with 30 additions and 1 deletions

22
python-pillow-archs.patch Normal file
View File

@ -0,0 +1,22 @@
diff -up python-imaging-Pillow-7866759/setup.py.archs python-imaging-Pillow-7866759/setup.py
--- python-imaging-Pillow-7866759/setup.py.archs 2013-03-12 13:33:42.992470031 +0100
+++ python-imaging-Pillow-7866759/setup.py 2013-03-12 14:25:25.558010720 +0100
@@ -137,6 +137,18 @@ class pil_build_ext(build_ext):
_add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu")
elif platform_ in ["i386", "i686", "32bit"]:
_add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
+ elif platform_ in ["ppc64", "64bit"]:
+ _add_directory(library_dirs, "/lib64")
+ _add_directory(library_dirs, "/usr/lib64")
+ _add_directory(library_dirs, "/usr/lib/ppc64-linux-gnu")
+ elif platform_ in ["ppc", "32bit"]:
+ _add_directory(library_dirs, "/usr/lib/ppc-linux-gnu")
+ elif platform_ in ["s390x", "64bit"]:
+ _add_directory(library_dirs, "/lib64")
+ _add_directory(library_dirs, "/usr/lib64")
+ _add_directory(library_dirs, "/usr/lib/s390x-linux-gnu")
+ elif platform_ in ["s390", "32bit"]:
+ _add_directory(library_dirs, "/usr/lib/s390-linux-gnu")
else:
raise ValueError("Unable to identify Linux platform: `%s`" % platform_)

View File

@ -12,7 +12,7 @@
Name: python-pillow Name: python-pillow
Version: 1.7.8 Version: 1.7.8
Release: 4.20130305git%{shortcommit}%{?dist} Release: 5.20130305git%{shortcommit}%{?dist}
Summary: Python 2 image processing library Summary: Python 2 image processing library
# License: see http://www.pythonware.com/products/pil/license.htm # License: see http://www.pythonware.com/products/pil/license.htm
@ -23,6 +23,9 @@ URL: http://python-imaging.github.com/Pillow/
# wget --content-disposition https://github.com/python-imaging/Pillow/tarball/$commit # wget --content-disposition https://github.com/python-imaging/Pillow/tarball/$commit
Source0: https://github.com/python-imaging/Pillow/tarball/%{commit}/python-imaging-Pillow-%{version}-%{ahead}-g%{shortcommit}.tar.gz Source0: https://github.com/python-imaging/Pillow/tarball/%{commit}/python-imaging-Pillow-%{version}-%{ahead}-g%{shortcommit}.tar.gz
# Add s390* and ppc* archs
Patch0: python-pillow-archs.patch
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
BuildRequires: tkinter BuildRequires: tkinter
@ -155,6 +158,7 @@ Tk interface for %{name3}.
%prep %prep
%setup -q -n python-imaging-Pillow-%{shortcommit} %setup -q -n python-imaging-Pillow-%{shortcommit}
%patch0 -p1 -b .archs
%if %{with_python3} %if %{with_python3}
# Create Python 3 source tree # Create Python 3 source tree
@ -295,6 +299,9 @@ popd
%endif %endif
%changelog %changelog
* Tue Mar 12 2013 Karsten Hopp <karsten@redhat.com> 1.7.8-5.20130305git
- add s390* and ppc* to arch detection
* Tue Mar 05 2013 Sandro Mani <manisandro@gmail.com> - 1.7.8-4.20130305git7866759 * Tue Mar 05 2013 Sandro Mani <manisandro@gmail.com> - 1.7.8-4.20130305git7866759
- Update to latest git snapshot - Update to latest git snapshot
- 0001-Cast-hash-table-values-to-unsigned-long.patch now upstream - 0001-Cast-hash-table-values-to-unsigned-long.patch now upstream