[tbb-commits] [builders/tor-browser-build] 02/03: Bug 40641: Use packaged locales on Firefox

gitolite role git at cupani.torproject.org
Mon Nov 7 17:52:52 UTC 2022


This is an automated email from the git hooks/post-receive script.

pierov pushed a commit to branch main
in repository builders/tor-browser-build.

commit 1e12d7269976feb7c2acdaa6f3d65260e83ef563
Author: Pier Angelo Vendrame <pierov at torproject.org>
AuthorDate: Wed Nov 2 18:05:33 2022 +0100

    Bug 40641: Use packaged locales on Firefox
    
    This commit changes Firefox build script to run the needed steps to
    include additional locales as packages locales.
    
    In our first tests, adding a locale adds at least 10 seconds to the
    build, so we do not add locales for testbuilds.
---
 projects/firefox/build  | 16 +++++++++++++++-
 projects/firefox/config |  3 +++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/projects/firefox/build b/projects/firefox/build
index 4d554f20..10b93fdf 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -134,6 +134,12 @@ export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system
 # Create .mozbuild to avoid interactive prompt in configure
 mkdir "$HOME/.mozbuild"
 
+l10ncentral="$HOME/.mozbuild/l10n-central"
+mkdir "$l10ncentral"
+for tarball in $rootdir/[% c('input_files_by_name/firefox-l10n') %]/*; do
+  tar -C "$l10ncentral" -xf "$tarball"
+done
+
 # PyYAML tries to read files as ASCII, otherwise
 export LC_ALL=C.UTF-8
 export LANG=C.UTF-8
@@ -146,7 +152,15 @@ export LANG=C.UTF-8
   [% IF !c("var/rlbox") -%]--without-wasm-sandboxed-libraries[% END %] \
 
 ./mach build --verbose
-./mach build stage-package
+[% IF !c("var/testbuild") %]
+  export MOZ_CHROME_MULTILOCALE="[% tmpl(c('var/locales').join(' ')) %]"
+  for AB_CD in $MOZ_CHROME_MULTILOCALE; do
+    ./mach build chrome-$AB_CD
+  done
+  AB_CD=multi ./mach build stage-package
+[% ELSE %]
+  ./mach build stage-package
+[% END %]
 
 [% IF c("var/osx") %]
   cp -a obj-*/dist/firefox/* $distdir
diff --git a/projects/firefox/config b/projects/firefox/config
index b3652b2e..103e8a9a 100644
--- a/projects/firefox/config
+++ b/projects/firefox/config
@@ -149,6 +149,9 @@ input_files:
     name: rust
   - project: cbindgen
     name: cbindgen
+  - project: firefox-l10n
+    name: firefox-l10n
+    enable: '[% !c("var/testbuild") %]'
   - project: wasi-sysroot
     name: wasi-sysroot
     enable: '[% c("var/rlbox") %]'

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list