]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/readline/readline.mk
readline: install a .pc file
[coffee/buildroot.git] / package / readline / readline.mk
1 ################################################################################
2 #
3 # readline
4 #
5 ################################################################################
6
7 READLINE_VERSION = 7.0
8 READLINE_SITE = $(BR2_GNU_MIRROR)/readline
9 READLINE_INSTALL_STAGING = YES
10 READLINE_DEPENDENCIES = ncurses host-autoconf
11 HOST_READLINE_DEPENDENCIES = host-ncurses host-autoconf
12 READLINE_CONF_ENV = bash_cv_func_sigsetjmp=yes \
13         bash_cv_wcwidth_broken=no
14 READLINE_LICENSE = GPL-3.0+
15 READLINE_LICENSE_FILES = COPYING
16
17 # readline only uses autoconf, not automake, and therefore the regular
18 # AUTORECONF = YES doesn't work.
19 define READLINE_AUTOCONF
20         cd $(@D); $(HOST_DIR)/bin/autoconf
21 endef
22 READLINE_PRE_CONFIGURE_HOOKS += READLINE_AUTOCONF
23 HOST_READLINE_PRE_CONFIGURE_HOOKS += READLINE_AUTOCONF
24
25 define READLINE_PURGE_EXAMPLES
26         rm -rf $(TARGET_DIR)/usr/share/readline
27 endef
28 READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_PURGE_EXAMPLES
29
30 define READLINE_INSTALL_PC_FILE
31         $(INSTALL) -D -m 644 $(@D)/readline.pc $(STAGING_DIR)/usr/lib/pkgconfig/readline.pc
32 endef
33 READLINE_POST_INSTALL_STAGING_HOOKS += READLINE_INSTALL_PC_FILE
34
35 define READLINE_INSTALL_INPUTRC
36         $(INSTALL) -D -m 644 package/readline/inputrc $(TARGET_DIR)/etc/inputrc
37 endef
38 READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_INPUTRC
39
40 ifneq ($(BR2_STATIC_LIBS),y)
41 # libraries get installed read only, so strip fails
42 define READLINE_INSTALL_FIXUPS_SHARED
43         chmod +w $(addprefix $(TARGET_DIR)/usr/lib/,libhistory.so.* libreadline.so.*)
44 endef
45 READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_FIXUPS_SHARED
46 endif
47
48 $(eval $(autotools-package))
49 $(eval $(host-autotools-package))