diff options
Diffstat (limited to 'dev-python/rst2pdf')
-rw-r--r-- | dev-python/rst2pdf/Manifest | 4 | ||||
-rw-r--r-- | dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch | 26 | ||||
-rw-r--r-- | dev-python/rst2pdf/metadata.xml | 9 | ||||
-rw-r--r-- | dev-python/rst2pdf/rst2pdf-0.93-r3.ebuild | 47 |
4 files changed, 86 insertions, 0 deletions
diff --git a/dev-python/rst2pdf/Manifest b/dev-python/rst2pdf/Manifest new file mode 100644 index 000000000000..de39844598da --- /dev/null +++ b/dev-python/rst2pdf/Manifest @@ -0,0 +1,4 @@ +AUX rst2pdf-0.93-fix-logging.patch 771 BLAKE2B e1f6a6933af771a4d12c584d13176387bc077ae450a3224c708d96344196700813aae79683b726acef432060872d636a14a9b6c4a273d30b68f2e1fa088d43cf SHA512 798a4cc03ddc6bf892ac8388b96d7facfe4054c2a1f648a4d05314bfbb8bf1ba261feea0930388688b183c12b1f561b3753fa2488854651005faf9bfa98f531d +DIST rst2pdf-0.93.tar.gz 1216483 BLAKE2B 478b5e704a2c8a85474e728472807909f70e24ade78f2aba986308919e6716c4b0d576556b3509a358f36be03508f837e3b680a16b8c01e2ee51e522931d9237 SHA512 dfdc6adeb06f4ef3d5fc52b91be1939e9cab25a1979685512f9a05e3da1ee65b84e47478613148401175a06fbfdccf5494918de6281419a0981987d398e836ee +EBUILD rst2pdf-0.93-r3.ebuild 1569 BLAKE2B 3350af9760c8131bd2b8c2aac32eb14d0e4756d1db848b29ae7a1306fe6ca91b41bb4ed001bde59bf975082f25e700c4d54d38d0e0c91d2ab60f5ad81e31827d SHA512 e684c94d5794d3545116b78b0529ce634b486dccdc70df0548ecb42427b2e098ee22ad2377517a2a72937389e8f862abfa039477ba567b6562c2ed502548458c +MISC metadata.xml 306 BLAKE2B 17096c9bcbc010a31235e12f8307bca80e3a1fd73ab488b79fa0a431652b3eed5a4acb4436f57640ce259d053f4aa9adb84cf488104fa935455db1074278f22e SHA512 5f9c3ae1a900fe722d811e47ed1ca544f308720604a407d6d4a8ada256c12c94c0af903d13b7f443750c1027904075f785372fe1f917ac1901a1c45acdbe30b7 diff --git a/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch b/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch new file mode 100644 index 000000000000..52acf04171d8 --- /dev/null +++ b/dev-python/rst2pdf/files/rst2pdf-0.93-fix-logging.patch @@ -0,0 +1,26 @@ +--- rst2pdf/log.py ++++ rst2pdf/log.py +@@ -4,11 +4,12 @@ + import logging
+ import sys
+
+-logging.basicConfig(
+- format='[%(levelname)s] %(filename)s:%(lineno)d %(message)s',
+- level=logging.WARNING)
+-
+ log = logging.getLogger('rst2pdf')
++_fmt = logging.Formatter('[%(levelname)s] %(filename)s:%(lineno)d %(message)s')
++_hdlr = logging.StreamHandler()
++_hdlr.setFormatter(_fmt)
++log.addHandler(_hdlr)
++log.setLevel(logging.WARNING)
+
+ def nodeid(node):
+ """Given a node, tries to return a way to see where it was in the
+@@ -23,4 +24,4 @@ + if node.source: fname=str(node.source)
+ except:
+ pass
+- return 'near line %s in file %s'%(line,fname) +\ No newline at end of file ++ return 'near line %s in file %s'%(line,fname)
diff --git a/dev-python/rst2pdf/metadata.xml b/dev-python/rst2pdf/metadata.xml new file mode 100644 index 000000000000..3673286b4be4 --- /dev/null +++ b/dev-python/rst2pdf/metadata.xml @@ -0,0 +1,9 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <upstream> + <remote-id type="google-code">rst2pdf</remote-id> + <remote-id type="github">rst2pdf/rst2pdf</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/rst2pdf/rst2pdf-0.93-r3.ebuild b/dev-python/rst2pdf/rst2pdf-0.93-r3.ebuild new file mode 100644 index 000000000000..9610d05084a4 --- /dev/null +++ b/dev-python/rst2pdf/rst2pdf-0.93-r3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="Tool for transforming reStructuredText to PDF using ReportLab" +HOMEPAGE="http://rst2pdf.ralsina.me/ https://pypi.org/project/rst2pdf/" +SRC_URI="https://github.com/rst2pdf/rst2pdf/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ppc ppc64 sparc x86" +IUSE="svg" + +DEPEND="dev-python/docutils[${PYTHON_USEDEP}] + dev-python/pillow[${PYTHON_USEDEP}] + dev-python/pdfrw[${PYTHON_USEDEP}] + dev-python/pygments[${PYTHON_USEDEP}] + >=dev-python/reportlab-2.6[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + svg? ( media-gfx/svg2rlg )" +RDEPEND="${DEPEND}" +# >=reportlab-2.6: https://code.google.com/p/rst2pdf/issues/detail?id=474 + +PATCHES=( "${FILESDIR}/${P}-fix-logging.patch" ) + +python_install_all() { + dodoc doc/*.pdf + doman doc/rst2pdf.1 + distutils-r1_python_install_all +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]]; then + 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 "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." + fi +} |