summaryrefslogtreecommitdiffstats
path: root/docs/manual/adding-packages-gettext.txt
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-10-10 10:46:39 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-10-25 09:46:01 +0200
commit41c1cb44cd60819f8ba20024e23e431c00b279d7 (patch)
tree8ec316f1602e4e9a8fff272aeeb1a2a36eb5fdd1 /docs/manual/adding-packages-gettext.txt
parente55af699b5cb3d9286e19e19c8aaeb14bcdf0a38 (diff)
downloadbuildroot-novena-41c1cb44cd60819f8ba20024e23e431c00b279d7.tar.gz
buildroot-novena-41c1cb44cd60819f8ba20024e23e431c00b279d7.zip
manual: convert existing documentation to the asciidoc format
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Luca Ceresoli <luca@lucaceresoli.net> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'docs/manual/adding-packages-gettext.txt')
-rw-r--r--docs/manual/adding-packages-gettext.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/docs/manual/adding-packages-gettext.txt b/docs/manual/adding-packages-gettext.txt
new file mode 100644
index 000000000..1ed834e15
--- /dev/null
+++ b/docs/manual/adding-packages-gettext.txt
@@ -0,0 +1,44 @@
+Gettext integration and interaction with packages
+-------------------------------------------------
+
+Many packages that support internationalization use the gettext
+library. Dependencies for this library are fairly complicated and
+therefore, deserves some explanation.
+
+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 kinds of build failures.
+
+Additionally, some packages (such as +libglib2+) do require gettext
+unconditionally, while other packages (those who support
++--disable-nls+ in general) only require gettext when locale support
+is enabled.
+
+Therefore, Buildroot defines two configuration options:
+
+* +BR2_NEEDS_GETTEXT+, which is true as soon as the toolchain doesn't
+ provide its own gettext implementation
+
+* +BR2_NEEDS_GETTEXT_IF_LOCALE+, which is true if the toolchain
+ doesn't provide its own gettext implementation and if locale support
+ is enabled
+
+Therefore, packages that unconditionally need gettext should:
+
+* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ and possibly
+ +select BR2_PACKAGE_LIBINTL if BR2_NEEDS_GETTEXT+, if libintl is
+ also needed
+
+* Use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package
+ +DEPENDENCIES+ variable
+
+Packages that need gettext only when locale support is enabled should:
+
+* Use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ and
+ possibly +select BR2_PACKAGE_LIBINTL if
+ BR2_NEEDS_GETTEXT_IF_LOCALE+, if libintl is also needed
+
+* Use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package
+ +DEPENDENCIES+ variable