summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchopps <chopps>2014-01-12 13:30:25 +0000
committerchopps <chopps>2014-01-12 13:30:25 +0000
commit0860a002842582ec387f645b63cd91b0790fdad8 (patch)
tree51373745e0504307ac609f98254cab877492e215
parentbee44023e11c98ed446370c497caaa8a93ce51d3 (diff)
downloadpkgsrc-0860a002842582ec387f645b63cd91b0790fdad8.tar.gz
pull in fix from readline git repo (will be in 6.3) for vi mode and the
'cc', 'dd', 'yy' commands. Also correctly build examples for testing.
-rw-r--r--devel/readline/Makefile9
-rw-r--r--devel/readline/distinfo4
-rw-r--r--devel/readline/patches/patch-examples_Makefile.in54
-rw-r--r--devel/readline/patches/patch-vi_mode.c79
4 files changed, 142 insertions, 4 deletions
diff --git a/devel/readline/Makefile b/devel/readline/Makefile
index 7f103f67482..3a5df1ed1a8 100644
--- a/devel/readline/Makefile
+++ b/devel/readline/Makefile
@@ -1,6 +1,9 @@
-# $NetBSD: Makefile,v 1.54 2013/07/26 13:13:12 ryoon Exp $
+# $NetBSD: Makefile,v 1.55 2014/01/12 13:30:25 chopps Exp $
-DISTNAME= readline-6.2
+READLINE_VERSION= 6.2
+
+DISTNAME= readline-${READLINE_VERSION}
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=readline/}
@@ -15,7 +18,7 @@ USE_LIBTOOL= yes
GNU_CONFIGURE= yes
INFO_FILES= yes
-BUILD_TARGET= all-libtool
+BUILD_TARGET= all-libtool examples
INSTALL_TARGET= install-libtool
.include "../../mk/termcap.buildlink3.mk"
diff --git a/devel/readline/distinfo b/devel/readline/distinfo
index 62fe1876070..3a36c13e451 100644
--- a/devel/readline/distinfo
+++ b/devel/readline/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2013/07/26 13:13:12 ryoon Exp $
+$NetBSD: distinfo,v 1.20 2014/01/12 13:30:25 chopps Exp $
SHA1 (readline-6.2.tar.gz) = a9761cd9c3da485eb354175fcc2fe35856bc43ac
RMD160 (readline-6.2.tar.gz) = 5e7fb934e7c83cd0cd37463f7865bc257c3ea743
@@ -6,3 +6,5 @@ Size (readline-6.2.tar.gz) = 2277926 bytes
SHA1 (patch-ae) = 04c9ee5f4c0e32002c1a24667c308552ae2f5058
SHA1 (patch-ag) = 3114e6959dfff3e2aae74c3df3ba4b0f692b79bb
SHA1 (patch-ah) = d812ea068415939beb42c72dd9bed8d210db57d1
+SHA1 (patch-examples_Makefile.in) = eead87e4ddf005e12ab762ecb6154c9ad17b25c5
+SHA1 (patch-vi_mode.c) = 7ee6f06ec260d1d1b92ef6c963eed7f88d6f8cb1
diff --git a/devel/readline/patches/patch-examples_Makefile.in b/devel/readline/patches/patch-examples_Makefile.in
new file mode 100644
index 00000000000..3d06470c860
--- /dev/null
+++ b/devel/readline/patches/patch-examples_Makefile.in
@@ -0,0 +1,54 @@
+$NetBSD: patch-examples_Makefile.in,v 1.1 2014/01/12 13:30:25 chopps Exp $
+
+Patch to link correctly against libtool built libs.
+
+--- examples/Makefile.in.orig 2010-12-28 20:55:32.000000000 +0000
++++ examples/Makefile.in
+@@ -58,8 +58,8 @@ LDFLAGS = -g -L.. @LDFLAGS@
+
+ PURIFY = @PURIFY@
+
+-READLINE_LIB = ../libreadline.a
+-HISTORY_LIB = ../libhistory.a
++READLINE_LIB = ../libreadline.la
++HISTORY_LIB = ../libhistory.la
+
+ TERMCAP_LIB = @TERMCAP_LIB@
+
+@@ -96,28 +96,28 @@ uninstall:
+ -rmdir $(DESTDIR)$(installdir)
+
+ rl$(EXEEXT): rl.o $(READLINE_LIB)
+- $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+ rlcat$(EXEEXT): rlcat.o $(READLINE_LIB)
+- $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+ rlevent$(EXEEXT): rlevent.o $(READLINE_LIB)
+- $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlevent.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+ fileman$(EXEEXT): fileman.o $(READLINE_LIB)
+- $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+ rltest$(EXEEXT): rltest.o $(READLINE_LIB)
+- $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+ rlptytest$(EXEEXT): rlptytest.o $(READLINE_LIB)
+- $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+ rlversion$(EXEEXT): rlversion.o $(READLINE_LIB)
+- $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+ histexamp$(EXEEXT): histexamp.o $(HISTORY_LIB)
+- $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
++ $(LIBTOOL) --mode=link $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o $(HISTORY_LIB) $(TERMCAP_LIB)
+
+ clean mostlyclean:
+ $(RM) $(OBJECTS)
diff --git a/devel/readline/patches/patch-vi_mode.c b/devel/readline/patches/patch-vi_mode.c
new file mode 100644
index 00000000000..ebe1bc29578
--- /dev/null
+++ b/devel/readline/patches/patch-vi_mode.c
@@ -0,0 +1,79 @@
+$NetBSD: patch-vi_mode.c,v 1.1 2014/01/12 13:30:25 chopps Exp $
+
+Pull in fix for 'cc', 'dd', commands 'yy' from readline git repository (pre-6.3
+release). Prior to this 'dd', et al. simply moved to position 0 but did not cut
+the text from the line.
+
+--- vi_mode.c.orig 2010-11-21 00:51:39.000000000 +0000
++++ vi_mode.c
+@@ -1114,7 +1114,7 @@ rl_domove_read_callback (m)
+ rl_beg_of_line (1, c);
+ _rl_vi_last_motion = c;
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+- return (0);
++ return (vidomove_dispatch (m));
+ }
+ #if defined (READLINE_CALLBACKS)
+ /* XXX - these need to handle rl_universal_argument bindings */
+@@ -1234,11 +1234,19 @@ rl_vi_delete_to (count, key)
+ _rl_vimvcxt->motion = '$';
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+- else if (vi_redoing)
++ else if (vi_redoing && _rl_vi_last_motion != 'd') /* `dd' is special */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing) /* handle redoing `dd' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+@@ -1316,11 +1324,19 @@ rl_vi_change_to (count, key)
+ _rl_vimvcxt->motion = '$';
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
+- else if (vi_redoing)
++ else if (vi_redoing && _rl_vi_last_motion != 'c') /* `cc' is special */
+ {
+ _rl_vimvcxt->motion = _rl_vi_last_motion;
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing) /* handle redoing `cc' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+@@ -1377,6 +1393,19 @@ rl_vi_yank_to (count, key)
+ _rl_vimvcxt->motion = '$';
+ r = rl_domove_motion_callback (_rl_vimvcxt);
+ }
++ else if (vi_redoing && _rl_vi_last_motion != 'y') /* `yy' is special */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ r = rl_domove_motion_callback (_rl_vimvcxt);
++ }
++ else if (vi_redoing) /* handle redoing `yy' here */
++ {
++ _rl_vimvcxt->motion = _rl_vi_last_motion;
++ rl_mark = rl_end;
++ rl_beg_of_line (1, key);
++ RL_UNSETSTATE (RL_STATE_VIMOTION);
++ r = vidomove_dispatch (_rl_vimvcxt);
++ }
+ #if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {