blob: 4214ab0f2732304bfe924f3952d428f1db7825ec [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "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"
Patrick Williams213cb262021-08-07 19:21:33 -050017RDEPENDS:${PN} = "tcl"
Brad Bishop316dfdd2018-06-25 12:45:53 -040018
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 \
Brad Bishop316dfdd2018-06-25 12:45:53 -040024 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 \
Brad Bishop00e122a2019-10-05 11:10:57 -040027 file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
Brad Bishop316dfdd2018-06-25 12:45:53 -040028 "
29SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
30SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
31
32UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
33UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
34
35S = "${WORKDIR}/${BPN}${PV}"
36
Patrick Williams213cb262021-08-07 19:21:33 -050037do_install:append() {
Brad Bishop316dfdd2018-06-25 12:45:53 -040038 install -d ${D}${libdir}
39 install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/
40 install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/
Brad Bishop316dfdd2018-06-25 12:45:53 -040041 rm ${D}${libdir}/expect${PV}/libexpect*.so
42 sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl
43}
44
45# Apparently the public Tcl headers are only in /usr/include/tcl8.6
Brad Bishop00e122a2019-10-05 11:10:57 -040046# when building for the target and nativesdk.
47TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6"
Patrick Williams213cb262021-08-07 19:21:33 -050048TCL_INCLUDE_PATH:class-native = ""
Brad Bishop316dfdd2018-06-25 12:45:53 -040049
50EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \
51 --enable-shared \
52 --enable-threads \
53 --disable-rpath \
54 ${TCL_INCLUDE_PATH} \
55 "
56EXTRA_OEMAKE_install = " 'SCRIPTS=' "
57
Patrick Williams213cb262021-08-07 19:21:33 -050058ALTERNATIVE:${PN} = "mkpasswd"
Brad Bishop316dfdd2018-06-25 12:45:53 -040059ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd"
60# Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW)
61ALTERNATIVE_PRIORITY[mkpasswd] = "40"
62
Patrick Williams213cb262021-08-07 19:21:33 -050063FILES:${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
Brad Bishop316dfdd2018-06-25 12:45:53 -040064 ${includedir}/expect.h \
65 ${includedir}/expect_tcl.h \
66 ${includedir}/expect_comm.h \
67 ${includedir}/tcldbg.h \
68 ${includedir}/*.h \
69 "
70
Patrick Williams213cb262021-08-07 19:21:33 -050071FILES:${PN} += "${libdir}/libexpect${PV}.so \
Brad Bishop316dfdd2018-06-25 12:45:53 -040072 ${libdir}/expect${PV}/* \
73 "
74
75BBCLASSEXTEND = "native nativesdk"