Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 update-alternatives |
| 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 | file://0001-expect-install-scripts-without-using-the-fixline1-tc.patch \ |
| 26 | file://0001-Resolve-string-formatting-issues.patch \ |
| 27 | file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \ |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 28 | file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 29 | " |
| 30 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" |
| 31 | SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" |
| 32 | |
| 33 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/" |
| 34 | UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/" |
| 35 | |
| 36 | S = "${WORKDIR}/${BPN}${PV}" |
| 37 | |
| 38 | do_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 | install -m 0755 ${S}/example/* ${D}${libdir}/expect${PV}/ |
| 43 | rm ${D}${libdir}/expect${PV}/libexpect*.so |
| 44 | sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl |
| 45 | } |
| 46 | |
| 47 | # Apparently the public Tcl headers are only in /usr/include/tcl8.6 |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 48 | # when building for the target and nativesdk. |
| 49 | TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6" |
| 50 | TCL_INCLUDE_PATH_class-native = "" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 51 | |
| 52 | EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \ |
| 53 | --enable-shared \ |
| 54 | --enable-threads \ |
| 55 | --disable-rpath \ |
| 56 | ${TCL_INCLUDE_PATH} \ |
| 57 | " |
| 58 | EXTRA_OEMAKE_install = " 'SCRIPTS=' " |
| 59 | |
| 60 | ALTERNATIVE_${PN} = "mkpasswd" |
| 61 | ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd" |
| 62 | # Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW) |
| 63 | ALTERNATIVE_PRIORITY[mkpasswd] = "40" |
| 64 | |
| 65 | FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \ |
| 66 | ${includedir}/expect.h \ |
| 67 | ${includedir}/expect_tcl.h \ |
| 68 | ${includedir}/expect_comm.h \ |
| 69 | ${includedir}/tcldbg.h \ |
| 70 | ${includedir}/*.h \ |
| 71 | " |
| 72 | |
| 73 | FILES_${PN} += "${libdir}/libexpect${PV}.so \ |
| 74 | ${libdir}/expect${PV}/* \ |
| 75 | " |
| 76 | |
| 77 | BBCLASSEXTEND = "native nativesdk" |