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 \
55 --disable-home-terminfo \
58 --with-terminfo-dirs
=/usr
/share
/terminfo \
59 --with-default-terminfo-dir
=/usr
/share
/terminfo
61 ifeq ($(HOST_OS
),FreeBSD
)
63 --with-terminfo
=/usr
/share
/terminfo.db
66 ifeq ($(BUILD_VARIANT
),libncursesw
)
69 --with-build-cppflags
=-D_GNU_SOURCE
73 BUILD_CC
="$(HOSTCC)" \
78 define Build
/Install
/Default
80 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \
81 $(MAKE_INSTALL_FLAGS
) \
82 $(1) install.libs
install.data
;
85 define Package
/libncurses
/install
86 $(INSTALL_DIR
) $(1)/usr
/lib
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{curses
,ncurses
,panel
,menu
,form
}.so
* $(1)/usr
/lib
/
88 ifneq ($(HOST_OS
),FreeBSD
)
89 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
90 (cd
$(PKG_INSTALL_DIR
)/usr
/share
/terminfo
; \
92 [ -d
"$$$$dir" ] || continue
; \
93 mv
$$$$dir $$$$(echo
-ne
"\x$$$$dir"); \
96 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 \
97 $(INSTALL_DIR
) $(1)/usr
/share
/terminfo
/`dirname $$$$file`; \
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/share
/terminfo
/$$$$file \
99 $(1)/usr
/share
/terminfo
/$$$$file; \
104 define Package
/libncursesw
/install
105 $(INSTALL_DIR
) $(1)/usr
/lib
106 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}w.so
* $(1)/usr
/lib
/
109 ifeq ($(BUILD_VARIANT
),libncursesw
)
110 define Build
/InstallDev
111 $(INSTALL_DIR
) $(1)/usr
/include/ncursesw
/
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/ncursesw
/
114 $(INSTALL_DIR
) $(1)/usr
/lib
115 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{ncurses
,panel
,menu
,form
}w.
{a
,so
*} $(1)/usr
/lib
/
118 define Build
/InstallDev
119 $(INSTALL_DIR
) $(1)/usr
/include
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/*.h
$(1)/usr
/include/
122 $(INSTALL_DIR
) $(1)/usr
/lib
123 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/lib
{curses
,ncurses
,panel
,menu
,form
}.
{a
,so
*} $(1)/usr
/lib
/
127 $(eval
$(call BuildPackage
,libncurses
))
128 $(eval
$(call BuildPackage
,libncursesw
))