1SUMMARY = "Library for editing typed command lines" 2DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \ 3command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \ 4additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \ 5lines, and perform csh-like history expansion on previous commands." 6SECTION = "libs" 7HOMEPAGE = "https://tiswww.case.edu/php/chet/readline/rltop.html" 8 9# GPL-2.0-or-later (< 6.0), GPL-3.0-or-later (>= 6.0) 10LICENSE = "GPL-3.0-or-later" 11LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 12 13DEPENDS += "ncurses" 14 15SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive" 16SRC_URI += "file://inputrc" 17 18inherit autotools texinfo 19 20EXTRA_AUTORECONF += "--exclude=autoheader" 21EXTRA_OECONF += "bash_cv_termcap_lib=ncurses" 22 23LEAD_SONAME = "libreadline.so" 24 25do_configure:prepend () { 26 if [ ! -e ${S}/acinclude.m4 ]; then 27 cat ${S}/aclocal.m4 > ${S}/acinclude.m4 28 fi 29} 30 31do_install:append () { 32 # Make install doesn't properly install these 33 oe_libinstall -so -C shlib libhistory ${D}${libdir} 34 oe_libinstall -so -C shlib libreadline ${D}${libdir} 35 36 rmdir ${D}${bindir} 37 rm -rf ${D}${datadir}/${BPN}/*.c 38 rmdir ${D}${datadir}/${BPN} || true 39 40 install -m 0755 -d ${D}${sysconfdir} 41 install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc 42} 43 44BBCLASSEXTEND = "native nativesdk" 45 46CONFFILES:${PN} += "${sysconfdir}/inputrc" 47 48inherit update-alternatives 49 50ALTERNATIVE_PRIORITY = "100" 51ALTERNATIVE:${PN}-doc = "history.3" 52ALTERNATIVE_LINK_NAME[history.3] = "${mandir}/man3/history.3" 53 54# OpenSuse injects versions into libreadline leading to conficits between our native one and theirs 55# see their spec file for where this is injected. Extra versioning is harmless so we just do the same. 56SRC_URI:append:class-native = " file://rl-native.map" 57LDFLAGS:append:class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map" 58