From 77e026bbfabe01fc4c4f3410d283dbd7d836162a Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 24 May 2010 22:32:03 +0200 Subject: [PATCH] Add documentation on gettext integration Signed-off-by: Thomas Petazzoni --- docs/buildroot.html | 58 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/docs/buildroot.html b/docs/buildroot.html index abe822f79f..3702b449f8 100644 --- a/docs/buildroot.html +++ b/docs/buildroot.html @@ -798,6 +798,8 @@ community support.

  • Manual Makefile : tutorial
  • +
  • Gettext integration and + interaction with packages
  • Package directory

    @@ -1583,6 +1585,62 @@ LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP line 40, which is used by Buildroot to download, compile, and then install this package.

    +

    Gettext integration and + interaction with packages

    + +

    Many packages that support internationalization use the gettext + library. Dependency on this library are fairly complicated and + therefore deserves a few explanations.

    + +

    The uClibc C library doesn't implement gettext + functionality, therefore with this C library, a separate gettext + must be compiled. On the other hand, the glibc C library + does integrate its own gettext, and in this case, the separate + gettext library should not be compiled, because it creates various + kind of build failures.

    + +

    Additionnaly, some packages (such as libglib2) do require + gettext unconditionnally, while other packages (those who + support --disable-nls in general) only require + gettext when locale support is enabled.

    + +

    Therefore, Buildroot defines two configuration options:

    + + + +

    Therefore, packages that unconditionnally need gettext should:

    + +
      +
    1. Use select BR2_PACKAGE_GNUTTEXT if + BR2_NEEDS_GETTEXT and possibly select + BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT if libintl is + also needed
    2. + +
    3. Use $(if $(BR2_NEEDS_GETTEXT),gettext) in the + package DEPENDENCIES variable
    4. +
    + +

    Packages that need gettext only when locale support is enabled + should:

    + +
      +
    1. Use select BR2_PACKAGE_GNUTTEXT if + BR2_NEEDS_GETTEXT_IF_LOCALE and possibly select + BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE if + libintl is also needed
    2. + +
    3. Use $(if + $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) in the + package DEPENDENCIES variable
    4. +

    Conclusion

    -- 2.30.2