aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-reportlab/APKBUILD
blob: 9d2821789fb58635f4af1735e4a4e95504030626 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py3-reportlab
_pkgname=reportlab
pkgver=3.5.28
pkgrel=0
pkgdesc="Python library for generating PDFs and graphics"
url="https://www.reportlab.com/opensource"
arch="all"
license="BSD-3-Clause"
depends="py3-pillow ttf-dejavu"
makedepends="freetype-dev libart-lgpl-dev py3-setuptools python3-dev"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-reportlab" # Backwards compatibility
provides="py-reportlab=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare

	# use installed (system) libart
	rm -rf src/rl_addons/renderPM/libart_lgpl

	# remove interpreter line from libraries
	find src -type f -name "*.py" -exec sed -i '/^#!\//d' {} \;
}

build() {
	export CFLAGS="$CFLAGS -I/usr/include/libart-2.0"
	python3 setup.py build --use-system-libart
}

package() {
	export CFLAGS="$CFLAGS -I/usr/include/libart-2.0"
	python3 setup.py install --use-system-libart --skip-build \
		--prefix=/usr --root="$pkgdir"
}

sha512sums="e46bf046e4916153b5debc2a06ee4def799c9167c6db76f53a65406d3f35d15fad97932ace9a5499e28290fa1d31ea97ffc54be4bf7ba64fd81b7db13ec22fa6  reportlab-3.5.28.tar.gz"