From 83059a7de54913700cdfe7d36391673c1b7ebcc9 Mon Sep 17 00:00:00 2001 From: Patrick McLean Date: Tue, 26 Oct 2021 15:05:35 -0700 Subject: dev-util/bpftrace: bump fix install of ast lib (bug # 784332) Closes: https://bugs.gentoo.org/784332 Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Patrick McLean --- dev-util/bpftrace/bpftrace-0.14.0-r1.ebuild | 98 ++++++++++++++++++++++ dev-util/bpftrace/bpftrace-0.14.0.ebuild | 98 ---------------------- .../files/bpftrace-0.14.0-install-libs.patch | 9 +- 3 files changed, 103 insertions(+), 102 deletions(-) create mode 100644 dev-util/bpftrace/bpftrace-0.14.0-r1.ebuild delete mode 100644 dev-util/bpftrace/bpftrace-0.14.0.ebuild (limited to 'dev-util/bpftrace') diff --git a/dev-util/bpftrace/bpftrace-0.14.0-r1.ebuild b/dev-util/bpftrace/bpftrace-0.14.0-r1.ebuild new file mode 100644 index 000000000000..483f341c4909 --- /dev/null +++ b/dev-util/bpftrace/bpftrace-0.14.0-r1.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/*.? +} diff --git a/dev-util/bpftrace/bpftrace-0.14.0.ebuild b/dev-util/bpftrace/bpftrace-0.14.0.ebuild deleted file mode 100644 index 483f341c4909..000000000000 --- a/dev-util/bpftrace/bpftrace-0.14.0.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# 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/*.? -} diff --git a/dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch b/dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch index 00d35c6f49e7..dc8e89052602 100644 --- a/dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch +++ b/dev-util/bpftrace/files/bpftrace-0.14.0-install-libs.patch @@ -115,7 +115,7 @@ index 76bb217e..4ad0f626 100644 + +install(TARGETS bpftracearch LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt -index 014295cd..b038aa18 100644 +index 014295cd..c35f6ac6 100644 --- a/src/ast/CMakeLists.txt +++ b/src/ast/CMakeLists.txt @@ -1,6 +1,6 @@ @@ -126,13 +126,14 @@ index 014295cd..b038aa18 100644 async_event_types.cpp attachpoint_parser.cpp int_parser.cpp -@@ -20,11 +20,12 @@ add_library(ast +@@ -20,11 +20,13 @@ add_library(ast target_include_directories(ast_defs PUBLIC ${CMAKE_SOURCE_DIR}/src) target_include_directories(ast_defs PUBLIC ${CMAKE_SOURCE_DIR}/src/ast) target_include_directories(ast_defs PUBLIC ${CMAKE_BINARY_DIR}) -target_link_libraries(ast ast_defs arch bpforc parser) +target_link_libraries(bpftraceast ast_defs bpftracearch bpforc bpftraceparser) +install(TARGETS ast_defs LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++install(TARGETS bpftraceast LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) -add_dependencies(ast_defs parser) +add_dependencies(ast_defs bpftraceparser) @@ -142,7 +143,7 @@ index 014295cd..b038aa18 100644 if (STATIC_LINKING) set(clang_libs -@@ -55,11 +56,11 @@ if (STATIC_LINKING) +@@ -55,11 +57,11 @@ if (STATIC_LINKING) if(EMBED_USE_LLVM) @@ -157,7 +158,7 @@ index 014295cd..b038aa18 100644 endif() if(STATIC_LIBC) -@@ -69,13 +70,13 @@ if (STATIC_LINKING) +@@ -69,13 +71,13 @@ if (STATIC_LINKING) else() find_library(found_LLVM LLVM HINTS ${LLVM_LIBRARY_DIRS}) if(found_LLVM) -- cgit v1.2.3-65-gdbad