ncurses: build statically when BR2_PREFER_STATIC_LIB

--disable-static is no more. Only try to install .so files if not
configured for static linking.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
Peter Korsgaard 2012-06-29 16:11:50 +02:00
parent df2b9516ea
commit 311a58303f

View File

@ -29,7 +29,7 @@ NCURSES_INSTALL_STAGING = YES
NCURSES_DEPENDENCIES = host-ncurses NCURSES_DEPENDENCIES = host-ncurses
NCURSES_CONF_OPT = \ NCURSES_CONF_OPT = \
--with-shared \ $(if $(BR2_PREFER_STATIC_LIB),--without-shared,--with-shared) \
--without-cxx \ --without-cxx \
--without-cxx-binding \ --without-cxx-binding \
--without-ada \ --without-ada \
@ -41,8 +41,7 @@ NCURSES_CONF_OPT = \
--enable-echo \ --enable-echo \
--enable-const \ --enable-const \
--enable-overwrite \ --enable-overwrite \
--enable-broken_linker \ --enable-broken_linker
--disable-static
ifneq ($(BR2_ENABLE_DEBUG),y) ifneq ($(BR2_ENABLE_DEBUG),y)
NCURSES_CONF_OPT += --without-debug NCURSES_CONF_OPT += --without-debug
@ -79,6 +78,8 @@ define NCURSES_INSTALL_TARGET_DEVFILES
endef endef
endif endif
ifneq ($(BR2_PREFER_STATIC_LIB),y)
ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PANEL),y) ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PANEL),y)
define NCURSES_INSTALL_TARGET_PANEL define NCURSES_INSTALL_TARGET_PANEL
cp -dpf $(NCURSES_DIR)/lib/libpanel.so* $(TARGET_DIR)/usr/lib/ cp -dpf $(NCURSES_DIR)/lib/libpanel.so* $(TARGET_DIR)/usr/lib/
@ -97,9 +98,11 @@ define NCURSES_INSTALL_TARGET_MENU
endef endef
endif endif
endif
define NCURSES_INSTALL_TARGET_CMDS define NCURSES_INSTALL_TARGET_CMDS
mkdir -p $(TARGET_DIR)/usr/lib mkdir -p $(TARGET_DIR)/usr/lib
cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/ $(if $(BR2_PREFER_STATIC_LIB),,cp -dpf $(NCURSES_DIR)/lib/libncurses.so* $(TARGET_DIR)/usr/lib/)
$(NCURSES_INSTALL_TARGET_PANEL) $(NCURSES_INSTALL_TARGET_PANEL)
$(NCURSES_INSTALL_TARGET_FORM) $(NCURSES_INSTALL_TARGET_FORM)
$(NCURSES_INSTALL_TARGET_MENU) $(NCURSES_INSTALL_TARGET_MENU)