2018-03-16 11:45:52 +01:00
|
|
|
#
|
|
|
|
# spec file for package readline
|
|
|
|
#
|
2024-01-16 09:44:50 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-03-16 11:45:52 +01:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-08-12 10:51:09 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-03-16 11:45:52 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-07-17 09:41:58 +02:00
|
|
|
%define rl_major 8
|
2022-09-27 10:03:22 +02:00
|
|
|
%define rextend %{nil}
|
2024-01-16 09:44:50 +01:00
|
|
|
%define rversion 8.2
|
|
|
|
%define rpatchlvl %(bash %{_sourcedir}/get_version_number.sh %{_sourcedir})
|
2022-09-27 10:03:22 +02:00
|
|
|
|
2018-03-16 11:45:52 +01:00
|
|
|
Name: readline
|
2024-01-16 09:44:50 +01:00
|
|
|
Version: %{rversion}.%{rpatchlvl}
|
2018-03-16 11:45:52 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: The readline library
|
|
|
|
License: GPL-3.0-or-later
|
2018-03-19 09:31:47 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2020-07-17 09:41:58 +02:00
|
|
|
URL: https://www.gnu.org/software/readline/
|
2018-03-16 11:45:52 +01:00
|
|
|
# Git: http://git.savannah.gnu.org/cgit/bash.git
|
2024-01-16 09:44:50 +01:00
|
|
|
Source0: https://ftp.gnu.org/gnu/readline/readline-%{rversion}%{rextend}.tar.gz
|
|
|
|
Source1: https://ftp.gnu.org/gnu/readline/readline-%{rversion}%{rextend}.tar.gz.sig
|
2018-03-16 11:45:52 +01:00
|
|
|
Source2: baselibs.conf
|
2024-01-16 09:44:50 +01:00
|
|
|
Source3: get_version_number.sh
|
2020-07-17 09:41:58 +02:00
|
|
|
Source4: https://tiswww.case.edu/php/chet/gpgkey.asc#/%{name}.keyring
|
|
|
|
# signatures for official patches
|
|
|
|
# official patches
|
2022-10-06 14:12:52 +02:00
|
|
|
Patch101: readline82-001
|
2023-11-21 08:05:04 +01:00
|
|
|
Patch102: readline82-002
|
|
|
|
Patch103: readline82-003
|
|
|
|
Patch104: readline82-004
|
|
|
|
Patch105: readline82-005
|
|
|
|
Patch106: readline82-006
|
|
|
|
Patch107: readline82-007
|
2024-01-16 09:44:50 +01:00
|
|
|
Patch108: readline82-008
|
|
|
|
Patch109: readline82-009
|
|
|
|
Patch110: readline82-010
|
2022-10-06 14:12:52 +02:00
|
|
|
Source101: readline82-001.sig
|
2023-11-21 08:05:04 +01:00
|
|
|
Source102: readline82-002.sig
|
|
|
|
Source103: readline82-003.sig
|
|
|
|
Source104: readline82-004.sig
|
|
|
|
Source105: readline82-005.sig
|
|
|
|
Source106: readline82-006.sig
|
|
|
|
Source107: readline82-007.sig
|
2024-01-16 09:44:50 +01:00
|
|
|
Source108: readline82-008.sig
|
|
|
|
Source109: readline82-009.sig
|
|
|
|
Source110: readline82-010.sig
|
2020-07-17 09:41:58 +02:00
|
|
|
# local patches
|
2024-01-16 09:44:50 +01:00
|
|
|
Patch200: readline-%{rversion}.dif
|
2020-07-17 09:41:58 +02:00
|
|
|
Patch201: readline-6.3-input.dif
|
|
|
|
Patch202: readline-5.2-conf.patch
|
|
|
|
Patch203: readline-6.2-metamode.patch
|
|
|
|
Patch205: readline-6.2-xmalloc.dif
|
|
|
|
Patch206: readline-6.3-destdir.patch
|
|
|
|
Patch207: readline-6.3-rltrace.patch
|
|
|
|
Patch208: readline-7.0-screen.patch
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: ncurses-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
#
|
|
|
|
%if 0%{?suse_version} > 1220
|
|
|
|
BuildRequires: makeinfo
|
|
|
|
%endif
|
2018-03-16 11:45:52 +01:00
|
|
|
|
|
|
|
%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.
|
|
|
|
|
2020-07-17 09:41:58 +02:00
|
|
|
%package -n libreadline%{rl_major}
|
2018-03-16 11:45:52 +01:00
|
|
|
Summary: The Readline Library
|
|
|
|
Group: System/Libraries
|
2019-09-09 14:37:14 +02:00
|
|
|
Suggests: readline-doc = %{version}
|
2020-07-17 09:41:58 +02:00
|
|
|
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
|
2024-01-16 09:58:22 +01:00
|
|
|
Provides: libreadline%{rl_major} = %{rversion}
|
2020-07-17 09:41:58 +02:00
|
|
|
Provides: readline = %{version}
|
2018-03-16 11:45:52 +01:00
|
|
|
Obsoletes: readline <= 6.3
|
|
|
|
|
2020-07-17 09:41:58 +02:00
|
|
|
%description -n libreadline%{rl_major}
|
2018-03-16 11:45:52 +01:00
|
|
|
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
|
2018-03-19 09:31:47 +01:00
|
|
|
Summary: Development files for readline
|
2018-03-16 11:45:52 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2020-07-17 09:41:58 +02:00
|
|
|
Requires: libreadline%{rl_major} = %{version}
|
2018-03-16 11:45:52 +01:00
|
|
|
Requires: ncurses-devel
|
|
|
|
Recommends: readline-doc = %{version}
|
|
|
|
|
|
|
|
%description devel
|
2018-03-19 09:31:47 +01:00
|
|
|
This package contains the header files for the readline library.
|
2018-03-16 11:45:52 +01:00
|
|
|
|
|
|
|
%package devel-static
|
2018-03-19 09:31:47 +01:00
|
|
|
Summary: Static library for development with readline
|
2018-03-16 11:45:52 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: ncurses-devel
|
|
|
|
Requires: readline-devel = %{version}
|
|
|
|
Recommends: readline-doc = %{version}
|
|
|
|
|
|
|
|
%description devel-static
|
2018-03-19 09:31:47 +01:00
|
|
|
This package contains the static library for the readline library.
|
2018-03-16 11:45:52 +01:00
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation how to Use and Program with the Readline Library
|
2018-03-19 09:31:47 +01:00
|
|
|
Group: Documentation/Other
|
2020-07-17 09:41:58 +02:00
|
|
|
Supplements: (libreadline%{rl_major} and patterns-base-documentation)
|
2018-03-16 11:45:52 +01:00
|
|
|
Provides: readline:%{_infodir}/readline.info.gz
|
|
|
|
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
|
2024-01-16 09:44:50 +01:00
|
|
|
%setup -q -n readline-%{rversion}%{rextend}
|
2020-07-17 09:41:58 +02:00
|
|
|
# official patches
|
2023-11-21 08:05:04 +01:00
|
|
|
%patch -P101 -p0
|
|
|
|
%patch -P102 -p0
|
|
|
|
%patch -P103 -p0
|
|
|
|
%patch -P104 -p0
|
|
|
|
%patch -P105 -p0
|
|
|
|
%patch -P106 -p0
|
|
|
|
%patch -P107 -p0
|
2024-01-16 09:44:50 +01:00
|
|
|
%patch -P108 -p0
|
|
|
|
%patch -P109 -p0
|
|
|
|
%patch -P110 -p0
|
2020-07-17 09:41:58 +02:00
|
|
|
# local patches
|
2023-11-21 08:05:04 +01:00
|
|
|
%patch -P201 -p2 -b .zerotty
|
|
|
|
%patch -P202 -p2 -b .conf
|
|
|
|
%patch -P203 -p2 -b .metamode
|
|
|
|
%patch -P205 -b .xm
|
|
|
|
%patch -P206 -b .destdir
|
|
|
|
%patch -P207 -p2 -b .tmp
|
|
|
|
%patch -P208 -p2 -b .screen
|
|
|
|
%patch -P200 -b .0
|
2018-03-16 11:45:52 +01:00
|
|
|
|
|
|
|
%build
|
2019-08-12 10:51:09 +02:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2018-03-16 11:45:52 +01:00
|
|
|
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; }' | \
|
2022-10-21 10:49:53 +02:00
|
|
|
${CC:-gcc} -Werror $flag -o /dev/null -xc - > /dev/null 2>&1 ; then
|
2018-03-16 11:45:52 +01:00
|
|
|
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;
|
|
|
|
};
|
2022-10-21 10:49:53 +02:00
|
|
|
|
|
|
|
READLINE_7.0 {
|
|
|
|
rl_bracketed_paste_begin;
|
|
|
|
rl_callback_sigcleanup;
|
|
|
|
rl_clear_visible_line;
|
|
|
|
rl_pending_signal;
|
|
|
|
rl_redraw_prompt_last_line;
|
|
|
|
rl_tty_set_echoing;
|
|
|
|
rl_vi_unix_word_rubout;
|
|
|
|
rl_vi_yank_pop;
|
|
|
|
history_file_version;
|
|
|
|
history_lines_read_from_file;
|
|
|
|
history_lines_written_to_file;
|
|
|
|
history_multiline_entries;
|
|
|
|
rl_persistent_signal_handlers;
|
|
|
|
history_file_version;
|
|
|
|
history_lines_read_from_file;
|
|
|
|
history_lines_written_to_file;
|
|
|
|
history_multiline_entries;
|
|
|
|
rl_persistent_signal_handlers;
|
|
|
|
} READLINE_6.3;
|
|
|
|
|
|
|
|
READLINE_8.0 {
|
|
|
|
remove_history_range;
|
|
|
|
rl_check_signals;
|
|
|
|
rl_empty_keymap;
|
|
|
|
rl_function_of_keyseq_len;
|
|
|
|
rl_next_screen_line;
|
|
|
|
rl_previous_screen_line;
|
|
|
|
rl_set_keymap_name;
|
|
|
|
history_quoting_state;
|
|
|
|
} READLINE_7.0;
|
|
|
|
|
|
|
|
READLINE_8.1 {
|
|
|
|
rl_activate_mark;
|
|
|
|
rl_clear_display;
|
|
|
|
rl_deactivate_mark;
|
|
|
|
rl_keep_mark_active;
|
|
|
|
rl_mark_active_p;
|
|
|
|
rl_operate_and_get_next;
|
|
|
|
} READLINE_8.0;
|
|
|
|
|
|
|
|
READLINE_8.2 {
|
|
|
|
rl_fetch_history;
|
|
|
|
rl_set_timeout;
|
|
|
|
rl_timeout_remaining;
|
|
|
|
rl_trim_arg_from_keyseq;
|
|
|
|
rl_eof_found;
|
|
|
|
rl_timeout_event_hook;
|
|
|
|
} READLINE_8.1;
|
2018-03-16 11:45:52 +01:00
|
|
|
EOF
|
2022-10-21 10:49:53 +02:00
|
|
|
found=0
|
|
|
|
for rl in %{_libdir}/libreadline.so.*.*
|
|
|
|
do
|
2024-01-16 09:44:50 +01:00
|
|
|
test READLINE_${rl##/*.so.} = READLINE_%{rversion} && found=1
|
2022-10-21 10:49:53 +02:00
|
|
|
done
|
|
|
|
if test $found = 0
|
|
|
|
then
|
|
|
|
%{warn:Warning, ABI change likely}
|
|
|
|
sleep 5
|
|
|
|
fi
|
|
|
|
|
2019-01-09 14:02:42 +01:00
|
|
|
CFLAGS="%{optflags} $LARGEFILE -D_GNU_SOURCE -D_RPM_OPT_FLAGS -g"
|
2018-03-16 11:45:52 +01:00
|
|
|
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
|
2020-07-17 09:41:58 +02:00
|
|
|
# FIXME: you should use the %%configure macro
|
2018-03-16 11:45:52 +01:00
|
|
|
./configure --build=%{_target_cpu}-suse-linux \
|
|
|
|
--enable-static \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-multibyte \
|
2021-01-11 12:44:48 +01:00
|
|
|
--disable-bracketed-paste-default \
|
2018-03-16 11:45:52 +01:00
|
|
|
--prefix=%{_prefix} \
|
|
|
|
--with-curses \
|
|
|
|
--mandir=%{_mandir} \
|
|
|
|
--infodir=%{_infodir} \
|
|
|
|
--docdir=%{_docdir}/%{name} \
|
|
|
|
--libdir=%{_libdir}
|
2020-07-17 09:41:58 +02:00
|
|
|
%make_build
|
|
|
|
%make_build documentation
|
2018-03-16 11:45:52 +01:00
|
|
|
|
|
|
|
%install
|
2021-05-05 17:08:16 +02:00
|
|
|
%make_install everything htmldir=%{_docdir}/%{name} installdir=%{_docdir}/%{name}/examples
|
2018-03-16 11:45:52 +01:00
|
|
|
|
2020-07-17 09:41:58 +02:00
|
|
|
%post -n libreadline%{rl_major} -p /sbin/ldconfig
|
|
|
|
%postun -n libreadline%{rl_major} -p /sbin/ldconfig
|
2018-03-16 11:45:52 +01:00
|
|
|
|
2020-07-17 09:41:58 +02:00
|
|
|
%files -n libreadline%{rl_major}
|
2018-03-16 11:45:52 +01:00
|
|
|
%license COPYING
|
2020-11-20 14:11:39 +01:00
|
|
|
%{_libdir}/libhistory.so.%{rl_major}
|
2024-01-16 09:44:50 +01:00
|
|
|
%{_libdir}/libhistory.so.%{rversion}
|
2020-11-20 14:11:39 +01:00
|
|
|
%{_libdir}/libreadline.so.%{rl_major}
|
2024-01-16 09:44:50 +01:00
|
|
|
%{_libdir}/libreadline.so.%{rversion}
|
2018-03-16 11:45:52 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_includedir}/readline/
|
|
|
|
%{_libdir}/libhistory.so
|
|
|
|
%{_libdir}/libreadline.so
|
2022-09-27 10:03:22 +02:00
|
|
|
%{_libdir}/pkgconfig/history.pc
|
2019-01-09 14:02:42 +01:00
|
|
|
%{_libdir}/pkgconfig/readline.pc
|
2018-03-16 11:45:52 +01:00
|
|
|
|
|
|
|
%files devel-static
|
|
|
|
%{_libdir}/libhistory.a
|
|
|
|
%{_libdir}/libreadline.a
|
|
|
|
|
|
|
|
%files doc
|
2020-07-17 09:41:58 +02:00
|
|
|
%{_infodir}/history.info%{?ext_info}
|
|
|
|
%{_infodir}/readline.info%{?ext_info}
|
|
|
|
%{_infodir}/rluserman.info%{?ext_info}
|
|
|
|
%{_mandir}/man3/history.3%{?ext_man}
|
|
|
|
%{_mandir}/man3/readline.3%{?ext_man}
|
2018-03-16 11:45:52 +01:00
|
|
|
%doc %{_docdir}/%{name}/
|
|
|
|
|
|
|
|
%changelog
|