commit:     8e3a8191d55fcf173291932c4365da7ed2714367
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 19 21:20:19 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec 19 21:30:11 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e3a8191

dev-util/sysdig: fix build with newer grpc

Closes: https://bugs.gentoo.org/817128
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/sysdig-0.27.1-grpc-absl-sync.patch       | 25 ++++++++++++++++++++++
 dev-util/sysdig/sysdig-0.27.1-r100.ebuild          |  4 ++++
 2 files changed, 29 insertions(+)

diff --git a/dev-util/sysdig/files/sysdig-0.27.1-grpc-absl-sync.patch 
b/dev-util/sysdig/files/sysdig-0.27.1-grpc-absl-sync.patch
new file mode 100644
index 000000000000..eaf689a54d0d
--- /dev/null
+++ b/dev-util/sysdig/files/sysdig-0.27.1-grpc-absl-sync.patch
@@ -0,0 +1,25 @@
+https://bugs.gentoo.org/817128
+https://github.com/hhoffstaette/portage/blob/master/dev-util/sysdig/files/0.27.1-grpc-absl-sync.patch
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -552,6 +552,7 @@ if(NOT WIN32 AND NOT APPLE)
+                       else()
+                               message(FATAL_ERROR "Couldn't find system grpc")
+                       endif()
++                      find_library(ABSL_SYNC_LIB NAMES absl_synchronization)
+                       find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin)
+                       if(NOT GRPC_CPP_PLUGIN)
+                               message(FATAL_ERROR "System grpc_cpp_plugin not 
found")
+--- a/userspace/libsinsp/CMakeLists.txt
++++ b/userspace/libsinsp/CMakeLists.txt
+@@ -214,6 +214,10 @@ if(NOT WIN32)
+                               "${JQ_LIB}"
+                               "${B64_LIB}")
+ 
++                      if(ABSL_SYNC_LIB)
++                              target_link_libraries(sinsp "${ABSL_SYNC_LIB}")
++                      endif()
++
+                       if(NOT MUSL_OPTIMIZED_BUILD)
+                       target_link_libraries(sinsp
+                               rt

diff --git a/dev-util/sysdig/sysdig-0.27.1-r100.ebuild 
b/dev-util/sysdig/sysdig-0.27.1-r100.ebuild
index f29cac6fe874..ab9bce5d68b9 100644
--- a/dev-util/sysdig/sysdig-0.27.1-r100.ebuild
+++ b/dev-util/sysdig/sysdig-0.27.1-r100.ebuild
@@ -39,6 +39,10 @@ DEPEND="${RDEPEND}
 PDEPEND="
        modules? ( >=dev-util/sysdig-kmod-${PV} )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.27.1-grpc-absl-sync.patch
+)
+
 src_prepare() {
        sed -i -e 's:-ggdb::' CMakeLists.txt || die
 

Reply via email to