1 diff -rupN Pillow-3.2.0.orig/setup.py Pillow-3.2.0/setup.py
2 --- Pillow-3.2.0.orig/setup.py 2016-04-01 14:17:23.000000000 +0200
3 +++ Pillow-3.2.0/setup.py 2016-04-28 23:24:08.633969175 +0200
4 @@ -90,11 +90,11 @@ except (ImportError, OSError):
6 PILLOW_VERSION = '3.2.0'
9 +JPEG_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
14 +ZLIB_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
15 +TIFF_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
16 +FREETYPE_ROOT = _lib_include(os.environ['STAGING_DIR'] + "/usr")
20 @@ -187,129 +187,6 @@ class pil_build_ext(build_ext):
21 _add_directory(library_dirs, os.path.join(prefix, "lib"))
22 _add_directory(include_dirs, os.path.join(prefix, "include"))
25 - # add platform directories
27 - if sys.platform == "cygwin":
28 - # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory
29 - _add_directory(library_dirs,
30 - os.path.join("/usr/lib", "python%s" %
31 - sys.version[:3], "config"))
33 - elif sys.platform == "darwin":
34 - # attempt to make sure we pick freetype2 over other versions
35 - _add_directory(include_dirs, "/sw/include/freetype2")
36 - _add_directory(include_dirs, "/sw/lib/freetype2/include")
37 - # fink installation directories
38 - _add_directory(library_dirs, "/sw/lib")
39 - _add_directory(include_dirs, "/sw/include")
40 - # darwin ports installation directories
41 - _add_directory(library_dirs, "/opt/local/lib")
42 - _add_directory(include_dirs, "/opt/local/include")
44 - # if Homebrew is installed, use its lib and include directories
47 - prefix = subprocess.check_output(['brew', '--prefix']).strip(
50 - # Homebrew not installed
56 - # add Homebrew's include and lib directories
57 - _add_directory(library_dirs, os.path.join(prefix, 'lib'))
58 - _add_directory(include_dirs, os.path.join(prefix, 'include'))
59 - ft_prefix = os.path.join(prefix, 'opt', 'freetype')
61 - if ft_prefix and os.path.isdir(ft_prefix):
62 - # freetype might not be linked into Homebrew's prefix
63 - _add_directory(library_dirs, os.path.join(ft_prefix, 'lib'))
64 - _add_directory(include_dirs,
65 - os.path.join(ft_prefix, 'include'))
67 - # fall back to freetype from XQuartz if
68 - # Homebrew's freetype is missing
69 - _add_directory(library_dirs, "/usr/X11/lib")
70 - _add_directory(include_dirs, "/usr/X11/include")
72 - elif sys.platform.startswith("linux"):
73 - arch_tp = (plat.processor(), plat.architecture()[0])
74 - if arch_tp == ("x86_64", "32bit"):
75 - # 32-bit build on 64-bit machine.
76 - _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
78 - for platform_ in arch_tp:
83 - if platform_ in ["x86_64", "64bit"]:
84 - _add_directory(library_dirs, "/lib64")
85 - _add_directory(library_dirs, "/usr/lib64")
86 - _add_directory(library_dirs,
87 - "/usr/lib/x86_64-linux-gnu")
89 - elif platform_ in ["i386", "i686", "32bit"]:
90 - _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
92 - elif platform_ in ["aarch64"]:
93 - _add_directory(library_dirs, "/usr/lib64")
94 - _add_directory(library_dirs,
95 - "/usr/lib/aarch64-linux-gnu")
97 - elif platform_ in ["arm", "armv7l"]:
98 - _add_directory(library_dirs,
99 - "/usr/lib/arm-linux-gnueabi")
101 - elif platform_ in ["ppc64"]:
102 - _add_directory(library_dirs, "/usr/lib64")
103 - _add_directory(library_dirs,
104 - "/usr/lib/ppc64-linux-gnu")
105 - _add_directory(library_dirs,
106 - "/usr/lib/powerpc64-linux-gnu")
108 - elif platform_ in ["ppc"]:
109 - _add_directory(library_dirs, "/usr/lib/ppc-linux-gnu")
110 - _add_directory(library_dirs,
111 - "/usr/lib/powerpc-linux-gnu")
113 - elif platform_ in ["s390x"]:
114 - _add_directory(library_dirs, "/usr/lib64")
115 - _add_directory(library_dirs,
116 - "/usr/lib/s390x-linux-gnu")
118 - elif platform_ in ["s390"]:
119 - _add_directory(library_dirs, "/usr/lib/s390-linux-gnu")
123 - "Unable to identify Linux platform: `%s`" % platform_)
125 - # XXX Kludge. Above /\ we brute force support multiarch. Here we
126 - # try Barry's more general approach. Afterward, something should
128 - self.add_multiarch_paths()
130 - elif sys.platform.startswith("gnu"):
131 - self.add_multiarch_paths()
133 - elif sys.platform.startswith("freebsd"):
134 - _add_directory(library_dirs, "/usr/local/lib")
135 - _add_directory(include_dirs, "/usr/local/include")
137 - elif sys.platform.startswith("netbsd"):
138 - _add_directory(library_dirs, "/usr/pkg/lib")
139 - _add_directory(include_dirs, "/usr/pkg/include")
141 - elif sys.platform.startswith("sunos5"):
142 - _add_directory(library_dirs, "/opt/local/lib")
143 - _add_directory(include_dirs, "/opt/local/include")
145 - # FIXME: check /opt/stuff directories here?
147 # locate tkinter libraries
150 @@ -343,21 +220,6 @@ class pil_build_ext(build_ext):
154 - # add standard directories
156 - # look for tcl specific subdirectory (e.g debian)
158 - tcl_dir = "/usr/include/tcl" + TCL_VERSION
159 - if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
160 - _add_directory(include_dirs, tcl_dir)
162 - # standard locations
163 - _add_directory(library_dirs, "/usr/local/lib")
164 - _add_directory(include_dirs, "/usr/local/include")
166 - _add_directory(library_dirs, "/usr/lib")
167 - _add_directory(include_dirs, "/usr/include")
169 # on Windows, look for the OpenJPEG libraries in the location that
170 # the official installer puts them
171 if sys.platform == "win32":
172 @@ -449,7 +311,7 @@ class pil_build_ext(build_ext):
173 # look for freetype2 include files
175 for dir in self.compiler.include_dirs:
176 - if os.path.isfile(os.path.join(dir, "ft2build.h")):
177 + if os.path.isfile(os.path.join(dir, "freetype2/ft2build.h")):
178 freetype_version = 21
179 dir = os.path.join(dir, "freetype2")