2012-11-11 04:14:42 +01:00
|
|
|
// -*- mode:doc; -*-
|
|
|
|
|
2011-10-10 10:46:39 +02:00
|
|
|
Gettext integration and interaction with packages
|
2012-11-11 04:14:42 +01:00
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
2011-10-10 10:46:39 +02:00
|
|
|
|
|
|
|
Many packages that support internationalization use the gettext
|
|
|
|
library. Dependencies for this library are fairly complicated and
|
2012-11-16 05:54:19 +01:00
|
|
|
therefore, deserve some explanation.
|
2011-10-10 10:46:39 +02:00
|
|
|
|
2012-11-16 05:54:19 +01:00
|
|
|
The 'uClibc' C library doesn't implement gettext functionality;
|
2011-10-10 10:46:39 +02:00
|
|
|
therefore with this C library, a separate gettext must be compiled. On
|
|
|
|
the other hand, the 'glibc' C library does integrate its own gettext,
|
2012-11-16 05:54:19 +01:00
|
|
|
and in this case the separate gettext library should not be compiled,
|
2011-10-10 10:46:39 +02:00
|
|
|
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
|
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
Packages that need gettext only when locale support is enabled should:
|
2011-10-10 10:46:39 +02:00
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
* use +select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE+ in the
|
|
|
|
+Config.in+ file;
|
2011-10-10 10:46:39 +02:00
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
* use +$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)+ in the package
|
|
|
|
+DEPENDENCIES+ variable in the +.mk+ file.
|
2011-10-10 10:46:39 +02:00
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
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;
|
2011-10-10 10:46:39 +02:00
|
|
|
|
2012-11-27 12:59:17 +01:00
|
|
|
* use +$(if $(BR2_NEEDS_GETTEXT),gettext)+ in the package
|
|
|
|
+DEPENDENCIES+ variable in the +.mk+ file.
|
2011-10-10 10:46:39 +02:00
|
|
|
|