From af49e8010b41633d7271e0711f4776077419b1fe Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 17 Apr 2023 15:31:20 -0400 Subject: i18n module: be broadly supportive of portable gettext tools There are a number of implementations for msgfmt, supporting various options. The simplest, and most common, use case is to compile .po files into .mo files, and this should be able to work on gettext implementations other than the GNU one. The problem is that we were passing some pretty portable arguments in an unportable manner. The `-o` option-argument and its associated argument came after the input file operand, which violates the POSIX Utility Syntax Guidelines, and happens to not be supported by Solaris gettext. The GNU gettext doesn't care; GNU invented GNU argument permutation. Switch the order around so that our use respects the POSIX style. --- mesonbuild/modules/i18n.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/modules/i18n.py b/mesonbuild/modules/i18n.py index f5a66a4..0022deb 100644 --- a/mesonbuild/modules/i18n.py +++ b/mesonbuild/modules/i18n.py @@ -285,7 +285,7 @@ class I18nModule(ExtensionModule): path.join(state.subdir, l, 'LC_MESSAGES'), state.subproject, state.environment, - [self.tools['msgfmt'], '@INPUT@', '-o', '@OUTPUT@'], + [self.tools['msgfmt'], '-o', '@OUTPUT@', '@INPUT@'], [po_file], [f'{packagename}.mo'], install=install, -- cgit v1.1