aboutsummaryrefslogtreecommitdiffstats
path: root/community/apitrace/APKBUILD
blob: 755c2e6f18b80f6c2dec580c24d03568acaa5fb9 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Contributor: Bhushan Shah <bshah@kde.org>
# Maintainer: Luca Weiss <luca@z3ntu.xyz>
pkgname=apitrace
pkgver=11.1
pkgrel=2
pkgdesc="Tools for tracing OpenGL, Direct3D, and other graphics APIs"
url="https://apitrace.github.io/"
arch="all"
license="MIT"
depends="python3"
makedepends="
	cmake
	gtest-dev
	libpng-dev
	libx11-dev
	linux-headers
	mesa-dev
	qt5-qtbase-dev
	samurai
	snappy-dev
	zlib-dev
	"
subpackages="$pkgname-doc"
# Update to submodule revision as in https://github.com/apitrace/apitrace/tree/master/thirdparty when updating
_libbacktrace_commit="dedbe13fda00253fe5d4f2fb812c909729ed5937"
source="https://github.com/apitrace/apitrace/archive/$pkgver/apitrace-$pkgver.tar.gz
	https://github.com/ianlancetaylor/libbacktrace/archive/$_libbacktrace_commit/libbacktrace-$_libbacktrace_commit.tar.gz
	no-submodule.patch
	"

[ "$CARCH" = "riscv64" ] && options="$options textrels"

prepare() {
	default_prepare

	# Remove bundled libraries, except for some
	rm -rf `ls -1d thirdparty/* | grep -Ev "(khronos|md5|crc32c|libbacktrace.cmake|support|CMakeLists.txt)"`

	# Add bundled libbacktrace
	mv "$srcdir"/libbacktrace-$_libbacktrace_commit \
		thirdparty/libbacktrace
}

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DENABLE_STATIC_SNAPPY=OFF
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
df6dbddc1907dde7eab4ed41009217d9ec8fa7c8273afa39c4a4a97989b94b78043e3f410457d7619054c7c4c429985ac672f8bc0278e3782ae9d81234376e84  apitrace-11.1.tar.gz
39785b8e2764dbfdd2db43ff5d99b4b6d2c75f932530d23e1e7d8f1da1407bed83c0ba9654669756d66d261b3b57083b3a8a1fe7fdb4cfa84bd81ebd9cb6b291  libbacktrace-dedbe13fda00253fe5d4f2fb812c909729ed5937.tar.gz
2f1ca41ab0d9f162f0b52699ab5664ab23e34a79d62ca105a8b6c9154e718e158c26a87aee48ddac66e87295dee7aab968136510afde5716c90e2206bcf14b21  no-submodule.patch
"