summaryrefslogtreecommitdiff
path: root/user/clazy/APKBUILD
blob: 114cd455661949f1fb090ec4dd29ba727e62cb5b (plain) (blame)
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
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=clazy
pkgver=1.11
_llvmver=14
pkgrel=0
pkgdesc="Clang compiler plugin to warn about Qt best practices"
url="https://kde.org/applications/development/org.kde.clazy"
arch="all"
license="LGPL-2.1+"
options="!check"  # need 'clang-tools-extra'
depends=""
makedepends="cmake clang-dev llvm$_llvmver-dev"
subpackages="$pkgname-doc"
source="https://download.kde.org/stable/clazy/$pkgver/src/clazy-$pkgver.tar.xz
	fix-link-fs-lib.patch
	"

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" \
		-DLLVM_ROOT="/usr/lib/llvm$_llvmver" \
		${CMAKE_CROSSOPTS} \
		.
	make
}

check() {
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="6a7c162392dd30aea29669275cea814d6daccf7931b8cdb20997f9bbff5619832d5461a6d0f854ecbc4726e52b6937c4f9cb8651087ffe73676c04239a38ca2b  clazy-1.11.tar.xz
4b7b946f3e8f748d5cc1eb3a10ff751f33285160eb2d28c532fc62e54bc7d8be0ffefc90861b22df3a2abf26776eb278748baeffa277f5f6c7929e8197411894  fix-link-fs-lib.patch"