# Description: Static analysis tool for C/C++ code
# URL:         http://cppcheck.sourceforge.net/
# Maintainer:  John Vogel, jvogel4 at stny dot rr dot com
# Depends on:  libpcre python3-pygments docbook-xsl

name=cppcheck
version=2.2
release=1
source=(https://github.com/danmar/$name/archive/$version/$name-$version.tar.gz)

build() {
	cd $name-$version

	sed -i -e 's,python,python3,' htmlreport/cppcheck-htmlreport

	make install \
		HAVE_RULES=yes	\
		MATCHCOMPILER=yes	\
		FILESDIR=/usr/share/cppcheck	\
		DESTDIR=$PKG

	make man DB2MAN=/usr/share/xml/docbook/xsl-stylesheets/manpages/docbook.xsl
	install -Dm 0644 $name.1 $PKG/usr/share/man/man1/$name.1
}
