2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-23 14:54:42 +02:00
|
|
|
#
|
|
|
|
# bash
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2021-03-11 21:44:48 +01:00
|
|
|
BASH_VERSION = 5.1
|
2010-06-09 15:36:26 +02:00
|
|
|
BASH_SITE = $(BR2_GNU_MIRROR)/bash
|
2018-07-08 11:46:13 +02:00
|
|
|
BASH_DEPENDENCIES = ncurses readline host-bison
|
2017-03-30 15:43:33 +02:00
|
|
|
BASH_LICENSE = GPL-3.0+
|
2012-11-13 02:05:37 +01:00
|
|
|
BASH_LICENSE_FILES = COPYING
|
2020-12-04 16:46:01 +01:00
|
|
|
BASH_CPE_ID_VENDOR = gnu
|
2012-11-13 02:05:37 +01:00
|
|
|
|
2021-04-23 22:23:53 +02:00
|
|
|
# We want the bash binary in /bin
|
|
|
|
BASH_CONF_OPTS = \
|
|
|
|
--bindir=/bin \
|
|
|
|
--with-installed-readline \
|
|
|
|
--without-bash-malloc
|
|
|
|
|
2014-02-27 21:58:59 +01:00
|
|
|
BASH_CONF_ENV += \
|
2014-03-01 18:54:26 +01:00
|
|
|
ac_cv_rl_prefix="$(STAGING_DIR)" \
|
2014-02-27 21:58:59 +01:00
|
|
|
ac_cv_rl_version="$(READLINE_VERSION)" \
|
2015-09-03 17:00:09 +02:00
|
|
|
bash_cv_getcwd_malloc=yes \
|
2014-02-27 21:58:59 +01:00
|
|
|
bash_cv_job_control_missing=present \
|
|
|
|
bash_cv_sys_named_pipes=present \
|
|
|
|
bash_cv_func_sigsetjmp=present \
|
|
|
|
bash_cv_printf_a_format=yes
|
2010-06-09 15:36:26 +02:00
|
|
|
|
2013-08-12 15:15:45 +02:00
|
|
|
# The static build needs some trickery
|
2014-12-03 22:41:29 +01:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
2017-05-23 19:19:31 +02:00
|
|
|
BASH_CONF_OPTS += --enable-static-link
|
2014-10-22 11:40:40 +02:00
|
|
|
# bash wants to redefine the getenv() function. To check whether this is
|
|
|
|
# possible, AC_TRY_RUN is used which is not possible in
|
|
|
|
# cross-compilation.
|
|
|
|
# On uClibc, redefining getenv is not possible; on glibc and musl it is.
|
|
|
|
# Related:
|
|
|
|
# http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
|
BASH_CONF_ENV += bash_cv_getenv_redef=no
|
|
|
|
else
|
|
|
|
BASH_CONF_ENV += bash_cv_getenv_redef=yes
|
|
|
|
endif
|
2013-08-12 15:15:45 +02:00
|
|
|
endif
|
|
|
|
|
2021-04-23 22:23:53 +02:00
|
|
|
define BASH_REMOVE_UNUSED_FILES
|
2010-06-09 15:36:26 +02:00
|
|
|
rm -f $(TARGET_DIR)/bin/bashbug
|
2018-01-19 11:15:09 +01:00
|
|
|
endef
|
2021-04-23 22:23:53 +02:00
|
|
|
BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_UNUSED_FILES
|
2018-01-19 11:15:09 +01:00
|
|
|
|
2021-04-23 22:23:54 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_BASH_LOADABLE_EXAMPLES),y)
|
|
|
|
define BASH_REMOVE_LOADABLE_UNUSED_FILES
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/bash/Makefile.inc
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/bash/loadables.h
|
|
|
|
endef
|
|
|
|
BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_UNUSED_FILES
|
|
|
|
else
|
|
|
|
define BASH_REMOVE_LOADABLE_EXAMPLES
|
|
|
|
rm -rf $(TARGET_DIR)/usr/lib/bash
|
|
|
|
endef
|
|
|
|
BASH_POST_INSTALL_TARGET_HOOKS += BASH_REMOVE_LOADABLE_EXAMPLES
|
|
|
|
endif
|
|
|
|
|
2018-01-19 11:15:09 +01:00
|
|
|
# Add /bin/bash to /etc/shells otherwise some login tools like dropbear
|
|
|
|
# can reject the user connection. See man shells.
|
|
|
|
define BASH_ADD_MKSH_TO_SHELLS
|
2018-01-19 11:15:08 +01:00
|
|
|
grep -qsE '^/bin/bash$$' $(TARGET_DIR)/etc/shells \
|
2018-01-13 17:05:27 +01:00
|
|
|
|| echo "/bin/bash" >> $(TARGET_DIR)/etc/shells
|
2010-06-09 15:36:26 +02:00
|
|
|
endef
|
2018-01-19 11:15:09 +01:00
|
|
|
BASH_TARGET_FINALIZE_HOOKS += BASH_ADD_MKSH_TO_SHELLS
|
2010-06-09 15:36:26 +02:00
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|