summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirkjan Ochtman <djc@gentoo.org>2009-11-30 09:42:33 +0000
committerDirkjan Ochtman <djc@gentoo.org>2009-11-30 09:42:33 +0000
commitd2ee8a203bf05b7bf4902321b64bf857d6045ce0 (patch)
tree60b7cc2ed91a03fd609e9c716abbd31033ca1673 /dev-python
parentSign manifest (diff)
downloadgentoo-2-d2ee8a203bf05b7bf4902321b64bf857d6045ce0.tar.gz
gentoo-2-d2ee8a203bf05b7bf4902321b64bf857d6045ce0.tar.bz2
gentoo-2-d2ee8a203bf05b7bf4902321b64bf857d6045ce0.zip
Version bump dev-python/imaging-1.1.7.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/imaging/ChangeLog10
-rw-r--r--dev-python/imaging/files/imaging-1.1.7-giftrans.patch14
-rw-r--r--dev-python/imaging/files/imaging-1.1.7-missing-math.patch20
-rw-r--r--dev-python/imaging/files/imaging-1.1.7-no-xv.patch18
-rw-r--r--dev-python/imaging/files/imaging-1.1.7-sane.patch13
-rw-r--r--dev-python/imaging/imaging-1.1.7.ebuild95
6 files changed, 169 insertions, 1 deletions
diff --git a/dev-python/imaging/ChangeLog b/dev-python/imaging/ChangeLog
index aa333ddf22b3..4518b733e391 100644
--- a/dev-python/imaging/ChangeLog
+++ b/dev-python/imaging/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/imaging
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.51 2009/11/14 16:44:15 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/imaging/ChangeLog,v 1.52 2009/11/30 09:42:33 djc Exp $
+
+*imaging-1.1.7 (30 Nov 2009)
+
+ 30 Nov 2009; Dirkjan Ochtman <djc@gentoo.org> +imaging-1.1.7.ebuild,
+ +files/imaging-1.1.7-giftrans.patch,
+ +files/imaging-1.1.7-missing-math.patch, +files/imaging-1.1.7-no-xv.patch,
+ +files/imaging-1.1.7-sane.patch:
+ Version bump to 1.1.7. TIFF endianness seems to be included.
14 Nov 2009; Raúl Porcel <armin76@gentoo.org> imaging-1.1.6-r1.ebuild:
ia64/sparc stable wrt #287560
diff --git a/dev-python/imaging/files/imaging-1.1.7-giftrans.patch b/dev-python/imaging/files/imaging-1.1.7-giftrans.patch
new file mode 100644
index 000000000000..1a109d28eee0
--- /dev/null
+++ b/dev-python/imaging/files/imaging-1.1.7-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.7-missing-math.patch b/dev-python/imaging/files/imaging-1.1.7-missing-math.patch
new file mode 100644
index 000000000000..f4d6167eeccc
--- /dev/null
+++ b/dev-python/imaging/files/imaging-1.1.7-missing-math.patch
@@ -0,0 +1,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
+
diff --git a/dev-python/imaging/files/imaging-1.1.7-no-xv.patch b/dev-python/imaging/files/imaging-1.1.7-no-xv.patch
new file mode 100644
index 000000000000..1cbaf515bd4a
--- /dev/null
+++ b/dev-python/imaging/files/imaging-1.1.7-no-xv.patch
@@ -0,0 +1,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__":
diff --git a/dev-python/imaging/files/imaging-1.1.7-sane.patch b/dev-python/imaging/files/imaging-1.1.7-sane.patch
new file mode 100644
index 000000000000..4970e50033a4
--- /dev/null
+++ b/dev-python/imaging/files/imaging-1.1.7-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/imaging-1.1.7.ebuild b/dev-python/imaging/imaging-1.1.7.ebuild
new file mode 100644
index 000000000000..ce194b9ffd42
--- /dev/null
+++ b/dev-python/imaging/imaging-1.1.7.ebuild
@@ -0,0 +1,95 @@
+# 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.7.ebuild,v 1.1 2009/11/30 09:42:33 djc Exp $
+
+EAPI="2"
+SUPPORT_PYTHON_ABIS="1"
+
+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 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
+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}"
+
+RESTRICT_PYTHON_ABIS="3*"
+
+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}-missing-math.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() {
+ tests() {
+ PYTHONPATH="$(ls -d build-${PYTHON_ABI}/lib.*)" "${python}" selftest.py
+ }
+ python_execute_function tests
+}
+
+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.
+ install_headers() {
+ insinto "$(python_get_includedir)"
+ doins libImaging/Imaging.h
+ doins libImaging/ImPlatform.h
+ }
+ python_execute_function install_headers
+
+ 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
+}