2 # Copyright (C) 2006-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@GNU
/ncurses
17 PKG_HASH
:=f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260
20 PKG_LICENSE_FILES
:=README
25 PKG_BUILD_DEPENDS
:=ncurses
/host
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/host-build.mk
30 define Package
/terminfo
33 TITLE
:=Terminal Info Database
(ncurses
)
34 URL
:=http
://www.gnu.org
/software
/ncurses
/
37 define Package
/libncursesw
40 TITLE
:=Terminal handling library
(Unicode
)
41 URL
:=http
://www.gnu.org
/software
/ncurses
/
46 TARGET_CFLAGS
+= $(FPIC
)
61 --disable-home-terminfo \
64 --with-terminfo-dirs
=/usr
/share
/terminfo \
65 --with-default-terminfo-dir
=/usr
/share
/terminfo \
66 --with-pkg-config-libdir
=/usr
/lib
/pkgconfig \
68 --with-build-cppflags
=-D_GNU_SOURCE
70 HOST_CONFIGURE_ARGS
+= \
72 --without-cxx-binding \
81 ifeq ($(HOST_OS
),FreeBSD
)
83 --with-terminfo
=/usr
/share
/terminfo.db
87 BUILD_CC
="$(HOSTCC)" \
90 PKG_CONFIG_LIBDIR
=/usr
/lib
/pkgconfig \
93 define Build
/Install
/Default
95 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \
96 $(MAKE_INSTALL_FLAGS
) \
97 $(1) install.libs
install.data
;
100 define Package
/terminfo
/install
102 ifneq ($(HOST_OS
),FreeBSD
)
103 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
104 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
106 [ -d
"$$$$dir" ] || continue
; \
107 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
110 for file in a
/ansi d
/dumb l
/linux r
/rxvt r
/rxvt-unicode s
/screen v
/vt100 v
/vt102 x
/xterm x
/xterm-color x
/xterm-256color
; do \
111 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
113 $(1)/usr
/share
/terminfo
/$$$$file; \
118 define Package
/libncursesw
/install
119 $(INSTALL_DIR
) $(1)/usr
/lib
120 for lib in ncurses panel menu form
; do \
121 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
$$$${lib}w.so
* $(1)/usr
/lib
/; \
122 ln
-s lib
$$$${lib}w.so
$(1)/usr
/lib
/lib
$$$${lib}.so
; \
126 define Build
/InstallDev
127 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
128 for lib in ncurses panel menu form
; do \
129 ln
-s lib
$$$${lib}w.so
$(1)/usr
/lib
/lib
$$$${lib}.so
; \
131 ln
-s .
$(1)/usr
/include/ncursesw
132 $(TARGET_CROSS
)ar rc
$(1)/usr
/lib
/libtinfo.a
133 $(INSTALL_DIR
) $(2)/bin
134 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ncursesw6-config
$(2)/bin
/
135 $(SED
) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' -e
's/$$$$INCS //g' \
136 $(2)/bin
/ncursesw6-config
137 ln
-sf
$(STAGING_DIR
)/host
/bin
/ncursesw6-config
$(1)/usr
/bin
/ncursesw6-config
141 $(MAKE
) -C
$(HOST_BUILD_DIR
) libs
142 $(MAKE
) -C
$(HOST_BUILD_DIR
)/progs tic
146 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/progs
/tic
$(STAGING_DIR_HOST
)/bin
/tic
149 $(eval
$(call HostBuild
))
150 $(eval
$(call BuildPackage
,terminfo
))
151 $(eval
$(call BuildPackage
,libncursesw
))