Bug 1500747 - Allow overriding extension building defaults in SeaMonkey via mozconfig. r=ewong
authorBill Gianopoulos <wgianopoulos@gmail.com>
Wed, 17 Oct 2018 17:47:59 -0400
changeset 33595 b44fb89ce5da72077d5d0ebf5ef12efcd9945a5f
parent 33594 67c6b0c3b93485a66f66cec7282f56532de83d3f
child 33596 2393af223e83121fc707dfbb852d91da48c04ca5
push id388
push userclokep@gmail.com
push dateMon, 28 Jan 2019 20:54:56 +0000
reviewersewong
bugs1500747
Bug 1500747 - Allow overriding extension building defaults in SeaMonkey via mozconfig. r=ewong
suite/app.mozbuild
suite/configure.in
suite/confvars.sh
suite/moz.configure
--- a/suite/app.mozbuild
+++ b/suite/app.mozbuild
@@ -5,16 +5,22 @@
 
 include('/comm/mailnews/mailnews.mozbuild')
 
 include('/toolkit/toolkit.mozbuild')
 
 if CONFIG['MOZ_EXTENSIONS']:
     DIRS += ['/extensions']
 
+if CONFIG['MOZ_IRC']:
+    DIRS += ['/extensions/irc']
+
+if CONFIG['MOZ_DOMINSPECTOR']:
+    DIRS += ['/extensions/inspector']
+
 DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']]
 
 if CONFIG['MOZ_CALENDAR']:
     DIRS += [
         '/comm/calendar/lightning',
         '/comm/calendar/timezones',
     ]
 
--- a/suite/configure.in
+++ b/suite/configure.in
@@ -2,18 +2,15 @@ dnl -*- Mode: Autoconf; tab-width: 2; in
 dnl vi: set tabstop=2 shiftwidth=2 expandtab:
 dnl This Source Code Form is subject to the terms of the Mozilla Public
 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 dnl Things we need to carry from confvars.sh
 AC_SUBST(SEAMONKEY_VERSION)
 AC_SUBST(MOZ_BUNDLED_FONTS)
-AC_SUBST(MOZ_IRC)
-AC_SUBST(MOZ_DOMINSPECTOR)
-AC_SUBST(MOZ_DEBUGQA)
 
 dnl More things we need to carry from confvars.sh
 AC_SUBST(moztopsrcdir)
 AC_SUBST(commtopsrcdir)
 AC_SUBST(mozreltopsrcdir)
 AC_SUBST(commreltopsrcdir)
 AC_SUBST(commtopobjdir)
--- a/suite/confvars.sh
+++ b/suite/confvars.sh
@@ -43,23 +43,8 @@ fi
 if test "$OS_ARCH" = "WINNT" -o \
         "$OS_ARCH" = "Linux"; then
   MOZ_BUNDLED_FONTS=1
 fi
 
 # Include the DevTools client, not just the server (which is the default)
 MOZ_DEVTOOLS=all
 
-# Bundled extensions ChatZilla DOM Inspector and debugQA
-MOZ_IRC=
-MOZ_DOMINSPECTOR=
-
-if [[ $MOZ_APP_VERSION == *a* ]]; then
-  MOZ_DEBUGQA=
-fi
-
-if [[ $MOZ_IRC == 1 ]]; then
-  MOZ_EXTENSIONS_DEFAULT='irc'
-fi
-
-if [[ $MOZ_DOMINSPECTOR == 1 ]]; then
-  MOZ_EXTENSIONS_DEFAULT+=' inspector'
-fi
--- a/suite/moz.configure
+++ b/suite/moz.configure
@@ -21,11 +21,50 @@ def is_comm(app):
 
 @depends(is_comm)
 def toolkit_configure(is_comm):
     if is_comm:
         return '../../toolkit/moz.configure'
     else:
         return '../mozilla/toolkit/moz.configure'
 
+# Building extensions is disabled by default.
+# Bug 1231349 needs to be fixed first for l10n builds.
+# Set desired defaults to True from False when the l10n bug is fixed.
+
+# =========================================================
+# = 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)
+
+# =========================================================
+# = DOM Inspector extension
+# =========================================================
+option('--enable-dominspector', default=False,
+       help='Enable building of the DOM Inspector extension')
+
+@depends_if('--enable-dominspector')
+def dominspector(arg):
+    return True
+
+set_config('MOZ_DOMINSPECTOR', dominspector)
+
+# =========================================================
+# = 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)
 
 include('../mailnews/moz.configure')
 include(toolkit_configure)