diff options
author | Patrick McLean <patrick.mclean@sony.com> | 2021-10-26 18:18:33 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2021-10-27 09:54:53 -0700 |
commit | b09a22354f2e86e5e2605292b9b6d555699f33f7 (patch) | |
tree | 5ad01f8a6e81c0f7ff908057d2aab332996a1b00 /dev-util/bpftrace/bpftrace-0.14.0-r2.ebuild | |
parent | media-video/openshot: bump (diff) | |
download | gentoo-b09a22354f2e86e5e2605292b9b6d555699f33f7.tar.gz gentoo-b09a22354f2e86e5e2605292b9b6d555699f33f7.tar.bz2 gentoo-b09a22354f2e86e5e2605292b9b6d555699f33f7.zip |
dev-util/bpftrace: Fix patch to make sure libaot is installed
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util/bpftrace/bpftrace-0.14.0-r2.ebuild')
-rw-r--r-- | dev-util/bpftrace/bpftrace-0.14.0-r2.ebuild | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/dev-util/bpftrace/bpftrace-0.14.0-r2.ebuild b/dev-util/bpftrace/bpftrace-0.14.0-r2.ebuild new file mode 100644 index 000000000000..483f341c4909 --- /dev/null +++ b/dev-util/bpftrace/bpftrace-0.14.0-r2.ebuild @@ -0,0 +1,98 @@ +# Copyright 2019-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs llvm linux-info cmake + +DESCRIPTION="High-level tracing language for eBPF" +HOMEPAGE="https://github.com/iovisor/bpftrace" + +if [[ ${PV} =~ 9{4,} ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/iovisor/${PN}" + BDEPEND="" +else + MY_PV="${PV//_/}" + SRC_URI="https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + BDEPEND="app-arch/xz-utils " +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="fuzzing test" + +COMMON_DEPEND=" + dev-libs/libbpf:= + >=dev-util/bcc-0.13.0:= + dev-util/systemtap + >=sys-devel/llvm-6:=[llvm_targets_BPF(+)] + <=sys-devel/llvm-13:=[llvm_targets_BPF(+)] + <=sys-devel/clang-13:= + sys-libs/binutils-libs:= + virtual/libelf +" +DEPEND=" + ${COMMON_DEPEND} + dev-libs/cereal:= + test? ( dev-cpp/gtest ) +" +RDEPEND=" + ${COMMON_DEPEND} +" +BDEPEND+=" + >=dev-util/cmake-3.8 + sys-devel/flex + sys-devel/bison +" + +S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" +QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so" + +PATCHES=( + "${FILESDIR}/bpftrace-0.14.0-install-libs.patch" + "${FILESDIR}/bpftrace-0.14.0-dont-compress-man.patch" + "${FILESDIR}/bpftrace-0.11.4-old-kernels.patch" + "${FILESDIR}/bpftrace-0.12.0-fuzzing-build.patch" +) + +# lots of fixing needed +RESTRICT="test" + +pkg_pretend() { + local CONFIG_CHECK=" + ~BPF + ~BPF_EVENTS + ~BPF_JIT + ~BPF_SYSCALL + ~FTRACE_SYSCALLS + ~HAVE_EBPF_JIT + " + + check_extra_config +} + +pkg_setup() { + LLVM_MAX_SLOT=12 llvm_pkg_setup +} + +src_prepare() { + cmake_src_prepare +} + +src_configure() { + local -a mycmakeargs=( + -DSTATIC_LINKING:BOOL=OFF + -DBUILD_TESTING:BOOL=OFF + -DBUILD_FUZZ:BOOL=$(usex fuzzing) + -DENABLE_MAN:BOOL=OFF + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + doman man/man8/*.? +} |