Hi,

this fixes cross-compile of ncurses on a FreeBSD host, where no
tic is available.
It compiles the "tic" utility on the host and uses it to
compile the terminfo stuff. Still works on Linux/OpenBSD, too.

Signed-off-by: Waldemar Brodkorb <[email protected]>

Index: package/libs/ncurses/Makefile
===================================================================
--- package/libs/ncurses/Makefile       (revision 35902)
+++ package/libs/ncurses/Makefile       (working copy)
@@ -22,6 +22,9 @@
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
 
+PKG_BUILD_DEPENDS:=ncurses/host
+
+include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk
 
 define Package/libncurses
@@ -72,11 +75,6 @@
        --without-cxx-binding
 endif
 
-ifeq ($(HOST_OS),FreeBSD)
-       CONFIGURE_ARGS +=
-               --with-terminfo=/usr/share/terminfo.db 
-endif
-
 ifeq ($(BUILD_VARIANT),libncursesw)
        CONFIGURE_ARGS += \
                --enable-widec \
@@ -98,7 +96,6 @@
 
 define Package/terminfo/install
        echo ""
-ifneq ($(HOST_OS),FreeBSD)
        $(INSTALL_DIR) $(1)/usr/share/terminfo
        (cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
                for dir in ??; do \
@@ -111,7 +108,6 @@
                $(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
                        $(1)/usr/share/terminfo/$$$$file; \
        done
-endif
 endef
 
 define Package/libncurses/install
@@ -154,6 +150,8 @@
 endef
 endif
 
+$(eval $(call HostBuild))
+
 $(eval $(call BuildPackage,terminfo))
 $(eval $(call BuildPackage,libncurses))
 $(eval $(call BuildPackage,libncursesw))

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to