Date: Saturday, January 1, 2011 @ 18:49:12 Author: kevin Revision: 104371
The program expectk has been removed from the expect 5.45 distribution. Modified: expectk/trunk/ChangeLog Deleted: expectk/trunk/19-tk-init.patch expectk/trunk/PKGBUILD ------------------+ 19-tk-init.patch | 254 ----------------------------------------------------- ChangeLog | 4 PKGBUILD | 48 ---------- 3 files changed, 3 insertions(+), 303 deletions(-) Deleted: 19-tk-init.patch =================================================================== --- 19-tk-init.patch 2011-01-01 20:05:07 UTC (rev 104370) +++ 19-tk-init.patch 2011-01-01 23:49:12 UTC (rev 104371) @@ -1,254 +0,0 @@ -Author: Sergei Golovan <[email protected]> -Description: Fixes Tk intialization by calling Tk_Init instead of using - copied&pasted Tk_Init from older Tk. -Bug: https://sourceforge.net/tracker/?func=detail&aid=2585764&group_id=13179&atid=113179 -Last-Update: 2009-11-12 - ---- expect-5.44.1.14.orig/exp_main_tk.c -+++ expect-5.44.1.14/exp_main_tk.c -@@ -29,7 +29,7 @@ - */ - - #ifndef lint --static char sccsid[] = "@(#) tkAppInit.c 1.19 95/12/23 17:09:24"; -+/* static char sccsid[] = "@(#) tkAppInit.c 1.19 95/12/23 17:09:24"; */ - #endif /* not lint */ - - /* Don't use stubs since we are in the main application. */ -@@ -162,24 +173,11 @@ - - -- --/* -- * Count of number of main windows currently open in this process. -- */ -- --static int numMainWindows; -- - /* - * The variables and table below are used to parse arguments from - * the "argv" variable in Tk_Init. - */ - --static int synchronize; --static CONST char *name; --static char *display; --static char *geometry; --static char *colormap; --static char *visual; --static int rest = 0; -+static int rest; - - /* for Expect */ - static int optcmd_eval(); -@@ -181,21 +186,6 @@ - int print_version = 0; - - static Tk_ArgvInfo argTable[] = { -- {"-colormap", TK_ARGV_STRING, (char *) NULL, (char *) &colormap, -- "Colormap for main window"}, -- {"-display", TK_ARGV_STRING, (char *) NULL, (char *) &display, -- "Display to use"}, -- {"-geometry", TK_ARGV_STRING, (char *) NULL, (char *) &geometry, -- "Initial geometry for window"}, -- {"-name", TK_ARGV_STRING, (char *) NULL, (char *) &name, -- "Name to use for application"}, -- {"-sync", TK_ARGV_CONSTANT, (char *) 1, (char *) &synchronize, -- "Use synchronous mode for display server"}, -- {"-visual", TK_ARGV_STRING, (char *) NULL, (char *) &visual, -- "Visual for main window"}, -- {"--", TK_ARGV_REST, (char *) 1, (char *) &rest, -- "Pass all remaining arguments through to script"}, --/* for Expect */ - {"-command", TK_ARGV_GENFUNC, (char *) optcmd_eval, (char *)0, - "Command(s) to execute immediately"}, - {"-diag", TK_ARGV_CONSTANT, (char *) optcmd_diagToStderr, (char *)0, -@@ -210,6 +189,8 @@ - {"-Debug", TK_ARGV_GENFUNC, (char *) optcmd_debug, (char *)0, - "Enable debugger"}, - #endif -+ {"--", TK_ARGV_REST, (char *) 1, (char *) &rest, -+ "Pass all remaining arguments through to script"}, - {(char *) NULL, TK_ARGV_END, (char *) NULL, (char *) NULL, - (char *) NULL} - }; -@@ -243,11 +235,11 @@ - Tcl_Interp *interp; /* Interpreter to initialize. */ - { - CONST char *p; -- char* alist, *cstr; -- int argc, code; -- char **argv, *args[20]; -- Tcl_DString class; -+ char *alist, *pp; -+ int argc, length, i, j; -+ char **argv, **newargv; - char buffer[30]; -+ size_t len; - - /* - * If there is an "argv" variable, get its value, extract out -@@ -255,8 +247,7 @@ - * the arguments that we used. - */ - -- synchronize = 0; -- name = display = geometry = colormap = visual = NULL; -+ rest = -1; - p = Tcl_GetVar2(interp, "argv", (char *) NULL, TCL_GLOBAL_ONLY); - argv = NULL; - if (p != NULL) { -@@ -285,115 +276,57 @@ - } - } - -- alist = Tcl_Merge(argc, argv); -- Tcl_SetVar2(interp, "argv", (char *) NULL, alist, TCL_GLOBAL_ONLY); -- sprintf(buffer, "%d", argc); -- Tcl_SetVar2(interp, "argc", (char *) NULL, buffer, TCL_GLOBAL_ONLY); -- ckfree(alist); -- } -- -- /* -- * Figure out the application's name and class. -- */ -+ if (rest >= 0) { -+ /* Resore '--' in arguments list -+ */ - -- if (name == NULL) { -- name = Tcl_GetVar(interp, "argv0", TCL_GLOBAL_ONLY); -- if ((name == NULL) || (*name == 0)) { -- name = "tk"; -- } else { -- p = (char *)strrchr(name, '/'); /* added cast - DEL */ -- if (p != NULL) { -- name = p+1; -+ length = 0; -+ for (i = 0; i < argc; i++) { -+ length += strlen(argv[i]) + 1; - } -- } -- } -- Tcl_DStringInit(&class); -- Tcl_DStringAppend(&class, name, -1); -- cstr = Tcl_DStringValue(&class); -- if (islower(*cstr)) { -- *cstr = toupper((unsigned char) *cstr); -- } - -- /* -- * Create an argument list for creating the top-level window, -- * using the information parsed from argv, if any. -- */ -+ newargv = (char **) ckalloc((unsigned) ((argc+2)*sizeof(char *)) + length + 3); - -- args[0] = "toplevel"; -- args[1] = "."; -- args[2] = "-class"; -- args[3] = Tcl_DStringValue(&class); -- argc = 4; -- if (display != NULL) { -- args[argc] = "-screen"; -- args[argc+1] = display; -- argc += 2; -- -- /* -- * If this is the first application for this process, save -- * the display name in the DISPLAY environment variable so -- * that it will be available to subprocesses created by us. -- */ -+ pp = ((char *) newargv) + (argc+2)*sizeof(char *); -+ j = 0; -+ for (i = 0; i < argc; i++) { -+ if (i == rest) { -+ memcpy(pp, "--", 3); -+ newargv[j++] = pp; -+ pp += 3; -+ } -+ -+ len = strlen(argv[i]) + 1; -+ memcpy(pp, argv[i], len); -+ newargv[j++] = pp; -+ pp += len; -+ } -+ newargv[j] = NULL; - -- if (numMainWindows == 0) { -- Tcl_SetVar2(interp, "env", "DISPLAY", display, TCL_GLOBAL_ONLY); -+ alist = Tcl_Merge(argc+1, newargv); -+ } else { -+ newargv = NULL; -+ alist = Tcl_Merge(argc, argv); - } -- } -- if (colormap != NULL) { -- args[argc] = "-colormap"; -- args[argc+1] = colormap; -- argc += 2; -- } -- if (visual != NULL) { -- args[argc] = "-visual"; -- args[argc+1] = visual; -- argc += 2; -- } -- args[argc] = NULL; -- code = TkCreateFrame((ClientData) NULL, interp, argc, args, 1, name); -- Tcl_DStringFree(&class); -- if (code != TCL_OK) { -- goto done; -- } -- Tcl_ResetResult(interp); --#ifndef MAC_OSX_TK -- if (synchronize) { -- XSynchronize(Tk_Display(Tk_MainWindow(interp)), True); -- } --#endif - -- /* -- * Set the geometry of the main window, if requested. Put the -- * requested geometry into the "geometry" variable. -- */ -- -- if (geometry != NULL) { -- Tcl_SetVar(interp, "geometry", geometry, TCL_GLOBAL_ONLY); -- code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL); -- if (code != TCL_OK) { -- goto done; -- } -- } -- if (Tcl_PkgRequire(interp, "Tcl", TCL_VERSION, 1) == NULL) { -- code = TCL_ERROR; -- goto done; -- } -- code = Tcl_PkgProvide(interp, "Tk", TK_VERSION); -- if (code != TCL_OK) { -- goto done; -+ Tcl_SetVar2(interp, "argv", (char *) NULL, alist, TCL_GLOBAL_ONLY); -+ sprintf(buffer, "%d", argc); -+ Tcl_SetVar2(interp, "argc", (char *) NULL, buffer, TCL_GLOBAL_ONLY); -+ ckfree(alist); - } - -- /* -- * Invoke platform-specific initialization. -- */ -- -- code = TkpInit(interp, 0); -+ if (Tk_Init(interp) == TCL_ERROR) { -+ return TCL_ERROR; -+ } - -- done: - if (argv != NULL) { - ckfree((char *) argv); - } -- return code; -+ if (newargv != NULL) { -+ ckfree((char *) newargv); -+ } -+ -+ return TCL_OK; - } - - /*ARGSUSED*/ Modified: ChangeLog =================================================================== --- ChangeLog 2011-01-01 20:05:07 UTC (rev 104370) +++ ChangeLog 2011-01-01 23:49:12 UTC (rev 104371) @@ -1,8 +1,10 @@ +2011-01-01 kevin <[email protected]> + * expectk program removed in expect 5.45 + 2010-03-27 kevin <[email protected]> * expectk 5.44.1.15-1 - Source on sourceforge now and maintained mostly by ActiveState - Added patch from Ubuntu to fix Tk intialization. Fixes FS#13806: buttons of windows created by expectk are not working - Deleted: PKGBUILD =================================================================== --- PKGBUILD 2011-01-01 20:05:07 UTC (rev 104370) +++ PKGBUILD 2011-01-01 23:49:12 UTC (rev 104371) @@ -1,48 +0,0 @@ -# $Id$ -# Maintainer: kevin <[email protected]> - -pkgname=expectk -pkgver=5.44.1.15 -pkgrel=1 -pkgdesc="An X and Tk variant of expect, a tool for automating interactive applications" -arch=('i686' 'x86_64') -url="http://expect.nist.gov/" -license=('custom') -depends=("expect=${pkgver}" 'tk>=8.5.0') -source=(http://downloads.sourceforge.net/project/expect/Expect/${pkgver}/expect-${pkgver}.tar.bz2 19-tk-init.patch) -# CVS checkout on gerolde. -#source=(ftp://ftp.archlinux.org/other/expect/expect-${pkgver}.tar.bz2) -# old nist source=(http://expect.nist.gov/src/expect-${pkgver}.tar.bz2) -md5sums=('9307bbf67e19125036ce34544a78dadf' - 'b996676d3af93f1a43cb18424a1ae504') - -build() { - # stuff to build. - BIN="expectk multixterm tknewsbiff tkpasswd xkibitz xpstat" - MAN="multixterm tknewsbiff xkibitz" - - cd ${srcdir}/expect-${pkgver} - sed 's#/usr/local/bin#/usr/bin#' -i expectk.man - patch -Np1 -i ${srcdir}/19-tk-init.patch - - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ - --mandir=/usr/share/man --with-tcl=/usr/lib \ - --with-tclinclude=/usr/include --with-tk=/usr/lib \ - --with-tkinclude=/usr/include \ - - # Keep ${pkgdir} out of library search paths. - sed -e 's/-rpath,${LIB_RUNTIME_DIR}:/-rpath,/' -i Makefile - # expect needed during build. - make -j1 expect ${BIN} || return 1 - - # install binaries and manpages. - for i in ${BIN} ; do - install -D -m755 ${i} ${pkgdir}/usr/bin/${i} - done - for i in ${MAN} ; do - install -D -m644 example/${i}.man ${pkgdir}/usr/share/man/man1/${i}.1 - done - - # license. - install -D -m644 README ${pkgdir}/usr/share/licenses/${pkgname}/README -}
