pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/tclreadline Fix this so that it works again:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/74ebd002a224
branches:  trunk
changeset: 328517:74ebd002a224
user:      he <he%pkgsrc.org@localhost>
date:      Tue Jan 22 14:08:47 2019 +0000

description:
Fix this so that it works again:
 * needs real readline, otherwise rl_extend_line_buffer is undefined
 * add a patch eliminating two FREE() calls which cause crashes
 * add required "package require tclreadline" to tclshrc example file
Bump PKGREVISION.

diffstat:

 devel/tclreadline/Makefile                    |   7 +++++--
 devel/tclreadline/distinfo                    |   4 ++--
 devel/tclreadline/files/tclshrc               |   1 +
 devel/tclreadline/patches/patch-tclreadline.c |  26 +++++++++++++++++++++-----
 4 files changed, 29 insertions(+), 9 deletions(-)

diffs (107 lines):

diff -r 0a7b406b520d -r 74ebd002a224 devel/tclreadline/Makefile
--- a/devel/tclreadline/Makefile        Tue Jan 22 13:21:10 2019 +0000
+++ b/devel/tclreadline/Makefile        Tue Jan 22 14:08:47 2019 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.8 2018/07/04 13:40:16 jperkin Exp $
+# $NetBSD: Makefile,v 1.9 2019/01/22 14:08:47 he Exp $
 #
 
 DISTNAME=      tclreadline-2.1.0
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    devel lang
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=tclreadline/}
 
@@ -15,6 +15,9 @@
 GNU_CONFIGURE=         yes
 CONFIGURE_ARGS+=       --with-tcl=${PREFIX}/lib
 
+# Need real readline; otherwise rl_extend_line_buffer is undefined
+READLINE_DEFAULT=      readline
+
 EGDIR=         ${PREFIX}/share/examples/tclreadline
 
 MESSAGE_SUBST+=                EGDIR=${EGDIR}
diff -r 0a7b406b520d -r 74ebd002a224 devel/tclreadline/distinfo
--- a/devel/tclreadline/distinfo        Tue Jan 22 13:21:10 2019 +0000
+++ b/devel/tclreadline/distinfo        Tue Jan 22 14:08:47 2019 +0000
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.3 2015/11/03 03:29:35 agc Exp $
+$NetBSD: distinfo,v 1.4 2019/01/22 14:08:47 he Exp $
 
 SHA1 (tclreadline-2.1.0.tar.gz) = 3b44f92ce1921ebccebab9b44d7cda6992cf8923
 RMD160 (tclreadline-2.1.0.tar.gz) = 9967f7d7aa18fcd822f5701306f3a75a6001fdc5
 SHA512 (tclreadline-2.1.0.tar.gz) = bd67a65fe2ec708834fb67fabf2e36e778a6aeeb7a7b69cda298f9e18acc9e03f3a379f81ff7d2d289bfbf1093bc86fecbf96fe5d04a2ca954899cc7df6fe4bf
 Size (tclreadline-2.1.0.tar.gz) = 160541 bytes
-SHA1 (patch-tclreadline.c) = d7f6990b99e62a048048afe3fba6e8bb790eff93
+SHA1 (patch-tclreadline.c) = ea2c49075b0e884e08945714a94f42eda5ee809e
diff -r 0a7b406b520d -r 74ebd002a224 devel/tclreadline/files/tclshrc
--- a/devel/tclreadline/files/tclshrc   Tue Jan 22 13:21:10 2019 +0000
+++ b/devel/tclreadline/files/tclshrc   Tue Jan 22 14:08:47 2019 +0000
@@ -1,4 +1,5 @@
 if {$tcl_interactive} {
+   package require tclreadline
    ::tclreadline::Loop
 }
 
diff -r 0a7b406b520d -r 74ebd002a224 devel/tclreadline/patches/patch-tclreadline.c
--- a/devel/tclreadline/patches/patch-tclreadline.c     Tue Jan 22 13:21:10 2019 +0000
+++ b/devel/tclreadline/patches/patch-tclreadline.c     Tue Jan 22 14:08:47 2019 +0000
@@ -1,4 +1,7 @@
-$NetBSD: patch-tclreadline.c,v 1.1 2015/06/08 13:39:35 joerg Exp $
+$NetBSD: patch-tclreadline.c,v 1.2 2019/01/22 14:08:48 he Exp $
+
+Some const'ness.
+Comment out two FREE() calls which now cause crashes...
 
 --- tclreadline.c.orig 2015-06-08 12:42:30.000000000 +0000
 +++ tclreadline.c
@@ -35,7 +38,20 @@
      char* result_c;
      int i, len = strlen(quotechars);
      Tcl_DString result;
-@@ -635,7 +635,7 @@ TclReadlineInitialize(Tcl_Interp* interp
+@@ -544,8 +544,10 @@ TclReadlineLineCompleteHandler(char* ptr
+        * tell the calling routines to terminate.
+        */
+       TclReadlineTerminate(LINE_COMPLETE);
+-      FREE(ptr);
+-      FREE(expansion);
++
++      /* These now cause crashes: */
++      /* FREE(ptr); */
++      /* FREE(expansion); */
+     }
+ }
+ 
+@@ -635,7 +637,7 @@ TclReadlineInitialize(Tcl_Interp* interp
       * directory. If this failes, this
       * is *not* an error.
       */
@@ -44,7 +60,7 @@
      if (read_history(historyfile)) {
        if (write_history(historyfile)) {
            Tcl_AppendResult (interp, "warning: `",
-@@ -657,7 +657,7 @@ blank_line(char* str)
+@@ -657,7 +659,7 @@ blank_line(char* str)
  }
  
  static char**
@@ -53,7 +69,7 @@
  {
      char** matches = (char**) NULL;
      int status;
-@@ -752,13 +752,13 @@ TclReadlineCompletion(char* text, int st
+@@ -752,13 +754,13 @@ TclReadlineCompletion(char* text, int st
  }
  
  static char*
@@ -69,7 +85,7 @@
  {
      static int len;
      static cmds_t *cmds = (cmds_t *) NULL, *new;
-@@ -881,6 +881,6 @@ TclReadlineParse(char** args, int maxarg
+@@ -881,6 +883,6 @@ TclReadlineParse(char** args, int maxarg
            buf++;
      }
  



Home | Main Index | Thread Index | Old Index