diff options
| author | Rosen Penev | 2024-07-04 19:12:33 +0000 |
|---|---|---|
| committer | Robert Marko | 2024-07-08 07:44:21 +0000 |
| commit | d7a76fc351f7c33292202dedd4f9ab48b698212a (patch) | |
| tree | 3573f2239691ce7202e3717b0b90313f7b366a88 | |
| parent | 1b141cb3d10ae3bdb3b7cf0c4eb0d957629bc644 (diff) | |
| download | openwrt-d7a76fc351f7c33292202dedd4f9ab48b698212a.tar.gz | |
readline: fix pkgconfig usage
ncurses is built with wide support enabled, which enables libncursesw.
The problem is, the ncurses build system only supplies ncursesw or
ncurses.pc but not both. The other problem is, the readline build tests
for libncurses before the w variant, making its pc file unusable as
there is no ncurses.pc file to satisfy the Required: ncurses section.
Just override the library.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15864
Signed-off-by: Robert Marko <robimarko@gmail.com>
| -rw-r--r-- | package/libs/readline/Makefile | 3 | ||||
| -rw-r--r-- | package/libs/readline/patches/010-ncursesw-first.patch | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/package/libs/readline/Makefile b/package/libs/readline/Makefile index 015a1ae2da..3ab28712af 100644 --- a/package/libs/readline/Makefile +++ b/package/libs/readline/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=readline PKG_VERSION:=8.2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/readline @@ -51,6 +51,7 @@ CONFIGURE_ARGS += --with-curses --disable-install-examples CONFIGURE_VARS += \ bash_cv_wcwidth_broken=no \ bash_cv_func_sigsetjmp=yes \ + bash_cv_termcap_lib=libncursesw TARGET_CFLAGS += $(FPIC) HOST_CFLAGS += $(FPIC) diff --git a/package/libs/readline/patches/010-ncursesw-first.patch b/package/libs/readline/patches/010-ncursesw-first.patch new file mode 100644 index 0000000000..d66cc04622 --- /dev/null +++ b/package/libs/readline/patches/010-ncursesw-first.patch @@ -0,0 +1,20 @@ +--- a/configure ++++ b/configure +@@ -7305,6 +7305,9 @@ TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libncurses; then + TERMCAP_LIB=-lncurses + TERMCAP_DEP= ++elif test $bash_cv_termcap_lib = libncursesw; then ++TERMCAP_LIB=-lncursesw ++TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libc; then + TERMCAP_LIB= + TERMCAP_DEP= +@@ -7340,6 +7343,7 @@ case "$TERMCAP_LIB" in + -ltinfo) TERMCAP_PKG_CONFIG_LIB=tinfo ;; + -lcurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; + -lncurses) TERMCAP_PKG_CONFIG_LIB=ncurses ;; ++-lncursesw) TERMCAP_PKG_CONFIG_LIB=ncursesw ;; + -ltermcap) TERMCAP_PKG_CONFIG_LIB=termcap ;; + *) TERMCAP_PKG_CONFIG_LIB=termcap ;; + esac |