[gimp/nielsdg/die-intltool-die] extensions: fix builds after MR !653 (migrating to gettext).
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/nielsdg/die-intltool-die] extensions: fix builds after MR !653 (migrating to gettext).
- Date: Sat, 25 Jun 2022 09:16:06 +0000 (UTC)
commit 56b598e9c636c90d153d32b3c1971aac6086c25d
Author: Jehan <jehan girinstud io>
Date: Fri Jun 24 22:43:13 2022 +0200
extensions: fix builds after MR !653 (migrating to gettext).
(1) On recent meson versions, it fixes this error:
> extensions/goat-exercises/meson.build:108:0: ERROR: i18n.merge_file keyword argument 'output' was of
type array[str] but should have been str
As docs explains, 'output' only accepts one item in i18n.merge_file().
This bug also happens on older meson (but there the reported error is a
lot less useful as it doesn't mention local meson build code).
(2) `setup.isl.xml` is a temporary intermediary file used to create the
Windows installer. It must not be installed.
(3) `gimp30-windows-installer.mo` itself is only used to create
`setup.isl.xml`. It must not be installed as well.
(4) gimp-tips.(its|loc) files (same for gimp-tags ones) should not be
installed. They are only temporary data.
(5) Fix environment variable: s/GETTEXT_DATA_DIRS/GETTEXTDATADIRS/
Fixes:
> /usr/bin/msgfmt: cannot locate ITS rules for ../../../data/tips/gimp-tips.xml.in
(6) Fix various bugs in the *.setup.isl files creation in autotools
build (typo, wrong files used, order of options in `xsltproc`
apparently meaningful, and so on. I guess the autotools build was
not as well tested as the meson one :P).
(7) Fixing the unit test verifying language lists consistency.
build/windows/installer/lang/Makefile.am | 13 +++++++------
build/windows/installer/lang/meson.build | 3 +--
build/windows/installer/lang/test-installer-langs.sh | 2 +-
data/tags/Makefile.am | 2 +-
data/tags/meson.build | 7 -------
data/tips/Makefile.am | 2 +-
data/tips/meson.build | 7 -------
extensions/goat-exercises/meson.build | 2 +-
po-windows-installer/meson.build | 2 +-
9 files changed, 13 insertions(+), 27 deletions(-)
---
diff --git a/build/windows/installer/lang/Makefile.am b/build/windows/installer/lang/Makefile.am
index da603b9393..0498c1b0c5 100644
--- a/build/windows/installer/lang/Makefile.am
+++ b/build/windows/installer/lang/Makefile.am
@@ -7,8 +7,8 @@ stamp_files = \
CLEANFILES = $(isl_xml_files) $(stamp_files)
# First we use the XML file to be able to do gettext translation
-$(isl_xml_files): $(is_xml_in_files) $(wildcard $(top_srcdir)/po-windows-installer/*.po) Makefile.am
- $(AM_V_GEN) GETTEXT_DATA_DIRS=$(abs_srcdir) $(MSGFMT) --xml --template $< -d
$(top_srcdir)/po-windows-installer -o $@
+$(isl_xml_files): $(isl_xml_in_files) $(wildcard $(top_srcdir)/po-windows-installer/*.po) Makefile.am
+ $(AM_V_GEN) GETTEXTDATADIRS=$(abs_srcdir) $(MSGFMT) --xml --template $< -d
$(top_srcdir)/po-windows-installer -o $@
# Then, we generate the .isl file for each language using some xsltproc magic
languages = \
@@ -53,17 +53,18 @@ languages = \
zh_CN:zh_CN \
zh_TW:zh_TW
-stamp-isl: setup.isl gimp-ms-installer-config.xsl.in Makefile.am
+stamp-isl: setup.isl.xml gimp-ms-installer-config.xsl.in Makefile.am
@ \
for lang in $(languages); do \
code=`echo $$lang | cut -d: -f1`; \
prefix=`echo $$lang | cut -d: -f2`; \
- lang_check=`[ "$$prefix" ] && echo "value[lang('$$code')]" || echo "value"`; \
+ lang_check=`[ "$$prefix" ] && echo "value[lang('$$code')]" || echo "value"`; \
+ xslin="$(srcdir)/gimp-ms-installer-config.xsl.in"; \
xsl="$(builddir)/gimp-ms-installer-config.xsl"; \
isl="$(builddir)/$$code.setup.isl"; \
echo " GEN $$isl"; \
- sed 's/@LANG_CHECK@/$$lang_check/' "$$xsl" > "$$xsl.in"; \
- $(XSLTPROC) --xinclude "$$xsl" $< --output "$$isl" || rm -f "$$isl"; \
+ sed "s/@LANG_CHECK@/$$lang_check/" "$$xslin" > "$$xsl"; \
+ $(XSLTPROC) --xinclude --output "$$isl" "$$xsl" $< || rm -f "$$isl"; \
done && \
echo timestamp > stamp-isl
diff --git a/build/windows/installer/lang/meson.build b/build/windows/installer/lang/meson.build
index a65474d48d..87e7bdfd85 100644
--- a/build/windows/installer/lang/meson.build
+++ b/build/windows/installer/lang/meson.build
@@ -4,8 +4,7 @@ ms_installer_config_xml = i18n.merge_file(
output: '@BASENAME@',
data_dirs: meson.current_source_dir(),
po_dir: po_windows_installer_dir,
- install: true,
- install_dir: gimpdatadir / 'tags',
+ install: false,
)
languages = [
diff --git a/build/windows/installer/lang/test-installer-langs.sh
b/build/windows/installer/lang/test-installer-langs.sh
index 5c882ea537..ef1e3ab091 100755
--- a/build/windows/installer/lang/test-installer-langs.sh
+++ b/build/windows/installer/lang/test-installer-langs.sh
@@ -24,7 +24,7 @@ if [ "$PO_LANGS" != "$INSTALLER_LANGS" ]; then
exit 1
fi
-AUTOTOOLS_LANGS=`grep '[a-zA-Z_]*:\[[a-zA-Z_]*\]'
${GIMP_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/lang/Makefile.am | \
+AUTOTOOLS_LANGS=`grep '^\s*[a-zA-Z_]*:[a-zA-Z_]*\s*\\\\\?'
${GIMP_TESTING_ABS_TOP_SRCDIR}/build/windows/installer/lang/Makefile.am | \
sed 's/^\t*\([a-zA-Z_]*\):.*$/\1/' |sort`
AUTOTOOLS_LANGS=`echo "$AUTOTOOLS_LANGS" | tr '\n\r' ' ' | sed 's/\<en\> //'`
diff --git a/data/tags/Makefile.am b/data/tags/Makefile.am
index f6eecebd59..2e3f36fc79 100644
--- a/data/tags/Makefile.am
+++ b/data/tags/Makefile.am
@@ -22,7 +22,7 @@ EXTRA_DIST += $(its_DATA)
gimp-tags-default.xml: gimp-tags-default.xml.in $(wildcard $(top_srcdir)/po-tags/*.po)
- $(AM_V_GEN) GETTEXT_DATA_DIRS=$(abs_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po-tags -o
$@
+ $(AM_V_GEN) GETTEXTDATADIRS=$(abs_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po-tags -o $@
validate: gimp-tags-default.xml
diff --git a/data/tags/meson.build b/data/tags/meson.build
index a0bdf2e5ce..f84c27e9c0 100644
--- a/data/tags/meson.build
+++ b/data/tags/meson.build
@@ -1,10 +1,3 @@
-install_data([
- 'its/gimp-tags.its',
- 'its/gimp-tags.loc',
- ],
- install_dir: get_option('datadir') / 'gettext' / 'its',
-)
-
gimp_tags_default = i18n.merge_file(
input : 'gimp-tags-default.xml.in',
output: '@BASENAME@',
diff --git a/data/tips/Makefile.am b/data/tips/Makefile.am
index 0310123f97..68c8ab4701 100644
--- a/data/tips/Makefile.am
+++ b/data/tips/Makefile.am
@@ -23,7 +23,7 @@ EXTRA_DIST += $(its_DATA)
gimp-tips.xml: gimp-tips.xml.in $(wildcard $(top_srcdir)/po-tips/*.po)
- $(AM_V_GEN) GETTEXT_DATA_DIRS=$(abs_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po-tips -o
$@
+ $(AM_V_GEN) GETTEXTDATADIRS=$(abs_srcdir) $(MSGFMT) --xml --template $< -d $(top_srcdir)/po-tips -o $@
validate: gimp-tips.xml
diff --git a/data/tips/meson.build b/data/tips/meson.build
index d70d4a0b0e..630df60bee 100644
--- a/data/tips/meson.build
+++ b/data/tips/meson.build
@@ -1,10 +1,3 @@
-install_data([
- 'its/gimp-tips.its',
- 'its/gimp-tips.loc',
- ],
- install_dir: get_option('datadir') / 'gettext' / 'its',
-)
-
gimp_tips = i18n.merge_file(
input : 'gimp-tips.xml.in',
output: '@BASENAME@',
diff --git a/extensions/goat-exercises/meson.build b/extensions/goat-exercises/meson.build
index 0ff2f2c160..09223625af 100644
--- a/extensions/goat-exercises/meson.build
+++ b/extensions/goat-exercises/meson.build
@@ -107,7 +107,7 @@ appdatafilein = configure_file(
appdatafile = i18n.merge_file(
input : [ appdatafilein, ],
- output: [ appdatafilename, ],
+ output: appdatafilename,
po_dir: po_plug_ins_dir,
install: true,
install_dir: gimpplugindir / 'extensions' / extension_name,
diff --git a/po-windows-installer/meson.build b/po-windows-installer/meson.build
index 34a26b2108..abcb8ed049 100644
--- a/po-windows-installer/meson.build
+++ b/po-windows-installer/meson.build
@@ -1,2 +1,2 @@
po_windows_installer_dir = meson.current_source_dir()
-i18n.gettext(gettext_package + '-windows-installer', preset: 'glib')
+i18n.gettext(gettext_package + '-windows-installer', preset: 'glib', install: false)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]