summaryrefslogtreecommitdiff
path: root/repo/pahole/pahole.xibuild
blob: 46586dc4fb3f2acf24a290802b745514c04bbfea (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
#!/bin/sh

NAME="pahole"
DESC="dwarf manipulation utilities"

MAKEDEPS=" cmake elfutils libdwarf zlib libbpf linux-headers musl-obstack argp-standalone samurai"

PKG_VER=1.24
SOURCE="https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-v$PKG_VER.tar.gz"

ADDITIONAL="
0001-libbpf-Update-libbpf-to-the-latest-git-HEAD.patch
"

prepare () {
    apply_patches
}

build() {
	export CFLAGS="$CFLAGS -I/usr/include/bpf/uapi"

	cmake -B build -G Ninja . \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-D__LIB=lib \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake \
		-DLIBBPF_EMBEDDED=OFF
	cmake --build build
}

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