kumquat-buildroot/package/readline/readline.mk
Thomas Petazzoni a2d07f1be6 readline: install a .pc file
Some packages (such as udftools) fail to build against readline in
static linking configurations. To fix this, we install the .pc file
provided by readline.

Unfortunately, this .pc file is by default not correct, so a patch is
added to fix it, and this patch requires to re-autoconf the package
(but not autoreconf since only autoconf is used).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2018-05-06 21:50:01 +02:00

50 lines
1.6 KiB
Makefile

################################################################################
#
# readline
#
################################################################################
READLINE_VERSION = 7.0
READLINE_SITE = $(BR2_GNU_MIRROR)/readline
READLINE_INSTALL_STAGING = YES
READLINE_DEPENDENCIES = ncurses host-autoconf
HOST_READLINE_DEPENDENCIES = host-ncurses host-autoconf
READLINE_CONF_ENV = bash_cv_func_sigsetjmp=yes \
bash_cv_wcwidth_broken=no
READLINE_LICENSE = GPL-3.0+
READLINE_LICENSE_FILES = COPYING
# readline only uses autoconf, not automake, and therefore the regular
# AUTORECONF = YES doesn't work.
define READLINE_AUTOCONF
cd $(@D); $(HOST_DIR)/bin/autoconf
endef
READLINE_PRE_CONFIGURE_HOOKS += READLINE_AUTOCONF
HOST_READLINE_PRE_CONFIGURE_HOOKS += READLINE_AUTOCONF
define READLINE_PURGE_EXAMPLES
rm -rf $(TARGET_DIR)/usr/share/readline
endef
READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_PURGE_EXAMPLES
define READLINE_INSTALL_PC_FILE
$(INSTALL) -D -m 644 $(@D)/readline.pc $(STAGING_DIR)/usr/lib/pkgconfig/readline.pc
endef
READLINE_POST_INSTALL_STAGING_HOOKS += READLINE_INSTALL_PC_FILE
define READLINE_INSTALL_INPUTRC
$(INSTALL) -D -m 644 package/readline/inputrc $(TARGET_DIR)/etc/inputrc
endef
READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_INPUTRC
ifneq ($(BR2_STATIC_LIBS),y)
# libraries get installed read only, so strip fails
define READLINE_INSTALL_FIXUPS_SHARED
chmod +w $(addprefix $(TARGET_DIR)/usr/lib/,libhistory.so.* libreadline.so.*)
endef
READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_FIXUPS_SHARED
endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))