pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/ruby-tcltklib Update to Ruby 1.8.2 base and this c...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e0e236b47345
branches:  trunk
changeset: 488004:e0e236b47345
user:      taca <taca%pkgsrc.org@localhost>
date:      Sun Jan 23 17:36:59 2005 +0000

description:
Update to Ruby 1.8.2 base and this change:

        * ext/tcltklib/tcltklib.c: fix SEGV bug when deleting Tk interp

diffstat:

 x11/ruby-tcltklib/Makefile         |    4 +-
 x11/ruby-tcltklib/PLIST            |    4 +-
 x11/ruby-tcltklib/distinfo         |    5 +
 x11/ruby-tcltklib/patches/patch-aa |  105 +++++++++++++++++++++++++++++++++++++
 4 files changed, 115 insertions(+), 3 deletions(-)

diffs (158 lines):

diff -r d54603d38c7a -r e0e236b47345 x11/ruby-tcltklib/Makefile
--- a/x11/ruby-tcltklib/Makefile        Sun Jan 23 17:36:03 2005 +0000
+++ b/x11/ruby-tcltklib/Makefile        Sun Jan 23 17:36:59 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2004/11/27 14:50:12 taca Exp $
+# $NetBSD: Makefile,v 1.14 2005/01/23 17:36:59 taca Exp $
 # FreeBSD: ports/lang/ruby-tcltklib/Makefile,v 1.21 2000/10/20 19:56:04 knu Exp
 
 DISTNAME=      ${RUBY_DISTNAME}
@@ -10,11 +10,11 @@
 HOMEPAGE=      ${RUBY_HOMEPAGE}
 COMMENT=       Ruby interface to Tcl/Tk libraries
 
+RUBY_HAS_ARCHLIB=      yes
 RUBY_VERSION_SUPPORTED=        18
 USE_BUILDLINK3=                yes
 USE_RUBY_EXTCONF=      yes
 USE_X11=               yes
-DISTINFO_FILE=         ${RUBY_DISTINFO_FILE}
 EXTRACT_ELEMENTS=      ${RUBY_DISTNAME}/ext/tcltklib
 WRKSRC=                        ${RUBY_WRKSRC}/ext/tcltklib
 
diff -r d54603d38c7a -r e0e236b47345 x11/ruby-tcltklib/PLIST
--- a/x11/ruby-tcltklib/PLIST   Sun Jan 23 17:36:03 2005 +0000
+++ b/x11/ruby-tcltklib/PLIST   Sun Jan 23 17:36:59 2005 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2004/12/04 17:20:47 taca Exp $
+@comment $NetBSD: PLIST,v 1.5 2005/01/23 17:36:59 taca Exp $
 ${RUBY_SITEARCHLIBDIR}/tcltklib.${RUBY_DLEXT}
 ${RUBY_SITELIBDIR}/tcltk.rb
 ${RUBY_DOCDIR}/tcltklib/MANUAL.ja
@@ -12,6 +12,8 @@
 ${RUBY_EXAMPLESDIR}/tcltklib/demo/lines0.tcl
 ${RUBY_EXAMPLESDIR}/tcltklib/demo/lines1.rb
 ${RUBY_EXAMPLESDIR}/tcltklib/demo/lines2.rb
+${RUBY_EXAMPLESDIR}/tcltklib/demo/lines3.rb
+${RUBY_EXAMPLESDIR}/tcltklib/demo/lines4.rb
 ${RUBY_EXAMPLESDIR}/tcltklib/demo/safeTk.rb
 @dirrm ${RUBY_EXAMPLESDIR}/tcltklib/demo
 @dirrm ${RUBY_EXAMPLESDIR}/tcltklib
diff -r d54603d38c7a -r e0e236b47345 x11/ruby-tcltklib/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/ruby-tcltklib/distinfo        Sun Jan 23 17:36:59 2005 +0000
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.1 2005/01/23 17:36:59 taca Exp $
+
+SHA1 (ruby/ruby-1.8.2.tar.gz) = 409a917d3a0aba41f45bd053b767c85b2bc35ffa
+Size (ruby/ruby-1.8.2.tar.gz) = 3627349 bytes
+SHA1 (patch-aa) = ac8b93730ab5c36e9aaf61f6f12b6d78e8d5e8c1
diff -r d54603d38c7a -r e0e236b47345 x11/ruby-tcltklib/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/ruby-tcltklib/patches/patch-aa        Sun Jan 23 17:36:59 2005 +0000
@@ -0,0 +1,105 @@
+$NetBSD: patch-aa,v 1.1 2005/01/23 17:36:59 taca Exp $
+
+--- ext/tcltklib/tcltklib.c.orig       2004-12-23 13:16:42.000000000 +0900
++++ ext/tcltklib/tcltklib.c
+@@ -4,7 +4,7 @@
+  *              Oct. 24, 1997   Y. Matsumoto
+  */
+ 
+-#define TCLTKLIB_RELEASE_DATE "2004-12-23"
++#define TCLTKLIB_RELEASE_DATE "2004-12-27"
+ 
+ #include "ruby.h"
+ #include "rubysig.h"
+@@ -70,9 +70,13 @@ fprintf(stderr, ARG1, ARG2); fprintf(std
+ /* release date */
+ const char tcltklib_release_date[] = TCLTKLIB_RELEASE_DATE;
+ 
+-/*finalize_proc_name */
++/* finalize_proc_name */
+ static char *finalize_hook_name = "INTERP_FINALIZE_HOOK";
+ 
++/* to cancel remained after-scripts when deleting IP */
++#define REMAINED_AFTER_IDS_VAR "__ruby_tcltklib_remained_after_script_list__"
++#define CANCEL_REMAINED_AFTER_IDS "foreach id $__ruby_tcltklib_remained_after_script_list__ {after cancel $id}"
++
+ /* for callback break & continue */
+ static VALUE eTkCallbackReturn;
+ static VALUE eTkCallbackBreak;
+@@ -3312,12 +3316,16 @@ delete_slaves(ip)
+ 
+         Tcl_Preserve(slave);
+ 
+-#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
+-#else
+         if (!Tcl_InterpDeleted(slave)) {
+-            Tcl_Eval(slave, "foreach i [after info] { after cancel $i }");
++            if (Tcl_Eval(slave, "after info") == TCL_OK
++                && Tcl_SetVar(slave, 
++                              REMAINED_AFTER_IDS_VAR, 
++                              Tcl_GetStringResult(slave), 
++                              TCL_GLOBAL_ONLY) != (char *)NULL) {
++                DUMP1("cancel after scripts");
++                Tcl_Eval(slave, CANCEL_REMAINED_AFTER_IDS);
++            }
+         }
+-#endif
+ 
+         /* delete slaves of slave */
+         delete_slaves(slave);
+@@ -3360,18 +3368,20 @@ ip_free(ptr)
+ 
+             Tcl_ResetResult(ptr->ip);
+ 
++            if (Tcl_Eval(ptr->ip, "after info") == TCL_OK
++                && Tcl_SetVar(ptr->ip, 
++                              REMAINED_AFTER_IDS_VAR, 
++                              Tcl_GetStringResult(ptr->ip), 
++                              TCL_GLOBAL_ONLY) != (char *)NULL) {
++                DUMP1("cancel after scripts");
++                Tcl_Eval(ptr->ip, CANCEL_REMAINED_AFTER_IDS);
++            }
++
+             if (Tcl_GetCommandInfo(ptr->ip, finalize_hook_name, &info)) {
+                 DUMP2("call finalize hook proc '%s'", finalize_hook_name);
+                 Tcl_Eval(ptr->ip, finalize_hook_name);
+             }
+ 
+-#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
+-#else
+-            if (!Tcl_InterpDeleted(ptr->ip)) {
+-                Tcl_Eval(ptr->ip, "foreach i [after info] {after cancel $i}");
+-            }
+-#endif
+-
+             del_root(ptr->ip);
+ 
+             DUMP1("delete interp");
+@@ -3838,12 +3848,14 @@ ip_delete(self)
+     /* Tcl_Preserve(ptr->ip); */
+     rbtk_preserve_ip(ptr);
+ 
+-#if TCL_MAJOR_VERSION < 8 || ( TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 4)
+-#else
+-    if (!Tcl_InterpDeleted(ptr->ip)) {
+-        Tcl_Eval(ptr->ip, "foreach i [after info] { after cancel $i }");
++    if (Tcl_Eval(ptr->ip, "after info") == TCL_OK
++        && Tcl_SetVar(ptr->ip, 
++                      REMAINED_AFTER_IDS_VAR, 
++                      Tcl_GetStringResult(ptr->ip), 
++                      TCL_GLOBAL_ONLY) != (char *)NULL) {
++        DUMP1("cancel after scripts");
++        Tcl_Eval(ptr->ip, CANCEL_REMAINED_AFTER_IDS);
+     }
+-#endif
+ 
+     del_root(ptr->ip);
+ 
+@@ -4188,6 +4200,7 @@ ip_eval(self, str)
+         rb_thread_stop();
+     }
+     DUMP2("back from handler (current thread:%lx)", current);
++    DUMP1("ip_eval back:111");
+ 
+     /* get result & free allocated memory */
+     ret = RARRAY(result)->ptr[0];



Home | Main Index | Thread Index | Old Index