From 66a6c153d5db95eb0f35861269a7f5459f387e55 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 17 Apr 2011 05:31:54 +0200 Subject: add basic locale support to OpenADK --- mk/pkg-bottom.mk | 2 +- mk/vars.mk | 6 ++++++ package/eglibc/Makefile | 4 ++++ package/libX11/Makefile | 3 +++ target/config/Config.in.adk | 6 ++++++ toolchain/eglibc/Makefile | 4 ++-- 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index 0735a8c14..954539764 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -82,11 +82,11 @@ else ifeq ($(strip ${CONFIG_STYLE}),) --libexecdir=/usr/libexec \ --localstatedir=/var \ --sysconfdir=/etc \ - --disable-nls \ --enable-shared \ --enable-static \ --disable-dependency-tracking \ --disable-libtool-lock \ + $(NLS) \ ${CONFIGURE_ARGS} $(MAKE_TRACE) else @echo "Invalid CONFIG_STYLE '${CONFIG_STYLE}'" >&2 diff --git a/mk/vars.mk b/mk/vars.mk index bb66a5e32..5dc08a7a9 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -209,4 +209,10 @@ ifeq ($(ADK_HOST_CYGWIN),y) EXEEXT:= .exe endif +ifeq ($(ADK_LOCALES),y) +NLS:= --enable-nls +else +NLS:= --disable-nls +endif + include $(TOPDIR)/mk/mirrors.mk diff --git a/package/eglibc/Makefile b/package/eglibc/Makefile index 2c12a505b..0b5956431 100644 --- a/package/eglibc/Makefile +++ b/package/eglibc/Makefile @@ -48,6 +48,10 @@ EGLIBC_ENV:= PATH='${TARGET_PATH}' \ # compile nothing, eglibc is already build in toolchain directory do-install: +ifeq ($(ADK_LOCALES),y) + ${INSTALL_DIR} $(IDIR_EGLIBC)/usr/bin + $(CP) $(STAGING_TARGET_DIR)/usr/bin/locale $(IDIR_EGLIBC)/usr/bin +endif ${INSTALL_DIR} $(IDIR_EGLIBC)/lib $(IDIR_EGLIBC)/etc \ $(IDIR_EGLIBC)/usr/lib cd ${STAGING_TARGET_DIR} && for f in UTC ${ADK_RUNTIME_TIMEZONE}; do \ diff --git a/package/libX11/Makefile b/package/libX11/Makefile index b6849296e..71baaff3a 100644 --- a/package/libX11/Makefile +++ b/package/libX11/Makefile @@ -37,6 +37,9 @@ libx11-install: ${CP} ${WRKINST}/usr/lib/libX11.so* ${IDIR_LIBX11}/usr/lib/ ${CP} ${WRKINST}/usr/lib/libX11-xcb* ${IDIR_LIBX11}/usr/lib/ ${CP} ${WRKINST}/usr/share/X11/XErrorDB ${IDIR_LIBX11}/usr/share/X11 +ifeq ($(ADK_LOCALES),y) + ${CP} ${WRKINST}/usr/share/X11/locale ${IDIR_LIBX11}/usr/share/X11 +endif libx11-dev-install: ${INSTALL_DIR} ${IDIR_LIBX11_DEV}/usr/include/X11 diff --git a/target/config/Config.in.adk b/target/config/Config.in.adk index 50fef2866..442094b85 100644 --- a/target/config/Config.in.adk +++ b/target/config/Config.in.adk @@ -12,6 +12,12 @@ config ADK_HOST help Configure host for IPKG package management. +config ADK_LOCALES + bool "Enable locale support in C library and applications" + default n + help + Multilanguage support. + config ADK_DEBUG bool "Compile applications with debug support by default" default n diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index 690261324..fe6f40275 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -14,7 +14,6 @@ TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS)) EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \ --host=$(REAL_GNU_TARGET_NAME) \ - --disable-nls \ --without-cvs \ --disable-profile \ --disable-debug \ @@ -22,7 +21,8 @@ EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \ --without-gd \ --with-__thread \ --with-tls \ - --enable-add-ons + --enable-add-ons \ + $(NLS) EGLIBC_ENV:= PATH='${TARGET_PATH}' \ BUILD_CC=${CC_FOR_BUILD} \ -- cgit v1.2.3