Bug 1491419 - move --enable-bundled-fonts to moz.configure; r=nalexander
authorNathan Froyd <froydnj@mozilla.com>
Mon, 01 Oct 2018 14:51:28 -0400
changeset 494742 61ab6941b46309f804ae444b42b2f705d44142d4
parent 494741 2a985dd40eba10801b2da141d1e8966b2ec060a5
child 494743 4a6d50bdd4918c60974a18276122ae9ac39c4c4e
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1491419
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1491419 - move --enable-bundled-fonts to moz.configure; r=nalexander
browser/confvars.sh
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -3,21 +3,16 @@
 # 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/.
 
 MOZ_APP_BASENAME=Firefox
 MOZ_APP_VENDOR=Mozilla
 MOZ_UPDATER=1
 MOZ_PHOENIX=1
 
-if test "$OS_ARCH" = "WINNT" -o \
-        "$OS_ARCH" = "Linux"; then
-  MOZ_BUNDLED_FONTS=1
-fi
-
 if test "$OS_ARCH" = "WINNT"; then
   if ! test "$HAVE_64BIT_BUILD"; then
     if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
             "$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \
             "$MOZ_UPDATE_CHANNEL" = "aurora" -o \
             "$MOZ_UPDATE_CHANNEL" = "beta" -o \
             "$MOZ_UPDATE_CHANNEL" = "release"; then
       if ! test "$MOZ_DEBUG"; then
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -165,17 +165,16 @@ def old_configure_options(*options):
     return depends(prepare_configure, extra_old_configure_args, all_options,
                    *options)
 
 
 @old_configure_options(
     '--cache-file',
     '--datadir',
     '--enable-accessibility',
-    '--enable-bundled-fonts',
     '--enable-content-sandbox',
     '--enable-cookies',
     '--enable-cpp-rtti',
     '--enable-crashreporter',
     '--enable-dbus',
     '--enable-debug-js-modules',
     '--enable-directshow',
     '--enable-dtrace',
--- a/old-configure.in
+++ b/old-configure.in
@@ -2998,29 +2998,16 @@ if test -n "$MOZ_TREE_FREETYPE" -a "$OS_
    CAIRO_FT_CFLAGS="-I$_topsrcdir/modules/freetype2/include"
    AC_SUBST_LIST(CAIRO_FT_CFLAGS)
 fi
 
 AC_CHECK_PROGS(WGET, wget, "")
 AC_SUBST(WGET)
 
 dnl ========================================================
-dnl Bundled fonts on desktop platforms
-dnl ========================================================
-
-MOZ_ARG_ENABLE_BOOL(bundled-fonts,
-[  --enable-bundled-fonts  Enable support for bundled fonts on desktop platforms],
-    MOZ_BUNDLED_FONTS=1,
-    MOZ_BUNDLED_FONTS=)
-
-if test -n "$MOZ_BUNDLED_FONTS"; then
-  AC_DEFINE(MOZ_BUNDLED_FONTS)
-fi
-
-dnl ========================================================
 dnl Verify MAR signatures
 dnl ========================================================
 
 MOZ_ARG_ENABLE_BOOL(verify-mar,
 [  --enable-verify-mar     Enable verifying MAR signatures],
     MOZ_VERIFY_MAR_SIGNATURE=1,
     MOZ_VERIFY_MAR_SIGNATURE= )
 
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -1092,8 +1092,26 @@ option('--enable-maintenance-service', h
        when=target_is_windows, default=target_is_windows)
 
 set_define('MOZ_MAINTENANCE_SERVICE',
            depends_if('--enable-maintenance-service',
                       when=target_is_windows)(lambda _: True))
 set_config('MOZ_MAINTENANCE_SERVICE',
            depends_if('--enable-maintenance-service',
                       when=target_is_windows)(lambda _: True))
+
+# Bundled fonts on desktop platform
+# ==============================================================
+
+@depends(target)
+def bundled_fonts_default(target):
+    return target.os == 'WINNT' or target.kernel == 'Linux'
+
+@depends(build_project)
+def allow_bundled_fonts(project):
+    return project == 'browser'
+
+option('--enable-bundled-fonts', default=bundled_fonts_default,
+       when=allow_bundled_fonts,
+       help='Enable support for bundled fonts on desktop platforms')
+
+set_define('MOZ_BUNDLED_FONTS',
+           depends_if('--enable-bundled-fonts', when=allow_bundled_fonts)(lambda _: True))