summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2013-07-01 11:30:22 +0000
committerTiziano Müller <dev-zero@gentoo.org>2013-07-01 11:30:22 +0000
commit750e46e3ebe0ae838eeee94a0e535e346e5cf02c (patch)
tree2dedc7af011ffdc1a1487000f659374ab4e7fa55 /dev-python/mwlib-rl
parentFixed #406433 and #475196, many thanks to Julian Ospald <hasufell@gentoo.org> (diff)
downloadgentoo-2-750e46e3ebe0ae838eeee94a0e535e346e5cf02c.tar.gz
gentoo-2-750e46e3ebe0ae838eeee94a0e535e346e5cf02c.tar.bz2
gentoo-2-750e46e3ebe0ae838eeee94a0e535e346e5cf02c.zip
Initial commit, required by recent mwlib/mediawiki to get working pdf-generation solution.
(Portage version: 2.1.11.63/cvs/Linux x86_64, signed Manifest commit with key 0x1E0CA85F!)
Diffstat (limited to 'dev-python/mwlib-rl')
-rw-r--r--dev-python/mwlib-rl/ChangeLog10
-rw-r--r--dev-python/mwlib-rl/files/0.14.3-use-system-fonts.patch13
-rw-r--r--dev-python/mwlib-rl/metadata.xml11
-rw-r--r--dev-python/mwlib-rl/mwlib-rl-0.14.3.ebuild61
4 files changed, 95 insertions, 0 deletions
diff --git a/dev-python/mwlib-rl/ChangeLog b/dev-python/mwlib-rl/ChangeLog
new file mode 100644
index 000000000000..cadb1e51e487
--- /dev/null
+++ b/dev-python/mwlib-rl/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for dev-python/mwlib-rl
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mwlib-rl/ChangeLog,v 1.1 2013/07/01 11:30:22 dev-zero Exp $
+
+*mwlib-rl-0.14.3 (01 Jul 2013)
+
+ 01 Jul 2013; Tiziano Müller <dev-zero@gentoo.org>
+ +files/0.14.3-use-system-fonts.patch, +metadata.xml, +mwlib-rl-0.14.3.ebuild:
+ Initial commit, required by recent mwlib/mediawiki to get working pdf-
+ generation solution.
diff --git a/dev-python/mwlib-rl/files/0.14.3-use-system-fonts.patch b/dev-python/mwlib-rl/files/0.14.3-use-system-fonts.patch
new file mode 100644
index 000000000000..bf6bea78057b
--- /dev/null
+++ b/dev-python/mwlib-rl/files/0.14.3-use-system-fonts.patch
@@ -0,0 +1,13 @@
+diff --git a/mwlib/rl/fontconfig.py b/mwlib/rl/fontconfig.py
+index fdf5cba..ab792df 100755
+--- a/mwlib/rl/fontconfig.py
++++ b/mwlib/rl/fontconfig.py
+@@ -14,7 +14,7 @@ from reportlab.pdfbase import pdfmetrics
+ from reportlab.pdfbase.ttfonts import TTFont
+ from reportlab.pdfbase.cidfonts import UnicodeCIDFont
+
+-font_paths = [os.path.dirname(mwlib.fonts.__file__),
++font_paths = ['/usr/share/fonts',
+ os.path.expanduser('~/mwlibfonts/')
+ ]
+
diff --git a/dev-python/mwlib-rl/metadata.xml b/dev-python/mwlib-rl/metadata.xml
new file mode 100644
index 000000000000..35972941f838
--- /dev/null
+++ b/dev-python/mwlib-rl/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>python</herd>
+ <upstream>
+ <remote-id type="pypi">mwlib.rl</remote-id>
+ </upstream>
+ <use>
+ <flag name='pdftk'>Enable support for <pkg>app-text/pdftk</pkg>, required to generate TOCs</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-python/mwlib-rl/mwlib-rl-0.14.3.ebuild b/dev-python/mwlib-rl/mwlib-rl-0.14.3.ebuild
new file mode 100644
index 000000000000..74ee126d64ea
--- /dev/null
+++ b/dev-python/mwlib-rl/mwlib-rl-0.14.3.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/mwlib-rl/mwlib-rl-0.14.3.ebuild,v 1.1 2013/07/01 11:30:22 dev-zero Exp $
+
+EAPI="5"
+
+PYTHON_COMPAT=( python{2_6,2_7} )
+PYTHON_REQ_USE="xml"
+
+inherit distutils-r1
+
+MY_PN="${PN/-/.}"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Generate pdfs from mediawiki markup"
+HOMEPAGE="http://code.pediapress.com/wiki/wiki http://pypi.python.org/pypi/mwlib.rl"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test pdftk"
+
+RDEPEND=">=dev-python/mwlib-0.15.8-r1[${PYTHON_USEDEP}]
+ >=dev-python/mwlib-ext-0.12.4-r1[${PYTHON_USEDEP}]
+ >=dev-python/pygments-1.4[${PYTHON_USEDEP}]
+ dev-python/simplejson[${PYTHON_USEDEP}]
+ || ( dev-python/pillow[${PYTHON_USEDEP}] dev-python/imaging[${PYTHON_USEDEP}] )
+ media-fonts/freefont
+ || ( media-gfx/graphicsmagick[imagemagick] media-gfx/imagemagick )
+ pdftk? ( app-text/pdftk )"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ app-arch/unzip
+ test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${PV}-use-system-fonts.patch" )
+DOCS=( example-mwlib.config README.rst )
+
+python_prepare_all() {
+ rm -r mwlib/fonts/freefont || die "removing bundled fonts failed"
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ py.test || die
+}
+
+pkg_postinst() {
+ elog "If you need extended/non-lating rendering support, please install the"
+ elog "corresponding font packages:"
+ elog " - media-fonts/libertine-ttf"
+ elog " - media-fonts/sil-ezra"
+ elog " - media-fonts/farsi-fonts"
+ elog " - media-fonts/arphicfonts"
+ elog " - media-fonts/unfonts"
+ # TODO: need the following packages as well:
+ # ttf-indic-fonts ttf-gfs-artemisia ttf-thai-arundina
+}