Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=readline
  9. PKG_VERSION:=8.2
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@GNU/readline
  13. PKG_HASH:=3feb7171f16a84ee82ca18a36d7b9be109a52c04f492a053331d7d1095007c35
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_CPE_ID:=cpe:/a:gnu:readline
  17. PKG_BUILD_PARALLEL:=1
  18. PKG_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/host-build.mk
  21. HOST_BUILD_DEPENDS:=ncurses/host
  22. define Package/libreadline
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Command lines edition library
  26. DEPENDS:=+libncursesw
  27. URL:=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
  28. ABI_VERSION:=8
  29. endef
  30. define Package/libreadline/description
  31. The Readline library provides a set of functions for use by applications
  32. that allow users to edit command lines as they are typed in. Both Emacs
  33. and vi editing modes are available. The Readline library includes
  34. additional functions to maintain a list of previously-entered command
  35. lines, to recall and perhaps reedit those lines, and perform csh-like
  36. history expansion on previous commands.
  37. endef
  38. HOST_CONFIGURE_ARGS += --disable-shared --with-pic
  39. CONFIGURE_ARGS += --with-curses --disable-install-examples
  40. HOST_CONFIGURE_VARS += \
  41. bash_cv_termcap_lib=libncurses
  42. CONFIGURE_VARS += \
  43. bash_cv_wcwidth_broken=no \
  44. bash_cv_func_sigsetjmp=yes \
  45. bash_cv_termcap_lib=libncursesw
  46. TARGET_CFLAGS += $(FPIC)
  47. HOST_CFLAGS += $(FPIC)
  48. define Build/InstallDev
  49. $(INSTALL_DIR) $(1)/usr/include
  50. $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(1)/usr/include/
  51. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  52. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so*} $(1)/usr/lib/
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/readline.pc $(1)/usr/lib/pkgconfig/
  54. endef
  55. define Package/libreadline/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.so* $(1)/usr/lib/
  58. endef
  59. $(eval $(call HostBuild))
  60. $(eval $(call BuildPackage,libreadline))