mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
61 lines
1.8 KiB
Plaintext
61 lines
1.8 KiB
Plaintext
# Contributor: August Klein <amatcoder@gmail.com>
|
|
# Maintainer: André Klitzing <aklitzing@gmail.com>
|
|
pkgname=cppcheck
|
|
pkgver=1.82
|
|
pkgrel=0
|
|
pkgdesc="A static analysis tool for C/C++ code"
|
|
url="http://cppcheck.sourceforge.net"
|
|
arch="all"
|
|
license="GPL-3.0"
|
|
depends=""
|
|
makedepends="docbook-xsl pcre-dev 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"
|
|
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="A 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="A 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="fe295b35cd8da3acbdd472f391a84dbd2aa74be7fcffeb30824f127760bac207ae8795e991e2f7772f532501b785144edbad8d2b17f46b590e0ebeebb697b221 cppcheck-1.82.tar.gz
|
|
76f0699273347068b562d001cf6701ef3180506d21bd9298a6b1f2e522ea3c32b1cc350128a2c0b8d69b89aa3c0992b04e9d641ae170b51e3073acb3c6ca7b6e set_datadir.patch"
|