ccd20a4b185afbda05e4efb7afb4935a333d2993
[openwrt/openwrt.git] / package / libs / readline / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=readline
11 PKG_VERSION:=7.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=@GNU/readline
16 PKG_HASH:=750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334
17
18 PKG_LICENSE:=GPL-3.0
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_BUILD_PARALLEL:=1
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/host-build.mk
27
28 define Package/libreadline
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=Command lines edition library
32 URL:=http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html
33 ABI_VERSION:=$(PKG_VERSION)
34 endef
35
36 define Package/libreadline/description
37 The Readline library provides a set of functions for use by applications
38 that allow users to edit command lines as they are typed in. Both Emacs
39 and vi editing modes are available. The Readline library includes
40 additional functions to maintain a list of previously-entered command
41 lines, to recall and perhaps reedit those lines, and perform csh-like
42 history expansion on previous commands.
43 endef
44
45 # prevent "autoreconf" from removing "aclocal.m4"
46 PKG_REMOVE_FILES:=
47
48 CONFIGURE_ARGS += \
49 --enable-shared \
50 --enable-static \
51 --with-curses \
52
53 CONFIGURE_VARS += \
54 bash_cv_wcwidth_broken=no \
55 bash_cv_func_sigsetjmp=yes \
56
57 TARGET_CPPFLAGS:=-I. -I.. $(TARGET_CPPFLAGS)
58
59 TARGET_CFLAGS += $(FPIC)
60
61 define Build/InstallDev
62 $(INSTALL_DIR) $(1)/usr/include
63 $(CP) $(PKG_INSTALL_DIR)/usr/include/readline $(1)/usr/include/
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{a,so,so.7,so.7.0} $(1)/usr/lib/
66 endef
67
68 define Package/libreadline/install
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{history,readline}.{so,so.7,so.7.0} $(1)/usr/lib/
71 endef
72
73 $(eval $(call HostBuild))
74 $(eval $(call BuildPackage,libreadline))