commit:     eac77dc802a4a8311341930300e0583f1929c827
Author:     Andrea Postiglione <andrea.postiglione <AT> gmail <DOT> com>
AuthorDate: Thu Apr  7 15:10:16 2022 +0000
Commit:     Ronny Gutbrod <gentoo <AT> tastytea <DOT> de>
CommitDate: Thu Apr  7 15:10:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=eac77dc8

sys-cluster/pcs : remove bashism

Signed-off-by: Andrea Postiglione <andrea.postiglione <AT> gmail.com>

 sys-cluster/pcs/files/remove_bashism.patch | 41 ++++++++++++++++++++++++++++++
 sys-cluster/pcs/pcs-0.11.2.ebuild          |  3 ++-
 2 files changed, 43 insertions(+), 1 deletion(-)

diff --git a/sys-cluster/pcs/files/remove_bashism.patch 
b/sys-cluster/pcs/files/remove_bashism.patch
new file mode 100644
index 000000000..a54d612f0
--- /dev/null
+++ b/sys-cluster/pcs/files/remove_bashism.patch
@@ -0,0 +1,41 @@
+From 73e90ae7f31600ff9c0edf0aed3cace9cd8c8a35 Mon Sep 17 00:00:00 2001
+From: Alessandro Barbieri <[email protected]>
+Date: Thu, 7 Apr 2022 17:02:55 +0200
+Subject: [PATCH] remove bashisms
+
+`==` is not POSIX
+---
+ m4/ac_compare_versions.m4 | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/m4/ac_compare_versions.m4 b/m4/ac_compare_versions.m4
+index 77d03330a..74846704e 100644
+--- a/m4/ac_compare_versions.m4
++++ b/m4/ac_compare_versions.m4
+@@ -6,7 +6,7 @@ dnl op can be:
+ dnl
+ dnl lt or <
+ dnl le or <=
+-dnl eq or ==
++dnl eq or =
+ dnl ge or >=
+ dnl gt or >
+ dnl
+@@ -20,7 +20,7 @@ AC_DEFUN([AC_COMPARE_VERSIONS],[
+       verA="$1"
+       op="$2"
+       verB="$3"
+-      if test "x$verA" == "x" || test "x$verB" == "x" || test "x$op" == x; 
then
++      if test "x$verA" = "x" || test "x$verB" = "x" || test "x$op" = x; then
+               AC_MSG_ERROR([ac_compare_versions: Missing parameters])
+       fi
+       case "$op" in
+@@ -36,7 +36,7 @@ AC_DEFUN([AC_COMPARE_VERSIONS],[
+                               result=true
+                       fi
+                       ;;
+-              "eq"|"==")
++              "eq"|"=")
+                       if test "$verB" = "$verA"; then
+                               result=true
+                       fi

diff --git a/sys-cluster/pcs/pcs-0.11.2.ebuild 
b/sys-cluster/pcs/pcs-0.11.2.ebuild
index b9fc87951..40733de60 100644
--- a/sys-cluster/pcs/pcs-0.11.2.ebuild
+++ b/sys-cluster/pcs/pcs-0.11.2.ebuild
@@ -65,7 +65,8 @@ ruby_add_rdepend "
                www-servers/thin"
 
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-PATCHES="${FILESDIR}/pcs-0.11-gentoo-support.patch"
+PATCHES="${FILESDIR}/pcs-0.11-gentoo-support.patch
+               ${FILESDIR}/remove_bashism.patch"
 
 src_prepare() {
        default

Reply via email to