summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Martins <rafaelmartins@gentoo.org>2011-07-30 04:39:42 +0000
committerRafael Martins <rafaelmartins@gentoo.org>2011-07-30 04:39:42 +0000
commit59e792fce81e60a1e1133c8523278c33bffa228b (patch)
treeffb4231623748dd1eb4fbc80c8b494e333235501 /dev-python/rst2pdf
parentVersion bump. Assorted bug fixes (diff)
downloadgentoo-2-59e792fce81e60a1e1133c8523278c33bffa228b.tar.gz
gentoo-2-59e792fce81e60a1e1133c8523278c33bffa228b.tar.bz2
gentoo-2-59e792fce81e60a1e1133c8523278c33bffa228b.zip
Revision bump. Fixed runtime errors when using >=docutils-0.8 (bug #369943).
(Portage version: 2.2.0_alpha46/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/rst2pdf')
-rw-r--r--dev-python/rst2pdf/ChangeLog8
-rw-r--r--dev-python/rst2pdf/files/rst2pdf-0.16_docutils-0.8.patch52
-rw-r--r--dev-python/rst2pdf/rst2pdf-0.16-r1.ebuild53
3 files changed, 112 insertions, 1 deletions
diff --git a/dev-python/rst2pdf/ChangeLog b/dev-python/rst2pdf/ChangeLog
index f65fb11150ff..ec636cacf46d 100644
--- a/dev-python/rst2pdf/ChangeLog
+++ b/dev-python/rst2pdf/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-python/rst2pdf
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/rst2pdf/ChangeLog,v 1.15 2011/01/15 18:13:56 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/rst2pdf/ChangeLog,v 1.16 2011/07/30 04:39:42 rafaelmartins Exp $
+
+*rst2pdf-0.16-r1 (30 Jul 2011)
+
+ 30 Jul 2011; Rafael G. Martins <rafaelmartins@gentoo.org>
+ +rst2pdf-0.16-r1.ebuild, +files/rst2pdf-0.16_docutils-0.8.patch:
+ Revision bump. Fixed runtime errors when using >=docutils-0.8 (bug #369943).
15 Jan 2011; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
-rst2pdf-0.15.ebuild:
diff --git a/dev-python/rst2pdf/files/rst2pdf-0.16_docutils-0.8.patch b/dev-python/rst2pdf/files/rst2pdf-0.16_docutils-0.8.patch
new file mode 100644
index 000000000000..a7cc081ff8fa
--- /dev/null
+++ b/dev-python/rst2pdf/files/rst2pdf-0.16_docutils-0.8.patch
@@ -0,0 +1,52 @@
+Index: rst2pdf/createpdf.py
+===================================================================
+--- rst2pdf/createpdf.py (revision 2441)
++++ rst2pdf/createpdf.py (working copy)
+@@ -56,6 +56,7 @@
+ from optparse import OptionParser
+ import logging
+
++import docutils
+ from docutils.languages import get_language
+ import docutils.readers.doctree
+ import docutils.core
+@@ -97,6 +98,12 @@
+ escape=tenjin.helpers.escape
+ templateEngine=tenjin.Engine()
+
++# fix get_language for docutils>=0.8
++if docutils.__version__ >= '0.8':
++ orig_func = get_language
++ def get_language(arg1):
++ return orig_func(arg1, None)
++
+ def renderTemplate(tname, **context):
+ context['to_str']=to_str
+ context['escape']=escape
+Index: rst2pdf/pdfbuilder.py
+===================================================================
+--- rst2pdf/pdfbuilder.py (revision 2441)
++++ rst2pdf/pdfbuilder.py (working copy)
+@@ -27,6 +27,7 @@
+ from rst2pdf import pygments_code_block_directive, oddeven_directive
+ from pygments.lexers import get_lexer_by_name, guess_lexer
+
++import docutils
+ from docutils import writers
+ from docutils import nodes
+ from docutils import languages
+@@ -56,7 +57,14 @@
+
+ from traceback import print_exc
+
++# fix get_language for docutils>=0.8
++if docutils.__version__ >= '0.8':
++ orig_func = get_language
++ def get_language(arg1):
++ return orig_func(arg1, None)
++ languages.get_language = get_language
+
++
+ class PDFBuilder(Builder):
+ name = 'pdf'
+ out_suffix = '.pdf'
diff --git a/dev-python/rst2pdf/rst2pdf-0.16-r1.ebuild b/dev-python/rst2pdf/rst2pdf-0.16-r1.ebuild
new file mode 100644
index 000000000000..b66800682033
--- /dev/null
+++ b/dev-python/rst2pdf/rst2pdf-0.16-r1.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/rst2pdf/rst2pdf-0.16-r1.ebuild,v 1.1 2011/07/30 04:39:42 rafaelmartins Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit distutils eutils
+
+DESCRIPTION="Tool for transforming reStructuredText to PDF using ReportLab"
+HOMEPAGE="http://code.google.com/p/rst2pdf/ http://pypi.python.org/pypi/rst2pdf"
+SRC_URI="http://rst2pdf.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/docutils
+ dev-python/imaging
+ dev-python/pygments
+ >=dev-python/reportlab-2.4"
+RDEPEND="${DEPEND}"
+
+DOCS="Contributors.txt CHANGES.txt README.txt doc/*"
+
+src_prepare() {
+ distutils_src_prepare
+
+ epatch "${FILESDIR}/${P}_docutils-0.8.patch"
+}
+
+src_install() {
+ distutils_src_install
+
+ insinto /usr/share/doc/${PF}/examples
+ doins doc/montecristo/* || die "doins failed"
+}
+
+pkg_postinst() {
+ distutils_pkg_postinst
+
+ elog "rst2pdf can work with the following packages for additional functionality:"
+ elog " dev-python/sphinx - versatile documentation creation"
+ elog " dev-python/pythonmagick - image processing with ImageMagick"
+ elog " dev-python/matplotlib - mathematical formulae"
+ elog " media-gfx/uniconvertor - vector image format conversion"
+ elog "It can also use wordaxe for hyphenation, but this package is not"
+ elog "available in the portage tree yet. Please refer to the manual"
+ elog "installed in /usr/share/doc/${PF}/ for more information."
+}