diff options
Diffstat (limited to 'media-gfx/svg2rlg')
-rw-r--r-- | media-gfx/svg2rlg/Manifest | 1 | ||||
-rw-r--r-- | media-gfx/svg2rlg/files/svg2rlg-issue-3.patch | 19 | ||||
-rw-r--r-- | media-gfx/svg2rlg/files/svg2rlg-issue-6.patch | 47 | ||||
-rw-r--r-- | media-gfx/svg2rlg/files/svg2rlg-issue-7.patch | 16 | ||||
-rw-r--r-- | media-gfx/svg2rlg/metadata.xml | 12 | ||||
-rw-r--r-- | media-gfx/svg2rlg/svg2rlg-0.3.ebuild | 40 |
6 files changed, 135 insertions, 0 deletions
diff --git a/media-gfx/svg2rlg/Manifest b/media-gfx/svg2rlg/Manifest new file mode 100644 index 000000000000..21197bf63dd1 --- /dev/null +++ b/media-gfx/svg2rlg/Manifest @@ -0,0 +1 @@ +DIST svg2rlg-0.3.tar.gz 490908 SHA256 05db4480b90e912e08727d4cb24385fe33e8436def079b8f149b61a350638bee SHA512 44efebe7d978a46ab26b4bc332ad08db9236a86b160d73fc1fdc2b54c44bb2604147ae458eea1fe81c579c7f94e39869459567a6b6b3a551d6db6132816c4723 WHIRLPOOL 257bd5c50f86578b75b510c9ebc78d32155d73d321e40c83c64ddbe644d37c7a49d28660f0d7a509caaa1760f7715e405cc197eb4ef4b43f5d05fc9445625799 diff --git a/media-gfx/svg2rlg/files/svg2rlg-issue-3.patch b/media-gfx/svg2rlg/files/svg2rlg-issue-3.patch new file mode 100644 index 000000000000..df70bf345aa8 --- /dev/null +++ b/media-gfx/svg2rlg/files/svg2rlg-issue-3.patch @@ -0,0 +1,19 @@ +commit e5aa6784a10717641bc5b6d9d77a5029f815654a +Author: yac <yac@blesmrt.net> +Date: Wed May 8 04:59:17 2013 +0200 + + fix #3 + + remove windows only function which is useless anyway + +diff --git a/svg2rlg.py b/svg2rlg.py +index 1c5f80c..2b35c62 100644 +--- a/svg2rlg.py ++++ b/svg2rlg.py +@@ -1574,5 +1574,3 @@ if __name__ == "__main__": + + drawing = svg2rlg(source) + drawing.save(formats=['pdf'],outDir='.',fnRoot=name) +- +- os.startfile(name + '.pdf') +\ No newline at end of file diff --git a/media-gfx/svg2rlg/files/svg2rlg-issue-6.patch b/media-gfx/svg2rlg/files/svg2rlg-issue-6.patch new file mode 100644 index 000000000000..6ca750e79193 --- /dev/null +++ b/media-gfx/svg2rlg/files/svg2rlg-issue-6.patch @@ -0,0 +1,47 @@ +commit e42661b9cd6d7b71ce5e7674ac8eff25c74db07a +Author: yac <yac@blesmrt.net> +Date: Wed May 8 05:00:32 2013 +0200 + + use entry_point fixes #6 + +diff --git a/setup.py b/setup.py +index 9e00fba..512fa79 100644 +--- a/setup.py ++++ b/setup.py +@@ -1,6 +1,6 @@ + #!/usr/bin/python + # -*- coding: utf-8 -*- +-from distutils.core import setup ++from setuptools import setup + + setup( + name = 'svg2rlg', +@@ -12,6 +12,8 @@ setup( + url = 'http://code.google.com/p/svg2rlg/', + download_url = 'http://pypi.python.org/pypi/svg2rlg/', + requires = ['reportlab'], ++ entry_points = { ++ 'console_scripts': ['svg2rlg = svg2rlg:main']}, + + classifiers=[ + 'Environment :: Console', +@@ -30,4 +32,4 @@ The authors motivation was to have a more robust handling of + SVG files in the **rst2pdf** tool. Specific to be able to handle + the quirks needed to include SVG export from matplotlib. + ''' +-) +\ No newline at end of file ++) +diff --git a/svg2rlg.py b/svg2rlg.py +index 2b35c62..cc812b2 100644 +--- a/svg2rlg.py ++++ b/svg2rlg.py +@@ -1562,7 +1562,7 @@ def svg2rlg(filename): + + return renderer.render(xml) + +-if __name__ == "__main__": ++def main(): + import sys + import os + diff --git a/media-gfx/svg2rlg/files/svg2rlg-issue-7.patch b/media-gfx/svg2rlg/files/svg2rlg-issue-7.patch new file mode 100644 index 000000000000..8145f416f804 --- /dev/null +++ b/media-gfx/svg2rlg/files/svg2rlg-issue-7.patch @@ -0,0 +1,16 @@ +commit c30b4f90cac69934761e44bf59a8ba8a3827d647 +Author: yac <yac@blesmrt.net> +Date: Wed May 8 05:44:00 2013 +0200 + + fix #7 + +diff --git a/svg2rlg.py b/svg2rlg.py +index cc812b2..80d72de 100644 +--- a/svg2rlg.py ++++ b/svg2rlg.py +@@ -1573,4 +1573,4 @@ def main(): + name, ext = os.path.splitext(filename) + + drawing = svg2rlg(source) +- drawing.save(formats=['pdf'],outDir='.',fnRoot=name) ++ drawing.save(formats=['pdf'],outDir=os.getcwd(),fnRoot=name) diff --git a/media-gfx/svg2rlg/metadata.xml b/media-gfx/svg2rlg/metadata.xml new file mode 100644 index 000000000000..edf9479ddd04 --- /dev/null +++ b/media-gfx/svg2rlg/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>python</herd> + <longdescription lang="en"> + The tool can be used as a console application to convert SVG to PDF + files. + </longdescription> + <upstream> + <remote-id type="pypi">svg2rlg</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-gfx/svg2rlg/svg2rlg-0.3.ebuild b/media-gfx/svg2rlg/svg2rlg-0.3.ebuild new file mode 100644 index 000000000000..66fee9a7225d --- /dev/null +++ b/media-gfx/svg2rlg/svg2rlg-0.3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="svg2rlg is a python tool to convert SVG files to reportlab +graphics" +HOMEPAGE="http://code.google.com/p/svg2rlg/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ppc ~ppc64 x86" +IUSE="" + +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" +RDEPEND="${DEPEND} + dev-python/reportlab[${PYTHON_USEDEP}]" + +PATCHES=( "${FILESDIR}/${PN}-issue-3.patch" "${FILESDIR}/${PN}-issue-6.patch" + "${FILESDIR}/${PN}-issue-7.patch") + +python_test() { + ${EPYTHON} test_svg2rlg.py +} + +python_prepare_all() { + tmp=`mktemp` || die "mktemp failed" + for i in `find -name '*.py'`; do + tr -d '\r' < $i >$tmp || die "tr failed" + mv $tmp $i || die "mv failed" + done + + distutils-r1_python_prepare_all +} |