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" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | RDEPENDS:${PN} = "tcl" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 18 | |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 19 | inherit autotools update-alternatives ptest |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 \ |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 27 | file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 28 | file://0001-fixline1-fix-line-1.patch \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 29 | file://0001-Add-prototype-to-function-definitions.patch \ |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 30 | file://run-ptest \ |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 31 | " |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 32 | SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" |
| 33 | SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" |
| 34 | |
| 35 | UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/" |
| 36 | UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/" |
| 37 | |
| 38 | S = "${WORKDIR}/${BPN}${PV}" |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | do_install:append() { |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 41 | install -d ${D}${libdir} |
| 42 | install -m 0755 ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/ |
| 43 | install -m 0755 ${S}/fixline1 ${D}${libdir}/expect${PV}/ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 44 | rm ${D}${libdir}/expect${PV}/libexpect*.so |
| 45 | sed -e 's|$dir|${libdir}|' -i ${D}${libdir}/expect${PV}/pkgIndex.tcl |
| 46 | } |
| 47 | |
Patrick Williams | e760df8 | 2023-05-26 11:10:49 -0500 | [diff] [blame] | 48 | do_install_ptest() { |
| 49 | install -d ${D}${PTEST_PATH} |
| 50 | cp -r ${S}/tests ${D}${PTEST_PATH} |
| 51 | } |
| 52 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 53 | # Apparently the public Tcl headers are only in /usr/include/tcl8.6 |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame] | 54 | # when building for the target and nativesdk. |
| 55 | TCL_INCLUDE_PATH = "--with-tclinclude=${STAGING_INCDIR}/tcl8.6" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | TCL_INCLUDE_PATH:class-native = "" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 57 | |
| 58 | EXTRA_OECONF += "--with-tcl=${STAGING_LIBDIR} \ |
| 59 | --enable-shared \ |
| 60 | --enable-threads \ |
| 61 | --disable-rpath \ |
| 62 | ${TCL_INCLUDE_PATH} \ |
| 63 | " |
| 64 | EXTRA_OEMAKE_install = " 'SCRIPTS=' " |
| 65 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 66 | ALTERNATIVE:${PN} = "mkpasswd" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 67 | ALTERNATIVE_LINK_NAME[mkpasswd] = "${bindir}/mkpasswd" |
| 68 | # Use lower priority than busybox's mkpasswd (created when built with CONFIG_CRYPTPW) |
| 69 | ALTERNATIVE_PRIORITY[mkpasswd] = "40" |
| 70 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 71 | FILES:${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 72 | ${includedir}/expect.h \ |
| 73 | ${includedir}/expect_tcl.h \ |
| 74 | ${includedir}/expect_comm.h \ |
| 75 | ${includedir}/tcldbg.h \ |
| 76 | ${includedir}/*.h \ |
| 77 | " |
| 78 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 79 | FILES:${PN} += "${libdir}/libexpect${PV}.so \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 80 | ${libdir}/expect${PV}/* \ |
| 81 | " |
| 82 | |
| 83 | BBCLASSEXTEND = "native nativesdk" |