diff options
author | Holger Hoffstätte <holger@applied-asynchrony.com> | 2024-06-27 17:09:22 +0200 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2024-06-28 07:51:41 +0000 |
commit | 6fe19bfdcdee575d46dbb717dc5b9816d00256b6 (patch) | |
tree | d3b8f0ccf50fb5187ca559589ca12019ed813de4 /dev-debug | |
parent | dev-python/twisted: add 24.3.0_p20240628 (diff) | |
download | gentoo-6fe19bfdcdee575d46dbb717dc5b9816d00256b6.tar.gz gentoo-6fe19bfdcdee575d46dbb717dc5b9816d00256b6.tar.bz2 gentoo-6fe19bfdcdee575d46dbb717dc5b9816d00256b6.zip |
dev-debug/bpftrace: add 0.21.1
This adds compatibility with LLVM-18 and no longer installs the internal
libraries, which are not meant for public consumption and create nothing
but unnecessary maintenance burden.
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
Diffstat (limited to 'dev-debug')
-rw-r--r-- | dev-debug/bpftrace/Manifest | 1 | ||||
-rw-r--r-- | dev-debug/bpftrace/bpftrace-0.21.1.ebuild | 95 | ||||
-rw-r--r-- | dev-debug/bpftrace/files/bpftrace-0.21.0-dont-compress-man.patch | 47 |
3 files changed, 143 insertions, 0 deletions
diff --git a/dev-debug/bpftrace/Manifest b/dev-debug/bpftrace/Manifest index dd7579864e68..637a70809c6b 100644 --- a/dev-debug/bpftrace/Manifest +++ b/dev-debug/bpftrace/Manifest @@ -1,3 +1,4 @@ DIST bpftrace-0.20.1.gh.tar.gz 1233431 BLAKE2B fe9221a94d58b43e0311f8c841df8421c3fe226a3fe61f2ec5cce5de309acdb69a68834e92a2e622a1750975869cbdaa95a90f9afb83989aa61b56b551fa96e3 SHA512 fdcc2b0d091d4ab428207877626b0fb37f3e0778730e6a6db26be869a086264e1f24186857c47597813aacde98621a66301bcf6c8004f77bdf9ebf180f198ba0 DIST bpftrace-0.20.3.gh.tar.gz 1233923 BLAKE2B c8a280441237d068029bd561a0fa70fd54676625c5bdd7d82a0a219d361cd71a460435ff05c865647d3e5c27d769ec296a47e5e7a3546fc8571af6a16d898300 SHA512 218a1bfac7e1a2b7eef5b0ed3e7403eed4bc932f2aa03c5f4c8924246c09088f5074ab3d54031e582cb4f8e7d0c7df1bb30007c2421c44d2c2506364f0ba5a0e DIST bpftrace-0.20.4.gh.tar.gz 1233327 BLAKE2B ef98dbae80285c42b6322c10666345600e594e7043184e7191c77a3158e8c188b7448a580c00b656c1c352601fc1898178d17a7f88f4f1f174187440074832b2 SHA512 a8d5b5bd7d35f9bb308cd7d0ae4eaee899312d3e6540164d3b29eac61159983ea01350311f53b7b6c5023844bde9a2cd3a2d50459116261a536c0e6e52963462 +DIST bpftrace-0.21.1.gh.tar.gz 1293781 BLAKE2B 154acfd076bd10d1ea7f81b77f8fe6b94812be7fc82bf798f508fa94a5558b068e1ec4bde7cecf51d1076593032d7674a5c0cde6432be7bb6dc4781656104915 SHA512 db6f5faf65fc2ac55ffbd1799b70941b8a6e4036c7fc2f56fe134f932dcf8a14fdd11a5a8b1d4b20261932d2d1ac18636cc1d7d4b87b31e366a9e53514a84ad3 diff --git a/dev-debug/bpftrace/bpftrace-0.21.1.ebuild b/dev-debug/bpftrace/bpftrace-0.21.1.ebuild new file mode 100644 index 000000000000..bf07da70b442 --- /dev/null +++ b/dev-debug/bpftrace/bpftrace-0.21.1.ebuild @@ -0,0 +1,95 @@ +# Copyright 2019-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LLVM_MAX_SLOT=18 + +inherit llvm linux-info cmake + +DESCRIPTION="High-level tracing language for eBPF" +HOMEPAGE="https://github.com/bpftrace/bpftrace" +MY_PV="${PV//_/}" +SRC_URI="https://github.com/bpftrace/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" + +LICENSE="Apache-2.0" +SLOT="0" + +KEYWORDS="~amd64 ~arm64 ~x86" +IUSE="lldb test" + +# lots of fixing needed +RESTRICT="test" + +RDEPEND=" + >=dev-libs/libbpf-1.1:= + >=dev-util/bcc-0.25.0:= + lldb? ( >=dev-debug/lldb-15 ) + >=sys-devel/llvm-15[llvm_targets_BPF(+)] + >=sys-devel/clang-15 + <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):= + <sys-devel/llvm-$((${LLVM_MAX_SLOT} + 1)):=[llvm_targets_BPF(+)] + sys-process/procps + sys-libs/binutils-libs:= + virtual/libelf:= +" +DEPEND=" + ${COMMON_DEPEND} + dev-libs/cereal:= + test? ( dev-cpp/gtest ) +" +BDEPEND=" + app-arch/xz-utils + app-alternatives/lex + app-alternatives/yacc + test? ( + app-editors/vim-core + dev-util/pahole + ) + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/bpftrace-0.21.0-dont-compress-man.patch" + "${FILESDIR}/bpftrace-0.11.4-old-kernels.patch" +) + +pkg_pretend() { + local CONFIG_CHECK=" + ~BPF + ~BPF_EVENTS + ~BPF_JIT + ~BPF_SYSCALL + ~FTRACE_SYSCALLS + ~HAVE_EBPF_JIT + " + + check_extra_config +} + +pkg_setup() { + llvm_pkg_setup +} + +src_configure() { + local mycmakeargs=( + # prevent automagic lldb use + $(cmake_use_find_package lldb LLDB) + # DO NOT build the internal libs as shared + -DBUILD_SHARED_LIBS=OFF + # DO dynamically link the bpftrace executable + -DSTATIC_LINKING:BOOL=OFF + # bug 809362, 754648 + -DBUILD_TESTING:BOOL=$(usex test) + -DBUILD_FUZZ:BOOL=OFF + -DENABLE_MAN:BOOL=OFF + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + doman man/man8/*.? +} diff --git a/dev-debug/bpftrace/files/bpftrace-0.21.0-dont-compress-man.patch b/dev-debug/bpftrace/files/bpftrace-0.21.0-dont-compress-man.patch new file mode 100644 index 000000000000..93bcfcf73e31 --- /dev/null +++ b/dev-debug/bpftrace/files/bpftrace-0.21.0-dont-compress-man.patch @@ -0,0 +1,47 @@ +diff --git a/man/adoc/CMakeLists.txt b/man/adoc/CMakeLists.txt +index 1a81dee0..c93ccbd2 100644 +--- a/man/adoc/CMakeLists.txt ++++ b/man/adoc/CMakeLists.txt +@@ -1,7 +1,5 @@ +-find_program(GZIP gzip REQUIRED) + find_program(ASCIIDOCTOR asciidoctor) + file(GLOB FILES *.adoc) +-set(GZFILES "") + if(NOT "${ASCIIDOCTOR}" STREQUAL "ASCIIDOCTOR-NOTFOUND") + foreach(FIL ${FILES}) + get_filename_component(NAME ${FIL} NAME_WE) +@@ -12,14 +10,9 @@ if(NOT "${ASCIIDOCTOR}" STREQUAL "ASCIIDOCTOR-NOTFOUND") + COMMAND ${ASCIIDOCTOR} ${FIL} -b manpage -o - > ${MANPAGE_FILE} + DEPENDS ${FIL}) + +- add_custom_command(OUTPUT ${GZ_MANPAGE_FILE} +- COMMAND ${GZIP} -nc ${MANPAGE_FILE} > ${GZ_MANPAGE_FILE} +- DEPENDS ${MANPAGE_FILE}) +- +- list(APPEND GZFILES ${GZ_MANPAGE_FILE}) + endforeach() +- add_custom_target(adoc_man DEPENDS ${GZFILES}) +- install(FILES ${GZFILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) ++ add_custom_target(adoc_man DEPENDS ${FILES}) ++ install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) + else() + message(WARNING "asciidoctor not found, building without bpftrace manpage") + add_custom_target(adoc_man) +diff --git a/man/man8/CMakeLists.txt b/man/man8/CMakeLists.txt +index 2a316cd9..2207cf80 100644 +--- a/man/man8/CMakeLists.txt ++++ b/man/man8/CMakeLists.txt +@@ -1,12 +1,3 @@ +-find_program(GZIP gzip REQUIRED) + file(GLOB FILES *.8) +-set(GZFILES "") +-foreach(FIL ${FILES}) +- get_filename_component(NAME ${FIL} NAME) +- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz +- COMMAND ${GZIP} -nc ${FIL} > ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz +- DEPENDS ${FIL}) +- list(APPEND GZFILES "${CMAKE_CURRENT_BINARY_DIR}/${NAME}.gz") +-endforeach() + add_custom_target(man_man DEPENDS ${GZFILES}) +-install(FILES ${GZFILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) ++install(FILES ${FILES} DESTINATION ${CMAKE_INSTALL_MANDIR}/man8) |