X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fbuild%2Fdocs%2Fmanual%2Fadding-packages-gettext.txt;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fbuild%2Fdocs%2Fmanual%2Fadding-packages-gettext.txt;h=c955b1fa028a8dc6200a8d68499470ef5fb692d7;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/build/docs/manual/adding-packages-gettext.txt b/cirros-testvm/src-cirros/buildroot-2015.05/build/docs/manual/adding-packages-gettext.txt new file mode 100644 index 0000000..c955b1f --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/build/docs/manual/adding-packages-gettext.txt @@ -0,0 +1,61 @@ +// -*- mode:doc; -*- +// vim: set syntax=asciidoc: + +=== Gettext integration and interaction with packages + +Many packages that support internationalization use the gettext +library. Dependencies for this library are fairly complicated and +therefore, deserve some explanation. + +The 'uClibc' C library doesn't implement gettext functionality; +therefore with this C library, a separate gettext must be compiled, +which is provided by the additional +libintl+ library, part of the ++gettext+ package. + +On the other hand, the 'glibc' C library does integrate its own +gettext library functions, so it is not necessary to build a separate ++libintl+ library. + +However, certain packages need some gettext utilities on the target, +such as the +gettext+ program itself, which allows to retrieve +translated strings, from the command line. + +Additionally, some packages (such as +libglib2+) do require gettext +functions unconditionally, while other packages (in general, those who +support +--disable-nls+) only require gettext functions 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 + +Packages that need gettext only when locale support is enabled should: + +* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ in the + +Config.in+ file; + +* use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package + +DEPENDENCIES+ variable in the +.mk+ file. + +Packages that unconditionally need gettext (which should be very rare) +should: + +* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT+ in the +Config.in+ + file; + +* use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package + +DEPENDENCIES+ variable in the +.mk+ file. + +Packages that need the +gettext+ utilities on the target (should be +rare) should: + +* use +select BR2_PACKAGE_GETTEXT+ in their +Config.in+ file, + indicating in a comment above that it's a runtime dependency only. + +* not add any +gettext+ dependency in the +DEPENDENCIES+ variable of + their +.mk+ file.