# Template file for 'bpftrace'
pkgname=bpftrace
version=0.11.2
revision=1
archs="x86_64* aarch64* ppc64*"
build_style=cmake
configure_args="-DBUILD_TESTING=OFF"  # needs root to run
hostmakedepends="pkg-config flex"
makedepends="bcc-devel clang clang-tools-extra elfutils-devel llvm"
short_desc="High-level tracing language for Linux enhanced Berkeley Packet Filter"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
homepage="https://github.com/iovisor/bpftrace/"
distfiles="https://github.com/iovisor/bpftrace/archive/v${version}.tar.gz"
checksum=1f0fc30073547e3b285e1a373aa469bb18d3ba27f8c05f91016df0ca84f77f90

post_extract() {
	for i in ${FILESDIR}/bpftrace-*.patch; do
		patch -sNp1 -i ${i}
	done
}

post_install() {
	# clashes with bcc-tools
	rm -rf ${DESTDIR}/usr/share/man
}
