aboutsummaryrefslogtreecommitdiffstats
path: root/community/bloaty/APKBUILD
blob: e5c704a2df9396e38d05b319c4c53bc30f1c8c2d (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
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=bloaty
pkgver=1.0
pkgrel=1
pkgdesc="Bloaty McBloatface: a size profiler for binaries"
options="!check" # no test suite
url="https://github.com/google/bloaty"
arch="all"
license="Apache-2.0"
makedepends="cmake protobuf-dev re2-dev capstone-dev"
subpackages="$pkgname-dev"
source="https://github.com/google/bloaty/releases/download/v$pkgver/bloaty-$pkgver.tar.bz2
	f66077506462bf96fee79f7f20516ca5d1e02f8a.patch
	2aec85618e91af975af3146563333c2c2e97260.patch"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		$CMAKE_CROSSOPTS .
	make
}

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

	# Upstream forgot to install this via CMake.
	install -m755 liblibbloaty.so "$pkgdir"/usr/lib/liblibbloaty.so.1.0.0
	ln -s liblibbloaty.so.1.0.0 "$pkgdir"/usr/lib/liblibbloaty.so.1
	ln -s liblibbloaty.so.1 "$pkgdir"/usr/lib/liblibbloaty.so

	mkdir -p "$pkgdir"/usr/lib/cmake
	mv "$pkgdir"/usr/lib/Bloaty "$pkgdir"/usr/lib/cmake
}

sha512sums="3dd6cd25f5fdffc8702ac84fc87d7ab79c5fc0662a2ece3df0b531ebca368f78155b3f2eb646077e0ba91205b5bf8c4727587097b90162af6066ca6bfb3d4084  bloaty-1.0.tar.bz2
fdb6b116bdc8cff8c00e73306d110a08e47bb28c8df280c292ecdb4bf0ed683fa3a6a08f21863afb0bb3552b3520a10047f08efc0e9f522f7f6cf03f1d55f527  f66077506462bf96fee79f7f20516ca5d1e02f8a.patch
ef5231aec33e2e2db9b7c793d92af5ea97c29d6bf874b6a1356ea2b77f79b2d592c553e145aa4b8e65d93c2abf71cbb51d493e6d77cdb46805afaa9a34a7f0e4  2aec85618e91af975af3146563333c2c2e97260.patch"