157 строки
4.6 KiB
Python
157 строки
4.6 KiB
Python
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
|
# vim: set filetype=python:
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
set_config("MOZ_SUITE", True)
|
|
set_define("MOZ_SUITE", True)
|
|
|
|
imply_option("MOZ_APP_BASENAME", "SeaMonkey")
|
|
imply_option("MOZ_APP_ID", "{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}")
|
|
imply_option("MOZ_APP_VENDOR", "Mozilla")
|
|
# Include the DevTools client, not just the server (which is the default)
|
|
imply_option("MOZ_DEVTOOLS", "all")
|
|
imply_option("NSS_EXTRA_SYMBOLS_FILE", "../comm/mailnews/nss-extra.symbols")
|
|
|
|
imply_option('--enable-default-browser-agent', False)
|
|
|
|
@depends(target_is_windows, target_has_linux_kernel)
|
|
def bundled_fonts(is_windows, is_linux):
|
|
if is_windows or is_linux:
|
|
return True
|
|
|
|
|
|
set_config("MOZ_BUNDLED_FONTS", bundled_fonts)
|
|
add_old_configure_assignment("MOZ_BUNDLED_FONTS", bundled_fonts)
|
|
|
|
|
|
@depends(build_environment, "--help")
|
|
@imports(_from="os.path", _import="join")
|
|
def commtopsrcdir(build_env, _):
|
|
topsrcdir = build_env.topsrcdir
|
|
return join(topsrcdir, "comm")
|
|
|
|
|
|
@template
|
|
def set_defconf(k, v):
|
|
set_config(k, v)
|
|
set_define(k, v)
|
|
add_old_configure_assignment(k, v)
|
|
|
|
|
|
set_defconf("MAR_CHANNEL_ID", "seamonkey-comm-release")
|
|
|
|
set_defconf("ACCEPTED_MAR_CHANNEL_IDS",
|
|
"seamonkey-comm-release,seamonkey-comm-central")
|
|
|
|
add_old_configure_assignment("commtopsrcdir", commtopsrcdir)
|
|
set_config("commtopsrcdir", commtopsrcdir)
|
|
|
|
|
|
@depends(build_environment, application)
|
|
@imports(_from="os.path", _import="exists")
|
|
@imports(_from="__builtin__", _import="open")
|
|
def seamonkey_version(build_env, app_path):
|
|
version_file = os.path.join(
|
|
build_env.topsrcdir, app_path[0], "config", "version.txt"
|
|
)
|
|
version_file_display = os.path.join(
|
|
build_env.topsrcdir, app_path[0], "config", "version_display.txt"
|
|
)
|
|
version_file_package = os.path.join(
|
|
build_env.topsrcdir, app_path[0], "config", "version_package.txt"
|
|
)
|
|
rv = []
|
|
for f in [version_file, version_file_display, version_file_package]:
|
|
if exists(f):
|
|
f_value = open(f).read().strip()
|
|
else:
|
|
f_value = "unknown"
|
|
rv.append(f_value)
|
|
|
|
return namespace(version=rv[0],
|
|
version_display=rv[1],
|
|
version_package=rv[2])
|
|
|
|
|
|
set_defconf("SEAMONKEY_VERSION", seamonkey_version.version)
|
|
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"
|
|
)
|
|
|
|
|
|
@depends_if("--enable-irc")
|
|
def irc(arg):
|
|
return True
|
|
|
|
|
|
set_config("MOZ_IRC", irc)
|
|
|
|
# =========================================================
|
|
# = DebugQA extension
|
|
# =========================================================
|
|
option(
|
|
"--enable-debugqa", default=False, help="Enable building of the DebugQA extension"
|
|
)
|
|
|
|
|
|
@depends_if("--enable-debugqa")
|
|
def debugqa(arg):
|
|
return True
|
|
|
|
|
|
set_config("MOZ_DEBUGQA", debugqa)
|
|
|
|
with only_when(target_has_linux_kernel & compile_environment):
|
|
option(env='MOZ_NO_PIE_COMPAT',
|
|
help='Enable non-PIE wrapper')
|
|
|
|
set_config('MOZ_NO_PIE_COMPAT',
|
|
depends_if('MOZ_NO_PIE_COMPAT')(lambda _: True))
|
|
|
|
# Miscellaneous programs
|
|
# ==============================================================
|
|
|
|
check_prog("ZIP", ("zip",))
|
|
|
|
include("../build/moz.configure/gecko_source.configure")
|
|
|
|
include("../mailnews/moz.configure")
|
|
include("../../toolkit/moz.configure")
|