2010-03-05 20:12:24 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006-2010 OpenWrt.org
|
2007-07-02 17:53:19 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=ncurses
|
2009-04-08 08:58:15 +00:00
|
|
|
PKG_VERSION:=5.7
|
2010-08-16 09:48:42 +00:00
|
|
|
PKG_RELEASE:=3
|
2007-07-02 17:53:19 +00:00
|
|
|
|
2010-08-16 09:48:42 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
|
2007-07-02 17:53:19 +00:00
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=@GNU/ncurses
|
2009-04-08 08:58:15 +00:00
|
|
|
PKG_MD5SUM:=cce05daf61a64501ef6cd8da1f727ec6
|
2007-07-02 17:53:19 +00:00
|
|
|
|
2010-03-05 20:12:24 +00:00
|
|
|
PKG_INSTALL:=1
|
2010-09-07 10:00:34 +00:00
|
|
|
PKG_BUILD_PARALLEL:=1
|
2010-03-05 20:12:24 +00:00
|
|
|
|
2007-07-02 17:53:19 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/libncurses
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Terminal handling library
|
|
|
|
URL:=http://www.gnu.org/software/ncurses/
|
2010-08-16 09:48:42 +00:00
|
|
|
VARIANT:=libncurses
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libncursesw
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Terminal handling library (Unicode)
|
|
|
|
URL:=http://www.gnu.org/software/ncurses/
|
|
|
|
DEPENDS:=libncurses
|
|
|
|
VARIANT:=libncursesw
|
2007-07-02 17:53:19 +00:00
|
|
|
endef
|
|
|
|
|
2008-08-06 22:10:29 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
2009-03-17 03:22:06 +00:00
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-echo \
|
|
|
|
--enable-const \
|
|
|
|
--enable-overwrite \
|
|
|
|
--disable-rpath \
|
|
|
|
--without-ada \
|
|
|
|
--without-cxx \
|
|
|
|
--without-cxx-binding \
|
|
|
|
--without-debug \
|
|
|
|
--without-profile \
|
|
|
|
--without-progs \
|
2010-11-26 17:51:14 +00:00
|
|
|
--disable-big-core \
|
|
|
|
--disable-home-terminfo \
|
2009-03-17 03:22:06 +00:00
|
|
|
--with-normal \
|
|
|
|
--with-shared \
|
|
|
|
--with-terminfo-dirs=/usr/share/terminfo \
|
|
|
|
--with-default-terminfo-dir=/usr/share/terminfo
|
|
|
|
|
2010-11-26 17:51:14 +00:00
|
|
|
ifeq ($(HOST_OS),FreeBSD)
|
|
|
|
CONFIGURE_ARGS +=
|
|
|
|
--with-terminfo=/usr/share/terminfo.db
|
|
|
|
endif
|
|
|
|
|
2010-08-16 09:48:42 +00:00
|
|
|
ifeq ($(BUILD_VARIANT),libncursesw)
|
|
|
|
CONFIGURE_ARGS += \
|
|
|
|
--enable-widec \
|
|
|
|
--with-build-cppflags=-D_GNU_SOURCE
|
|
|
|
endif
|
|
|
|
|
2010-03-05 20:12:24 +00:00
|
|
|
MAKE_FLAGS += \
|
|
|
|
BUILD_CC="$(HOSTCC)" \
|
|
|
|
HOSTCC="$(HOSTCC)" \
|
|
|
|
HOSTCCFLAGS="" \
|
2010-08-16 09:48:42 +00:00
|
|
|
libs
|
2010-03-05 20:12:24 +00:00
|
|
|
|
|
|
|
define Build/Install/Default
|
|
|
|
$(MAKE_VARS) \
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
|
|
|
|
$(MAKE_INSTALL_FLAGS) \
|
|
|
|
$(1) install.libs install.data;
|
2007-07-02 17:53:19 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libncurses/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2010-03-05 20:12:24 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.so* $(1)/usr/lib/
|
2010-11-26 17:51:14 +00:00
|
|
|
ifneq ($(HOST_OS),FreeBSD)
|
2007-07-02 17:53:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/share/terminfo
|
|
|
|
(cd $(PKG_INSTALL_DIR)/usr/share/terminfo; \
|
|
|
|
for dir in ??; do \
|
|
|
|
[ -d "$$$$dir" ] || continue; \
|
|
|
|
mv $$$$dir $$$$(echo -ne "\x$$$$dir"); \
|
|
|
|
done \
|
|
|
|
)
|
2009-04-08 08:58:15 +00:00
|
|
|
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 \
|
2007-07-02 17:53:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/share/terminfo/`dirname $$$$file`; \
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/terminfo/$$$$file \
|
|
|
|
$(1)/usr/share/terminfo/$$$$file; \
|
|
|
|
done
|
2010-11-26 17:51:14 +00:00
|
|
|
endif
|
2007-07-02 17:53:19 +00:00
|
|
|
endef
|
|
|
|
|
2010-08-16 09:48:42 +00:00
|
|
|
define Package/libncursesw/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.so* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifeq ($(BUILD_VARIANT),libncursesw)
|
|
|
|
define Build/InstallDev
|
|
|
|
$(INSTALL_DIR) $(1)/usr/include/ncursesw/
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/ncursesw/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
else
|
2007-07-02 17:53:19 +00:00
|
|
|
define Build/InstallDev
|
2010-03-05 20:12:24 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
|
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{curses,ncurses,panel,menu,form}.{a,so*} $(1)/usr/lib/
|
2007-07-02 17:53:19 +00:00
|
|
|
endef
|
2010-08-16 09:48:42 +00:00
|
|
|
endif
|
2007-07-02 17:53:19 +00:00
|
|
|
|
|
|
|
$(eval $(call BuildPackage,libncurses))
|
2010-08-16 09:48:42 +00:00
|
|
|
$(eval $(call BuildPackage,libncursesw))
|