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