diff options
| author | Jack Nagel | 2014-04-13 12:16:07 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-13 15:07:46 -0500 |
| commit | 7cef7aeba491b4c13dcd5173d4244841d3321107 (patch) | |
| tree | 4cd1cf8dff73b7141c213b790eebe5be608b144e /Library/Formula | |
| parent | 080db80323e3c509a2e4abb12118be7548009e62 (diff) | |
| download | homebrew-7cef7aeba491b4c13dcd5173d4244841d3321107.tar.bz2 | |
readline 6.3.3
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/readline.rb | 236 |
1 files changed, 78 insertions, 158 deletions
diff --git a/Library/Formula/readline.rb b/Library/Formula/readline.rb index 7361f22bd..3ec4e849c 100644 --- a/Library/Formula/readline.rb +++ b/Library/Formula/readline.rb @@ -2,10 +2,10 @@ require 'formula' class Readline < Formula homepage 'http://tiswww.case.edu/php/chet/readline/rltop.html' - url 'http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz' - mirror 'http://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz' - sha256 '79a696070a058c233c72dd6ac697021cc64abd5ed51e59db867d66d196a89381' - version '6.2.4' + url 'http://ftpmirror.gnu.org/readline/readline-6.3.tar.gz' + mirror 'http://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz' + sha256 '56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43' + version '6.3.3' bottle do cellar :any @@ -26,177 +26,97 @@ EOS # there are, the more unreliable they get. Pulling this patch inline to # reduce bug reports. # Upstream patches can be found in: - # http://ftpmirror.gnu.org/readline/readline-6.2-patches - # - # We are carrying an additional patch to add Darwin 13 as a build target. - # Presumably when 10.9 comes out this patch will move upstream. - # https://github.com/Homebrew/homebrew/pull/21625 + # http://git.savannah.gnu.org/cgit/readline.git patch :DATA def install - # Always build universal, per https://github.com/Homebrew/homebrew/issues/issue/899 ENV.universal_binary - system "./configure", "--prefix=#{prefix}", - "--mandir=#{man}", - "--infodir=#{info}", - "--enable-multibyte" + system "./configure", "--prefix=#{prefix}", "--enable-multibyte" system "make install" + + # The 6.3 release notes say: + # When creating shared libraries on Mac OS X, the pathname written into the + # library (install_name) no longer includes the minor version number. + # Software will link against libreadline.6.dylib instead of libreadline.6.3.dylib. + # Therefore we create symlinks to avoid bumping the revisions on dependents. + # This should be removed at 6.4. + lib.install_symlink "libhistory.6.3.dylib" => "libhistory.6.2.dylib", + "libreadline.6.3.dylib" => "libreadline.6.2.dylib" end end __END__ -diff --git a/callback.c b/callback.c -index 4ee6361..7682cd0 100644 ---- a/callback.c -+++ b/callback.c -@@ -148,6 +148,9 @@ rl_callback_read_char () - eof = _rl_vi_domove_callback (_rl_vimvcxt); - /* Should handle everything, including cleanup, numeric arguments, - and turning off RL_STATE_VIMOTION */ -+ if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) -+ _rl_internal_char_cleanup (); -+ - return; - } +diff --git a/patchlevel b/patchlevel +index e0ba09d..fdf4740 100644 +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch + +-5 ++1 +diff --git a/readline.c b/readline.c +index 03eefa6..eb4eae3 100644 +--- a/readline.c ++++ b/readline.c +@@ -964,7 +964,7 @@ _rl_dispatch_subseq (key, map, got_subseq) + #if defined (VI_MODE) + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && + key != ANYOTHERKEY && +- rl_key_sequence_length == 1 && /* XXX */ ++ _rl_dispatching_keymap == vi_movement_keymap && + _rl_vi_textmod_command (key)) + _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); #endif -diff --git a/input.c b/input.c -index 7c74c99..b49af88 100644 ---- a/input.c -+++ b/input.c -@@ -409,7 +409,7 @@ rl_clear_pending_input () - int - rl_read_key () - { -- int c; -+ int c, r; +diff --git a/patchlevel b/patchlevel +index fdf4740..7cbda82 100644 +--- a/patchlevel ++++ b/patchlevel +@@ -1,3 +1,3 @@ + # Do not edit -- exists only for use by patch - rl_key_sequence_length++; +-1 ++2 +diff --git a/readline.c b/readline.c +index eb4eae3..abb29a0 100644 +--- a/readline.c ++++ b/readline.c +@@ -744,7 +744,8 @@ _rl_dispatch_callback (cxt) + r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ)); -@@ -429,14 +429,18 @@ rl_read_key () - { - while (rl_event_hook) - { -- if (rl_gather_tyi () < 0) /* XXX - EIO */ -+ if (rl_get_char (&c) != 0) -+ break; -+ -+ if ((r = rl_gather_tyi ()) < 0) /* XXX - EIO */ - { - rl_done = 1; - return ('\n'); - } -+ else if (r == 1) /* read something */ -+ continue; -+ - RL_CHECK_SIGNALS (); -- if (rl_get_char (&c) != 0) -- break; - if (rl_done) /* XXX - experimental */ - return ('\n'); - (*rl_event_hook) (); + RL_CHECK_SIGNALS (); +- if (r == 0) /* success! */ ++ /* We only treat values < 0 specially to simulate recursion. */ ++ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */ + { + _rl_keyseq_chain_dispose (); + RL_UNSETSTATE (RL_STATE_MULTIKEY); diff --git a/patchlevel b/patchlevel -index fdf4740..626a945 100644 +index 7cbda82..ce3e355 100644 --- a/patchlevel +++ b/patchlevel @@ -1,3 +1,3 @@ # Do not edit -- exists only for use by patch --1 -+4 -diff --git a/support/shobj-conf b/support/shobj-conf -index 5a63e80..c61dc78 100644 ---- a/support/shobj-conf -+++ b/support/shobj-conf -@@ -157,7 +157,7 @@ freebsd[4-9]*|freebsdelf*|dragonfly*) - ;; +-2 ++3 +diff --git a/util.c b/util.c +index fa3a667..58b55e2 100644 +--- a/util.c ++++ b/util.c +@@ -476,6 +476,7 @@ _rl_savestring (s) + return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s))); + } - # Darwin/MacOS X --darwin[89]*|darwin10*) -+darwin[89]*|darwin1[0123]*) - SHOBJ_STATUS=supported - SHLIB_STATUS=supported - -@@ -186,7 +186,7 @@ darwin*|macosx*) - SHLIB_LIBSUFF='dylib' ++#if defined (DEBUG) + #if defined (USE_VARARGS) + static FILE *_rl_tracefp; - case "${host_os}" in -- darwin[789]*|darwin10*) SHOBJ_LDFLAGS='' -+ darwin[789]*|darwin1[0123]*) SHOBJ_LDFLAGS='' - SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' - ;; - *) SHOBJ_LDFLAGS='-dynamic' -diff --git a/vi_mode.c b/vi_mode.c -index 41e1dbb..4408053 100644 ---- a/vi_mode.c -+++ b/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)) - { +@@ -538,6 +539,7 @@ _rl_settracefp (fp) + _rl_tracefp = fp; + } + #endif ++#endif /* DEBUG */ + + + #if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT) |
