1SUMMARY="An open source Python library for generating PDFs and graphics"
2DESCRIPTION="ReportLab is a software library that lets you directly create documents in Adobe's \
3Portable Document Format (PDF) using the Python programming language. It also creates charts and \
4data graphics in various bitmap and vector formats as well as PDF.
5The ReportLab library directly creates PDF documents based on your graphics commands with no \
6intervening steps. This means your applications can generate reports extremely quickly compared \
7to other approaches such as scripting GUI PDF authoring tools."
8HOMEPAGE="https://pypi.org/project/reportlab/
9	https://www.reportlab.com/"
10COPYRIGHT="2000-2021 ReportLab Europe Ltd."
11LICENSE="BSD (3-clause)"
12REVISION="4"
13pypi="81ff7e3f9fd345cd4685f964fbc3d89a06f39a4f552ab1c2a5769a0f9013"
14SOURCE_URI="https://files.pythonhosted.org/packages/16/31/$pypi/reportlab-$portVersion.tar.gz"
15CHECKSUM_SHA256="5d0cc3682456ad213150f6dbffe7d47eab737d809e517c316103376be548fb84"
16SOURCE_DIR="reportlab-$portVersion"
17PATCHES="reportlab-$portVersion.patchset"
18
19ARCHITECTURES="all !x86_gcc2"
20SECONDARY_ARCHITECTURES="x86"
21
22PROVIDES="
23	$portName = $portVersion
24	"
25REQUIRES="
26	haiku$secondaryArchSuffix
27	"
28
29BUILD_REQUIRES="
30	haiku${secondaryArchSuffix}_devel
31	devel:libfreetype$secondaryArchSuffix
32	"
33BUILD_PREREQUIRES="
34	cmd:gcc$secondaryArchSuffix
35	cmd:git
36	"
37
38PYTHON_PACKAGES=(python39 python310)
39PYTHON_VERSIONS=(3.9 3.10)
40for i in "${!PYTHON_PACKAGES[@]}"; do
41	pythonPackage=${PYTHON_PACKAGES[i]}
42	pythonVersion=${PYTHON_VERSIONS[$i]}
43
44	eval "PROVIDES_${pythonPackage}=\"
45		${portName}_$pythonPackage = $portVersion
46		\""
47	if [ "$targetArchitecture" = x86_gcc2 ]; then
48		eval "PROVIDES_$pythonPackage+=\"
49			reportlab_$pythonPackage = $portVersion
50			\""
51	fi
52	eval "REQUIRES_$pythonPackage=\"
53		haiku
54		cmd:python$pythonVersion
55		lib:libfreetype$secondaryArchSuffix
56		\""
57	BUILD_REQUIRES+="
58		setuptools_$pythonPackage
59		"
60	BUILD_PREREQUIRES+="
61		cmd:python$pythonVersion
62		"
63done
64
65INSTALL()
66{
67	for i in "${!PYTHON_PACKAGES[@]}"; do
68		pythonPackage=${PYTHON_PACKAGES[i]}
69		pythonVersion=${PYTHON_VERSIONS[$i]}
70
71		python=python$pythonVersion
72		installLocation=$prefix/lib/$python/vendor-packages/
73		export PYTHONPATH=$installLocation:$PYTHONPATH
74		mkdir -p $installLocation
75		rm -rf build
76		$python setup.py build install \
77			--root=/ --prefix=$prefix
78
79		packageEntries  $pythonPackage \
80			$prefix/lib/python*
81	done
82}
83