The Meson Build System http://mesonbuild.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
868 B

i18n.merge_file: do not disable in the absence of gettext tools Disabling targets because the tools used to build them aren't available is a pretty suspicious thing to do. Users who want this are probably, in general, advised to check themselves whether it is possible to build those targets with find_program(..., required: false) The i18n.gettext() invocation is a bit unusual because the product of running it is non-critical files, specifically, translation catalogs. If users don't have the tools needed to build them, they may not be able to use them either, because perhaps they have NLS disabled on their platform or it's difficult to put it in the bootstrap path. So, for this reason, it was made non-fatal and the message catalogs are just not created, and the resulting build is still perfectly usable *unless* you want to use it in another language, at which point it "works" but the text is all inscrutable to the end user, and that's a feature of the target platform. That's an acceptable tradeoff for translation catalogs. It is NOT an acceptable tradeoff for merge_file, which produces desktop files or MIME database catalogs or other files which have crucial roles to perform, without which the software in question simply doesn't work at all. In such cases, this just fails to install crucial files, users report bugs to the project in question, and the project adds `find_program('xgettext')` to guarantee the hard error due to lack of confidence in Meson. Fixes #6165 Fixes #8436
3 years ago
## i18n.merge_file no longer arbitrarily leaves your project half-built
The i18n module partially accounts for builds with NLS disabled, by disabling
gettext compiled translation catalogs if it cannot build them. Due to
implementation details, this also disabled important data files created via
merge_file, leading to important desktop files etc. not being installed.
This overreaction has been fixed. It is no longer possible to have NLS-disabled
builds which break the project by not installing important files which have
nothing to do with NLS (other than including some).
If you were depending on not having the Gettext tools installed and
successfully mis-building your project, you may need to make your project
actually work with NLS disabled, for example by providing some version of your
files which is still installed even when merge_file cannot be run.