aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-pgen/APKBUILD
blob: a8ee71323bf288fd9722c9f1f1521da9c58a7202 (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
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=py-pgen
pkgver=2.7.16
_verbase=${pkgver%.*}
pkgrel=0
pkgdesc="Python Parser Generator"
url="http://www.python.org"
arch="all"
license="custom"
makedepends="$depends_dev"
source="https://www.python.org/ftp/python/$pkgver/Python-$pkgver.tar.xz"

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$srcdir/Python-$pkgver"
        export OPT="$CFLAGS"
        ./configure \
                --build=$CBUILD \
                --host=$CHOST \
                --prefix=/usr \
                --enable-shared \
                --with-threads \
                --enable-ipv6 \
                --with-system-ffi \
                --with-system-expat \
                --with-system-zlib \
                --enable-unicode=ucs4 \
                || return 1
        make Parser/pgen || return 1
}

package() {
	cd "$srcdir/Python-$pkgver"
	mkdir -p "$pkgdir"/usr/bin
	install -Dm755 Parser/pgen "$pkgdir"/usr/bin/pgen
}

sha512sums="16e814e8dcffc707b595ca2919bd2fa3db0d15794c63d977364652c4a5b92e90e72b8c9e1cc83b5020398bd90a1b397dbdd7cb931c49f1aa4af6ef95414b43e0  Python-2.7.16.tar.xz"