Hi,

I took a closer look at this and checked what Debian is doing. I've
attached a fixup patch that changes a few things:

- use abi version 5. Some packages lock for that version explicitly.
- use linker scripts too deal with the tinfo problem
- fix some usr-merge fallout.

On Fri, Feb 09, 2018 at 03:14:19PM +0100, Ladislav Michl wrote:
> Signed-off-by: Ladislav Michl <la...@linux-mips.org>
> ---
>  .../0001-teach-ncurses-config-about-sysroot.patch  | 39 +++++-----
>  patches/{ncurses-5.9 => ncurses-6.1}/series        |  0
>  rules/ncurses.make                                 | 87 
> +++++++++++-----------
>  3 files changed, 61 insertions(+), 65 deletions(-)
>
[...]
> diff --git a/rules/ncurses.make b/rules/ncurses.make
> index c2fcde478..40be792fb 100644
> --- a/rules/ncurses.make
> +++ b/rules/ncurses.make
> @@ -15,9 +15,9 @@ PACKAGES-$(PTXCONF_NCURSES) += ncurses
>  #
>  # Paths and names
>  #
> -NCURSES_VERSION      := 5.9
> +NCURSES_VERSION      := 6.1
>  NCURSES_MAJOR        := $(word 1,$(subst ., ,$(NCURSES_VERSION)))
> -NCURSES_MD5  := 8cb9c412e5f2d96bc6f459aa8c6282a1
> +NCURSES_MD5  := 98c889aaf8d23910d2b92d65be2e737a
>  NCURSES              := ncurses-$(NCURSES_VERSION)
>  NCURSES_SUFFIX       := tar.gz
>  NCURSES_URL  := $(call ptx/mirror, GNU, ncurses/$(NCURSES).$(NCURSES_SUFFIX))
> @@ -31,58 +31,57 @@ NCURSES_LICENSE_FILES     := \
>  # Prepare
>  # 
> ----------------------------------------------------------------------------
>  
> -NCURSES_ENV := \
> +NCURSES_CONF_TOOL := autoconf
> +NCURSES_CONF_ENV := \
>       $(CROSS_ENV) \
>       TIC_PATH="$(PTXCONF_SYSROOT_HOST)/bin/tic"
> -
> -NCURSES_AUTOCONF_SHARED := \

NCURSES_AUTOCONF_SHARED is used by host-ncurses, so this is still needed in
some way.

Michael

> -     --without-cxx-binding \
> -     --disable-echo \
> -     --disable-nls \
> -     --enable-const \
> -     --enable-overwrite \
> -     --libdir=/$(CROSS_LIB_DIR) \
> -     --without-debug \
> -     --without-normal \
> +# NOTE: reentrant enables opaque, which breaks other packages
> +# pthread enables reentrant, so don't enable it either
> +NCURSES_CONF_OPT := \
> +     $(CROSS_AUTOCONF_USR) \
>       --without-ada \
> -     --without-gpm \
> +     --without-cxx \
> +     --without-cxx-binding \
> +     --enable-db-install \
>       --without-manpages \
> +     --without-progs \
> +     --without-tack \
>       --without-tests \
> +     --with-curses-h \
> +     --enable-pc-files \
>       --enable-mixed-case \
> -     --with-ticlib=yes \
> +     --without-libtool \
> +     --with-shared \
> +     --with-normal \
> +     --without-debug \
> +     --without-profile \
> +     --without-cxx-shared \
> +     --with-termlib \
> +     --with-ticlib \
> +     --without-gpm \
> +     --without-dlsym \
> +     --without-sysmouse \
> +     --disable-rpath \
>       --disable-relink \
> +     --disable-rpath-hack \
> +     --enable-overwrite \
> +     --$(call ptx/endis,PTXCONF_NCURSES_BIG_CORE)-big-core \
>       --disable-big-strings \
> -     --disable-sp-funcs \
> +     --$(call ptx/endis,PTXCONF_NCURSES_WIDE_CHAR)-widec \
> +     --enable-ext-funcs \
> +     --enable-sp-funcs \
>       --disable-term-driver \
> +     --enable-const \
> +     --enable-ext-colors \
>       --disable-ext-mouse \
> -     --disable-interop \
> -     --disable-rpath \
> -     --disable-rpath-hack \
> -     --disable-ext-colors \
> +     --disable-ext-putwin \
> +     --disable-no-padding \
> +     --disable-signed-char \
> +     --disable-sigwinch \
>       --without-pthread \
> -     --disable-reentrant
> -
> -# NOTE: reentrant enables opaque, which breaks other packages
> -# pthread enables reentrant, so don't enable it either
> -
> -# enable wide char support on demand only
> -ifdef PTXCONF_NCURSES_WIDE_CHAR
> -NCURSES_AUTOCONF_SHARED += --enable-widec
> -else
> -NCURSES_AUTOCONF_SHARED += --disable-widec
> -endif
> -
> -ifdef PTXCONF_NCURSES_BIG_CORE
> -NCURSES_AUTOCONF_SHARED += --enable-big-core
> -else
> -NCURSES_AUTOCONF_SHARED += --disable-big-core
> -endif
> -
> -NCURSES_AUTOCONF := \
> -     $(CROSS_AUTOCONF_USR) \
> -     $(NCURSES_AUTOCONF_SHARED) \
> -     --with-shared \
> -     --without-progs
> +     --disable-reentrant \
> +     --without-develop \
> +     --disable-interop
>  
>  NCURSES_CPPFLAGS := -P

This was for some problems with newer compiler versions. Is this still
needed?

Michael

>  
> @@ -96,7 +95,7 @@ ifdef PTXCONF_NCURSES_WIDE_CHAR
>  # library even if they request for the non wide char library
>  # Done by forcing the linker to use the right library instead
>  #
> -NCURSES_LIBRARY_LIST := ncurses
> +NCURSES_LIBRARY_LIST := ncurses tic tinfo
>  
>  ifdef PTXCONF_NCURSES_FORM
>  NCURSES_LIBRARY_LIST += form
> -- 
> 2.16.1
> 
> 
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
>From 345f60f68cc2cf6920bce72b814bc4d62be9a090 Mon Sep 17 00:00:00 2001
From: Michael Olbrich <m.olbr...@pengutronix.de>
Date: Thu, 22 Feb 2018 09:07:52 +0100
Subject: [PATCH] fixup! ncurses: version bump 5.9 -> 6.1

---
 rules/ncurses.make | 54 +++++++++++++++++++++++++++++-------------------------
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/rules/ncurses.make b/rules/ncurses.make
index 9ff9b2f517db..ba474cbf815b 100644
--- a/rules/ncurses.make
+++ b/rules/ncurses.make
@@ -39,6 +39,7 @@ NCURSES_CONF_ENV := \
 # pthread enables reentrant, so don't enable it either
 NCURSES_CONF_OPT := \
 	$(CROSS_AUTOCONF_USR) \
+	--with-abi-version=5 \
 	--without-ada \
 	--without-cxx \
 	--without-cxx-binding \
@@ -95,7 +96,7 @@ ifdef PTXCONF_NCURSES_WIDE_CHAR
 # library even if they request for the non wide char library
 # Done by forcing the linker to use the right library instead
 #
-NCURSES_LIBRARY_LIST := ncurses tic tinfo
+NCURSES_LIBRARY_LIST := tic tinfo
 
 ifdef PTXCONF_NCURSES_FORM
 NCURSES_LIBRARY_LIST += form
@@ -120,13 +121,16 @@ ifdef PTXCONF_NCURSES_WIDE_CHAR
 # For this, the links at runtime are required
 #
 	for lib in $(NCURSES_LIBRARY_LIST); do \
-		echo "INPUT(-l$${lib}w)" > $(NCURSES_PKGDIR)/$(CROSS_LIB_DIR)/lib$${lib}.so ; \
+		echo "INPUT(-l$${lib}w)" > $(NCURSES_PKGDIR)/usr/$(CROSS_LIB_DIR)/lib$${lib}.so ; \
 	done
-	echo "INPUT(-lncursesw)" > $(NCURSES_PKGDIR)/$(CROSS_LIB_DIR)/libcurses.so
+	rm $(NCURSES_PKGDIR)/usr/$(CROSS_LIB_DIR)/libncursesw.so
+	echo "INPUT(libncursesw.so.5 -ltinfo)" > $(NCURSES_PKGDIR)/usr/$(CROSS_LIB_DIR)/libncursesw.so
 
-	ln -sf -- "ncursesw$(NCURSES_MAJOR)-config" \
-		"$(NCURSES_PKGDIR)/usr/bin/ncurses$(NCURSES_MAJOR)-config"
+	ln -sf -- "ncursesw5-config" \
+		"$(NCURSES_PKGDIR)/usr/bin/ncurses5-config"
 endif
+	echo "INPUT(libncurses$(NCURSES_WIDE).so.5 -ltinfo)" > $(NCURSES_PKGDIR)/usr/$(CROSS_LIB_DIR)/libncurses.so
+	ln -s libncurses.so $(NCURSES_PKGDIR)/usr/$(CROSS_LIB_DIR)/libcurses.so
 	@$(call touch)
 
 $(STATEDIR)/ncurses.install.post:
@@ -151,22 +155,22 @@ $(STATEDIR)/ncurses.targetinstall:
 	@$(call install_lib, ncurses, 0, 0, 0644, libncurses$(NCURSES_WIDE))
 
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
-	@$(call install_link, ncurses, libncursesw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libncurses.so.$(NCURSES_VERSION))
-	@$(call install_link, ncurses, libncursesw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libncurses.so.$(NCURSES_MAJOR))
-	@$(call install_link, ncurses, libncursesw.so.$(NCURSES_VERSION), \
+	@$(call install_link, ncurses, libncursesw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libncurses.so.5.9)
+	@$(call install_link, ncurses, libncursesw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libncurses.so.5)
+	@$(call install_link, ncurses, libncursesw.so.5.9, \
 		/$(CROSS_LIB_DIR)/libncurses.so)
 endif
 
 ifdef PTXCONF_NCURSES_FORM
 	@$(call install_lib, ncurses, 0, 0, 0644, libform$(NCURSES_WIDE))
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
-	@$(call install_link, ncurses, libformw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libform.so.$(NCURSES_VERSION))
-	@$(call install_link, ncurses, libformw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libform.so.$(NCURSES_MAJOR))
-	@$(call install_link, ncurses, libformw.so.$(NCURSES_VERSION), \
+	@$(call install_link, ncurses, libformw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libform.so.5.9)
+	@$(call install_link, ncurses, libformw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libform.so.5)
+	@$(call install_link, ncurses, libformw.so.5.9, \
 		/$(CROSS_LIB_DIR)/libform.so)
 endif
 endif
@@ -175,11 +179,11 @@ endif
 ifdef PTXCONF_NCURSES_MENU
 	@$(call install_lib, ncurses, 0, 0, 0644, libmenu$(NCURSES_WIDE))
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
-	@$(call install_link, ncurses, libmenuw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libmenu.so.$(NCURSES_VERSION))
-	@$(call install_link, ncurses, libmenuw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libmenu.so.$(NCURSES_MAJOR))
-	@$(call install_link, ncurses, libmenuw.so.$(NCURSES_VERSION), \
+	@$(call install_link, ncurses, libmenuw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libmenu.so.5.9)
+	@$(call install_link, ncurses, libmenuw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libmenu.so.5)
+	@$(call install_link, ncurses, libmenuw.so.5.9, \
 		/$(CROSS_LIB_DIR)/libmenu.so)
 endif
 endif
@@ -188,11 +192,11 @@ endif
 ifdef PTXCONF_NCURSES_PANEL
 	@$(call install_lib, ncurses, 0, 0, 0644, libpanel$(NCURSES_WIDE))
 ifdef PTXCONF_NCURSES_BACKWARD_COMPATIBLE_NON_WIDE_CHAR
-	@$(call install_link, ncurses, libpanelw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libpanel.so.$(NCURSES_VERSION))
-	@$(call install_link, ncurses, libpanelw.so.$(NCURSES_VERSION), \
-		/$(CROSS_LIB_DIR)/libpanel.so.$(NCURSES_MAJOR))
-	@$(call install_link, ncurses, libpanelw.so.$(NCURSES_VERSION), \
+	@$(call install_link, ncurses, libpanelw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libpanel.so.5.9)
+	@$(call install_link, ncurses, libpanelw.so.5.9, \
+		/$(CROSS_LIB_DIR)/libpanel.so.5)
+	@$(call install_link, ncurses, libpanelw.so.5.9, \
 		/$(CROSS_LIB_DIR)/libpanel.so)
 endif
 endif
-- 
2.16.1

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to