blob: c4d158466f7326377740bd2c944f8e92312afba5 (
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.68
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="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 gui.pro || return 1
qmake 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="35c84962db9b01673d872fc4966aeb22 1.68.tar.gz
f7543600f177495d19246934210df4c4 avoid_execinfo.patch
9107713c930708436089b31eb3975de0 set_datadir.patch"
sha256sums="fceac7e28783b55604a49504dfdbdbf8b9572eddaaacf3c87bc1600b086b5684 1.68.tar.gz
d628da592fd6fce32d533a8333a20ea0bc273a1a21ed6057f0673678b6bdf4a5 avoid_execinfo.patch
0f76926ea6baec00cad4e62ecb9215139cf8a1709c3ec613f494212e18ac5275 set_datadir.patch"
sha512sums="8edee3589282a60e05a698837feea8ae1e5adea63ace2691667c57f6f8649f72f7873b712638377d4750667df3a052a81da15f1fcc5e068c7673f2e0799b046f 1.68.tar.gz
0f8b62dfbef9305d7146adf14cd01e028e12a63f781d8f25e3e813ecbf98f8bc0c79b0085ec277a12bee8208abddc5520b51e64c5a3503dc77e52db95688c66d avoid_execinfo.patch
b3cdd52899c2e1633cd715243b285029a8e72aa3e745be04579677b572b569ef3616dbe98df11cc9a39bc9acd9c13cc43bc4d21edc7e7fde8b95a9903cdcd58e set_datadir.patch"
|