--- readline5-5.2+dfsg.orig/debian/README.Debian +++ readline5-5.2+dfsg/debian/README.Debian @@ -0,0 +1,54 @@ +A kind of FAQ for libreadline on Debian GNU/{Linux,Hurd} +-------------------------------------------------------- + +0. symlinked directory completion behavior + + Starting with readline-4.2a, completion on symlinks that point + to directories does not append the slash. To restore the behaviour + found in readline-4.2, add to /etc/inputrc or ~/.inputrc: + + set mark-symlinked-directories on + +1. re-enable the paren matching feature in readline-4.1 + + Add to /etc/inputrc or ~/.inputrc: + + set blink-matching-paren on + +2. key bindings for ESC + + Consider the following .inputrc: + + set editing-mode vi + + keymap vi + "\M-[D": backward-char + "\M-[C": forward-char + "\M-[A": previous-history + "\M-[B": next-history + + And, just to be certain, set -o reports that vi is on. + + However, ESC k does not send me to the previous line. + + I'm guessing that this is a conflict between bash's concept of a meta + keymap and its concept of vi's command-mode character -- which is to + say that its data structures don't properly reflect its implementation. + + Note that if I remove the meta prefix, leaving lines like: + "[A": previous-history + + That vi command mode keys work fine, and I can use the arrow keys in vi + mode, *provided I'm already in command mode already*. In other words, + bash is doing something wrong here such that it doesn't see the escape + character at the beginning of the key sequence even when in vi insert mode. + + Comment from the upstream author: "This guy destroyed the key binding for + ESC, which effectively disabled vi command mode. It's not as simple as he + paints it to be -- the binding for ESC in the vi insertion keymap *must* + be a function because of the other things needed when switching + from insert mode to command mode. + + If he wants to change something in vi's command mode, he needs + to use `set keymap vi-command' and enter key bindings without + the \M- prefix (as he discovered)." --- readline5-5.2+dfsg.orig/debian/README.source +++ readline5-5.2+dfsg/debian/README.source @@ -0,0 +1,2 @@ +readline5 uses the dpatch patch system. For more information, +please see /usr/share/doc/dpatch. --- readline5-5.2+dfsg.orig/debian/changelog +++ readline5-5.2+dfsg/debian/changelog @@ -0,0 +1,588 @@ +readline5 (5.2+dfsg-3build1) xenial; urgency=medium + + * No-change rebuild for ncurses6 transition. + + -- Matthias Klose Sun, 07 Feb 2016 09:45:19 +0000 + +readline5 (5.2+dfsg-3) unstable; urgency=medium + + * QA upload. + * Enable hardening build flags. + * Remove unused multilib packages. + * Use architecture qualified compiler. Closes: #784669. + * Refer to GPL-2 instead of GPL{-3,} in copyright as the sole purpose of + this package is being licensed under GPL-2. + * Declare source format 1.0. + * Remove install-info from obsolete maintscripts and install-info + dependency to comply with Debian policy 12.2. + * Verified compliance with Debian policy 3.9.6. + + -- Helmut Grohne Wed, 27 May 2015 22:15:17 +0200 + +readline5 (5.2+dfsg-2) unstable; urgency=low + + * QA upload. + * Fix multiarch bug, again; the +dfsg suffix broke the previous fix. + Closes: #670028. + + -- Florian Schlichting Sat, 27 Apr 2013 03:39:07 +0200 + +readline5 (5.2+dfsg-1) unstable; urgency=low + + * QA upload. + * Remove unused and non DFSG-compliant files from source: + doc/{history,rlman,rluserman,readline}.{dvi,html,info,pdf,ps,texi}. + history and readline thus removed from /usr/share/info/ in + libreadline-gplv2-dev. Closes: #695790. + + -- David Prévot Sun, 30 Dec 2012 19:13:32 -0400 + +readline5 (5.2-12) unstable; urgency=low + + [ Florian Schlichting ] + * libreadline-gplv2-dev: explicitly conflict against libreadline6-dev. + Closes: #670111. + * libreadline-gplv2-dev: substitute build- and architecture-dependant paths + in examples/Makefile with their actual, arch-indep value. + Closes: #658850, #670028. + + [ Matthias Klose ] + * Orphan the package. + + -- Matthias Klose Tue, 18 Sep 2012 15:04:24 +0200 + +readline5 (5.2-11) unstable; urgency=low + + * Do not link against any libncurses* library, just against libtinfo. + * libreadline-gplv2-dev: Depend on libtinfo-dev instead of libncurses5-dev. + + -- Matthias Klose Tue, 04 Oct 2011 16:10:12 +0200 + +readline5 (5.2-10) unstable; urgency=low + + * Add multi-arch support (Riku Voipio). Closes: #638851. + + -- Matthias Klose Mon, 22 Aug 2011 23:55:58 +0200 + +readline5 (5.2-9) unstable; urgency=low + + * libreadline-gplv2-dev: Stop providing libreadline5-dev. + + -- Matthias Klose Sat, 09 Jul 2011 12:25:10 +0200 + +readline5 (5.2-8) unstable; urgency=low + + * Rename libreadline5-dev to libradline-gplv2-dev. Some packages + still need readline5 for license compatibility, others should + convert to readline6. + * Fix some lintian warnings. + + -- Matthias Klose Sat, 23 Apr 2011 14:08:08 +0200 + +readline5 (5.2-7) unstable; urgency=low + + * libreadline5-dev: Stop providing libreadline-dev. + * libreadline5-dbg: Add libc6 dependencies to satisfy pedantic views + on the policy. Closes: #553251. + + -- Matthias Klose Mon, 02 Nov 2009 02:15:12 +0100 + +readline5 (5.2-6) unstable; urgency=low + + * Set priority of packages to extra (readline6 is the preferred choice). + * Don't build rlfe and readline-common anymore, now built by readline6. + + -- Matthias Klose Mon, 24 Aug 2009 00:07:19 +0200 + +readline5 (5.2-5) unstable; urgency=medium + + * On amd64, install 32bit libraries into /lib32 and /usr/lib32. + Closes: #533014. + + -- Matthias Klose Sun, 28 Jun 2009 21:55:21 +0200 + +readline5 (5.2-4) unstable; urgency=low + + * Apply upstream patches up to readline52-013. Closes: #494934. + * Remove the patch introduced in 5.2-3.1, obsoleted by the upstream + patches. + * libreadline5-dev: Set priority to extra. + + -- Matthias Klose Sat, 28 Feb 2009 19:00:38 +0100 + +readline5 (5.2-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Apply rl-input-eventhook.dpatch: Fix input data validation when run with + rl_event_hook. Closes: #498277. + + -- Arnaud Cornet Sat, 10 Jan 2009 17:06:46 +0100 + +readline5 (5.2-3) unstable; urgency=low + + * Build-depend on gcc-multilib instead of lib{32,64}c*-dev-*. + Closes: #423995. + * Apply upstream patch readline52-001 (readline neglects to reallocate + the array it uses to keep track of wrapped screen lines when increasing + its size. This will eventually result in segmentation faults when given + sufficiently long input. + * Apply upstream patch readline52-003 and readline52-004, fixes + for displaying the prompt. + * Link biarch builds against ncurses. + + -- Matthias Klose Thu, 24 May 2007 23:49:39 +0200 + +readline5 (5.2-2) unstable; urgency=low + + * Apply upstream patch readline52-001 (incorrect display position + with multibyte characters). + + -- Matthias Klose Tue, 19 Dec 2006 16:28:28 +0100 + +readline5 (5.2-1) unstable; urgency=low + + * New upstream version. + * Removed patches applied upstream: rlfe-pts, rl-inputrc. + * readline-common: Don't conflict with libreadine4, keep the replaces; + eases upgrades from MySQL 5 databases. Closes: #387966. + + -- Matthias Klose Sat, 28 Oct 2006 13:54:43 +0200 + +readline5 (5.1-9) unstable; urgency=low + + * Fix libc dependencies for the lib32readline5{,-dev} packages. + Closes: #386345. + * Set DEB_BUILD_GNU_TYPE. Closes: #390372. + + -- Matthias Klose Sun, 10 Sep 2006 21:04:52 +0000 + +readline5 (5.1-8) unstable; urgency=low + + * Build 32bit packages for amd64 and ppc64. Closes: #384198. + * Apply cross-compilation fixes, but keep the dependency on readline-common. + Closes: #358767. + * Fix build failure on ppc64. Closes: #361193. + + -- Matthias Klose Mon, 4 Sep 2006 00:15:39 +0200 + +readline5 (5.1-7) unstable; urgency=low + + * Apply upstream patches 003, 004. + * Remove build dependency on ia32-libs-dev. + + -- Matthias Klose Mon, 15 Mar 2006 23:39:50 +0000 + +readline5 (5.1-6) unstable; urgency=low + + * Apply upstream patch 002. + * Fix dangling symlinks in doc directory (closes: #346157, #346158). + + -- Matthias Klose Tue, 7 Feb 2006 18:46:32 +0100 + +readline5 (5.1-5) unstable; urgency=high + + * Fix names of libc-dev packages in lib64readline5-dev dependencies. + Closes: #344723. + + -- Matthias Klose Fri, 30 Dec 2005 00:23:24 +0100 + +readline5 (5.1-4) unstable; urgency=low + + * Add 32/64 bit build dependencies, lib64ncurses-dev doesn't yet depend + on it. + + -- Matthias Klose Thu, 22 Dec 2005 18:36:32 +0000 + +readline5 (5.1-3) unstable; urgency=medium + + * Don't call dh_shlibdeps for the lib64readline5 package. + * Fix build on GNU/kFreeBSD. Closes: #343323. + * Fix callback interface (closes: #343477). + + -- Matthias Klose Thu, 22 Dec 2005 17:29:52 +0100 + +readline5 (5.1-2) unstable; urgency=low + + * Don't check for cross compilation, when building for 64bit biarchs. + * Build 64bit packages for i386 and powerpc as well. + * /etc/inputrc: Activate bindings for forward-/backward-word, + when term=rxvt. Ubuntu #18927. + + -- Matthias Klose Sat, 10 Dec 2005 00:03:36 +0100 + +readline5 (5.1-1) unstable; urgency=low + + * New upstream version (5.1 release). + - Works better with non-ASCII input (closes: #332635). + * readline-common conflicts/replaces libreadline-common (closes: #339452). + + -- Matthias Klose Fri, 9 Dec 2005 21:22:24 +0100 + +readline5 (5.0+5.1rc1-1) unstable; urgency=low + + * New upstream version (5.1-rc1). + - Fix rlfe command line parsing (closes: #308315). + * Remove patches applied upstream: rl-del-backspace-policy. + * Remove /etc/inputrc on purge (closes: #334142). + + -- Matthias Klose Fri, 11 Nov 2005 12:36:59 +0000 + +readline5 (5.0+5.1b1-1) unstable; urgency=low + + * New upstream version (5.1-beta1). + + -- Matthias Klose Thu, 13 Oct 2005 16:03:09 +0200 + +readline5 (5.0+5.1a1-1) unstable; urgency=low + + * New upstream version (5.1-alpha1). + * Remove patches applied upstream: + - readline50-*, rl-setenv, rl-display, rl-self-insert, rl-examples. + * libreadline5 now depends on libreadline-common, now holding the + readline user documentation and the configuration file /etc/inputrc. + + -- Matthias Klose Sun, 11 Sep 2005 17:05:28 +0200 + +readline5 (5.0-11) unstable; urgency=low + + * libreadline5 now depends on readline-common, now holding the + readline user documentation and the configuration file /etc/inputrc. + + -- Matthias Klose Sun, 11 Sep 2005 20:18:27 +0000 + +readline5 (5.0-10) unstable; urgency=low + + * Update support/config.* files (closes: #290910). + + -- Matthias Klose Sun, 23 Jan 2005 09:58:30 +0100 + +readline5 (5.0-9) unstable; urgency=low + + * Fix bug in readline's self-insert command (addresses: #290103). + * Fix reference to upstream version (closes: #282252). + * Fix re-read-init-file (C-xC-r) not to read /etc/inputrc twice, + but /etc/inputrc and ~/.inputrc. Thanks to Vasco Pedro. + * rlfe: Use Unix98 pty naming (closes: #287434). + + -- Matthias Klose Sun, 16 Jan 2005 13:01:21 +0100 + +readline5 (5.0-8) unstable; urgency=low + + * Fix segfault in the ``reverse-search-history'' feature of the readline + library, if the search string matches a previously entered command (ie + history) and must overflow the current screen width. Addresses: #288940. + + -- Matthias Klose Wed, 12 Jan 2005 08:11:36 +0100 + +readline5 (5.0-7) unstable; urgency=low + + * Add build dependency on autotools-dev (closes: #281429). + + -- Matthias Klose Mon, 15 Nov 2004 22:53:33 +0100 + +readline5 (5.0-6) unstable; urgency=low + + * Build-depend on texinfo (closes: #280867). + + -- Matthias Klose Fri, 12 Nov 2004 08:47:26 +0100 + +readline5 (5.0-5) unstable; urgency=high + + * Remove the libreadline-common package, until sarge is released. + Install the man pages as readline5(3) and history5(3), install the + user manual as rl5userman. Closes: #279366. + + -- Matthias Klose Thu, 11 Nov 2004 08:05:15 +0100 + +readline5 (5.0-4) unstable; urgency=low + + * Fix typo in rules file. + + -- Matthias Klose Tue, 26 Oct 2004 07:35:50 +0200 + +readline5 (5.0-3) unstable; urgency=low + + * Prefer using setenv over putenv. + + -- Matthias Klose Sun, 17 Oct 2004 11:09:20 +0200 + +readline5 (5.0-2) unstable; urgency=medium + + * Remove sgid bits from directories (closes: #274667). + * libreadline5 now depends on libreadline-common | libreadline4 (<< 4.3-13), + becoming installable in sarge, but leaving out the rluserman docs, + which is in libreadline-common (closes: #276536). + + -- Matthias Klose Fri, 15 Oct 2004 00:09:16 +0200 + +readline5 (5.0-1) unstable; urgency=low + + * Package maintainers: Do not build-depend on libreadline5-dev, unless you + want to stick your package to unstable. readline is part of base and + therefore frozen for sarge. + + * New upstream release. + * Bugs fixed in this release (and the alpha/beta releases): + - Fixed a bug that caused the prompt to overwrite previous output when the + output doesn't contain a newline and the locale supports multibyte + characters. This same change fixes the problem of readline redisplay + slowing down dramatically as the line gets longer in multibyte locales. + Closes: #179883. + - Speedups to the multibyte character redisplay code. Closes: #154063. + - Fixed a problem with EOF detection when using rl_event_hook. + Closes: #144585. + - Display of multibyte character in readline prompts. Closes: #195678. + - Broken column output in UTF-8 locale. Closes: #161750. + - Fix a bug in the callback read-char interface. Closes: #172849. + * New shared object name. Obsoletes bug about changed symbol size. + Closes: #153974. + * Exported readline functions now have a rl_ prefix. Closes: #65484. + + -- Matthias Klose Sun, 19 Sep 2004 11:48:34 +0200 + +readline4 (4.3-6) unstable; urgency=low + + * Fix package sections and priorities. + * Add support for freebsd (closes: #200537). + * Add package rlfe (closes: #154400). + + -- Matthias Klose Fri, 26 Sep 2003 19:05:31 +0200 + +readline4 (4.3-5) unstable; urgency=low + + * Fix ~ command working in UTF-8 locales (closes: #175127). + * Apply upstream patches 001, 002, 003, 004, 005. + * Do not redefine __attribute__ (closes: #191209). + + -- Matthias Klose Sun, 1 Jun 2003 09:39:44 +0200 + +readline4 (4.3-5) unstable; urgency=low + + * debian/patches/mbutil.dpatch: Fix segfault in mbutil.c. + + -- Matthias Klose Tue, 24 Sep 2002 13:12:12 +0200 + +readline4 (4.3-4) unstable; urgency=medium + + * Apply upstream patches: + - Fix segfault (closes: #154462). + - Fix for repeating an edit in vi mode. + * Build dependency on 'mawk | awk' (closes: #154462). + + -- Matthias Klose Wed, 31 Jul 2002 20:10:44 +0200 + +readline4 (4.3-3) unstable; urgency=high + + * Do it again. Really link against ncurses library. + + -- Matthias Klose Sun, 21 Jul 2002 21:44:00 +0200 + +readline4 (4.3-2) unstable; urgency=high + + * Link against ncurses library. + + -- Matthias Klose Sat, 20 Jul 2002 18:21:40 +0200 + +readline4 (4.3-1) unstable; urgency=low + + * New upstream version: + - Handle multibyte characters (obsoletes and closes: #113078). + - Implement toggable overwrite mode (closes: #36651). + - Fixed the event loop to handle the case where the input file descriptor + is invalidated (closes: #134615). + - Added some default key bindings for common escape sequences produced by + HOME and END keys (closes: #150429). + * Move debug library to /usr/lib/debug. + + -- Matthias Klose Sat, 20 Jul 2002 12:40:06 +0200 + +readline4 (4.2.91-1) unstable; urgency=low + + * New upstream version (4.3 beta1). + + -- Matthias Klose Fri, 31 May 2002 00:15:04 +0200 + +readline4 (4.2a-5) unstable; urgency=low + + * Adjust for netbsd linker options (closes: #130349). + + -- Matthias Klose Sun, 3 Feb 2002 22:03:03 +0100 + +readline4 (4.2a-4) unstable; urgency=high + + * Taken from the current upstream sources: Make the symlinked directory + completion behavior introduced in readline-4.2a a user-settable option. + If `mark-symlinked-directories' is set to `on', the symlinked directory + completion behavior is disabled, and symlinks that point to directories + have a slash appended (closes: #120854, #123602). + Same severity as the bash upload (2.05-4), as bash depends on it. + * Introduced a new private (but global) variable, so the shlibs version + needs an update again. + + -- Matthias Klose Sat, 12 Jan 2002 16:00:08 +0100 + +readline4 (4.2a-3) unstable; urgency=medium + + * 4.2a has a new variable `rl_readline_version', so the shlibs version + needs to be upgraded to (>= 4.2a). + * Don't rely on HAVE_CONFIG_H macro in installed headers (closes: #125398). + * Upstream: The completion code now attempts to do a better job of preserving + the case of the word the user typed if ignoring case in completions. + Closes: #74861. + + -- Matthias Klose Fri, 21 Dec 2001 00:16:28 +0100 + +readline4 (4.2a-2) unstable; urgency=high + + * Update config.{sub,guess} from ftp://ftp.gnu.org/pub/gnu/config/. + Closes: #119847. + + -- Matthias Klose Fri, 16 Nov 2001 19:00:07 +0100 + +readline4 (4.2a-1) unstable; urgency=low + + * Final release. + * This is mainly a bugfix and code cleanup release (as you can see + from the version number as well). Fixes the following Debian reports: + - readline doesn't ignore null prompts anymore (closes: #105231). + - Don't include -I/usr/include in CFLAGS. + * Fix location of upstream source in copyright file (closes: #118481). + + -- Matthias Klose Wed, 14 Nov 2001 21:56:29 +0100 + +readline4 (4.2a-0rc1) unstable; urgency=low + + * New upstream (bug fix) version, release candidate. + + -- Matthias Klose Fri, 2 Nov 2001 10:35:55 +0100 + +readline4 (4.2a-0beta1) unstable; urgency=low + + * New upstream (bug fix) version. + * Move manual pages to libreadline4 package (closes: #111303). + + -- Matthias Klose Thu, 11 Oct 2001 22:51:21 +0200 + +readline4 (4.2-5) unstable; urgency=low + + * Include stdio.h in history.h (closes: #101166). + * libreadline4-dbg suggests libreadline4-dev (closes: #101790). + + -- Matthias Klose Sat, 21 Jul 2001 19:02:53 +0200 + +readline4 (4.2-4) unstable; urgency=low + + * Fix tilde.h for C++ compatibility as well. + + -- Matthias Klose Sat, 5 May 2001 01:03:03 +0200 + +readline4 (4.2-3) unstable; urgency=low + + * Fix header for C++ compatibility (closes #95048, #95758). + * Fixed upstream: closes #55626, #75346. + + -- Matthias Klose Wed, 2 May 2001 23:06:00 +0200 + +readline4 (4.2-2) unstable; urgency=low + + * Tighten shlibs dependency to >= 4.2-2. + + -- Matthias Klose Tue, 10 Apr 2001 00:37:22 +0200 + +readline4 (4.2-1) unstable; urgency=low + + * New upstream release. + + -- Matthias Klose Mon, 9 Apr 2001 18:28:54 +0200 + +readline4 (4.2-0beta2) unstable; urgency=low + + * New upstream release 4.2-beta2. + + -- Matthias Klose Thu, 29 Mar 2001 23:18:10 +0200 + +readline4 (4.2-0) unstable; urgency=low + + * New upstream release 4.2-beta1. + + -- Matthias Klose Tue, 6 Feb 2001 21:12:58 +0100 + +readline4 (4.1-4) unstable; urgency=low + + * Fix build error. + + -- Matthias Klose Mon, 20 Nov 2000 23:27:16 +0100 + +readline4 (4.1-3) unstable; urgency=low + + * debian/patches/rl-hurd-build.dpatch: Build on the Hurd (fixes #75342). + + -- Matthias Klose Sat, 18 Nov 2000 12:55:16 +0100 + +readline4 (4.1-2) unstable; urgency=low + + * Include stdio.h in readline.h (fixes #70669). + + -- Matthias Klose Mon, 9 Oct 2000 20:35:23 +0200 + +readline4 (4.1-1) frozen unstable; urgency=low + + * Final release. Documentation fixes. + + -- Matthias Klose Mon, 20 Mar 2000 20:08:45 +0100 + +readline4 (4.1-0beta5db1) frozen unstable; urgency=low + + * Updated beta version. + * debian/control: Remove libreadline4-doc suggestions (fixes #57547, #57578). + + -- Matthias Klose Sun, 20 Feb 2000 21:10:34 +0100 + +readline4 (4.1-0beta3db3) unstable; urgency=low + + * Update rl.ctrl-char patch from Dan Jacobowitz. + Fixes #54805, #54639, #54612. + + -- Matthias Klose Wed, 12 Jan 2000 10:26:51 +0100 + +readline4 (4.1-0beta3db2) unstable; urgency=low + + * debian/control: libreadline4-dev depends on libncurses5-dev. + + -- Matthias Klose Thu, 6 Jan 2000 12:11:29 +0100 + +readline4 (4.1-0beta3db1) unstable; urgency=low + + * New upstream version. + * Remove three patches integrated upstream. + * Reports fixed in upstream version: #16797, #22480, #47525. + * Put rluserman.info into library package (fixes: #32075). + * In lib/readline/chardefs.h do not assume char is signed (fixes #53253). + + -- Matthias Klose Sat, 1 Jan 2000 16:22:30 +0100 + +readline4 (4.0-0.1) experimental; urgency=low + + * New upstream version. + * Fixed upstream (closes: #22480). + * Separated from bash package, since readline is available as a + separate source package upstream. The upstream author writes: + "It's not appropriate to build shared libraries from the readline + shipped with bash. That is designed to be linked directly into bash." + * Make /usr/doc compatibility links. + * debian/patches/conf-update.dpatch: New config files from automake + (closes #33745). + * debian/rules: Add Build-Depends. + * debian/rules: Install info files with default perms (closes: #49879). + * readline headers fixed upstream (closes: #47525). + * debian/etc.inputrc: Document how to enable German umlauts. Should close + #38397? Should close #33168, #36077 and #42775 as well? The first report + (33168) contains some more information how to get xemacs to work with 8bit. + * Support to build on the Hurd (closes: #35769). + Patch from Marcus.Brinkmann@ruhr-uni-bochum.de. + * debian/patches/rl-del-backspace-policy.dpatch: Handle Delete/Backspace + keys according to Debian policy. + * debian/patches/rl-paren-matching.dpatch: Turn on parens matching. + * debian/patches/rl-shell-memleak.dpatch: Fix memory leak. + + -- Matthias Klose Sat, 20 Nov 1999 18:52:00 +0100 --- readline5-5.2+dfsg.orig/debian/compat +++ readline5-5.2+dfsg/debian/compat @@ -0,0 +1 @@ +5 --- readline5-5.2+dfsg.orig/debian/control +++ readline5-5.2+dfsg/debian/control @@ -0,0 +1,52 @@ +Source: readline5 +Section: libs +Priority: extra +Maintainer: Debian QA Group +Standards-Version: 3.9.6 +Build-Depends: debhelper (>= 8.1.3), dpatch, lsb-release, libtinfo-dev, libncurses5-dev (>= 5.6), mawk | awk, texinfo, autotools-dev + +Package: libreadline5 +Architecture: any +Depends: readline-common, ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Section: libs +Description: GNU readline and history libraries, run-time libraries + The GNU readline library aids in the consistency of user interface + across discrete programs that need to provide a command line + interface. + . + The GNU history library provides a consistent user interface for + recalling lines of previously typed input. + +Package: libreadline-gplv2-dev +Architecture: any +Depends: libreadline5 (= ${binary:Version}), libtinfo-dev, ${shlibs:Depends}, ${misc:Depends} +Conflicts: libreadline-dev, libreadline5-dev, libreadline6-dev +Replaces: libreadline5-dev +Multi-Arch: same +Section: libdevel +Description: GNU readline and history libraries, development files + The GNU readline library aids in the consistency of user interface + across discrete programs that need to provide a command line + interface. + . + The GNU history library provides a consistent user interface for + recalling lines of previously typed input. + . + This package contains as well the readline documentation in info format. + +Package: libreadline5-dbg +Architecture: any +Depends: libreadline5 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Conflicts: libreadline-dbg +Provides: libreadline-dbg +Suggests: libreadline-gplv2-dev +Section: debug +Description: GNU readline and history libraries, debugging libraries + The GNU readline library aids in the consistency of user interface + across discrete programs that need to provide a command line + interface. + . + The GNU history library provides a consistent user interface for + recalling lines of previously typed input. --- readline5-5.2+dfsg.orig/debian/copyright +++ readline5-5.2+dfsg/debian/copyright @@ -0,0 +1,53 @@ +This is Debian GNU/Linux's prepackaged version of the FSF's GNU +Readline library. + +This package was put together by Matthias Klose , derived +from the bash package by Guy Maor , from the GNU sources at + + ftp.gnu.org:/pub/gnu/readline/readline-5.2.tar.gz. + +Upstream Authors: + + Chet Ramey + Jeff Solomon (examples/excallback.c) + Harold Levy (examples/rl-fgets.c) + Juergen Weigert (examples/rlfe) + Michael Schroeder (examples/rlfe) + Oliver Laumann (examples/rlfe) + +Copyright: + + Copyright (C) 1987-2009 Free Software Foundation, Inc. + Copyright (C) 1999 Jeff Solomon (examples/excallback.c) + Copyright (C) 2003-2004 Harold Levy (examples/rl-fgets.c) + Copyright (C) 1993-2002 Juergen Weigert (examples/rlfe) + Copyright (C) 1993-2002 Michael Schroeder (examples/rlfe) + Copyright (C) 1987 Oliver Laumann (examples/rlfe) + +License: + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2, or (at + your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License with + your Debian GNU/Linux system, in /usr/share/common-licenses/GPL-2, or with + the Debian GNU/Linux bash source package as the file COPYING. If not, + write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, A 02110-1301, USA. + +On Debian systems, the complete text of the GNU General Public License +can be found in `/usr/share/common-licenses/GPL-2'. + +The Debian packaging is: + + Copyright (C) 1999-2011 Matthias Klose + +and is licensed under the GPL version 2, +see `/usr/share/common-licenses/GPL-2'. --- readline5-5.2+dfsg.orig/debian/inputrc +++ readline5-5.2+dfsg/debian/inputrc @@ -0,0 +1,66 @@ +# /etc/inputrc - global inputrc for libreadline +# See readline(3readline) and `info rluserman' for more information. + +# Be 8 bit clean. +set input-meta on +set output-meta on + +# To allow the use of 8bit-characters like the german umlauts, comment out +# the line below. However this makes the meta key not work as a meta key, +# which is annoying to those which don't need to type in 8-bit characters. + +# set convert-meta off + +# try to enable the application keypad when it is called. Some systems +# need this to enable the arrow keys. +# set enable-keypad on + +# see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys + +# do not bell on tab-completion +# set bell-style none +# set bell-style visible + +# some defaults / modifications for the emacs mode +$if mode=emacs + +# allow the use of the Home/End keys +"\e[1~": beginning-of-line +"\e[4~": end-of-line + +# allow the use of the Delete/Insert keys +"\e[3~": delete-char +"\e[2~": quoted-insert + +# mappings for "page up" and "page down" to step to the beginning/end +# of the history +# "\e[5~": beginning-of-history +# "\e[6~": end-of-history + +# alternate mappings for "page up" and "page down" to search the history +# "\e[5~": history-search-backward +# "\e[6~": history-search-forward + +# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving +"\e[1;5C": forward-word +"\e[1;5D": backward-word +"\e[5C": forward-word +"\e[5D": backward-word +"\e\e[C": forward-word +"\e\e[D": backward-word + +$if term=rxvt +"\e[8~": end-of-line +"\eOc": forward-word +"\eOd": backward-word +$endif + +# for non RH/Debian xterm, can't hurt for RH/Debian xterm +# "\eOH": beginning-of-line +# "\eOF": end-of-line + +# for freebsd console +# "\e[H": beginning-of-line +# "\e[F": end-of-line + +$endif --- readline5-5.2+dfsg.orig/debian/inputrc.arrows +++ readline5-5.2+dfsg/debian/inputrc.arrows @@ -0,0 +1,30 @@ +# This file controls the behaviour of line input editing for +# programs that use the Gnu Readline library. +# +# Arrow keys in keypad mode +# +"\C-[OD" backward-char +"\C-[OC" forward-char +"\C-[OA" previous-history +"\C-[OB" next-history +# +# Arrow keys in ANSI mode +# +"\C-[[D" backward-char +"\C-[[C" forward-char +"\C-[[A" previous-history +"\C-[[B" next-history +# +# Arrow keys in 8 bit keypad mode +# +"\C-M-OD" backward-char +"\C-M-OC" forward-char +"\C-M-OA" previous-history +"\C-M-OB" next-history +# +# Arrow keys in 8 bit ANSI mode +# +"\C-M-[D" backward-char +"\C-M-[C" forward-char +"\C-M-[A" previous-history +"\C-M-[B" next-history --- readline5-5.2+dfsg.orig/debian/libreadline5.shlibs +++ readline5-5.2+dfsg/debian/libreadline5.shlibs @@ -0,0 +1,2 @@ +libhistory 5 libreadline5 (>= 5.2) +libreadline 5 libreadline5 (>= 5.2) --- readline5-5.2+dfsg.orig/debian/patches/00list +++ readline5-5.2+dfsg/debian/patches/00list @@ -0,0 +1,19 @@ +rl-001 +rl-002 +rl-003 +rl-004 +rl-004 +rl-005 +rl-006 +rl-007 +rl-008 +rl-009 +rl-010 +rl-011 +rl-012 +rl-013 +rl-attribute +rl-header +rl-no-cross-check +rl-no-rpath +rl-no-non-DFSG-doc.dpatch --- readline5-5.2+dfsg.orig/debian/patches/rl-001 +++ readline5-5.2+dfsg/debian/patches/rl-001 @@ -0,0 +1,41 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-001.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: In some cases, code that is intended to be used in the presence of multibyte +## DP: characters is called when no such characters are present, leading to incorrect +## DP: display position calculations and incorrect redisplay. + + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-001 + +Bug-Reported-by: ebb9@byu.net +Bug-Reference-ID: <45540862.9030900@byu.net> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00017.html + http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00016.html + +Bug-Description: + +In some cases, code that is intended to be used in the presence of multibyte +characters is called when no such characters are present, leading to incorrect +display position calculations and incorrect redisplay. + +Patch: + +*** ../readline-5.2/display.c Thu Sep 14 14:20:12 2006 +--- ./display.c Mon Nov 13 17:55:57 2006 +*************** +*** 2381,2384 **** +--- 2409,2414 ---- + if (end <= start) + return 0; ++ if (MB_CUR_MAX == 1 || rl_byte_oriented) ++ return (end - start); + + memset (&ps, 0, sizeof (mbstate_t)); + --- readline5-5.2+dfsg.orig/debian/patches/rl-002 +++ readline5-5.2+dfsg/debian/patches/rl-002 @@ -0,0 +1,59 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-001.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: In some cases, code that is intended to be used in the presence of multibyte +## DP: characters is called when no such characters are present, leading to incorrect +## DP: display position calculations and incorrect redisplay. + + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-002 + +Bug-Reported-by: Magnus Svensson +Bug-Reference-ID: <45BDC44D.80609@mysql.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-01/msg00002.html + +Bug-Description: + +Readline neglects to reallocate the array it uses to keep track of wrapped +screen lines when increasing its size. This will eventually result in +segmentation faults when given sufficiently long input. + +Patch: + +*** ../readline-5.2-patched/display.c Thu Sep 14 14:20:12 2006 +--- ./display.c Fri Feb 2 20:23:17 2007 +*************** +*** 561,574 **** +--- 561,586 ---- + wrap_offset = prompt_invis_chars_first_line = 0; + } + ++ #if defined (HANDLE_MULTIBYTE) + #define CHECK_INV_LBREAKS() \ + do { \ + if (newlines >= (inv_lbsize - 2)) \ + { \ + inv_lbsize *= 2; \ + inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ ++ _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ + } \ + } while (0) ++ #else ++ #define CHECK_INV_LBREAKS() \ ++ do { \ ++ if (newlines >= (inv_lbsize - 2)) \ ++ { \ ++ inv_lbsize *= 2; \ ++ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ ++ } \ ++ } while (0) ++ #endif /* HANDLE_MULTIBYTE */ + + #if defined (HANDLE_MULTIBYTE) + #define CHECK_LPOS() \ --- readline5-5.2+dfsg.orig/debian/patches/rl-003 +++ readline5-5.2+dfsg/debian/patches/rl-003 @@ -0,0 +1,48 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-003.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: When moving the cursor, bash sometimes misplaces the cursor when the prompt +## DP: contains two or more multibyte characters. The particular circumstance that +## DP: uncovered the problem was having the (multibyte) current directory name in +## DP: the prompt string. + + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-003 + +Bug-Reported-by: Peter Volkov +Bug-Reference-ID: <1171795523.8021.18.camel@localhost> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-02/msg00054.html + +Bug-Description: + +When moving the cursor, bash sometimes misplaces the cursor when the prompt +contains two or more multibyte characters. The particular circumstance that +uncovered the problem was having the (multibyte) current directory name in +the prompt string. + +Patch: + +*** ../readline-5.2.2/display.c Fri Jan 19 13:34:50 2007 +--- ./display.c Sat Mar 10 17:25:44 2007 +*************** +*** 1745,1749 **** + { + dpos = _rl_col_width (data, 0, new); +! if (dpos > prompt_last_invisible) /* XXX - don't use woff here */ + { + dpos -= woff; +--- 1745,1752 ---- + { + dpos = _rl_col_width (data, 0, new); +! /* Use NEW when comparing against the last invisible character in the +! prompt string, since they're both buffer indices and DPOS is a +! desired display position. */ +! if (new > prompt_last_invisible) /* XXX - don't use woff here */ + { + dpos -= woff; --- readline5-5.2+dfsg.orig/debian/patches/rl-004 +++ readline5-5.2+dfsg/debian/patches/rl-004 @@ -0,0 +1,80 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-004.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: When restoring the original prompt after finishing an incremental search, +## DP: bash sometimes places the cursor incorrectly if the primary prompt contains +## DP: invisible characters. + + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-004 + +Bug-Reported-by: Peter Volkov +Bug-Reference-ID: <1173636022.7039.36.camel@localhost> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00039.html + +Bug-Description: + +When restoring the original prompt after finishing an incremental search, +bash sometimes places the cursor incorrectly if the primary prompt contains +invisible characters. + +Patch: + +*** ../readline-5.2.3/display.c Fri Apr 20 13:30:16 2007 +--- ./display.c Fri Apr 20 15:17:01 2007 +*************** +*** 1599,1604 **** + if (temp > 0) + { + _rl_output_some_chars (nfd, temp); +! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);; + } + } +--- 1599,1618 ---- + if (temp > 0) + { ++ /* If nfd begins at the prompt, or before the invisible ++ characters in the prompt, we need to adjust _rl_last_c_pos ++ in a multibyte locale to account for the wrap offset and ++ set cpos_adjusted accordingly. */ + _rl_output_some_chars (nfd, temp); +! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) +! { +! _rl_last_c_pos += _rl_col_width (nfd, 0, temp); +! if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) +! { +! _rl_last_c_pos -= wrap_offset; +! cpos_adjusted = 1; +! } +! } +! else +! _rl_last_c_pos += temp; + } + } +*************** +*** 1608,1613 **** +--- 1622,1639 ---- + if (temp > 0) + { ++ /* If nfd begins at the prompt, or before the invisible ++ characters in the prompt, we need to adjust _rl_last_c_pos ++ in a multibyte locale to account for the wrap offset and ++ set cpos_adjusted accordingly. */ + _rl_output_some_chars (nfd, temp); + _rl_last_c_pos += col_temp; /* XXX */ ++ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ++ { ++ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) ++ { ++ _rl_last_c_pos -= wrap_offset; ++ cpos_adjusted = 1; ++ } ++ } + } + lendiff = (oe - old) - (ne - new); --- readline5-5.2+dfsg.orig/debian/patches/rl-005 +++ readline5-5.2+dfsg/debian/patches/rl-005 @@ -0,0 +1,335 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-005.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-005. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-005 + +Bug-Reported-by: Thomas Loeber +Bug-Reference-ID: <200703082223.08919.ifp@loeber1.de> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00036.html + +Bug-Description: + +When rl_read_key returns -1, indicating that readline's controlling terminal +has been invalidated for some reason (e.g., receiving a SIGHUP), the error +status was not reported correctly to the caller. This could cause input +loops. + +Patch: + +*** ../readline-5.2/complete.c Fri Jul 28 11:35:49 2006 +--- ./complete.c Tue Mar 13 08:50:16 2007 +*************** +*** 429,433 **** + if (c == 'n' || c == 'N' || c == RUBOUT) + return (0); +! if (c == ABORT_CHAR) + _rl_abort_internal (); + if (for_pager && (c == NEWLINE || c == RETURN)) +--- 440,444 ---- + if (c == 'n' || c == 'N' || c == RUBOUT) + return (0); +! if (c == ABORT_CHAR || c < 0) + _rl_abort_internal (); + if (for_pager && (c == NEWLINE || c == RETURN)) +*** ../readline-5.2/input.c Wed Aug 16 15:15:16 2006 +--- ./input.c Wed May 2 16:07:59 2007 +*************** +*** 514,518 **** + int size; + { +! int mb_len = 0; + size_t mbchar_bytes_length; + wchar_t wc; +--- 522,526 ---- + int size; + { +! int mb_len, c; + size_t mbchar_bytes_length; + wchar_t wc; +*************** +*** 521,531 **** + memset(&ps, 0, sizeof (mbstate_t)); + memset(&ps_back, 0, sizeof (mbstate_t)); +! + while (mb_len < size) + { + RL_SETSTATE(RL_STATE_MOREINPUT); +! mbchar[mb_len++] = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); + if (mbchar_bytes_length == (size_t)(-1)) +--- 529,545 ---- + memset(&ps, 0, sizeof (mbstate_t)); + memset(&ps_back, 0, sizeof (mbstate_t)); +! +! mb_len = 0; + while (mb_len < size) + { + RL_SETSTATE(RL_STATE_MOREINPUT); +! c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + ++ if (c < 0) ++ break; ++ ++ mbchar[mb_len++] = c; ++ + mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); + if (mbchar_bytes_length == (size_t)(-1)) +*************** +*** 565,569 **** + c = first; + memset (mb, 0, mlen); +! for (i = 0; i < mlen; i++) + { + mb[i] = (char)c; +--- 579,583 ---- + c = first; + memset (mb, 0, mlen); +! for (i = 0; c >= 0 && i < mlen; i++) + { + mb[i] = (char)c; +*** ../readline-5.2/isearch.c Mon Dec 26 17:18:53 2005 +--- ./isearch.c Fri Mar 9 14:30:59 2007 +*************** +*** 328,333 **** + + f = (rl_command_func_t *)NULL; +! +! /* Translate the keys we do something with to opcodes. */ + if (c >= 0 && _rl_keymap[c].type == ISFUNC) + { +--- 328,340 ---- + + f = (rl_command_func_t *)NULL; +! +! if (c < 0) +! { +! cxt->sflags |= SF_FAILED; +! cxt->history_pos = cxt->last_found_line; +! return -1; +! } +! +! /* Translate the keys we do something with to opcodes. */ + if (c >= 0 && _rl_keymap[c].type == ISFUNC) + { +*** ../readline-5.2/misc.c Mon Dec 26 17:20:46 2005 +--- ./misc.c Fri Mar 9 14:44:11 2007 +*************** +*** 147,150 **** +--- 147,152 ---- + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); ++ if (key < 0) ++ return -1; + return (_rl_dispatch (key, _rl_keymap)); + } +*** ../readline-5.2/readline.c Wed Aug 16 15:00:36 2006 +--- ./readline.c Fri Mar 9 14:47:24 2007 +*************** +*** 646,649 **** +--- 669,677 ---- + { + nkey = _rl_subseq_getchar (cxt->okey); ++ if (nkey < 0) ++ { ++ _rl_abort_internal (); ++ return -1; ++ } + r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg); + cxt->flags |= KSEQ_DISPATCHED; +*** ../readline-5.2/text.c Fri Jul 28 11:55:27 2006 +--- ./text.c Sun Mar 25 13:41:38 2007 +*************** +*** 858,861 **** +--- 864,870 ---- + RL_UNSETSTATE(RL_STATE_MOREINPUT); + ++ if (c < 0) ++ return -1; ++ + #if defined (HANDLE_SIGNALS) + if (RL_ISSTATE (RL_STATE_CALLBACK) == 0) +*************** +*** 1521,1524 **** +--- 1530,1536 ---- + mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX); + ++ if (mb_len <= 0) ++ return -1; ++ + if (count < 0) + return (_rl_char_search_internal (-count, bdir, mbchar, mb_len)); +*************** +*** 1537,1540 **** +--- 1549,1555 ---- + RL_UNSETSTATE(RL_STATE_MOREINPUT); + ++ if (c < 0) ++ return -1; ++ + if (count < 0) + return (_rl_char_search_internal (-count, bdir, c)); +*** ../readline-5.2/vi_mode.c Sat Jul 29 16:42:28 2006 +--- ./vi_mode.c Fri Mar 9 15:02:11 2007 +*************** +*** 887,890 **** +--- 887,897 ---- + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); ++ ++ if (c < 0) ++ { ++ *nextkey = 0; ++ return -1; ++ } ++ + *nextkey = c; + +*************** +*** 903,906 **** +--- 910,918 ---- + c = rl_read_key (); /* real command */ + RL_UNSETSTATE(RL_STATE_MOREINPUT); ++ if (c < 0) ++ { ++ *nextkey = 0; ++ return -1; ++ } + *nextkey = c; + } +*************** +*** 1225,1236 **** + _rl_callback_generic_arg *data; + { + #if defined (HANDLE_MULTIBYTE) +! _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); + #else + RL_SETSTATE(RL_STATE_MOREINPUT); +! _rl_vi_last_search_char = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + #endif + + _rl_callback_func = 0; + _rl_want_redisplay = 1; +--- 1243,1262 ---- + _rl_callback_generic_arg *data; + { ++ int c; + #if defined (HANDLE_MULTIBYTE) +! c = _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); + #else + RL_SETSTATE(RL_STATE_MOREINPUT); +! c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + #endif + ++ if (c <= 0) ++ return -1; ++ ++ #if !defined (HANDLE_MULTIBYTE) ++ _rl_vi_last_search_char = c; ++ #endif ++ + _rl_callback_func = 0; + _rl_want_redisplay = 1; +*************** +*** 1248,1251 **** +--- 1274,1278 ---- + int count, key; + { ++ int c; + #if defined (HANDLE_MULTIBYTE) + static char *target; +*************** +*** 1294,1302 **** + { + #if defined (HANDLE_MULTIBYTE) +! _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); + #else + RL_SETSTATE(RL_STATE_MOREINPUT); +! _rl_vi_last_search_char = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + #endif + } +--- 1321,1335 ---- + { + #if defined (HANDLE_MULTIBYTE) +! c = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); +! if (c <= 0) +! return -1; +! _rl_vi_last_search_mblen = c; + #else + RL_SETSTATE(RL_STATE_MOREINPUT); +! c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); ++ if (c < 0) ++ return -1; ++ _rl_vi_last_search_char = c; + #endif + } +*************** +*** 1468,1471 **** +--- 1501,1507 ---- + RL_UNSETSTATE(RL_STATE_MOREINPUT); + ++ if (c < 0) ++ return -1; ++ + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) +*************** +*** 1486,1489 **** +--- 1522,1528 ---- + _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); + ++ if (c < 0) ++ return -1; ++ + _rl_callback_func = 0; + _rl_want_redisplay = 1; +*************** +*** 1517,1520 **** +--- 1556,1562 ---- + _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX); + ++ if (c < 0) ++ return -1; ++ + return (_rl_vi_change_char (count, c, mb)); + } +*************** +*** 1651,1655 **** + RL_UNSETSTATE(RL_STATE_MOREINPUT); + +! if (ch < 'a' || ch > 'z') + { + rl_ding (); +--- 1693,1697 ---- + RL_UNSETSTATE(RL_STATE_MOREINPUT); + +! if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ + { + rl_ding (); +*************** +*** 1703,1707 **** + return 0; + } +! else if (ch < 'a' || ch > 'z') + { + rl_ding (); +--- 1745,1749 ---- + return 0; + } +! else if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */ + { + rl_ding (); --- readline5-5.2+dfsg.orig/debian/patches/rl-006 +++ readline5-5.2+dfsg/debian/patches/rl-006 @@ -0,0 +1,69 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-006.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-006. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-006 + +Bug-Reported-by: Peter Volkov +Bug-Reference-ID: <1178376645.9063.25.camel@localhost> +Bug-Reference-URL: http://bugs.gentoo.org/177095 + +Bug-Description: + +The readline display code miscalculated the screen position when performing +a redisplay in which the new text occupies more screen space that the old, +but takes fewer bytes to do so (e.g., when replacing a shorter string +containing multibyte characters with a longer one containing only ASCII). + +Patch: + +*** ../readline-5.2/display.c Thu Apr 26 11:38:22 2007 +--- ./display.c Thu Jul 12 23:10:10 2007 +*************** +*** 1519,1527 **** + /* Non-zero if we're increasing the number of lines. */ + int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin; + /* Sometimes it is cheaper to print the characters rather than + use the terminal's capabilities. If we're growing the number + of lines, make sure we actually cause the new line to wrap + around on auto-wrapping terminals. */ +! if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl)) + { + /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and +--- 1568,1596 ---- + /* Non-zero if we're increasing the number of lines. */ + int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin; ++ /* If col_lendiff is > 0, implying that the new string takes up more ++ screen real estate than the old, but lendiff is < 0, meaning that it ++ takes fewer bytes, we need to just output the characters starting ++ from the first difference. These will overwrite what is on the ++ display, so there's no reason to do a smart update. This can really ++ only happen in a multibyte environment. */ ++ if (lendiff < 0) ++ { ++ _rl_output_some_chars (nfd, temp); ++ _rl_last_c_pos += _rl_col_width (nfd, 0, temp); ++ /* If nfd begins before any invisible characters in the prompt, ++ adjust _rl_last_c_pos to account for wrap_offset and set ++ cpos_adjusted to let the caller know. */ ++ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) ++ { ++ _rl_last_c_pos -= wrap_offset; ++ cpos_adjusted = 1; ++ } ++ return; ++ } + /* Sometimes it is cheaper to print the characters rather than + use the terminal's capabilities. If we're growing the number + of lines, make sure we actually cause the new line to wrap + around on auto-wrapping terminals. */ +! else if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl)) + { + /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and --- readline5-5.2+dfsg.orig/debian/patches/rl-007 +++ readline5-5.2+dfsg/debian/patches/rl-007 @@ -0,0 +1,72 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-007.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-007. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-007 + +Bug-Reported-by: Tom Bjorkholm +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-04/msg00004.html + + +Bug-Description: + +An off-by-one error in readline's input buffering caused readline to drop +each 511th character of buffered input (e.g., when pasting a large amount +of data into a terminal window). + +Patch: + +*** ../readline-5.2/input.c Wed Aug 16 15:15:16 2006 +--- ./input.c Tue Jul 17 09:24:21 2007 +*************** +*** 134,139 **** + + *key = ibuffer[pop_index++]; +! + if (pop_index >= ibuffer_len) + pop_index = 0; + +--- 134,142 ---- + + *key = ibuffer[pop_index++]; +! #if 0 + if (pop_index >= ibuffer_len) ++ #else ++ if (pop_index > ibuffer_len) ++ #endif + pop_index = 0; + +*************** +*** 251,255 **** + { + k = (*rl_getc_function) (rl_instream); +! rl_stuff_char (k); + if (k == NEWLINE || k == RETURN) + break; +--- 254,259 ---- + { + k = (*rl_getc_function) (rl_instream); +! if (rl_stuff_char (k) == 0) +! break; /* some problem; no more room */ + if (k == NEWLINE || k == RETURN) + break; +*************** +*** 374,378 **** +--- 378,386 ---- + } + ibuffer[push_index++] = key; ++ #if 0 + if (push_index >= ibuffer_len) ++ #else ++ if (push_index > ibuffer_len) ++ #endif + push_index = 0; + --- readline5-5.2+dfsg.orig/debian/patches/rl-008 +++ readline5-5.2+dfsg/debian/patches/rl-008 @@ -0,0 +1,77 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-008.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-008. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-008 + +Bug-Reported-by: dAniel hAhler +Bug-Reference-ID: <4702ED8A.5000503@thequod.de> +Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/119938 + +Bug-Description: + +When updating the display after displaying, for instance, a list of possible +completions, readline will place the cursor at the wrong position if the +prompt contains invisible characters and a newline. + +Patch: + +*** ../readline-5.2-patched/display.c Mon Aug 6 14:26:29 2007 +--- ./display.c Wed Oct 10 22:43:58 2007 +*************** +*** 1049,1053 **** + else + tx = nleft; +! if (_rl_last_c_pos > tx) + { + _rl_backspace (_rl_last_c_pos - tx); /* XXX */ +--- 1049,1053 ---- + else + tx = nleft; +! if (tx >= 0 && _rl_last_c_pos > tx) + { + _rl_backspace (_rl_last_c_pos - tx); /* XXX */ +*************** +*** 1205,1209 **** + { + register char *ofd, *ols, *oe, *nfd, *nls, *ne; +! int temp, lendiff, wsatend, od, nd; + int current_invis_chars; + int col_lendiff, col_temp; +--- 1205,1209 ---- + { + register char *ofd, *ols, *oe, *nfd, *nls, *ne; +! int temp, lendiff, wsatend, od, nd, o_cpos; + int current_invis_chars; + int col_lendiff, col_temp; +*************** +*** 1466,1469 **** +--- 1466,1471 ---- + } + ++ o_cpos = _rl_last_c_pos; ++ + /* When this function returns, _rl_last_c_pos is correct, and an absolute + cursor postion in multibyte mode, but a buffer index when not in a +*************** +*** 1475,1479 **** + invisible characters in the prompt string. Let's see if setting this when + we make sure we're at the end of the drawn prompt string works. */ +! if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && _rl_last_c_pos == prompt_physical_chars) + cpos_adjusted = 1; + #endif +--- 1477,1483 ---- + invisible characters in the prompt string. Let's see if setting this when + we make sure we're at the end of the drawn prompt string works. */ +! if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 && +! (_rl_last_c_pos > 0 || o_cpos > 0) && +! _rl_last_c_pos == prompt_physical_chars) + cpos_adjusted = 1; + #endif --- readline5-5.2+dfsg.orig/debian/patches/rl-009 +++ readline5-5.2+dfsg/debian/patches/rl-009 @@ -0,0 +1,52 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-009.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-009. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-009 + +Bug-Reported-by: dAniel hAhler +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +Under some circumstances, readline will incorrectly display a prompt string +containing invisible characters after the final newline. + +Patch: + +*** ../readline-5.2-patched/display.c 2007-08-25 13:47:08.000000000 -0400 +--- ./display.c 2007-11-10 17:51:29.000000000 -0500 +*************** +*** 392,396 **** + local_prompt = expand_prompt (p, &prompt_visible_length, + &prompt_last_invisible, +! (int *)NULL, + &prompt_physical_chars); + c = *t; *t = '\0'; +--- 420,424 ---- + local_prompt = expand_prompt (p, &prompt_visible_length, + &prompt_last_invisible, +! &prompt_invis_chars_first_line, + &prompt_physical_chars); + c = *t; *t = '\0'; +*************** +*** 399,403 **** + local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, + (int *)NULL, +! &prompt_invis_chars_first_line, + (int *)NULL); + *t = c; +--- 427,431 ---- + local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, + (int *)NULL, +! (int *)NULL, + (int *)NULL); + *t = c; --- readline5-5.2+dfsg.orig/debian/patches/rl-010 +++ readline5-5.2+dfsg/debian/patches/rl-010 @@ -0,0 +1,54 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-010.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-010. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-010 + +Bug-Reported-by: Miroslav Lichvar +Bug-Reference-ID: Fri, 02 Nov 2007 14:07:45 +0100 +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2007-11/msg00000.html + +Bug-Description: + +In certain cases when outputting characters at the end of the line, +e.g., when displaying the prompt string, readline positions the cursor +incorrectly if the prompt string contains invisible characters and the +text being drawn begins before the last invisible character in the line. + +Patch: + +*** ../readline-5.2-patched/display.c 2007-08-25 13:47:08.000000000 -0400 +--- ./display.c 2007-11-10 17:51:29.000000000 -0500 +*************** +*** 1566,1574 **** + else + { +- /* We have horizontal scrolling and we are not inserting at +- the end. We have invisible characters in this line. This +- is a dumb update. */ + _rl_output_some_chars (nfd, temp); + _rl_last_c_pos += col_temp; + return; + } +--- 1619,1632 ---- + else + { + _rl_output_some_chars (nfd, temp); + _rl_last_c_pos += col_temp; ++ /* If nfd begins before any invisible characters in the prompt, ++ adjust _rl_last_c_pos to account for wrap_offset and set ++ cpos_adjusted to let the caller know. */ ++ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible)) ++ { ++ _rl_last_c_pos -= wrap_offset; ++ cpos_adjusted = 1; ++ } + return; + } --- readline5-5.2+dfsg.orig/debian/patches/rl-011 +++ readline5-5.2+dfsg/debian/patches/rl-011 @@ -0,0 +1,39 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-011.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-011. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-011 + +Bug-Reported-by: Uwe Doering +Bug-Reference-ID: <46F3DD72.2090801@geminix.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2007-09/msg00102.html + +Bug-Description: + +There is an off-by-one error in the code that buffers characters received +very quickly in succession, causing characters to be dropped. + +Patch: + +*** ../readline-5.2-patched/input.c 2007-08-25 13:47:10.000000000 -0400 +--- ./input.c 2007-10-12 22:55:25.000000000 -0400 +*************** +*** 155,159 **** + pop_index--; + if (pop_index < 0) +! pop_index = ibuffer_len - 1; + ibuffer[pop_index] = key; + return (1); +--- 155,159 ---- + pop_index--; + if (pop_index < 0) +! pop_index = ibuffer_len; + ibuffer[pop_index] = key; + return (1); --- readline5-5.2+dfsg.orig/debian/patches/rl-012 +++ readline5-5.2+dfsg/debian/patches/rl-012 @@ -0,0 +1,157 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-012.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-012. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-012 + +Bug-Reported-by: Chet Ramey +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +This updates the options required to create shared libraries on several +systems, including Mac OS X 10.5 (darwin9.x), FreeBSD, NetBSD, OpenBSD, +AIX, and HP/UX. + +Patch: + +*** ../readline-5.2-patched/support/shobj-conf 2006-04-11 09:15:43.000000000 -0400 +--- ./support/shobj-conf 2007-12-06 23:46:41.000000000 -0500 +*************** +*** 11,15 **** + # chet@po.cwru.edu + +! # Copyright (C) 1996-2002 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify +--- 11,15 ---- + # chet@po.cwru.edu + +! # Copyright (C) 1996-2007 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify +*************** +*** 115,119 **** + ;; + +! freebsd2* | netbsd*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD=ld +--- 115,119 ---- + ;; + +! freebsd2*) + SHOBJ_CFLAGS=-fpic + SHOBJ_LD=ld +*************** +*** 126,130 **** + # FreeBSD-3.x ELF + freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*) +! SHOBJ_CFLAGS=-fpic + SHOBJ_LD='${CC}' + +--- 126,130 ---- + # FreeBSD-3.x ELF + freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*) +! SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' + +*************** +*** 143,147 **** + + # Darwin/MacOS X +! darwin8*) + SHOBJ_STATUS=supported + SHLIB_STATUS=supported +--- 143,147 ---- + + # Darwin/MacOS X +! darwin[89]*) + SHOBJ_STATUS=supported + SHLIB_STATUS=supported +*************** +*** 154,158 **** + SHLIB_LIBSUFF='dylib' + +! SHOBJ_LDFLAGS='-undefined dynamic_lookup' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + +--- 154,158 ---- + SHLIB_LIBSUFF='dylib' + +! SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + +*************** +*** 172,176 **** + + case "${host_os}" in +! darwin[78]*) SHOBJ_LDFLAGS='' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + ;; +--- 172,176 ---- + + case "${host_os}" in +! darwin[789]*) SHOBJ_LDFLAGS='' + SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' + ;; +*************** +*** 183,187 **** + ;; + +! openbsd*) + SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' +--- 183,187 ---- + ;; + +! openbsd*|netbsd*) + SHOBJ_CFLAGS=-fPIC + SHOBJ_LD='${CC}' +*************** +*** 248,252 **** + ;; + +! aix4.[2-9]*-*gcc*) # lightly tested by jik@cisco.com + SHOBJ_CFLAGS=-fpic + SHOBJ_LD='ld' +--- 248,252 ---- + ;; + +! aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com + SHOBJ_CFLAGS=-fpic + SHOBJ_LD='ld' +*************** +*** 259,263 **** + ;; + +! aix4.[2-9]*) + SHOBJ_CFLAGS=-K + SHOBJ_LD='ld' +--- 259,263 ---- + ;; + +! aix4.[2-9]*|aix[5-9].*) + SHOBJ_CFLAGS=-K + SHOBJ_LD='ld' +*************** +*** 330,334 **** + # if you have problems linking here, moving the `-Wl,+h,$@' from + # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work +! SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s' + + SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)' +--- 330,334 ---- + # if you have problems linking here, moving the `-Wl,+h,$@' from + # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work +! SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s' + + SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)' --- readline5-5.2+dfsg.orig/debian/patches/rl-013 +++ readline5-5.2+dfsg/debian/patches/rl-013 @@ -0,0 +1,142 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-013.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: readline upstream patch readline52-013. + +@DPATCH@ + READLINE PATCH REPORT + ===================== + +Readline-Release: 5.2 +Patch-ID: readline52-013 + +Bug-Reported-by: slinkp +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2008-05/msg00085.html + +Bug-Description: + +The presence of invisible characters in a prompt longer than the screenwidth +with invisible characters on the first and last prompt lines caused readline +to place the cursor in the wrong physical location. + +Patch: + +*** ../readline-5.2-patched/display.c 2007-12-14 21:12:40.000000000 -0500 +--- ./display.c 2008-10-23 09:39:46.000000000 -0400 +*************** +*** 911,914 **** +--- 944,951 ---- + OFFSET (which has already been calculated above). */ + ++ #define INVIS_FIRST() (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset) ++ #define WRAP_OFFSET(line, offset) ((line == 0) \ ++ ? (offset ? INVIS_FIRST() : 0) \ ++ : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0)) + #define W_OFFSET(line, offset) ((line) == 0 ? offset : 0) + #define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l])) +*************** +*** 945,949 **** + _rl_last_c_pos > wrap_offset && + o_cpos < prompt_last_invisible) +! _rl_last_c_pos -= wrap_offset; + + /* If this is the line with the prompt, we might need to +--- 982,992 ---- + _rl_last_c_pos > wrap_offset && + o_cpos < prompt_last_invisible) +! _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */ +! else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth && +! (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && +! cpos_adjusted == 0 && +! _rl_last_c_pos != o_cpos && +! _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line)) +! _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line); + + /* If this is the line with the prompt, we might need to +*************** +*** 1205,1209 **** + { + register char *ofd, *ols, *oe, *nfd, *nls, *ne; +! int temp, lendiff, wsatend, od, nd, o_cpos; + int current_invis_chars; + int col_lendiff, col_temp; +--- 1264,1268 ---- + { + register char *ofd, *ols, *oe, *nfd, *nls, *ne; +! int temp, lendiff, wsatend, od, nd, twidth, o_cpos; + int current_invis_chars; + int col_lendiff, col_temp; +*************** +*** 1221,1225 **** + temp = _rl_last_c_pos; + else +! temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); + if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode + && _rl_last_v_pos == current_line - 1) +--- 1280,1284 ---- + temp = _rl_last_c_pos; + else +! temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset); + if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode + && _rl_last_v_pos == current_line - 1) +*************** +*** 1587,1599 **** + { + _rl_output_some_chars (nfd + lendiff, temp - lendiff); +- #if 1 + /* XXX -- this bears closer inspection. Fixes a redisplay bug + reported against bash-3.0-alpha by Andreas Schwab involving + multibyte characters and prompt strings with invisible + characters, but was previously disabled. */ +! _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); +! #else +! _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff); +! #endif + } + } +--- 1648,1660 ---- + { + _rl_output_some_chars (nfd + lendiff, temp - lendiff); + /* XXX -- this bears closer inspection. Fixes a redisplay bug + reported against bash-3.0-alpha by Andreas Schwab involving + multibyte characters and prompt strings with invisible + characters, but was previously disabled. */ +! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) +! twidth = _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); +! else +! twidth = temp - lendiff; +! _rl_last_c_pos += twidth; + } + } +*************** +*** 1789,1793 **** + int cpos, dpos; /* current and desired cursor positions */ + +! woff = W_OFFSET (_rl_last_v_pos, wrap_offset); + cpos = _rl_last_c_pos; + #if defined (HANDLE_MULTIBYTE) +--- 1850,1854 ---- + int cpos, dpos; /* current and desired cursor positions */ + +! woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset); + cpos = _rl_last_c_pos; + #if defined (HANDLE_MULTIBYTE) +*************** +*** 1803,1807 **** + prompt string, since they're both buffer indices and DPOS is a + desired display position. */ +! if (new > prompt_last_invisible) /* XXX - don't use woff here */ + { + dpos -= woff; +--- 1864,1872 ---- + prompt string, since they're both buffer indices and DPOS is a + desired display position. */ +! if ((new > prompt_last_invisible) || /* XXX - don't use woff here */ +! (prompt_physical_chars > _rl_screenwidth && +! _rl_last_v_pos == prompt_last_screen_line && +! wrap_offset != woff && +! new > (prompt_last_invisible-_rl_screenwidth-wrap_offset))) + { + dpos -= woff; --- readline5-5.2+dfsg.orig/debian/patches/rl-attribute.dpatch +++ readline5-5.2+dfsg/debian/patches/rl-attribute.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-attribute.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Do not redefine __attribute__, define macro __rl_attribute__ + +@DPATCH@ +diff -urNad readline5-5.2~/readline.h readline5-5.2/readline.h +--- readline5-5.2~/readline.h 2006-08-16 21:16:59.000000000 +0200 ++++ readline5-5.2/readline.h 2006-10-28 14:03:36.000000000 +0200 +@@ -373,7 +373,7 @@ + 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 +diff -urNad readline5-5.2~/rlstdc.h readline5-5.2/rlstdc.h +--- readline5-5.2~/rlstdc.h 2003-05-30 21:08:02.000000000 +0200 ++++ readline5-5.2/rlstdc.h 2006-10-28 14:03:36.000000000 +0200 +@@ -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 + + #endif /* !_RL_STDC_H_ */ --- readline5-5.2+dfsg.orig/debian/patches/rl-header.dpatch +++ readline5-5.2+dfsg/debian/patches/rl-header.dpatch @@ -0,0 +1,29 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-header.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Include stdio.h in readline.h and history.h + +@DPATCH@ +diff -urNad readline5-5.2~/history.h readline5-5.2/history.h +--- readline5-5.2~/history.h 2003-07-31 14:38:44.000000000 +0200 ++++ readline5-5.2/history.h 2006-10-28 14:06:20.000000000 +0200 +@@ -32,6 +32,7 @@ + # include "rlstdc.h" + # include "rltypedefs.h" + #else ++# include + # include + # include + #endif +diff -urNad readline5-5.2~/readline.h readline5-5.2/readline.h +--- readline5-5.2~/readline.h 2006-08-16 21:16:59.000000000 +0200 ++++ readline5-5.2/readline.h 2006-10-28 14:06:20.000000000 +0200 +@@ -33,6 +33,7 @@ + # include "keymaps.h" + # include "tilde.h" + #else ++# include + # include + # include + # include --- readline5-5.2+dfsg.orig/debian/patches/rl-no-cross-check.dpatch +++ readline5-5.2+dfsg/debian/patches/rl-no-cross-check.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-no-cross-check.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: configure: Don't check for cross compilation + +@DPATCH@ +diff -urNad readline5-5.2~/configure readline5-5.2/configure +--- readline5-5.2~/configure 2006-09-28 18:04:36.000000000 +0200 ++++ readline5-5.2/configure 2006-10-28 14:20:05.000000000 +0200 +@@ -1938,7 +1938,7 @@ + echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 + # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 + # If not cross compiling, check that we can run a simple program. +-if test "$cross_compiling" != yes; then ++if false && test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 --- readline5-5.2+dfsg.orig/debian/patches/rl-no-non-DFSG-doc.dpatch +++ readline5-5.2+dfsg/debian/patches/rl-no-non-DFSG-doc.dpatch @@ -0,0 +1,37 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-no-non-DFSG-doc.dpatch by David Prévot +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Do not build nor ship non DFSG doc + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' readline5-5.2+dfsg~/doc/Makefile.in readline5-5.2+dfsg/doc/Makefile.in +--- readline5-5.2+dfsg~/doc/Makefile.in 2004-01-08 11:42:54.000000000 -0400 ++++ readline5-5.2+dfsg/doc/Makefile.in 2012-12-30 19:06:54.000000000 -0400 +@@ -72,7 +72,6 @@ + GROFF = groff + + DVIOBJ = readline.dvi history.dvi rluserman.dvi +-INFOOBJ = readline.info history.info rluserman.info + PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps + HTMLOBJ = readline.html history.html rluserman.html + TEXTOBJ = readline.0 history.0 +@@ -198,18 +197,12 @@ + install: installdirs + if test -f readline.info; then \ + ${INSTALL_DATA} readline.info $(DESTDIR)$(infodir)/readline.info; \ +- else \ +- ${INSTALL_DATA} $(srcdir)/readline.info $(DESTDIR)$(infodir)/readline.info; \ + fi + if test -f rluserman.info; then \ + ${INSTALL_DATA} rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ +- else \ +- ${INSTALL_DATA} $(srcdir)/rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ + fi + if test -f history.info; then \ + ${INSTALL_DATA} history.info $(DESTDIR)$(infodir)/history.info; \ +- else \ +- ${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \ + fi + -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + install-info --dir-file=$(DESTDIR)$(infodir)/dir \ --- readline5-5.2+dfsg.orig/debian/patches/rl-no-rpath.dpatch +++ readline5-5.2+dfsg/debian/patches/rl-no-rpath.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## rl-no-rpath.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Don't set a runtime path for linking the shared libraries + +@DPATCH@ +diff -urNad readline5-5.2~/support/shobj-conf readline5-5.2/support/shobj-conf +--- readline5-5.2~/support/shobj-conf 2006-04-11 15:15:43.000000000 +0200 ++++ readline5-5.2/support/shobj-conf 2006-10-28 14:21:36.000000000 +0200 +@@ -110,7 +110,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)' + ;; + --- readline5-5.2+dfsg.orig/debian/readline-common.overrides +++ readline5-5.2+dfsg/debian/readline-common.overrides @@ -0,0 +1 @@ +readline-common: manpage-section-mismatch --- readline5-5.2+dfsg.orig/debian/readline-common.postinst +++ readline5-5.2+dfsg/debian/readline-common.postinst @@ -0,0 +1,13 @@ +#! /bin/sh -e + +install_from_default() { + if [ ! -f $2 ]; then + cp -p $1 $2 + fi +} + +if [ "$1" = "configure" ] && [ "$2" = "" ]; then + install_from_default /usr/share/readline/inputrc /etc/inputrc +fi + +#DEBHELPER# --- readline5-5.2+dfsg.orig/debian/readline-common.postrm +++ readline5-5.2+dfsg/debian/readline-common.postrm @@ -0,0 +1,8 @@ +#! /bin/sh -e + +case "$1" in + purge) + rm -f /etc/inputrc +esac + +#DEBHELPER# --- readline5-5.2+dfsg.orig/debian/rl-inputrc.dpatch +++ readline5-5.2+dfsg/debian/rl-inputrc.dpatch @@ -0,0 +1,102 @@ +#! /bin/sh -e + +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" +elif [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi +case "$1" in + -patch) patch $pdir -f --no-backup-if-mismatch -p3 < $0;; + -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p3 < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +esac +exit 0 + +# DP: Support for /etc/inputrc in addition to ~/inputrc + +diff -ur bash.saved/lib/readline/bind.c bash/lib/readline/bind.c +--- bash.saved/lib/readline/bind.c 2005-01-16 13:18:30.000000000 +0100 ++++ bash/lib/readline/bind.c 2005-01-16 13:21:43.000000000 +0100 +@@ -713,6 +713,9 @@ + /* The last key bindings file read. */ + static char *last_readline_init_file = (char *)NULL; + ++/* Flag to read system init file */ ++static int read_system_init_file = 0; ++ + /* The file we're currently reading key bindings from. */ + static const char *current_readline_init_file; + static int current_readline_init_include_level; +@@ -780,7 +783,7 @@ + to the first non-null filename from this list: + 1. the filename used for the previous call + 2. the value of the shell variable `INPUTRC' +- 3. ~/.inputrc ++ 3. /etc/inputrc and ~/.inputrc + If the file existed and could be opened and read, 0 is returned, + otherwise errno is returned. */ + int +@@ -791,14 +794,31 @@ + if (filename == 0) + { + filename = last_readline_init_file; +- if (filename == 0) ++ if (filename == 0) { + filename = sh_get_env_value ("INPUTRC"); +- if (filename == 0) ++ read_system_init_file = 0; ++ } ++ if (filename == 0) { + filename = DEFAULT_INPUTRC; ++ read_system_init_file = 1; ++ } + } + +- if (*filename == 0) ++ if (*filename == 0) { + filename = DEFAULT_INPUTRC; ++ read_system_init_file = 1; ++ } ++ ++ if (read_system_init_file) ++ if (filename == last_readline_init_file) ++ { ++ filename = savestring (filename); ++ _rl_read_init_file (SYSTEM_INPUTRC, 0); ++ free (last_readline_init_file); ++ last_readline_init_file = filename; ++ } ++ else ++ _rl_read_init_file (SYSTEM_INPUTRC, 0); + + #if defined (__MSDOS__) + if (_rl_read_init_file (filename, 0) == 0) +Only in bash/lib/readline: bind.c.orig +Only in bash/lib/readline: bind.c.rej +diff -ur bash.saved/lib/readline/doc/rluser.texi bash/lib/readline/doc/rluser.texi +--- bash.saved/lib/readline/doc/rluser.texi 2005-01-16 13:18:30.000000000 +0100 ++++ bash/lib/readline/doc/rluser.texi 2005-01-16 13:21:28.000000000 +0100 +@@ -336,7 +336,8 @@ + @ifclear BashFeatures + file is taken from the value of the environment variable @env{INPUTRC}. If + @end ifclear +-that variable is unset, the default is @file{~/.inputrc}. ++that variable is unset, Readline will read both @file{/etc/inputrc} and ++@file{~/.inputrc}. + + When a program which uses the Readline library starts up, the + init file is read, and the key bindings are set. +diff -ur bash.saved/lib/readline/rlconf.h bash/lib/readline/rlconf.h +--- bash.saved/lib/readline/rlconf.h 2005-01-16 13:18:30.000000000 +0100 ++++ bash/lib/readline/rlconf.h 2005-01-16 13:21:28.000000000 +0100 +@@ -39,6 +39,7 @@ + + /* The final, last-ditch effort file name for an init file. */ + #define DEFAULT_INPUTRC "~/.inputrc" ++#define SYSTEM_INPUTRC "/etc/inputrc" + + /* If defined, expand tabs to spaces. */ + #define DISPLAY_TABS --- readline5-5.2+dfsg.orig/debian/rlfe.1 +++ readline5-5.2+dfsg/debian/rlfe.1 @@ -0,0 +1,64 @@ +.TH RLFE 1 +.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.SH NAME +rlfe \- "cook" input lines for other programs using readline +.SH SYNOPSIS +.PP +\fBrlfe\fP [\fI-l filename\fP] [\fI-a\fP] [\fI-n appname\fP] [\fI-hv\fP] [\fIcommand\fP [\fIarguments ...\fP]] +.PP +.SH "DESCRIPTION" +.PP +.B rlfe +lets you use history and line-editing in any text oriented tool. This +is especially useful with third-party proprietary tools that cannot be +distributed linked against readline. It is not perfect but it works +pretty well. +.SH OPTIONS +.TP +-a +append to the logfile (default is to overwrite). +.TP +-l filename +log into file. +.TP +-n appname +set the readline application name. +.TP +-h +print usage string. +.TP +-v +print version information. +.SH "SEE ALSO" +readline(3) +.SH AUTHOR +Per Bothner +.SH PROBLEMS/TODO +When running mc -c under the Linux console, mc does not recognize +mouse clicks, which mc does when not running under fep. +.PP +Pasting selected text containing tabs is like hitting the tab character, +which invokes readline completion. We don't want this. I don't know +if this is fixable without integrating fep into a terminal emulator. +.PP +Echo suppression is a kludge, but can only be avoided with better kernel +support: We need a tty mode to disable "real" echoing, while still +letting the inferior think its tty driver to doing echoing. +Stevens's book claims SCR$ and BSD4.3+ have TIOCREMOTE. +.PP +The latest readline may have some hooks we can use to avoid having +to back up the prompt. +.PP +Desirable readline feature: When in cooked no-echo mode (e.g. password), +echo characters are they are types with '*', but remove them when done. +.PP +A synchronous output while we're editing an input line should be +inserted in the output view.PPbefore* the input line, so that the +lines being edited (with the prompt) float at the end of the input. +.PP +A "page mode" option to emulate more/less behavior: At each page of +output, pause for a user command. This required parsing the output +to keep track of line lengths. It also requires remembering the +output, if we want an option to scroll back, which suggests that +this should be integrated with a terminal emulator like xterm. --- readline5-5.2+dfsg.orig/debian/rlfe.copyright +++ readline5-5.2+dfsg/debian/rlfe.copyright @@ -0,0 +1,28 @@ +This is Debian GNU/Linux's prepackaged version of the rlfe program. +This package was put together by Matthias Klose . + +Upstream source: + ftp.gnu.org:/pub/gnu/readline/readline-4.3.tar.gz. + +Author: Per Bothner + +Copyright: + +/* A front-end using readline to "cook" input lines for Kawa. + * + * Copyright (C) 1999 Per Bothner + * + * This front-end program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * Some code from Johnson & Troan: "Linux Application Development" + * (Addison-Wesley, 1998) was used directly or for inspiration. + */ + +You should have received a copy of the GNU General Public License with +your Debian GNU/Linux system, in /usr/share/common-licenses/GPL-2, or with +the Debian GNU/Linux bash source package as the file COPYING. If not, +write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, +Boston, MA 02110-1301, USA. --- readline5-5.2+dfsg.orig/debian/rules +++ readline5-5.2+dfsg/debian/rules @@ -0,0 +1,268 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +include /usr/share/dpatch/dpatch.make + +soversion = 5 +libversion = $(soversion).2 + +# architecture dependent variables +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) +DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) + +distribution := $(shell lsb_release -is) + +DPKG_EXPORT_BUILDFLAGS = 1 +-include /usr/share/dpkg/buildflags.mk + +ifeq ($(origin CC),default) +CC = $(DEB_HOST_GNU_TYPE)-gcc +endif + +CFLAGS += -g -O2 + +ifeq ($(DEB_HOST_ARCH_OS),netbsd) + CC_LINK_FLAGS = +else + CC_LINK_FLAGS = -Wl, +endif + +SHELL = bash + +p_rl = libreadline$(soversion) +p_comm = readline-common +p_rld = libreadline-gplv2-dev +p_rlg = $(p_rl)-dbg +p_doc = $(p_rl)-doc +p_rlfe = rlfe + +d = debian/tmp +d_rl = debian/$(p_rl) +d_comm = debian/$(p_comm) +d_rld = debian/$(p_rld) +d_rlg = debian/$(p_rlg) +d_doc = debian/$(p_doc) +d_rlfe = debian/$(p_rlfe) + +srcdir = $(CURDIR) +builddir = $(CURDIR)/build + +default: build + +configure: dpatch configure-stamp +configure-stamp: patch-stamp + dh_testdir + cp -p /usr/share/misc/config.* ./support/ + rm -rf $(builddir) + mkdir $(builddir) + find . -type d | xargs chmod g-s + cd $(builddir) && \ + CC=$(CC) $(srcdir)/configure \ + --with-curses --prefix=/usr\ + --host=$(DEB_HOST_GNU_TYPE) \ + --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) + + touch configure-stamp + +#ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +#build: build-stamp build-rlfe-stamp +#else +build: build-stamp +#endif +build-arch: build +build-indep: build + +build-stamp: configure-stamp + dh_testdir + $(MAKE) -C $(builddir) \ + SHOBJ_CFLAGS="-fPIC -D_REENTRANT" \ + SHLIB_LIBS="-ltinfo" + + $(MAKE) -C $(builddir)/doc info + + touch build-stamp + +build-rlfe-stamp: configure-stamp + dh_testdir + ln -sf libhistory.so.$(libversion) \ + $(builddir)/shlib/libhistory.so.$(soversion) + ln -sf libhistory.so.$(soversion) $(builddir)/shlib/libhistory.so + ln -sf libreadline.so.$(libversion) \ + $(builddir)/shlib/libreadline.so.$(soversion) + ln -sf libreadline.so.$(soversion) $(builddir)/shlib/libreadline.so + rm -rf $(builddir)/examples/rlfe + cp -a examples/rlfe $(builddir)/examples/ + ln -sf ../../.. $(builddir)/examples/rlfe/readline + cd $(builddir)/examples/rlfe \ + && ./configure --prefix=/usr --host=$(DEB_HOST_GNU_TYPE) + $(MAKE) -C $(builddir)/examples/rlfe \ + LDFLAGS="-g -L$(builddir)/shlib" rlfe + touch build-rlfe-stamp + +clean: unpatch + dh_testdir + dh_testroot + rm -f configure*-stamp build*-stamp install-stamp + rm -rf autom4te.cache + rm -rf $(builddir) + rm -f doc/*.dvi + rm -f debian/shlibs.local + $(MAKE) -f debian/rules unpatch + rm -f patch-stamp* + find . -type d | xargs chmod g-s + rm -f support/config.guess support/config.sub + dh_clean + +install: install-stamp +install-stamp: + dh_testdir + dh_testroot + dh_clean -k + rm -rf $(d) + mkdir -p $(d)/usr/bin + $(MAKE) -C $(builddir) install \ + CFLAGS="-g -O2 -D_REENTRANT" \ + DESTDIR=$(CURDIR)/$(d) \ + mandir=/usr/share/man \ + infodir=/usr/share/info + + : # move $(p_rl) + dh_installdirs -p$(p_rl) \ + etc \ + lib/$(DEB_HOST_MULTIARCH) \ + usr/share/doc + cp -a $(d)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.so.* $(d_rl)/lib/$(DEB_HOST_MULTIARCH) +# cp -a $(d)/usr/lib/lib{history,readline}.so.$(libversion) $(d_rl)/lib/ +# ln -s libhistory.so.$(libversion) \ +# $(d_rl)/lib/libhistory.so.$(soversion) +# ln -s libreadline.so.$(libversion) \ +# $(d_rl)/lib/libreadline.so.$(soversion) + + : # move $(p_comm) +ifeq (0,1) + dh_installdirs -p$(p_comm) \ + etc \ + usr/share/readline \ + usr/share/info \ + usr/share/doc + mv $(d)/usr/share/man $(d_comm)/usr/share/. + mv $(d_comm)/usr/share/man/man3/history.3 \ + $(d_comm)/usr/share/man/man3/history.3readline + mv $(d_comm)/usr/share/man/man3/readline.3 \ + $(d_comm)/usr/share/man/man3/readline.3readline + install -m 644 debian/inputrc $(d_comm)/usr/share/readline/ +endif + + : # move $(p_rlg) + dh_installdirs -p$(p_rlg) \ + usr/lib/debug \ + usr/share/doc + mv $(d)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.so.$(libversion) \ + $(d_rlg)/usr/lib/debug/. + ln -s libhistory.so.$(libversion) \ + $(d_rlg)/usr/lib/debug/libhistory.so.$(soversion) + ln -s libreadline.so.$(libversion) \ + $(d_rlg)/usr/lib/debug/libreadline.so.$(soversion) + + : # move $(p_rld) + dh_installdirs -p$(p_rld) \ + usr/lib/$(DEB_HOST_MULTIARCH) \ + usr/share/doc + ln -s /lib/$(DEB_HOST_MULTIARCH)/libhistory.so.$(soversion) $(d_rld)/usr/lib/$(DEB_HOST_MULTIARCH)/libhistory.so + ln -s /lib/$(DEB_HOST_MULTIARCH)/libreadline.so.$(soversion) $(d_rld)/usr/lib/$(DEB_HOST_MULTIARCH)/libreadline.so + mv $(d)/usr/lib/$(DEB_HOST_MULTIARCH)/lib{history,readline}.a $(d_rld)/usr/lib/$(DEB_HOST_MULTIARCH)/. + mv $(d)/usr/include $(d_rld)/usr/. + + : # remove HAVE_CONFIG_H from installed headers + awk '/^#if defined \(HAVE_CONFIG_H\)/, /^#endif/ \ + {if ($$0 == "#else") print "#include "; next} {print}' \ + $(d_rld)/usr/include/readline/chardefs.h \ + > $(d_rld)/usr/include/readline/chardefs.h.new + if diff -u $(d_rld)/usr/include/readline/chardefs.h \ + $(d_rld)/usr/include/readline/chardefs.h.new; \ + then \ + rm -f $(d_rld)/usr/include/readline/chardefs.h.new; \ + else \ + mv -f $(d_rld)/usr/include/readline/chardefs.h.new \ + $(d_rld)/usr/include/readline/chardefs.h; \ + fi + +ifeq (0,1) + : # install $(p_rlfe) +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + dh_installdirs -p$(p_rlfe) \ + usr/bin usr/share/man/man1 \ + usr/share/doc/$(p_rlfe) + cp -p $(builddir)/examples/rlfe/rlfe $(d_rlfe)/usr/bin/. + cp -p debian/rlfe.1 $(d_rlfe)/usr/share/man/man1/. +endif +endif + + touch install-stamp + +binary-indep: build install +ifeq (0,1) + dh_testdir + dh_testroot + mkdir -p $(d_comm)/usr/share/lintian/overrides + cp -p debian/readline-common.overrides \ + $(d_comm)/usr/share/lintian/overrides/readline-common + dh_installdocs -p$(p_comm) debian/inputrc.arrows + dh_installchangelogs -p$(p_comm) + dh_installdocs -p$(p_comm) + dh_installchangelogs -p$(p_comm) + dh_compress -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i +endif + +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs -p$(p_rl) \ + USAGE debian/inputrc.arrows + dh_installchangelogs -p$(p_rl) CHANGES + dh_installexamples -p$(p_rl) \ + examples/Inputrc + mkdir -p $(d_rld)/usr/share/doc/$(p_rl)/examples + cp -p $(builddir)/examples/Makefile examples/*.c \ + $(d_rld)/usr/share/doc/$(p_rl)/examples/ + sed -i -e's,srcdir = .*/readline5-5.*/examples,srcdir = /usr/share/doc/libreadline5/examples,' \ + -e's,VPATH = .:.*/readline5-5.*/examples,VPATH = .:/usr/share/doc/libreadline5/examples,' \ + -e's,top_srcdir = .*/readline5-5.*,top_srcdir = /usr/include/readline/,' \ + $(d_rld)/usr/share/doc/$(p_rl)/examples/Makefile + ln -sf $(p_rl) $(d_rld)/usr/share/doc/$(p_rld) + ln -sf $(p_rl) $(d_rlg)/usr/share/doc/$(p_rlg) + +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +ifeq (0,1) + dh_installdocs -p$(p_rlfe) examples/rlfe/README + dh_installchangelogs -p$(p_rlfe) examples/rlfe/ChangeLog +endif + + dh_fixperms -p$(p_rl) -p$(p_rld) -p$(p_rlg) + dh_strip -p$(p_rl) -p$(p_rld) -p$(p_rlg) + dh_compress -p$(p_rl) -p$(p_rld) -p$(p_rlg) -X.c + dh_makeshlibs -p$(p_rl) -V '$(p_rl) (>= 5.2)' + cp -p debian/$(p_rl).shlibs debian/shlibs.local + dh_shlibdeps -p$(p_rl) -p$(p_rld) -p$(p_rlg) \ + -L $(p_rl) -l $(d_rl)/lib +endif + + dh_installdeb -s + dh_gencontrol -s $(gencontrol_flags) + dh_md5sums -s + dh_builddeb -s + +binary: binary-indep binary-arch + +.PHONY: binary binary-arch binary-indep clean + +# Local Variables: +# mode: makefile +# end: --- readline5-5.2+dfsg.orig/debian/semantic.cache +++ readline5-5.2+dfsg/debian/semantic.cache @@ -0,0 +1,15 @@ +;; Object debian/ +;; SEMANTICDB Tags save file +(semanticdb-project-database-file "debian/" + :tables (list + (semanticdb-table "rules" + :major-mode 'makefile-mode + :tags '(("soversion" variable (:default-value ("5")) nil [40 54]) ("libversion" variable (:default-value ("$(soversion).1")) nil [54 82]) ("build64" variable (:default-value ("yes")) nil [384 398]) ("CC64" variable (:default-value ("gcc" "-m64")) nil [400 416]) ("gencontrol_flags" variable (:default-value ("--" "'-Vlibxx:Depends=libc6-$(ARCH64)'" "'-Vdevxx:Depends=libc6-dev-$(ARCH64)'")) nil [418 518]) ("ARCH64" variable (:default-value ("amd64")) nil [553 568]) ("HOST64" variable (:default-value ("x86_64-linux-gnu")) nil [572 598]) ("ARCH64" variable (:default-value ("ppc64")) nil [644 659]) ("HOST64" variable (:default-value ("ppc64-linux-gnu")) nil [663 688]) ("ARCH64" variable (:default-value ("sparc64")) nil [732 749]) ("HOST64" variable (:default-value ("sparc64-linux-gnu")) nil [753 780]) ("ARCH64" variable (:default-value ("s390x")) nil [823 838]) ("HOST64" variable (:default-value ("s390x-linux-gnu")) nil [842 867]) ("build32" variable (:default-value ("yes")) nil [940 954]) ("CC32" variable (:default-value ("gcc" "-m32")) nil [956 972]) ("gencontrol_flags" variable (:default-value ("--" "'-Vlibxx:Depends=libc6-$(ARCH32)'" "'-Vdevxx:Depends=libc6-dev-$(ARCH32)'")) nil [974 1074]) ("ARCH32" variable (:default-value ("amd64")) nil [1110 1125]) ("HOST32" variable (:default-value ("i486-linux-gnu")) nil [1129 1153]) ("ARCH32" variable (:default-value ("powerpc")) nil [1197 1214]) ("HOST32" variable (:default-value ("powerpc-linux-gnu")) nil [1218 1245]) ("CC_LINK_FLAGS" variable nil nil [1296 1312]) ("CC_LINK_FLAGS" variable (:default-value ("-Wl,")) nil [1319 1340]) ("CC" variable (:default-value ("gcc")) nil [1346 1355]) ("SHELL" variable (:default-value ("bash")) nil [1356 1369]) ("PWD" variable (:default-value ("$(shell pwd)")) nil [1370 1390]) ("p_rl" variable (:default-value ("libreadline$(soversion)")) nil [1390 1421]) ("p_rl32" variable (:default-value ("lib32readline$(soversion)")) nil [1421 1456]) ("p_rl64" variable (:default-value ("lib64readline$(soversion)")) nil [1456 1491]) ("p_comm" variable (:default-value ("readline-common")) nil [1491 1516]) ("p_rld" variable (:default-value ("$(p_rl)-dev")) nil [1516 1536]) ("p_rld32" variable (:default-value ("$(p_rl32)-dev")) nil [1536 1560]) ("p_rld64" variable (:default-value ("$(p_rl64)-dev")) nil [1560 1584]) ("p_rlg" variable (:default-value ("$(p_rl)-dbg")) nil [1584 1604]) ("p_doc" variable (:default-value ("$(p_rl)-doc")) nil [1604 1624]) ("p_rlfe" variable (:default-value ("rlfe")) nil [1624 1638]) ("d" variable (:default-value ("debian/tmp")) nil [1639 1654]) ("d32" variable (:default-value ("debian/tmp32")) nil [1654 1673]) ("d64" variable (:default-value ("debian/tmp64")) nil [1673 1692]) ("d_rl" variable (:default-value ("debian/$(p_rl)")) nil [1692 1714]) ("d_rl32" variable (:default-value ("debian/$(p_rl32)")) nil [1714 1740]) ("d_rl64" variable (:default-value ("debian/$(p_rl64)")) nil [1740 1766]) ("d_comm" variable (:default-value ("debian/$(p_comm)")) nil [1766 1792]) ("d_rld" variable (:default-value ("debian/$(p_rld)")) nil [1792 1816]) ("d_rld32" variable (:default-value ("debian/$(p_rld32)")) nil [1816 1844]) ("d_rld64" variable (:default-value ("debian/$(p_rld64)")) nil [1844 1872]) ("d_rlg" variable (:default-value ("debian/$(p_rlg)")) nil [1872 1896]) ("d_doc" variable (:default-value ("debian/$(p_doc)")) nil [1896 1920]) ("d_rlfe" variable (:default-value ("debian/$(p_rlfe)")) nil [1920 1946]) ("srcdir" variable (:default-value ("$(PWD)")) nil [1947 1964]) ("builddir" variable (:default-value ("$(PWD)/build")) nil [1964 1988]) ("builddir32" variable (:default-value ("$(PWD)/build32")) nil [1988 2016]) ("builddir64" variable (:default-value ("$(PWD)/build64")) nil [2016 2044]) ("default" function (:arguments ("build")) nil [2045 2061]) ("configure" function (:arguments ("configure-stamp")) nil [2061 2103]) ("configure-stamp" function (:arguments ("patch-stamp")) nil [2088 2331]) ("build" function (:arguments ("build-stamp" "build-rlfe-stamp")) nil [2711 2748]) ("build-stamp" function (:arguments ("configure-stamp")) nil [2748 2908]) ("build-rlfe-stamp" function (:arguments ("configure-stamp")) nil [3453 4125]) ("clean" function nil nil [4125 4256]) ("install" function (:arguments ("install-stamp")) nil [4495 4531]) ("install-stamp" function nil nil [4518 4763]) ("binary-indep" function (:arguments ("build" "install")) nil [9268 9697]) ("binary-arch" function (:arguments ("build" "install")) nil [9697 10140]) ("binary" function (:arguments ("binary-indep" "binary-arch")) nil [11493 11528]) ("patchdir" variable (:default-value ("debian/patches")) nil [11780 11806]) ("debian_patches" variable (:default-value ("readline51-001" "readline51-002" "readline51-003" "readline51-004" "rl-inputrc" "rl-header" "rl-attribute" "rl-no-rpath" "rl-no-cross-check" "rlfe-libs")) nil [11842 12026]) ("patch" function (:arguments ("patch-stamp")) nil [12027 12059]) ("apply-patches" function (:arguments ("patch-stamp")) nil [12046 12074]) ("patch-stamp" function (:arguments ("$(foreach p,$(debian_patches),patch-stamp-$(p))")) nil [12074 12338]) ("reverse-patches" function (:arguments ("unpatch")) nil [12338 12370]) ("unpatch" function nil nil [12363 12945]) ("patch-stamp-%" function (:arguments ("$(patchdir)/%.dpatch")) nil [12945 13161]) (".PHONY" function (:arguments ("binary" "binary-arch" "binary-indep" "clean")) nil [13162 13209])) + :file "rules" + :pointmax 13252 + ) + ) + :file "semantic.cache" + :semantic-tag-version "2.0pre3" + :semanticdb-version "2.0pre3" + ) --- readline5-5.2+dfsg.orig/debian/source/format +++ readline5-5.2+dfsg/debian/source/format @@ -0,0 +1 @@ +1.0 --- readline5-5.2+dfsg.orig/debian/watch +++ readline5-5.2+dfsg/debian/watch @@ -0,0 +1,2 @@ +version=2 +ftp://ftp.gnu.org/gnu/readline/readline-(5[\d\.]*).tar.gz debian uupdate