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
|
2020-03-04 16:07:54 +00:00
|
|
|
PKG_VERSION:=6.2
|
|
|
|
PKG_RELEASE:=1
|
2007-07-02 17:53:19 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
2018-03-18 22:16:25 +00:00
|
|
|
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
2020-03-04 16:07:54 +00:00
|
|
|
PKG_HASH:=30306e0c76e0f9f1f0de987cf1c82a5c21e1ce6568b9227f7da5b71cbea86c9d
|
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
|
|
|
|
|
2016-12-22 20:10:41 +00:00
|
|
|
define Package/libncurses
|
2010-08-16 09:48:42 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
|
|
|
TITLE:=Terminal handling library (Unicode)
|
|
|
|
URL:=http://www.gnu.org/software/ncurses/
|
2016-12-22 20:10:41 +00:00
|
|
|
PROVIDES:=libncursesw
|
2016-05-09 12:49:33 +00:00
|
|
|
DEPENDS:= +terminfo
|
2019-01-17 16:24:31 +00:00
|
|
|
ABI_VERSION:=6
|
2007-07-02 17:53:19 +00:00
|
|
|
endef
|
|
|
|
|
2017-07-08 21:16:52 +00:00
|
|
|
define Package/libncurses-dev
|
|
|
|
SECTION:=devel
|
|
|
|
CATEGORY:=Development
|
|
|
|
SUBMENU:=Libraries
|
|
|
|
DEPENDS:=zlib
|
|
|
|
TITLE:=Development files for the ncurses library
|
|
|
|
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 \
|
2016-05-10 08:05:22 +00:00
|
|
|
--enable-pc-files \
|
2009-03-17 03:22:06 +00:00
|
|
|
--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 \
|
2016-12-10 19:23:24 +00:00
|
|
|
--with-pkg-config-libdir=/usr/lib/pkgconfig \
|
2016-05-09 12:49:33 +00:00
|
|
|
--enable-widec \
|
|
|
|
--with-build-cppflags=-D_GNU_SOURCE
|
2009-03-17 03:22:06 +00:00
|
|
|
|
2019-08-27 22:49:21 +00:00
|
|
|
CONFIGURE_VARS += \
|
|
|
|
cf_try_fPIC=no
|
|
|
|
|
2019-01-22 10:12:04 +00:00
|
|
|
HOST_CFLAGS += $(HOST_FPIC)
|
|
|
|
|
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="" \
|
2016-05-10 08:05:22 +00:00
|
|
|
PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig \
|
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
|
|
|
|
|
2016-12-22 20:10:41 +00:00
|
|
|
define Package/libncurses/install
|
2010-08-16 09:48:42 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2016-05-11 09:38:55 +00:00
|
|
|
for lib in ncurses panel menu form; do \
|
2019-01-22 07:41:21 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib$$$${lib}w.so.* $(1)/usr/lib/; \
|
|
|
|
for so in $(1)/usr/lib/lib$$$${lib}w.so.*; do \
|
|
|
|
ln -s $$$${so##*/} $$$${so%w.so*}.so$$$${so##*w.so}; \
|
|
|
|
done; \
|
2016-05-10 11:46:21 +00:00
|
|
|
done
|
2010-08-16 09:48:42 +00:00
|
|
|
endef
|
|
|
|
|
2017-07-08 21:16:52 +00:00
|
|
|
define Package/libncurses-dev/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
|
|
|
$(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/*.a $(1)/usr/lib/
|
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
|
|
|
|
endef
|
|
|
|
|
2010-08-16 09:48:42 +00:00
|
|
|
define Build/InstallDev
|
2016-05-10 08:05:22 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/* $(1)
|
2016-05-11 09:38:55 +00:00
|
|
|
for lib in ncurses panel menu form; do \
|
2019-01-22 07:41:21 +00:00
|
|
|
for so in $(1)/usr/lib/lib$$$${lib}w.so*; do \
|
|
|
|
ln -s $$$${so##*/} $$$${so%w.so*}.so$$$${so##*w.so}; \
|
|
|
|
done; \
|
2016-05-10 11:46:21 +00:00
|
|
|
done
|
2016-05-11 17:05:04 +00:00
|
|
|
ln -s . $(1)/usr/include/ncursesw
|
2016-05-11 09:34:18 +00:00
|
|
|
$(TARGET_CROSS)ar rc $(1)/usr/lib/libtinfo.a
|
2016-05-10 08:05:22 +00:00
|
|
|
$(INSTALL_DIR) $(2)/bin
|
2016-12-10 19:23:24 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ncursesw6-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' \
|
2016-12-10 19:23:24 +00:00
|
|
|
$(2)/bin/ncursesw6-config
|
2017-01-14 17:11:26 +00:00
|
|
|
ln -sf $(STAGING_DIR)/host/bin/ncursesw6-config $(1)/usr/bin/ncursesw6-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
|
|
|
|
|
|
|
|
$(eval $(call HostBuild))
|
2011-03-18 23:34:40 +00:00
|
|
|
$(eval $(call BuildPackage,terminfo))
|
2016-12-22 20:10:41 +00:00
|
|
|
$(eval $(call BuildPackage,libncurses))
|
2017-07-08 21:16:52 +00:00
|
|
|
$(eval $(call BuildPackage,libncurses-dev))
|