public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-tcltk/expect/files: expect-5.43.0-avoid-tcl-internals-1.patch expect-5.43.0-multilib.patch
@ 2008-11-02 13:11 Federico Ferri (mescalinum)
  0 siblings, 0 replies; only message in thread
From: Federico Ferri (mescalinum) @ 2008-11-02 13:11 UTC (permalink / raw
  To: gentoo-commits

mescalinum    08/11/02 13:11:09

  Added:                expect-5.43.0-avoid-tcl-internals-1.patch
                        expect-5.43.0-multilib.patch
  Log:
  adding v5.43.0, cause 5.44.1 was retired due to problems - bug #244827
  (Portage version: 2.1.4.4)

Revision  Changes    Path
1.1                  dev-tcltk/expect/files/expect-5.43.0-avoid-tcl-internals-1.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-tcltk/expect/files/expect-5.43.0-avoid-tcl-internals-1.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-tcltk/expect/files/expect-5.43.0-avoid-tcl-internals-1.patch?rev=1.1&content-type=text/plain

Index: expect-5.43.0-avoid-tcl-internals-1.patch
===================================================================
Submitted By: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
Date: 2008-01-12
Initial Package Version: 5.43
Upstream status: Not Submitted - Test Version
Origin: LFS ticket 2126 (http://wiki.linuxfromscratch.org/lfs/ticket/2126)
Description: Removes references to functions that Tcl 8.5 no longer exposes.

diff -Naur expect-5.43/exp_command.c expect-5.43-patched/exp_command.c
--- expect-5.43/exp_command.c	2004-08-20 13:18:01.000000000 -0400
+++ expect-5.43-patched/exp_command.c	2008-01-12 11:42:45.000000000 -0500
@@ -2265,6 +2265,8 @@
 	/*NOTREACHED*/
 }
 
+static struct exp_cmd_data cmd_data[];
+
 /*ARGSUSED*/
 static int
 Exp_CloseObjCmd(clientData, interp, objc, objv)
@@ -2311,12 +2313,23 @@
 	/* Historical note: we used "close"  long before there was a */
 	/* Tcl builtin by the same name. */
 
+	/* The code that registered this function as the handler for */
+	/* the "close" command stored away the old handler in the */
+	/* exp_cmd_data for the "close" command. */
+
+	struct exp_cmd_data *cmd_ptr;
 	Tcl_CmdInfo info;
+
+	for(cmd_ptr = &cmd_data[0]; cmd_ptr->name; cmd_ptr++) {
+	    if(strncmp(cmd_ptr->name, "close", 5) == 0)
+		break;
+	}
+
 	Tcl_ResetResult(interp);
 	if (0 == Tcl_GetCommandInfo(interp,"close",&info)) {
 	    info.clientData = 0;
 	}
-	return(Tcl_CloseObjCmd(info.clientData,interp,objc_orig,objv_orig));
+	return(cmd_ptr->old_objProc(info.clientData,interp,objc_orig,objv_orig));
     }
 
     if (chanName) {
@@ -2961,7 +2974,10 @@
     /* if successful (i.e., TCL_RETURN is returned) */
     /* modify the result, so that we will handle it specially */
 
-    int result = Tcl_ReturnObjCmd(clientData,interp,objc,objv);
+    Tcl_CmdInfo info;
+    Tcl_GetCommandInfo(interp, "return", &info);
+
+    int result = info.objProc(clientData,interp,objc,objv);
     if (result == TCL_RETURN)
         result = EXP_TCL_RETURN;
     return result;
@@ -3062,8 +3078,7 @@
 
 	for (;c->name;c++) {
 		/* if already defined, don't redefine */
-		if ((c->flags & EXP_REDEFINE) ||
-		    !(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) ||
+		if (!(Tcl_FindHashEntry(&globalNsPtr->cmdTable,c->name) ||
 		      Tcl_FindHashEntry(&currNsPtr->cmdTable,c->name))) {
 			if (c->objproc)
 				Tcl_CreateObjCommand(interp,c->name,
@@ -3072,6 +3087,21 @@
 				Tcl_CreateCommand(interp,c->name,c->proc,
 						  c->data,exp_deleteProc);
 		}
+		else if (c->flags & EXP_REDEFINE) { /* unless the REDEFINE flag is present */
+			Tcl_CmdInfo info;
+
+			if (Tcl_GetCommandInfo(interp, c->name, &info)) {
+				c->old_proc	= info.proc;
+				c->old_objProc	= info.objProc;
+			}
+
+			if (c->objproc)
+				Tcl_CreateObjCommand(interp,c->name,
+						     c->objproc,c->data,exp_deleteObjProc);
+			else
+				Tcl_CreateCommand(interp,c->name,c->proc,
+						  c->data,exp_deleteProc);
+		}
 		if (!(c->name[0] == 'e' &&
 		      c->name[1] == 'x' &&
 		      c->name[2] == 'p')
diff -Naur expect-5.43/exp_command.h expect-5.43-patched/exp_command.h
--- expect-5.43/exp_command.h	2008-01-12 11:44:11.000000000 -0500
+++ expect-5.43-patched/exp_command.h	2008-01-12 11:26:05.000000000 -0500
@@ -297,6 +297,8 @@
 	Tcl_CmdProc	*proc;
 	ClientData	data;
 	int 		flags;
+	Tcl_CmdProc	*old_proc;     /* these store the procedure for the old command, */
+	Tcl_ObjCmdProc	*old_objProc;  /* if any */
 };
 
 EXTERN void		exp_create_commands _ANSI_ARGS_((Tcl_Interp *,



1.1                  dev-tcltk/expect/files/expect-5.43.0-multilib.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-tcltk/expect/files/expect-5.43.0-multilib.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-tcltk/expect/files/expect-5.43.0-multilib.patch?rev=1.1&content-type=text/plain

Index: expect-5.43.0-multilib.patch
===================================================================
--- expect-5.42/configure.in.orig	2004-12-21 03:02:36.095170881 -0800
+++ expect-5.42/configure.in	2004-12-21 03:03:08.987170537 -0800
@@ -1141,7 +1141,7 @@
 fi
 
 EXP_BUILD_LIB_SPEC="-L`pwd` -lexpect${EXP_LIB_VERSION}${DBGX}"
-EXP_LIB_SPEC="-L\${INSTALL_ROOT}\${exec_prefix}/lib -lexpect${EXP_LIB_VERSION}${DBGX}"
+EXP_LIB_SPEC="-L\${libdir} -lexpect${EXP_LIB_VERSION}${DBGX}"
 EXP_UNSHARED_LIB_FILE=libexpect${EXP_LIB_VERSION}${DBGX}.a
 
 # The TCL_SHARED_LIB_SUFFIX macro below relies on the DBGX macro,






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-02 13:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 13:11 [gentoo-commits] gentoo-x86 commit in dev-tcltk/expect/files: expect-5.43.0-avoid-tcl-internals-1.patch expect-5.43.0-multilib.patch Federico Ferri (mescalinum)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox