Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | SUMMARY = "Library for editing typed command lines" |
| 2 | DESCRIPTION = "The GNU Readline library provides a set of functions for use by applications that allow users to edit \ |
| 3 | command lines as they are typed in. Both Emacs and vi editing modes are available. The Readline library includes \ |
| 4 | additional functions to maintain a list of previously-entered command lines, to recall and perhaps reedit those \ |
| 5 | lines, and perform csh-like history expansion on previous commands." |
| 6 | SECTION = "libs" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 7 | HOMEPAGE = "https://tiswww.case.edu/php/chet/readline/rltop.html" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 9 | # GPL-2.0-or-later (< 6.0), GPL-3.0-or-later (>= 6.0) |
Andrew Geissler | 7e0e3c0 | 2022-02-25 20:34:39 +0000 | [diff] [blame] | 10 | LICENSE = "GPL-3.0-or-later" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 11 | LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" |
| 12 | |
| 13 | DEPENDS += "ncurses" |
| 14 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 15 | SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive" |
| 16 | SRC_URI += "file://inputrc" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | |
| 18 | inherit autotools texinfo |
| 19 | |
| 20 | EXTRA_AUTORECONF += "--exclude=autoheader" |
Patrick Williams | 7784c42 | 2022-11-17 07:29:11 -0600 | [diff] [blame] | 21 | EXTRA_OECONF += "bash_cv_termcap_lib=ncurses --with-shared-termcap-library" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 22 | |
| 23 | LEAD_SONAME = "libreadline.so" |
| 24 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 25 | do_configure:prepend () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | if [ ! -e ${S}/acinclude.m4 ]; then |
| 27 | cat ${S}/aclocal.m4 > ${S}/acinclude.m4 |
| 28 | fi |
| 29 | } |
| 30 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 31 | do_install:append () { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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} |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 37 | rm -rf ${D}${datadir}/${BPN}/*.c |
| 38 | rmdir ${D}${datadir}/${BPN} || true |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 39 | |
| 40 | install -m 0755 -d ${D}${sysconfdir} |
| 41 | install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 42 | } |
| 43 | |
| 44 | BBCLASSEXTEND = "native nativesdk" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 45 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 46 | CONFFILES:${PN} += "${sysconfdir}/inputrc" |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 47 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 48 | inherit update-alternatives |
| 49 | |
| 50 | ALTERNATIVE_PRIORITY = "100" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | ALTERNATIVE:${PN}-doc = "history.3" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 52 | ALTERNATIVE_LINK_NAME[history.3] = "${mandir}/man3/history.3" |
| 53 | |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 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. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | SRC_URI:append:class-native = " file://rl-native.map" |
| 57 | LDFLAGS:append:class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map" |