File: 0090-shell-op.patch

package info (click to toggle)
libtool 2.5.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,688 kB
  • sloc: sh: 58,532; ansic: 4,292; makefile: 883
file content (139 lines) | stat: -rw-r--r-- 4,726 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
Author:  Ernesto Alfonso <erjoalgo@gmail.com>
Description: Incorrect check for += operator causes func_append to fail
Bug-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1039612
Forwarded: no
Last-Updated: 2023-07-15

Index: libtool-2.5.4/bootstrap
===================================================================
--- libtool-2.5.4.orig/bootstrap
+++ libtool-2.5.4/bootstrap
@@ -227,7 +227,7 @@ vc_ignore=
 
 # Source required external libraries:
 # Set a version string for this script.
-scriptversion=2019-02-19.15; # UTC
+scriptversion=2023-07-15.07; # UTC
 
 # General shell script boiler plate, and helper functions.
 # Written by Gary V. Vaughan, 2004
@@ -735,27 +735,15 @@ func_require_term_colors ()
 # ---------------------
 # Append VALUE onto the existing contents of VAR.
 
-  # We should try to minimise forks, especially on Windows where they are
-  # unreasonably slow, so skip the feature probes when bash or zsh are
-  # being used:
-  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
-    : ${_G_HAVE_ARITH_OP="yes"}
-    : ${_G_HAVE_XSI_OPS="yes"}
-    # The += operator was introduced in bash 3.1
-    case $BASH_VERSION in
-      [12].* | 3.0 | 3.0*) ;;
-      *)
-        : ${_G_HAVE_PLUSEQ_OP="yes"}
-        ;;
-    esac
-  fi
-
-  # _G_HAVE_PLUSEQ_OP
-  # Can be empty, in which case the shell is probed, "yes" if += is
-  # usable or anything else if it does not work.
-  test -z "$_G_HAVE_PLUSEQ_OP" \
-    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
-    && _G_HAVE_PLUSEQ_OP=yes
+# _G_HAVE_PLUSEQ_OP
+# Can be empty, in which case the shell is probed, "yes" if += is
+# useable or anything else if it does not work.
+if test -z "$_G_HAVE_PLUSEQ_OP" &&  \
+    __PLUSEQ_TEST="a" &&  \
+    __PLUSEQ_TEST+=" b" 2>/dev/null &&  \
+    test "a b" = "$__PLUSEQ_TEST"; then
+  _G_HAVE_PLUSEQ_OP=yes
+fi
 
 if test yes = "$_G_HAVE_PLUSEQ_OP"
 then
Index: libtool-2.5.4/build-aux/funclib.sh
===================================================================
--- libtool-2.5.4.orig/build-aux/funclib.sh
+++ libtool-2.5.4/build-aux/funclib.sh
@@ -1,5 +1,5 @@
 # Set a version string for this script.
-scriptversion=2019-02-19.15; # UTC
+scriptversion=2024-12-01.17; # UTC
 
 # General shell script boiler plate, and helper functions.
 # Written by Gary V. Vaughan, 2004
@@ -507,27 +507,16 @@ func_require_term_colors ()
 # ---------------------
 # Append VALUE onto the existing contents of VAR.
 
-  # We should try to minimise forks, especially on Windows where they are
-  # unreasonably slow, so skip the feature probes when bash or zsh are
-  # being used:
-  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
-    : ${_G_HAVE_ARITH_OP="yes"}
-    : ${_G_HAVE_XSI_OPS="yes"}
-    # The += operator was introduced in bash 3.1
-    case $BASH_VERSION in
-      [12].* | 3.0 | 3.0*) ;;
-      *)
-        : ${_G_HAVE_PLUSEQ_OP="yes"}
-        ;;
-    esac
-  fi
 
   # _G_HAVE_PLUSEQ_OP
   # Can be empty, in which case the shell is probed, "yes" if += is
   # usable or anything else if it does not work.
-  test -z "$_G_HAVE_PLUSEQ_OP" \
-    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
-    && _G_HAVE_PLUSEQ_OP=yes
+if test -z "$_G_HAVE_PLUSEQ_OP" &&  \
+     __PLUSEQ_TEST="a" &&  \
+     __PLUSEQ_TEST+=" b" 2>/dev/null &&  \
+     test "a b" = "$__PLUSEQ_TEST"; then
+   _G_HAVE_PLUSEQ_OP=yes
+fi
 
 if test yes = "$_G_HAVE_PLUSEQ_OP"
 then
Index: libtool-2.5.4/build-aux/ltmain.sh
===================================================================
--- libtool-2.5.4.orig/build-aux/ltmain.sh
+++ libtool-2.5.4/build-aux/ltmain.sh
@@ -572,27 +572,16 @@ func_require_term_colors ()
 # ---------------------
 # Append VALUE onto the existing contents of VAR.
 
-  # We should try to minimise forks, especially on Windows where they are
-  # unreasonably slow, so skip the feature probes when bash or zsh are
-  # being used:
-  if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then
-    : ${_G_HAVE_ARITH_OP="yes"}
-    : ${_G_HAVE_XSI_OPS="yes"}
-    # The += operator was introduced in bash 3.1
-    case $BASH_VERSION in
-      [12].* | 3.0 | 3.0*) ;;
-      *)
-        : ${_G_HAVE_PLUSEQ_OP="yes"}
-        ;;
-    esac
-  fi
 
   # _G_HAVE_PLUSEQ_OP
   # Can be empty, in which case the shell is probed, "yes" if += is
   # usable or anything else if it does not work.
-  test -z "$_G_HAVE_PLUSEQ_OP" \
-    && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \
-    && _G_HAVE_PLUSEQ_OP=yes
+if test -z "$_G_HAVE_PLUSEQ_OP" &&  \
+     __PLUSEQ_TEST="a" &&  \
+     __PLUSEQ_TEST+=" b" 2>/dev/null &&  \
+     test "a b" = "$__PLUSEQ_TEST"; then
+   _G_HAVE_PLUSEQ_OP=yes
+fi
 
 if test yes = "$_G_HAVE_PLUSEQ_OP"
 then