This imports some fixes from Debian. First and foremost:
http://lists.gnu.org/archive/html/bug-bash/2006-11/msg00017.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.
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.
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.
...all related to display.c. Also add include of <stdio.h> to
two of the readline header files.
the correct terminal library that must be linked along with -lreadline.
On NetBSD, this is -ltermcap. On Linux, this should be either -ltinfo
or -lcurses. On Solaris, this should be -lcurses.
+ Add a "termlib" dependency to the devel/readline package that allows
for linking against -lcurses. Bump the PKGREVISON to 1.
1. Changes to Readline
a. Fixed a problem that caused segmentation faults when using readline in
callback mode and typing consecutive DEL characters on an empty line.
b. Fixed several redisplay problems with multibyte characters, all having to
do with the different code paths and variable meanings between single-byte
and multibyte character redisplay.
c. Fixed a problem with key sequence translation when presented with the
sequence \M-\C-x.
d. Fixed a problem that prevented the `a' command in vi mode from being
undone and redone properly.
e. Fixed a problem that prevented empty inserts in vi mode from being undone
properly.
f. Fixed a problem that caused readline to initialize with an incorrect idea
of whether or not the terminal can autowrap.
g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
convert-meta and use \e where appropriate.
h. Changed the default filename completion function to call the filename
dequoting function if the directory completion hook isn't set. This means
that any directory completion hooks need to dequote the directory name,
since application-specific hooks need to know how the word was quoted,
even if no other changes are made.
i. Fixed a bug with creating the prompt for a non-interactive search string
when there are non-printing characters in the primary prompt.
j. Fixed a bug that caused prompts with invisible characters to be redrawn
multiple times in a multibyte locale.
k. Fixed a bug that could cause the key sequence scanning code to return the
wrong function.
l. Fixed a problem with the callback interface that caused it to fail when
using multi-character keyboard macros.
m. Fixed a bug that could cause a core dump when an edited history entry was
re-executed under certain conditions.
n. Fixed a bug that caused readline to reference freed memory when attmpting
to display a portion of the prompt.
o. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
the prompt and input line multiple times.
p. Fixed history expansion to not be confused by here-string redirection.
q. Readline no longer treats read errors by converting them to newlines, as
it does with EOF. This caused partial lines to be returned from readline().
r. Fixed a redisplay bug that occurred in multibyte-capable locales when the
prompt was one character longer than the screen width.
2. New Features in Readline
a. Calling applications can now set the keyboard timeout to 0, allowing
poll-like behavior.
b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
the default last-ditch startup file.
c. The history file reading functions now allow windows-like \r\n line
terminators.
developer is officially maintaining the package.
The rationale for changing this from "tech-pkg" to "pkgsrc-users" is
that it implies that any user can try to maintain the package (by
submitting patches to the mailing list). Since the folks most likely
to care about the package are the folks that want to use it or are
already using it, this would leverage the energy of users who aren't
developers.
This is a terse description of the new features added to readline-5.1 since
the release of readline-5.0.
1. New Features in Readline
a. The key sequence sent by the keypad `delete' key is now automatically
bound to delete-char.
b. A negative argument to menu-complete now cycles backward through the
completion list.
c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
readline will bind the terminal special characters to their readline
equivalents when it's called (on by default).
d. New bindable command: vi-rubout. Saves deleted text for possible
reinsertion, as with any vi-mode `text modification' command; `X' is bound
to this in vi command mode.
e. If the rl_completion_query_items is set to a value < 0, readline never
asks the user whether or not to view the possible completions.
f. New application-callable auxiliary function, rl_variable_value, returns
a string corresponding to a readline variable's value.
g. When parsing inputrc files and variable binding commands, the parser
strips trailing whitespace from values assigned to boolean variables
before checking them.
h. A new external application-controllable variable that allows the LINES
and COLUMNS environment variables to set the window size regardless of
what the kernel returns.
in the process. (More information on tech-pkg.)
Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.
Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
[readline43-001]
Pressing certain key sequences causes an infinite loop in _rl_dispatch_subseq
with the `key' argument set to 256. This eventually causes bash to exceed
the stack size limit and crash with a segmentation violation.
[readline43-002]
Repeating an edit in vi-mode with `.' does not work.
[readline43-003]
When in a locale with multibyte characters, the readline display updater
will occasionally cause a segmentation fault when attempting to compute
the length of the first multibyte character on the line.
[readline43-004]
When running in a locale with multibyte characters, the readline display
updater will use carriage returns when drawing the line, overwriting any
partial output already on the screen and not terminated by a newline.
[readline43-005]
Using the vi editing mode's case-changing commands in a locale with
multibyte characters will cause garbage characters to be inserted into
the editing buffer.
(Any maintainership taker?)
Changes in this version are mostly bugfixes; some new functionality
has been added as well. For an exhaustive list of changes, please
look at the CHANGES file included in the distribution.
buildlink2.mk files back into the main trunk. This provides sufficient
buildlink2 infrastructure to start merging other packages from the
buildlink2 branch that have already been converted to use the buildlink2
framework.
Summary of changes:
- removal of USE_GTEXINFO
- addition of mk/texinfo.mk
- inclusion of this file in package Makefiles requiring it
- `install-info' substituted by `${INSTALL_INFO}' in PLISTs
- tuning of mk/bsd.pkg.mk:
removal of USE_GTEXINFO
INSTALL_INFO added to PLIST_SUBST
`${INSTALL_INFO}' replace `install-info' in target rules
print-PLIST target now generate `${INSTALL_INFO}' instead of `install-info'
- a couple of new patch files added for a handful of packages
- setting of the TEXINFO_OVERRIDE "switch" in packages Makefiles requiring it
- devel/cssc marked requiring texinfo 4.0
- a couple of packages Makefiles were tuned with respect of INFO_FILES and
makeinfo command usage
See -newly added by this commit- section 10.24 of Packages.txt for
further information.
* bug fixes
* improve linking with C++ code
+ a new file, rltypedefs.h, contains the new typedefs for function pointers
+ several minor additions to the API to customize look of readline
+ more complete documentation for public functions and variables
Relevant changes from 4.0:
e. The history library tries to truncate the history file only if it is a
regular file.
f. A bug that caused _rl_dispatch to address negative array indices on
systems with signed chars was fixed.
g. rl-yank-nth-arg now leaves the history position the same as when it was
called.
m. The quoted-insert code will now insert tty special chars like ^C.
n. A bug was fixed that caused the display code to reference memory before
the start of the prompt string.
p. A bug was fixed in readline's signal handling that could cause infinite
recursion in signal handlers.
q. A bug was fixed that caused the point to be less than zero when rl_forward
was given a very large numeric argument.
r. The vi-mode code now gets characters via the application-settable value
of rl_getc_function rather than calling rl_getc directly.
t. Fixed a bug in the redisplay code for lines with more than 256 line
breaks.
u. A bug was fixed which caused invisible character markers to not be
stripped from the prompt string if the terminal was in no-echo mode.
v. Readline no longer tries to get the variables it needs for redisplay
from the termcap entry if the calling application has specified its
own redisplay function. Readline treats the terminal as `dumb' in
this case.
w. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
sequences is redrawn correctly.
b. Parentheses matching is now always compiled into readline, and enabled
or disabled when the value of the `blink-matching-paren' variable is
changed.
e. history-search-{forward,backward} now leave the point at the end of the
line when the string to search for is empty, like
{reverse,forward}-search-history.
f. history-search-{forward,backward} now leave the last history line found
in the readline buffer if the second or subsequent search fails.
g. New function for use by applications: rl_on_new_line_with_prompt, used
when an application displays the prompt itself before calling readline().
h. New variable for use by applications: rl_already_prompted. An application
that displays the prompt itself before calling readline() must set this to
a non-zero value.
i. A new variable, rl_gnu_readline_p, always 1. The intent is that an
application can verify whether or not it is linked with the `real'
readline library or some substitute.
Add a new USE_LIBTOOL definition that uses the libtool package instead of
pkglibtool which is now considered outdated.
USE_PKGLIBTOOL is available for backwards compatibility with old packages
but is deprecated for new packages.
in tree, so take the necessary elements from Jaromir's package:
+ build and install libhistory
+ build and install shared history and readline libraries.
+ install readline and history info pages with the correct names
Preserve change from the original package:
+ don't assume that the Makefile SHELL is Bourne shell - set it
explicitly, so that Bourne shell scripts aren't run by the csh(1)
NetBSD packages collection. This is because some other packages play
dirty and muck about with the internals of the readline structures, so
our libedit-based emulation won't suffice for that. A pity.