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
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/libncurses
26 TITLE
:=Terminal handling library
27 URL
:=http
://www.gnu.org
/software
/ncurses
/
31 define Package
/libncursesw
34 TITLE
:=Terminal handling library
(Unicode
)
35 URL
:=http
://www.gnu.org
/software
/ncurses
/
40 TARGET_CFLAGS
+= $(FPIC
)
49 --without-cxx-binding \
55 --with-terminfo-dirs
=/usr
/share
/terminfo \
56 --with-default-terminfo-dir
=/usr
/share
/terminfo
58 ifeq ($(BUILD_VARIANT
),libncursesw
)
61 --with-build-cppflags
=-D_GNU_SOURCE
65 BUILD_CC
="$(HOSTCC)" \
70 define Build
/Install
/Default
72 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \
73 $(MAKE_INSTALL_FLAGS
) \
74 $(1) install.libs
install.data
;
77 define Package
/libncurses
/install
78 $(INSTALL_DIR
) $(1)/usr
/lib
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{curses
,ncurses
,panel
,menu
,form
}.so
* $(1)/usr
/lib
/
80 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
81 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
83 [ -d
"$$$$dir" ] || continue
; \
84 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
87 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 \
88 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
89 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
90 $(1)/usr
/share
/terminfo
/$$$$file; \
94 define Package
/libncursesw
/install
95 $(INSTALL_DIR
) $(1)/usr
/lib
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}w.so
* $(1)/usr
/lib
/
99 ifeq ($(BUILD_VARIANT
),libncursesw
)
100 define Build
/InstallDev
101 $(INSTALL_DIR
) $(1)/usr
/include/ncursesw
/
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/ncursesw
/
104 $(INSTALL_DIR
) $(1)/usr
/lib
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}w.
{a
,so
*} $(1)/usr
/lib
/
108 define Build
/InstallDev
109 $(INSTALL_DIR
) $(1)/usr
/include
110 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
112 $(INSTALL_DIR
) $(1)/usr
/lib
113 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{curses
,ncurses
,panel
,menu
,form
}.
{a
,so
*} $(1)/usr
/lib
/
117 $(eval
$(call BuildPackage
,libncurses
))
118 $(eval
$(call BuildPackage
,libncursesw
))