summaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/configure-tinfo.diff202
-rw-r--r--debian/patches/examples-makefile-multiarch.diff30
-rw-r--r--debian/patches/fix-wformat-security.diff16
-rw-r--r--debian/patches/readline70-001.diff50
-rw-r--r--debian/patches/readline70-002.diff81
-rw-r--r--debian/patches/readline70-003.diff38
-rw-r--r--debian/patches/rl-attribute.diff36
-rw-r--r--debian/patches/rl-header.diff28
-rw-r--r--debian/patches/rl-no-cross-check.diff17
-rw-r--r--debian/patches/rl-no-rpath.diff17
-rw-r--r--debian/patches/rlfe-history.diff52
-rw-r--r--debian/patches/rlfe-kfreebsd.diff13
-rw-r--r--debian/patches/rlfe-signal-rvt.diff13
-rw-r--r--debian/patches/rlfe-tinfo.diff448
-rw-r--r--debian/patches/series15
15 files changed, 1056 insertions, 0 deletions
diff --git a/debian/patches/configure-tinfo.diff b/debian/patches/configure-tinfo.diff
new file mode 100644
index 0000000..8b59ad7
--- /dev/null
+++ b/debian/patches/configure-tinfo.diff
@@ -0,0 +1,202 @@
+Index: b/aclocal.m4
+===================================================================
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -958,8 +958,8 @@ _bash_needmsg=
+ fi
+ AC_CACHE_VAL(bash_cv_termcap_lib,
+ [AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
+- [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
+- [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
++ [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
++ [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
+ [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
+ [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
+ bash_cv_termcap_lib=gnutermcap)])])])])])
+Index: b/configure
+===================================================================
+--- a/configure
++++ b/configure
+@@ -698,6 +698,7 @@ infodir
+ docdir
+ oldincludedir
+ includedir
++runstatedir
+ localstatedir
+ sharedstatedir
+ sysconfdir
+@@ -773,6 +774,7 @@ datadir='${datarootdir}'
+ sysconfdir='${prefix}/etc'
+ sharedstatedir='${prefix}/com'
+ localstatedir='${prefix}/var'
++runstatedir='${localstatedir}/run'
+ includedir='${prefix}/include'
+ oldincludedir='/usr/include'
+ docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+@@ -1025,6 +1027,15 @@ do
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
++ -runstatedir | --runstatedir | --runstatedi | --runstated \
++ | --runstate | --runstat | --runsta | --runst | --runs \
++ | --run | --ru | --r)
++ ac_prev=runstatedir ;;
++ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
++ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
++ | --run=* | --ru=* | --r=*)
++ runstatedir=$ac_optarg ;;
++
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+@@ -1162,7 +1173,7 @@ fi
+ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+- libdir localedir mandir
++ libdir localedir mandir runstatedir
+ do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+@@ -1315,6 +1326,7 @@ Fine tuning of the installation director
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
++ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+@@ -2951,7 +2963,7 @@ ac_clean_files="$ac_clean_files conftest
+ # the compiler is broken, or we cross compile.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+ $as_echo_n "checking whether we are cross compiling... " >&6; }
+-if false && test "$cross_compiling" != yes; then
++if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+ case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+@@ -4835,7 +4847,7 @@ else
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+@@ -4881,7 +4893,7 @@ else
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+@@ -4905,7 +4917,7 @@ rm -f core conftest.err conftest.$ac_obj
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+@@ -4950,7 +4962,7 @@ else
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+@@ -4974,7 +4986,7 @@ rm -f core conftest.err conftest.$ac_obj
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
++#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+@@ -5905,13 +5917,13 @@ else
+ if test "x$ac_cv_func_tgetent" = xyes; then :
+ bash_cv_termcap_lib=libc
+ else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
+-$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
+-if ${ac_cv_lib_termcap_tgetent+:} false; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
++$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
++if ${ac_cv_lib_tinfo_tgetent+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ltermcap $LIBS"
++LIBS="-ltinfo $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -5931,26 +5943,26 @@ return tgetent ();
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_termcap_tgetent=yes
++ ac_cv_lib_tinfo_tgetent=yes
+ else
+- ac_cv_lib_termcap_tgetent=no
++ ac_cv_lib_tinfo_tgetent=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
+-$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
+-if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
+- bash_cv_termcap_lib=libtermcap
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
++$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
++if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
++ bash_cv_termcap_lib=libtinfo
+ else
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5
+-$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
+-if ${ac_cv_lib_tinfo_tgetent+:} false; then :
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5
++$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
++if ${ac_cv_lib_termcap_tgetent+:} false; then :
+ $as_echo_n "(cached) " >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+-LIBS="-ltinfo $LIBS"
++LIBS="-ltermcap $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -5970,18 +5982,18 @@ return tgetent ();
+ }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+- ac_cv_lib_tinfo_tgetent=yes
++ ac_cv_lib_termcap_tgetent=yes
+ else
+- ac_cv_lib_tinfo_tgetent=no
++ ac_cv_lib_termcap_tgetent=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5
+-$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
+-if test "x$ac_cv_lib_tinfo_tgetent" = xyes; then :
+- bash_cv_termcap_lib=libtinfo
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5
++$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
++if test "x$ac_cv_lib_termcap_tgetent" = xyes; then :
++ bash_cv_termcap_lib=libtermcap
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5
+ $as_echo_n "checking for tgetent in -lcurses... " >&6; }
diff --git a/debian/patches/examples-makefile-multiarch.diff b/debian/patches/examples-makefile-multiarch.diff
new file mode 100644
index 0000000..d2c11e3
--- /dev/null
+++ b/debian/patches/examples-makefile-multiarch.diff
@@ -0,0 +1,30 @@
+From e5a01df4f075ddb96c393748d37a16498aa37c0a Mon Sep 17 00:00:00 2001
+From: Shawn Landden <shawnlandden@gmail.com>
+Date: Wed, 18 Jul 2012 18:21:14 -0700
+Subject: [PATCH] fix Makefile -- allows build of examples, multi-arch: same
+
+---
+ examples/Makefile.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+Index: b/examples/Makefile.in
+===================================================================
+--- a/examples/Makefile.in
++++ b/examples/Makefile.in
+@@ -27,12 +27,12 @@
+ datarootdir = @datarootdir@
+
+ bindir = @bindir@
+-srcdir = @srcdir@
++srcdir = /usr/share/doc/libreadline6/examples
+ datadir = @datadir@
+-VPATH = @srcdir@
+-top_srcdir = @top_srcdir@
++VPATH = .:/usr/share/doc/libreadline6/examples
++top_srcdir = /usr/include/readline
+ #BUILD_DIR = .
+-BUILD_DIR = @BUILD_DIR@
++BUILD_DIR = /usr/src/readline6/build
+ installdir = $(datadir)/readline
+
+ INSTALL = @INSTALL@
diff --git a/debian/patches/fix-wformat-security.diff b/debian/patches/fix-wformat-security.diff
new file mode 100644
index 0000000..84edbc8
--- /dev/null
+++ b/debian/patches/fix-wformat-security.diff
@@ -0,0 +1,16 @@
+Description: Fix compiling with -Werror=format-security.
+ Prevents format string attacks.
+Author: Simon Ruderich <simon@ruderich.org>
+Last-Update: 2012-09-15
+
+--- readline6-6.2.orig/examples/rlfe/rlfe.c
++++ readline6-6.2/examples/rlfe/rlfe.c
+@@ -273,7 +273,7 @@ static void maybe_emphasize_input (int o
+ if (on == current_emphasize_input
+ || (on && ! do_emphasize_input))
+ return;
+- fprintf (rl_outstream, on ? start_input_mode : end_input_mode);
++ fprintf (rl_outstream, "%s", on ? start_input_mode : end_input_mode);
+ fflush (rl_outstream);
+ current_emphasize_input = on;
+ }
diff --git a/debian/patches/readline70-001.diff b/debian/patches/readline70-001.diff
new file mode 100644
index 0000000..f356d22
--- /dev/null
+++ b/debian/patches/readline70-001.diff
@@ -0,0 +1,50 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 7.0
+Patch-ID: readline70-001
+
+Bug-Reported-by: Sean Zha <freeman_cha@hotmail.com>
+Bug-Reference-ID: <BN3PR01MB13657D9303EB94BF6E54216E8CCA0@BN3PR01MB1365.prod.exchangelabs.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html
+
+Bug-Description:
+
+Readline-7.0 changed the way the history list is initially allocated to reduce
+the number of reallocations and copies. Users who set the readline
+history-size variable to a very large number to essentially unlimit the size
+of the history list will get memory allocation errors
+
+Index: b/history.c
+===================================================================
+--- a/history.c
++++ b/history.c
+@@ -57,6 +57,8 @@ extern int errno;
+ /* How big to make the_history when we first allocate it. */
+ #define DEFAULT_HISTORY_INITIAL_SIZE 502
+
++#define MAX_HISTORY_INITIAL_SIZE 8192
++
+ /* The number of slots to increase the_history by. */
+ #define DEFAULT_HISTORY_GROW_SIZE 50
+
+@@ -307,7 +309,9 @@ add_history (string)
+ if (history_size == 0)
+ {
+ if (history_stifled && history_max_entries > 0)
+- history_size = history_max_entries + 2;
++ history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
++ ? MAX_HISTORY_INITIAL_SIZE
++ : history_max_entries + 2;
+ else
+ history_size = DEFAULT_HISTORY_INITIAL_SIZE;
+ the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
+Index: b/patchlevel
+===================================================================
+--- a/patchlevel
++++ b/patchlevel
+@@ -1,3 +1,3 @@
+ # Do not edit -- exists only for use by patch
+
+-0
++1
diff --git a/debian/patches/readline70-002.diff b/debian/patches/readline70-002.diff
new file mode 100644
index 0000000..df853ca
--- /dev/null
+++ b/debian/patches/readline70-002.diff
@@ -0,0 +1,81 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 7.0
+Patch-ID: readline70-002
+
+Bug-Reported-by: Hong Cho <hong.cho@citrix.com>
+Bug-Reference-ID: <c30b5fe62b2543af8297e47ca487c29c@SJCPEX02CL02.citrite.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2016-12/msg00002.html
+
+Bug-Description:
+
+There is a race condition in add_history() that can be triggered by a fatal
+signal arriving between the time the history length is updated and the time
+the history list update is completed. A later attempt to reference an
+invalid history entry can cause a crash.
+
+Index: b/history.c
+===================================================================
+--- a/history.c
++++ b/history.c
+@@ -279,6 +279,7 @@ add_history (string)
+ const char *string;
+ {
+ HIST_ENTRY *temp;
++ int new_length;
+
+ if (history_stifled && (history_length == history_max_entries))
+ {
+@@ -295,13 +296,9 @@ add_history (string)
+
+ /* Copy the rest of the entries, moving down one slot. Copy includes
+ trailing NULL. */
+-#if 0
+- for (i = 0; i < history_length; i++)
+- the_history[i] = the_history[i + 1];
+-#else
+ memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
+-#endif
+
++ new_length = history_length;
+ history_base++;
+ }
+ else
+@@ -315,7 +312,7 @@ add_history (string)
+ else
+ history_size = DEFAULT_HISTORY_INITIAL_SIZE;
+ the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
+- history_length = 1;
++ new_length = 1;
+ }
+ else
+ {
+@@ -325,14 +322,15 @@ add_history (string)
+ the_history = (HIST_ENTRY **)
+ xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
+ }
+- history_length++;
++ new_length = history_length + 1;
+ }
+ }
+
+ temp = alloc_history_entry ((char *)string, hist_inittime ());
+
+- the_history[history_length] = (HIST_ENTRY *)NULL;
+- the_history[history_length - 1] = temp;
++ the_history[new_length] = (HIST_ENTRY *)NULL;
++ the_history[new_length - 1] = temp;
++ history_length = new_length;
+ }
+
+ /* Change the time stamp of the most recent history entry to STRING. */
+Index: b/patchlevel
+===================================================================
+--- a/patchlevel
++++ b/patchlevel
+@@ -1,3 +1,3 @@
+ # Do not edit -- exists only for use by patch
+
+-1
++2
diff --git a/debian/patches/readline70-003.diff b/debian/patches/readline70-003.diff
new file mode 100644
index 0000000..44c1539
--- /dev/null
+++ b/debian/patches/readline70-003.diff
@@ -0,0 +1,38 @@
+ READLINE PATCH REPORT
+ =====================
+
+Readline-Release: 7.0
+Patch-ID: readline70-003
+
+Bug-Reported-by: Frédéric Brière <fbriere@fbriere.net>
+Bug-Reference-ID: <20170120180724.7ydq7fb2hsp366dj@fabul.fbriere.net>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2017-01/msg00002.html
+
+Bug-Description:
+
+Readline-7.0 uses pselect(2) to allow readline to handle signals that do not
+interrupt read(2), such as SIGALRM, before reading another character. The
+signal mask used in the pselect call did not take into account signals the
+calling application blocked before calling readline().
+
+Index: b/input.c
+===================================================================
+--- a/input.c
++++ b/input.c
+@@ -513,6 +513,7 @@ rl_getc (stream)
+ result = 0;
+ #if defined (HAVE_PSELECT)
+ sigemptyset (&empty_set);
++ sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &empty_set);
+ FD_ZERO (&readfds);
+ FD_SET (fileno (stream), &readfds);
+ result = pselect (fileno (stream) + 1, &readfds, NULL, NULL, NULL, &empty_set);
+Index: b/patchlevel
+===================================================================
+--- a/patchlevel
++++ b/patchlevel
+@@ -1,3 +1,3 @@
+ # Do not edit -- exists only for use by patch
+
+-2
++3
diff --git a/debian/patches/rl-attribute.diff b/debian/patches/rl-attribute.diff
new file mode 100644
index 0000000..c566065
--- /dev/null
+++ b/debian/patches/rl-attribute.diff
@@ -0,0 +1,36 @@
+rl-attribute.dpatch by <doko@debian.org>
+
+Do not redefine __attribute__, define macro __rl_attribute__
+
+Index: b/readline.h
+===================================================================
+--- a/readline.h
++++ b/readline.h
+@@ -385,7 +385,7 @@ extern int rl_reset_line_state PARAMS((v
+ extern int rl_crlf PARAMS((void));
+
+ #if defined (USE_VARARGS) && defined (PREFER_STDARG)
+-extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
++extern int rl_message (const char *, ...) __rl_attribute__((__format__ (printf, 1, 2)));
+ #else
+ extern int rl_message ();
+ #endif
+Index: b/rlstdc.h
+===================================================================
+--- a/rlstdc.h
++++ b/rlstdc.h
+@@ -36,10 +36,10 @@
+ # endif
+ #endif
+
+-#ifndef __attribute__
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+-# define __attribute__(x)
+-# endif
++#if defined(__GNUC__) && __GNUC__ >= 2
++# define __rl_attribute__(x) __attribute__(x)
++#else
++# define __rl_attribute__(x)
+ #endif
+
+ /* Moved from config.h.in because readline.h:rl_message depends on these
diff --git a/debian/patches/rl-header.diff b/debian/patches/rl-header.diff
new file mode 100644
index 0000000..72938e3
--- /dev/null
+++ b/debian/patches/rl-header.diff
@@ -0,0 +1,28 @@
+rl-header.dpatch by <doko@debian.org>
+
+Include stdio.h in readline.h and history.h
+
+Index: b/history.h
+===================================================================
+--- a/history.h 2010-04-10 12:05:07.792336522 +0000
++++ b/history.h 2010-04-10 12:12:39.462336737 +0000
+@@ -32,6 +32,7 @@
+ # include "rlstdc.h"
+ # include "rltypedefs.h"
+ #else
++# include <stdio.h>
+ # include <readline/rlstdc.h>
+ # include <readline/rltypedefs.h>
+ #endif
+Index: b/readline.h
+===================================================================
+--- a/readline.h 2010-04-10 12:12:39.302337290 +0000
++++ b/readline.h 2010-04-10 12:12:39.462336737 +0000
+@@ -32,6 +32,7 @@
+ # include "keymaps.h"
+ # include "tilde.h"
+ #else
++# include <stdio.h>
+ # include <readline/rlstdc.h>
+ # include <readline/rltypedefs.h>
+ # include <readline/keymaps.h>
diff --git a/debian/patches/rl-no-cross-check.diff b/debian/patches/rl-no-cross-check.diff
new file mode 100644
index 0000000..e6fde4c
--- /dev/null
+++ b/debian/patches/rl-no-cross-check.diff
@@ -0,0 +1,17 @@
+rl-no-cross-check.dpatch by <doko@debian.org>
+
+configure: Don't check for cross compilation
+
+Index: b/configure
+===================================================================
+--- a/configure
++++ b/configure
+@@ -2951,7 +2951,7 @@ ac_clean_files="$ac_clean_files conftest
+ # the compiler is broken, or we cross compile.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+ $as_echo_n "checking whether we are cross compiling... " >&6; }
+-if test "$cross_compiling" != yes; then
++if false && test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+ case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
diff --git a/debian/patches/rl-no-rpath.diff b/debian/patches/rl-no-rpath.diff
new file mode 100644
index 0000000..f47e08e
--- /dev/null
+++ b/debian/patches/rl-no-rpath.diff
@@ -0,0 +1,17 @@
+rl-no-rpath.dpatch by <doko@debian.org>
+
+Don't set a runtime path for linking the shared libraries
+
+Index: b/support/shobj-conf
+===================================================================
+--- a/support/shobj-conf
++++ b/support/shobj-conf
+@@ -128,7 +128,7 @@
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
++ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
diff --git a/debian/patches/rlfe-history.diff b/debian/patches/rlfe-history.diff
new file mode 100644
index 0000000..f83469f
--- /dev/null
+++ b/debian/patches/rlfe-history.diff
@@ -0,0 +1,52 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## rlfe-history.dpatch by <andrew@pimlott.net>
+##
+## DP: Fix rlfe, always writing a history file.
+
+@DPATCH@
+Index: b/examples/rlfe/rlfe.c
+===================================================================
+--- a/examples/rlfe/rlfe.c
++++ b/examples/rlfe/rlfe.c
+@@ -154,21 +154,27 @@
+ static pid_t child = -1;
+
+ static void
+-sig_child (int signo)
++finish_up()
+ {
+- int status;
+- wait (&status);
+ if (hist_file != 0)
+ {
+ write_history (hist_file);
+ if (hist_size)
+ history_truncate_file (hist_file, hist_size);
+ }
+- DPRINT0 ("(Child process died.)\n");
+ tcsetattr(STDIN_FILENO, TCSANOW, &orig_term);
+ exit (0);
+ }
+
++static void
++sig_child (int signo)
++{
++ int status;
++ wait (&status);
++ DPRINT0 ("(Child process died.)\n");
++ finish_up();
++}
++
+ volatile int propagate_sigwinch = 0;
+
+ /* sigwinch_handler
+@@ -710,8 +716,7 @@
+ if (count <= 0)
+ {
+ DPRINT0 ("(Connection closed by foreign host.)\n");
+- tcsetattr(STDIN_FILENO, TCSANOW, &orig_term);
+- exit (0);
++ finish_up();
+ }
+ old_count = buf_count;
+
diff --git a/debian/patches/rlfe-kfreebsd.diff b/debian/patches/rlfe-kfreebsd.diff
new file mode 100644
index 0000000..240d85a
--- /dev/null
+++ b/debian/patches/rlfe-kfreebsd.diff
@@ -0,0 +1,13 @@
+Index: readline6-6.1/examples/rlfe/pty.c
+===================================================================
+--- readline6-6.1.orig/examples/rlfe/pty.c 2010-05-30 18:30:54.000000000 +0000
++++ readline6-6.1/examples/rlfe/pty.c 2010-05-30 18:30:58.000000000 +0000
+@@ -133,7 +133,7 @@
+ {
+ if (f < 0)
+ return;
+-#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
++#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX) && !defined(__FreeBSD_kernel__)
+ if (ioctl(f, I_PUSH, "ptem"))
+ Panic(errno, "InitPTY: cannot I_PUSH ptem");
+ if (ioctl(f, I_PUSH, "ldterm"))
diff --git a/debian/patches/rlfe-signal-rvt.diff b/debian/patches/rlfe-signal-rvt.diff
new file mode 100644
index 0000000..4d841a4
--- /dev/null
+++ b/debian/patches/rlfe-signal-rvt.diff
@@ -0,0 +1,13 @@
+Index: b/examples/rlfe/pty.c
+===================================================================
+--- a/examples/rlfe/pty.c
++++ b/examples/rlfe/pty.c
+@@ -254,7 +254,7 @@
+ #if defined(HAVE_GETPT) && defined(linux)
+ int getpt __P((void));
+ #endif
+- sigret_t (*sigcld)__P(SIGPROTOARG);
++ sighandler_t sigcld;
+
+ strcpy(PtyName, "/dev/ptmx");
+ #if defined(HAVE_GETPT) && defined(linux)
diff --git a/debian/patches/rlfe-tinfo.diff b/debian/patches/rlfe-tinfo.diff
new file mode 100644
index 0000000..48304f4
--- /dev/null
+++ b/debian/patches/rlfe-tinfo.diff
@@ -0,0 +1,448 @@
+# DP: Link rlfe with libtinfo.
+
+Index: b/examples/rlfe/configure.in
+===================================================================
+--- a/examples/rlfe/configure.in
++++ b/examples/rlfe/configure.in
+@@ -211,8 +211,8 @@
+ tgetent((char *)0, (char *)0);
+ #endif
+ ],,
+-LIBS="-ltermcap $olibs"
+-AC_CHECKING(libtermcap)
++LIBS="-ltinfo $olibs"
++AC_CHECKING(libtinfo)
+ AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+ LIBS="-ltermlib $olibs"
+ AC_CHECKING(libtermlib)
+Index: b/examples/rlfe/configure
+===================================================================
+--- a/examples/rlfe/configure
++++ b/examples/rlfe/configure
+@@ -1,11 +1,9 @@
+ #! /bin/sh
+ # Guess values for system-dependent variables and create Makefiles.
+-# Generated by GNU Autoconf 2.68.
++# Generated by GNU Autoconf 2.69.
+ #
+ #
+-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+-# Foundation, Inc.
++# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+ #
+ #
+ # This configure script is free software; the Free Software Foundation
+@@ -134,6 +132,31 @@
+ # CDPATH.
+ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
++# Use a proper internal environment variable to ensure we don't fall
++ # into an infinite loop, continuously re-executing ourselves.
++ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
++ _as_can_reexec=no; export _as_can_reexec;
++ # We cannot yet assume a decent shell, so we have to provide a
++# neutralization value for shells without unset; and this also
++# works around shells that cannot unset nonexistent variables.
++# Preserve -v and -x to the replacement shell.
++BASH_ENV=/dev/null
++ENV=/dev/null
++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++case $- in # ((((
++ *v*x* | *x*v* ) as_opts=-vx ;;
++ *v* ) as_opts=-v ;;
++ *x* ) as_opts=-x ;;
++ * ) as_opts= ;;
++esac
++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
++# Admittedly, this is quite paranoid, since all the known shells bail
++# out after a failed `exec'.
++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
++as_fn_exit 255
++ fi
++ # We don't want this to propagate to other subprocesses.
++ { _as_can_reexec=; unset _as_can_reexec;}
+ if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+@@ -167,7 +190,8 @@
+ else
+ exitcode=1; echo positional parameters were not saved.
+ fi
+-test x\$exitcode = x0 || exit 1"
++test x\$exitcode = x0 || exit 1
++test -x / || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+@@ -212,21 +236,25 @@
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+- # We cannot yet assume a decent shell, so we have to provide a
+- # neutralization value for shells without unset; and this also
+- # works around shells that cannot unset nonexistent variables.
+- # Preserve -v and -x to the replacement shell.
+- BASH_ENV=/dev/null
+- ENV=/dev/null
+- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+- export CONFIG_SHELL
+- case $- in # ((((
+- *v*x* | *x*v* ) as_opts=-vx ;;
+- *v* ) as_opts=-v ;;
+- *x* ) as_opts=-x ;;
+- * ) as_opts= ;;
+- esac
+- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
++ export CONFIG_SHELL
++ # We cannot yet assume a decent shell, so we have to provide a
++# neutralization value for shells without unset; and this also
++# works around shells that cannot unset nonexistent variables.
++# Preserve -v and -x to the replacement shell.
++BASH_ENV=/dev/null
++ENV=/dev/null
++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
++case $- in # ((((
++ *v*x* | *x*v* ) as_opts=-vx ;;
++ *v* ) as_opts=-v ;;
++ *x* ) as_opts=-x ;;
++ * ) as_opts= ;;
++esac
++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
++# Admittedly, this is quite paranoid, since all the known shells bail
++# out after a failed `exec'.
++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
++exit 255
+ fi
+
+ if test x$as_have_required = xno; then :
+@@ -328,6 +356,14 @@
+
+
+ } # as_fn_mkdir_p
++
++# as_fn_executable_p FILE
++# -----------------------
++# Test if FILE is an executable regular file.
++as_fn_executable_p ()
++{
++ test -f "$1" && test -x "$1"
++} # as_fn_executable_p
+ # as_fn_append VAR VALUE
+ # ----------------------
+ # Append the text in VALUE to the end of the definition contained in VAR. Take
+@@ -449,6 +485,10 @@
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
++ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
++ # already done that, so ensure we don't try to do so again and fall
++ # in an infinite loop. This has already happened in practice.
++ _as_can_reexec=no; export _as_can_reexec
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+@@ -483,16 +523,16 @@
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+- # In both cases, we have to default to `cp -p'.
++ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+- as_ln_s='cp -p'
++ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+- as_ln_s='cp -p'
++ as_ln_s='cp -pR'
+ fi
+ else
+- as_ln_s='cp -p'
++ as_ln_s='cp -pR'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+@@ -504,28 +544,8 @@
+ as_mkdir_p=false
+ fi
+
+-if test -x / >/dev/null 2>&1; then
+- as_test_x='test -x'
+-else
+- if ls -dL / >/dev/null 2>&1; then
+- as_ls_L_option=L
+- else
+- as_ls_L_option=
+- fi
+- as_test_x='
+- eval sh -c '\''
+- if test -d "$1"; then
+- test -d "$1/.";
+- else
+- case $1 in #(
+- -*)set "./$1";;
+- esac;
+- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+- ???[sx]*):;;*)false;;esac;fi
+- '\'' sh
+- '
+-fi
+-as_executable_p=$as_test_x
++as_test_x='test -x'
++as_executable_p=as_fn_executable_p
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -1123,8 +1143,6 @@
+ if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+- If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+@@ -1356,9 +1374,9 @@
+ if $ac_init_version; then
+ cat <<\_ACEOF
+ configure
+-generated by GNU Autoconf 2.68
++generated by GNU Autoconf 2.69
+
+-Copyright (C) 2010 Free Software Foundation, Inc.
++Copyright (C) 2012 Free Software Foundation, Inc.
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+ _ACEOF
+@@ -1471,7 +1489,7 @@
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+- $as_test_x conftest$ac_exeext
++ test -x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+ else
+@@ -1721,7 +1739,7 @@
+ running configure, to aid debugging if configure makes a mistake.
+
+ It was created by $as_me, which was
+-generated by GNU Autoconf 2.68. Invocation command line was
++generated by GNU Autoconf 2.69. Invocation command line was
+
+ $ $0 $@
+
+@@ -2097,7 +2115,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -2137,7 +2155,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -2190,7 +2208,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -2231,7 +2249,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+@@ -2289,7 +2307,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -2333,7 +2351,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -2779,8 +2797,7 @@
+ /* end confdefs.h. */
+ #include <stdarg.h>
+ #include <stdio.h>
+-#include <sys/types.h>
+-#include <sys/stat.h>
++struct stat;
+ /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+ struct buf { int x; };
+ FILE * (*rcsopen) (struct buf *, struct stat *, int);
+@@ -3020,7 +3037,7 @@
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
++ as_fn_executable_p "$ac_path_GREP" || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+ case `"$ac_path_GREP" --version 2>&1` in
+@@ -3086,7 +3103,7 @@
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
++ as_fn_executable_p "$ac_path_EGREP" || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+ case `"$ac_path_EGREP" --version 2>&1` in
+@@ -3331,7 +3348,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -3608,9 +3625,9 @@
+ if ac_fn_c_try_link "$LINENO"; then :
+
+ else
+- LIBS="-ltermcap $olibs"
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libtermcap..." >&5
+-$as_echo "$as_me: checking libtermcap..." >&6;}
++ LIBS="-ltinfo $olibs"
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking libtinfo..." >&5
++$as_echo "$as_me: checking libtinfo..." >&6;}
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+
+@@ -3965,7 +3982,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_WRITEPATH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -4005,7 +4022,7 @@
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_XTERMPATH="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+@@ -4757,16 +4774,16 @@
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+- # In both cases, we have to default to `cp -p'.
++ # In both cases, we have to default to `cp -pR'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+- as_ln_s='cp -p'
++ as_ln_s='cp -pR'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+- as_ln_s='cp -p'
++ as_ln_s='cp -pR'
+ fi
+ else
+- as_ln_s='cp -p'
++ as_ln_s='cp -pR'
+ fi
+ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+ rmdir conf$$.dir 2>/dev/null
+@@ -4826,28 +4843,16 @@
+ as_mkdir_p=false
+ fi
+
+-if test -x / >/dev/null 2>&1; then
+- as_test_x='test -x'
+-else
+- if ls -dL / >/dev/null 2>&1; then
+- as_ls_L_option=L
+- else
+- as_ls_L_option=
+- fi
+- as_test_x='
+- eval sh -c '\''
+- if test -d "$1"; then
+- test -d "$1/.";
+- else
+- case $1 in #(
+- -*)set "./$1";;
+- esac;
+- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+- ???[sx]*):;;*)false;;esac;fi
+- '\'' sh
+- '
+-fi
+-as_executable_p=$as_test_x
++
++# as_fn_executable_p FILE
++# -----------------------
++# Test if FILE is an executable regular file.
++as_fn_executable_p ()
++{
++ test -f "$1" && test -x "$1"
++} # as_fn_executable_p
++as_test_x='test -x'
++as_executable_p=as_fn_executable_p
+
+ # Sed expression to map a string onto a valid CPP name.
+ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+@@ -4869,7 +4874,7 @@
+ # values after options handling.
+ ac_log="
+ This file was extended by $as_me, which was
+-generated by GNU Autoconf 2.68. Invocation command line was
++generated by GNU Autoconf 2.69. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+@@ -4931,10 +4936,10 @@
+ ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ ac_cs_version="\\
+ config.status
+-configured by $0, generated by GNU Autoconf 2.68,
++configured by $0, generated by GNU Autoconf 2.69,
+ with options \\"\$ac_cs_config\\"
+
+-Copyright (C) 2010 Free Software Foundation, Inc.
++Copyright (C) 2012 Free Software Foundation, Inc.
+ This config.status script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it."
+
+@@ -5023,7 +5028,7 @@
+ _ACEOF
+ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ if \$ac_cs_recheck; then
+- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
++ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..4c484bc
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,15 @@
+# readline70-001.diff
+readline70-001.diff
+readline70-002.diff
+readline70-003.diff
+rl-attribute.diff
+rl-header.diff
+rl-no-cross-check.diff
+rl-no-rpath.diff
+rlfe-history.diff
+rlfe-kfreebsd.diff
+rlfe-tinfo.diff
+#examples-makefile-multiarch.diff
+fix-wformat-security.diff
+configure-tinfo.diff
+rlfe-signal-rvt.diff