From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 21CA71381F3 for ; Mon, 27 May 2013 23:27:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8C0D7E0B1F; Mon, 27 May 2013 23:27:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E626CE0B1F for ; Mon, 27 May 2013 23:27:35 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E6E8133DF72 for ; Mon, 27 May 2013 23:27:34 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2304) id AF7392171D; Mon, 27 May 2013 23:27:33 +0000 (UTC) From: "Mike Gilbert (floppym)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, floppym@gentoo.org 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 X-VCS-Repository: gentoo-x86 X-VCS-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 X-VCS-Directories: dev-python/imaging/files X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130527232733.AF7392171D@flycatcher.gentoo.org> Date: Mon, 27 May 2013 23:27:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 93584c38-c1f6-4b59-818f-cf6d2c693253 X-Archives-Hash: 9f081924b7b2cc26332c68e5bc3c0b2e floppym 13/05/27 23:27:33 Added: 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 Log: 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. (Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4) Revision Changes Path 1.1 dev-python/imaging/files/imaging-2.0.0-libm_linking.patch 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 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 Index: imaging-2.0.0-libm_linking.patch =================================================================== --- setup.py +++ setup.py @@ -197,7 +197,7 @@ for file in _LIB_IMAGING: files.append(os.path.join("libImaging", file + ".c")) - libs = [] + libs = ["m"] defs = [] if feature.jpeg: libs.append(feature.jpeg) @@ -249,7 +249,7 @@ libraries=[feature.tcl, feature.tk])) if os.path.isfile("_imagingmath.c"): - exts.append(Extension("_imagingmath", ["_imagingmath.c"])) + exts.append(Extension("_imagingmath", ["_imagingmath.c"], libraries=["m"])) self.extensions[:] = exts 1.1 dev-python/imaging/files/imaging-2.0.0-gif_transparency.patch 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 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 Index: imaging-2.0.0-gif_transparency.patch =================================================================== --- PIL/GifImagePlugin.py +++ PIL/GifImagePlugin.py @@ -364,6 +364,11 @@ for i in range(maxcolor): s.append(o8(i) * 3) + if im.info.has_key('transparency'): + transparentIndex = im.info['transparency'] + s.append('!' + o8(0xf9) + o8(4) + o8(1) + o8(0) + o8(0) + + o8(transparentIndex) + o8(0)) + return s def getdata(im, offset = (0, 0), **params): 1.1 dev-python/imaging/files/imaging-2.0.0-GifImagePlugin.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/imaging/files/imaging-2.0.0-GifImagePlugin.patch?rev=1.1&view=markup 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 Index: imaging-2.0.0-GifImagePlugin.patch =================================================================== commit cb4f0f2b3c57a76551c7dfdae6a67f4b58da4681 Author: Alex Clark Date: Wed Feb 6 09:25:03 2013 -0500 Revert "Fix saving images with added transparency" This reverts commit cc439099c1e8c81a929ea446caa6791d7d9b6bd6. diff --git a/PIL/GifImagePlugin.py b/PIL/GifImagePlugin.py index 2036893..443d4db 100644 --- a/PIL/GifImagePlugin.py +++ b/PIL/GifImagePlugin.py @@ -364,11 +364,6 @@ def getheader(im, palette=None, info=None): for i in range(maxcolor): s.append(o8(i) * 3) - if im.info.has_key('transparency'): - transparentIndex = im.info['transparency'] - s.append('!' + o8(0xf9) + o8(4) + o8(1) + o8(0) + o8(0) + - o8(transparentIndex) + o8(0)) - return s def getdata(im, offset = (0, 0), **params): 1.1 dev-python/imaging/files/imaging-2.0.0-delete_hardcoded_paths.patch 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 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 Index: imaging-2.0.0-delete_hardcoded_paths.patch =================================================================== --- setup.py +++ setup.py @@ -56,11 +56,6 @@ return None -def _lib_include(root): - # map root to (root/lib, root/include) - return os.path.join(root, "lib"), os.path.join(root, "include") - - def _read(file): return open(file, 'rb').read() @@ -105,102 +100,17 @@ _add_directory(include_dirs, include_root) # - # add platform directories - - if sys.platform == "cygwin": - # pythonX.Y.dll.a is in the /usr/lib/pythonX.Y/config directory - _add_directory(library_dirs, os.path.join( - "/usr/lib", "python%s" % sys.version[:3], "config")) - - elif sys.platform == "darwin": - # attempt to make sure we pick freetype2 over other versions - _add_directory(include_dirs, "/sw/include/freetype2") - _add_directory(include_dirs, "/sw/lib/freetype2/include") - # fink installation directories - _add_directory(library_dirs, "/sw/lib") - _add_directory(include_dirs, "/sw/include") - # darwin ports installation directories - _add_directory(library_dirs, "/opt/local/lib") - _add_directory(include_dirs, "/opt/local/include") - # freetype2 ships with X11 - _add_directory(library_dirs, "/usr/X11/lib") - _add_directory(include_dirs, "/usr/X11/include") - - elif sys.platform.startswith("linux"): - for platform_ in (platform.processor(),platform.architecture()[0]): - if not platform_: continue - - if platform_ in ["x86_64", "64bit"]: - _add_directory(library_dirs, "/lib64") - _add_directory(library_dirs, "/usr/lib64") - _add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu") - break - elif platform_ in ["i386", "i686", "32bit"]: - _add_directory(library_dirs, "/usr/lib/i386-linux-gnu") - break - else: - raise ValueError("Unable to identify Linux platform: `%s`" % platform_) - - # XXX Kludge. Above /\ we brute force support multiarch. Here we - # try Barry's more general approach. Afterward, something should - # work ;-) - self.add_multiarch_paths() - - _add_directory(library_dirs, "/usr/local/lib") - # FIXME: check /opt/stuff directories here? - - prefix = sysconfig.get_config_var("prefix") - if prefix: - _add_directory(library_dirs, os.path.join(prefix, "lib")) - _add_directory(include_dirs, os.path.join(prefix, "include")) - - # # locate tkinter libraries if _tkinter: TCL_VERSION = _tkinter.TCL_VERSION[:3] - if _tkinter and not TCL_ROOT: - # we have Tkinter but the TCL_ROOT variable was not set; - # try to locate appropriate Tcl/Tk libraries - PYVERSION = sys.version[0] + sys.version[2] - TCLVERSION = TCL_VERSION[0] + TCL_VERSION[2] - roots = [ - # common installation directories, mostly for Windows - # (for Unix-style platforms, we'll check in well-known - # locations later) - os.path.join("/py" + PYVERSION, "Tcl"), - os.path.join("/python" + PYVERSION, "Tcl"), - "/Tcl", "/Tcl" + TCLVERSION, "/Tcl" + TCL_VERSION, - os.path.join(os.environ.get("ProgramFiles", ""), "Tcl"), - ] - for TCL_ROOT in roots: - TCL_ROOT = os.path.abspath(TCL_ROOT) - if os.path.isfile(os.path.join(TCL_ROOT, "include", "tk.h")): - # FIXME: use distutils logging (?) - print("--- using Tcl/Tk libraries at", TCL_ROOT) - print("--- using Tcl/Tk version", TCL_VERSION) - TCL_ROOT = _lib_include(TCL_ROOT) - break - else: - TCL_ROOT = None - # # add standard directories - # look for tcl specific subdirectory (e.g debian) - if _tkinter: - tcl_dir = "/usr/include/tcl" + TCL_VERSION - if os.path.isfile(os.path.join(tcl_dir, "tk.h")): - _add_directory(include_dirs, tcl_dir) - # standard locations - _add_directory(library_dirs, "/usr/local/lib") - _add_directory(include_dirs, "/usr/local/include") - - _add_directory(library_dirs, "/usr/lib") _add_directory(include_dirs, "/usr/include") # @@ -333,28 +243,7 @@ "_webp", ["_webp.c"], libraries=["webp"])) - if sys.platform == "darwin": - # locate Tcl/Tk frameworks - frameworks = [] - framework_roots = [ - "/Library/Frameworks", - "/System/Library/Frameworks"] - for root in framework_roots: - if (os.path.exists(os.path.join(root, "Tcl.framework")) and - os.path.exists(os.path.join(root, "Tk.framework"))): - print("--- using frameworks at %s" % root) - frameworks = ["-framework", "Tcl", "-framework", "Tk"] - dir = os.path.join(root, "Tcl.framework", "Headers") - _add_directory(self.compiler.include_dirs, dir, 0) - dir = os.path.join(root, "Tk.framework", "Headers") - _add_directory(self.compiler.include_dirs, dir, 1) - break - if frameworks: - exts.append(Extension( - "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"], - extra_compile_args=frameworks, extra_link_args=frameworks)) - feature.tcl = feature.tk = 1 # mark as present - elif feature.tcl and feature.tk: + if feature.tcl and feature.tk: exts.append(Extension( "_imagingtk", ["_imagingtk.c", "Tk/tkImaging.c"], libraries=[feature.tcl, feature.tk])) @@ -445,30 +334,6 @@ if m.group(1) < "1.2.3": return m.group(1) - # http://hg.python.org/users/barry/rev/7e8deab93d5a - def add_multiarch_paths(self): - # Debian/Ubuntu multiarch support. - # https://wiki.ubuntu.com/MultiarchSpec - # self.build_temp - tmpfile = os.path.join(self.build_temp, 'multiarch') - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) - ret = os.system('dpkg-architecture -qDEB_HOST_MULTIARCH > %s' % - tmpfile) - ret = os.system( - 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' % - tmpfile) - try: - if ret >> 8 == 0: - fp = open(tmpfile, 'r') - multiarch_path_component = fp.readline().strip() - _add_directory(self.compiler.library_dirs, - '/usr/lib/' + multiarch_path_component) - _add_directory(self.compiler.include_dirs, - '/usr/include/' + multiarch_path_component) - finally: - os.unlink(tmpfile) - setup( name=NAME, version=VERSION,