package/ncurses: fixup library symlinks
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Wed, 17 Sep 2014 13:08:17 +0000 (10:08 -0300)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 17 Sep 2014 21:00:58 +0000 (23:00 +0200)
As stated on the list we need to copy static libraries when doing static
targets so add the logic for that.

Also exclude the wide option for blackfin flat since there seem to be
toolchain issues with that combination - since it's a new feature option
someone interested might look into it later.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/ncurses/Config.in
package/ncurses/ncurses.mk

index b90ec9e5976d6d7a72c673d33ff7fca5ca0ceff1..3cc0a374baf42bb165c56f2964dd68004a035b97 100644 (file)
@@ -13,6 +13,8 @@ if BR2_PACKAGE_NCURSES
 config BR2_PACKAGE_NCURSES_WCHAR
        bool "enable wide char support"
        depends on BR2_USE_WCHAR
+       # Build broken @ curses.priv.h with bad declarations
+       depends on !(BR2_bfin && BR2_BINFMT_FLAT)
        help
          Enable wide char & UTF-8 support in ncurses libraries
 
index bd2aac017f67fabf9bfe026aaeadebb64bc3acc0..81a39988adfd050f571e01c6c7527bae964dd598 100644 (file)
@@ -40,15 +40,26 @@ ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y)
 NCURSES_CONF_OPT += --enable-widec
 NCURSES_LIB_SUFFIX = w
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
 define NCURSES_LINK_LIBS
        for lib in $(NCURSES_LIBS-y); do \
+               ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
+                       $(1)/usr/lib/$${lib}.a; \
+       done
+endef
+else
+define NCURSES_LINK_LIBS
+       for lib in $(NCURSES_LIBS-y); do \
+               ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \
+                       $(1)/usr/lib/$${lib}.a; \
                ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \
                        $(1)/usr/lib/$${lib}.so; \
        done
 endef
+endif
 
-NCURSES_LINK_TARGET_LIBS =  $(call NCURSES_LINK_LIBS, $(TARGET_DIR))
-NCURSES_LINK_STAGING_LIBS =  $(call NCURSES_LINK_LIBS, $(STAGING_DIR))
+NCURSES_LINK_TARGET_LIBS = $(call NCURSES_LINK_LIBS, $(TARGET_DIR))
+NCURSES_LINK_STAGING_LIBS = $(call NCURSES_LINK_LIBS, $(STAGING_DIR))
 
 NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS