summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-19 20:13:08 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-07-19 20:13:08 +0000
commit1495945c6c3085778b0a4075f342b757407f4716 (patch)
treedd562a934c90423dd56f588aad553a52e66ab51d
parentbc4bd3e56a4cada059c252bfc3f26b120b17b490 (diff)
downloadpackages-1495945c6c3085778b0a4075f342b757407f4716.tar.gz
packages-1495945c6c3085778b0a4075f342b757407f4716.tar.bz2
packages-1495945c6c3085778b0a4075f342b757407f4716.tar.xz
packages-1495945c6c3085778b0a4075f342b757407f4716.zip
user/cppcheck: New package
-rw-r--r--user/cppcheck/APKBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/user/cppcheck/APKBUILD b/user/cppcheck/APKBUILD
new file mode 100644
index 000000000..99f618aa1
--- /dev/null
+++ b/user/cppcheck/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: A. Wilcox <awilfox@adelielinux.org>
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=cppcheck
+pkgver=2.1
+pkgrel=0
+pkgdesc="Tool for static C/C++ code analysis"
+url="http://cppcheck.sourceforge.net/"
+arch="all"
+license="GPL-3.0-only"
+depends=""
+makedepends="cmake pcre-dev qt5-qtbase-dev z3-dev"
+subpackages="$pkgname-gui"
+source="cppcheck-$pkgver.tar.gz::https://github.com/danmar/cppcheck/archive/$pkgver.tar.gz"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DBUILD_GUI=ON \
+ -DBUILD_TESTS=ON \
+ -DHAVE_RULES=ON \
+ -DUSE_MATCHCOMPILER=ON \
+ -DUSE_Z3=ON \
+ ${CMAKE_CROSSOPTS} \
+ .
+ make
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+gui() {
+ pkgdesc="$pkgdesc (Qt UI)"
+ depends="cppcheck"
+ mkdir -p "$subpkgdir"/usr/share "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/cppcheck-gui "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/bin/*.qm "$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/share/applications "$subpkgdir"/usr/share/
+ mv "$pkgdir"/usr/share/icons "$subpkgdir"/usr/share/
+}
+
+sha512sums="7e1ef473168f9af35db0979f85ddb4d66b91c09051e27bc28ea7453dbe94fbf799515701c737820e0a3bea77da0d8ef171313612f65e954718a80bbcb56d54ed cppcheck-2.1.tar.gz"