diff options
author | Mihaela Sendrea <mihaela.sendrea@enea.com> | 2013-11-11 01:23:53 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-11-20 14:03:24 +0000 |
commit | b74b2356bf53af7ceb08008020a1f027b2737e34 (patch) | |
tree | cf15fc488e95a6a4b6f60bdbd280ffd5b36d1504 | |
parent | 75794585394585de1a13b40288bb3927ab819ba9 (diff) | |
download | poky-b74b2356bf53af7ceb08008020a1f027b2737e34.tar.gz |
expect: Add recipe
Nedeed for gcc-runtime tests.
Fixed build on multilib and add patch to remove
!/depot/path/expect -f
which caused rpm to puke on rfs generation
(From OE-Core rev: 8f06d2975ed7d5db3828dc116c0df72d1161e8e5)
Signed-off-by: Mihaela Sendrea <mihaela.sendrea@enea.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
4 files changed, 330 insertions, 0 deletions
diff --git a/meta/recipes-devtools/expect/expect/0001-configure.in.patch b/meta/recipes-devtools/expect/expect/0001-configure.in.patch new file mode 100644 index 0000000000..7595a254a8 --- /dev/null +++ b/meta/recipes-devtools/expect/expect/0001-configure.in.patch | |||
@@ -0,0 +1,108 @@ | |||
1 | Allow cross compiling. | ||
2 | |||
3 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | diff -uNr a/configure.in b/configure.in | ||
7 | --- a/configure.in 2012-12-14 15:31:32.623180450 +0100 | ||
8 | +++ b/configure.in 2012-12-14 15:53:34.518233519 +0100 | ||
9 | @@ -481,7 +481,7 @@ | ||
10 | , | ||
11 | AC_MSG_RESULT(no) | ||
12 | , | ||
13 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
14 | + AC_MSG_RESULT(no) | ||
15 | ) | ||
16 | |||
17 | AC_MSG_CHECKING([if any value exists for WNOHANG]) | ||
18 | @@ -506,7 +506,9 @@ | ||
19 | AC_MSG_RESULT(no) | ||
20 | AC_DEFINE(WNOHANG_BACKUP_VALUE, 1) | ||
21 | , | ||
22 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
23 | + AC_MSG_RESULT(yes) | ||
24 | + AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, `cat wnohang`) | ||
25 | + rm -f wnohang | ||
26 | ) | ||
27 | |||
28 | # | ||
29 | @@ -574,7 +576,8 @@ | ||
30 | AC_DEFINE(REARM_SIG) | ||
31 | , | ||
32 | AC_MSG_RESULT(no) | ||
33 | -, AC_MSG_WARN([Expect can't be cross compiled]) | ||
34 | +, | ||
35 | + AC_MSG_RESULT(no) | ||
36 | ) | ||
37 | |||
38 | # HPUX7 has trouble with the big cat so split it | ||
39 | @@ -725,7 +728,9 @@ | ||
40 | , | ||
41 | AC_MSG_RESULT(no) | ||
42 | , | ||
43 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
44 | + AC_MSG_RESULT(yes) | ||
45 | + AC_DEFINE(HAVE_SGTTYB) | ||
46 | + PTY_TYPE=sgttyb | ||
47 | ) | ||
48 | |||
49 | # mach systems have include files for unimplemented features | ||
50 | @@ -749,7 +754,9 @@ | ||
51 | , | ||
52 | AC_MSG_RESULT(no) | ||
53 | , | ||
54 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
55 | + AC_DEFINE(HAVE_TERMIO) | ||
56 | + PTY_TYPE=termios | ||
57 | + AC_MSG_RESULT(yes) | ||
58 | ) | ||
59 | |||
60 | # now check for the new style ttys (not yet posix) | ||
61 | @@ -771,7 +778,9 @@ | ||
62 | , | ||
63 | AC_MSG_RESULT(no) | ||
64 | , | ||
65 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
66 | + AC_DEFINE(HAVE_TERMIOS) | ||
67 | + PTY_TYPE=termios | ||
68 | + AC_MSG_RESULT(yes) | ||
69 | ) | ||
70 | fi | ||
71 | |||
72 | @@ -794,7 +803,7 @@ | ||
73 | , | ||
74 | AC_MSG_RESULT(no) | ||
75 | , | ||
76 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
77 | + AC_MSG_RESULT(no) | ||
78 | ) | ||
79 | |||
80 | AC_MSG_CHECKING([if TIOCGWINSZ in termios.h]) | ||
81 | @@ -816,7 +825,7 @@ | ||
82 | , | ||
83 | AC_MSG_RESULT(no) | ||
84 | , | ||
85 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
86 | + AC_MSG_RESULT(no) | ||
87 | ) | ||
88 | |||
89 | # finally check for Cray style ttys | ||
90 | @@ -837,7 +846,7 @@ | ||
91 | , | ||
92 | AC_MSG_RESULT(no) | ||
93 | , | ||
94 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
95 | + AC_MSG_RESULT(no) | ||
96 | ) | ||
97 | |||
98 | # | ||
99 | @@ -889,7 +898,8 @@ | ||
100 | AC_MSG_RESULT(yes), | ||
101 | AC_MSG_RESULT(no) | ||
102 | , | ||
103 | - AC_MSG_ERROR([Expect can't be cross compiled]) | ||
104 | + AC_DEFINE(HAVE_SV_TIMEZONE) | ||
105 | + AC_MSG_RESULT(yes), | ||
106 | ) | ||
107 | |||
108 | |||
diff --git a/meta/recipes-devtools/expect/expect/0002-tcl.m4.patch b/meta/recipes-devtools/expect/expect/0002-tcl.m4.patch new file mode 100644 index 0000000000..dc4c6ba406 --- /dev/null +++ b/meta/recipes-devtools/expect/expect/0002-tcl.m4.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | Use proper -L path when cross compiling. | ||
2 | |||
3 | Signed-off-by: Anders Roxell <anders.roxell@enea.com> | ||
4 | Upstream-Status: Pending | ||
5 | --- | ||
6 | diff -uNr a/tclconfig/tcl.m4 b/tclconfig/tcl.m4 | ||
7 | --- a/tclconfig/tcl.m4 2012-12-14 09:16:58.789861281 +0100 | ||
8 | +++ b/tclconfig/tcl.m4 2012-12-14 10:55:43.542297010 +0100 | ||
9 | @@ -371,7 +371,7 @@ | ||
10 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC | ||
11 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an | ||
12 | # installed and uninstalled version of Tcl. | ||
13 | - if test -f "${TCL_BIN_DIR}/Makefile" ; then | ||
14 | + if test -f "${TCL_BIN_DIR}/Makefile" || test "$cross_compiling" = yes; then | ||
15 | TCL_LIB_SPEC="${TCL_BUILD_LIB_SPEC}" | ||
16 | TCL_STUB_LIB_SPEC="${TCL_BUILD_STUB_LIB_SPEC}" | ||
17 | TCL_STUB_LIB_PATH="${TCL_BUILD_STUB_LIB_PATH}" | ||
diff --git a/meta/recipes-devtools/expect/expect/01-example-shebang.patch b/meta/recipes-devtools/expect/expect/01-example-shebang.patch new file mode 100644 index 0000000000..8597f31387 --- /dev/null +++ b/meta/recipes-devtools/expect/expect/01-example-shebang.patch | |||
@@ -0,0 +1,144 @@ | |||
1 | Author: Mike Markley <mike@markley.org> | ||
2 | Author: Sergei Golovan <sgolovan@debian.org> | ||
3 | Description: Fixes shebangs in examples (Closes: #152367). | ||
4 | |||
5 | Backported from Debian | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | Index: expect5.45/example/beer.exp | ||
9 | =================================================================== | ||
10 | --- expect5.45.orig/example/beer.exp 2006-01-25 13:51:39.000000000 -0800 | ||
11 | +++ expect5.45/example/beer.exp 2013-11-01 17:35:19.817318341 -0700 | ||
12 | @@ -1,4 +1,9 @@ | ||
13 | -#!/depot/path/expect -f | ||
14 | +#!/bin/sh | ||
15 | +# -*- tcl -*- | ||
16 | +# The next line is executed by /bin/sh, but not tcl \ | ||
17 | +exec tclsh "$0" ${1+"$@"} | ||
18 | + | ||
19 | +package require Expect | ||
20 | |||
21 | # 99 bottles of beer on the wall, Expect-style | ||
22 | # Author: Don Libes <libes@nist.gov> | ||
23 | Index: expect5.45/example/expectd.proto | ||
24 | =================================================================== | ||
25 | --- expect5.45.orig/example/expectd.proto 2010-07-02 09:03:31.000000000 -0700 | ||
26 | +++ expect5.45/example/expectd.proto 2013-11-01 17:35:19.821318341 -0700 | ||
27 | @@ -1,4 +1,10 @@ | ||
28 | -#!/depot/tcl/src/expect/e -- | ||
29 | +#!/bin/sh | ||
30 | +# -*- tcl -*- | ||
31 | +# The next line is executed by /bin/sh, but not tcl \ | ||
32 | +exec tclsh "$0" ${1+"$@"} | ||
33 | + | ||
34 | +package require Expect | ||
35 | + | ||
36 | # Description: Simple fragment to begin a telnet daemon | ||
37 | # For more information, see Chapter 17 of "Exploring Expect" | ||
38 | # Author: Don Libes, NIST | ||
39 | Index: expect5.45/example/irsh | ||
40 | =================================================================== | ||
41 | --- expect5.45.orig/example/irsh 2010-07-02 09:03:31.000000000 -0700 | ||
42 | +++ expect5.45/example/irsh 2013-11-01 17:35:19.821318341 -0700 | ||
43 | @@ -1,4 +1,9 @@ | ||
44 | -#!/depot/path/expect -- | ||
45 | +#!/bin/sh | ||
46 | +# -*- tcl -*- | ||
47 | +# The next line is executed by /bin/sh, but not tcl \ | ||
48 | +exec tclsh "$0" ${1+"$@"} | ||
49 | + | ||
50 | +package require Expect | ||
51 | |||
52 | # Do rsh interactively. For example, consider the following command: | ||
53 | # rsh <remote> ls -l "|" more | ||
54 | Index: expect5.45/example/passwd.cgi | ||
55 | =================================================================== | ||
56 | --- expect5.45.orig/example/passwd.cgi 2000-01-06 15:22:07.000000000 -0800 | ||
57 | +++ expect5.45/example/passwd.cgi 2013-11-01 17:35:19.821318341 -0700 | ||
58 | @@ -1,4 +1,9 @@ | ||
59 | -#!/depot/path/expect -- | ||
60 | +#!/bin/sh | ||
61 | +# -*- tcl -*- | ||
62 | +# The next line is executed by /bin/sh, but not tcl \ | ||
63 | +exec tclsh "$0" ${1+"$@"} | ||
64 | + | ||
65 | +package require Expect | ||
66 | |||
67 | # This is a CGI script to process requests created by the accompanying | ||
68 | # passwd.html form. This script is pretty basic, although it is | ||
69 | Index: expect5.45/example/passwdprompt | ||
70 | =================================================================== | ||
71 | --- expect5.45.orig/example/passwdprompt 2003-09-05 12:01:59.000000000 -0700 | ||
72 | +++ expect5.45/example/passwdprompt 2013-11-01 17:35:19.821318341 -0700 | ||
73 | @@ -1,4 +1,9 @@ | ||
74 | -#!/depot/path/expect | ||
75 | +#!/bin/sh | ||
76 | +# -*- tcl -*- | ||
77 | +# The next line is executed by /bin/sh, but not tcl \ | ||
78 | +exec tclsh "$0" ${1+"$@"} | ||
79 | + | ||
80 | +package require Expect | ||
81 | |||
82 | # This script prompts for a passwd from stdin while echoing *'s | ||
83 | |||
84 | Index: expect5.45/example/reprompt | ||
85 | =================================================================== | ||
86 | --- expect5.45.orig/example/reprompt 2000-01-06 15:22:07.000000000 -0800 | ||
87 | +++ expect5.45/example/reprompt 2013-11-01 17:35:19.821318341 -0700 | ||
88 | @@ -1,4 +1,9 @@ | ||
89 | -#!/depot/path/expect -- | ||
90 | +#!/bin/sh | ||
91 | +# -*- tcl -*- | ||
92 | +# The next line is executed by /bin/sh, but not tcl \ | ||
93 | +exec tclsh "$0" ${1+"$@"} | ||
94 | + | ||
95 | +package require Expect | ||
96 | |||
97 | # Name: reprompt | ||
98 | # Description: reprompt every so often until user enters something | ||
99 | Index: expect5.45/example/term_expect | ||
100 | =================================================================== | ||
101 | --- expect5.45.orig/example/term_expect 2005-02-15 10:11:31.000000000 -0800 | ||
102 | +++ expect5.45/example/term_expect 2013-11-01 17:35:19.821318341 -0700 | ||
103 | @@ -1,4 +1,9 @@ | ||
104 | -#!/depot/path/expectk | ||
105 | +#!/bin/sh | ||
106 | +# -*- tcl -*- | ||
107 | +# The next line is executed by /bin/sh, but not tcl \ | ||
108 | +exec wish "$0" ${1+"$@"} | ||
109 | + | ||
110 | +package require Expect | ||
111 | |||
112 | # Name: tkterm - terminal emulator using Expect and Tk text widget, v3.0 | ||
113 | # Author: Don Libes, July '94 | ||
114 | Index: expect5.45/example/vrfy | ||
115 | =================================================================== | ||
116 | --- expect5.45.orig/example/vrfy 2010-07-02 09:03:31.000000000 -0700 | ||
117 | +++ expect5.45/example/vrfy 2013-11-01 17:35:19.821318341 -0700 | ||
118 | @@ -1,4 +1,9 @@ | ||
119 | -#!/depot/path/expect -f | ||
120 | +#!/bin/sh | ||
121 | +# -*- tcl -*- | ||
122 | +# The next line is executed by /bin/sh, but not tcl \ | ||
123 | +exec tclsh "$0" ${1+"$@"} | ||
124 | + | ||
125 | +package require Expect | ||
126 | |||
127 | |||
128 | # separate address into user and host | ||
129 | Index: expect5.45/example/xrlogin | ||
130 | =================================================================== | ||
131 | --- expect5.45.orig/example/xrlogin 2000-01-06 15:22:08.000000000 -0800 | ||
132 | +++ expect5.45/example/xrlogin 2013-11-01 17:35:19.821318341 -0700 | ||
133 | @@ -1,4 +1,10 @@ | ||
134 | -#!/depot/path/expect -- | ||
135 | +#!/bin/sh | ||
136 | +# -*- tcl -*- | ||
137 | +# The next line is executed by /bin/sh, but not tcl \ | ||
138 | +exec tclsh "$0" ${1+"$@"} | ||
139 | + | ||
140 | +package require Expect | ||
141 | + | ||
142 | # xrlogin - rlogin but with current DISPLAY | ||
143 | # | ||
144 | # You can extend this idea to save any arbitrary information across rlogin | ||
diff --git a/meta/recipes-devtools/expect/expect_5.45.bb b/meta/recipes-devtools/expect/expect_5.45.bb new file mode 100644 index 0000000000..0417ec6740 --- /dev/null +++ b/meta/recipes-devtools/expect/expect_5.45.bb | |||
@@ -0,0 +1,61 @@ | |||
1 | SUMMARY = "tool for automating interactive applications according to a script" | ||
2 | DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \ | ||
3 | Following the script, Expect knows what can be expected from a program and what \ | ||
4 | the correct response should be. Expect is also useful for testing these same \ | ||
5 | applications. And by adding Tk, you can also wrap interactive applications in \ | ||
6 | X11 GUIs. An interpreted language provides branching and high-level control \ | ||
7 | structures to direct the dialogue. In addition, the user can take control and \ | ||
8 | interact directly when desired, afterward returning control to the script. \ | ||
9 | " | ||
10 | HOMEPAGE = "http://sourceforge.net/projects/expect/" | ||
11 | LICENSE="PD" | ||
12 | SECTION = "devel" | ||
13 | |||
14 | LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c" | ||
15 | |||
16 | DEPENDS += "tcl" | ||
17 | RDEPENDS_${PN} = "tcl" | ||
18 | |||
19 | inherit autotools | ||
20 | |||
21 | SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \ | ||
22 | file://0001-configure.in.patch \ | ||
23 | file://0002-tcl.m4.patch \ | ||
24 | file://01-example-shebang.patch \ | ||
25 | " | ||
26 | SRC_URI[md5sum] = "44e1a4f4c877e9ddc5a542dfa7ecc92b" | ||
27 | SRC_URI[sha256sum] = "b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040" | ||
28 | |||
29 | S = "${WORKDIR}/${BPN}${PV}" | ||
30 | |||
31 | do_install_append() { | ||
32 | install -d ${D}${libdir} | ||
33 | install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/ | ||
34 | install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/ | ||
35 | install -m 0755 ${S}/example/* ${D}${libdir}/expect${PV}/ | ||
36 | rm ${D}${libdir}/expect${PV}/libexpect*.so | ||
37 | } | ||
38 | |||
39 | EXTRA_OECONF += "--includedir=${STAGING_INCDIR} \ | ||
40 | --with-tcl=${STAGING_LIBDIR} \ | ||
41 | --with-tclinclude=${STAGING_INCDIR}/tcl8.6 \ | ||
42 | --enable-shared \ | ||
43 | --enable-threads \ | ||
44 | --disable-rpath \ | ||
45 | " | ||
46 | EXTRA_OEMAKE_install = " 'SCRIPTS=' " | ||
47 | |||
48 | FILES_${PN}-dbg += "${libdir}/${BPN}${PV}/.debug \ | ||
49 | ${libdir}/.debug \ | ||
50 | " | ||
51 | FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \ | ||
52 | ${STAGING_INCDIR}/expect.h \ | ||
53 | ${STAGING_INCDIR}/expect_tcl.h \ | ||
54 | ${STAGING_INCDIR}/expect_comm.h \ | ||
55 | ${STAGING_INCDIR}/tcldbg.h \ | ||
56 | ${includedir}/*.h \ | ||
57 | " | ||
58 | |||
59 | FILES_${PN} += "${libdir}/libexpect${PV}.so \ | ||
60 | ${libdir}/expect${PV}/* \ | ||
61 | " | ||