2016-03-11 22:04:59 +03:00
|
|
|
# -*- 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/.
|
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
set_config("MOZ_THUNDERBIRD", True)
|
|
|
|
set_define("MOZ_THUNDERBIRD", True)
|
2018-01-01 01:40:15 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
imply_option("MOZ_APP_BASENAME", "Thunderbird")
|
|
|
|
set_config("MOZ_APPUPDATE_HOST", "aus.thunderbird.net")
|
|
|
|
|
|
|
|
imply_option("--enable-default-browser-agent", False)
|
2021-09-04 00:22:27 +03:00
|
|
|
imply_option("MOZ_REQUIRE_SIGNING", False)
|
2020-04-24 01:55:06 +03:00
|
|
|
|
2020-08-18 23:05:28 +03:00
|
|
|
|
2018-10-10 21:36:41 +03:00
|
|
|
@depends(target_is_windows, target_is_linux)
|
|
|
|
def bundled_fonts(is_windows, is_linux):
|
|
|
|
if is_windows or is_linux:
|
|
|
|
return True
|
2018-01-01 01:37:40 +03:00
|
|
|
|
2018-10-10 21:36:41 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
set_config("MOZ_BUNDLED_FONTS", bundled_fonts)
|
|
|
|
add_old_configure_assignment("MOZ_BUNDLED_FONTS", bundled_fonts)
|
|
|
|
|
|
|
|
|
2021-12-24 13:49:27 +03:00
|
|
|
@depends(build_environment, "--help")
|
2018-10-10 21:36:41 +03:00
|
|
|
def comm_paths(build_env, _):
|
|
|
|
topsrcdir = build_env.topsrcdir
|
|
|
|
topobjdir = build_env.topobjdir
|
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
moztopsrcdir = topsrcdir
|
|
|
|
commtopsrcdir = "%s/comm" % topsrcdir
|
|
|
|
mozreltopsrcdir = "."
|
|
|
|
commreltopsrcdir = "comm"
|
|
|
|
commtopobjdir = "%s/comm" % topobjdir
|
|
|
|
|
|
|
|
return namespace(
|
|
|
|
moztopsrcdir=moztopsrcdir,
|
|
|
|
commtopsrcdir=commtopsrcdir,
|
|
|
|
mozreltopsrcdir=mozreltopsrcdir,
|
|
|
|
commreltopsrcdir=commreltopsrcdir,
|
|
|
|
commtopobjdir=commtopobjdir,
|
|
|
|
)
|
2016-05-13 19:35:56 +03:00
|
|
|
|
2017-10-17 22:33:35 +03:00
|
|
|
|
2018-10-10 21:36:41 +03:00
|
|
|
@template
|
2020-10-30 21:28:33 +03:00
|
|
|
def set_defconf(k, v):
|
|
|
|
set_config(k, v)
|
|
|
|
set_define(k, v)
|
|
|
|
add_old_configure_assignment(k, v)
|
2017-10-17 22:33:35 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
|
|
|
|
set_defconf("moztopsrcdir", comm_paths.moztopsrcdir)
|
|
|
|
set_defconf("commtopsrcdir", comm_paths.commtopsrcdir)
|
|
|
|
set_defconf("mozreltopsrcdir", comm_paths.mozreltopsrcdir)
|
|
|
|
set_defconf("commreltopsrcdir", comm_paths.commreltopsrcdir)
|
|
|
|
set_defconf("commtopobjdir", comm_paths.commtopobjdir)
|
2017-11-18 20:24:42 +03:00
|
|
|
|
2017-10-17 22:33:35 +03:00
|
|
|
|
2021-12-24 13:49:27 +03:00
|
|
|
@depends(build_environment, application)
|
2020-10-30 21:28:33 +03:00
|
|
|
@imports(_from="os.path", _import="exists")
|
|
|
|
@imports(_from="__builtin__", _import="open")
|
2018-10-10 21:36:41 +03:00
|
|
|
def thunderbird_version(build_env, app_path):
|
2020-10-30 21:28:33 +03:00
|
|
|
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"
|
|
|
|
)
|
2018-10-10 21:36:41 +03:00
|
|
|
rv = []
|
2020-10-30 21:28:33 +03:00
|
|
|
for f in [version_file, version_file_display]:
|
2018-10-10 21:36:41 +03:00
|
|
|
if exists(f):
|
|
|
|
f_value = open(f).read().strip()
|
|
|
|
else:
|
2020-10-30 21:28:33 +03:00
|
|
|
f_value = "unknown"
|
2018-10-10 21:36:41 +03:00
|
|
|
rv.append(f_value)
|
2017-11-18 20:24:42 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
return namespace(version=rv[0], version_display=rv[1])
|
|
|
|
|
2017-10-17 22:33:35 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
set_defconf("THUNDERBIRD_VERSION", thunderbird_version.version)
|
|
|
|
set_defconf("THUNDERBIRD_VERSION_DISPLAY", thunderbird_version.version_display)
|
2018-10-10 21:36:41 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
set_define("MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES", True)
|
2018-10-10 21:36:41 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
imply_option("MOZ_PLACES", True)
|
|
|
|
imply_option("MOZ_SERVICES_HEALTHREPORT", True)
|
|
|
|
imply_option("MOZ_DEDICATED_PROFILES", True)
|
|
|
|
imply_option("MOZ_BLOCK_PROFILE_DOWNGRADE", True)
|
2017-11-18 20:24:42 +03:00
|
|
|
|
2019-04-19 20:11:50 +03:00
|
|
|
with only_when(target_is_linux & compile_environment):
|
2020-10-30 21:28:33 +03:00
|
|
|
option(env="MOZ_NO_PIE_COMPAT", help="Enable non-PIE wrapper")
|
2019-04-19 20:11:50 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
set_config("MOZ_NO_PIE_COMPAT", depends_if("MOZ_NO_PIE_COMPAT")(lambda _: True))
|
2019-04-19 20:11:50 +03:00
|
|
|
|
2020-01-24 01:20:44 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
@depends("MOZ_AUTOMATION")
|
|
|
|
@imports(_from="os", _import="environ")
|
2020-01-24 01:20:44 +03:00
|
|
|
def pkg_libotr(automation):
|
|
|
|
if automation:
|
2020-10-30 21:28:33 +03:00
|
|
|
fetch_dir = environ.get("MOZ_FETCHES_DIR", None)
|
2020-01-24 01:20:44 +03:00
|
|
|
if fetch_dir:
|
2020-10-30 21:28:33 +03:00
|
|
|
log.info("Including libotr from {}".format(fetch_dir))
|
2022-05-02 13:30:35 +03:00
|
|
|
return fetch_dir
|
2020-01-24 01:20:44 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
log.info("TB_LIBOTR_PREBUILT is set, but MOZ_FETCHES_DIR is invalid.")
|
|
|
|
|
2020-01-24 01:20:44 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
set_config("TB_LIBOTR_PREBUILT", pkg_libotr)
|
2020-01-24 01:20:44 +03:00
|
|
|
|
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
set_config(
|
|
|
|
"MOZ_TELEMETRY_EXTRA_HISTOGRAM_FILES",
|
|
|
|
["/comm/mail/components/telemetry/Histograms.json"],
|
|
|
|
)
|
|
|
|
set_config(
|
|
|
|
"MOZ_TELEMETRY_EXTRA_SCALAR_FILES", ["/comm/mail/components/telemetry/Scalars.yaml"]
|
|
|
|
)
|
|
|
|
set_config(
|
|
|
|
"MOZ_TELEMETRY_EXTRA_EVENT_FILES", ["/comm/mail/components/telemetry/Events.yaml"]
|
|
|
|
)
|
2019-09-23 00:16:13 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
include("../build/moz.configure/gecko_source.configure")
|
Bug 1507754 - Check source repositories and changesets during configure. r=darktrojan
PACKAGERS: if you update application.ini, platform.ini, or source-repo.h
in some way during your process, you might need to change something.
Make sure that the source repositories for both Mozilla and Comm can be found
during mach configure and abort if they cannot.
For Taskcluster builds, there are various environment variables that can be
relied upon.
Local builds present a challenge. Chances are those variables are not set.
I came up with a set of checks and keep trying until something works.
For comm-* code:
- Look for MOZ_SOURCE_REPO and MOZ_SOURCE_CHANGESET environment vars. This
is counter-intuitive, but it's the current status-quo for Taskcluster
builds. Those variables are set to the comm values.
- Next, try use the Mercurial source checkout itself. Uses the same technique
as Mozilla code does in build/variables.py.
- Last, try to use a file named "sourcestamp.txt". That file is part of
our source tar files that get built for releases.
- Finally, if those MOZ_SOURCE environment variables were not set, set them.
This is needed because old-configure will look for them and set buildconfig
variables with them when it runs later during the configure process.
- Additionally, set MOZ_COMM_SOURCE_REPO and MOZ_COMM_SOURCE_CHANGESET in
buildconfig. Code in the comm- tree should prefer those values over the
generic MOZ_SOURCE_* values that the Mozilla code will look at.
For the Gecko/Mozilla source repository information, it's almost the same
process.
- Check for GECKO_SOURCE_REPO and GECKO_SOURCE_REV environment variables first.
Taskcluster sets these based on comm/.gecko_rev.yml.
- Next, try comm/.gecko_rev.yml itself. PyYAML is not required as the file is
pretty simple to parse. Release builds are pinned to a specific revision hash,
so we can use that. Builds from comm-central pin to "default" though, so
next try running "hg id" in $topsrcdir to get the revision hash.
- If for some reason there's no .gecko_rev.yml and it's not a Mercurial checkout,
try the sourcestamp.txt file.
- Set MOZ_GECKO_SOURCE_REPO and MOZ_GECKO_SOURCE_CHANGESET in buildconfig.
mach configure should fail if any one of those values cannot be determined.
The error message will suggest setting the environment variables; ideally
that is not necessary.
--HG--
extra : rebase_source : 0f17f25956c679f63b775b15d5a0f0726bb659cb
2019-08-27 04:20:54 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
include("../mailnews/moz.configure")
|
2019-09-14 01:52:41 +03:00
|
|
|
|
2020-10-30 21:28:33 +03:00
|
|
|
imply_option("--enable-app-system-headers", True)
|
|
|
|
include("../../toolkit/moz.configure")
|