public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Patrick McLean" <chutzpah@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/bcc/, dev-util/bcc/files/
Date: Tue, 12 Mar 2019 00:27:35 +0000 (UTC)	[thread overview]
Message-ID: <1552350446.7c033c7f07e7b18074e2c1f8b7e4581d90b22d81.chutzpah@gentoo> (raw)

commit:     7c033c7f07e7b18074e2c1f8b7e4581d90b22d81
Author:     Patrick McLean <patrick.mclean <AT> sony <DOT> com>
AuthorDate: Tue Mar 12 00:27:26 2019 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Tue Mar 12 00:27:26 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7c033c7f

dev-util/bcc: Version bump to 0.9.0

Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>

 dev-util/bcc/Manifest                              |   1 +
 dev-util/bcc/bcc-0.9.0.ebuild                      |  63 +++++++++++++
 .../files/bcc-0.9.0-no-luajit-automagic-dep.patch  |  20 +++++
 dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch   | 100 +++++++++++++++++++++
 4 files changed, 184 insertions(+)

diff --git a/dev-util/bcc/Manifest b/dev-util/bcc/Manifest
index 8ce77c72361..a4b0f0db8d9 100644
--- a/dev-util/bcc/Manifest
+++ b/dev-util/bcc/Manifest
@@ -1,2 +1,3 @@
 DIST bcc-0.6.0.tar.gz 1986593 BLAKE2B 514c2c781eb94d99560232d8050b5664ce3565622b236e78cd111be27b3482849965600a1d574f59243917672f00bb3cef65cab63103f6c4a5cf62024c683d9b SHA512 1a8edf6da22f3119a74cf43f03ec83b97ed2f6fc18828d750d8a695ac1451b6b3209e5d2cf48bc87f53fa9447e8813a018a58d31588d477e4aa364a2d0217e80
 DIST bcc-0.7.0.tar.gz 2009289 BLAKE2B 370b553521289d983d1165633e76a5e405250b9b09dbf3e78c127d232908e73facce06097ce4dbf0bbccda929b6715a9b7460affe123556087c8ca00b8d62c0b SHA512 ebe6c4cbecba2d587c69af71ddc8cb451b2b8e1d49ef887f291c813320c2c60d49357500fc2751d5b418df2be1d02763c385d89de6efa6e10f049c25acf01b4e
+DIST bcc-0.9.0.tar.gz 2036984 BLAKE2B cebbeb57f06af90442d28be1633a54c198bf796786c4fcca3a83dea03bc76949f958dd24f7d85feb2e3402576410f965754f3d031076486b7d378493c56035e8 SHA512 373080181380ec3bcb13469e29ff1f792e924a2df00a614da4647ed54060ad216525dd0f49c5d0afba7946a6d2f4e3475af97250a33db825945af3d165294091

diff --git a/dev-util/bcc/bcc-0.9.0.ebuild b/dev-util/bcc/bcc-0.9.0.ebuild
new file mode 100644
index 00000000000..403c7245730
--- /dev/null
+++ b/dev-util/bcc/bcc-0.9.0.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} )
+
+inherit cmake-utils linux-info python-single-r1 python-utils-r1
+
+DESCRIPTION="Tools for BPF-based Linux IO analysis, networking, monitoring, and more"
+HOMEPAGE="https://iovisor.github.io/bcc/"
+EGIT_COMMIT="v${PV}"
+SRC_URI="https://github.com/iovisor/bcc/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz"
+RESTRICT="test"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+luajit"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="dev-libs/libbpf:=
+	>=dev-libs/elfutils-0.166:=
+	sys-devel/clang:=
+	>=sys-devel/llvm-3.7.1:=[llvm_targets_BPF(+)]
+	luajit? ( dev-lang/luajit )
+	${PYTHON_DEPS}"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-util/cmake
+	virtual/pkgconfig"
+
+S=${WORKDIR}/${PN}-${EGIT_COMMIT#v}
+
+PATCHES=(
+	"${FILESDIR}/bcc-0.9.0-system-libbpf.patch"
+	"${FILESDIR}/bcc-0.9.0-no-luajit-automagic-dep.patch"
+)
+
+pkg_pretend() {
+	local CONFIG_CHECK="~BPF ~BPF_SYSCALL ~NET_CLS_BPF ~NET_ACT_BPF
+		~BPF_JIT ~BPF_EVENTS ~DEBUG_INFO ~FUNCTION_TRACER ~KALLSYMS_ALL
+		~KPROBES"
+
+	check_extra_config
+}
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DREVISION=${PV%%_*}
+		$(usex luajit '-DWITH_LUAJIT=1' '' '' '')
+	)
+
+	cmake-utils_src_configure
+}
+
+src_install() {
+	cmake-utils_src_install
+	python_fix_shebang "${ED}"
+}

diff --git a/dev-util/bcc/files/bcc-0.9.0-no-luajit-automagic-dep.patch b/dev-util/bcc/files/bcc-0.9.0-no-luajit-automagic-dep.patch
new file mode 100644
index 00000000000..ee076efce92
--- /dev/null
+++ b/dev-util/bcc/files/bcc-0.9.0-no-luajit-automagic-dep.patch
@@ -0,0 +1,20 @@
+diff --git a/cmake/FindLuaJIT.cmake b/cmake/FindLuaJIT.cmake
+index 5a2bcf85..7f6e07e4 100644
+--- a/cmake/FindLuaJIT.cmake
++++ b/cmake/FindLuaJIT.cmake
+@@ -28,6 +28,7 @@
+ # 2010 - modified for cronkite to find luajit instead of lua, as it was before.
+ #
+ 
++if(WITH_LUAJIT)
+ FIND_PATH(LUAJIT_INCLUDE_DIR lua.h
+   HINTS
+   $ENV{LUAJIT_DIR}
+@@ -58,6 +59,7 @@ FIND_LIBRARY(LUAJIT_LIBRARY
+   /opt/csw
+   /opt
+ )
++endif()
+ 
+ IF(LUAJIT_LIBRARY)
+   IF(UNIX AND NOT APPLE)

diff --git a/dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch b/dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch
new file mode 100644
index 00000000000..18868272dcb
--- /dev/null
+++ b/dev-util/bcc/files/bcc-0.9.0-system-libbpf.patch
@@ -0,0 +1,100 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 94aac856..33492c27 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -61,6 +61,9 @@ FOREACH(DIR ${LLVM_INCLUDE_DIRS})
+   include_directories("${DIR}/../tools/clang/include")
+ ENDFOREACH()
+ 
++find_package(PkgConfig)
++pkg_check_modules(LIBBPF REQUIRED libbpf)
++
+ # Set to a string path if system places kernel lib directory in
+ # non-default location.
+ if(NOT DEFINED BCC_KERNEL_MODULES_DIR)
+diff --git a/introspection/CMakeLists.txt b/introspection/CMakeLists.txt
+index 88df6e84..a4033c02 100644
+--- a/introspection/CMakeLists.txt
++++ b/introspection/CMakeLists.txt
+@@ -8,6 +8,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src/cc/libbpf/include/uapi)
+ option(INSTALL_INTROSPECTION "Install BPF introspection tools" ON)
+ 
+ add_executable(bps bps.c)
+-target_link_libraries(bps bpf-static)
++target_link_libraries(bps bpf-static ${LIBBPF_LIBRARIES})
+ 
+ install (TARGETS bps DESTINATION share/bcc/introspection)
+diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt
+index 59a59856..2af70525 100644
+--- a/src/cc/CMakeLists.txt
++++ b/src/cc/CMakeLists.txt
+@@ -28,7 +28,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLLVM_MAJOR_VERSION=${CMAKE_MATCH_1}")
+ 
+ include(static_libstdc++)
+ 
+-file(GLOB libbpf_sources "libbpf/src/*.c")
++#file(GLOB libbpf_sources "libbpf/src/*.c")
+ add_library(bpf-static STATIC libbpf.c perf_reader.c ${libbpf_sources})
+ set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bpf)
+ add_library(bpf-shared SHARED libbpf.c perf_reader.c ${libbpf_sources})
+@@ -81,10 +81,10 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${llvm_lib_exclude_f
+ # bcc_common_libs_for_s for shared libraries
+ set(bcc_common_libs_for_a b_frontend clang_frontend bpf-static
+   -Wl,--whole-archive ${clang_libs} ${llvm_libs} -Wl,--no-whole-archive
+-  ${LIBELF_LIBRARIES})
++  ${LIBELF_LIBRARIES} ${LIBBPF_LIBRARIES})
+ set(bcc_common_libs_for_s ${bcc_common_libs_for_a})
+ set(bcc_common_libs_for_lua b_frontend clang_frontend bpf-static
+-  ${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES})
++	${clang_libs} ${llvm_libs} ${LIBELF_LIBRARIES} ${LIBBPF_LIBRARIES})
+ 
+ if(ENABLE_CPP_API)
+   add_subdirectory(api)
+@@ -115,4 +115,3 @@ install(DIRECTORY libbpf/include/uapi/linux/ DESTINATION include/bcc/compat/linu
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libbcc.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif(ENABLE_CLANG_JIT)
+ install(FILES ${bcc_common_headers} DESTINATION include/bcc)
+-install(TARGETS bpf-shared LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+diff --git a/src/cc/bcc_btf.cc b/src/cc/bcc_btf.cc
+index 881959af..62f73f54 100644
+--- a/src/cc/bcc_btf.cc
++++ b/src/cc/bcc_btf.cc
+@@ -19,8 +19,8 @@
+ #include <string.h>
+ #include "linux/btf.h"
+ #include "libbpf.h"
+-#include "libbpf/src/libbpf.h"
+-#include "libbpf/src/btf.h"
++#include <bpf/libbpf.h>
++#include <bpf/btf.h>
+ #include <vector>
+ 
+ #define BCC_MAX_ERRNO       4095
+diff --git a/src/cc/bpf_module.cc b/src/cc/bpf_module.cc
+index cf6ea8f3..1be7b788 100644
+--- a/src/cc/bpf_module.cc
++++ b/src/cc/bpf_module.cc
+@@ -43,7 +43,7 @@
+ #include "exported_files.h"
+ #include "libbpf.h"
+ #include "bcc_btf.h"
+-#include "libbpf/src/bpf.h"
++#include <bpf/bpf.h>
+ 
+ namespace ebpf {
+ 
+diff --git a/src/cc/libbpf.c b/src/cc/libbpf.c
+index 9b0024dc..7b3eca4b 100644
+--- a/src/cc/libbpf.c
++++ b/src/cc/libbpf.c
+@@ -51,8 +51,8 @@
+ // TODO: Remove this when CentOS 6 support is not needed anymore
+ #include "setns.h"
+ 
+-#include "libbpf/src/bpf.h"
+-#include "libbpf/src/libbpf.h"
++#include <bpf/bpf.h>
++#include <bpf/libbpf.h>
+ 
+ // TODO: remove these defines when linux-libc-dev exports them properly
+ 


             reply	other threads:[~2019-03-12  0:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12  0:27 Patrick McLean [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-06-14 17:09 [gentoo-commits] repo/gentoo:master commit in: dev-util/bcc/, dev-util/bcc/files/ Patrick McLean
2020-04-21 17:55 Patrick McLean
2024-09-10 19:00 Patrick McLean
2024-09-11 17:30 Patrick McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1552350446.7c033c7f07e7b18074e2c1f8b7e4581d90b22d81.chutzpah@gentoo \
    --to=chutzpah@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox