diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/readline')
-rw-r--r-- | var/spack/repos/builtin/packages/readline/package.py | 38 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/readline/readline-6.3-upstream_fixes-1.patch | 90 |
2 files changed, 112 insertions, 16 deletions
diff --git a/var/spack/repos/builtin/packages/readline/package.py b/var/spack/repos/builtin/packages/readline/package.py index abb6ba04ce..ccdea0aa0f 100644 --- a/var/spack/repos/builtin/packages/readline/package.py +++ b/var/spack/repos/builtin/packages/readline/package.py @@ -1,13 +1,13 @@ ############################################################################## -# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. +# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-647188 # -# For details, see https://github.com/llnl/spack -# Please also see the LICENSE file for our notice and the LGPL. +# For details, see https://github.com/spack/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (as @@ -25,22 +25,28 @@ from spack import * -class Readline(Package): +class Readline(AutotoolsPackage): """The GNU Readline library provides a set of functions for use by - applications that allow users to edit command lines as they - are typed in. Both Emacs and vi editing modes are - available. The Readline library includes additional functions - to maintain a list of previously-entered command lines, to - recall and perhaps reedit those lines, and perform csh-like - history expansion on previous commands.""" + applications that allow users to edit command lines as they are typed in. + Both Emacs and vi editing modes are available. The Readline library + includes additional functions to maintain a list of previously-entered + command lines, to recall and perhaps reedit those lines, and perform + csh-like history expansion on previous commands.""" + homepage = "http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html" - url = "ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz" + url = "https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz" + version('7.0', '205b03a87fc83dab653b628c59b9fc91') version('6.3', '33c8fb279e981274f485fd91da77e94a') - depends_on("ncurses") + depends_on('ncurses') + # from url=http://www.linuxfromscratch.org/patches/downloads/readline/readline-6.3-upstream_fixes-1.patch + # this fixes a bug that could lead to seg faults in ipython + patch('readline-6.3-upstream_fixes-1.patch', when='@6.3') + + def build(self, spec, prefix): + options = [ + 'SHLIB_LIBS=-L{0} -lncursesw'.format(spec['ncurses'].prefix.lib) + ] - def install(self, spec, prefix): - configure("--prefix=%s" % prefix) - make("SHLIB_LIBS=-lncurses") - make("install") + make(*options) diff --git a/var/spack/repos/builtin/packages/readline/readline-6.3-upstream_fixes-1.patch b/var/spack/repos/builtin/packages/readline/readline-6.3-upstream_fixes-1.patch new file mode 100644 index 0000000000..a1ee4d6f38 --- /dev/null +++ b/var/spack/repos/builtin/packages/readline/readline-6.3-upstream_fixes-1.patch @@ -0,0 +1,90 @@ +Submitted By: Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org> +Date: 2014-04-18 +Initial Package Version: 6.3 +Upstream Status: Already in upstream patch repo +Origin: Upstream +Description: This patch contains upstream patch numbers 001 through 005. + +diff -Naur readline-6.3/display.c readline-6.3.patched/display.c +--- readline-6.3/display.c 2013-12-27 12:10:56.000000000 -0600 ++++ readline-6.3.patched/display.c 2014-04-18 15:51:38.249945858 -0500 +@@ -2677,7 +2677,8 @@ + { + if (_rl_echoing_p) + { +- _rl_move_vert (_rl_vis_botlin); ++ if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */ ++ _rl_move_vert (_rl_vis_botlin); + _rl_vis_botlin = 0; + fflush (rl_outstream); + rl_restart_output (1, 0); +diff -Naur readline-6.3/readline.c readline-6.3.patched/readline.c +--- readline-6.3/readline.c 2013-10-28 13:58:06.000000000 -0500 ++++ readline-6.3.patched/readline.c 2014-04-18 15:51:38.247945883 -0500 +@@ -744,7 +744,8 @@ + r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ)); + + 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); +@@ -964,7 +965,7 @@ + #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 -Naur readline-6.3/rltypedefs.h readline-6.3.patched/rltypedefs.h +--- readline-6.3/rltypedefs.h 2011-03-26 13:53:31.000000000 -0500 ++++ readline-6.3.patched/rltypedefs.h 2014-04-18 15:51:38.250945845 -0500 +@@ -26,6 +26,25 @@ + extern "C" { + #endif + ++/* Old-style, attempt to mark as deprecated in some way people will notice. */ ++ ++#if !defined (_FUNCTION_DEF) ++# define _FUNCTION_DEF ++ ++#if defined(__GNUC__) || defined(__clang__) ++typedef int Function () __attribute__ ((deprecated)); ++typedef void VFunction () __attribute__ ((deprecated)); ++typedef char *CPFunction () __attribute__ ((deprecated)); ++typedef char **CPPFunction () __attribute__ ((deprecated)); ++#else ++typedef int Function (); ++typedef void VFunction (); ++typedef char *CPFunction (); ++typedef char **CPPFunction (); ++#endif ++ ++#endif /* _FUNCTION_DEF */ ++ + /* New style. */ + + #if !defined (_RL_FUNCTION_TYPEDEF) +diff -Naur readline-6.3/util.c readline-6.3.patched/util.c +--- readline-6.3/util.c 2013-09-02 12:36:12.000000000 -0500 ++++ readline-6.3.patched/util.c 2014-04-18 15:51:38.248945871 -0500 +@@ -476,6 +476,7 @@ + return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s))); + } + ++#if defined (DEBUG) + #if defined (USE_VARARGS) + static FILE *_rl_tracefp; + +@@ -538,6 +539,7 @@ + _rl_tracefp = fp; + } + #endif ++#endif /* DEBUG */ + + + #if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT) |