summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-python/reportlab/ChangeLog10
-rw-r--r--dev-python/reportlab/files/reportlab-2.5-pypy-implicit-PyArg_NoArgs.patch13
-rw-r--r--dev-python/reportlab/reportlab-2.5-r1.ebuild80
3 files changed, 102 insertions, 1 deletions
diff --git a/dev-python/reportlab/ChangeLog b/dev-python/reportlab/ChangeLog
index ad75f18be498..29af0dab90e1 100644
--- a/dev-python/reportlab/ChangeLog
+++ b/dev-python/reportlab/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for dev-python/reportlab
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/reportlab/ChangeLog,v 1.79 2012/02/22 07:18:29 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/reportlab/ChangeLog,v 1.80 2012/05/06 17:39:31 floppym Exp $
+
+*reportlab-2.5-r1 (06 May 2012)
+
+ 06 May 2012; Mike Gilbert <floppym@gentoo.org>
+ +files/reportlab-2.5-pypy-implicit-PyArg_NoArgs.patch,
+ +reportlab-2.5-r1.ebuild:
+ Fix implicit declaration of PyArg_NoArgs when building against PyPy. Patch
+ ported from sed statement in Progress overlay by Ian Delaney.
22 Feb 2012; Patrick Lauer <patrick@gentoo.org> reportlab-2.5.ebuild:
Restricting jython
diff --git a/dev-python/reportlab/files/reportlab-2.5-pypy-implicit-PyArg_NoArgs.patch b/dev-python/reportlab/files/reportlab-2.5-pypy-implicit-PyArg_NoArgs.patch
new file mode 100644
index 000000000000..1c8c98d696de
--- /dev/null
+++ b/dev-python/reportlab/files/reportlab-2.5-pypy-implicit-PyArg_NoArgs.patch
@@ -0,0 +1,13 @@
+PyPy does not provide the PyArg_NoArgs function, substitute it with a macro.
+--- a/src/rl_addons/rl_accel/sgmlop.c
++++ b/src/rl_addons/rl_accel/sgmlop.c
+@@ -52,6 +52,9 @@
+ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
+
+ #include "Python.h"
++#ifndef PyArg_NoArgs
++#define PyArg_NoArgs(v) PyArg_Parse(v, "")
++#endif
+ #if PY_VERSION_HEX < 0x02050000
+ # define Py_ssize_t int
+ # define lenfunc inquiry
diff --git a/dev-python/reportlab/reportlab-2.5-r1.ebuild b/dev-python/reportlab/reportlab-2.5-r1.ebuild
new file mode 100644
index 000000000000..81e8f3bd28a9
--- /dev/null
+++ b/dev-python/reportlab/reportlab-2.5-r1.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/reportlab/reportlab-2.5-r1.ebuild,v 1.1 2012/05/06 17:39:31 floppym Exp $
+
+EAPI="3"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.* *-jython"
+
+inherit distutils eutils versionator
+
+DESCRIPTION="Tools for generating printable PDF documents from any data source."
+HOMEPAGE="http://www.reportlab.org/ http://pypi.python.org/pypi/reportlab"
+SRC_URI="http://www.reportlab.org/ftp/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="doc examples test"
+
+DEPEND="dev-python/imaging
+ media-fonts/ttf-bitstream-vera
+ media-libs/libart_lgpl
+ sys-libs/zlib"
+RDEPEND="${DEPEND}"
+
+PYTHON_CFLAGS=("2.* + -fno-strict-aliasing")
+
+src_prepare() {
+ distutils_src_prepare
+
+ sed -i \
+ -e 's|/usr/lib/X11/fonts/TrueType/|/usr/share/fonts/ttf-bitstream-vera/|' \
+ -e 's|/usr/local/Acrobat|/opt/Acrobat|g' \
+ -e 's|%(HOME)s/fonts|%(HOME)s/.fonts|g' \
+ src/reportlab/rl_config.py || die "sed failed"
+
+ epatch "${FILESDIR}/${PN}-2.2_qa_msg.patch"
+
+ rm -fr src/rl_addons/renderPM/libart_lgpl
+ epatch "${FILESDIR}/${PN}-2.4-external_libart_lgpl.patch"
+
+ epatch "${FILESDIR}/${PN}-2.5-pypy-implicit-PyArg_NoArgs.patch"
+}
+
+src_compile() {
+ distutils_src_compile
+
+ # One of tests already builds documentation.
+ if use doc && ! use test; then
+ cd docs
+ PYTHONPATH="$(ls -d ../build-$(PYTHON -f --ABI)/lib.*)" "$(PYTHON -f)" genAll.py || die "genAll.py failed"
+ fi
+}
+
+src_test() {
+ testing() {
+ "$(PYTHON)" setup.py tests-preinstall
+ }
+ python_execute_function testing
+}
+
+src_install() {
+ distutils_src_install
+
+ if use doc; then
+ # docs/reference/reportlab-reference.pdf is identical with docs/reportlab-reference.pdf
+ rm -f docs/reference/reportlab-reference.pdf
+
+ insinto /usr/share/doc/${PF}
+ doins -r docs/* || die "Installation of documentation failed"
+ fi
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r demos || die "Installation of examples failed"
+ insinto /usr/share/doc/${PF}/tools/pythonpoint
+ doins -r tools/pythonpoint/demos || die "Installation of examples failed"
+ fi
+}