From 5a94f14a5c689731a38a47c5fd805f5e30015a19 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 7 Apr 2025 07:10:54 +0000 Subject: [PATCH] net-misc/iperf: Sync with Gentoo It's from Gentoo commit bd7a53dc8ef4460f815045a5d741ac4dea4ff603. --- .../portage-stable/net-misc/iperf/Manifest | 1 + .../files/iperf-3.18-unbundle-cJSON.patch | 103 ++++++++++++++++++ .../net-misc/iperf/iperf-3.18.ebuild | 54 +++++++++ 3 files changed, 158 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.18-unbundle-cJSON.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/iperf/iperf-3.18.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest b/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest index a442eaf61a..eb2e762312 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-misc/iperf/Manifest @@ -1,2 +1,3 @@ DIST iperf-2.0.13.tar.gz 326148 BLAKE2B 2a40aea9e2d7fdc935b91be5e4e586bf68dd27604375d2570570145e5db1ea5837469a4989f47586986932bef33cba05ed19ed3a9ce40c0a5531581c6d3ba982 SHA512 40fcfb8f4d27887f53a743ac07396511fb2a7ac59f4b300fe36896bd0241e191945fa253705990711772ee776d5e4227ed62760fc92abebdfebcedd11c27c0ea DIST iperf-3.17.1.tar.gz 670547 BLAKE2B 90afa47ba2de2f789b118ea42d7eabe3a7ec202116d51915b05350932231788a95ae142bdf2cff041f5504e67ae5ac1da2c66f408bc302c4e230ef4b7e496e15 SHA512 99c731e2e060d2b241d3137742bf92a975f2b7a94c6c723c9c1625f69c294fd7fe15b7dbf085a6120038fc1dd7628c83d2c7d16b059849fdbecbc88e48fb0974 +DIST iperf-3.18.tar.gz 688037 BLAKE2B 64272ab8288cb217603d4fa438bc547967baa964bc518c91f9f1f1c85d9a0a9a7ca5b4c558b3e2c68507c1cb76b40592fd9a80f0bb4cc8a1716e029b32289276 SHA512 a458292c34c29a60cce60eb6be4afd15220d4cf29f225a1c1be9ec8ef86baa85fa4e174e747cacfa5711c6957ad16d448c2d3d4029b6bfd58db9c39269f30caa diff --git a/sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.18-unbundle-cJSON.patch b/sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.18-unbundle-cJSON.patch new file mode 100644 index 0000000000..56db6c6b6a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/iperf/files/iperf-3.18-unbundle-cJSON.patch @@ -0,0 +1,103 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -61,6 +61,8 @@ AC_ARG_ENABLE([profiling], + AS_HELP_STRING([--enable-profiling], [Enable iperf3 profiling binary])) + AM_CONDITIONAL([ENABLE_PROFILING], [test x$enable_profiling = xyes]) + ++PKG_CHECK_MODULES([libcjson], [libcjson >= 1.7.15]) ++ + # Check for the math library (needed by cjson on some platforms) + AC_SEARCH_LIBS(floor, [m], [], [ + echo "floor()" +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -10,8 +10,6 @@ include_HEADERS = iperf_api.h # Define + + # Specify the source files and flags for the iperf library + libiperf_la_SOURCES = \ +- cjson.c \ +- cjson.h \ + flowlabel.h \ + iperf.h \ + iperf_api.c \ +@@ -46,10 +44,13 @@ libiperf_la_SOURCES = \ + units.c \ + units.h \ + version.h ++libiperf_la_CPPFLAGS = $(CPPFLAGS) @libcjson_CFLAGS@ ++libiperf_la_LIBADD = @libcjson_LIBS@ + + # Specify the sources and various flags for the iperf binary + iperf3_SOURCES = main.c +-iperf3_LDADD = libiperf.la ++iperf3_CPPFLAGS = $(CPPFLAGS) @libcjson_CFLAGS@ ++iperf3_LDADD = libiperf.la @libcjson_LIBS@ + + if ENABLE_PROFILING + # If the iperf-profiled-binary is enabled +--- a/src/iperf.h ++++ b/src/iperf.h +@@ -52,7 +52,7 @@ + + #include "timer.h" + #include "queue.h" +-#include "cjson.h" ++#include + #include "iperf_time.h" + #include "portable_endian.h" + +--- a/src/iperf_api.c ++++ b/src/iperf_api.c +@@ -79,7 +79,7 @@ + #endif /* HAVE_SCTP_H */ + #include "timer.h" + +-#include "cjson.h" ++#include + #include "units.h" + #include "iperf_util.h" + #include "iperf_locale.h" +--- a/src/iperf_tcp.c ++++ b/src/iperf_tcp.c +@@ -43,7 +43,7 @@ + #include "iperf_tcp.h" + #include "iperf_util.h" + #include "net.h" +-#include "cjson.h" ++#include + + #if defined(HAVE_FLOWLABEL) + #include "flowlabel.h" +--- a/src/iperf_udp.c ++++ b/src/iperf_udp.c +@@ -45,7 +45,7 @@ + #include "iperf_udp.h" + #include "timer.h" + #include "net.h" +-#include "cjson.h" ++#include + + /* iperf_udp_recv + * +--- a/src/iperf_util.c ++++ b/src/iperf_util.c +@@ -46,7 +46,7 @@ + #include + #include + +-#include "cjson.h" ++#include + #include "iperf.h" + #include "iperf_api.h" + +--- a/src/iperf_util.h ++++ b/src/iperf_util.h +@@ -28,7 +28,7 @@ + #define __IPERF_UTIL_H + + #include "iperf_config.h" +-#include "cjson.h" ++#include + #include + #include + diff --git a/sdk_container/src/third_party/portage-stable/net-misc/iperf/iperf-3.18.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/iperf/iperf-3.18.ebuild new file mode 100644 index 0000000000..302b37c9ef --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/iperf/iperf-3.18.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd + +DESCRIPTION="A TCP, UDP, and SCTP network bandwidth measurement tool" +HOMEPAGE="https://github.com/esnet/iperf" +SRC_URI="https://github.com/esnet/iperf/releases/download/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="3" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +IUSE="sctp" + +DEPEND=" + >=dev-libs/cJSON-1.7.15 + dev-libs/openssl:= + sctp? ( net-misc/lksctp-tools ) +" +RDEPEND="${DEPEND}" +BDEPEND="virtual/pkgconfig" + +DOCS=( README.md RELNOTES.md ) + +PATCHES=( + "${FILESDIR}"/${PN}-3.10.1-drop-forced-debugging-symbols.patch + "${FILESDIR}"/${PN}-3.18-unbundle-cJSON.patch + "${FILESDIR}"/${PN}-3.17.1-c23.patch +) + +src_prepare() { + default + + # Drop bundled cjson + rm src/cjson.{c,h} || die + + eautoreconf +} + +src_configure() { + econf $(use_with sctp) +} + +src_install() { + default + + newconfd "${FILESDIR}"/iperf.confd iperf3 + newinitd "${FILESDIR}"/iperf3.initd iperf3 + systemd_dounit contrib/iperf3.service + + find "${ED}" -name '*.la' -type f -delete || die +}