diff options
author | 2013-06-08 18:10:48 +0000 | |
---|---|---|
committer | 2013-06-08 18:10:48 +0000 | |
commit | e286c1355f764efbae0d7588f1484e39347c869c (patch) | |
tree | db4c4aa03dda588579ec0eecb2954c9cf488a070 | |
parent | Remove old (diff) | |
download | gentoo-2-e286c1355f764efbae0d7588f1484e39347c869c.tar.gz gentoo-2-e286c1355f764efbae0d7588f1484e39347c869c.tar.bz2 gentoo-2-e286c1355f764efbae0d7588f1484e39347c869c.zip |
Convert to python-r1. Fix PIL imports, bug 471506.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
-rw-r--r-- | dev-python/htmlgen/ChangeLog | 11 | ||||
-rw-r--r-- | dev-python/htmlgen/files/htmlgen-pillow.patch | 53 | ||||
-rw-r--r-- | dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild | 59 |
3 files changed, 120 insertions, 3 deletions
diff --git a/dev-python/htmlgen/ChangeLog b/dev-python/htmlgen/ChangeLog index 7a43bd13a21d..03182ed68f2d 100644 --- a/dev-python/htmlgen/ChangeLog +++ b/dev-python/htmlgen/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-python/htmlgen -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/htmlgen/ChangeLog,v 1.13 2010/11/08 17:08:41 arfrever Exp $ +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/htmlgen/ChangeLog,v 1.14 2013/06/08 18:10:48 floppym Exp $ + +*htmlgen-2.2.2-r1 (08 Jun 2013) + + 08 Jun 2013; Mike Gilbert <floppym@gentoo.org> +files/htmlgen-pillow.patch, + +htmlgen-2.2.2-r1.ebuild: + Convert to python-r1. Fix PIL imports, bug 471506. 08 Nov 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> htmlgen-2.2.2.ebuild: @@ -43,4 +49,3 @@ 08 Mar 2003; Alastair Tse <liquidx@gentoo.org> htmlgen-2.2.2.ebuild: initial ebuild. solves #10653. - diff --git a/dev-python/htmlgen/files/htmlgen-pillow.patch b/dev-python/htmlgen/files/htmlgen-pillow.patch new file mode 100644 index 000000000000..0c4f3daa27f4 --- /dev/null +++ b/dev-python/htmlgen/files/htmlgen-pillow.patch @@ -0,0 +1,53 @@ +Fix PIL imports for Pillow compat +https://bugs.gentoo.org/show_bug.cgi?id=471506 +--- HTMLgen/ImageH.py 1999-04-20 22:40:28.000000000 -0400 ++++ HTMLgen/ImageH.py 2013-06-08 14:00:49.261734532 -0400 +@@ -576,7 +576,7 @@ + "Display image (for debug purposes only)" + + try: +- import ImageTk ++ from PIL import ImageTk + ImageTk._show(self, title) + # note: caller must enter mainloop + except: +--- HTMLgen/ImagePaletteH.py 2013-06-08 13:56:03.476318926 -0400 ++++ HTMLgen/ImagePaletteH.py 2013-06-08 14:01:26.564871622 -0400 +@@ -87,7 +87,7 @@ + + if not lut: + try: +- import GimpPaletteFile ++ from PIL import GimpPaletteFile + fp.seek(0) + p = GimpPaletteFile.GimpPaletteFile(fp) + lut = p.getpalette() +@@ -96,7 +96,7 @@ + + if not lut: + try: +- import GimpGradientFile ++ from PIL import GimpGradientFile + fp.seek(0) + p = GimpGradientFile.GimpGradientFile(fp) + lut = p.getpalette() +@@ -105,7 +105,7 @@ + + if not lut: + try: +- import PaletteFile ++ from PIL import PaletteFile + fp.seek(0) + p = PaletteFile.PaletteFile(fp) + lut = p.getpalette() +--- HTMLgen/imgsize.py 1998-05-25 13:56:37.000000000 -0400 ++++ HTMLgen/imgsize.py 2013-06-08 14:01:48.731358969 -0400 +@@ -15,7 +15,7 @@ + + try: #Following switcheroo ensures that if PIL is installed it's used instead + # of the HTMLgen-bundled copies. +- import Image ++ from PIL import Image + except ImportError: + import ImageH + Image = ImageH diff --git a/dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild b/dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild new file mode 100644 index 000000000000..c800ae20a91f --- /dev/null +++ b/dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/htmlgen/htmlgen-2.2.2-r1.ebuild,v 1.1 2013/06/08 18:10:48 floppym Exp $ + +EAPI="5" +PYTHON_COMPAT=( python{2_5,2_6,2_7} ) + +inherit eutils python-r1 + +MY_P="HTMLgen" +DESCRIPTION="HTMLgen - Python modules for the generation of HTML documents" +HOMEPAGE="http://starship.python.net/crew/friedrich/HTMLgen/html/main.html" +SRC_URI="http://starship.python.net/crew/friedrich/${MY_P}.tgz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~x86" +IUSE="doc" + +DEPEND="virtual/python-imaging[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND}" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${P}-python-2.5.patch" + epatch "${FILESDIR}/${PN}-pillow.patch" +} + +src_compile() { + return 0 +} + +src_install() { + # doing this manually because their build scripts suck + local files="HTMLgen.py HTMLcolors.py HTMLutil.py HTMLcalendar.py + barchart.py colorcube.py imgsize.py NavLinks.py Formtools.py + ImageH.py ImageFileH.py ImagePaletteH.py GifImagePluginH.py + JpegImagePluginH.py PngImagePluginH.py" + + mkdir htmlgen || die + touch htmlgen/__init__.py || die + ln ${files} htmlgen/ || die + python_parallel_foreach_impl python_domodule htmlgen + + if use doc; then + # fix the image locations in the docs + sed -i -e "s;../image/;image/;g" html/* || die "sed failed" + dohtml html/* + dohtml -r image + fi + dodoc README +} + +pkg_postinst() { + ewarn "htmlgen now resides in its own subdirectory" + ewarn "so you need to do \"from htmlgen import HTMLgen\" instead of \"import HTMLgen\"" +} |