blob: 2fc4c5fa68902c0c901921d1fac5a31de3f31946 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=cppcheck
pkgver=1.69
pkgrel=0
pkgdesc="A static analysis tool for C/C++ code"
url="http://cppcheck.sourceforge.net"
arch="all"
license="GPL3"
depends=""
depends_dev=""
makedepends="$depends_dev docbook-xsl pcre-dev qt5-qttools-dev"
install=""
subpackages="$pkgname-doc $pkgname-htmlreport $pkgname-gui"
source="$pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/$pkgver.tar.gz
avoid_execinfo.patch
set_datadir.patch"
_builddir="$srcdir"/$pkgname-$pkgver
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 "$_builddir"
make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-*/manpages/docbook.xsl man || return 1
cd gui
lrelease-qt5 gui.pro || return 1
qmake-qt5 HAVE_RULES=yes || return 1
make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes install || return 1
install -Dm644 cppcheck.1 "$pkgdir"/usr/share/man/man1/cppcheck.1 || return 1
}
htmlreport() {
pkgdesc="A utility to generate a html report of a XML file produced by cppcheck"
arch="noarch"
depends="cppcheck py-pygments"
cd "$_builddir"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/$subpkgname "$subpkgdir"/usr/bin/
}
gui() {
pkgdesc="A Qt gui for cppcheck"
depends="cppcheck"
cd "$_builddir"
mkdir -p "$subpkgdir"/usr/bin
mv gui/$subpkgname "$subpkgdir"/usr/bin/
mkdir -p "$subpkgdir"/usr/share/cppcheck/lang/
mv gui/cppcheck*.qm "$subpkgdir"/usr/share/cppcheck/lang/
}
md5sums="9bc7532d9371f506bc4547a05a1fdebf cppcheck-1.69.tar.gz
f7543600f177495d19246934210df4c4 avoid_execinfo.patch
9107713c930708436089b31eb3975de0 set_datadir.patch"
sha256sums="6e54f0dc97cbcc6c742cef4ceb1ade7f20f88af713a19c7613dba1d78eed6363 cppcheck-1.69.tar.gz
d628da592fd6fce32d533a8333a20ea0bc273a1a21ed6057f0673678b6bdf4a5 avoid_execinfo.patch
0f76926ea6baec00cad4e62ecb9215139cf8a1709c3ec613f494212e18ac5275 set_datadir.patch"
sha512sums="0b0ea178e9135987153f104f6b8dac8f6c441c55893dd1e32217087b97f3ae6be8fb6365e93d23d202195dde61a32e1fb6a532e6c54c2a54564d09cf774bdbe0 cppcheck-1.69.tar.gz
0f8b62dfbef9305d7146adf14cd01e028e12a63f781d8f25e3e813ecbf98f8bc0c79b0085ec277a12bee8208abddc5520b51e64c5a3503dc77e52db95688c66d avoid_execinfo.patch
b3cdd52899c2e1633cd715243b285029a8e72aa3e745be04579677b572b569ef3616dbe98df11cc9a39bc9acd9c13cc43bc4d21edc7e7fde8b95a9903cdcd58e set_datadir.patch"
|