# Template file for 'bpftrace'
pkgname=bpftrace
version=0.26.1
revision=1
_llvmver=21
archs="x86_64* aarch64* ppc64*"
build_style=cmake
configure_args="-DUSE_SYSTEM_LIBBPF=ON -DBUILD_TESTING=OFF" # needs root to run
hostmakedepends="flex pkg-config ruby-asciidoctor xxd"
makedepends="bcc-devel binutils-devel blazesym cereal clang${_llvmver}
 clang-tools-extra${_llvmver} elfutils-devel libbpf-devel libpcap-devel
 libxml2-devel llvm${_llvmver}-devel"
short_desc="High-level tracing language for Linux eBPF"
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=555368f32f94bfcb74b119a3d9c67b68200be6375b8f452f794a2d3f6ebbcd16
nostrip=yes  # needs to read own symbol table

export LLVM_DIR=/usr/lib/llvm/${_llvmver}
export Clang_DIR=${LLVM_DIR}
