pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/newlisp Fix readline detection and use.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/211b76427636
branches:  trunk
changeset: 652946:211b76427636
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Jun 10 14:59:43 2015 +0000

description:
Fix readline detection and use.

diffstat:

 lang/newlisp/distinfo                    |   6 ++--
 lang/newlisp/patches/patch-configure-alt |  24 ++++++++++++++++--
 lang/newlisp/patches/patch-newlisp.c     |  42 +++++++++++++++++++++++++------
 3 files changed, 58 insertions(+), 14 deletions(-)

diffs (120 lines):

diff -r 45426855b952 -r 211b76427636 lang/newlisp/distinfo
--- a/lang/newlisp/distinfo     Wed Jun 10 14:58:50 2015 +0000
+++ b/lang/newlisp/distinfo     Wed Jun 10 14:59:43 2015 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.9 2014/07/07 14:25:31 ryoon Exp $
+$NetBSD: distinfo,v 1.10 2015/06/10 14:59:43 joerg Exp $
 
 SHA1 (newlisp-10.6.0.tgz) = 8a3b23a72acfdbb00306f8c7419892b553b8026e
 RMD160 (newlisp-10.6.0.tgz) = 3f710834a68f1a43fe2e22b21a273dc8a77c35fe
 Size (newlisp-10.6.0.tgz) = 1670428 bytes
-SHA1 (patch-configure-alt) = f8669b8432fe460af18d0f2d3d1135debfd74654
+SHA1 (patch-configure-alt) = 6ac73164de672a048f7cde791e8958633fdae47e
 SHA1 (patch-guiserver_guiserver.lsp) = b1ef345be637cf3640c6181b592420aaae5d636f
-SHA1 (patch-newlisp.c) = 0ec358377dcae961d89fbbf00474e2feda3f53ae
+SHA1 (patch-newlisp.c) = 10b8d4778f4adc9987410ebca5c0c99c014fd4b0
diff -r 45426855b952 -r 211b76427636 lang/newlisp/patches/patch-configure-alt
--- a/lang/newlisp/patches/patch-configure-alt  Wed Jun 10 14:58:50 2015 +0000
+++ b/lang/newlisp/patches/patch-configure-alt  Wed Jun 10 14:59:43 2015 +0000
@@ -1,9 +1,9 @@
-$NetBSD: patch-configure-alt,v 1.1.1.1 2011/10/11 13:03:18 ryoon Exp $
+$NetBSD: patch-configure-alt,v 1.2 2015/06/10 14:59:43 joerg Exp $
 
 Use default CFLAGS and LDFLAGS.
 Add DragolFly support.
 
---- configure-alt.orig 2011-09-21 14:21:04.000000000 +0000
+--- configure-alt.orig 2014-04-08 14:02:27.000000000 +0000
 +++ configure-alt
 @@ -64,6 +64,7 @@ echo
  case `uname` in 
@@ -13,7 +13,25 @@
        FreeBSD) true ${os_type:=_BSD} ;;
        NetBSD) true ${os_type:=_BSD} ;;
        OpenBSD) true ${os_type:=_BSD} ;;
-@@ -410,8 +411,8 @@ fi
+@@ -180,7 +181,7 @@ cat > test-readline.c <<EOF
+ #include <readline/history.h>
+ 
+ char **
+-test_completion (char * text, int start, int end) {
++test_completion (const char * text, int start, int end) {
+       return NULL;
+ }
+ 
+@@ -188,7 +189,7 @@ int
+ main(int argc, char** argv) {
+ 
+       rl_readline_name = "test";
+-      rl_attempted_completion_function = (CPPFunction *)test_completion;
++      rl_attempted_completion_function = test_completion;
+       readline(NULL);
+       add_history("test");
+ 
+@@ -474,8 +475,8 @@ fi
  cat > makefile_build <<EOF
  # makefile for newLISP v. 10.1.x generated by the configure script (configure-alt)
  CC = ${CC:-${DEFAULT_CC}}
diff -r 45426855b952 -r 211b76427636 lang/newlisp/patches/patch-newlisp.c
--- a/lang/newlisp/patches/patch-newlisp.c      Wed Jun 10 14:58:50 2015 +0000
+++ b/lang/newlisp/patches/patch-newlisp.c      Wed Jun 10 14:59:43 2015 +0000
@@ -1,25 +1,51 @@
-$NetBSD: patch-newlisp.c,v 1.1 2013/07/18 12:03:52 joerg Exp $
+$NetBSD: patch-newlisp.c,v 1.2 2015/06/10 14:59:43 joerg Exp $
 
---- newlisp.c.orig     2013-07-18 09:58:06.000000000 +0000
+--- newlisp.c.orig     2014-04-08 14:02:27.000000000 +0000
 +++ newlisp.c
-@@ -886,7 +886,7 @@ if(errorReg && !isNil((CELL*)errorEvent-
+@@ -138,7 +138,7 @@ char preLoad[] = 
+     "(define (Class:Class) (cons (context) (args)))";
+ void printHelpText(void);
+ #ifdef READLINE
+-char ** newlisp_completion (char * text, int start, int end);
++char ** newlisp_completion (const char * text, int start, int end);
+ #endif
+ /* --------------------- globals -------------------------------------- */
+ 
+@@ -904,8 +904,8 @@ if(errorReg && !isNil((CELL*)errorEvent-
+ 
  #ifdef READLINE
  rl_readline_name = "newlisp";
- rl_attempted_completion_function = (CPPFunction *)newlisp_completion;
+-rl_attempted_completion_function = (CPPFunction *)newlisp_completion;
 -#if defined(LINUX) || defined(_BSD)
++rl_attempted_completion_function = newlisp_completion;
 +#if defined(LINUX)
  /* in Bash .inputrc put 'set blink-matching-paren on' */
  rl_set_paren_blink_timeout(300000); /* 300 ms */
  #endif
-@@ -965,11 +965,7 @@ while((name = primitive[list_index].name
+@@ -959,7 +959,7 @@ return 0;
+ #endif /* not LIBRARY */
+ 
+ #ifdef READLINE
+-char * command_generator(char * text, int state)
++char * command_generator(const char * text, int state)
+ {
+ static int list_index, len, clen;
+ char * name;
+@@ -984,15 +984,9 @@ while((name = primitive[list_index].name
  return ((char *)NULL);
  }
  
 -#ifdef _BSD
 -extern char **completion_matches PARAMS((char *, rl_compentry_func_t *));
 -#else
- char ** completion_matches(const char * text, CPFunction commands);
+-char ** completion_matches(const char * text, CPFunction commands);
 -#endif
+-
+-char ** newlisp_completion (char * text, int start, int end)
++char ** newlisp_completion (const char * text, int start, int end)
+ {
+-return(completion_matches(text, (CPFunction *)command_generator));
++return(completion_matches(text, command_generator));
+ }
+ #endif /* READLINE */
  
- char ** newlisp_completion (char * text, int start, int end)
- {



Home | Main Index | Thread Index | Old Index