summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/expect
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/expect')
-rw-r--r--meta/recipes-devtools/expect/expect/0001-Replace-tclsh-with-tclsh8-in-the-scripts-used-in-the.patch474
-rw-r--r--meta/recipes-devtools/expect/expect/expect-configure-c99.patch201
-rwxr-xr-xmeta/recipes-devtools/expect/expect/run-ptest2
-rw-r--r--meta/recipes-devtools/expect/expect/tcl840.patch27
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.4.bb27
5 files changed, 716 insertions, 15 deletions
diff --git a/meta/recipes-devtools/expect/expect/0001-Replace-tclsh-with-tclsh8-in-the-scripts-used-in-the.patch b/meta/recipes-devtools/expect/expect/0001-Replace-tclsh-with-tclsh8-in-the-scripts-used-in-the.patch
new file mode 100644
index 0000000000..edc511d159
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/0001-Replace-tclsh-with-tclsh8-in-the-scripts-used-in-the.patch
@@ -0,0 +1,474 @@
1From d6118fde9c8a7c49f042bc9dc434f56910c23d9c Mon Sep 17 00:00:00 2001
2From: Jiaying Song <jiaying.song.cn@windriver.com>
3Date: Wed, 25 Dec 2024 13:35:59 +0800
4Subject: [PATCH] Replace tclsh with tclsh8 in the scripts used in the Expect
5 package
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10As can be seen from the following, since Expect uses tcl8, it is necessary to
11change tclsh to tclsh8 in the related scripts, otherwise they will not execute.
12
13pkgIndex.tcl :
14if {![package vsatisfies [package provide Tcl] 8.6]} {return}
15package ifneeded Expect 5.45.4 \
16 [list load [file join /usr/lib64 libexpect5.45.4.so]]
17
18Upstream-Status: Inactive-Upstream
19
20Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
21---
22 example/archie | 2 +-
23 example/autoexpect | 2 +-
24 example/autopasswd | 2 +-
25 example/chess.exp | 2 +-
26 example/cryptdir | 2 +-
27 example/decryptdir | 2 +-
28 example/dislocate | 2 +-
29 example/dvorak | 2 +-
30 example/ftp-inband | 2 +-
31 example/ftp-rfc | 2 +-
32 example/gethostbyaddr | 2 +-
33 example/kibitz | 2 +-
34 example/lpunlock | 2 +-
35 example/mkpasswd | 2 +-
36 example/multixterm | 2 +-
37 example/passmass | 2 +-
38 example/read1char | 2 +-
39 example/rftp | 2 +-
40 example/rlogin-cwd | 2 +-
41 example/robohunt | 2 +-
42 example/rogue.exp | 2 +-
43 example/telnet-cwd | 2 +-
44 example/timed-read | 2 +-
45 example/timed-run | 2 +-
46 example/tknewsbiff | 2 +-
47 example/tkpasswd | 2 +-
48 example/tkterm | 2 +-
49 example/unbuffer | 2 +-
50 example/virterm | 2 +-
51 example/weather | 2 +-
52 example/xkibitz | 2 +-
53 example/xpstat | 2 +-
54 32 files changed, 32 insertions(+), 32 deletions(-)
55
56diff --git a/example/archie b/example/archie
57index 0d5f43f..0e8d11e 100755
58--- a/example/archie
59+++ b/example/archie
60@@ -1,7 +1,7 @@
61 #!/bin/sh
62 # -*- tcl -*-
63 # The next line is executed by /bin/sh, but not tcl \
64-exec tclsh "$0" ${1+"$@"}
65+exec tclsh8 "$0" ${1+"$@"}
66
67 package require Expect
68
69diff --git a/example/autoexpect b/example/autoexpect
70index 35e57ce..e5ea626 100755
71--- a/example/autoexpect
72+++ b/example/autoexpect
73@@ -1,7 +1,7 @@
74 #!/bin/sh
75 # -*- tcl -*-
76 # The next line is executed by /bin/sh, but not tcl \
77-exec tclsh "$0" ${1+"$@"}
78+exec tclsh8 "$0" ${1+"$@"}
79
80 package require Expect
81
82diff --git a/example/autopasswd b/example/autopasswd
83index 1d095e2..b87dcd4 100755
84--- a/example/autopasswd
85+++ b/example/autopasswd
86@@ -1,7 +1,7 @@
87 #!/bin/sh
88 # -*- tcl -*-
89 # The next line is executed by /bin/sh, but not tcl \
90-exec tclsh "$0" ${1+"$@"}
91+exec tclsh8 "$0" ${1+"$@"}
92
93 package require Expect
94
95diff --git a/example/chess.exp b/example/chess.exp
96index 7cbd8ff..450dd20 100755
97--- a/example/chess.exp
98+++ b/example/chess.exp
99@@ -1,7 +1,7 @@
100 #!/bin/sh
101 # -*- tcl -*-
102 # The next line is executed by /bin/sh, but not tcl \
103-exec tclsh "$0" ${1+"$@"}
104+exec tclsh8 "$0" ${1+"$@"}
105
106 package require Expect
107
108diff --git a/example/cryptdir b/example/cryptdir
109index 84a155b..c7bfc02 100755
110--- a/example/cryptdir
111+++ b/example/cryptdir
112@@ -1,7 +1,7 @@
113 #!/bin/sh
114 # -*- tcl -*-
115 # The next line is executed by /bin/sh, but not tcl \
116-exec tclsh "$0" ${1+"$@"}
117+exec tclsh8 "$0" ${1+"$@"}
118
119 package require Expect
120
121diff --git a/example/decryptdir b/example/decryptdir
122index 84a155b..c7bfc02 100755
123--- a/example/decryptdir
124+++ b/example/decryptdir
125@@ -1,7 +1,7 @@
126 #!/bin/sh
127 # -*- tcl -*-
128 # The next line is executed by /bin/sh, but not tcl \
129-exec tclsh "$0" ${1+"$@"}
130+exec tclsh8 "$0" ${1+"$@"}
131
132 package require Expect
133
134diff --git a/example/dislocate b/example/dislocate
135index 9d34180..b366933 100755
136--- a/example/dislocate
137+++ b/example/dislocate
138@@ -1,7 +1,7 @@
139 #!/bin/sh
140 # -*- tcl -*-
141 # The next line is executed by /bin/sh, but not tcl \
142-exec tclsh "$0" ${1+"$@"}
143+exec tclsh8 "$0" ${1+"$@"}
144
145 package require Expect
146
147diff --git a/example/dvorak b/example/dvorak
148index b5debc3..3789938 100755
149--- a/example/dvorak
150+++ b/example/dvorak
151@@ -1,7 +1,7 @@
152 #!/bin/sh
153 # -*- tcl -*-
154 # The next line is executed by /bin/sh, but not tcl \
155-exec tclsh "$0" ${1+"$@"}
156+exec tclsh8 "$0" ${1+"$@"}
157
158 package require Expect
159
160diff --git a/example/ftp-inband b/example/ftp-inband
161index 5a28302..d3392f4 100755
162--- a/example/ftp-inband
163+++ b/example/ftp-inband
164@@ -1,7 +1,7 @@
165 #!/bin/sh
166 # -*- tcl -*-
167 # The next line is executed by /bin/sh, but not tcl \
168-exec tclsh "$0" ${1+"$@"}
169+exec tclsh8 "$0" ${1+"$@"}
170
171 package require Expect
172
173diff --git a/example/ftp-rfc b/example/ftp-rfc
174index 4153b24..f02b3dc 100755
175--- a/example/ftp-rfc
176+++ b/example/ftp-rfc
177@@ -1,7 +1,7 @@
178 #!/bin/sh
179 # -*- tcl -*-
180 # The next line is executed by /bin/sh, but not tcl \
181-exec tclsh "$0" ${1+"$@"}
182+exec tclsh8 "$0" ${1+"$@"}
183
184 package require Expect
185
186diff --git a/example/gethostbyaddr b/example/gethostbyaddr
187index 513a330..803b667 100755
188--- a/example/gethostbyaddr
189+++ b/example/gethostbyaddr
190@@ -1,7 +1,7 @@
191 #!/bin/sh
192 # -*- tcl -*-
193 # The next line is executed by /bin/sh, but not tcl \
194-exec tclsh "$0" ${1+"$@"}
195+exec tclsh8 "$0" ${1+"$@"}
196
197 package require Expect
198
199diff --git a/example/kibitz b/example/kibitz
200index eacb139..7c73bf9 100755
201--- a/example/kibitz
202+++ b/example/kibitz
203@@ -1,7 +1,7 @@
204 #!/bin/sh
205 # -*- tcl -*-
206 # The next line is executed by /bin/sh, but not tcl \
207-exec tclsh "$0" ${1+"$@"}
208+exec tclsh8 "$0" ${1+"$@"}
209
210 package require Expect
211
212diff --git a/example/lpunlock b/example/lpunlock
213index 2b7ea24..e42224b 100755
214--- a/example/lpunlock
215+++ b/example/lpunlock
216@@ -1,7 +1,7 @@
217 #!/bin/sh
218 # -*- tcl -*-
219 # The next line is executed by /bin/sh, but not tcl \
220-exec tclsh "$0" ${1+"$@"}
221+exec tclsh8 "$0" ${1+"$@"}
222
223 package require Expect
224
225diff --git a/example/mkpasswd b/example/mkpasswd
226index 6016b56..c3e97f4 100755
227--- a/example/mkpasswd
228+++ b/example/mkpasswd
229@@ -1,7 +1,7 @@
230 #!/bin/sh
231 # -*- tcl -*-
232 # The next line is executed by /bin/sh, but not tcl \
233-exec tclsh "$0" ${1+"$@"}
234+exec tclsh8 "$0" ${1+"$@"}
235
236 package require Expect
237
238diff --git a/example/multixterm b/example/multixterm
239index d0abfe7..82d6651 100755
240--- a/example/multixterm
241+++ b/example/multixterm
242@@ -1,7 +1,7 @@
243 #!/bin/sh
244 # -*- tcl -*-
245 # The next line is executed by /bin/sh, but not tcl \
246-exec tclsh "$0" ${1+"$@"}
247+exec tclsh8 "$0" ${1+"$@"}
248
249 package require Expect
250
251diff --git a/example/passmass b/example/passmass
252index e3c18e6..8f396d3 100755
253--- a/example/passmass
254+++ b/example/passmass
255@@ -1,7 +1,7 @@
256 #!/bin/sh
257 # -*- tcl -*-
258 # The next line is executed by /bin/sh, but not tcl \
259-exec tclsh "$0" ${1+"$@"}
260+exec tclsh8 "$0" ${1+"$@"}
261
262 package require Expect
263
264diff --git a/example/read1char b/example/read1char
265index 43a3df8..5f947fd 100644
266--- a/example/read1char
267+++ b/example/read1char
268@@ -1,7 +1,7 @@
269 #!/bin/sh
270 # -*- tcl -*-
271 # The next line is executed by /bin/sh, but not tcl \
272-exec tclsh "$0" ${1+"$@"}
273+exec tclsh8 "$0" ${1+"$@"}
274
275 package require Expect
276
277diff --git a/example/rftp b/example/rftp
278index c5db679..ebbf4c5 100755
279--- a/example/rftp
280+++ b/example/rftp
281@@ -1,7 +1,7 @@
282 #!/bin/sh
283 # -*- tcl -*-
284 # The next line is executed by /bin/sh, but not tcl \
285-exec tclsh "$0" ${1+"$@"}
286+exec tclsh8 "$0" ${1+"$@"}
287
288 package require Expect
289
290diff --git a/example/rlogin-cwd b/example/rlogin-cwd
291index b217373..80863e7 100755
292--- a/example/rlogin-cwd
293+++ b/example/rlogin-cwd
294@@ -1,7 +1,7 @@
295 #!/bin/sh
296 # -*- tcl -*-
297 # The next line is executed by /bin/sh, but not tcl \
298-exec tclsh "$0" ${1+"$@"}
299+exec tclsh8 "$0" ${1+"$@"}
300
301 package require Expect
302
303diff --git a/example/robohunt b/example/robohunt
304index 853ce1e..0d70c87 100755
305--- a/example/robohunt
306+++ b/example/robohunt
307@@ -1,7 +1,7 @@
308 #!/bin/sh
309 # -*- tcl -*-
310 # The next line is executed by /bin/sh, but not tcl \
311-exec tclsh "$0" ${1+"$@"}
312+exec tclsh8 "$0" ${1+"$@"}
313
314 package require Expect
315
316diff --git a/example/rogue.exp b/example/rogue.exp
317index 083acdf..fb6f9ca 100755
318--- a/example/rogue.exp
319+++ b/example/rogue.exp
320@@ -1,7 +1,7 @@
321 #!/bin/sh
322 # -*- tcl -*-
323 # The next line is executed by /bin/sh, but not tcl \
324-exec tclsh "$0" ${1+"$@"}
325+exec tclsh8 "$0" ${1+"$@"}
326
327 package require Expect
328
329diff --git a/example/telnet-cwd b/example/telnet-cwd
330index bd16048..fa520f1 100755
331--- a/example/telnet-cwd
332+++ b/example/telnet-cwd
333@@ -1,7 +1,7 @@
334 #!/bin/sh
335 # -*- tcl -*-
336 # The next line is executed by /bin/sh, but not tcl \
337-exec tclsh "$0" ${1+"$@"}
338+exec tclsh8 "$0" ${1+"$@"}
339
340 package require Expect
341
342diff --git a/example/timed-read b/example/timed-read
343index 8e63f0f..0a4ee7d 100755
344--- a/example/timed-read
345+++ b/example/timed-read
346@@ -1,7 +1,7 @@
347 #!/bin/sh
348 # -*- tcl -*-
349 # The next line is executed by /bin/sh, but not tcl \
350-exec tclsh "$0" ${1+"$@"}
351+exec tclsh8 "$0" ${1+"$@"}
352
353 package require Expect
354
355diff --git a/example/timed-run b/example/timed-run
356index 80def48..a0a36ba 100755
357--- a/example/timed-run
358+++ b/example/timed-run
359@@ -1,7 +1,7 @@
360 #!/bin/sh
361 # -*- tcl -*-
362 # The next line is executed by /bin/sh, but not tcl \
363-exec tclsh "$0" ${1+"$@"}
364+exec tclsh8 "$0" ${1+"$@"}
365
366 package require Expect
367
368diff --git a/example/tknewsbiff b/example/tknewsbiff
369index 9a2da4b..8d9db19 100755
370--- a/example/tknewsbiff
371+++ b/example/tknewsbiff
372@@ -1,7 +1,7 @@
373 #!/bin/sh
374 # -*- tcl -*-
375 # The next line is executed by /bin/sh, but not tcl \
376-exec tclsh "$0" ${1+"$@"}
377+exec tclsh8 "$0" ${1+"$@"}
378
379 package require Expect
380 package require Tk
381diff --git a/example/tkpasswd b/example/tkpasswd
382index 376c56a..cc4d816 100755
383--- a/example/tkpasswd
384+++ b/example/tkpasswd
385@@ -1,7 +1,7 @@
386 #!/bin/sh
387 # -*- tcl -*-
388 # The next line is executed by /bin/sh, but not tcl \
389-exec tclsh "$0" ${1+"$@"}
390+exec tclsh8 "$0" ${1+"$@"}
391
392 package require Expect
393 package require Tk
394diff --git a/example/tkterm b/example/tkterm
395index 16ee972..6c85c63 100755
396--- a/example/tkterm
397+++ b/example/tkterm
398@@ -1,7 +1,7 @@
399 #!/bin/sh
400 # -*- tcl -*-
401 # The next line is executed by /bin/sh, but not tcl \
402-exec tclsh "$0" ${1+"$@"}
403+exec tclsh8 "$0" ${1+"$@"}
404
405 package require Expect
406 package require Tk
407diff --git a/example/unbuffer b/example/unbuffer
408index ad5db7b..f6e42fd 100755
409--- a/example/unbuffer
410+++ b/example/unbuffer
411@@ -1,7 +1,7 @@
412 #!/bin/sh
413 # -*- tcl -*-
414 # The next line is executed by /bin/sh, but not tcl \
415-exec tclsh "$0" ${1+"$@"}
416+exec tclsh8 "$0" ${1+"$@"}
417
418 package require Expect
419
420diff --git a/example/virterm b/example/virterm
421index bab254b..911c5bc 100755
422--- a/example/virterm
423+++ b/example/virterm
424@@ -1,7 +1,7 @@
425 #!/bin/sh
426 # -*- tcl -*-
427 # The next line is executed by /bin/sh, but not tcl \
428-exec tclsh "$0" ${1+"$@"}
429+exec tclsh8 "$0" ${1+"$@"}
430
431 package require Expect
432
433diff --git a/example/weather b/example/weather
434index 4bd0e1b..8146359 100755
435--- a/example/weather
436+++ b/example/weather
437@@ -1,7 +1,7 @@
438 #!/bin/sh
439 # -*- tcl -*-
440 # The next line is executed by /bin/sh, but not tcl \
441-exec tclsh "$0" ${1+"$@"}
442+exec tclsh8 "$0" ${1+"$@"}
443
444 package require Expect
445
446diff --git a/example/xkibitz b/example/xkibitz
447index b61a22f..5718976 100755
448--- a/example/xkibitz
449+++ b/example/xkibitz
450@@ -1,7 +1,7 @@
451 #!/bin/sh
452 # -*- tcl -*-
453 # The next line is executed by /bin/sh, but not tcl \
454-exec tclsh "$0" ${1+"$@"}
455+exec tclsh8 "$0" ${1+"$@"}
456
457 package require Expect
458
459diff --git a/example/xpstat b/example/xpstat
460index ebbfbcf..067d57e 100755
461--- a/example/xpstat
462+++ b/example/xpstat
463@@ -1,7 +1,7 @@
464 #!/bin/sh
465 # -*- tcl -*-
466 # The next line is executed by /bin/sh, but not tcl \
467-exec tclsh "$0" ${1+"$@"}
468+exec tclsh8 "$0" ${1+"$@"}
469
470 package require Expect
471
472--
4732.25.1
474
diff --git a/meta/recipes-devtools/expect/expect/expect-configure-c99.patch b/meta/recipes-devtools/expect/expect/expect-configure-c99.patch
new file mode 100644
index 0000000000..09bf180df7
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/expect-configure-c99.patch
@@ -0,0 +1,201 @@
1Avoid calling exit without declaring the function.
2
3Add missing <string.h> include for memcpy.
4
5Use AC_TYPE_SIGNAL to fix REARM_SIG check. Add missing includes.
6
7Fix various implicit int return types of main.
8
9Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/]
10Signed-off-by: Ross Burton <ross.burton@arm.com>
11
12diff --git a/configure.in b/configure.in
13index 51558fa14d2bcf7e..055c88fbd8797eaa 100755
14--- a/configure.in
15+++ b/configure.in
16@@ -452,7 +452,11 @@ AC_CHECK_FUNC(siglongjmp, AC_DEFINE(HAVE_SIGLONGJMP))
17 # because Unixware 2.0 handles it specially and refuses to compile
18 # autoconf's automatic test that is a call with no arguments
19 AC_MSG_CHECKING([for memcpy])
20-AC_TRY_LINK(,[
21+AC_TRY_LINK([
22+#ifdef HAVE_STRING_H
23+#include <string.h>
24+#endif
25+],[
26 char *s1, *s2;
27 memcpy(s1,s2,0);
28 ],
29@@ -469,6 +473,7 @@ memcpy(s1,s2,0);
30 AC_MSG_CHECKING([if WNOHANG requires _POSIX_SOURCE])
31 AC_TRY_RUN([
32 #include <sys/wait.h>
33+int
34 main() {
35 #ifndef WNOHANG
36 return 0;
37@@ -489,6 +494,7 @@ rm -rf wnohang
38 AC_TRY_RUN([
39 #include <stdio.h>
40 #include <sys/wait.h>
41+int
42 main() {
43 #ifdef WNOHANG
44 FILE *fp = fopen("wnohang","w");
45@@ -527,16 +533,21 @@ else
46 AC_DEFINE(SELECT_MASK_TYPE, fd_set)
47 fi
48
49-dnl # Check for the data type of the function used in signal(). This
50-dnl # must be before the test for rearming.
51-dnl # echo checking return type of signal handlers
52-dnl AC_HEADER_EGREP([(void|sighandler_t).*signal], signal.h, retsigtype=void,AC_DEFINE(RETSIGTYPE, int) retsigtype=int)
53+AC_TYPE_SIGNAL
54
55 # FIXME: check if alarm exists
56 AC_MSG_CHECKING([if signals need to be re-armed])
57 AC_TRY_RUN([
58 #include <signal.h>
59-#define RETSIGTYPE $retsigtype
60+#ifdef HAVE_STDLIB_H
61+# include <stdlib.h>
62+#endif
63+#ifdef HAVE_UNISTD_H
64+# include <unistd.h>
65+#endif
66+#ifndef NO_SYS_WAIT_H
67+# include <sys/wait.h>
68+#endif
69
70 int signal_rearms = 0;
71
72@@ -553,6 +564,7 @@ int n;
73 signal_rearms++;
74 }
75
76+int
77 main()
78 {
79 signal(SIGINT,parent_sigint_handler);
80@@ -714,10 +726,11 @@ fi
81 AC_MSG_CHECKING([for struct sgttyb])
82 AC_TRY_RUN([
83 #include <sgtty.h>
84+int
85 main()
86 {
87 struct sgttyb tmp;
88- exit(0);
89+ return 0;
90 }],
91 AC_MSG_RESULT(yes)
92 AC_DEFINE(HAVE_SGTTYB)
93@@ -738,10 +751,11 @@ if test $mach -eq 0 ; then
94 # pty_termios.c is set up to handle pty_termio.
95 AC_MSG_CHECKING([for struct termio])
96 AC_TRY_RUN([#include <termio.h>
97+ int
98 main()
99 {
100 struct termio tmp;
101- exit(0);
102+ return 0;
103 }],
104 AC_DEFINE(HAVE_TERMIO)
105 PTY_TYPE=termios
106@@ -760,10 +774,11 @@ if test $mach -eq 0 ; then
107 # include <inttypes.h>
108 # endif
109 # include <termios.h>
110+ int
111 main()
112 {
113 struct termios tmp;
114- exit(0);
115+ return 0;
116 }],
117 AC_DEFINE(HAVE_TERMIOS)
118 PTY_TYPE=termios
119@@ -782,6 +797,7 @@ AC_TRY_RUN([
120 #include <inttypes.h>
121 #endif
122 #include <termios.h>
123+int
124 main() {
125 #if defined(TCGETS) || defined(TCGETA)
126 return 0;
127@@ -804,6 +820,7 @@ AC_TRY_RUN([
128 #include <inttypes.h>
129 #endif
130 #include <termios.h>
131+int
132 main() {
133 #ifdef TIOCGWINSZ
134 return 0;
135@@ -823,6 +840,7 @@ main() {
136 AC_MSG_CHECKING([for Cray-style ptys])
137 SETUID=":"
138 AC_TRY_RUN([
139+int
140 main(){
141 #ifdef CRAY
142 return 0;
143@@ -878,12 +896,13 @@ AC_MSG_CHECKING([for SV-style timezone])
144 AC_TRY_RUN([
145 extern char *tzname[2];
146 extern int daylight;
147+int
148 main()
149 {
150 int *x = &daylight;
151 char **y = tzname;
152
153- exit(0);
154+ return 0;
155 }],
156 AC_DEFINE(HAVE_SV_TIMEZONE)
157 AC_MSG_RESULT(yes),
158diff --git a/tclconfig/tcl.m4 b/tclconfig/tcl.m4
159index 0689cab3da994068..ebe839e5553ba520 100644
160--- a/tclconfig/tcl.m4
161+++ b/tclconfig/tcl.m4
162@@ -2400,7 +2400,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [
163 AC_TRY_COMPILE([#include <time.h>],
164 [extern long timezone;
165 timezone += 1;
166- exit (0);],
167+ return 0;],
168 tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no)])
169 if test $tcl_cv_timezone_long = yes ; then
170 AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
171@@ -2412,7 +2412,7 @@ AC_DEFUN([TEA_TIME_HANDLER], [
172 AC_TRY_COMPILE([#include <time.h>],
173 [extern time_t timezone;
174 timezone += 1;
175- exit (0);],
176+ return 0;],
177 tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no)])
178 if test $tcl_cv_timezone_time = yes ; then
179 AC_DEFINE(HAVE_TIMEZONE_VAR, 1, [Should we use the global timezone variable?])
180@@ -2452,17 +2452,17 @@ AC_DEFUN([TEA_BUGGY_STRTOD], [
181 double value;
182 value = strtod(infString, &term);
183 if ((term != infString) && (term[-1] == 0)) {
184- exit(1);
185+ return 1;
186 }
187 value = strtod(nanString, &term);
188 if ((term != nanString) && (term[-1] == 0)) {
189- exit(1);
190+ return 1;
191 }
192 value = strtod(spaceString, &term);
193 if (term == (spaceString+1)) {
194- exit(1);
195+ return 1;
196 }
197- exit(0);
198+ return 0;
199 }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy,
200 tcl_cv_strtod_buggy=buggy)])
201 if test "$tcl_cv_strtod_buggy" = buggy; then
diff --git a/meta/recipes-devtools/expect/expect/run-ptest b/meta/recipes-devtools/expect/expect/run-ptest
index 856c314eaf..1d35ba79d3 100755
--- a/meta/recipes-devtools/expect/expect/run-ptest
+++ b/meta/recipes-devtools/expect/expect/run-ptest
@@ -1,6 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2 2
3out_put=`tclsh tests/all.tcl -verbose bpse` 3out_put=`tclsh8 tests/all.tcl -verbose bpse`
4echo 4echo
5echo "${out_put}" | awk '/PASSED|FAILED|SKIPPED/{gsub(/PASSED/,"PASS"); gsub(/FAILED/,"FAIL"); gsub(/SKIPPED/,"SKIP"); if ($NF=="PASS"){print $NF": "$(NF-1)}else{print $NF": "$2}}' | uniq 5echo "${out_put}" | awk '/PASSED|FAILED|SKIPPED/{gsub(/PASSED/,"PASS"); gsub(/FAILED/,"FAIL"); gsub(/SKIPPED/,"SKIP"); if ($NF=="PASS"){print $NF": "$(NF-1)}else{print $NF": "$2}}' | uniq
6 6
diff --git a/meta/recipes-devtools/expect/expect/tcl840.patch b/meta/recipes-devtools/expect/expect/tcl840.patch
new file mode 100644
index 0000000000..8c7b0e7a7f
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/tcl840.patch
@@ -0,0 +1,27 @@
1Adjustments for compatibility with the currrent (Tcl 8.4.0+) channel
2implementation.
3
4Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/]
5Signed-off-by: Ross Burton <ross.burton@arm.com>
6
7diff --git a/exp_chan.c b/exp_chan.c
8index c92e26b6fbd02305..944200a63b102672 100644
9--- a/exp_chan.c
10+++ b/exp_chan.c
11@@ -60,7 +60,7 @@ void exp_background_channelhandler _ANSI_ARGS_((ClientData,
12
13 Tcl_ChannelType expChannelType = {
14 "exp", /* Type name. */
15- ExpBlockModeProc, /* Set blocking/nonblocking mode.*/
16+ TCL_CHANNEL_VERSION_2,
17 ExpCloseProc, /* Close proc. */
18 ExpInputProc, /* Input proc. */
19 ExpOutputProc, /* Output proc. */
20@@ -70,6 +70,7 @@ Tcl_ChannelType expChannelType = {
21 ExpWatchProc, /* Initialize notifier. */
22 ExpGetHandleProc, /* Get OS handles out of channel. */
23 NULL, /* Close2 proc */
24+ ExpBlockModeProc, /* Set blocking/nonblocking mode.*/
25 };
26
27 typedef struct ThreadSpecificData {
diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb
index 18904ebc10..48b5b0d934 100644
--- a/meta/recipes-devtools/expect/expect_5.45.4.bb
+++ b/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -13,8 +13,8 @@ SECTION = "devel"
13 13
14LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c" 14LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
15 15
16DEPENDS += "tcl" 16DEPENDS += "tcl8"
17RDEPENDS:${PN} = "tcl" 17RDEPENDS:${PN} = "tcl8"
18 18
19inherit autotools update-alternatives ptest 19inherit autotools update-alternatives ptest
20 20
@@ -27,22 +27,26 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
27 file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ 27 file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
28 file://0001-fixline1-fix-line-1.patch \ 28 file://0001-fixline1-fix-line-1.patch \
29 file://0001-Add-prototype-to-function-definitions.patch \ 29 file://0001-Add-prototype-to-function-definitions.patch \
30 file://expect-configure-c99.patch \
31 file://tcl840.patch \
30 file://run-ptest \ 32 file://run-ptest \
33 file://0001-Replace-tclsh-with-tclsh8-in-the-scripts-used-in-the.patch \
31 " 34 "
32SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
33SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" 35SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
34 36
35UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/" 37UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
36UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/" 38UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
37 39
38S = "${WORKDIR}/${BPN}${PV}" 40S = "${UNPACKDIR}/${BPN}${PV}"
41
42EXTRA_AUTORECONF += "--exclude=aclocal"
43
44CFLAGS += "-std=gnu17"
39 45
40do_install:append() { 46do_install:append() {
41 install -d ${D}${libdir} 47 mv ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
42 install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/ 48 install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
43 install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/ 49 sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
44 rm ${D}${libdir}/expect${PV}/libexpect*.so
45 sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
46} 50}
47 51
48do_install_ptest() { 52do_install_ptest() {
@@ -61,7 +65,6 @@ EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
61 --disable-rpath \ 65 --disable-rpath \
62 ${TCL_INCLUDE_PATH} \ 66 ${TCL_INCLUDE_PATH} \
63 " 67 "
64EXTRA_OEMAKE_install = " 'SCRIPTS=' "
65 68
66ALTERNATIVE:${PN} = "mkpasswd" 69ALTERNATIVE:${PN} = "mkpasswd"
67ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd" 70ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
@@ -81,7 +84,3 @@ FILES:${PN} += "${libdir}/libexpect${PV}.so \
81 " 84 "
82 85
83BBCLASSEXTEND = "native nativesdk" 86BBCLASSEXTEND = "native nativesdk"
84
85# http://errors.yoctoproject.org/Errors/Details/766950/
86# expect5.45.4/exp_chan.c:62:5: error: initialization of 'struct Tcl_ChannelTypeVersion_ *' from incompatible pointer type 'int (*)(void *, int)' [-Wincompatible-pointer-types]
87CFLAGS += "-Wno-error=incompatible-pointer-types"