diff mbox series

[OpenWrt-Devel] ncurses: Add ncurses6 config

Message ID 20180926130634.3764-1-jan.kardell@telliq.com
State Deferred
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel] ncurses: Add ncurses6 config | expand

Commit Message

Jan Kardell Sept. 26, 2018, 1:06 p.m. UTC
This is needed by gpsd. Otherwise it finds and uses the build hosts
version of ncurses header files. And that is not compatible, at least
on openSUSE.

Also use relative symlinks to the ncursesw6-config file.

This patch is needed in master and 18.06 branch.

Signed-off-by: Jan Kardell <jan.kardell@telliq.com>
---
 package/libs/ncurses/Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile
index 94c968816f..3c51b75129 100644
--- a/package/libs/ncurses/Makefile
+++ b/package/libs/ncurses/Makefile
@@ -9,7 +9,7 @@  include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ncurses
 PKG_VERSION:=6.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -148,13 +148,16 @@  define Build/InstallDev
 	for lib in ncurses panel menu form; do \
 		ln -s lib$$$${lib}w.so $(1)/usr/lib/lib$$$${lib}.so; \
 	done
+	ln -s . $(1)/usr/include/ncurses
 	ln -s . $(1)/usr/include/ncursesw
 	$(TARGET_CROSS)ar rc $(1)/usr/lib/libtinfo.a
 	$(INSTALL_DIR) $(2)/bin
 	$(CP) $(PKG_INSTALL_DIR)/usr/bin/ncursesw6-config $(2)/bin/
 	$(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' -e 's/$$$$INCS //g' \
 		$(2)/bin/ncursesw6-config
-	ln -sf $(STAGING_DIR)/host/bin/ncursesw6-config $(1)/usr/bin/ncursesw6-config
+	ln -rsf $(2)/bin/ncursesw6-config $(1)/usr/bin/ncurses6-config
+	ln -rsf $(2)/bin/ncursesw6-config $(2)/bin/ncurses6-config
+	ln -rsf $(2)/bin/ncursesw6-config $(1)/usr/bin/ncursesw6-config
 endef
 
 define Host/Compile