2 # Copyright (C) 2006-2010 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
)/$(BUILD_VARIANT
)/$(PKG_NAME
)-$(PKG_VERSION
)
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=@GNU
/ncurses
17 PKG_MD5SUM
:=cce05daf61a64501ef6cd8da1f727ec6
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/libncurses
27 TITLE
:=Terminal handling library
28 URL
:=http
://www.gnu.org
/software
/ncurses
/
32 define Package
/libncursesw
35 TITLE
:=Terminal handling library
(Unicode
)
36 URL
:=http
://www.gnu.org
/software
/ncurses
/
41 TARGET_CFLAGS
+= $(FPIC
)
50 --without-cxx-binding \
56 --with-terminfo-dirs
=/usr
/share
/terminfo \
57 --with-default-terminfo-dir
=/usr
/share
/terminfo
59 ifeq ($(BUILD_VARIANT
),libncursesw
)
62 --with-build-cppflags
=-D_GNU_SOURCE
66 BUILD_CC
="$(HOSTCC)" \
71 define Build
/Install
/Default
73 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \
74 $(MAKE_INSTALL_FLAGS
) \
75 $(1) install.libs
install.data
;
78 define Package
/libncurses
/install
79 $(INSTALL_DIR
) $(1)/usr
/lib
80 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{curses
,ncurses
,panel
,menu
,form
}.so
* $(1)/usr
/lib
/
81 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
82 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
84 [ -d
"$$$$dir" ] || continue
; \
85 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
88 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
; do \
89 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
90 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
91 $(1)/usr
/share
/terminfo
/$$$$file; \
95 define Package
/libncursesw
/install
96 $(INSTALL_DIR
) $(1)/usr
/lib
97 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}w.so
* $(1)/usr
/lib
/
100 ifeq ($(BUILD_VARIANT
),libncursesw
)
101 define Build
/InstallDev
102 $(INSTALL_DIR
) $(1)/usr
/include/ncursesw
/
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/ncursesw
/
105 $(INSTALL_DIR
) $(1)/usr
/lib
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}w.
{a
,so
*} $(1)/usr
/lib
/
109 define Build
/InstallDev
110 $(INSTALL_DIR
) $(1)/usr
/include
111 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
113 $(INSTALL_DIR
) $(1)/usr
/lib
114 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{curses
,ncurses
,panel
,menu
,form
}.
{a
,so
*} $(1)/usr
/lib
/
118 $(eval
$(call BuildPackage
,libncurses
))
119 $(eval
$(call BuildPackage
,libncursesw
))