pkgsrc/devel/readline/patches/patch-ae
wiz f5fe8940fc Update to 6.0:
This is a terse description of the new features added to readline-6.0 since
the release of readline-5.2.

1.  New Features in Readline

a.  A new variable, rl_sort_completion_matches; allows applications to inhibit
    match list sorting (but beware: some things don't work right if
    applications do this).

b.  A new variable, rl_completion_invoking_key; allows applications to discover
    the key that invoked rl_complete or rl_menu_complete.

c.  The functions rl_block_sigint and rl_release_sigint are now public and
    available to calling applications who want to protect critical sections
    (like redisplay).

d.  The functions rl_save_state and rl_restore_state are now public and
    available to calling applications; documented rest of readline's state
    flag values.

e.  A new user-settable variable, `history-size', allows setting the maximum
    number of entries in the history list.

f.  There is a new implementation of menu completion, with several improvements
    over the old; the most notable improvement is a better `completions
    browsing' mode.

g.  The menu completion code now uses the rl_menu_completion_entry_function
    variable, allowing applications to provide their own menu completion
    generators.

h.  There is support for replacing a prefix  of a pathname with a `...' when
    displaying possible completions.  This is controllable by setting the
    `completion-prefix-display-length' variable.  Matches with a common prefix
    longer than this value have the common prefix replaced with `...'.

i.  There is a new `revert-all-at-newline' variable.  If enabled, readline will
    undo all outstanding changes to all history lines when `accept-line' is
    executed.
2009-02-23 12:35:46 +00:00

94 lines
3 KiB
Text

$NetBSD: patch-ae,v 1.14 2009/02/23 12:35:46 wiz Exp $
--- Makefile.in.orig 2009-01-06 17:03:14.000000000 +0000
+++ Makefile.in
@@ -18,6 +18,9 @@
RL_LIBRARY_VERSION = @LIBVERSION@
RL_LIBRARY_NAME = readline
+SHLIB_MAJOR = @SHLIB_MAJOR@
+SHLIB_MINOR = @SHLIB_MINOR@
+
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
@@ -74,6 +77,7 @@ CTAGS = ctags -tw
CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
DEFS = @DEFS@ @CROSS_COMPILE@
LOCAL_DEFS = @LOCAL_DEFS@
@@ -96,9 +100,15 @@ GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT
${RM} $@
$(CC) -c $(CCFLAGS) $<
+.SUFFIXES: .lo
+.c.lo:
+ ${RM} $@
+ $(LIBTOOL) --mode=compile $(CC) -c $(CCFLAGS) $<
+
# The name of the main library target.
LIBRARY_NAME = libreadline.a
STATIC_LIBS = libreadline.a libhistory.a
+LIBTOOL_LIBS = libreadline.la libhistory.la
# The C code source files for this library.
CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
@@ -147,6 +157,8 @@ INSTALL_TARGETS = @STATIC_INSTALL_TARGET
all: $(TARGETS)
+all-libtool: $(LIBTOOL_LIBS)
+
everything: all examples
static: $(STATIC_LIBS)
@@ -156,17 +168,33 @@ libreadline.a: $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS)
-test -n "$(RANLIB)" && $(RANLIB) $@
+libreadline.la: $(OBJECTS:.o=.lo)
+ $(LIBTOOL) --mode=clean $(RM) $@
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS:.o=.lo) $(TERMCAP_LIB) \
+ -rpath $(libdir) -version-info $(SHLIB_MAJOR):$(SHLIB_MINOR) \
+ $(LDFLAGS)
+
libhistory.a: $(HISTOBJ) xmalloc.o
$(RM) $@
$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
-test -n "$(RANLIB)" && $(RANLIB) $@
+libhistory.la: $(HISTOBJ:.o=.lo) xmalloc.lo
+ $(LIBTOOL) --mode=clean $(RM) $@
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(HISTOBJ:.o=.lo) xmalloc.lo \
+ -rpath $(libdir) -version-info $(SHLIB_MAJOR):$(SHLIB_MINOR) \
+ $(LDFLAGS)
+
# Since tilde.c is shared between readline and bash, make sure we compile
# it with the right flags when it's built as part of readline
tilde.o: tilde.c
rm -f $@
$(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
+tilde.lo: tilde.c
+ $(LIBTOOL) --mode=clean rm -f $@
+ $(LIBTOOL) --mode=compile $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
+
readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
$(CC) $(CCFLAGS) -DREADLINE_LIBRARY -o $@ $(top_srcdir)/examples/rl.c ./libreadline.a ${TERMCAP_LIB}
@@ -251,6 +279,12 @@ install-examples: installdirs install-he
uninstall-examples: maybe-uninstall-headers
-( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
+install-libtool: installdirs $(LIBTOOL_LIBS) install-headers install-doc
+ -$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libreadline.la
+ $(LIBTOOL) --mode=install $(INSTALL) libreadline.la $(DESTDIR)$(libdir)
+ -$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libhistory.la
+ $(LIBTOOL) --mode=install $(INSTALL) libhistory.la $(DESTDIR)$(libdir)
+
install-doc: installdirs
-( if test -d doc ; then \
cd doc && \