config BR2_NEEDS_HOST_UTF8_LOCALE
bool
+# Hidden boolean selected by packages that explicitly need C.UTF-8 locale
+# to be available on host system.
+config BR2_NEEDS_HOST_C_UTF8_LOCALE
+ bool
+
source "arch/Config.in"
menu "Build options"
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
select BR2_PACKAGE_KMOD_TOOLS
select BR2_TARGET_TZ_INFO
+ select BR2_NEEDS_HOST_C_UTF8_LOCALE
help
systemd is a system and service manager for Linux,
compatible with SysV and LSB init scripts. systemd provides
SYSTEMD_NINJA_OPTS = $(if $(VERBOSE),-v) -j$(PARALLEL_JOBS)
+SYSTEMD_ENV = $(TARGET_MAKE_ENV) LANG=C.UTF-8 LC_ALL=C.UTF-8
+
define SYSTEMD_CONFIGURE_CMDS
rm -rf $(@D)/build
mkdir -p $(@D)/build
- $(TARGET_MAKE_ENV) meson $(SYSTEMD_CONF_OPTS) $(@D) $(@D)/build
+ $(SYSTEMD_ENV) meson $(SYSTEMD_CONF_OPTS) $(@D) $(@D)/build
endef
define SYSTEMD_BUILD_CMDS
- $(TARGET_MAKE_ENV) ninja $(SYSTEMD_NINJA_OPTS) -C $(@D)/build
+ $(SYSTEMD_ENV) ninja $(SYSTEMD_NINJA_OPTS) -C $(@D)/build
endef
define SYSTEMD_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja $(SYSTEMD_NINJA_OPTS) \
+ $(SYSTEMD_ENV) DESTDIR=$(TARGET_DIR) ninja $(SYSTEMD_NINJA_OPTS) \
-C $(@D)/build install
endef
define SYSTEMD_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) DESTDIR=$(STAGING_DIR) ninja $(SYSTEMD_NINJA_OPTS) \
+ $(SYSTEMD_ENV) DESTDIR=$(STAGING_DIR) ninja $(SYSTEMD_NINJA_OPTS) \
-C $(@D)/build install
endef
fi
fi
+if grep -q ^BR2_NEEDS_HOST_C_UTF8_LOCALE=y $BR2_CONFIG; then
+ if ! which locale > /dev/null ; then
+ echo
+ echo "You need locale support on your build machine"
+ exit 1 ;
+ fi
+ if ! LC_ALL=C.UTF-8 locale -c charmap | grep -q '^UTF-8$'; then
+ echo
+ echo "You need C.UTF-8 locale suppport on the host system"
+ exit 1 ;
+ fi
+fi
+
if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then
check_prog_host "java"
JAVA_GCJ=$(java -version 2>&1 | grep gcj)