1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- # HG changeset patch
- # User Bill Gianopoulos <wgianopoulos@gmail.com>
- # Date 1722127270 0
- Bug 9999999 - Port bug 1860654 to suite.
- Bug 1860654 - Support Rust for Thunderbird development
- diff --git a/suite/Makefile.in b/suite/Makefile.in
- --- a/suite/Makefile.in
- +++ b/suite/Makefile.in
- @@ -18,8 +18,18 @@ endif
- # it's not right for anything else. So we correct platform.ini here.
-
- MOZ_REV=$(shell hg -R "$(topsrcdir)" parent --template="{node}" 2>/dev/null)
-
- libs:: $(DIST)/bin/platform.ini
- sed -e "s/^\(SourceStamp=\).*/\1$(MOZ_REV)/" $(DIST)/bin/platform.ini \
- > $(DIST)/bin/platform.ini~
- mv -f $(DIST)/bin/platform.ini~ $(DIST)/bin/platform.ini
- +
- +
- +vendored-rust-check:
- +ifdef MOZ_THUNDERBIRD_RUST
- + @echo "Checking vendored Rust libs"
- + $(PYTHON3) $(commtopsrcdir)/python/rocbuild/rocbuild/rust.py verify_vendored_dependencies
- +endif
- +
- +export:: vendored-rust-check
- +
- diff --git a/suite/moz.build b/suite/moz.build
- --- a/suite/moz.build
- +++ b/suite/moz.build
- @@ -16,16 +16,24 @@ DIRS += [
- "extensions",
- "locales",
- "mailnews",
- "modules",
- "themes/classic",
- "themes/modern",
- ]
-
- +if CONFIG["MOZ_THUNDERBIRD_RUST"]:
- + DEFINES["MOZ_THUNDERBIRD_RUST"] = 1
- +
- +if CONFIG["MOZ_OVERRIDE_GKRUST"]:
- + DIRS += [
- + "../rust",
- + ]
- +
- if CONFIG['MOZ_IRC']:
- DIRS += ['chatzilla']
-
- if CONFIG["MAKENSISU"]:
- DIRS += ["installer/windows"]
-
- if CONFIG["MOZ_BUNDLED_FONTS"]:
- DIRS += ["/browser/fonts"]
- diff --git a/suite/moz.configure b/suite/moz.configure
- --- a/suite/moz.configure
- +++ b/suite/moz.configure
- @@ -74,16 +74,38 @@ set_defconf("SEAMONKEY_VERSION", seamonk
- set_defconf("SEAMONKEY_VERSION_DISPLAY", seamonkey_version.version_display)
- # Currently not set in suite comm-central
- # set_defconf("MOZ_PKG_VERSION", seamonkey_version.version_package)
-
-
- imply_option("MOZ_PLACES", True)
- imply_option("MOZ_SERVICES_SYNC", False)
-
- +# Thunderbird Rust code is now the default
- +option("--disable-thunderbird-rust", help="Enable Rust support within Thunderbird")
- +
- +set_config("MOZ_THUNDERBIRD_RUST", True, when="--enable-thunderbird-rust")
- +set_define("MOZ_THUNDERBIRD_RUST", True, when="--enable-thunderbird-rust")
- +set_config("MOZ_OVERRIDE_GKRUST", True, when="--enable-thunderbird-rust")
- +
- +
- +@depends("--enable-thunderbird-rust")
- +def moz_override_cargo_config(enable_rust):
- + rust_override = "comm/rust/.cargo/config.toml.in"
- + if enable_rust:
- + log.info(f"Using {rust_override} for Rust code.")
- + return rust_override
- +
- +
- +set_config(
- + "MOZ_OVERRIDE_CARGO_CONFIG",
- + moz_override_cargo_config,
- + when="--enable-thunderbird-rust",
- +)
- +
- # Building extensions is disabled by default.
-
- # =========================================================
- # = ChatZilla extension
- # =========================================================
- option(
- "--enable-irc", default=False, help="Enable building of the ChatZilla IRC extension"
- )
|