mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 08:51:25 +02:00
64 lines
2.0 KiB
Plaintext
64 lines
2.0 KiB
Plaintext
# Contributor: August Klein <amatcoder@gmail.com>
|
|
# Maintainer: André Klitzing <aklitzing@gmail.com>
|
|
pkgname=cppcheck
|
|
pkgver=1.86
|
|
pkgrel=0
|
|
pkgdesc="Static analysis tool for C/C++ code"
|
|
url="http://cppcheck.sourceforge.net"
|
|
arch="all"
|
|
license="GPL-3.0-or-later"
|
|
depends=""
|
|
makedepends="docbook-xsl pcre-dev python qt5-qttools-dev"
|
|
subpackages="$pkgname-doc $pkgname-htmlreport::noarch $pkgname-gui"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/$pkgver.tar.gz
|
|
set_datadir.patch
|
|
disable-findFunction19-test.patch
|
|
"
|
|
builddir="$srcdir/$pkgname-$pkgver"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
make DB2MAN=/usr/share/xml/docbook/xsl-stylesheets-*/manpages/docbook.xsl man
|
|
|
|
cd gui
|
|
lrelease-qt5 gui.pro
|
|
qmake-qt5 HAVE_RULES=yes
|
|
make SRCDIR=build CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
make SRCDIR=build check
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
make DESTDIR="$pkgdir" CFGDIR=/usr/share/cppcheck/cfg HAVE_RULES=yes install
|
|
install -Dm644 cppcheck.1 "$pkgdir"/usr/share/man/man1/cppcheck.1
|
|
}
|
|
|
|
htmlreport() {
|
|
pkgdesc="Utility to generate a html report of a XML file produced by cppcheck"
|
|
depends="$pkgname py-pygments"
|
|
|
|
cd "$builddir"
|
|
mkdir -p "$subpkgdir"/usr/bin
|
|
mv "$pkgdir"/usr/bin/$subpkgname "$subpkgdir"/usr/bin/
|
|
}
|
|
|
|
gui() {
|
|
pkgdesc="Qt gui for cppcheck"
|
|
depends="$pkgname"
|
|
|
|
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/
|
|
}
|
|
|
|
sha512sums="59cec55b8408e8f2e2e7172bce69350c248bc3185a0938b523c44a58f98b344e11aef957ec1b7a7b2bc7a876660b2683e51f54b76f0b550f9549497c29453655 cppcheck-1.86.tar.gz
|
|
013e3d1bb49602ac0bf39335d5b4df001aa98e1ad9689207063460edc30a4cd7b67f5e880bd0bcae0c03e5724a8bdd0cb5c8cafcb89a815dab24b2ead2923f36 set_datadir.patch
|
|
dd118f930aa509ee3d8b39d920f5de38b425657cc8a44520bb13b8f744aa4f2fe2bcd61141dbe1730f3202b70aecd3ef2531a04b8ebccdc5475cbe1a4dda38ab disable-findFunction19-test.patch"
|