Signed-off-by: Pawel Zalewski pzalewski@thegoodpenguin.co.uk --- recipes-core/readline/files/inputrc | 61 +++++++++++++++++ recipes-core/readline/files/rl-native.map | 12 ++++ recipes-core/readline/readline-morello.inc | 68 +++++++++++++++++++ .../readline/readline-morello_8.1.2.bb | 7 ++ .../readline/readline/configure-fix.patch | 35 ++++++++++ recipes-core/readline/readline/norpath.patch | 21 ++++++ 6 files changed, 204 insertions(+) create mode 100644 recipes-core/readline/files/inputrc create mode 100644 recipes-core/readline/files/rl-native.map create mode 100644 recipes-core/readline/readline-morello.inc create mode 100644 recipes-core/readline/readline-morello_8.1.2.bb create mode 100644 recipes-core/readline/readline/configure-fix.patch create mode 100644 recipes-core/readline/readline/norpath.patch
diff --git a/recipes-core/readline/files/inputrc b/recipes-core/readline/files/inputrc new file mode 100644 index 0000000..b5c4c8a --- /dev/null +++ b/recipes-core/readline/files/inputrc @@ -0,0 +1,61 @@ +# /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 + +# 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[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 +# $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 diff --git a/recipes-core/readline/files/rl-native.map b/recipes-core/readline/files/rl-native.map new file mode 100644 index 0000000..5e7d49c --- /dev/null +++ b/recipes-core/readline/files/rl-native.map @@ -0,0 +1,12 @@ +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; +}; diff --git a/recipes-core/readline/readline-morello.inc b/recipes-core/readline/readline-morello.inc new file mode 100644 index 0000000..9c45b7d --- /dev/null +++ b/recipes-core/readline/readline-morello.inc @@ -0,0 +1,68 @@ +inherit update-alternatives purecap-sysroot +inherit autotools texinfo + +MORELLO_SRC = "poky/meta/recipes-core/readline/readlinge_8.1.2.bb" + +SUMMARY = "Library for editing typed command lines" +DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \ +command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \ +additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \ +lines, and perform csh-like history expansion on previous commands." +SECTION = "libs" +HOMEPAGE = "https://tiswww.case.edu/php/chet/readline/rltop.html" + +# GPL-2.0-or-later (< 6.0), GPL-3.0-or-later (>= 6.0) +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +TOOLCHAIN = "${MORELLO_TOOLCHAIN}" + +DEPENDS += "ncurses-morello" + +FILESEXTRAPATHS:prepend := "${THISDIR}/files:${THISDIR}/readline:" + +SRC_URI = "${GNU_MIRROR}/readline/${BPN_READLINE}-${PV_READLINE}.tar.gz;name=archive" +SRC_URI += "file://inputrc" + +S = "${WORKDIR}/${BPN_READLINE}-${PV_READLINE}" +B = "${WORKDIR}/build" + +BPN_READLINE = "readline" +PV_READLINE = "8.1.2" + + +EXTRA_AUTORECONF += "--exclude=autoheader" +EXTRA_OECONF += "bash_cv_termcap_lib=ncurses" + +LEAD_SONAME = "libreadline.so" + +do_configure:prepend () { + if [ ! -e ${S}/acinclude.m4 ]; then + cat ${S}/aclocal.m4 > ${S}/acinclude.m4 + fi +} + +do_install:append() { + + # Make install doesn't properly install these + oe_libinstall -so -C shlib libhistory ${D}${libdir} + oe_libinstall -so -C shlib libreadline ${D}${libdir} + + rmdir ${D}${bindir} + rm -rf ${D}${datadir}/${BPN_READLINE}/*.c + rmdir ${D}${datadir}/${BPN_READLINE} || true + + install -m 0755 -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc +} + +CONFFILES:${PN} += "${sysconfdir}/inputrc" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN}-doc = "history.3" +ALTERNATIVE_LINK_NAME[history.3] = "${mandir}/man3/history.3" + +# OpenSuse injects versions into libreadline leading to conficits between our native one and theirs +# see their spec file for where this is injected. Extra versioning is harmless so we just do the same. +SRC_URI:append:class-native = " file://rl-native.map" +LDFLAGS:append:class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map" diff --git a/recipes-core/readline/readline-morello_8.1.2.bb b/recipes-core/readline/readline-morello_8.1.2.bb new file mode 100644 index 0000000..99f25e8 --- /dev/null +++ b/recipes-core/readline/readline-morello_8.1.2.bb @@ -0,0 +1,7 @@ +require readline-morello.inc + +SRC_URI += "file://configure-fix.patch \ + file://norpath.patch \ + " + +SRC_URI[archive.sha256sum] = "7589a2381a8419e68654a47623ce7dfcb756815c8fee726b98f90bf668af7bc6" diff --git a/recipes-core/readline/readline/configure-fix.patch b/recipes-core/readline/readline/configure-fix.patch new file mode 100644 index 0000000..ef3104f --- /dev/null +++ b/recipes-core/readline/readline/configure-fix.patch @@ -0,0 +1,35 @@ +Upstream-Status: Pending + +Without this it fails to link against libtermcap causing various missing +symbols issues. + +RP - 8/10/08 + +Support 6.3 which uses configure.ac rather than configure.in. +Signed-off-by: Hongxu Jia hongxu.jia@windriver.com +--- + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cea8f91..9075b8f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -218,10 +218,10 @@ if test -f ${srcdir}/support/shobj-conf; then + AC_MSG_CHECKING(configuration for building shared libraries) + eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` + +-# case "$SHLIB_LIBS" in +-# *curses*|*termcap*|*termlib*) ;; +-# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; +-# esac ++ case "$SHLIB_LIBS" in ++ *curses*|*termcap*|*termlib*) ;; ++ *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;; ++ esac + + AC_SUBST(SHOBJ_CC) + AC_SUBST(SHOBJ_CFLAGS) +-- +1.8.1.2 + diff --git a/recipes-core/readline/readline/norpath.patch b/recipes-core/readline/readline/norpath.patch new file mode 100644 index 0000000..5d71582 --- /dev/null +++ b/recipes-core/readline/readline/norpath.patch @@ -0,0 +1,21 @@ +This support script ends up hardcoding unnecessary rpaths into the libraries. We +will search $libdir automatically so this is just wastes space. There may be some +cases this is necessary but our use cases aren't one of them. + +Upstream-Status: Inappropriate + +RP 2012/2/23 + +Index: readline-6.2/support/shobj-conf +=================================================================== +--- readline-6.2.orig/support/shobj-conf 2012-02-23 11:06:37.193179379 +0000 ++++ readline-6.2/support/shobj-conf 2012-02-23 11:06:50.049178918 +0000 +@@ -114,7 +114,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)' + ;; +