Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/imaging/files: imaging-2.0.0-libm_linking.patch imaging-2.0.0-gif_transparency.patch imaging-2.0.0-GifImagePlugin.patch imaging-2.0.0-delete_hardcoded_paths.patch
Date: Mon, 27 May 2013 23:27:40
Message-Id: 20130527232733.AF7392171D@flycatcher.gentoo.org
1 floppym 13/05/27 23:27:33
2
3 Added: imaging-2.0.0-libm_linking.patch
4 imaging-2.0.0-gif_transparency.patch
5 imaging-2.0.0-GifImagePlugin.patch
6 imaging-2.0.0-delete_hardcoded_paths.patch
7 Log:
8 Copy dev-python/pillow-2.0.0 to dev-python/imaging-2.0.0 in preparation for a pkgmove. Apply rebased patches from Arfrever's Progress overlay. Enable python3 support. Bug 401009.
9
10 (Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
11
12 Revision Changes Path
13 1.1 dev-python/imaging/files/imaging-2.0.0-libm_linking.patch
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-libm_linking.patch?rev=1.1&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-libm_linking.patch?rev=1.1&content-type=text/plain
17
18 Index: imaging-2.0.0-libm_linking.patch
19 ===================================================================
20 --- setup.py
21 +++ setup.py
22 @@ -197,7 +197,7 @@
23 for file in _LIB_IMAGING:
24 files.append(os.path.join("libImaging", file + ".c"))
25
26 - libs = []
27 + libs = ["m"]
28 defs = []
29 if feature.jpeg:
30 libs.append(feature.jpeg)
31 @@ -249,7 +249,7 @@
32 libraries=[feature.tcl, feature.tk]))
33
34 if os.path.isfile("_imagingmath.c"):
35 - exts.append(Extension("_imagingmath", ["_imagingmath.c"]))
36 + exts.append(Extension("_imagingmath", ["_imagingmath.c"], libraries=["m"]))
37
38 self.extensions[:] = exts
39
40
41
42
43 1.1 dev-python/imaging/files/imaging-2.0.0-gif_transparency.patch
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-gif_transparency.patch?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-gif_transparency.patch?rev=1.1&content-type=text/plain
47
48 Index: imaging-2.0.0-gif_transparency.patch
49 ===================================================================
50 --- PIL/GifImagePlugin.py
51 +++ PIL/GifImagePlugin.py
52 @@ -364,6 +364,11 @@
53 for i in range(maxcolor):
54 s.append(o8(i) * 3)
55
56 + if im.info.has_key('transparency'):
57 + transparentIndex = im.info['transparency']
58 + s.append('!' + o8(0xf9) + o8(4) + o8(1) + o8(0) + o8(0) +
59 + o8(transparentIndex) + o8(0))
60 +
61 return s
62
63 def getdata(im, offset = (0, 0), **params):
64
65
66
67 1.1 dev-python/imaging/files/imaging-2.0.0-GifImagePlugin.patch
68
69 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-GifImagePlugin.patch?rev=1.1&view=markup
70 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-GifImagePlugin.patch?rev=1.1&content-type=text/plain
71
72 Index: imaging-2.0.0-GifImagePlugin.patch
73 ===================================================================
74 commit cb4f0f2b3c57a76551c7dfdae6a67f4b58da4681
75 Author: Alex Clark <aclark@××××××.net>
76 Date: Wed Feb 6 09:25:03 2013 -0500
77
78 Revert "Fix saving images with added transparency"
79
80 This reverts commit cc439099c1e8c81a929ea446caa6791d7d9b6bd6.
81
82 diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py
83 index 2036893..443d4db 100644
84 --- a/PIL/GifImagePlugin.py
85 +++ b/PIL/GifImagePlugin.py
86 @@ -364,11 +364,6 @@ def getheader(im, palette=None, info=None):
87 for i in range(maxcolor):
88 s.append(o8(i) * 3)
89
90 - if im.info.has_key('transparency'):
91 - transparentIndex = im.info['transparency']
92 - s.append('!' + o8(0xf9) + o8(4) + o8(1) + o8(0) + o8(0) +
93 - o8(transparentIndex) + o8(0))
94 -
95 return s
96
97 def getdata(im, offset = (0, 0), **params):
98
99
100
101 1.1 dev-python/imaging/files/imaging-2.0.0-delete_hardcoded_paths.patch
102
103 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-delete_hardcoded_paths.patch?rev=1.1&view=markup
104 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-delete_hardcoded_paths.patch?rev=1.1&content-type=text/plain
105
106 Index: imaging-2.0.0-delete_hardcoded_paths.patch
107 ===================================================================
108 --- setup.py
109 +++ setup.py
110 @@ -56,11 +56,6 @@
111 return None
112
113
114 -def _lib_include(root):
115 - # map root to (root/lib, root/include)
116 - return os.path.join(root, "lib"), os.path.join(root, "include")
117 -
118 -
119 def _read(file):
120 return open(file, 'rb').read()
121
122 @@ -105,102 +100,17 @@
123 _add_directory(include_dirs, include_root)
124
125 #
126 - # add platform directories
127 -
128 - if sys.platform == "cygwin":
129 - # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory
130 - _add_directory(library_dirs, os.path.join(
131 - "/usr/lib", "python%s" % sys.version[:3], "config"))
132 -
133 - elif sys.platform == "darwin":
134 - # attempt to make sure we pick freetype2 over other versions
135 - _add_directory(include_dirs, "/sw/include/freetype2")
136 - _add_directory(include_dirs, "/sw/lib/freetype2/include")
137 - # fink installation directories
138 - _add_directory(library_dirs, "/sw/lib")
139 - _add_directory(include_dirs, "/sw/include")
140 - # darwin ports installation directories
141 - _add_directory(library_dirs, "/opt/local/lib")
142 - _add_directory(include_dirs, "/opt/local/include")
143 - # freetype2 ships with X11
144 - _add_directory(library_dirs, "/usr/X11/lib")
145 - _add_directory(include_dirs, "/usr/X11/include")
146 -
147 - elif sys.platform.startswith("linux"):
148 - for platform_ in (platform.processor(),platform.architecture()[0]):
149 - if not platform_: continue
150 -
151 - if platform_ in ["x86_64", "64bit"]:
152 - _add_directory(library_dirs, "/lib64")
153 - _add_directory(library_dirs, "/usr/lib64")
154 - _add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu")
155 - break
156 - elif platform_ in ["i386", "i686", "32bit"]:
157 - _add_directory(library_dirs, "/usr/lib/i386-linux-gnu")
158 - break
159 - else:
160 - raise ValueError("Unable to identify Linux platform: `%s`" % platform_)
161 -
162 - # XXX Kludge. Above /\ we brute force support multiarch. Here we
163 - # try Barry's more general approach. Afterward, something should
164 - # work ;-)
165 - self.add_multiarch_paths()
166 -
167 - _add_directory(library_dirs, "/usr/local/lib")
168 - # FIXME: check /opt/stuff directories here?
169 -
170 - prefix = sysconfig.get_config_var("prefix")
171 - if prefix:
172 - _add_directory(library_dirs, os.path.join(prefix, "lib"))
173 - _add_directory(include_dirs, os.path.join(prefix, "include"))
174 -
175 - #
176 # locate tkinter libraries
177
178
179 if _tkinter:
180 TCL_VERSION = _tkinter.TCL_VERSION[:3]
181
182 - if _tkinter and not TCL_ROOT:
183 - # we have Tkinter but the TCL_ROOT variable was not set;
184 - # try to locate appropriate Tcl/Tk libraries
185 - PYVERSION = sys.version[0] + sys.version[2]
186 - TCLVERSION = TCL_VERSION[0] + TCL_VERSION[2]
187 - roots = [
188 - # common installation directories, mostly for Windows
189 - # (for Unix-style platforms, we'll check in well-known
190 - # locations later)
191 - os.path.join("/py" + PYVERSION, "Tcl"),
192 - os.path.join("/python" + PYVERSION, "Tcl"),
193 - "/Tcl", "/Tcl" + TCLVERSION, "/Tcl" + TCL_VERSION,
194 - os.path.join(os.environ.get("ProgramFiles", ""), "Tcl"),
195 - ]
196 - for TCL_ROOT in roots:
197 - TCL_ROOT = os.path.abspath(TCL_ROOT)
198 - if os.path.isfile(os.path.join(TCL_ROOT, "include", "tk.h")):
199 - # FIXME: use distutils logging (?)
200 - print("--- using Tcl/Tk libraries at", TCL_ROOT)
201 - print("--- using Tcl/Tk version", TCL_VERSION)
202 - TCL_ROOT = _lib_include(TCL_ROOT)
203 - break
204 - else:
205 - TCL_ROOT = None
206 -
207
208 #
209 # add standard directories
210
211 - # look for tcl specific subdirectory (e.g debian)
212 - if _tkinter:
213 - tcl_dir = "/usr/include/tcl" + TCL_VERSION
214 - if os.path.isfile(os.path.join(tcl_dir, "tk.h")):
215 - _add_directory(include_dirs, tcl_dir)
216 -
217 # standard locations
218 - _add_directory(library_dirs, "/usr/local/lib")
219 - _add_directory(include_dirs, "/usr/local/include")
220 -
221 - _add_directory(library_dirs, "/usr/lib")
222 _add_directory(include_dirs, "/usr/include")
223
224 #
225 @@ -333,28 +243,7 @@
226 "_webp", ["_webp.c"], libraries=["webp"]))
227
228
229 - if sys.platform == "darwin":
230 - # locate Tcl/Tk frameworks
231 - frameworks = []
232 - framework_roots = [
233 - "/Library/Frameworks",
234 - "/System/Library/Frameworks"]
235 - for root in framework_roots:
236 - if (os.path.exists(os.path.join(root, "Tcl.framework")) and
237 - os.path.exists(os.path.join(root, "Tk.framework"))):
238 - print("--- using frameworks at %s" % root)
239 - frameworks = ["-framework", "Tcl", "-framework", "Tk"]
240 - dir = os.path.join(root, "Tcl.framework", "Headers")
241 - _add_directory(self.compiler.include_dirs, dir, 0)
242 - dir = os.path.join(root, "Tk.framework", "Headers")
243 - _add_directory(self.compiler.include_dirs, dir, 1)
244 - break
245 - if frameworks:
246 - exts.append(Extension(
247 - "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"],
248 - extra_compile_args=frameworks, extra_link_args=frameworks))
249 - feature.tcl = feature.tk = 1 # mark as present
250 - elif feature.tcl and feature.tk:
251 + if feature.tcl and feature.tk:
252 exts.append(Extension(
253 "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"],
254 libraries=[feature.tcl, feature.tk]))
255 @@ -445,30 +334,6 @@
256 if m.group(1) < "1.2.3":
257 return m.group(1)
258
259 - # http://hg.python.org/users/barry/rev/7e8deab93d5a
260 - def add_multiarch_paths(self):
261 - # Debian/Ubuntu multiarch support.
262 - # https://wiki.ubuntu.com/MultiarchSpec
263 - # self.build_temp
264 - tmpfile = os.path.join(self.build_temp, 'multiarch')
265 - if not os.path.exists(self.build_temp):
266 - os.makedirs(self.build_temp)
267 - ret = os.system('dpkg-architecture -qDEB_HOST_MULTIARCH > %s' %
268 - tmpfile)
269 - ret = os.system(
270 - 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' %
271 - tmpfile)
272 - try:
273 - if ret >> 8 == 0:
274 - fp = open(tmpfile, 'r')
275 - multiarch_path_component = fp.readline().strip()
276 - _add_directory(self.compiler.library_dirs,
277 - '/usr/lib/' + multiarch_path_component)
278 - _add_directory(self.compiler.include_dirs,
279 - '/usr/include/' + multiarch_path_component)
280 - finally:
281 - os.unlink(tmpfile)
282 -
283 setup(
284 name=NAME,
285 version=VERSION,