summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2023-08-20 21:23:12 +0100
committerColin Watson <cjwatson@debian.org>2023-08-20 21:23:13 +0100
commitb403f6d413e2b01993de56906bd28480882badb6 (patch)
tree6ed476251ea6d6f2622eec35bf14e30718f313b1
parent5881a7e4aecde734d8b0d41569b2b793f530e689 (diff)
bootstrap: Make --skip-po disable Gnulib downloads too
Fixes https://bugs.debian.org/1050089. * bootstrap.conf: If the `--skip-po` option is explicitly passed, then don't pass `--po-base` or `--po-domain` options to `gnulib-tool`, and don't merge `gl/ref-po/` into `gl/po/`.
-rw-r--r--bootstrap.conf43
1 files changed, 31 insertions, 12 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 500b9ade..caee513b 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -94,14 +94,31 @@ gnulib_modules="
"
gnulib_tool_option_extras="\
- --po-base=gl/ref-po \
--no-conditional-dependencies \
--libtool \
--macro-prefix=gl \
- --po-domain=man-db \
--no-vc-files \
"
+# bootstrap's --skip-po option really just controls its own downloads, but
+# it's somewhat useful to provide a way to skip the downloads performed by
+# gnulib-tool as well. Since we always suppress bootstrap's downloads due
+# to maintaining man-db's own translations manually, we need to parse the
+# command line ourselves to find out whether --skip-po was explicitly
+# passed.
+explicit_skip_po=
+for option; do
+ case $option in
+ --skip-po)
+ explicit_skip_po=t
+ ;;
+ esac
+done
+
+if [ -z "$explicit_skip_po" ]; then
+ gnulib_tool_option_extras="$gnulib_tool_option_extras --po-base=gl/ref-po --po-domain=man-db"
+fi
+
# This doesn't currently exist, but we set it to avoid confusion with 'gl'
# as the local output directory.
local_gl_dir=gnulib-local
@@ -140,17 +157,19 @@ tar -
bootstrap_post_import_hook () {
patch -s -p1 <patches/argp-domain.patch
- # gnulib-tool installs its own versions of gettext infrastructure files
- # such as po/Makefile.in.in, which don't necessarily match our configured
- # AM_GNU_GETTEXT_VERSION. To cope with this, we tell gnulib-tool to
- # install into a temporary directory (using --po-base above) and fix
- # things up here.
- cp -a gl/ref-po/LINGUAS gl/ref-po/POTFILES.in gl/po/
- sed 's,^subdir *=.*,subdir = gl/po,' gl/ref-po/Makevars >gl/po/Makevars
- if ls gl/ref-po/*.po >/dev/null 2>&1; then
- cp -a gl/ref-po/*.po gl/po/
+ if [ -z "$explicit_skip_po" ]; then
+ # gnulib-tool installs its own versions of gettext infrastructure files
+ # such as po/Makefile.in.in, which don't necessarily match our
+ # configured AM_GNU_GETTEXT_VERSION. To cope with this, we tell
+ # gnulib-tool to install into a temporary directory (using --po-base
+ # above) and fix things up here.
+ cp -a gl/ref-po/LINGUAS gl/ref-po/POTFILES.in gl/po/
+ sed 's,^subdir *=.*,subdir = gl/po,' gl/ref-po/Makevars >gl/po/Makevars
+ if ls gl/ref-po/*.po >/dev/null 2>&1; then
+ cp -a gl/ref-po/*.po gl/po/
+ fi
+ rm -rf gl/ref-po
fi
- rm -rf gl/ref-po
}
bootstrap_epilogue () {