commit:     7123f545675b347c9292bd6850ad0e68385cd3ff
Author:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 18 18:10:08 2024 +0000
Commit:     Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Tue Jun 18 18:12:39 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7123f545

net-analyzer/zmap: Fix building with json-c

Closes: https://bugs.gentoo.org/926049
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>

 net-analyzer/zmap/files/zmap-2.1.1-json-c.patch | 31 +++++++++++++++++++++++++
 net-analyzer/zmap/zmap-2.1.1-r5.ebuild          |  1 +
 2 files changed, 32 insertions(+)

diff --git a/net-analyzer/zmap/files/zmap-2.1.1-json-c.patch 
b/net-analyzer/zmap/files/zmap-2.1.1-json-c.patch
new file mode 100644
index 000000000000..78a80b801218
--- /dev/null
+++ b/net-analyzer/zmap/files/zmap-2.1.1-json-c.patch
@@ -0,0 +1,31 @@
+From 5473b6a907ff47e813e8ac3509a0f63d1253023b Mon Sep 17 00:00:00 2001
+From: Martin Milata <[email protected]>
+Date: Wed, 1 Jul 2020 16:47:18 +0200
+Subject: [PATCH] Fix build against json-c-0.14 (#609)
+
+The new pkgconfig file contains two include directories:
+
+  Cflags: -I${includedir} -I${includedir}/json-c
+
+Apparently pkg_check_modules returns them as a semicolon-separated
+string ("CMake list"), which causes the build to fail when appended
+directly to CMAKE_C_FLAGS.
+
+Origin: backport, 
https://github.com/zmap/zmap/commit/5473b6a907ff47e813e8ac3509a0f63d1253023b
+Applied-Upstream: 3.0
+---
+ CMakeLists.txt | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: zmap-2.1.1/CMakeLists.txt
+===================================================================
+--- zmap-2.1.1.orig/CMakeLists.txt     2024-01-23 15:29:55.436869754 -0500
++++ zmap-2.1.1/CMakeLists.txt  2024-01-23 15:30:32.505023070 -0500
+@@ -72,6 +72,7 @@
+     endif()
+ 
+     add_definitions("-DJSON")
++    string(REPLACE ";" " " JSON_CFLAGS "${JSON_CFLAGS}")
+     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${JSON_CFLAGS}")
+ endif()
+ 

diff --git a/net-analyzer/zmap/zmap-2.1.1-r5.ebuild 
b/net-analyzer/zmap/zmap-2.1.1-r5.ebuild
index b413d47fc165..2a7eb5b56829 100644
--- a/net-analyzer/zmap/zmap-2.1.1-r5.ebuild
+++ b/net-analyzer/zmap/zmap-2.1.1-r5.ebuild
@@ -33,6 +33,7 @@ BDEPEND="
 
 PATCHES=(
        "${FILESDIR}"/${PN}-2.1.1-always-install-config.patch
+       "${FILESDIR}"/${PN}-2.1.1-json-c.patch
 )
 
 FILECAPS=( cap_net_raw=ep usr/sbin/zmap )

Reply via email to