diff --git a/packages/expect/Makefile.in.patch b/packages/expect/Makefile.in.patch new file mode 100644 index 000000000..cac676bbf --- /dev/null +++ b/packages/expect/Makefile.in.patch @@ -0,0 +1,33 @@ +diff -u -r ../expect5.45/Makefile.in ./Makefile.in +--- ../expect5.45/Makefile.in 2010-09-30 13:14:07.000000000 -0400 ++++ ./Makefile.in 2016-04-17 23:10:35.582300517 -0400 +@@ -32,16 +32,14 @@ + # SCRIPTS is a target. If this is a problem, just comment out the + # SCRIPTS target itself. + +-SCRIPTS = timed-run timed-read ftp-rfc autopasswd lpunlock weather \ +- passmass rftp kibitz rlogin-cwd xpstat tkpasswd dislocate xkibitz \ +- tknewsbiff unbuffer mkpasswd cryptdir decryptdir autoexpect \ +- multixterm ++SCRIPTS = timed-run timed-read \ ++ unbuffer autoexpect + + # A couple of the scripts have man pages of their own. + # You can delete these too if you don't want'em. + +-SCRIPTS_MANPAGES = kibitz dislocate xkibitz tknewsbiff unbuffer mkpasswd \ +- passmass cryptdir decryptdir autoexpect multixterm ++SCRIPTS_MANPAGES = unbuffer \ ++ autoexpect + + + # allow us to handle null list gracefully, "end_of_list" should not exist +@@ -380,7 +378,7 @@ + cp $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir) + + $(SCRIPTS): +- $(TCLSH) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@ ++ tclsh $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@ + + ## We cannot use TCL_LIBS below (after TCL_LIB_SPEC) because its + ## expansion references the contents of LIBS, which contains linker diff --git a/packages/expect/build.sh b/packages/expect/build.sh new file mode 100644 index 000000000..942b87e3d --- /dev/null +++ b/packages/expect/build.sh @@ -0,0 +1,15 @@ +TERMUX_PKG_HOMEPAGE=http://expect.sourceforge.net/ +TERMUX_PKG_DESCRIPTION="Tool for automating interactive terminal applications" +TERMUX_PKG_VERSION=5.45 +TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/expect/Expect/${TERMUX_PKG_VERSION}/expect${TERMUX_PKG_VERSION}.tar.gz +TERMUX_PKG_DEPENDS="tcl" + +termux_step_pre_configure () { + cd $TERMUX_PKG_SRCDIR + autoconf +} + +termux_step_post_make_install () { + cd $TERMUX_PREFIX/lib + ln -f -s expect${TERMUX_PKG_VERSION}/libexpect${TERMUX_PKG_VERSION}.so . +} diff --git a/packages/expect/configure.in.patch b/packages/expect/configure.in.patch new file mode 100644 index 000000000..374f0e1de --- /dev/null +++ b/packages/expect/configure.in.patch @@ -0,0 +1,123 @@ +diff -u -r ../expect5.45/configure.in ./configure.in +--- ../expect5.45/configure.in 2010-08-27 17:51:53.000000000 -0400 ++++ ./configure.in 2016-04-18 00:23:36.618635535 -0400 +@@ -347,11 +347,7 @@ + fi + + AC_MSG_CHECKING([stty to use]) +-if test -r /usr/local/bin/stty ; then +- STTY_BIN=/usr/local/bin/stty +-else +- STTY_BIN=/bin/stty +-fi ++STTY_BIN=@TERMUX_PREFIX@/bin/applets/stty + AC_MSG_RESULT($STTY_BIN) + + AC_MSG_CHECKING([if stty reads stdout]) +@@ -481,7 +477,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + AC_MSG_CHECKING([if any value exists for WNOHANG]) +@@ -506,7 +502,8 @@ + AC_MSG_RESULT(no) + AC_DEFINE(WNOHANG_BACKUP_VALUE, 1) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(yes) ++ AC_DEFINE_UNQUOTED(WNOHANG_BACKUP_VALUE, 1) + ) + + # +@@ -574,7 +571,8 @@ + AC_DEFINE(REARM_SIG) + , + AC_MSG_RESULT(no) +-, AC_MSG_WARN([Expect can't be cross compiled]) ++, ++ AC_MSG_RESULT(no) + ) + + # HPUX7 has trouble with the big cat so split it +@@ -725,7 +723,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + # mach systems have include files for unimplemented features +@@ -749,7 +747,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + # now check for the new style ttys (not yet posix) +@@ -771,7 +769,9 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_DEFINE(HAVE_TERMIOS) ++ PTY_TYPE=termios ++ AC_MSG_RESULT(yes) + ) + fi + +@@ -794,7 +794,8 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_DEFINE(HAVE_TCGETS_OR_TCGETA_IN_TERMIOS_H) ++ AC_MSG_RESULT(yes) + ) + + AC_MSG_CHECKING([if TIOCGWINSZ in termios.h]) +@@ -816,7 +817,8 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_DEFINE(HAVE_TIOCGWINSZ_IN_TERMIOS_H) ++ AC_MSG_RESULT(yes) + ) + + # finally check for Cray style ttys +@@ -837,7 +839,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + # +@@ -869,7 +871,9 @@ + AC_HAVE_FUNCS(getpty) + + # following test sets SETPGRP_VOID if setpgrp takes 0 args, else takes 2 +-AC_FUNC_SETPGRP ++cat >>confdefs.h <<\_ACEOF ++#define SETPGRP_VOID 1 ++_ACEOF + + # + # check for timezones +@@ -889,7 +893,7 @@ + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + +