mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-30 10:51:39 +02:00
77 lines
2.5 KiB
Plaintext
77 lines
2.5 KiB
Plaintext
# 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"
|