Switch back to old package name scheme

OBS-URL: https://build.opensuse.org/package/show/Base:System/readline?expand=0&rev=1
This commit is contained in:
Dr. Werner Fink 2018-03-16 10:45:52 +00:00 committed by Git OBS Bridge
commit f37a9dc085
15 changed files with 3679 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

8
baselibs.conf Normal file
View File

@ -0,0 +1,8 @@
libreadline7
obsoletes "readline-<targettype> <= <version>"
provides "readline-<targettype> = <version>"
readline-devel
requires -readline-<targettype>
requires "libreadline7-<targettype> = <version>"
conflicts "readline5-devel-<targettype>"
conflicts "readline6-devel-<targettype>"

129
readline-5.2-conf.patch Normal file
View File

@ -0,0 +1,129 @@
---
lib/readline/bind.c | 55 ++++++++++++++++++++++++++++++++++---------
lib/readline/doc/rluser.texi | 3 +-
lib/readline/rlconf.h | 2 -
3 files changed, 47 insertions(+), 13 deletions(-)
--- lib/readline/bind.c
+++ lib/readline/bind.c 2017-04-26 13:07:22.115249970 +0000
@@ -826,6 +826,9 @@ rl_function_of_keyseq (keyseq, map, type
/* 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;
@@ -891,11 +894,14 @@ rl_re_read_init_file (count, ignore)
return r;
}
+/* Forward declarations */
+static int sv_bell_style PARAMS((const char *));
+
/* Do key bindings from a file. If FILENAME is NULL it defaults
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
4. /etc/inputrc
If the file existed and could be opened and read, 0 is returned,
otherwise errno is returned. */
@@ -905,18 +911,39 @@ rl_read_init_file (filename)
{
/* Default the filename. */
if (filename == 0)
- filename = last_readline_init_file;
- if (filename == 0)
- filename = sh_get_env_value ("INPUTRC");
- if (filename == 0 || *filename == 0)
+ {
+ filename = last_readline_init_file;
+ if (filename == 0)
+ {
+ filename = sh_get_env_value ("INPUTRC");
+ read_system_init_file = 0;
+ }
+ if (filename == 0)
+ {
+ filename = DEFAULT_INPUTRC;
+ read_system_init_file = 1;
+ }
+ }
+
+ if (*filename == 0)
{
filename = DEFAULT_INPUTRC;
- /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */
- if (_rl_read_init_file (filename, 0) == 0)
- return 0;
- filename = SYS_INPUTRC;
+ read_system_init_file = 1;
}
+ sv_bell_style(sh_get_env_value("DEFAULT_BELL_STYLE"));
+
+ if (read_system_init_file)
+ if (filename == last_readline_init_file)
+ {
+ filename = savestring (filename);
+ _rl_read_init_file (SYS_INPUTRC, 0);
+ free (last_readline_init_file);
+ last_readline_init_file = filename;
+ }
+ else
+ _rl_read_init_file (SYS_INPUTRC, 0);
+
#if defined (__MSDOS__)
if (_rl_read_init_file (filename, 0) == 0)
return 0;
@@ -1467,7 +1494,14 @@ remove_trailing:
rl_macro_bind (seq, &funname[1], _rl_keymap);
}
else
- rl_bind_keyseq (seq, rl_named_function (funname));
+ {
+#if defined (PREFIX_META_HACK)
+ if (_rl_stricmp (funname, "prefix-meta") == 0)
+ rl_generic_bind (ISKMAP, seq, (char *)emacs_meta_keymap, _rl_keymap);
+ else
+#endif
+ rl_bind_keyseq (seq, rl_named_function (funname));
+ }
xfree (seq);
return 0;
@@ -1632,7 +1666,6 @@ typedef int _rl_sv_func_t PARAMS((const
#define V_INT 2
/* Forward declarations */
-static int sv_bell_style PARAMS((const char *));
static int sv_combegin PARAMS((const char *));
static int sv_dispprefix PARAMS((const char *));
static int sv_compquery PARAMS((const char *));
--- lib/readline/doc/rluser.texi
+++ lib/readline/doc/rluser.texi 2017-04-26 12:57:24.590906421 +0000
@@ -349,7 +349,8 @@ file is taken from the value of the envi
@end ifclear
that variable is unset, the default is @file{~/.inputrc}. If that
file does not exist or cannot be read, the ultimate default is
-@file{/etc/inputrc}.
+@file{/etc/inputrc}. If both @file{~/.inputrc} and @file{/etc/inputrc}
+exist Readline will read first @file{/etc/inputrc} and then @file{~/.inputrc}.
When a program which uses the Readline library starts up, the
init file is read, and the key bindings are set.
--- lib/readline/rlconf.h
+++ lib/readline/rlconf.h 2017-04-26 12:57:24.586906499 +0000
@@ -37,7 +37,7 @@
#define HANDLE_SIGNALS
/* Ugly but working hack for binding prefix meta. */
-#define PREFIX_META_HACK
+#undef PREFIX_META_HACK
/* The next-to-last-ditch effort file name for a user-specific init file. */
#define DEFAULT_INPUTRC "~/.inputrc"

24
readline-6.2-endpw.dif Normal file
View File

@ -0,0 +1,24 @@
---
lib/readline/complete.c | 4 ++++
1 file changed, 4 insertions(+)
--- lib/readline/complete.c
+++ lib/readline/complete.c 2011-11-21 12:51:35.695646715 +0000
@@ -89,6 +89,7 @@ typedef int QSFUNC ();
defined. */
#if defined (HAVE_GETPWENT) && (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE))
extern struct passwd *getpwent PARAMS((void));
+extern void endpwent ();
#endif /* HAVE_GETPWENT && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */
/* If non-zero, then this is the address of a function to call when
@@ -2316,6 +2317,9 @@ rl_username_completion_function (text, s
if (first_char == '~')
rl_filename_completion_desired = 1;
+#if defined (HAVE_GETPWENT)
+ /* endpwent (); */
+#endif
return (value);
}
#endif /* !__WIN32__ && !__OPENNT */

View File

@ -0,0 +1,14 @@
---
lib/readline/bind.c | 1 +
1 file changed, 1 insertion(+)
--- lib/readline/bind.c
+++ lib/readline/bind.c 2011-03-04 15:00:17.332426313 +0000
@@ -1613,6 +1613,7 @@ static const struct {
#if defined (VISIBLE_STATS)
{ "visible-stats", &rl_visible_stats, 0 },
#endif /* VISIBLE_STATS */
+ { "meta-mode", &_rl_enable_meta, 0 },
{ (char *)NULL, (int *)NULL, 0 }
};

43
readline-6.2-xmalloc.dif Normal file
View File

@ -0,0 +1,43 @@
---
xfree.c | 3 +++
xmalloc.c | 5 +++++
xmalloc.h | 8 ++++++++
3 files changed, 16 insertions(+)
--- xfree.c
+++ xfree.c 2012-10-17 12:48:37.862344784 +0000
@@ -48,3 +48,6 @@ xfree (string)
if (string)
free (string);
}
+
+#undef xfree
+extern void xfree PARAMS((void *)) __attribute__ ((weak, alias ("_rl_xfree")));
--- xmalloc.c
+++ xmalloc.c 2012-10-17 12:48:28.430844890 +0000
@@ -77,3 +77,8 @@ xrealloc (pointer, bytes)
memory_error_and_abort ("xrealloc");
return (temp);
}
+
+#undef xmalloc
+#undef xrealloc
+extern PTR_T xmalloc PARAMS((size_t)) __attribute__ ((weak, alias ("_rl_xmalloc")));
+extern PTR_T xrealloc PARAMS((void *, size_t)) __attribute__ ((weak, alias ("_rl_xrealloc")));
--- xmalloc.h
+++ xmalloc.h 2012-10-17 12:27:20.325156790 +0000
@@ -38,6 +38,14 @@
#endif /* !PTR_T */
+#undef xmalloc
+#undef xrealloc
+#undef xfree
+
+#define xmalloc _rl_xmalloc
+#define xrealloc _rl_xrealloc
+#define xfree _rl_xfree
+
extern PTR_T xmalloc PARAMS((size_t));
extern PTR_T xrealloc PARAMS((void *, size_t));
extern void xfree PARAMS((void *));

200
readline-6.3-destdir.patch Normal file
View File

@ -0,0 +1,200 @@
---
shlib/Makefile.in | 9 +++++----
support/shlib-install | 47 +++++++++++++++++++++++++++--------------------
2 files changed, 32 insertions(+), 24 deletions(-)
--- shlib/Makefile.in
+++ shlib/Makefile.in 2014-04-17 10:51:05.898235056 +0000
@@ -59,6 +59,7 @@ bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
localedir = @localedir@
+linkagedir = $(libdir)
# Support an alternate destination root directory for package building
DESTDIR =
@@ -192,8 +193,8 @@ installdirs: $(topdir)/support/mkdirs
-$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(bindir)
install-supported: installdirs $(SHLIB_STATUS)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
@echo install: you may need to run ldconfig
install-unsupported:
@@ -202,8 +203,8 @@ install-unsupported:
install: install-$(SHLIB_STATUS)
uninstall-supported:
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -V $(host_vendor) -dd $(DESTDIR) -d $(libdir) -l $(linkagedir) -b $(bindir) -U $(SHARED_READLINE)
@echo uninstall: you may need to run ldconfig
uninstall-unsupported:
--- support/shlib-install
+++ support/shlib-install 2014-04-17 10:54:11.938235782 +0000
@@ -3,7 +3,7 @@
# shlib-install - install a shared library and do any necessary host-specific
# post-installation configuration (like ldconfig)
#
-# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library
+# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-l linkage-dir] [-b bin-dir] -i install-prog [-U] library
#
# Chet Ramey
# chet@po.cwru.edu
@@ -12,10 +12,12 @@
# defaults
#
INSTALLDIR=/usr/local/lib
+LINKAGEDIR=
LDCONFIG=ldconfig
+DESTDIR=
PROGNAME=`basename $0`
-USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library"
+USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] [-l linkage-dir] -d installation-dir [-b bin-dir] -i install-prog [-U] library"
# process options
@@ -24,14 +26,19 @@ while [ $# -gt 0 ]; do
-O) shift; host_os="$1"; shift ;;
-V) shift; host_vendor="$1"; shift ;;
-d) shift; INSTALLDIR="$1"; shift ;;
+ -dd) shift; DESTDIR=$1; shift ;;
-b) shift; BINDIR="$1" ; shift ;;
-i) shift; INSTALLPROG="$1" ; shift ;;
+ -l) shift; LINKAGEDIR="$1" ; shift ;;
-D) echo=echo ; shift ;;
-U) uninstall=true ; shift ;;
-*) echo "$USAGE" >&2 ; exit 2;;
*) break ;;
esac
done
+if [ -z "$LINKAGEDIR" ]; then
+ LINKAGEDIR="$INSTALLDIR"
+fi
# set install target name
LIBNAME="$1"
@@ -49,18 +56,18 @@ LN="ln -s"
# pre-install
if [ -z "$uninstall" ]; then
- ${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
- if [ -f "$INSTALLDIR/$LIBNAME" ]; then
- ${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
+ ${echo} $RM ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
+ if [ -f "${DESTDIR}$INSTALLDIR/$LIBNAME" ]; then
+ ${echo} $MV ${DESTDIR}$INSTALLDIR/$LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}.${OLDSUFF}
fi
fi
# install/uninstall
if [ -z "$uninstall" ] ; then
- ${echo} eval ${INSTALLPROG} $LIBNAME ${INSTALLDIR}/${LIBNAME}
+ ${echo} eval ${INSTALLPROG} $LIBNAME ${DESTDIR}${INSTALLDIR}/${LIBNAME}
else
- ${echo} ${RM} ${INSTALLDIR}/${LIBNAME}
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/${LIBNAME}
fi
# post-install/uninstall
@@ -73,7 +80,7 @@ fi
case "$host_os" in
hpux*|darwin*|macosx*|linux*|solaris2*)
if [ -z "$uninstall" ]; then
- chmod 555 ${INSTALLDIR}/${LIBNAME}
+ chmod 555 ${DESTDIR}${INSTALLDIR}/${LIBNAME}
fi ;;
cygwin*|mingw*)
IMPLIBNAME=`echo ${LIBNAME} \
@@ -111,8 +118,8 @@ case "$LIBNAME" in
LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]\.[0-9]:\1:'` # libname.dylib
esac
-INSTALL_LINK1='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
-INSTALL_LINK2='${echo} cd $INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
+INSTALL_LINK1='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK1'
+INSTALL_LINK2='${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LIBNAME $LINK2'
#
# Create symlinks to the installed library. This section is incomplete.
@@ -120,27 +127,27 @@ INSTALL_LINK2='${echo} cd $INSTALLDIR &&
case "$host_os-$host_vendor" in
*linux*|freebsd*-gentoo)
# libname.so.M -> libname.so.M.N
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK2
fi
# libname.so -> libname.so.M
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
- ${echo} cd $INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
+ ${echo} cd ${DESTDIR}$INSTALLDIR && ${echo} ${LN} $LINK2 $LINK1
fi
;;
bsdi4*|*gnu*|darwin*|macosx*|netbsd*|mirbsd*)
# libname.so.M -> libname.so.M.N
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK2
fi
# libname.so -> libname.so.M.N
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1
fi
@@ -148,7 +155,7 @@ bsdi4*|*gnu*|darwin*|macosx*|netbsd*|mir
solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|irix[56]*|sysv[45]*|dgux*|interix*)
# libname.so -> libname.so.M
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1
fi
@@ -159,19 +166,19 @@ solaris2*|aix4.[2-9]*|aix[5-9]*|osf*|iri
freebsd3*|freebsdaout*)
if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
# libname.so -> libname.so.M
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1
fi
else
# libname.so.M -> libname.so.M.N
- ${echo} ${RM} ${INSTALLDIR}/$LINK2
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK2
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK2
fi
# libname.so -> libname.so.M.N
- ${echo} ${RM} ${INSTALLDIR}/$LINK1
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1
fi
@@ -188,7 +195,7 @@ freebsd[4-9]*|freebsd1[0-9]*|freebsdelf*
hpux1*)
# libname.sl -> libname.M
- ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl
+ ${echo} ${RM} ${DESTDIR}${INSTALLDIR}/$LINK1.sl
if [ -z "$uninstall" ]; then
eval $INSTALL_LINK1
fi

51
readline-6.3-input.dif Normal file
View File

@ -0,0 +1,51 @@
---
lib/readline/input.c | 7 ++++++-
lib/readline/readline.c | 7 +++++++
2 files changed, 13 insertions(+), 1 deletion(-)
--- lib/readline/input.c
+++ lib/readline/input.c 2003-03-17 19:03:51.000000000 +0000
@@ -489,6 +489,8 @@ rl_read_key ()
return (c);
}
+extern int _rl_read_zero_char_from_tty;
+
int
rl_getc (stream)
FILE *stream;
@@ -526,7 +528,10 @@ rl_getc (stream)
/* If zero characters are returned, then the file that we are
reading from is empty! Return EOF in that case. */
if (result == 0)
- return (EOF);
+ {
+ _rl_read_zero_char_from_tty = 1;
+ return (EOF);
+ }
#if defined (__BEOS__)
if (errno == EINTR)
--- lib/readline/readline.c
+++ lib/readline/readline.c 2014-04-17 10:24:16.302236347 +0000
@@ -522,6 +522,9 @@ _rl_internal_char_cleanup ()
_rl_erase_entire_line ();
}
+/* Catch EOF from tty, do not return command line */
+int _rl_read_zero_char_from_tty = 0;
+
STATIC_CALLBACK int
#if defined (READLINE_CALLBACKS)
readline_internal_char ()
@@ -570,6 +573,10 @@ readline_internal_charloop ()
c = rl_read_key ();
RL_UNSETSTATE(RL_STATE_READCMD);
+ /* Return here if terminal is closed */
+ if (c == EOF && _rl_read_zero_char_from_tty)
+ return (rl_done = 1);
+
/* look at input.c:rl_getc() for the circumstances under which this will
be returned; punt immediately on read error without converting it to
a newline; assume that rl_read_key has already called the signal

View File

@ -0,0 +1,43 @@
Even if used only by developers to debug readline library do not open
temporary files from public location without O_EXCL (bcn#868822).
---
lib/readline/util.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- lib/readline/util.c
+++ lib/readline/util.c 2014-04-17 10:29:43.157274616 +0000
@@ -504,10 +504,12 @@ _rl_trace (va_alist)
if (_rl_tracefp == 0)
_rl_tropen ();
+ if (!_rl_tracefp)
+ goto out;
vfprintf (_rl_tracefp, format, args);
fprintf (_rl_tracefp, "\n");
fflush (_rl_tracefp);
-
+out:
va_end (args);
}
@@ -527,7 +529,7 @@ _rl_tropen ()
#endif
sprintf (fnbuf, "%s/rltrace.%ld", x, (long)getpid());
unlink(fnbuf);
- _rl_tracefp = fopen (fnbuf, "w+");
+ _rl_tracefp = fopen (fnbuf, "w+xe");
return _rl_tracefp != 0;
}
@@ -535,8 +537,8 @@ int
_rl_trclose ()
{
int r;
-
- r = fclose (_rl_tracefp);
+ if (_rl_tracefp)
+ r = fclose (_rl_tracefp);
_rl_tracefp = 0;
return r;
}

BIN
readline-7.0-patches.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

161
readline-7.0.dif Normal file
View File

@ -0,0 +1,161 @@
---
Makefile.in | 4 +---
complete.c | 6 +++---
doc/Makefile.in | 2 +-
doc/readline.3 | 11 +++++++++++
history.h | 1 +
readline.c | 7 +++++--
readline.h | 3 ++-
support/shobj-conf | 5 +++--
8 files changed, 27 insertions(+), 12 deletions(-)
--- Makefile.in
+++ Makefile.in 2016-09-14 08:59:09.830092311 +0000
@@ -233,10 +233,8 @@ uninstall-headers:
maybe-uninstall-headers: uninstall-headers
install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-examples
- -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
$(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
- -$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old
$(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a
@@ -266,7 +264,7 @@ install-doc: installdirs
$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
-( if test -d doc ; then \
cd doc && \
- ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
+ ${MAKE} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
fi )
uninstall-doc:
--- complete.c
+++ complete.c 2016-09-14 08:59:09.830092311 +0000
@@ -1152,7 +1152,7 @@ _rl_find_completion_word (fp, dp)
/* We didn't find an unclosed quoted substring upon which to do
completion, so use the word break characters to find the
substring on which to complete. */
- while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
+ while ((rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY)))
{
scan = rl_line_buffer[rl_point];
@@ -2229,7 +2229,7 @@ rl_completion_matches (text, entry_funct
match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
match_list[1] = (char *)NULL;
- while (string = (*entry_function) (text, matches))
+ while ((string = (*entry_function) (text, matches)))
{
if (RL_SIG_RECEIVED ())
{
@@ -2303,7 +2303,7 @@ rl_username_completion_function (text, s
}
#if defined (HAVE_GETPWENT)
- while (entry = getpwent ())
+ while ((entry = getpwent ()))
{
/* Null usernames should result in all users as possible completions. */
if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
--- doc/Makefile.in
+++ doc/Makefile.in 2016-09-14 08:59:09.830092311 +0000
@@ -107,7 +107,7 @@ DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ
# $(RM) $@
# -${TEXI2PDF} $<
-all: info dvi html ps text pdf
+all: info html
nodvi: info html text
xdist: $(DIST_DOCS)
--- doc/readline.3
+++ doc/readline.3 2016-09-14 08:59:09.830092311 +0000
@@ -119,6 +119,14 @@ environment variable. If that variable
.IR ~/.inputrc .
If that file does not exist or cannot be read, the ultimate default is
.IR /etc/inputrc .
+If both files
+.I ~/.inputrc
+and
+.I /etc/inputrc
+exist readline will read first
+.I /etc/inputrc
+and then
+.IR ~/.inputrc .
When a program which uses the readline library starts up, the
init file is read, and the key bindings and variables are set.
There are only a few basic constructs allowed in the
@@ -1457,6 +1465,9 @@ VI Command Mode functions
.TP
.FN ~/.inputrc
Individual \fBreadline\fP initialization file
+.TP
+.FN /etc/inputrc
+System \fBreadline\fP initialization file
.PD
.SH AUTHORS
Brian Fox, Free Software Foundation
--- history.h
+++ history.h 2016-09-14 08:59:09.830092311 +0000
@@ -32,6 +32,7 @@ extern "C" {
# include "rlstdc.h"
# include "rltypedefs.h"
#else
+# include <stdio.h>
# include <readline/rlstdc.h>
# include <readline/rltypedefs.h>
#endif
--- readline.c
+++ readline.c 2016-09-14 08:59:09.830092311 +0000
@@ -851,8 +851,11 @@ _rl_dispatch_subseq (key, map, got_subse
{
/* Special case rl_do_lowercase_version (). */
if (func == rl_do_lowercase_version)
- /* Should we do anything special if key == ANYOTHERKEY? */
- return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map));
+ {
+ if (key == ANYOTHERKEY)
+ return -1;
+ return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map));
+ }
rl_executing_keymap = map;
rl_executing_key = key;
--- readline.h
+++ readline.h 2016-09-14 08:59:09.830092311 +0000
@@ -32,6 +32,7 @@ extern "C" {
# include "keymaps.h"
# include "tilde.h"
#else
+# include <stdio.h>
# include <readline/rlstdc.h>
# include <readline/rltypedefs.h>
# include <readline/keymaps.h>
@@ -467,7 +468,7 @@ extern char *rl_filename_completion_func
extern int rl_completion_mode PARAMS((rl_command_func_t *));
-#if 0
+#ifdef OLD_READLINE
/* Backwards compatibility (compat.c). These will go away sometime. */
extern void free_undo_list PARAMS((void));
extern int maybe_save_line PARAMS((void));
--- support/shobj-conf
+++ support/shobj-conf 2016-09-14 08:59:09.830092311 +0000
@@ -126,10 +126,11 @@ sunos5*|solaris2*)
linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
SHOBJ_CFLAGS=-fPIC
SHOBJ_LD='${CC}'
- SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+ SHOBJ_LDFLAGS='-shared'
- SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_XLDFLAGS='-Wl,-rpath-link,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ echo 'int main () { return 0; }' | gcc -ltinfo -o /dev/null -xc - > /dev/null 2>&1 && SHLIB_LIBS=-ltinfo || SHLIB_LIBS=-lncurses
;;
freebsd2*)

BIN
readline-7.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

2706
readline.changes Normal file

File diff suppressed because it is too large Load Diff

270
readline.spec Normal file
View File

@ -0,0 +1,270 @@
#
# spec file for package readline
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: readline
BuildRequires: autoconf
BuildRequires: fdupes
%if %suse_version > 1220
BuildRequires: makeinfo
%endif
BuildRequires: ncurses-devel
BuildRequires: patchutils
BuildRequires: pkg-config
BuildRequires: sed
%define rextend %nil
Version: 7.0
Release: 0
Summary: The readline library
License: GPL-3.0-or-later
Group: System/Libraries
Url: http://www.gnu.org/software/readline/
# Git: http://git.savannah.gnu.org/cgit/bash.git
Source0: ftp://ftp.gnu.org/gnu/readline/readline-%{version}%{rextend}.tar.gz
Source1: readline-%{version}-patches.tar.bz2
Source2: baselibs.conf
Patch0: readline-%{version}.dif
Patch1: readline-6.3-input.dif
Patch2: readline-5.2-conf.patch
Patch3: readline-6.2-metamode.patch
Patch4: readline-6.2-endpw.dif
Patch5: readline-6.2-xmalloc.dif
Patch6: readline-6.3-destdir.patch
Patch7: readline-6.3-rltrace.patch
%{expand: %%global rl_major %(echo %{version} | sed -r 's/.[0-9]+//g')}
%description
The readline library is used by the Bourne Again Shell (bash, the
standard command interpreter) for easy editing of command lines. This
includes history and search functionality.
%package -n libreadline7
Summary: The Readline Library
Group: System/Libraries
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
Recommends: readline-doc = %{version}
Provides: readline = %{version}
Obsoletes: readline <= 6.3
%description -n libreadline7
The readline library is used by the Bourne Again Shell (bash, the
standard command interpreter) for easy editing of command lines. This
includes history and search functionality.
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: libreadline7 = %{version}
Requires: ncurses-devel
Provides: readline-devel = %{version}
Obsoletes: readline-devel <= %{version}
Recommends: readline-doc = %{version}
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
%package devel-static
Summary: Static library for Development
Group: Development/Libraries/C and C++
Requires: ncurses-devel
Requires: readline-devel = %{version}
Recommends: readline-doc = %{version}
Provides: readline-devel-static = %{version}
Obsoletes: readline-devel-static <= %{version}
#
%description devel-static
This package contains the static library needed
to develop applications that require these.
%package doc
Summary: Documentation how to Use and Program with the Readline Library
Group: System/Libraries
Provides: readline-doc = %{version}
Provides: readline:%{_infodir}/readline.info.gz
Obsoletes: readline-doc <= %{version}
PreReq: %install_info_prereq
BuildArch: noarch
%description doc
This package contains the documentation for using the readline library
as well as programming with the interface of the readline library.
%prep
%setup -q -n readline-%{version}%{rextend}
for patch in readline-%{version}-patches/*; do
test -e $patch || break
let level=0 || true
file=$(lsdiff --files=1 $patch)
if test ! -e $file ; then
file=${file#*/}
let level++ || true
fi
sed -ri '/^\*\*\* \.\./{ s@\.\./readline-%{version}[^/]*/@@ }' $patch
echo Patch $patch
patch -s -p$level < $patch
done
%patch1 -p2 -b .zerotty
%patch2 -p2 -b .conf
%patch3 -p2 -b .metamode
#%patch4 -p2 -b .endpw
%patch5 -p0 -b .xm
%patch6 -p0 -b .destdir
%patch7 -p2 -b .tmp
%patch0 -p0 -b .0
%build
LANG=POSIX
LC_ALL=$LANG
unset LC_CTYPE
autoconf
cflags ()
{
local flag=$1; shift
local var=$1; shift
test -n "${flag}" -a -n "${var}" || return
case "${!var}" in
*${flag}*) return
esac
set -o noclobber
case "$flag" in
-Wl,*)
if echo 'int main () { return 0; }' | \
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
;;
*)
if ${CC:-gcc} -Werror ${flag/#-Wno-/-W} -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
if ${CXX:-g++} -Werror ${flag/#-Wno-/-W} -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then
eval $var=\${$var:+\$$var\ }$flag
fi
esac
set +o noclobber
}
LARGEFILE="$(getconf LFS_CFLAGS)"
(cat > dyn.map)<<-'EOF'
{
*;
!rl_*stream;
};
EOF
(cat > rl.map)<<-'EOF'
READLINE_6.3 {
rl_change_environment;
rl_clear_history;
rl_executing_key;
rl_executing_keyseq;
rl_filename_stat_hook;
rl_history_substr_search_backward;
rl_history_substr_search_forward;
rl_input_available_hook;
rl_print_last_kbd_macro;
rl_signal_event_hook;
};
EOF
CFLAGS="$RPM_OPT_FLAGS $LARGEFILE -D_GNU_SOURCE -Wall -g"
LDFLAGS=""
cflags -Wuninitialized CFLAGS
cflags -Wextra CFLAGS
cflags -Wno-unprototyped-calls CFLAGS
cflags -Wno-switch-enum CFLAGS
cflags -Wno-unused-variable CFLAGS
cflags -Wno-unused-parameter CFLAGS
cflags -Wno-parentheses CFLAGS
cflags -ftree-loop-linear CFLAGS
cflags -pipe CFLAGS
cflags -Wl,--as-needed LDFLAGS
cflags -Wl,-O2 LDFLAGS
cflags -Wl,--version-script=${PWD}/rl.map LDFLAGS
cflags -Wl,--dynamic-list=${PWD}/dyn.map LDFLAGS
CC=gcc
CC_FOR_BUILD="$CC"
CFLAGS_FOR_BUILD="$CFLAGS"
LDFLAGS_FOR_BUILD="$LDFLAGS"
export CC_FOR_BUILD CFLAGS_FOR_BUILD LDFLAGS_FOR_BUILD CFLAGS LDFLAGS CC
./configure --build=%{_target_cpu}-suse-linux \
--enable-static \
--enable-shared \
--enable-multibyte \
--prefix=%{_prefix} \
--with-curses \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--docdir=%{_docdir}/%{name} \
--libdir=%{_libdir}
make
make documentation
%install
%make_install htmldir=%{_docdir}/%{name} installdir=%{_docdir}/%{name}/examples \
libdir=/%{_lib} linkagedir=%{_libdir}
chmod 0755 %{buildroot}/%{_lib}/libhistory.so.%{version}
chmod 0755 %{buildroot}/%{_lib}/libreadline.so.%{version}
rm -vf %{buildroot}/%{_lib}/libhistory.so.%{version}*old
rm -vf %{buildroot}/%{_lib}/libreadline.so.%{version}*old
rm -vf %{buildroot}/%{_lib}/libhistory.so
rm -vf %{buildroot}/%{_lib}/libreadline.so
mkdir -p %{buildroot}/%{_libdir}
ln -sf /%{_lib}/libhistory.so.%{version} %{buildroot}/%{_libdir}/libhistory.so
ln -sf /%{_lib}/libreadline.so.%{version} %{buildroot}/%{_libdir}/libreadline.so
mv -vf %{buildroot}/%{_lib}/libhistory.a %{buildroot}/%{_libdir}/libhistory.a
mv -vf %{buildroot}/%{_lib}/libreadline.a %{buildroot}/%{_libdir}/libreadline.a
rm -vrf %{buildroot}%{_datadir}/readline/
%post -n libreadline7 -p /sbin/ldconfig
%postun -n libreadline7 -p /sbin/ldconfig
%post doc
%install_info --info-dir=%{_infodir} %{_infodir}/history.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/readline.info.gz
%install_info --info-dir=%{_infodir} %{_infodir}/rluserman.info.gz
%preun doc
%install_info_delete --info-dir=%{_infodir} %{_infodir}/history.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/readline.info.gz
%install_info_delete --info-dir=%{_infodir} %{_infodir}/rluserman.info.gz
%files -n libreadline7
%license COPYING
/%{_lib}/libhistory.so.%{rl_major}
/%{_lib}/libhistory.so.%{version}
/%{_lib}/libreadline.so.%{rl_major}
/%{_lib}/libreadline.so.%{version}
%files devel
%{_includedir}/readline/
%{_libdir}/libhistory.so
%{_libdir}/libreadline.so
%files devel-static
%{_libdir}/libhistory.a
%{_libdir}/libreadline.a
%files doc
%doc %{_infodir}/history.info*
%doc %{_infodir}/readline.info*
%doc %{_infodir}/rluserman.info*
%doc %{_mandir}/man3/history.3*
%doc %{_mandir}/man3/readline.3*
%doc %{_docdir}/%{name}/
%changelog