diff --git a/configs/gcw0_defconfig b/configs/gcw0_defconfig index 38d184531924..883de835f46e 100755 --- a/configs/gcw0_defconfig +++ b/configs/gcw0_defconfig @@ -154,6 +154,8 @@ BR2_PACKAGE_BOOST_SYSTEM=y BR2_PACKAGE_BOOST_THREAD=y BR2_PACKAGE_BOOST_TIMER=y BR2_PACKAGE_GLM=y +BR2_PACKAGE_NCURSES_WCHAR=y +BR2_PACKAGE_NCURSES_ADDITIONAL_TERMINFO="s/st-256color" BR2_PACKAGE_LIBXDGMIME=y BR2_PACKAGE_GMENU2X=y BR2_PACKAGE_GMENU2X_PLATFORM="gcw0" diff --git a/configs/rg350_defconfig b/configs/rg350_defconfig index 1261d40a88f6..89dfba66d888 100644 --- a/configs/rg350_defconfig +++ b/configs/rg350_defconfig @@ -157,6 +157,8 @@ BR2_PACKAGE_BOOST_SYSTEM=y BR2_PACKAGE_BOOST_THREAD=y BR2_PACKAGE_BOOST_TIMER=y BR2_PACKAGE_GLM=y +BR2_PACKAGE_NCURSES_WCHAR=y +BR2_PACKAGE_NCURSES_ADDITIONAL_TERMINFO="s/st-256color" BR2_PACKAGE_PYCLOCK=y BR2_PACKAGE_AVAHI=y BR2_PACKAGE_AVAHI_DAEMON=y diff --git a/package/ncurses/0001-gcc-5.x-MKlib_gen.patch b/package/ncurses/0001-gcc-5.x-MKlib_gen.patch new file mode 100644 index 000000000000..0106e8077fe9 --- /dev/null +++ b/package/ncurses/0001-gcc-5.x-MKlib_gen.patch @@ -0,0 +1,44 @@ +Fix gcc 5.x build failure + +Extracted from upstream commit +http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commit;h=97bb4678dc03e753290b39bbff30ba2825df9517. + ++ modify MKlib_gen.sh to work around change in development version of + gcc introduced here: + https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html + https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html + (reports by Marcus Shawcroft, Maohui Lei). + +Original author: Thomas E. Dickey +Signed-off-by: Mikhail Peselnik +[Adam Duskett: Refresh for 6.1] +Signed-off-by: Adam Duskett +--- a/ncurses/base/MKlib_gen.sh 2015-08-06 20:48:24.000000000 -0400 ++++ b/ncurses/base/MKlib_gen.sh 2017-02-07 10:09:01.293962392 -0500 +@@ -505,11 +505,22 @@ + -e 's/gen_$//' \ + -e 's/ / /g' >>$TMP + ++cat >$ED1 < $ED2 ++cat $ED2 >$TMP ++ + $preprocessor $TMP 2>/dev/null \ +-| sed \ +- -e 's/ / /g' \ +- -e 's/^ //' \ +- -e 's/_Bool/NCURSES_BOOL/g' \ ++| sed -f $ED1 \ + | $AWK -f $AW2 \ + | sed -f $ED3 \ + | sed \ diff --git a/package/ncurses/Config.in b/package/ncurses/Config.in index e8ab7102228d..9f7753b06aaf 100644 --- a/package/ncurses/Config.in +++ b/package/ncurses/Config.in @@ -1,8 +1,8 @@ config BR2_PACKAGE_NCURSES bool "ncurses" help - The Ncurses (new curses) library is a free software emulation of - curses in System V Release 4.0, and more. + The Ncurses (new curses) library is a free software + emulation of curses in System V Release 4.0, and more. This package installs only a few vital termcap entries @@ -10,24 +10,25 @@ config BR2_PACKAGE_NCURSES if BR2_PACKAGE_NCURSES -config BR2_PACKAGE_NCURSES_TARGET_PANEL - bool "ncurses libpanel in target" +config BR2_PACKAGE_NCURSES_WCHAR + bool "enable wide char support" + depends on BR2_USE_WCHAR help - Includes ncurses dynamic libpanel in target + Enable wide char & UTF-8 support in ncurses libraries -config BR2_PACKAGE_NCURSES_TARGET_FORM - bool "ncurses libform in target" +config BR2_PACKAGE_NCURSES_TARGET_PROGS + bool "ncurses programs" help - Includes ncurses dynamic libform in target + Include ncurses programs in target (clear, reset, tput, ...) -config BR2_PACKAGE_NCURSES_TARGET_MENU - bool "ncurses libmenu in target" +config BR2_PACKAGE_NCURSES_ADDITIONAL_TERMINFO + string "additional terminfo files to install" help - Includes ncurses dynamic libmenu in target + Whitespace separated list of terminfo files to install on the + target. A small number of vital terminfo files are always + installed. This list is in addition to the vital ones. -config BR2_PACKAGE_NCURSES_TARGET_PROGS - bool "ncurses programs" - help - Include ncurses programs in traget (clear, reset, tput, ...) + The terminfo filenames should have the single letter path + prefix. e.g. t/tmux. endif diff --git a/package/ncurses/ncurses-0002-fix-compiler-issue-gcc.patch b/package/ncurses/ncurses-0002-fix-compiler-issue-gcc.patch deleted file mode 100644 index 2448229b88e1..000000000000 --- a/package/ncurses/ncurses-0002-fix-compiler-issue-gcc.patch +++ /dev/null @@ -1,46 +0,0 @@ -https://bugs.gentoo.org/545114 - -extracted from the upstream change (which had many unrelated commits in one) - -From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001 -From: "Thomas E. Dickey" -Date: Sun, 7 Dec 2014 03:10:09 +0000 -Subject: [PATCH] ncurses 5.9 - patch 20141206 - -+ modify MKlib_gen.sh to work around change in development version of - gcc introduced here: - https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html - https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html - (reports by Marcus Shawcroft, Maohui Lei). - -diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh -index d8cc3c9..b91398c 100755 ---- a/ncurses/base/MKlib_gen.sh -+++ b/ncurses/base/MKlib_gen.sh -@@ -474,11 +474,22 @@ sed -n -f $ED1 \ - -e 's/gen_$//' \ - -e 's/ / /g' >>$TMP - -+cat >$ED1 < $ED2 -+cat $ED2 >$TMP -+ - $preprocessor $TMP 2>/dev/null \ --| sed \ -- -e 's/ / /g' \ -- -e 's/^ //' \ -- -e 's/_Bool/NCURSES_BOOL/g' \ -+| sed -f $ED1 \ - | $AWK -f $AW2 \ - | sed -f $ED3 \ - | sed \ diff --git a/package/ncurses/ncurses-01-fixup-pkg-config-handling.patch b/package/ncurses/ncurses-01-fixup-pkg-config-handling.patch deleted file mode 100644 index e1cfc751646a..000000000000 --- a/package/ncurses/ncurses-01-fixup-pkg-config-handling.patch +++ /dev/null @@ -1,89 +0,0 @@ -Change handling of PKG_CONFIG_LIBDIR - -When PKG_CONFIG_LIBDIR was unset in the environment, the configure -script was deducing the PKG_CONFIG_LIBDIR from the location of the -pkg-config binary, which doesn't make a lot of sense, and isn't done -by other autotools based packages. - -Also, the configure script was checking that the directory really -exists. This forced to create the directory *and* provide an absolute -path in PKG_CONFIG_LIBDIR, which didn't play well with the fact that -at installation time, PKG_CONFIG_LIBDIR is suffixed to DESTDIR, which -means that we got two times the staging directory location. - -This patch fixes both of those issues. Also, since ncurses uses a fork -of autoconf 2.13, we can't simply use _AUTORECONF=YES, so we also fix -the configure script in this patch. - -Signed-off-by: Thomas Petazzoni - -Index: b/configure -=================================================================== ---- a/configure -+++ b/configure -@@ -3623,27 +3623,20 @@ - - # Leave this as something that can be overridden in the environment. - if test -z "$PKG_CONFIG_LIBDIR" ; then -- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig -+ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig" - fi -+ - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` -- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then - --# Check whether --enable-pc-files or --disable-pc-files was given. --if test "${enable_pc_files+set}" = set; then -- enableval="$enable_pc_files" -- enable_pc_files=$enableval --else -- enable_pc_files=no --fi; -- echo "$as_me:3638: result: $enable_pc_files" >&5 --echo "${ECHO_T}$enable_pc_files" >&6 -+ # Check whether --enable-pc-files or --disable-pc-files was given. -+ if test "${enable_pc_files+set}" = set; then -+ enableval="$enable_pc_files" -+ enable_pc_files=$enableval - else -- echo "$as_me:3641: result: no" >&5 --echo "${ECHO_T}no" >&6 -- { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5 --echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;} -- enable_pc_files=no -- fi -+ enable_pc_files=no -+ fi; -+ echo "$as_me:3638: result: $enable_pc_files" >&5 -+ echo "${ECHO_T}$enable_pc_files" >&6 - fi - - echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5 -Index: b/configure.in -=================================================================== ---- a/configure.in -+++ b/configure.in -@@ -174,20 +174,14 @@ - - # Leave this as something that can be overridden in the environment. - if test -z "$PKG_CONFIG_LIBDIR" ; then -- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig -+ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig" - fi - PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` -- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then -- AC_ARG_ENABLE(pc-files, -+ AC_ARG_ENABLE(pc-files, - [ --enable-pc-files generate and install .pc files for pkg-config], - [enable_pc_files=$enableval], - [enable_pc_files=no]) -- AC_MSG_RESULT($enable_pc_files) -- else -- AC_MSG_RESULT(no) -- AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR) -- enable_pc_files=no -- fi -+ AC_MSG_RESULT($enable_pc_files) - fi - AC_SUBST(PKG_CONFIG_LIBDIR) - diff --git a/package/ncurses/ncurses.hash b/package/ncurses/ncurses.hash new file mode 100644 index 000000000000..123256bf944a --- /dev/null +++ b/package/ncurses/ncurses.hash @@ -0,0 +1,4 @@ +# Locally calculated after checking pgp signature +sha256 aa057eeeb4a14d470101eff4597d5833dcef5965331be3528c08d99cebaa0d17 ncurses-6.1.tar.gz +# Locally computed +sha256 86106f0da1cf5ccfa0f0651665dd1b4515e8edad1c7972780155770548b317d9 COPYING diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk index 4bba8f1b3b22..adb5437fafe9 100644 --- a/package/ncurses/ncurses.mk +++ b/package/ncurses/ncurses.mk @@ -4,18 +4,15 @@ # ################################################################################ -NCURSES_VERSION = 5.9 +NCURSES_VERSION = 6.1 NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses NCURSES_INSTALL_STAGING = YES NCURSES_DEPENDENCIES = host-ncurses -HOST_NCURSES_DEPENDENCIES = -NCURSES_PROGS = clear infocmp tabs tic toe tput tset NCURSES_LICENSE = MIT with advertising clause -NCURSES_LICENSE_FILES = README -NCURSES_CONFIG_SCRIPTS = ncurses5-config +NCURSES_LICENSE_FILES = COPYING +NCURSES_CONFIG_SCRIPTS = ncurses$(NCURSES_LIB_SUFFIX)6-config NCURSES_CONF_OPT = \ - $(if $(BR2_PREFER_STATIC_LIB),--without-shared,--with-shared) \ --without-cxx \ --without-cxx-binding \ --without-ada \ @@ -28,18 +25,88 @@ NCURSES_CONF_OPT = \ --enable-const \ --enable-overwrite \ --enable-pc-files \ + --disable-stripping \ + --with-pkg-config-libdir="/usr/lib/pkgconfig" \ $(if $(BR2_PACKAGE_NCURSES_TARGET_PROGS),,--without-progs) \ --without-manpages -# Install after busybox for the full-blown versions -ifeq ($(BR2_PACKAGE_BUSYBOX),y) - NCURSES_DEPENDENCIES += busybox +ifeq ($(BR2_STATIC_LIBS),y) +NCURSES_CONF_OPT += --without-shared --with-normal +else ifeq ($(BR2_SHARED_LIBS),y) +NCURSES_CONF_OPT += --with-shared --without-normal +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +NCURSES_CONF_OPT += --with-shared --with-normal endif -NCURSES_LIBS-y = libncurses -NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_MENU) += libmenu -NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_PANEL) += libpanel -NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_FORM) += libform +# configure can't find the soname for libgpm when cross compiling +ifeq ($(BR2_PACKAGE_GPM),y) +NCURSES_CONF_OPT += --with-gpm=libgpm.so.2 +NCURSES_DEPENDENCIES += gpm +else +NCURSES_CONF_OPT += --without-gpm +endif + +NCURSES_TERMINFO_FILES = \ + a/ansi \ + d/dumb \ + l/linux \ + p/putty \ + p/putty-256color \ + p/putty-vt100 \ + s/screen \ + s/screen-256color \ + v/vt100 \ + v/vt100-putty \ + v/vt102 \ + v/vt200 \ + v/vt220 \ + x/xterm \ + x/xterm+256color \ + x/xterm-256color \ + x/xterm-color \ + x/xterm-xfree86 \ + $(call qstrip,$(BR2_PACKAGE_NCURSES_ADDITIONAL_TERMINFO)) + +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +NCURSES_CONF_OPT += --enable-widec +NCURSES_LIB_SUFFIX = w +NCURSES_LIBS = ncurses menu panel form + +define NCURSES_LINK_LIBS_STATIC + $(foreach lib,$(NCURSES_LIBS:%=lib%), \ + ln -sf $(lib)$(NCURSES_LIB_SUFFIX).a $(STAGING_DIR)/usr/lib/$(lib).a + ) + ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \ + $(STAGING_DIR)/usr/lib/libcurses.a +endef + +define NCURSES_LINK_LIBS_SHARED + $(foreach lib,$(NCURSES_LIBS:%=lib%), \ + ln -sf $(lib)$(NCURSES_LIB_SUFFIX).so $(STAGING_DIR)/usr/lib/$(lib).so + ) + ln -sf libncurses$(NCURSES_LIB_SUFFIX).so \ + $(STAGING_DIR)/usr/lib/libcurses.so +endef + +define NCURSES_LINK_PC + $(foreach pc,$(NCURSES_LIBS), \ + ln -sf $(pc)$(NCURSES_LIB_SUFFIX).pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/$(pc).pc + ) +endef + +NCURSES_LINK_STAGING_LIBS = \ + $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC);) \ + $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED)) + +NCURSES_LINK_STAGING_PC = $(call NCURSES_LINK_PC) + +NCURSES_CONF_OPT += --enable-ext-colors + +NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS +NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_PC + +endif # BR2_PACKAGE_NCURSES_WCHAR ifneq ($(BR2_ENABLE_DEBUG),y) NCURSES_CONF_OPT += --without-debug @@ -48,50 +115,26 @@ endif # ncurses breaks with parallel build, but takes quite a while to # build single threaded. Work around it similar to how Gentoo does define NCURSES_BUILD_CMDS - $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) sources + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) sources rm -rf $(@D)/misc/pc-files - $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) endef -ifneq ($(BR2_PREFER_STATIC_LIB),y) -define NCURSES_INSTALL_TARGET_LIBS - for lib in $(NCURSES_LIBS-y); do \ - cp -dpf $(NCURSES_DIR)/lib/$${lib}.so* $(TARGET_DIR)/usr/lib/; \ - done -endef -endif - ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PROGS),y) -define NCURSES_INSTALL_TARGET_PROGS - for x in $(NCURSES_PROGS); do \ - $(INSTALL) -m 0755 $(NCURSES_DIR)/progs/$$x \ - $(TARGET_DIR)/usr/bin/$$x; \ - done +define NCURSES_TARGET_SYMLINK_RESET ln -sf tset $(TARGET_DIR)/usr/bin/reset endef +NCURSES_POST_INSTALL_TARGET_HOOKS += NCURSES_TARGET_SYMLINK_RESET endif -define NCURSES_INSTALL_TARGET_CMDS - mkdir -p $(TARGET_DIR)/usr/lib - $(NCURSES_INSTALL_TARGET_LIBS) - $(NCURSES_INSTALL_TARGET_PROGS) - ln -snf /usr/share/terminfo $(TARGET_DIR)/usr/lib/terminfo - mkdir -p $(TARGET_DIR)/usr/share/terminfo/x - cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm $(TARGET_DIR)/usr/share/terminfo/x - cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-color $(TARGET_DIR)/usr/share/terminfo/x - cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-xfree86 $(TARGET_DIR)/usr/share/terminfo/x - mkdir -p $(TARGET_DIR)/usr/share/terminfo/v - cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt100 $(TARGET_DIR)/usr/share/terminfo/v - cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt102 $(TARGET_DIR)/usr/share/terminfo/v - cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt200 $(TARGET_DIR)/usr/share/terminfo/v - cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt220 $(TARGET_DIR)/usr/share/terminfo/v - mkdir -p $(TARGET_DIR)/usr/share/terminfo/a - cp -dpf $(STAGING_DIR)/usr/share/terminfo/a/ansi $(TARGET_DIR)/usr/share/terminfo/a - mkdir -p $(TARGET_DIR)/usr/share/terminfo/l - cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l - mkdir -p $(TARGET_DIR)/usr/share/terminfo/s - cp -dpf $(STAGING_DIR)/usr/share/terminfo/s/screen $(TARGET_DIR)/usr/share/terminfo/s -endef # NCURSES_INSTALL_TARGET_CMDS +define NCURSES_TARGET_CLEANUP_TERMINFO + $(RM) -rf $(TARGET_DIR)/usr/share/terminfo $(TARGET_DIR)/usr/share/tabset + $(foreach t,$(NCURSES_TERMINFO_FILES), \ + $(INSTALL) -D -m 0644 $(STAGING_DIR)/usr/share/terminfo/$(t) \ + $(TARGET_DIR)/usr/share/terminfo/$(t) + ) +endef +NCURSES_POST_INSTALL_TARGET_HOOKS += NCURSES_TARGET_CLEANUP_TERMINFO # # On systems with an older version of tic, the installation of ncurses hangs @@ -99,16 +142,20 @@ endef # NCURSES_INSTALL_TARGET_CMDS # ourselves, and use that during installation. # define HOST_NCURSES_BUILD_CMDS - $(MAKE1) -C $(@D) sources - $(MAKE) -C $(@D)/progs tic + $(HOST_MAKE_ENV) $(MAKE1) -C $(@D) sources + $(HOST_MAKE_ENV) $(MAKE) -C $(@D)/progs tic endef HOST_NCURSES_CONF_OPT = \ - --with-shared --without-gpm \ + --with-shared \ + --without-gpm \ --without-manpages \ --without-cxx \ --without-cxx-binding \ - --without-ada + --without-ada \ + --with-default-terminfo-dir=/usr/share/terminfo \ + --disable-db-install \ + --without-normal $(eval $(autotools-package)) $(eval $(host-autotools-package))