1 # Contributor: Paul Colomiets pc at gafol.net
7 pkgdesc="A parser-generator written in python. Implements LR(1) parser, and partially LALR(1)."
9 url="http://seehuhn.de/pages/wisent"
11 makedepends=('python3')
12 source=(http://seehuhn.de/media/programs/wisent-$pkgver.tar.gz
15 md5sums=('45db5d2cff70a264ce353a7ffe578af2'
16 'd8f2c6015028f5bb2d6014c96a1cbfd5'
17 '02171bb769ed2aae1f1057de2ea75468')
20 cd $srcdir/wisent-$pkgver
21 ./configure --prefix=/usr
23 patch -p2 -i $srcdir/py-compile.patch
24 patch -p2 -i $srcdir/grammar.patch
25 sed -i 's/PYTHON\s*=\s*\/usr\/bin\/python/PYTHON = \/usr\/bin\/python3/' Makefile
26 sed -i 's/PYTHON_VERSION = 2.6/PYTHON_VERSION = 3.1/' Makefile
27 sed -i 's/\/python2.6\//\/python3.1\//g' Makefile
28 sed -i 's/^\t/ /g' scanner.py
29 sed -i 's/^#! \/usr\/bin\/env python$/#!\/usr\/bin\/env python3/' wisent
31 make DESTDIR=$pkgdir PYTHON=python3 install || return 1