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
/
44 ABI_VERSION
:=$(PKG_VERSION
)
47 TARGET_CFLAGS
+= $(FPIC
)
62 --disable-home-terminfo \
65 --with-terminfo-dirs
=/usr
/share
/terminfo \
66 --with-default-terminfo-dir
=/usr
/share
/terminfo \
67 --with-pkg-config-libdir
=/usr
/lib
/pkgconfig \
69 --with-build-cppflags
=-D_GNU_SOURCE
71 HOST_CONFIGURE_ARGS
+= \
73 --without-cxx-binding \
82 ifeq ($(HOST_OS
),FreeBSD
)
84 --with-terminfo
=/usr
/share
/terminfo.db
88 BUILD_CC
="$(HOSTCC)" \
91 PKG_CONFIG_LIBDIR
=/usr
/lib
/pkgconfig \
94 define Build
/Install
/Default
96 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \
97 $(MAKE_INSTALL_FLAGS
) \
98 $(1) install.libs
install.data
;
101 define Package
/terminfo
/install
103 ifneq ($(HOST_OS
),FreeBSD
)
104 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
105 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
107 [ -d
"$$$$dir" ] || continue
; \
108 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
111 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 \
112 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
113 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
114 $(1)/usr
/share
/terminfo
/$$$$file; \
119 define Package
/libncursesw
/install
120 $(INSTALL_DIR
) $(1)/usr
/lib
121 for lib in ncurses panel menu form
; do \
122 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
$$$${lib}w.so
* $(1)/usr
/lib
/; \
123 ln
-s lib
$$$${lib}w.so
$(1)/usr
/lib
/lib
$$$${lib}.so
; \
127 define Build
/InstallDev
128 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)
129 for lib in ncurses panel menu form
; do \
130 ln
-s lib
$$$${lib}w.so
$(1)/usr
/lib
/lib
$$$${lib}.so
; \
132 ln
-s .
$(1)/usr
/include/ncursesw
133 $(TARGET_CROSS
)ar rc
$(1)/usr
/lib
/libtinfo.a
134 $(INSTALL_DIR
) $(2)/bin
135 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ncursesw6-config
$(2)/bin
/
136 $(SED
) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' -e
's/$$$$INCS //g' \
137 $(2)/bin
/ncursesw6-config
138 ln
-sf
$(STAGING_DIR
)/host
/bin
/ncursesw6-config
$(1)/usr
/bin
/ncursesw6-config
142 $(MAKE
) -C
$(HOST_BUILD_DIR
) libs
143 $(MAKE
) -C
$(HOST_BUILD_DIR
)/progs tic
147 $(INSTALL_BIN
) $(HOST_BUILD_DIR
)/progs
/tic
$(STAGING_DIR_HOST
)/bin
/tic
150 $(eval
$(call HostBuild
))
151 $(eval
$(call BuildPackage
,terminfo
))
152 $(eval
$(call BuildPackage
,libncursesw
))