diff --git a/net/iperf3/Makefile b/net/iperf3/Makefile index 95edbef08ea..99afb5e3eed 100644 --- a/net/iperf3/Makefile +++ b/net/iperf3/Makefile @@ -1,11 +1,10 @@ COMMENT= tool to measure maximum achievable bandwidth on IP networks -V= 3.10.1 +V= 3.12 PKGNAME= iperf3-${V} DISTNAME= iperf-${V} -REVISION= 0 -SHARED_LIBS += iperf 1.1 # 0.0 +SHARED_LIBS += iperf 2.0 # 0.0 CATEGORIES= net @@ -20,7 +19,9 @@ WANTLIB += c m MASTER_SITES= https://downloads.es.net/pub/iperf/ -CONFIGURE_STYLE= gnu +AUTOCONF_VERSION= 2.71 + +CONFIGURE_STYLE= autoconf CONFIGURE_ARGS= --with-openssl=no .include diff --git a/net/iperf3/distinfo b/net/iperf3/distinfo index 1c4889f8cbd..938eec502f6 100644 --- a/net/iperf3/distinfo +++ b/net/iperf3/distinfo @@ -1,2 +1,2 @@ -SHA256 (iperf-3.10.1.tar.gz) = A7yXYMxUokUZHUa/yO2vikdQ8Oh6vKZ2RIaXIETWcVo= -SIZE (iperf-3.10.1.tar.gz) = 633304 +SHA256 (iperf-3.12.tar.gz) = cgNOz7an1tZ+OE4Z+27/8yNspPftTFGNfbZJxEfh/9Y= +SIZE (iperf-3.12.tar.gz) = 644807 diff --git a/net/iperf3/patches/patch-configure_ac b/net/iperf3/patches/patch-configure_ac new file mode 100644 index 00000000000..3d72a888f65 --- /dev/null +++ b/net/iperf3/patches/patch-configure_ac @@ -0,0 +1,14 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. +463571f25e8bcb49ae37fec77d63c3fe65dd0638 + +Index: configure.ac +--- configure.ac.orig ++++ configure.ac +@@ -305,6 +305,7 @@ AC_CHECK_MEMBER([struct tcp_info.tcpi_snd_wnd], + [#ifdef HAVE_LINUX_TCP_H + #include + #else ++#include + #include + #endif + ]) diff --git a/net/iperf3/patches/patch-src_iperf_api_c b/net/iperf3/patches/patch-src_iperf_api_c index f8451a6b7dd..d560a880961 100644 --- a/net/iperf3/patches/patch-src_iperf_api_c +++ b/net/iperf3/patches/patch-src_iperf_api_c @@ -3,7 +3,7 @@ Default to IPv4. Index: src/iperf_api.c --- src/iperf_api.c.orig +++ src/iperf_api.c -@@ -2314,7 +2314,7 @@ iperf_defaults(struct iperf_test *testp) +@@ -2787,7 +2787,7 @@ iperf_defaults(struct iperf_test *testp) testp->stats_interval = testp->reporter_interval = 1; testp->num_streams = 1; diff --git a/net/iperf3/patches/patch-src_iperf_h b/net/iperf3/patches/patch-src_iperf_h new file mode 100644 index 00000000000..298fc30aa4a --- /dev/null +++ b/net/iperf3/patches/patch-src_iperf_h @@ -0,0 +1,18 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. +463571f25e8bcb49ae37fec77d63c3fe65dd0638 + +Index: src/iperf.h +--- src/iperf.h.orig ++++ src/iperf.h +@@ -94,9 +94,9 @@ struct iperf_interval_results + int cnt_error; + + int omitted; +-#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) && \ ++#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ + defined(TCP_INFO) +- struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net}BSD */ ++ struct tcp_info tcpInfo; /* getsockopt(TCP_INFO) for Linux, {Free,Net,Open}BSD */ + #else + /* Just placeholders, never accessed. */ + char *tcpInfo; diff --git a/net/iperf3/patches/patch-src_iperf_locale_c b/net/iperf3/patches/patch-src_iperf_locale_c new file mode 100644 index 00000000000..66712e4fa00 --- /dev/null +++ b/net/iperf3/patches/patch-src_iperf_locale_c @@ -0,0 +1,19 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. +463571f25e8bcb49ae37fec77d63c3fe65dd0638 + +Index: src/iperf_locale.c +--- src/iperf_locale.c.orig ++++ src/iperf_locale.c +@@ -450,11 +450,7 @@ const char report_receiver_not_available_summary_forma + const char report_tcpInfo[] = + "event=TCP_Info CWND=%u SND_SSTHRESH=%u RCV_SSTHRESH=%u UNACKED=%u SACK=%u LOST=%u RETRANS=%u FACK=%u RTT=%u REORDERING=%u\n"; + #endif +-#if defined(__FreeBSD__) +-const char report_tcpInfo[] = +-"event=TCP_Info CWND=%u RCV_WIND=%u SND_SSTHRESH=%u RTT=%u\n"; +-#endif +-#if defined(__NetBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + const char report_tcpInfo[] = + "event=TCP_Info CWND=%u RCV_WIND=%u SND_SSTHRESH=%u RTT=%u\n"; + #endif diff --git a/net/iperf3/patches/patch-src_tcp_info_c b/net/iperf3/patches/patch-src_tcp_info_c new file mode 100644 index 00000000000..0db78b3a7b7 --- /dev/null +++ b/net/iperf3/patches/patch-src_tcp_info_c @@ -0,0 +1,91 @@ +Add support for OpenBSD systems which have TCP_INFO implemented. +463571f25e8bcb49ae37fec77d63c3fe65dd0638 + +Index: src/tcp_info.c +--- src/tcp_info.c.orig ++++ src/tcp_info.c +@@ -60,7 +60,7 @@ + int + has_tcpinfo(void) + { +-#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) \ ++#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) \ + && defined(TCP_INFO) + return 1; + #else +@@ -82,7 +82,7 @@ has_tcpinfo_retransmits(void) + #else + #if defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return 1; /* Should work now */ +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return 1; + #else + return 0; +@@ -94,7 +94,7 @@ has_tcpinfo_retransmits(void) + void + save_tcpinfo(struct iperf_stream *sp, struct iperf_interval_results *irp) + { +-#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__)) && \ ++#if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && \ + defined(TCP_INFO) + socklen_t tcp_info_length = sizeof(struct tcp_info); + +@@ -118,7 +118,7 @@ get_total_retransmits(struct iperf_interval_results *i + return irp->tcpInfo.tcpi_total_retrans; + #elif defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return irp->tcpInfo.tcpi_snd_rexmitpack; +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return irp->tcpInfo.tcpi_snd_rexmitpack; + #else + return -1; +@@ -138,6 +138,8 @@ get_snd_cwnd(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_snd_cwnd; + #elif defined(__NetBSD__) && defined(TCP_INFO) + return (long)irp->tcpInfo.tcpi_snd_cwnd * irp->tcpInfo.tcpi_snd_mss; ++#elif defined(__OpenBSD__) && defined(TCP_INFO) ++ return irp->tcpInfo.tcpi_snd_cwnd; + #else + return -1; + #endif +@@ -158,6 +160,8 @@ get_snd_wnd(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_snd_wnd; + #elif defined(__NetBSD__) && defined(TCP_INFO) + return (long)irp->tcpInfo.tcpi_snd_wnd * irp->tcpInfo.tcpi_snd_mss; ++#elif defined(__OpenBSD__) && defined(TCP_INFO) ++ return irp->tcpInfo.tcpi_snd_wnd; + #else + return -1; + #endif +@@ -174,7 +178,7 @@ get_rtt(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_rtt; + #elif defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return irp->tcpInfo.tcpi_rtt; +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return irp->tcpInfo.tcpi_rtt; + #else + return -1; +@@ -192,7 +196,7 @@ get_rttvar(struct iperf_interval_results *irp) + return irp->tcpInfo.tcpi_rttvar; + #elif defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return irp->tcpInfo.tcpi_rttvar; +-#elif defined(__NetBSD__) && defined(TCP_INFO) ++#elif (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + return irp->tcpInfo.tcpi_rttvar; + #else + return -1; +@@ -223,11 +227,7 @@ build_tcpinfo_message(struct iperf_interval_results *r + r->tcpInfo.tcpi_lost, r->tcpInfo.tcpi_retrans, r->tcpInfo.tcpi_fackets, + r->tcpInfo.tcpi_rtt, r->tcpInfo.tcpi_reordering); + #endif +-#if defined(__FreeBSD__) && defined(TCP_INFO) +- sprintf(message, report_tcpInfo, r->tcpInfo.tcpi_snd_cwnd, +- r->tcpInfo.tcpi_rcv_space, r->tcpInfo.tcpi_snd_ssthresh, r->tcpInfo.tcpi_rtt); +-#endif +-#if defined(__NetBSD__) && defined(TCP_INFO) ++#if (defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && defined(TCP_INFO) + sprintf(message, report_tcpInfo, r->tcpInfo.tcpi_snd_cwnd, + r->tcpInfo.tcpi_rcv_space, r->tcpInfo.tcpi_snd_ssthresh, r->tcpInfo.tcpi_rtt); + #endif diff --git a/net/iperf3/patches/patch-src_timer_c b/net/iperf3/patches/patch-src_timer_c deleted file mode 100644 index 29f9f7530f3..00000000000 --- a/net/iperf3/patches/patch-src_timer_c +++ /dev/null @@ -1,13 +0,0 @@ -for struct timeval - -Index: src/timer.c ---- src/timer.c.orig -+++ src/timer.c -@@ -28,6 +28,7 @@ - */ - - #include -+#include - #include - - #include "timer.h"