diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2022-04-12 08:38:08 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-12 15:54:31 +0100 |
commit | 0c1bb43df39a9cd0256d742c8de47b53b0db2bfc (patch) | |
tree | 29e87462ab86b649ee4183eb3fa311f3c7f13210 | |
parent | d2f8b5cdb285b72a4ed93450f6703ca27aa42e8a (diff) | |
download | meta-gplv2-0c1bb43df39a9cd0256d742c8de47b53b0db2bfc.tar.gz |
readline: add config file for pkgconfigmaster-next
After bind upgrade to 9.18.x, the below change introduced [1],
all supported libraries have accompanying .pc files now.
ba2376b9e0 Update and cleanup the readline library support
Otherwise, there comes below error during do_configure.
$ bitbake bind
| configure: error: Package requirements (readline) were not met:
|
| No package 'readline' found
So backport patches [2] to add support .pc file for readline to
fix the above issue.
[1] https://gitlab.isc.org/isc-projects/bind9/-/commit/ba2376b9e03b9bd214242c987609a658ef24ec41
[2] https://git.savannah.gnu.org/cgit/readline.git/commit/?id=d49a9082c0e15bba8cd3d8cc0a994409cf823cac
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 files changed, 152 insertions, 1 deletions
diff --git a/recipes-core/readline/readline-5.2/0001-Makefile.in-add-readline.pc.in.patch b/recipes-core/readline/readline-5.2/0001-Makefile.in-add-readline.pc.in.patch new file mode 100644 index 0000000..d9d36a0 --- /dev/null +++ b/recipes-core/readline/readline-5.2/0001-Makefile.in-add-readline.pc.in.patch | |||
@@ -0,0 +1,135 @@ | |||
1 | From 20141946db72908e23c11d946937e945fb7e527d Mon Sep 17 00:00:00 2001 | ||
2 | From: Chet Ramey <chet.ramey@case.edu> | ||
3 | Date: Mon, 11 Apr 2022 18:06:03 +0800 | ||
4 | Subject: [PATCH] Makefile.in: add readline.pc.in | ||
5 | |||
6 | Add config file for pkgconfig. | ||
7 | |||
8 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/readline.git/commit/?id=d49a9082c0e15bba8cd3d8cc0a994409cf823cac] | ||
9 | |||
10 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
11 | --- | ||
12 | MANIFEST | 1 + | ||
13 | Makefile.in | 26 ++++++++++++++++++++------ | ||
14 | configure.in | 11 ++++++++++- | ||
15 | 3 files changed, 31 insertions(+), 7 deletions(-) | ||
16 | |||
17 | diff --git a/MANIFEST b/MANIFEST | ||
18 | index b288fb6..f5b583b 100644 | ||
19 | --- a/MANIFEST | ||
20 | +++ b/MANIFEST | ||
21 | @@ -19,6 +19,7 @@ config.h.in f | ||
22 | configure f | ||
23 | configure.in f | ||
24 | Makefile.in f | ||
25 | +readline.pc.in f | ||
26 | ansi_stdlib.h f | ||
27 | chardefs.h f | ||
28 | history.h f | ||
29 | diff --git a/Makefile.in b/Makefile.in | ||
30 | index 87df428..e4233f7 100644 | ||
31 | --- a/Makefile.in | ||
32 | +++ b/Makefile.in | ||
33 | @@ -57,6 +57,7 @@ mandir = @mandir@ | ||
34 | includedir = @includedir@ | ||
35 | datadir = @datadir@ | ||
36 | localedir = $(datadir)/locale | ||
37 | +pkgconfigdir = ${libdir}/pkgconfig | ||
38 | |||
39 | infodir = @infodir@ | ||
40 | |||
41 | @@ -133,7 +134,7 @@ DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) | ||
42 | |||
43 | CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile | ||
44 | CREATED_CONFIGURE = config.status config.h config.cache config.log \ | ||
45 | - stamp-config stamp-h | ||
46 | + stamp-config stamp-h readline.pc | ||
47 | CREATED_TAGS = TAGS tags | ||
48 | |||
49 | INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \ | ||
50 | @@ -217,9 +218,18 @@ uninstall-headers: | ||
51 | |||
52 | maybe-uninstall-headers: uninstall-headers | ||
53 | |||
54 | +install-pc: installdirs | ||
55 | + -$(INSTALL_DATA) $(BUILD_DIR)/readline.pc $(DESTDIR)$(pkgconfigdir)/readline.pc | ||
56 | + | ||
57 | +uninstall-pc: | ||
58 | + -test -n "$(pkgconfigdir)" && cd $(DESTDIR)$(pkgconfigdir) && \ | ||
59 | + ${RM} readline.pc | ||
60 | + | ||
61 | +maybe-uninstall-pc: uninstall-pc | ||
62 | + | ||
63 | install: $(INSTALL_TARGETS) | ||
64 | |||
65 | -install-static: installdirs $(STATIC_LIBS) install-headers install-doc | ||
66 | +install-static: installdirs $(STATIC_LIBS) install-headers install-doc install-pc | ||
67 | -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old | ||
68 | $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a | ||
69 | -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a | ||
70 | @@ -230,17 +240,18 @@ install-static: installdirs $(STATIC_LIBS) install-headers install-doc | ||
71 | installdirs: $(srcdir)/support/mkinstalldirs | ||
72 | -$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \ | ||
73 | $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \ | ||
74 | - $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) | ||
75 | + $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) \ | ||
76 | + $(DESTDIR)$(pkgconfigdir) | ||
77 | |||
78 | -uninstall: uninstall-headers uninstall-doc | ||
79 | +uninstall: uninstall-headers uninstall-doc uninstall-pc | ||
80 | -test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \ | ||
81 | ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS) | ||
82 | -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) | ||
83 | |||
84 | -install-shared: installdirs install-headers shared install-doc | ||
85 | +install-shared: installdirs install-headers shared install-doc install-pc | ||
86 | -( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install ) | ||
87 | |||
88 | -uninstall-shared: maybe-uninstall-headers | ||
89 | +uninstall-shared: maybe-uninstall-headers maybe-uninstall-pc | ||
90 | -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) | ||
91 | |||
92 | install-doc: installdirs | ||
93 | @@ -281,6 +292,9 @@ distclean maintainer-clean: clean | ||
94 | $(RM) $(CREATED_CONFIGURE) | ||
95 | $(RM) $(CREATED_TAGS) | ||
96 | |||
97 | +readline.pc: config.status $(srcdir)/readline.pc.in | ||
98 | + $(SHELL) config.status | ||
99 | + | ||
100 | info dvi: | ||
101 | -( cd doc && $(MAKE) $(MFLAGS) $@ ) | ||
102 | |||
103 | diff --git a/configure.in b/configure.in | ||
104 | index 9d1f3fb..1186fc3 100644 | ||
105 | --- a/configure.in | ||
106 | +++ b/configure.in | ||
107 | @@ -191,6 +191,14 @@ if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then | ||
108 | fi | ||
109 | fi | ||
110 | |||
111 | +case "$TERMCAP_LIB" in | ||
112 | +-ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;; | ||
113 | +-lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; | ||
114 | +-lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; | ||
115 | +-ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;; | ||
116 | +*) TERMCAP_PKG_CONFIG_LIB=termcap ;; | ||
117 | +esac | ||
118 | + | ||
119 | BASH_CHECK_MULTIBYTE | ||
120 | |||
121 | case "$host_cpu" in | ||
122 | @@ -288,8 +296,9 @@ AC_SUBST(host_os) | ||
123 | AC_SUBST(LIBVERSION) | ||
124 | |||
125 | AC_SUBST(TERMCAP_LIB) | ||
126 | +AC_SUBST(TERMCAP_PKG_CONFIG_LIB) | ||
127 | |||
128 | -AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile], | ||
129 | +AC_OUTPUT([Makefile doc/Makefile examples/Makefile shlib/Makefile readline.pc], | ||
130 | [ | ||
131 | # Makefile uses this timestamp file to record whether config.h is up to date. | ||
132 | echo > stamp-h | ||
133 | -- | ||
134 | 2.25.1 | ||
135 | |||
diff --git a/recipes-core/readline/readline-5.2/readline.pc.in b/recipes-core/readline/readline-5.2/readline.pc.in new file mode 100644 index 0000000..ff79d71 --- /dev/null +++ b/recipes-core/readline/readline-5.2/readline.pc.in | |||
@@ -0,0 +1,12 @@ | |||
1 | prefix=@prefix@ | ||
2 | exec_prefix=@exec_prefix@ | ||
3 | libdir=@libdir@ | ||
4 | includedir=@includedir@ | ||
5 | |||
6 | Name: Readline | ||
7 | Description: Gnu Readline library for command line editing | ||
8 | URL: http://tiswww.cwru.edu/php/chet/readline/rltop.html | ||
9 | Version: @LIBVERSION@ | ||
10 | Requires.private: @TERMCAP_PKG_CONFIG_LIB@ | ||
11 | Libs: -L${libdir} -lreadline | ||
12 | Cflags: -I${includedir} | ||
diff --git a/recipes-core/readline/readline_5.2.bb b/recipes-core/readline/readline_5.2.bb index d42ce8b..5ce1d3f 100644 --- a/recipes-core/readline/readline_5.2.bb +++ b/recipes-core/readline/readline_5.2.bb | |||
@@ -29,7 +29,9 @@ SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive \ | |||
29 | ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-014;name=patch14;apply=yes;striplevel=0 \ | 29 | ${GNU_MIRROR}/readline/readline-5.2-patches/readline52-014;name=patch14;apply=yes;striplevel=0 \ |
30 | file://configure-fix.patch \ | 30 | file://configure-fix.patch \ |
31 | file://config-dirent-symbols.patch \ | 31 | file://config-dirent-symbols.patch \ |
32 | file://fix-redundant-rpath.patch" | 32 | file://fix-redundant-rpath.patch \ |
33 | file://0001-Makefile.in-add-readline.pc.in.patch \ | ||
34 | file://readline.pc.in" | ||
33 | 35 | ||
34 | SRC_URI[archive.md5sum] = "e39331f32ad14009b9ff49cc10c5e751" | 36 | SRC_URI[archive.md5sum] = "e39331f32ad14009b9ff49cc10c5e751" |
35 | SRC_URI[archive.sha256sum] = "12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45" | 37 | SRC_URI[archive.sha256sum] = "12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45" |
@@ -66,6 +68,7 @@ SRC_URI[patch14.sha256sum] = "6f1a68320d01522ca1ea5a737124ecc8739f3dcbfea2dee21e | |||
66 | inherit autotools | 68 | inherit autotools |
67 | 69 | ||
68 | EXTRA_AUTORECONF += "--exclude=autoheader" | 70 | EXTRA_AUTORECONF += "--exclude=autoheader" |
71 | EXTRA_OECONF += "bash_cv_termcap_lib=ncurses" | ||
69 | 72 | ||
70 | LEAD_SONAME = "libreadline.so" | 73 | LEAD_SONAME = "libreadline.so" |
71 | 74 | ||
@@ -73,6 +76,7 @@ do_configure:prepend () { | |||
73 | if [ ! -e ${S}/acinclude.m4 ]; then | 76 | if [ ! -e ${S}/acinclude.m4 ]; then |
74 | cat ${S}/aclocal.m4 > ${S}/acinclude.m4 | 77 | cat ${S}/aclocal.m4 > ${S}/acinclude.m4 |
75 | fi | 78 | fi |
79 | cp -r ${WORKDIR}/readline.pc.in ${S} | ||
76 | } | 80 | } |
77 | 81 | ||
78 | do_install:append () { | 82 | do_install:append () { |