e3c14de0df
When BR2_SHARED_STATIC_LIBS is enabled we pass both --enable-static and --enable-shared to configure. dash configure.ac only looks for --enable-static to make the build static. But when linking against libedit pkg-config only returns dynamic linking dependencies, so the indirect ncurses dependency in not mentioned. The end result is that libedit can't find ncurses symbols on link. BR2_SHARED_STATIC_LIBS only makes sense for libraries, not executable binaries. Pass --disable-static unless BR2_STATIC_LIBS is enabled for static only build. Fixes: http://autobuild.buildroot.net/results/137d39cc5ec436759a2fde3f26ce5633e0ad6c2e/ http://autobuild.buildroot.net/results/55a38e0e45212bf7403d9ccb626c9422e3affe72/ http://autobuild.buildroot.net/results/8f109f1a04a6a2ff6d8c4c920e499fbaec3f72b9/ Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
47 lines
1.3 KiB
Makefile
47 lines
1.3 KiB
Makefile
################################################################################
|
|
#
|
|
# dash
|
|
#
|
|
################################################################################
|
|
|
|
DASH_VERSION = 0.5.11.5
|
|
DASH_SITE = http://gondor.apana.org.au/~herbert/dash/files
|
|
DASH_LICENSE = BSD-3-Clause, GPL-2.0+ (mksignames.c)
|
|
DASH_LICENSE_FILES = COPYING
|
|
|
|
# dash does not build in parallel
|
|
DASH_MAKE = $(MAKE1)
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBEDIT),y)
|
|
DASH_DEPENDENCIES += libedit host-pkgconf
|
|
DASH_CONF_OPTS += --with-libedit
|
|
DASH_CONF_ENV += LIBS=`pkg-config --libs libedit`
|
|
|
|
# Enable line editing, Emacs style
|
|
define DASH_INSTALL_PROFILE
|
|
mkdir -p $(TARGET_DIR)/etc/profile.d
|
|
echo 'set -E' > $(TARGET_DIR)/etc/profile.d/dash.sh
|
|
endef
|
|
DASH_POST_INSTALL_TARGET_HOOKS += DASH_INSTALL_PROFILE
|
|
else
|
|
DASH_CONF_OPTS += --without-libedit
|
|
endif
|
|
|
|
ifeq ($(BR2_STATIC_LIBS),)
|
|
DASH_CONF_OPTS += --disable-static
|
|
endif
|
|
|
|
define DASH_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -m 0755 -D $(@D)/src/dash $(TARGET_DIR)/bin/dash
|
|
endef
|
|
|
|
# Add /bin/dash to /etc/shells otherwise some login tools like dropbear
|
|
# can reject the user connection. See man shells.
|
|
define DASH_ADD_DASH_TO_SHELLS
|
|
grep -qsE '^/bin/dash$$' $(TARGET_DIR)/etc/shells \
|
|
|| echo "/bin/dash" >> $(TARGET_DIR)/etc/shells
|
|
endef
|
|
DASH_TARGET_FINALIZE_HOOKS += DASH_ADD_DASH_TO_SHELLS
|
|
|
|
$(eval $(autotools-package))
|