diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2009-03-20 18:52:16 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2009-03-20 18:52:16 +0000 |
commit | e9c18bd6ab49d07cf26015278ea6b04456d06a9d (patch) | |
tree | aa1cdf6922d10289562123b9d3a9bae216a0f685 /dev-python/imaging | |
parent | whitespace (diff) | |
download | gentoo-2-e9c18bd6ab49d07cf26015278ea6b04456d06a9d.tar.gz gentoo-2-e9c18bd6ab49d07cf26015278ea6b04456d06a9d.tar.bz2 gentoo-2-e9c18bd6ab49d07cf26015278ea6b04456d06a9d.zip |
Added patches for GIF transparency, replace image viewer from xv to desktop default one with xdg-open, support for TIFF 16 bit endian images (bug #180549, thanks Tamas Haraszti). Also added unit test. Cleaned old packages
(Portage version: 2.2_rc25/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/imaging')
-rw-r--r-- | dev-python/imaging/ChangeLog | 15 | ||||
-rw-r--r-- | dev-python/imaging/files/imaging-1.1.4-fPIC.patch | 11 | ||||
-rw-r--r-- | dev-python/imaging/files/imaging-1.1.4-ft-2.1.9.patch | 10 | ||||
-rw-r--r-- | dev-python/imaging/files/imaging-1.1.4-setup.py.patch | 11 | ||||
-rw-r--r-- | dev-python/imaging/files/imaging-1.1.6-giftrans.patch | 14 | ||||
-rw-r--r-- | dev-python/imaging/files/imaging-1.1.6-no-xv.patch | 13 | ||||
-rw-r--r-- | dev-python/imaging/files/imaging-1.1.6-sane.patch | 13 | ||||
-rw-r--r-- | dev-python/imaging/files/imaging-1.1.6-tiffendian.patch | 228 | ||||
-rw-r--r-- | dev-python/imaging/imaging-1.1.5.ebuild | 65 | ||||
-rw-r--r-- | dev-python/imaging/imaging-1.1.6-r1.ebuild | 86 | ||||
-rw-r--r-- | dev-python/imaging/imaging-1.1.6.ebuild | 22 |
11 files changed, 374 insertions, 114 deletions
diff --git a/dev-python/imaging/ChangeLog b/dev-python/imaging/ChangeLog index 6b201ccd771f..16c456b6a3a9 100644 --- a/dev-python/imaging/ChangeLog +++ b/dev-python/imaging/ChangeLog @@ -1,6 +1,19 @@ # ChangeLog for dev-python/imaging # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.38 2009/03/07 21:38:45 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.39 2009/03/20 18:52:16 bicatali Exp $ + +*imaging-1.1.6-r1 (20 Mar 2009) + + 20 Mar 2009; Sébastien Fabbro <bicatali@gentoo.org> + -files/imaging-1.1.4-fPIC.patch, -files/imaging-1.1.4-ft-2.1.9.patch, + -files/imaging-1.1.4-setup.py.patch, +files/imaging-1.1.6-giftrans.patch, + +files/imaging-1.1.6-no-xv.patch, +files/imaging-1.1.6-sane.patch, + +files/imaging-1.1.6-tiffendian.patch, -imaging-1.1.5.ebuild, + imaging-1.1.6.ebuild, +imaging-1.1.6-r1.ebuild: + Added patches for GIF transparency, replace image viewer from xv to + desktop default one with xdg-open, support for TIFF 16 bit endian images + (bug #180549, thanks Tamas Haraszti). Also added unit test. Cleaned old + packages 07 Mar 2009; Joseph Jezak <josejx@gentoo.org> imaging-1.1.6.ebuild: Marked ppc stable for bug #182425. diff --git a/dev-python/imaging/files/imaging-1.1.4-fPIC.patch b/dev-python/imaging/files/imaging-1.1.4-fPIC.patch deleted file mode 100644 index f39e0870bf4c..000000000000 --- a/dev-python/imaging/files/imaging-1.1.4-fPIC.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libImaging/Makefile.in 2004-04-18 16:53:00.242241087 +0000 -+++ libImaging/Makefile.in 2004-04-18 17:02:49.245737559 +0000 -@@ -128,5 +128,8 @@ - - # -------------------------------------------------------------------- - -+%.o: %.c -+ ${CC} ${CFLAGS} -fPIC -c $< -o $@ -+ - # DO NOT DELETE THIS LINE -- mkdep uses it. - # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/dev-python/imaging/files/imaging-1.1.4-ft-2.1.9.patch b/dev-python/imaging/files/imaging-1.1.4-ft-2.1.9.patch deleted file mode 100644 index c845709fd5e2..000000000000 --- a/dev-python/imaging/files/imaging-1.1.4-ft-2.1.9.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- work/Imaging-1.1.4/_imagingft.c 2003-04-22 18:11:25.000000000 +0200 -+++ work/Imaging-1.1.4/_imagingft.c.new 2004-10-01 18:30:05.990905256 +0200 -@@ -15,6 +15,7 @@ - #include "Python.h" - #include "Imaging.h" - -+#include <ft2build.h> - #include <freetype/freetype.h> - - #if PY_VERSION_HEX < 0x01060000 diff --git a/dev-python/imaging/files/imaging-1.1.4-setup.py.patch b/dev-python/imaging/files/imaging-1.1.4-setup.py.patch deleted file mode 100644 index d115d2b68ecc..000000000000 --- a/dev-python/imaging/files/imaging-1.1.4-setup.py.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- setup.py.old 2003-07-15 22:44:54.000000000 +0100 -+++ setup.py 2003-07-15 22:46:29.000000000 +0100 -@@ -229,6 +229,8 @@ - INCLUDE_DIRS = ["libImaging"] - LIBRARY_DIRS = [] - LIBRARIES = [] -+ EXTRA_COMPILE_ARGS = None -+ EXTRA_LINK_ARGS = None - have_freetype = 1 # Assume we have it, unless proven otherwise - - # use source distribution, if available diff --git a/dev-python/imaging/files/imaging-1.1.6-giftrans.patch b/dev-python/imaging/files/imaging-1.1.6-giftrans.patch new file mode 100644 index 000000000000..1a109d28eee0 --- /dev/null +++ b/dev-python/imaging/files/imaging-1.1.6-giftrans.patch @@ -0,0 +1,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): diff --git a/dev-python/imaging/files/imaging-1.1.6-no-xv.patch b/dev-python/imaging/files/imaging-1.1.6-no-xv.patch new file mode 100644 index 000000000000..fef002193fd0 --- /dev/null +++ b/dev-python/imaging/files/imaging-1.1.6-no-xv.patch @@ -0,0 +1,13 @@ +--- PIL/Image.py.orig 2009-03-20 18:19:52.184274983 +0000 ++++ PIL/Image.py 2009-03-20 18:20:48.605088504 +0000 +@@ -2065,9 +2065,7 @@ + else: + format = None + if not command: +- command = "xv" +- if title: +- command = command + " -name \"%s\"" % title ++ command = "xdg-open" + + if image.mode == "I;16": + # @PIL88 @PIL101 diff --git a/dev-python/imaging/files/imaging-1.1.6-sane.patch b/dev-python/imaging/files/imaging-1.1.6-sane.patch new file mode 100644 index 000000000000..4970e50033a4 --- /dev/null +++ b/dev-python/imaging/files/imaging-1.1.6-sane.patch @@ -0,0 +1,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; diff --git a/dev-python/imaging/files/imaging-1.1.6-tiffendian.patch b/dev-python/imaging/files/imaging-1.1.6-tiffendian.patch new file mode 100644 index 000000000000..df45d6b6c08b --- /dev/null +++ b/dev-python/imaging/files/imaging-1.1.6-tiffendian.patch @@ -0,0 +1,228 @@ +--- PIL/TiffImagePlugin.py.orig 2009-03-14 17:45:57.971128978 +0000 ++++ PIL/TiffImagePlugin.py 2009-03-14 17:46:22.789196585 +0000 +@@ -65,8 +65,9 @@ + return ord(c[o]) + (ord(c[o+1])<<8) + def il32(c,o=0): + return ord(c[o]) + (ord(c[o+1])<<8) + (ord(c[o+2])<<16) + (ord(c[o+3])<<24) ++ + def ol16(i): +- return chr(i&255) + chr(i>>8&255) ++ return chr(i>>8&255) + chr(i&255) + def ol32(i): + return chr(i&255) + chr(i>>8&255) + chr(i>>16&255) + chr(i>>24&255) + +@@ -75,6 +76,11 @@ + def ib32(c,o=0): + return ord(c[o+3]) + (ord(c[o+2])<<8) + (ord(c[o+1])<<16) + (ord(c[o])<<24) + ++def ob16(i): ++ return chr(i>>8&255) + chr(i&255) ++def ob32(i): ++ return chr(i>>24&255) + chr(i>>16&255) + chr(i>>8&255) + chr(i&255) ++ + # a few tag names, just to make the code below a bit more readable + IMAGEWIDTH = 256 + IMAGELENGTH = 257 +@@ -117,42 +123,76 @@ + } + + OPEN_INFO = { +- # (PhotoInterpretation, SampleFormat, FillOrder, BitsPerSample, ++ # (ByteOrder, PhotoInterpretation, SampleFormat, FillOrder, BitsPerSample, + # ExtraSamples) => mode, rawmode +- (0, 1, 1, (1,), ()): ("1", "1;I"), +- (0, 1, 2, (1,), ()): ("1", "1;IR"), +- (0, 1, 1, (8,), ()): ("L", "L;I"), +- (0, 1, 2, (8,), ()): ("L", "L;IR"), +- (1, 1, 1, (1,), ()): ("1", "1"), +- (1, 1, 2, (1,), ()): ("1", "1;R"), +- (1, 1, 1, (8,), ()): ("L", "L"), +- (1, 1, 1, (8,8), (2,)): ("LA", "LA"), +- (1, 1, 2, (8,), ()): ("L", "L;R"), +- (1, 1, 1, (16,), ()): ("I;16", "I;16"), +- (1, 2, 1, (16,), ()): ("I;16S", "I;16S"), +- (1, 2, 1, (32,), ()): ("I", "I;32S"), +- (1, 3, 1, (32,), ()): ("F", "F;32F"), +- (2, 1, 1, (8,8,8), ()): ("RGB", "RGB"), +- (2, 1, 2, (8,8,8), ()): ("RGB", "RGB;R"), +- (2, 1, 1, (8,8,8,8), (0,)): ("RGBX", "RGBX"), +- (2, 1, 1, (8,8,8,8), (1,)): ("RGBA", "RGBa"), +- (2, 1, 1, (8,8,8,8), (2,)): ("RGBA", "RGBA"), +- (2, 1, 1, (8,8,8,8), (999,)): ("RGBA", "RGBA"), # corel draw 10 +- (3, 1, 1, (1,), ()): ("P", "P;1"), +- (3, 1, 2, (1,), ()): ("P", "P;1R"), +- (3, 1, 1, (2,), ()): ("P", "P;2"), +- (3, 1, 2, (2,), ()): ("P", "P;2R"), +- (3, 1, 1, (4,), ()): ("P", "P;4"), +- (3, 1, 2, (4,), ()): ("P", "P;4R"), +- (3, 1, 1, (8,), ()): ("P", "P"), +- (3, 1, 1, (8,8), (2,)): ("PA", "PA"), +- (3, 1, 2, (8,), ()): ("P", "P;R"), +- (5, 1, 1, (8,8,8,8), ()): ("CMYK", "CMYK"), +- (6, 1, 1, (8,8,8), ()): ("YCbCr", "YCbCr"), +- (8, 1, 1, (8,8,8), ()): ("LAB", "LAB"), ++ ('l', 0, 1, 1, (1,), ()): ("1", "1;I"), ++ ('l', 0, 1, 2, (1,), ()): ("1", "1;IR"), ++ ('l', 0, 1, 1, (8,), ()): ("L", "L;I"), ++ ('l', 0, 1, 2, (8,), ()): ("L", "L;IR"), ++ ('l', 1, 1, 1, (1,), ()): ("1", "1"), ++ ('l', 1, 1, 2, (1,), ()): ("1", "1;R"), ++ ('l', 1, 1, 1, (8,), ()): ("L", "L"), ++ ('l', 1, 1, 1, (8,8), (2,)): ("LA", "LA"), ++ ('l', 1, 1, 2, (8,), ()): ("L", "L;R"), ++ ('l', 1, 1, 1, (16,), ()): ("I;16", "I;16"), ++ ('l', 1, 2, 1, (16,), ()): ("I;16S", "I;16S"), ++ ('l', 1, 2, 1, (32,), ()): ("I", "I;32S"), ++ ('l', 1, 3, 1, (32,), ()): ("F", "F;32F"), ++ ('l', 2, 1, 1, (8,8,8), ()): ("RGB", "RGB"), ++ ('l', 2, 1, 2, (8,8,8), ()): ("RGB", "RGB;R"), ++ ('l', 2, 1, 1, (8,8,8,8), (0,)): ("RGBX", "RGBX"), ++ ('l', 2, 1, 1, (8,8,8,8), (1,)): ("RGBA", "RGBa"), ++ ('l', 2, 1, 1, (8,8,8,8), (2,)): ("RGBA", "RGBA"), ++ ('l', 2, 1, 1, (8,8,8,8), (999,)): ("RGBA", "RGBA"), # corel draw 10 ++ ('l', 3, 1, 1, (1,), ()): ("P", "P;1"), ++ ('l', 3, 1, 2, (1,), ()): ("P", "P;1R"), ++ ('l', 3, 1, 1, (2,), ()): ("P", "P;2"), ++ ('l', 3, 1, 2, (2,), ()): ("P", "P;2R"), ++ ('l', 3, 1, 1, (4,), ()): ("P", "P;4"), ++ ('l', 3, 1, 2, (4,), ()): ("P", "P;4R"), ++ ('l', 3, 1, 1, (8,), ()): ("P", "P"), ++ ('l', 3, 1, 1, (8,8), (2,)): ("PA", "PA"), ++ ('l', 3, 1, 2, (8,), ()): ("P", "P;R"), ++ ('l', 5, 1, 1, (8,8,8,8), ()): ("CMYK", "CMYK"), ++ ('l', 6, 1, 1, (8,8,8), ()): ("YCbCr", "YCbCr"), ++ ('l', 8, 1, 1, (8,8,8), ()): ("LAB", "LAB"), ++ ++ ('b', 0, 1, 1, (1,), ()): ("1", "1;I"), ++ ('b', 0, 1, 2, (1,), ()): ("1", "1;IR"), ++ ('b', 0, 1, 1, (8,), ()): ("L", "L;I"), ++ ('b', 0, 1, 2, (8,), ()): ("L", "L;IR"), ++ ('b', 1, 1, 1, (1,), ()): ("1", "1"), ++ ('b', 1, 1, 2, (1,), ()): ("1", "1;R"), ++ ('b', 1, 1, 1, (8,), ()): ("L", "L"), ++ ('b', 1, 1, 1, (8,8), (2,)): ("LA", "LA"), ++ ('b', 1, 1, 2, (8,), ()): ("L", "L;R"), ++ ('b', 1, 1, 1, (16,), ()): ("I;16B", "I;16B"), ++ ('b', 1, 2, 1, (16,), ()): ("I;16BS", "I;16BS"), ++ ('b', 1, 2, 1, (32,), ()): ("I;32BS", "I;32BS"), ++ ('b', 1, 3, 1, (32,), ()): ("F;32BF", "F;32BF"), ++ ('b', 2, 1, 1, (8,8,8), ()): ("RGB", "RGB"), ++ ('b', 2, 1, 2, (8,8,8), ()): ("RGB", "RGB;R"), ++ ('b', 2, 1, 1, (8,8,8,8), (0,)): ("RGBX", "RGBX"), ++ ('b', 2, 1, 1, (8,8,8,8), (1,)): ("RGBA", "RGBa"), ++ ('b', 2, 1, 1, (8,8,8,8), (2,)): ("RGBA", "RGBA"), ++ ('b', 2, 1, 1, (8,8,8,8), (999,)): ("RGBA", "RGBA"), # corel draw 10 ++ ('b', 3, 1, 1, (1,), ()): ("P", "P;1"), ++ ('b', 3, 1, 2, (1,), ()): ("P", "P;1R"), ++ ('b', 3, 1, 1, (2,), ()): ("P", "P;2"), ++ ('b', 3, 1, 2, (2,), ()): ("P", "P;2R"), ++ ('b', 3, 1, 1, (4,), ()): ("P", "P;4"), ++ ('b', 3, 1, 2, (4,), ()): ("P", "P;4R"), ++ ('b', 3, 1, 1, (8,), ()): ("P", "P"), ++ ('b', 3, 1, 1, (8,8), (2,)): ("PA", "PA"), ++ ('b', 3, 1, 2, (8,), ()): ("P", "P;R"), ++ ('b', 5, 1, 1, (8,8,8,8), ()): ("CMYK", "CMYK"), ++ ('b', 6, 1, 1, (8,8,8), ()): ("YCbCr", "YCbCr"), ++ ('b', 8, 1, 1, (8,8,8), ()): ("LAB", "LAB"), + } + + PREFIXES = ["MM\000\052", "II\052\000", "II\xBC\000"] ++PREFIX_TO_BYTEORDER = {"MM":"b", "II":"l"} ++BYTEORDER_TO_PREFIX = {"b":"MM", "l":"II"} + + def _accept(prefix): + return prefix[:4] in PREFIXES +@@ -165,16 +205,19 @@ + # represents a TIFF tag directory. to speed things up, + # we don't decode tags unless they're asked for. + +- def __init__(self, prefix="II"): ++ def __init__(self, prefix): + self.prefix = prefix[:2] + if self.prefix == "MM": + self.i16, self.i32 = ib16, ib32 +- # FIXME: save doesn't yet support big-endian mode... ++ self.o16, self.o32 = ob16, ob32 ++ + elif self.prefix == "II": + self.i16, self.i32 = il16, il32 + self.o16, self.o32 = ol16, ol32 + else: + raise SyntaxError("not a TIFF IFD") ++ self.byteorder = PREFIX_TO_BYTEORDER[self.prefix] ++ + self.reset() + + def reset(self): +@@ -555,7 +598,7 @@ + + # mode: check photometric interpretation and bits per pixel + key = ( +- photo, format, fillorder, ++ self.tag.byteorder, photo, format, fillorder, + self.tag.get(BITSPERSAMPLE, (1,)), + self.tag.get(EXTRASAMPLES, ()) + ) +@@ -636,26 +679,31 @@ + # + # -------------------------------------------------------------------- + # Write TIFF files +- ++# little endian is default except for image modes with explict big endian byte-order + # little endian is default + + SAVE_INFO = { +- # mode => rawmode, photometrics, sampleformat, bitspersample, extra +- "1": ("1", 1, 1, (1,), None), +- "L": ("L", 1, 1, (8,), None), +- "LA": ("LA", 1, 1, (8,8), 2), +- "P": ("P", 3, 1, (8,), None), +- "PA": ("PA", 3, 1, (8,8), 2), +- "I": ("I;32S", 1, 2, (32,), None), +- "I;16": ("I;16", 1, 1, (16,), None), +- "I;16S": ("I;16S", 1, 2, (16,), None), +- "F": ("F;32F", 1, 3, (32,), None), +- "RGB": ("RGB", 2, 1, (8,8,8), None), +- "RGBX": ("RGBX", 2, 1, (8,8,8,8), 0), +- "RGBA": ("RGBA", 2, 1, (8,8,8,8), 2), +- "CMYK": ("CMYK", 5, 1, (8,8,8,8), None), +- "YCbCr": ("YCbCr", 6, 1, (8,8,8), None), +- "LAB": ("LAB", 8, 1, (8,8,8), None), ++ # mode => rawmode, byteorder, photometrics, sampleformat, bitspersample, extra ++ "1": ("1", 'l', 1, 1, (1,), None), ++ "L": ("L", 'l', 1, 1, (8,), None), ++ "LA": ("LA", 'l', 1, 1, (8,8), 2), ++ "P": ("P", 'l', 3, 1, (8,), None), ++ "PA": ("PA", 'l', 3, 1, (8,8), 2), ++ "I": ("I;32S", 'l', 1, 2, (32,), None), ++ "I;16": ("I;16", 'l', 1, 1, (16,), None), ++ "I;16S": ("I;16S", 'l', 1, 2, (16,), None), ++ "F": ("F;32F", 'l', 1, 3, (32,), None), ++ "RGB": ("RGB", 'l', 2, 1, (8,8,8), None), ++ "RGBX": ("RGBX", 'l', 2, 1, (8,8,8,8), 0), ++ "RGBA": ("RGBA", 'l', 2, 1, (8,8,8,8), 2), ++ "CMYK": ("CMYK", 'l', 5, 1, (8,8,8,8), None), ++ "YCbCr": ("YCbCr", 'l', 6, 1, (8,8,8), None), ++ "LAB": ("LAB", 'l', 8, 1, (8,8,8), None), ++ ++ "I;32BS": ("I;32BS", 'b', 1, 2, (32,), None), ++ "I;16B": ("I;16B", 'b', 1, 1, (16,), None), ++ "I;16BS": ("I;16BS", 'b', 1, 2, (16,), None), ++ "F;32BF": ("F;32BF", 'b', 1, 3, (32,), None), + } + + def _cvt_res(value): +@@ -671,11 +719,11 @@ + def _save(im, fp, filename): + + try: +- rawmode, photo, format, bits, extra = SAVE_INFO[im.mode] ++ rawmode, byteorder, photo, format, bits, extra = SAVE_INFO[im.mode] + except KeyError: + raise IOError, "cannot write mode %s as TIFF" % im.mode + +- ifd = ImageFileDirectory() ++ ifd = ImageFileDirectory(BYTEORDER_TO_PREFIX[byteorder]) + + # tiff header (write via IFD to get everything right) + fp.write(ifd.prefix + ifd.o16(42) + ifd.o32(8)) diff --git a/dev-python/imaging/imaging-1.1.5.ebuild b/dev-python/imaging/imaging-1.1.5.ebuild deleted file mode 100644 index dd7ea6de82b3..000000000000 --- a/dev-python/imaging/imaging-1.1.5.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/imaging-1.1.5.ebuild,v 1.15 2007/07/04 20:05:58 hawking Exp $ - -inherit distutils eutils multilib - -MY_P=${P/imaging/Imaging} -S=${WORKDIR}/${MY_P} - -DESCRIPTION="Python Imaging Library (PIL)" -HOMEPAGE="http://www.pythonware.com/products/pil/index.htm" -SRC_URI="http://www.effbot.org/downloads/${MY_P}.tar.gz" - -LICENSE="as-is" -SLOT="0" -KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86" -IUSE="X tk scanner doc" - -DEPEND="virtual/python - >=media-libs/jpeg-6a - >=sys-libs/zlib-0.95 - >=media-libs/freetype-2.1.5 - tk? ( dev-lang/tk ) - scanner? ( media-gfx/sane-backends ) - X? ( media-gfx/xv )" - -src_unpack() { - unpack ${A} - # look for 64bit libs in lib64 - sed -i -e "s:\"/usr/lib\":\"/usr/$(get_libdir)\":" \ - ${S}/setup.py || die "sed failed" -} - -src_compile() { - distutils_src_compile - if use scanner ; then - cd ${S}/Sane - distutils_src_compile - fi -} - -src_install() { - - local DOCS="CHANGES* CONTENTS" - distutils_src_install - - if use scanner ; then - cd ${S}/Sane - local DOCS="CHANGES sanedoc.txt" - docinto "sane" - distutils_src_install - cd ${S} - fi - - # install headers required by media-gfx/sketch - distutils_python_version - insinto "/usr/include/python${PYVER}" - doins libImaging/Imaging.h - doins libImaging/ImPlatform.h - - if use doc ; then - insinto "/usr/share/doc/${PF}" - doins -r Docs - fi -} diff --git a/dev-python/imaging/imaging-1.1.6-r1.ebuild b/dev-python/imaging/imaging-1.1.6-r1.ebuild new file mode 100644 index 000000000000..0cc07634883a --- /dev/null +++ b/dev-python/imaging/imaging-1.1.6-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/imaging-1.1.6-r1.ebuild,v 1.1 2009/03/20 18:52:16 bicatali Exp $ + +EAPI=2 +inherit eutils distutils + +MY_P=Imaging-${PV} + +DESCRIPTION="Python Imaging Library (PIL)" +HOMEPAGE="http://www.pythonware.com/products/pil/index.htm" +SRC_URI="http://www.effbot.org/downloads/${MY_P}.tar.gz" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="doc examples scanner tk X" + +DEPEND="media-libs/jpeg + media-libs/freetype:2 + tk? ( dev-lang/python[tk?] ) + scanner? ( media-gfx/sane-backends ) + X? ( x11-misc/xdg-utils )" +RDEPEND="${DEPEND}" + +PYTHON_MODNAME=PIL +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-no-xv.patch + epatch "${FILESDIR}"/${P}-sane.patch + epatch "${FILESDIR}"/${P}-giftrans.patch + epatch "${FILESDIR}"/${P}-tiffendian.patch + sed -i \ + -e "s:/usr/lib\":/usr/$(get_libdir)\":" \ + -e "s:\"lib\":\"$(get_libdir)\":g" \ + setup.py || die "sed failed" + if ! use tk ; then + # Make the test always fail + sed -i \ + -e 's/import _tkinter/raise ImportError/' \ + setup.py || die "sed failed" + fi +} + +src_compile() { + distutils_src_compile + if use scanner ; then + cd "${S}/Sane" + distutils_src_compile + fi +} + +src_test() { + "${python}" selftest.py || die +} + +src_install() { + local DOCS="CHANGES CONTENTS" + distutils_src_install + + use doc && dohtml Docs/* + + if use scanner ; then + cd "${S}/Sane" + docinto sane + local DOCS="CHANGES sanedoc.txt" + distutils_src_install + cd "${S}" + fi + + # install headers required by media-gfx/sketch + distutils_python_version + insinto /usr/include/python${PYVER} + doins libImaging/Imaging.h + doins libImaging/ImPlatform.h + + if use examples ; then + insinto /usr/share/doc/${PF}/examples + doins Scripts/* + if use scanner ; then + insinto /usr/share/doc/${PF}/examples/sane + doins Sane/demo_*.py + fi + fi +} diff --git a/dev-python/imaging/imaging-1.1.6.ebuild b/dev-python/imaging/imaging-1.1.6.ebuild index fd8dfcdbeab9..f67f19960e28 100644 --- a/dev-python/imaging/imaging-1.1.6.ebuild +++ b/dev-python/imaging/imaging-1.1.6.ebuild @@ -1,8 +1,9 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/imaging-1.1.6.ebuild,v 1.7 2009/03/07 21:38:45 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/imaging-1.1.6.ebuild,v 1.8 2009/03/20 18:52:16 bicatali Exp $ -inherit distutils multilib +EAPI=2 +inherit eutils distutils MY_P=Imaging-${PV} @@ -17,26 +18,15 @@ IUSE="doc examples scanner tk X" DEPEND=">=media-libs/jpeg-6a >=media-libs/freetype-2.1.5 - tk? ( dev-lang/tk ) + tk? ( dev-lang/python[tk?] ) scanner? ( media-gfx/sane-backends ) X? ( media-gfx/xv )" RDEPEND="${DEPEND}" PYTHON_MODNAME=PIL -S=${WORKDIR}/${MY_P} - -pkg_setup() { - if use tk && ! built_with_use dev-lang/python tk; then - eerror "Python has to be compiled with tkinter support." - eerror "Please re-emerge python with the 'tk' USE-flag set." - die "Missing USE-flag for dev-lang/python" - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" +S="${WORKDIR}/${MY_P}" +src_prepare() { sed -i \ -e "s:/lib\":/$(get_libdir)\":" \ -e "s:\"lib\":\"$(get_libdir)\":" \ |