diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2010-05-24 22:32:03 +0200 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2010-05-24 22:33:07 +0200 |
commit | 77e026bbfabe01fc4c4f3410d283dbd7d836162a (patch) | |
tree | 7cca183c7a7815c58af6ed5548a5c2d86f5e00c7 /docs | |
parent | dbdb4e33f04a52757232a6d00da23e8ba232c7d2 (diff) |
Add documentation on gettext integration
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/buildroot.html | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/docs/buildroot.html b/docs/buildroot.html index abe822f79..3702b449f 100644 --- a/docs/buildroot.html +++ b/docs/buildroot.html @@ -798,6 +798,8 @@ community support.</p> <li><a href="#manual-tutorial">Manual Makefile : tutorial</a></li> </ul> </li> + <li><a href="#gettext-integration">Gettext integration and + interaction with packages</a></li> </ul> <h3><a name="package-directory"></a>Package directory</h3> @@ -1583,6 +1585,62 @@ LIBFOO_POST_PATCH_HOOKS += LIBFOO_POST_PATCH_FIXUP line <a href="#ex2line40">40</a>, which is used by Buildroot to download, compile, and then install this package. </p> + <h3><a name="gettext-integration"></a>Gettext integration and + interaction with packages</h3> + + <p>Many packages that support internationalization use the gettext + library. Dependency on this library are fairly complicated and + therefore deserves a few explanations.</p> + + <p>The <i>uClibc</i> C library doesn't implement gettext + functionality, therefore with this C library, a separate gettext + must be compiled. On the other hand, the <i>glibc</i> 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.</p> + + <p>Additionnaly, some packages (such as libglib2) do require + gettext unconditionnally, while other packages (those who + support <code>--disable-nls</code> in general) only require + gettext when locale support is enabled.</p> + + <p>Therefore, Buildroot defines two configuration options:</p> + + <ul> + <li><code>BR2_NEEDS_GETTEXT</code>, which is true as soon as the + toolchain doesn't provide its own gettext implementation</li> + + <li><code>BR2_NEEDS_GETTEXT_IF_LOCALE</code>, which is true if + the toolchain doesn't provide its own gettext implementation and + if locale support is enabled</li> + + </ul> + + <p>Therefore, packages that unconditionnally need gettext should:</p> + + <ol> + <li>Use <code>select BR2_PACKAGE_GNUTTEXT if + BR2_NEEDS_GETTEXT</code> and possibly <code>select + BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT</code> if libintl is + also needed</li> + + <li>Use <code>$(if $(BR2_NEEDS_GETTEXT),gettext)</code> in the + package <code>DEPENDENCIES</code> variable</li> + </ol> + + <p>Packages that need gettext only when locale support is enabled + should:</p> + + <ol> + <li>Use <code>select BR2_PACKAGE_GNUTTEXT if + BR2_NEEDS_GETTEXT_IF_LOCALE</code> and possibly <code>select + BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT_IF_LOCALE</code> if + libintl is also needed</li> + + <li>Use <code>$(if + $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)</code> in the + package <code>DEPENDENCIES</code> variable</li> + </ol> <h3>Conclusion</h3> |