2010-03-05 20:12:24 +00:00
|
|
|
#
|
2015-12-11 15:06:01 +00:00
|
|
|
# Copyright (C) 2006-2015 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
|
2013-04-23 09:21:59 +00:00
|
|
|
PKG_VERSION:=5.9
|
2015-12-11 15:06:01 +00:00
|
|
|
PKG_RELEASE:=3
|
2007-07-02 17:53:19 +00:00
|
|
|
|
2016-05-09 12:49:33 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(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
|
2013-04-23 09:21:59 +00:00
|
|
|
PKG_MD5SUM:=8cb9c412e5f2d96bc6f459aa8c6282a1
|
2007-07-02 17:53:19 +00:00
|
|
|
|
2014-11-02 12:20:54 +00:00
|
|
|
PKG_LICENSE:=MIT
|
2012-10-19 15:34:28 +00:00
|
|
|
PKG_LICENSE_FILES:=README
|
|
|
|
|
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
|
|
|
|
2015-02-05 23:18:42 +00:00
|
|
|
PKG_BUILD_DEPENDS:=ncurses/host
|
|
|
|
|
2007-07-02 17:53:19 +00:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
2015-02-05 23:18:42 +00:00
|
|
|
include $(INCLUDE_DIR)/host-build.mk
|
2007-07-02 17:53:19 +00:00
|
|
|
|
2011-03-18 23:34:40 +00:00
|
|
|
define Package/terminfo
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Terminal Info Database (ncurses)
|
|
|
|
URL:=http://www.gnu.org/software/ncurses/
|
2010-08-16 09:48:42 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libncursesw
|
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Terminal handling library (Unicode)
|
|
|
|
URL:=http://www.gnu.org/software/ncurses/
|
2016-05-09 12:49:33 +00:00
|
|
|
PROVIDES:=libncurses
|
|
|
|
DEPENDS:= +terminfo
|
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-debug \
|
2015-02-05 23:18:42 +00:00
|
|
|
--without-manpages \
|
2009-03-17 03:22:06 +00:00
|
|
|
--without-profile \
|
|
|
|
--without-progs \
|
2015-02-05 23:18:42 +00:00
|
|
|
--without-tests \
|
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 \
|
2016-05-09 12:49:33 +00:00
|
|
|
--with-default-terminfo-dir=/usr/share/terminfo \
|
|
|
|
--enable-widec \
|
|
|
|
--with-build-cppflags=-D_GNU_SOURCE
|
2009-03-17 03:22:06 +00:00
|
|
|
|
2015-02-05 23:18:42 +00:00
|
|
|
HOST_CONFIGURE_ARGS += \
|
|
|
|
--without-cxx \
|
|
|
|
--without-cxx-binding \
|
|
|
|
--without-ada \
|
|
|
|
--without-debug \
|
|
|
|
--without-manpages \
|
|
|
|
--without-profile \
|
|
|
|
--without-tests \
|
|
|
|
--without-curses-h
|
|
|
|
|
|
|
|
|
2010-11-26 17:51:14 +00:00
|
|
|
ifeq ($(HOST_OS),FreeBSD)
|
|
|
|
CONFIGURE_ARGS +=
|
|
|
|
--with-terminfo=/usr/share/terminfo.db
|
|
|
|
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
|
|
|
|
|
2011-03-18 23:34:40 +00:00
|
|
|
define Package/terminfo/install
|
|
|
|
echo ""
|
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 \
|
|
|
|
)
|
2014-06-16 18:21:02 +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 x/xterm-256color; 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
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2016-05-09 12:49:33 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
|
2010-08-16 09:48:42 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{ncurses,panel,menu,form}w.{a,so*} $(1)/usr/lib/
|
2011-03-21 06:45:20 +00:00
|
|
|
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin $(2)/bin
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ncursesw5-config $(2)/bin/
|
2011-05-22 16:53:09 +00:00
|
|
|
$(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' -e 's/$$$$INCS //g' \
|
|
|
|
$(2)/bin/ncursesw5-config
|
2015-04-23 11:06:15 +00:00
|
|
|
ln -sf $(STAGING_DIR)/host/bin/ncursesw5-config $(1)/usr/bin/ncursesw5-config
|
2010-08-16 09:48:42 +00:00
|
|
|
endef
|
2015-02-05 23:18:42 +00:00
|
|
|
|
|
|
|
define Host/Compile
|
|
|
|
$(MAKE) -C $(HOST_BUILD_DIR) libs
|
|
|
|
$(MAKE) -C $(HOST_BUILD_DIR)/progs tic
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Host/Install
|
|
|
|
$(INSTALL_BIN) $(HOST_BUILD_DIR)/progs/tic $(STAGING_DIR_HOST)/bin/tic
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|
2011-03-18 23:34:40 +00:00
|
|
|
$(eval $(call BuildPackage,terminfo))
|
2010-08-16 09:48:42 +00:00
|
|
|
$(eval $(call BuildPackage,libncursesw))
|