summaryrefslogtreecommitdiff
path: root/net-misc/iperf/files/iperf-3.12-fix-bashism.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-10-02 07:12:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-10-02 07:12:21 +0100
commite374e165c2ee372e9c6d10860ea6ef47f180f6b2 (patch)
tree3c2c37c3e4e272c01ca3062d0f2428478f1f83e6 /net-misc/iperf/files/iperf-3.12-fix-bashism.patch
parentb0bab803d2f1c96af5760374e2684f9a85591916 (diff)
gentoo auto-resync : 02:10:2022 - 07:12:21
Diffstat (limited to 'net-misc/iperf/files/iperf-3.12-fix-bashism.patch')
-rw-r--r--net-misc/iperf/files/iperf-3.12-fix-bashism.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/net-misc/iperf/files/iperf-3.12-fix-bashism.patch b/net-misc/iperf/files/iperf-3.12-fix-bashism.patch
new file mode 100644
index 000000000000..1f3a321f42c9
--- /dev/null
+++ b/net-misc/iperf/files/iperf-3.12-fix-bashism.patch
@@ -0,0 +1,43 @@
+https://github.com/esnet/iperf/pull/1398
+
+From 3a03f775ca103f2e824abef903130280c57ca8ac Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sun, 2 Oct 2022 02:58:59 +0100
+Subject: [PATCH] config/iperf_config_static_bin.m4: fix bashism
+
+configure scripts need to be runnable with a POSIX-compliant /bin/sh.
+
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors
+like this aren't spotted. Notably Debian defaults to /bin/sh provided
+by dash which doesn't tolerate such bashisms as '=='.
+
+This retains compatibility with bash.
+
+Fixes configure warnings/errors like:
+```
+./configure: 2670: test: x: unexpected operator
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/config/iperf_config_static_bin.m4
++++ b/config/iperf_config_static_bin.m4
+@@ -7,6 +7,6 @@ AC_ARG_ENABLE([static-bin],
+ [:])
+ AM_CONDITIONAL([ENABLE_STATIC_BIN], [test x$enable_static_bin = xno])
+
+-AS_IF([test "x$enable_static_bin" == xyes],
++AS_IF([test "x$enable_static_bin" = xyes],
+ [LDFLAGS="$LDFLAGS --static"]
+ [])
+--- a/configure
++++ b/configure
+@@ -2667,7 +2667,7 @@ else
+ fi
+
+
+-if test "x$enable_static_bin" == xyes
++if test "x$enable_static_bin" = xyes
+ then :
+ LDFLAGS="$LDFLAGS --static"
+
+