summaryrefslogtreecommitdiff
path: root/lang/tcl-expect/patches
diff options
context:
space:
mode:
authorjwise <jwise@pkgsrc.org>2000-09-05 16:20:29 +0000
committerjwise <jwise@pkgsrc.org>2000-09-05 16:20:29 +0000
commitd691e97f15ab2332e8012840ca8d2fa6afa500b7 (patch)
tree1fc74002fbd5dc9f4ff46028d1a8fd3de7d6e0c0 /lang/tcl-expect/patches
parent9b47ae74a99fa4c1fe7ab057286adf39c43186f8 (diff)
downloadpkgsrc-d691e97f15ab2332e8012840ca8d2fa6afa500b7.tar.gz
Initial import of tcl-expect-5.32.1, the tcl half of the new expect packages.
Changes to the expect package since expect-5.25: * This package is now split into two packages, tcl-expect, and tk-expect. tcl-expect can be installed on systems without X11 (and by extension, without tk). * the copious expect examples and their man pages are now installed into ${PREFIX}/share/examples/tcl/expect instead of into ${PREFIX}/bin and ${PREFIX}/man. If any of them are determined to be worth separate use, they should be split out into a separate package. Changes to expect itself since expect-5.25: ** SUMMARY Expect 5.31 now works with Tcl 8.2. Expect 5.31 does NOT work with prior releases of Tcl. Thanks to an incredible amount of work by Scott Stanton, Henry Spencer, Melissa Hirschl, and funding from Scriptics for making this possible. ** NEW FEATURES What? You mean that working with Tcl 8.2 isn't enough????? Expect supports Tcl's new regexp engine. Expect supports null bytes in strings directly. (You no longer have to use the "null" keyword to send or match nulls. Of course, the "null" keyword will continue to be supported.) Null removal (on input) is still enabled by default since nulls are almost never intended for end-user consumption in interactive dialogues. ** CHANGES IN BEHAVIOR (POTENTIAL INCOMPATIBILITIES) The interpreter command used to exit upon eof. Now it uses "-eof script" to control this behavior. The default behavior is to return. (This change was required because Expect now gives control to Tcl upon exit and Tcl waits (potentially forever) for all processes to die on exit.) Explicit calls to interpreter are almost non-existent. However, you should look for *implicit* calls via interact commands with a pattern but no action. This required changes in the examples: dislocate, dvorak, kibitz, and xkibitz. Indirect variables can no longer start with "exp". Such variables will be interpreted as channel names. Old-style regexps may need conversion. If you have been protecting regexps containing backslashes with {}, then you need to examine all your backslashes since the new regexp engine interprets backslash sequences (such as \n) itself. For example: expect "\n" (works the same in Tcl 8.0 and 8.1) expect {\n} (works differently in Tcl 8.0 and 8.1) Scriptics has also created a new-regexp-features page which you should read: http://www.scriptics.com/support/howto/regexp81.html. Some of the new features allow much more efficient regexps than before. For example, non-greedy quantifiers can replace [split] looping constructions with a single regexp, enabling Tcl to parse very efficiently. For the whole story, read the re_syntax man page. The interact command's regexp matching no longer skips nulls. (I'd be surprised if anyone misses this. At least I hope ....) Expect's C library now reports failures in spawn's underlying exec directly (by returning -1) rather than the way it used to (as data in the pty). This makes user code more robust. However, it requires you to simplify your code, alas. See the chesslib.c example. Linking with Expect's C library no longer requires the Tcl library (unless, of course, you make Tcl calls yourself). Tcl is still required to build the library in the first place, however. ** CHANGES IN BEHAVIOR (SHOULD NOT CAUSE INCOMPATIBILITIES) The match_max command now controls by bytes, not chars. This won't cause problems unless your existing scripts are interacting using sizeable chunks of multibyte characters. (If you don't know what I'm talking about, ignore this.) The Make/configure suite now corresponds to the TEA conventions (at least in theory; the conventions are changing regularly so it's hard to be less vague on this point). Significantly, this means that you should be able to use the same configure flags as when compiling Tcl or any other TEA-compatible extension. (See the INSTALL file.) The values of special variables such as exp_spawn_id_any have changed. (The values were never documented so you shouldn't have been using them anyway.) Spawn ids now appear as "exp...". (They used to be small integers.) Do not assume that spawn ids will continue to be represented in any particular way (other than unique strings). ** OTHER NOTES Expect uses channels. There is an Expect channel type. It is possible to use Tcl's channel commands, such as fconfigure, to change the encoding. However, Expect layers its own buffering system on top of Tcl's channel handler so don't expect intuitive behavior when using commands such as gets and puts. Unless you know what you're doing, I recommend manipulating the Expect channels only with the expect commands. Some effort was made to make Expect support threads, however it is not complete. You can compile Expect with threads enabled but don't run Expect in multiple threads just yet. So much code has changed, there are bound to be bugs in dark corners. Please let me know of such cases. The best response will come by supplying a simple test case that can be added to Expect's test suite. In places where the behavior of Expect was not precisely documented, full advantage was taken to do something different :-) Several esoteric bugs were fixed. Although Expect itself uses Henry Spencer's new regexp engine, Expect's C library still uses his original regexp engine. No testing has been done of the poll and non-event subsystems. (These are used on systems which don't support select on ptys or ttys. Some minor work needs to be done on them (because the event subsystem was rewritten) which I'll probably do only if anyone requests it. Many deprecated features (deprecated for many years!) have been removed. All such features were deprecated prior to Exploring Expect so if that's how you learned Expect, you have nothing to worry about. For example, Expect's getpid command predates Tcl's pid command and it's been deprecated for, oh.... 6 years - wow! Other deprecated features include: expect -timestamp (flag only; behavior itself was removed years ago) expect -iwrite (flag only; behavior occurs all the time) expect_version (use "exp_version" command) expect_library (use "exp_library" global variable) interact -eof (use "eof" keyword) interact -timeout (use "timeout" keyword) interact -timestamp (use "clock" command) getpid (use "pid" command) system stty (use "stty" command) With this release, the following are deprecated: timestamp (use "clock" command) debugger (use a different one; there are very nice replacements around. Fortunately the Expect debugger is not something anyone is wiring into their scripts, so for now, consider it on the endangered species list. Anyone still want this debugger?) From now on, the most current snapshots of Expect will be found in the Scriptics CVS repository. Not all snapshots are official releases. For more, see the ChangeLog file in the expect distribution.
Diffstat (limited to 'lang/tcl-expect/patches')
-rw-r--r--lang/tcl-expect/patches/patch-aa171
-rw-r--r--lang/tcl-expect/patches/patch-ab9
2 files changed, 180 insertions, 0 deletions
diff --git a/lang/tcl-expect/patches/patch-aa b/lang/tcl-expect/patches/patch-aa
new file mode 100644
index 00000000000..0b3cccd45c0
--- /dev/null
+++ b/lang/tcl-expect/patches/patch-aa
@@ -0,0 +1,171 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/09/05 16:20:30 jwise Exp $
+--- Makefile.in.orig Fri May 12 13:59:44 2000
++++ Makefile.in Tue Sep 5 11:46:16 2000
+@@ -57,9 +57,9 @@
+ # your Expect scripts.
+ # Note: On Linux systems which only have dynamic X libraries, the -g prevents
+ # the linker from using them. So do not use -g on such systems.
+-CFLAGS = @CFLAGS@
++CFLAGS = @CFLAGS@ $(STTY) $(MH_CFLAGS) $(CPPFLAGS) $(XCFLAGS)
+ #XCFLAGS = @CFLAGS@ @EXP_CFLAGS@ @EXP_SHLIB_CFLAGS@
+-XCFLAGS = @CFLAGS@ @EXP_CFLAGS@
++XCFLAGS = @CFLAGS@ @EXP_CFLAGS@ $(STTY)
+
+ # Libraries built with optimization switches have this additional extension
+ TCL_DBGX = @TCL_DBGX@
+@@ -79,7 +79,8 @@
+ # used when Tcl was compiled. Changing this definition here can screw up
+ # deductions that the configure script made on the assumption that you were
+ # using a different compiler.
+-CC = @CC@
++CC = ${LIBTOOL} --mode=compile @CC@
++LD = @${LIBTOOL} --mode=link @CC@
+
+ # By default, "make install" will install the appropriate files in
+ # /usr/local/bin, /usr/local/lib, /usr/local/man, etc. By changing this
+@@ -170,10 +171,10 @@
+ ######################################################################
+
+ bindir = $(INSTALL_ROOT)@bindir@
+-bindir_arch_indep = $(INSTALL_ROOT)$(prefix)/bin
+-tcl_libdir = $(INSTALL_ROOT)@libdir@
+-libdir = $(INSTALL_ROOT)@libdir@/expect$(VERSION)
+-libdir_arch_indep = $(INSTALL_ROOT)$(prefix)/lib/expect$(VERSION)
++bindir_arch_indep = $(INSTALL_ROOT)$(prefix)/share/examples/tcl/expect
++tcl_libdir = $(INSTALL_ROOT)$(prefix)/lib
++libdir = $(INSTALL_ROOT)@libdir@/tcl/expect$(VERSION)
++libdir_arch_indep = $(INSTALL_ROOT)$(prefix)/lib/tcl/expect$(VERSION)
+
+ mandir = $(INSTALL_ROOT)@mandir@
+ man1dir = $(mandir)/man1
+@@ -189,9 +190,10 @@
+
+ SHELL = @EXP_CONFIG_SHELL@
+
+-INSTALL = @INSTALL@
+-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+-INSTALL_DATA = @INSTALL_DATA@
++INSTALL = ${LIBTOOL} --mode=install ${BSD_INSTALL}
++INSTALL_PROGRAM = ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM}
++INSTALL_DATA = ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA}
++INSTALL_SCRIPT = ${LIBTOOL} --mode=install ${BSD_INSTALL_SCRIPT}
+
+ AR = ar
+ ARFLAGS = cr
+@@ -318,14 +320,14 @@
+ # I don't understand why Tcl splits these up, but it does. LIB_RUNTIME_DIR
+ # can appear as part of the LD_SEARCH_FLAGS inherited by configure.
+
+-.c.o:
+- $(CC) -c $(CFLAGS_INT) $(STTY) $(HDEFS) $<
+- if [ "x$(EXP_UNSHARED_LIB_FILE)" != "x$(EXP_LIB_FILE)" ] ; then \
+- if [ ! -d shared ] ; then \
+- mkdir shared ; \
+- else true; fi ; \
+- $(CC) -c $(CFLAGS_INT) @EXP_SHLIB_CFLAGS@ $(STTY) $(HDEFS) $< -o shared/$@ ; \
+- fi
++#.c.o:
++# $(CC) -c $(CFLAGS_INT) $(STTY) $(HDEFS) $<
++# if [ "x$(EXP_UNSHARED_LIB_FILE)" != "x$(EXP_LIB_FILE)" ] ; then \
++# if [ ! -d shared ] ; then \
++# mkdir shared ; \
++# else true; fi ; \
++# $(CC) -c $(CFLAGS_INT) @EXP_SHLIB_CFLAGS@ $(STTY) $(HDEFS) $< -o shared/$@ ; \
++# fi
+
+ all: binaries libraries doc
+
+@@ -342,7 +344,7 @@
+ # build expect binary that does not depend on Expect's shared libs
+ # IFF static Tcl/Tk libraries are available.
+ expect: exp_main_exp.o $(EXP_UNSHARED_LIB_FILE)
+- $(CC) $(XCFLAGS) @TCL_LD_FLAGS@ -o expect exp_main_exp.o $(EXP_UNSHARED_LIB_FILE) $(TCLLIB) $(EXP_AND_TCL_LIBS)
++ $(LD) $(XCFLAGS) @TCL_LD_FLAGS@ -o expect exp_main_exp.o $(EXP_UNSHARED_LIB_FILE) $(TCLLIB) $(EXP_AND_TCL_LIBS)
+ $(SETUID) expect
+
+ # install Expect library
+@@ -357,24 +359,16 @@
+ # is too long for some filesystems, sigh.
+ install_shared_lib: $(EXP_LIB_FILES)
+ ${srcdir}/mkinstalldirs $(libdir)
+- if [ -s $(EXP_UNSHARED_LIB_FILE) ] ; then \
+- $(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
+- $(UNSHARED_RANLIB) $(libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
+- $(INSTALL_DATA) $(EXP_UNSHARED_LIB_FILE) $(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
+- $(UNSHARED_RANLIB) $(tcl_libdir)/$(EXP_UNSHARED_LIB_FILE) ; \
+- else true; fi
+- if [ -s $(EXP_SHARED_LIB_FILE) ] ; then \
+- $(INSTALL_PROGRAM) $(EXP_SHARED_LIB_FILE) $(tcl_libdir)/$(EXP_SHARED_LIB_FILE) ; \
+- $(INSTALL_PROGRAM) pkgIndex $(libdir)/pkgIndex.tcl ; \
+- else true; fi
++ $(INSTALL_DATA) $(EXP_SHARED_LIB_FILE:C/\.so.*/.la/) $(tcl_libdir)
++ $(INSTALL_DATA) pkgIndex $(libdir)/pkgIndex.tcl
+
+ expect_installed: exp_main_exp.o $(EXP_LIB_FILE) install_shared_lib
+- $(CC) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expect_installed exp_main_exp.o @EXP_LIB_SPEC@ $(TCLLIB_INSTALLED) $(EXP_AND_TCL_LIBS)
++ $(LD) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expect_installed exp_main_exp.o @EXP_LIB_SPEC@ $(TCLLIB_INSTALLED) $(EXP_AND_TCL_LIBS)
+ $(SETUID) expect_installed
+
+ # Build Expect with TestCenter
+ expect.tc: exp_main_exp.o $(OFILES)
+- proof $(CC) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expect.tc $(OFILES) exp_main_exp.o $(TCLLIB) $(EXP_AND_TCL_LIBS)
++ proof $(LD) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expect.tc $(OFILES) exp_main_exp.o $(TCLLIB) $(EXP_AND_TCL_LIBS)
+ $(SETUID) expect.tc
+
+ # Build an executable with both Expect and Tk
+@@ -385,16 +379,16 @@
+ # configure) separately for Expectk, but as far as I know, it doesn't hurt
+ # anything here, so I'm not worrying about it.
+ expectk: exp_main_tk.o $(EXP_UNSHARED_LIB_FILE)
+- $(CC) $(XCFLAGS) @TCL_LD_FLAGS@ -o expectk exp_main_tk.o $(EXP_UNSHARED_LIB_FILE) $(TKLIB) $(TCLLIB) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
++ $(LD) $(XCFLAGS) @TCL_LD_FLAGS@ -o expectk exp_main_tk.o $(EXP_UNSHARED_LIB_FILE) $(TKLIB) $(TCLLIB) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
+ $(SETUID) expectk
+
+ expectk_installed: exp_main_tk.o $(EXP_LIB_FILE)
+- $(CC) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expectk_installed exp_main_tk.o @EXP_LIB_SPEC@ $(TKLIB_INSTALLED) $(TCLLIB_INSTALLED) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
++ $(LD) $(XCFLAGS) @EXP_SHLIB_CFLAGS@ @TCL_LD_FLAGS@ -o expectk_installed exp_main_tk.o @EXP_LIB_SPEC@ $(TKLIB_INSTALLED) $(TCLLIB_INSTALLED) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
+ $(SETUID) expectk_installed
+
+ # Build Expectk with TestCenter
+ expectk.tc: exp_main_tk.o $(OFILES)
+- proof $(CC) $(XCFLAGS) @TCL_LD_FLAGS@ -o expectk.tc $(OFILES) exp_main_tk.o $(TKLIB) $(TCLLIB) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
++ proof $(LD) $(XCFLAGS) @TCL_LD_FLAGS@ -o expectk.tc $(OFILES) exp_main_tk.o $(TKLIB) $(TCLLIB) $(X11_LD_FLAGS) $(EXP_AND_TK_LIBS)
+ $(SETUID) expectk.tc
+
+ expect-unshared-lib-file :: $(EXP_UNSHARED_LIB_FILE)
+@@ -410,7 +404,7 @@
+ expect-shared-lib-file :: $(EXP_SHARED_LIB_FILE)
+ $(EXP_SHARED_LIB_FILE): $(OFILES)
+ -rm -f $(EXP_SHARED_LIB_FILE)
+- @TCL_SHLIB_LD@ -o $(EXP_SHARED_LIB_FILE) $(SHARED_OFILES) @EXP_LD_SEARCH_FLAGS@ @EXP_SHLIB_LD_LIBS@
++ ${LIBTOOL} @CC@ --mode=link -rpath ${PREFIX}/lib -o $(EXP_SHARED_LIB_FILE:C/\.so.*/.la/) $(OFILES:.o=.lo) @EXP_LD_SEARCH_FLAGS@ @EXP_SHLIB_LD_LIBS@ -version-info 1:0
+
+ .PHONY: install-info install info
+ install-info:
+@@ -448,7 +442,7 @@
+ ${srcdir}/mkinstalldirs $(bindir_arch_indep) $(man1dir) $(SCRIPTDIR) $(EXECSCRIPTDIR)
+ -for i in $(SCRIPT_LIST) ; do \
+ if [ -f $$i ] ; then \
+- $(INSTALL_PROGRAM) $$i $(bindir_arch_indep)/$$i ; \
++ $(INSTALL_SCRIPT) $$i $(bindir_arch_indep)/$$i ; \
+ rm -f $$i ; \
+ else true; fi ; \
+ done
+@@ -457,7 +451,7 @@
+ ${srcdir}/mkinstalldirs $(man1dir) $(man3dir)
+ # install Expectk man page if present
+ -if [ -s expectk_installed ] ; then \
+- $(INSTALL_DATA) $(srcdir)/expectk.man $(man1dir)/expectk.1 ; \
++ $(BSD_INSTALL_DATA) $(srcdir)/expectk.man $(man1dir)/expectk.1 ; \
+ else true; fi
+ # install Expect man page
+ $(INSTALL_DATA) $(srcdir)/expect.man $(man1dir)/expect.1
+@@ -465,7 +459,7 @@
+ $(INSTALL_DATA) $(srcdir)/libexpect.man $(man3dir)/libexpect.3
+ -for i in $(SCRIPT_MANPAGE_LIST) ; do \
+ if [ -f $(srcdir)/example/$$i.man ] ; then \
+- $(INSTALL_DATA) $(srcdir)/example/$$i.man $(man1dir)/$$i.1 ; \
++ $(INSTALL_DATA) $(srcdir)/example/$$i.man $(bindir_arch_indep)/$$i.1 ; \
+ else true; fi ; \
+ done
+
diff --git a/lang/tcl-expect/patches/patch-ab b/lang/tcl-expect/patches/patch-ab
new file mode 100644
index 00000000000..7ab8c9c2f6f
--- /dev/null
+++ b/lang/tcl-expect/patches/patch-ab
@@ -0,0 +1,9 @@
+$NetBSD: patch-ab,v 1.1.1.1 2000/09/05 16:20:30 jwise Exp $
+--- pkgIndex.in.orig Fri Sep 1 22:24:40 2000
++++ pkgIndex.in Fri Sep 1 22:24:53 2000
+@@ -7,4 +7,4 @@
+ # script is sourced, the variable $dir must contain the
+ # full path name of this file's directory.
+
+-package ifneeded Expect @EXP_VERSION_FULL@ [list load [file join $dir .. @EXP_SHARED_LIB_FILE@]]
++package ifneeded Expect @EXP_VERSION_FULL@ [list load [file join $dir ../.. @EXP_SHARED_LIB_FILE@]]