[weasel-commit] Source: python-imaging=1.1.7-1

  • From: rbuilder@xxxxxxxxx
  • To: weasel-commit@xxxxxxxxxxxxx
  • Date: Thu, 17 Jun 2010 18:22:12 -0400

================================
python-imaging:source=1.1.7-1
cvc rdiff python-imaging -1 /weasel.rpath.org@wgl:3-devel/1.1.7-1
================================
1.1.7-1 Filip Brcic (brcha@xxxxxxxxxxxx) Thu Jun 17 18:21:28 2010
    PIL 1.1.7

imaging-1.1.7-missing-math.patch: new
--- /dev/null
+++ imaging-1.1.7-missing-math.patch
@@ -0,0 +20 @@
+--- setup.py.old       2009-07-03 11:34:59.141671252 +0200
++++ setup.py   2009-07-03 11:51:54.415666711 +0200
+@@ -281,6 +281,8 @@ class pil_build_ext(build_ext):
+         if struct.unpack("h", "\0\1")[0] == 1:
+             defs.append(("WORDS_BIGENDIAN", None))
+ 
++        libs.append("m")
++
+         exts = [(Extension(
+             "_imaging", files, libraries=libs, define_macros=defs
+             ))]
+@@ -332,7 +334,7 @@ class pil_build_ext(build_ext):
+                 ))
+ 
+         if os.path.isfile("_imagingmath.c"):
+-            exts.append(Extension("_imagingmath", ["_imagingmath.c"]))
++            exts.append(Extension("_imagingmath", ["_imagingmath.c"], 
libraries=["m"]))
+ 
+         self.extensions[:] = exts
+ 

imaging-1.1.7-sane.patch: new
--- /dev/null
+++ imaging-1.1.7-sane.patch
@@ -0,0 +13 @@
+--- Imaging-1.1.6/Sane/_sane.c.orig    2006-12-03 13:12:22.000000000 +0100
++++ Imaging-1.1.6/Sane/_sane.c 2009-02-28 11:41:19.000000000 +0200
+@@ -1152,8 +1152,8 @@
+ static PyObject *
+ PySane_get_devices(PyObject *self, PyObject *args)
+ {
+-  SANE_Device **devlist;
+-  SANE_Device *dev;
++  const SANE_Device **devlist;
++  const SANE_Device *dev;
+   SANE_Status st;
+   PyObject *list;
+   int local_only, i;

python-imaging.recipe: new
--- /dev/null
+++ python-imaging.recipe
@@ -0,0 +55 @@
+#
+# Copyright (c) 2010 Weasel GNU/Linux [Filip Brcic (brcha@xxxxxxxxxxxx)]
+# Distributed under the terms of the GNU General Public License v3
+#
+
+loadInstalled('python')
+class PythonImaging(CPackageRecipe, Python.VersionMixIn):
+    name = 'python-imaging'
+    version = '1.1.7'
+
+    buildRequires = [
+        'PyQt4:python', 'freetype:devel', 'lcms:devel',
+        'libjpeg:devel', 'python:devel', 'python:tk',
+        'sane-backends:devel', 'tcl:devel', 'tk:devel', 'zlib:devel',
+        ]
+
+    shortDesc  = 'Python Imaging Library (PIL)'
+    longDesc   = """
+The Python Imaging Library (PIL) adds image processing capabilities to
+your Python interpreter. This library supports many file formats, and
+provides powerful image processing and graphics capabilities.
+"""
+    url        = 'http://www.pythonware.com/products/pil/index.htm'
+    licenses   = [ 'as-is' ]
+    categories = [ 'Development/Python' ]
+
+    def setup(r):
+        r.setDefaultPython()
+
+        r.macros.archive_name = 'Imaging'
+        r.addArchive('http://www.effbot.org/downloads/')
+
+        for p in [ 'imaging-1.1.7-no-xv.patch',
+                   'imaging-1.1.7-sane.patch',
+                   'imaging-1.1.7-giftrans.patch',
+                   'imaging-1.1.7-missing-math.patch',
+                   ]:
+            r.addPatch(p)
+
+        r.Replace(('/usr/lib\"', '%(libdir)s\"'),
+                  ('\"lib\"', '\"%(lib)s\"'),
+                  'setup.py')
+
+        r.PythonSetup()
+        r.PythonSetup(dir='Sane')
+
+        r.Doc('Docs/*', dir='html')
+
+        # Headers
+        r.Install('libImaging/Imaging.h',
+                  'libImaging/ImPlatform.h',
+                  '%(includedir)s/python%(pyver)s/')
+
+        r.Doc('Scripts/*', dir='examples')
+        r.Doc('Sane/demo_*.py', dir='examples/sane')

imaging-1.1.7-giftrans.patch: new
--- /dev/null
+++ imaging-1.1.7-giftrans.patch
@@ -0,0 +14 @@
+--- Imaging-1.1.6.orig/PIL/GifImagePlugin.py    2006-12-03 11:37:15.000000000 
+0000
++++ Imaging-1.1.6/PIL/GifImagePlugin.py 2008-10-02 14:51:43.000000000 +0100
+@@ -352,6 +352,11 @@
+         for i in range(maxcolor):
+             s.append(chr(i) * 3)
+ 
++    if im.info.has_key('transparency'):
++        transparentIndex = im.info['transparency']
++        s.append('!' + chr(0xf9) + chr(4) + chr(1) + chr(0) + chr(0) +
++                 chr(transparentIndex) + chr(0))
++
+     return s
+ 
+ def getdata(im, offset = (0, 0), **params):

Imaging-1.1.7.tar.gz: new
imaging-1.1.7-no-xv.patch: new
--- /dev/null
+++ imaging-1.1.7-no-xv.patch
@@ -0,0 +18 @@
+--- PIL/ImageShow.py.old       2009-11-30 10:28:37.000000000 +0100
++++ PIL/ImageShow.py   2009-11-30 10:29:02.000000000 +0100
+@@ -149,13 +149,10 @@
+         def get_command_ex(self, file, title=None, **options):
+             # note: xv is pretty outdated.  most modern systems have
+             # imagemagick's display command instead.
+-            command = executable = "xv"
+-            if title:
+-                # FIXME: do full escaping
+-                command = command + " -name \"%s\"" % title
++            command = executable = "xdg-open"
+             return command, executable
+ 
+-    if which("xv"):
++    if which("xdg-open"):
+         register(XVViewer)
+ 
+ if __name__ == "__main__":


Committed by: brcha

Other related posts: