# Contributor: Jeff Bilyk <jbilyk at gmail>
# Maintainer: 
pkgname=re2c
pkgver=2.0.3
pkgrel=0
pkgdesc="Fast lexer generator for C and C++"
url="http://re2c.org/"
arch="all"
license="Public-Domain"
depends=""
checkdepends="bash"
makedepends=""
subpackages="$pkgname-doc"
source="https://github.com/skvadrik/re2c/releases/download/$pkgver/$pkgname-$pkgver.tar.xz
	"

# secfixes:
#   1.3-r1:
#     - CVE-2020-11958


build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

check() {
	make tests
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="893c533e9847a6236d55ae65e413ddc48b7531b89f5552a3ad79beeac079317ceca4c35710f3c2d88a6de5a3c0a5070a24a8cffb1b4277578a41697ea0e3bf8c  re2c-2.0.3.tar.xz"