From dc14f738823e6f59d2f2243d81dc7582fb56ba58 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 1 Oct 2018 14:51:28 -0400 Subject: [PATCH] Bug 1491419 - move --enable-bundled-fonts to moz.configure; r=nalexander --- browser/confvars.sh | 5 ----- build/moz.configure/old.configure | 1 - old-configure.in | 13 ------------- toolkit/moz.configure | 18 ++++++++++++++++++ 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/browser/confvars.sh b/browser/confvars.sh index c8d734355f70..571041cf8db2 100755 --- a/browser/confvars.sh +++ b/browser/confvars.sh @@ -8,11 +8,6 @@ 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 \ diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index af907539fa81..da6a613f9e34 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -170,7 +170,6 @@ def old_configure_options(*options): '--cache-file', '--datadir', '--enable-accessibility', - '--enable-bundled-fonts', '--enable-content-sandbox', '--enable-cookies', '--enable-cpp-rtti', diff --git a/old-configure.in b/old-configure.in index 9bc2c2a3e1c0..6c718e23e3bf 100644 --- a/old-configure.in +++ b/old-configure.in @@ -3002,19 +3002,6 @@ 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 ======================================================== diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 8efff6b7007f..b82d63710862 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -1097,3 +1097,21 @@ set_define('MOZ_MAINTENANCE_SERVICE', 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))