Adding canola specific patches
authoretrunko <eblima@gmail.com>
Mon, 10 Dec 2007 21:13:35 +0000 (21:13 +0000)
committeretrunko <eblima@gmail.com>
Mon, 10 Dec 2007 21:13:35 +0000 (21:13 +0000)
trunk/python-epsilon/debian/patches/01-python-epsilon-thumb-canola.patch [new file with mode: 0644]
trunk/python-epsilon/debian/patches/series [new file with mode: 0644]

diff --git a/trunk/python-epsilon/debian/patches/01-python-epsilon-thumb-canola.patch b/trunk/python-epsilon/debian/patches/01-python-epsilon-thumb-canola.patch
new file mode 100644 (file)
index 0000000..8b299d1
--- /dev/null
@@ -0,0 +1,76 @@
+diff -upr python-epsilon.orig/epsilon/epsilon.c_epsilon.pyx python-epsilon/epsilon/epsilon.c_epsilon.pyx
+--- python-epsilon.orig/epsilon/epsilon.c_epsilon.pyx  2007-11-24 22:50:53.000000000 -0300
++++ python-epsilon/epsilon/epsilon.c_epsilon.pyx       2007-12-10 18:06:21.000000000 -0300
+@@ -8,6 +8,7 @@ def init():
+ EPSILON_THUMB_NORMAL = 0
+ EPSILON_THUMB_LARGE = 1
++EPSILON_THUMB_CANOLA = 2
+ cdef class Epsilon:
+     """Epsilon thumbnail generator.
+@@ -21,7 +22,8 @@ cdef class Epsilon:
+         """Epsilon constructor.
+         @parm path: full path of image to process.
+-        @parm thumb_size: one of EPSILON_THUMB_NORMAL or EPSILON_THUMB_LARGE
++        @parm thumb_size: one of EPSILON_THUMB_NORMAL, EPSILON_THUMB_LARGE
++        or EPSILON_THUMB_CANOLA
+         @parm key: just used by edje to specify the part to process.
+         @parm resolution: just used by edje to specify render size.
+         """
+@@ -113,9 +115,10 @@ cdef class Epsilon:
+         """Specify thumbnail size, either EPSILON_THUMB_NORMAL (128x128) or
+            EPSILON_THUMB_LARGE (256x256).
+         """
+-        if value != EPSILON_THUMB_NORMAL and value != EPSILON_THUMB_LARGE:
+-            raise ValueError("value must be either EPSILON_THUMB_NORMAL or "
+-                             "EPSILON_THUMB_LARGE")
++        if value != EPSILON_THUMB_NORMAL and value != EPSILON_THUMB_LARGE and \
++           value != EPSILON_THUMB_CANOLA:
++            raise ValueError("value must be either EPSILON_THUMB_NORMAL, "
++                             "EPSILON_THUMB_LARGE or EPSILON_THUMB_CANOLA")
+         epsilon_thumb_size(self.obj, value)
+     def thumb_size_get(self):
+@@ -123,6 +126,8 @@ cdef class Epsilon:
+         if self.obj:
+             if self.obj.tw == EPSILON_THUMB_NORMAL:
+                 return EPSILON_THUMB_NORMAL
++            elif self.obj.tw == EPSILON_THUMB_CANOLA:
++                return EPSILON_THUMB_CANOLA
+             else:
+                 return EPSILON_THUMB_LARGE
+diff -upr python-epsilon.orig/epsilon/epsilon.request.pyx python-epsilon/epsilon/epsilon.request.pyx
+--- python-epsilon.orig/epsilon/epsilon.request.pyx    2007-11-24 22:50:53.000000000 -0300
++++ python-epsilon/epsilon/epsilon.request.pyx 2007-12-10 18:06:21.000000000 -0300
+@@ -13,6 +13,7 @@ def init():
+ EPSILON_THUMB_NORMAL = 0
+ EPSILON_THUMB_LARGE = 1
++EPSILON_THUMB_CANOLA = 2
+ cdef class Request:
+     """Request epsilon_thumbd the thumbnail for the given image at given size.
+@@ -37,9 +38,10 @@ cdef class Request:
+         if not callable(func):
+             raise TypeError("Parameter 'func' must be callable")
+-        if size != EPSILON_THUMB_NORMAL and size != EPSILON_THUMB_LARGE:
++        if size != EPSILON_THUMB_NORMAL and size != EPSILON_THUMB_LARGE and \
++           size != EPSILON_THUMB_CANOLA:
+             raise ValueError("Invalid size, must be EPSILON_THUMB_NORMAL or "
+-                             "EPSILON_THUMB_LARGE")
++                             "EPSILON_THUMB_LARGE or EPSILON_THUMB_CANOLA")
+         if self.obj == NULL:
+             self.func = func
+diff -upr python-epsilon.orig/epsilon/__init__.py python-epsilon/epsilon/__init__.py
+--- python-epsilon.orig/epsilon/__init__.py    2007-11-01 15:46:42.000000000 -0300
++++ python-epsilon/epsilon/__init__.py 2007-12-10 18:06:21.000000000 -0300
+@@ -1,3 +1,3 @@
+ #!/usr/bin/env python
+-from c_epsilon import init, EPSILON_THUMB_NORMAL, EPSILON_THUMB_LARGE, Epsilon
++from c_epsilon import init, EPSILON_THUMB_NORMAL, EPSILON_THUMB_LARGE, EPSILON_THUMB_CANOLA, Epsilon
diff --git a/trunk/python-epsilon/debian/patches/series b/trunk/python-epsilon/debian/patches/series
new file mode 100644 (file)
index 0000000..83b4898
--- /dev/null
@@ -0,0 +1,2 @@
+01-python-epsilon-thumb-canola.patch
+series