summaryrefslogtreecommitdiff
path: root/libre/python-reportlab/PKGBUILD
blob: 6599a7172f14e3b4fb213e165aaf415f430e5a03 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Maintainer (arch): Morten Linderud <foxboron@archlinux.org>
# Contributor: Angel 'angvp' Velasquez <angvp[at]archlinux.com.ve>
# Contributor: William Rea <sillywilly@gmail.com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: fauno <fauno@kiwwwi.com.ar>
# Contributor: borgo <nomail>
# Contributor: André Silva <emulatorman@hyperbola.info>


# parabola changes and rationale:
# - remove nonfree fonts support
# - remove duplicate fonts found in ther packages


_origname=reportlab
pkgname=python-reportlab
pkgver=3.6.12
pkgrel=3
pkgrel+=.parabola1
pkgdesc="A proven industry-strength PDF generating solution"
arch=('x86_64')
arch+=('armv7h' 'i686')
url="https://www.reportlab.com/"
depends=('freetype2')
depends=('python' 'python-pillow')
makedepends=('freetype2' 'python-pillow' 'mercurial')
license=('BSD')
source=(https://files.pythonhosted.org/packages/source/${_origname::1}/${_origname}/${_origname}-${pkgver}.tar.gz)
source+=('free-fonts.patch')
sha256sums=('b13cebf4e397bba14542bcd023338b6ff2c151a3a12aabca89eecbf972cb361a')
sha256sums+=('7e31b2a2bde509d628cb7da9fec301d730d38ea8a8dc9956cdfc8da4ebeec370')


prepare() {
    cd ${_origname}-${pkgver}

    # remove nonfree Adobe T1 fonts support
    patch -p1 -i ../free-fonts.patch

    # Parabola contains those fonts from the ttf-bitstream-vera package
    rm -fv src/reportlab/fonts/{bitstream-vera-license.txt,Vera*}
}

build() {
    cd ${_origname}-${pkgver}
    python setup.py build
}

check() {
    cd ${_origname}-${pkgver}
    python -m unittest discover -vs tests || true
    rm tests/_i_am_actually_a_*
}

package() {
    cd ${_origname}-${pkgver}
    python setup.py install --root="$pkgdir" --optimize=1 --skip-build
    install -D -m644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/license.txt
}