blob: 7f2f1a092bc5ea8c0754b052482411b0bd37b66c [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "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"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06007HOMEPAGE = "https://tiswww.case.edu/php/chet/readline/rltop.html"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05008
Andrew Geissler9aee5002022-03-30 16:27:02 +00009# GPL-2.0-or-later (< 6.0), GPL-3.0-or-later (>= 6.0)
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000010LICENSE = "GPL-3.0-or-later"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050011LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
12
13DEPENDS += "ncurses"
14
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050015SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive"
16SRC_URI += "file://inputrc"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017
18inherit autotools texinfo
19
20EXTRA_AUTORECONF += "--exclude=autoheader"
Andrew Geissler5199d832021-09-24 16:47:35 -050021EXTRA_OECONF += "bash_cv_termcap_lib=ncurses"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050022
23LEAD_SONAME = "libreadline.so"
24
Patrick Williams213cb262021-08-07 19:21:33 -050025do_configure:prepend () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026 if [ ! -e ${S}/acinclude.m4 ]; then
27 cat ${S}/aclocal.m4 > ${S}/acinclude.m4
28 fi
29}
30
Patrick Williams213cb262021-08-07 19:21:33 -050031do_install:append () {
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 # 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 Williamsc0f7c042017-02-23 20:41:17 -060037 rm -rf ${D}${datadir}/${BPN}/*.c
38 rmdir ${D}${datadir}/${BPN} || true
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050039
40 install -m 0755 -d ${D}${sysconfdir}
41 install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
Patrick Williamsc124f4f2015-09-15 14:41:29 -050042}
43
44BBCLASSEXTEND = "native nativesdk"
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050045
Patrick Williams213cb262021-08-07 19:21:33 -050046CONFFILES:${PN} += "${sysconfdir}/inputrc"
Brad Bishopf3f93bb2019-10-16 14:33:32 -040047
Andrew Geissler82c905d2020-04-13 13:39:40 -050048inherit update-alternatives
49
50ALTERNATIVE_PRIORITY = "100"
Patrick Williams213cb262021-08-07 19:21:33 -050051ALTERNATIVE:${PN}-doc = "history.3"
Andrew Geissler82c905d2020-04-13 13:39:40 -050052ALTERNATIVE_LINK_NAME[history.3] = "${mandir}/man3/history.3"
53
Brad Bishopf3f93bb2019-10-16 14:33:32 -040054# 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 Williams213cb262021-08-07 19:21:33 -050056SRC_URI:append:class-native = " file://rl-native.map"
57LDFLAGS:append:class-native = " -Wl,--version-script=${WORKDIR}/rl-native.map"