xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-devtools/expect/expect_5.45.4.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1SUMMARY = "tool for automating interactive applications according to a script"
2DESCRIPTION = "Expect is a tool for automating interactive applications according to a script. \
3Following the script, Expect knows what can be expected from a program and what \
4the correct response should be. Expect is also useful for testing these same \
5applications. And by adding Tk, you can also wrap interactive applications in \
6X11 GUIs. An interpreted language provides branching and high-level control \
7structures to direct the dialogue. In addition, the user can take control and \
8interact directly when desired, afterward returning control to the script. \
9"
10HOMEPAGE = "http://sourceforge.net/projects/expect/"
11LICENSE = "PD"
12SECTION = "devel"
13
14LIC_FILES_CHKSUM = "file://license.terms;md5=fbf2de7e9102505b1439db06fc36ce5c"
15
16DEPENDS += "tcl"
17RDEPENDS:${PN} = "tcl"
18
19inherit autotools update-alternatives
20
21SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
22           file://0001-configure.in.patch \
23           file://0002-tcl.m4.patch \
24           file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \
25           file://0001-Resolve-string-formatting-issues.patch \
26           file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
27           file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
28           file://0001-fixline1-fix-line-1.patch \
29          "
30SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
31SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
32
33UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
34UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
35
36S = "${WORKDIR}/${BPN}${PV}"
37
38do_install:append() {
39	install -d ${D}${libdir}
40        install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so   ${D}${libdir}/
41        install -m 0755 ${S}/fixline1           ${D}${libdir}/expect${PV}/
42        rm ${D}${libdir}/expect${PV}/libexpect*.so
43        sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
44}
45
46# Apparently the public Tcl headers are only in /usr/include/tcl8.6
47# when building for the target and nativesdk.
48TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
49TCL_INCLUDE_PATH:class-native = ""
50
51EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
52                 --enable-shared \
53                 --enable-threads \
54                 --disable-rpath \
55                 ${TCL_INCLUDE_PATH} \
56                "
57EXTRA_OEMAKE_install = " 'SCRIPTS=' "
58
59ALTERNATIVE:${PN}  = "mkpasswd"
60ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
61# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
62ALTERNATIVE_PRIORITY[mkpasswd] = "40"
63
64FILES:${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
65                   ${includedir}/expect.h \
66                   ${includedir}/expect_tcl.h \
67                   ${includedir}/expect_comm.h \
68                   ${includedir}/tcldbg.h \
69                   ${includedir}/*.h \
70                  "
71
72FILES:${PN} += "${libdir}/libexpect${PV}.so \
73                ${libdir}/expect${PV}/* \
74               "
75
76BBCLASSEXTEND = "native nativesdk"
77