diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2020-07-15 12:08:38 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2020-07-15 12:09:21 -0700 |
commit | 7b55743aa30fdbdbdfdc15d10465a5d3384917cf (patch) | |
tree | 585feb161bc8abfdcaee3f44f9fed8cbcec6dc8a /dev-util/bpftrace | |
parent | llvm.eclass: Add 12 to known slots (diff) | |
download | gentoo-7b55743aa30fdbdbdfdc15d10465a5d3384917cf.tar.gz gentoo-7b55743aa30fdbdbdfdc15d10465a5d3384917cf.tar.bz2 gentoo-7b55743aa30fdbdbdfdc15d10465a5d3384917cf.zip |
dev-util/bpftrace-0.11.0: Version bump, sync 9999
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util/bpftrace')
-rw-r--r-- | dev-util/bpftrace/Manifest | 1 | ||||
-rw-r--r-- | dev-util/bpftrace/bpftrace-0.11.0.ebuild | 86 | ||||
-rw-r--r-- | dev-util/bpftrace/bpftrace-9999.ebuild | 48 | ||||
-rw-r--r-- | dev-util/bpftrace/files/bpftrace-0.11.0-install-libs.patch | 156 |
4 files changed, 277 insertions, 14 deletions
diff --git a/dev-util/bpftrace/Manifest b/dev-util/bpftrace/Manifest index 44a6444f74bd..76af8334ccf9 100644 --- a/dev-util/bpftrace/Manifest +++ b/dev-util/bpftrace/Manifest @@ -1,4 +1,5 @@ DIST bpftrace-0.10.0.tar.gz 835854 BLAKE2B 623369bb2a2ad8d5eec364afa98bdae3fbe5e66182d8f1187fe86a8bd70ee357a554eb063fdbe5476eab23912adf2cf027092cac3e6989d8f716e91aa5d01212 SHA512 da400efe78cea505a32deead594b047ec4394d3eefe86e7b6853fe2dc715c5847a3abcbd26c1fac39d0a534f1e57d6c0bc3625e0c3f1054b0d84b7b1d6eb69b9 +DIST bpftrace-0.11.0.tar.gz 867444 BLAKE2B a99255befadea0b4cb54299a8318c0a7a667ac2258b612750705b4d351ac59f4411f2567bc0100929291e3c9756d276671e41af9d398b118b3d486dace2953d7 SHA512 32bf0c23a7b0e1a57d0e0b8fc845a9e184e201ac3f6018a3d3cee8c97096093b333578cb898ede02fb3ab8d55ba9bcd2bb67ac70b81a49461c0f6e5c03c2a6f5 DIST bpftrace-0.9.2.tar.gz 715019 BLAKE2B 1f20998bd379b91cb46d7e856a5d892e0de7ad6d9f85cb657fcf6a0c879167c0931d28c78e4be98adab349144fe0bc99871cf70556dd1998e5b8f918fa1702e3 SHA512 5c6ee5fec690a907c370ed0bed85906d304215d7f97b99a2cae90453061f522fa6369627c9524a5a24e97c6cbb595a880a2a1b1d71095fffb693a4cef172a6f0 DIST bpftrace-0.9.3.tar.gz 743506 BLAKE2B d00708bcebaf7f039788dfc52f4a0bb501bb3c52e8b789060f824652b3917ea3950d77dbc7bee04da013f4b552338251bda9781d19a03ec227208b943fded232 SHA512 49b12735fe2fbf4f72d3d0c0372a7a570c7abc92d1f626624d591a863009c8bfabdf86825f133885800c7ea293773651be66e4c792f9cd397f82d250a7af83be DIST bpftrace-0.9.4.tar.gz 792253 BLAKE2B d34d390a612825141b86ba14482f06820c88bea76580c53c17d19a6480c0e2a5656531f39b79fbcea4e004ecd3eea36877560f22fac584f36a3dffa1e7fe96c5 SHA512 d2b32235fa81d6f06771df32877388a9105230adfc638b0d0ebf4f11a567246e8514d93c14da9c7008dbacd6b2c4108604fc5a2721ef831efa5c596cbe50b1da diff --git a/dev-util/bpftrace/bpftrace-0.11.0.ebuild b/dev-util/bpftrace/bpftrace-0.11.0.ebuild new file mode 100644 index 000000000000..eab733354337 --- /dev/null +++ b/dev-util/bpftrace/bpftrace-0.11.0.ebuild @@ -0,0 +1,86 @@ +# Copyright 2019-2020 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 ~arm64 ~x86" + BDEPEND="app-arch/xz-utils " +fi + +LICENSE="Apache-2.0" +SLOT="0" +IUSE="test" + +COMMON_DEPEND=" + dev-util/systemtap + sys-devel/clang:= + dev-libs/libbpf:= + >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)] + <sys-devel/clang-10:= + <sys-devel/llvm-10:=[llvm_targets_BPF(+)] + >=dev-util/bcc-0.13.0:= + virtual/libelf +" +DEPEND="${COMMON_DEPEND} + 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.11.0-install-libs.patch" + "${FILESDIR}/bpftrace-0.10.0-dont-compress-man.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=9 llvm_pkg_setup +} + +src_prepare() { + cmake_src_prepare +} + +src_configure() { + local -a mycmakeargs + mycmakeargs=( + "-DSTATIC_LINKING:BOOL=OFF" + "-DBUILD_TESTING:BOOL=OFF" + ) + + cmake_src_configure +} diff --git a/dev-util/bpftrace/bpftrace-9999.ebuild b/dev-util/bpftrace/bpftrace-9999.ebuild index ccad41e9941b..eab733354337 100644 --- a/dev-util/bpftrace/bpftrace-9999.ebuild +++ b/dev-util/bpftrace/bpftrace-9999.ebuild @@ -1,9 +1,9 @@ -# Copyright 2019 Gentoo Authors +# Copyright 2019-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit toolchain-funcs linux-info cmake-utils +inherit toolchain-funcs llvm linux-info cmake DESCRIPTION="High-level tracing language for eBPF" HOMEPAGE="https://github.com/iovisor/bpftrace" @@ -13,7 +13,8 @@ if [[ ${PV} =~ 9{4,} ]]; then EGIT_REPO_URI="https://github.com/iovisor/${PN}" BDEPEND="" else - SRC_URI="https://github.com/iovisor/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + MY_PV="${PV//_/}" + SRC_URI="https://github.com/iovisor/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~arm64 ~x86" BDEPEND="app-arch/xz-utils " fi @@ -22,37 +23,56 @@ LICENSE="Apache-2.0" SLOT="0" IUSE="test" -COMMON_DEPEND="dev-util/systemtap +COMMON_DEPEND=" + dev-util/systemtap sys-devel/clang:= dev-libs/libbpf:= >=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)] - >=dev-util/bcc-0.10.0:= - virtual/libelf" + <sys-devel/clang-10:= + <sys-devel/llvm-10:=[llvm_targets_BPF(+)] + >=dev-util/bcc-0.13.0:= + virtual/libelf +" DEPEND="${COMMON_DEPEND} - test? ( dev-cpp/gtest )" + test? ( dev-cpp/gtest ) +" RDEPEND="${COMMON_DEPEND}" -BDEPEND+="dev-util/cmake +BDEPEND+=" + >=dev-util/cmake-3.8 sys-devel/flex - sys-devel/bison" + sys-devel/bison +" +S="${WORKDIR}/${PN}-${MY_PV:-${PV}}" QA_DT_NEEDED="/usr/lib.*/libbpftraceresources.so" PATCHES=( - "${FILESDIR}/bpftrace-0.9.3-install-libs.patch" - "${FILESDIR}/bpftrace-mandir.patch" + "${FILESDIR}/bpftrace-0.11.0-install-libs.patch" + "${FILESDIR}/bpftrace-0.10.0-dont-compress-man.patch" ) # lots of fixing needed RESTRICT="test" pkg_pretend() { - local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~BPF_JIT ~BPF_EVENTS" + local CONFIG_CHECK=" + ~BPF + ~BPF_EVENTS + ~BPF_JIT + ~BPF_SYSCALL + ~FTRACE_SYSCALLS + ~HAVE_EBPF_JIT + " check_extra_config } +pkg_setup() { + LLVM_MAX_SLOT=9 llvm_pkg_setup +} + src_prepare() { - cmake-utils_src_prepare + cmake_src_prepare } src_configure() { @@ -62,5 +82,5 @@ src_configure() { "-DBUILD_TESTING:BOOL=OFF" ) - cmake-utils_src_configure + cmake_src_configure } diff --git a/dev-util/bpftrace/files/bpftrace-0.11.0-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.11.0-install-libs.patch new file mode 100644 index 000000000000..a28e37564eae --- /dev/null +++ b/dev-util/bpftrace/files/bpftrace-0.11.0-install-libs.patch @@ -0,0 +1,156 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1bca8d6..1482b29 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -91,9 +91,10 @@ find_package(FLEX REQUIRED) + bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc VERBOSE) + flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc) + add_flex_bison_dependency(flex_lexer bison_parser) +-add_library(parser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS}) +-target_compile_options(parser PRIVATE "-w") +-target_include_directories(parser PUBLIC src src/ast ${CMAKE_BINARY_DIR}) ++add_library(bpftraceparser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS}) ++target_compile_options(bpftraceparser PRIVATE "-w") ++target_include_directories(bpftraceparser PUBLIC src src/ast ${CMAKE_BINARY_DIR}) ++install(TARGETS bpftraceparser LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + include(CheckSymbolExists) + set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE) +diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt +index a95c60a..f5c4d67 100644 +--- a/resources/CMakeLists.txt ++++ b/resources/CMakeLists.txt +@@ -1,6 +1,7 @@ +-add_library(resources headers.cpp) ++add_library(bpftraceresources headers.cpp) + +-target_include_directories(resources PUBLIC ../src) ++target_include_directories(bpftraceresources PUBLIC ../src) ++install(TARGETS bpftraceresources LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + + function(embed_headers output) + file(WRITE ${output} "#include \"headers.h\"\n\nnamespace bpftrace {\n") +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 487fa9b..61b7b38 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -84,7 +84,8 @@ if (ALLOW_UNSAFE_PROBE) + target_compile_definitions(bpftrace PRIVATE HAVE_UNSAFE_PROBE) + endif(ALLOW_UNSAFE_PROBE) + +-target_link_libraries(bpftrace arch ast parser resources) ++target_link_libraries(bpftrace bpftracearch bpftraceast bpftraceparser ++ bpftraceresources) + + target_link_libraries(bpftrace ${LIBBCC_LIBRARIES}) + if(STATIC_LINKING) +diff --git a/src/arch/CMakeLists.txt b/src/arch/CMakeLists.txt +index a26c1c8..ffb5900 100644 +--- a/src/arch/CMakeLists.txt ++++ b/src/arch/CMakeLists.txt +@@ -1,13 +1,15 @@ + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- add_library(arch aarch64.cpp) ++ add_library(bpftracearch aarch64.cpp) + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64" OR + CMAKE_SYSTEM_PROCESSOR STREQUAL "ppc64le") +- add_library(arch ppc64.cpp) ++ add_library(bpftracearch ppc64.cpp) + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "s390" OR + CMAKE_SYSTEM_PROCESSOR STREQUAL "s390x") +- add_library(arch s390.cpp) ++ add_library(bpftracearch s390.cpp) + elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64") +- add_library(arch x86_64.cpp) ++ add_library(bpftracearch x86_64.cpp) + else() + message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}") + endif() ++ ++install(TARGETS bpftracearch LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt +index 649bf0a..b969b9c 100644 +--- a/src/ast/CMakeLists.txt ++++ b/src/ast/CMakeLists.txt +@@ -1,4 +1,4 @@ +-add_library(ast ++add_library(bpftraceast + ast.cpp + attachpoint_parser.cpp + codegen_llvm.cpp +@@ -7,17 +7,18 @@ add_library(ast + printer.cpp + semantic_analyser.cpp + ) ++install(TARGETS bpftraceast LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +-target_include_directories(ast PUBLIC ${CMAKE_SOURCE_DIR}/src) +-target_include_directories(ast PUBLIC ${CMAKE_SOURCE_DIR}/src/ast) +-target_include_directories(ast PUBLIC ${CMAKE_BINARY_DIR}) +-target_link_libraries(ast arch) ++target_include_directories(bpftraceast PUBLIC ${CMAKE_SOURCE_DIR}/src) ++target_include_directories(bpftraceast PUBLIC ${CMAKE_SOURCE_DIR}/src/ast) ++target_include_directories(bpftraceast PUBLIC ${CMAKE_BINARY_DIR}) ++target_link_libraries(bpftraceast bpftracearch) + + if (HAVE_BCC_KFUNC) +- target_compile_definitions(ast PRIVATE HAVE_BCC_KFUNC) ++ target_compile_definitions(bpftraceast PRIVATE HAVE_BCC_KFUNC) + endif(HAVE_BCC_KFUNC) + +-add_dependencies(ast parser) ++add_dependencies(bpftraceast bpftraceparser) + + if (STATIC_LINKING) + set(clang_libs +@@ -41,17 +42,17 @@ if (STATIC_LINKING) + if(EMBED_LIBCLANG_ONLY) + unlink_transitive_dependency("${CLANG_EXPORTED_TARGETS}" "LLVM") + endif() +- target_link_libraries(ast ${CLANG_EMBEDDED_CMAKE_TARGETS}) ++ target_link_libraries(bpftraceast ${CLANG_EMBEDDED_CMAKE_TARGETS}) + else() + list(INSERT clang_libs 0 libclang.a) + endif() + + if(EMBED_LLVM) +- target_link_libraries(ast ${LLVM_EMBEDDED_CMAKE_TARGETS}) ++ target_link_libraries(bpftraceast ${LLVM_EMBEDDED_CMAKE_TARGETS}) + else() + llvm_map_components_to_libnames(llvm_libs bpfcodegen ipo irreader mcjit option orcjit ${LLVM_TARGETS_TO_BUILD}) +- target_link_libraries(ast ${clang_libs}) +- target_link_libraries(ast ${llvm_libs}) ++ target_link_libraries(bpftraceast ${clang_libs}) ++ target_link_libraries(bpftraceast ${llvm_libs}) + endif() + + if(STATIC_LIBC) +@@ -60,11 +61,11 @@ if (STATIC_LINKING) + else() + find_library(found_LLVM LLVM HINTS ${LLVM_LIBRARY_DIRS}) + if(found_LLVM) +- target_link_libraries(ast LLVM) ++ target_link_libraries(bpftraceast LLVM) + else() + llvm_map_components_to_libnames(_llvm_libs bpfcodegen ipo irreader mcjit orcjit ${LLVM_TARGETS_TO_BUILD}) + llvm_expand_dependencies(llvm_libs ${_llvm_libs}) +- target_link_libraries(ast ${llvm_libs}) ++ target_link_libraries(bpftraceast ${llvm_libs}) + endif() +- target_link_libraries(ast libclang) ++ target_link_libraries(bpftraceast libclang) + endif() +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 4104a57..59486de 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -101,7 +101,8 @@ if(HAVE_BFD_DISASM) + endif(STATIC_LINKING) + endif(HAVE_BFD_DISASM) + +-target_link_libraries(bpftrace_test arch ast parser resources) ++target_link_libraries(bpftrace_test bpftracearch bpftraceast bpftraceparser ++ bpftraceresources) + + target_link_libraries(bpftrace_test ${LIBBCC_LIBRARIES}) + if (STATIC_LINKING) |