Bug 1612190 - Remove MOZ_CALENDAR build config flag and related code. r=darktrojan,BenB a=mkmelin
authorPaul Morris <paul@thunderbird.net>
Tue, 11 Feb 2020 11:34:43 -0500
changeset 38167 498037e1ef0f9f987c98f879fc430c1ad42c1734
parent 38166 35335f53d59d9512e0d177da2633f81f37793e63
child 38168 d21a540ff744421e3acb19f2cf27d48534a8c0a6
push id398
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:10:28 +0000
reviewersdarktrojan, BenB, mkmelin
bugs1612190
Bug 1612190 - Remove MOZ_CALENDAR build config flag and related code. r=darktrojan,BenB a=mkmelin Thanks to BenB for the --enable-calender deprecation code in mailnews/moz.configure.
README.md
calendar/moz.build
common/src/moz.build
common/src/nsCommonModule.cpp
mail/app.mozbuild
mail/config/mozconfigs/common
mail/installer/Makefile.in
mail/installer/package-manifest.in
mail/locales/Makefile.in
mailnews/moz.configure
--- a/README.md
+++ b/README.md
@@ -36,24 +36,16 @@ echo 'ac_add_options --enable-applicatio
 ```text
 ac_add_options --enable-debug
 ```
 
 _Each of these ac\_add\_options entries needs to be on its own line._
 
 For more on configuration options, see the page [Configuring build options](https://developer.mozilla.org/en/Configuring_Build_Options). Note that if you use an MOZ\_OBJDIR it cannot be a sibling folder to the root source directory. Use an absolute path to be sure!
 
-### Build the Lightning Calendar when building Thunderbird
-
-Add the following line to your `mozconfig` file:
-
-```text
-ac_add_options --enable-calendar
-```
-
 ### Building
 
 **Before you start**, make sure that the version you checked out is not busted. For `hg` tip, you should see green Bs on [https://treeherder.mozilla.org/\#/jobs?repo=comm-central](https://treeherder.mozilla.org/#/jobs?repo=comm-central)
 
 To start the build, cd into the root source directory, and run:
 
 ```text
 ./mach build
--- a/calendar/moz.build
+++ b/calendar/moz.build
@@ -1,19 +1,18 @@
 # 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/.
 
 CONFIGURE_SUBST_FILES += ['installer/Makefile']
 
-if CONFIG['MOZ_CALENDAR']:
-    DIRS += [
-        'lightning',
-    ]
+DIRS += [
+    'lightning',
+]
 
 TEST_DIRS += ['test']
 
 with Files('**'):
     BUG_COMPONENT = ('Calendar', 'General')
 
 with Files('**/moz.build'):
     BUG_COMPONENT = ('Calendar', 'Build Config')
--- a/common/src/moz.build
+++ b/common/src/moz.build
@@ -27,11 +27,8 @@ else:
         'nsUserInfoUnix.cpp',
     ]
 
 LOCAL_INCLUDES += [
     '/%s/netwerk/base' % CONFIG['mozreltopsrcdir']
 ]
 
 FINAL_LIBRARY = 'xul'
-
-if CONFIG['MOZ_CALENDAR']:
-    DEFINES['MOZ_CALENDAR'] = True
--- a/common/src/nsCommonModule.cpp
+++ b/common/src/nsCommonModule.cpp
@@ -70,19 +70,17 @@ const mozilla::Module::ContractIDEntry k
 static const mozilla::Module kCommonModule = {mozilla::Module::kVersion,
                                               kCommonCIDs,
                                               kCommonContracts,
                                               nullptr,
                                               nullptr,
                                               nullptr,
                                               nullptr};
 
-#ifdef MOZ_CALENDAR
 extern const mozilla::Module kCalBaseModule;
-#endif
 extern const mozilla::Module kMorkModule;
 #ifdef MOZ_LDAP_XPCOM
 extern const mozilla::Module kLDAPProtocolModule;
 #endif
 #ifdef MOZ_THUNDERBIRD
 extern const mozilla::Module kMailCompsModule;
 #endif
 extern const mozilla::Module kMailNewsModule;
@@ -93,19 +91,17 @@ extern const mozilla::Module kMAPIModule
 #ifdef MOZ_SUITE
 extern const mozilla::Module kSuiteModule;
 #endif
 
 class ModulesInit {
  public:
   ModulesInit() {
     XRE_AddStaticComponent(&kCommonModule);
-#ifdef MOZ_CALENDAR
     XRE_AddStaticComponent(&kCalBaseModule);
-#endif
     XRE_AddStaticComponent(&kMorkModule);
 #ifdef MOZ_LDAP_XPCOM
     XRE_AddStaticComponent(&kLDAPProtocolModule);
 #endif
 #ifdef MOZ_THUNDERBIRD
     XRE_AddStaticComponent(&kMailCompsModule);
 #endif
     XRE_AddStaticComponent(&kMailNewsModule);
--- a/mail/app.mozbuild
+++ b/mail/app.mozbuild
@@ -12,18 +12,14 @@ include('../mailnews/mailnews.mozbuild')
 
 DIRS += ['/%s/mail/components' % CONFIG['commreltopsrcdir']]
 
 include('/%s/toolkit/toolkit.mozbuild' % CONFIG['mozreltopsrcdir'])
 
 if CONFIG['MOZ_EXTENSIONS']:
     DIRS += ['/%s/extensions' % CONFIG['mozreltopsrcdir']]
 
-DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']]
-
-
-if CONFIG['MOZ_CALENDAR']:
-    DIRS += ['/%s/calendar/lightning' % CONFIG['commreltopsrcdir']]
-
 DIRS += [
+    '/%s' % CONFIG['MOZ_BRANDING_DIRECTORY'],
+    '/%s/calendar/lightning' % CONFIG['commreltopsrcdir'],
     '/%s/chat' % CONFIG['commreltopsrcdir'],
     '/%s/mail' % CONFIG['commreltopsrcdir'],
 ]
--- a/mail/config/mozconfigs/common
+++ b/mail/config/mozconfigs/common
@@ -1,7 +1,6 @@
 ac_add_options --enable-application=comm/mail
-ac_add_options --enable-calendar
 
 # Disable enforcing that add-ons are signed by the trusted root.
 MOZ_REQUIRE_SIGNING=0
 
 . "$topsrcdir/build/mozconfig.common.override"
--- a/mail/installer/Makefile.in
+++ b/mail/installer/Makefile.in
@@ -39,20 +39,16 @@ MOZ_NONLOCALIZED_PKG_LIST = \
 MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
 
 DEFINES += -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
 
 ifdef NIGHTLY_BUILD
 DEFINES += -DNIGHTLY_BUILD=1
 endif
 
-ifdef MOZ_CALENDAR
-DEFINES += -DMOZ_CALENDAR=1
-endif
-
 ifdef MOZ_DEBUG
 DEFINES += -DMOZ_DEBUG=1
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk)
 DEFINES += -DMOZ_GTK=1
 endif
 
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -300,17 +300,16 @@
 @RESPATH@/components/extensions.manifest
 #ifdef MOZ_UPDATER
 @RESPATH@/components/nsUpdateService.manifest
 #endif
 @RESPATH@/components/ProcessSingleton.manifest
 @RESPATH@/components/HandlerService.manifest
 @RESPATH@/components/HandlerService.js
 
-#ifdef MOZ_CALENDAR
 [calendar]
 @RESPATH@/chrome/calendar@JAREXT@
 @RESPATH@/chrome/calendar.manifest
 @RESPATH@/chrome/lightning@JAREXT@
 @RESPATH@/chrome/lightning.manifest
 
 @RESPATH@/res/zones.json
 @RESPATH@/@PREF_DIR@/lightning.js
@@ -381,17 +380,16 @@
 @RESPATH@/components/calRecurrenceRule.js
 @RESPATH@/components/calRelation.js
 @RESPATH@/components/calStartupService.js
 @RESPATH@/components/calTimezone.js
 @RESPATH@/components/calTodo.js
 @RESPATH@/components/calTransactionManager.js
 @RESPATH@/components/calWeekInfoService.js
 @RESPATH@/components/calWeekPrinter.js
-#endif
 
 @RESPATH@/features/wetransfer@extensions.thunderbird.net/
 
 @RESPATH@/components/servicesComponents.manifest
 @RESPATH@/components/servicesSettings.manifest
 @RESPATH@/components/cryptoComponents.manifest
 @RESPATH@/components/Push.manifest
 
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -70,19 +70,17 @@ libs-%:
 # merge if we're not en-US. Conditional function because
 # we need the current value of AB_CD.
 	$(if $(filter en-US,$(AB_CD)),, @$(MAKE) merge-$*)
 	$(NSINSTALL) -D $(DIST)/install
 	@$(MAKE) -C $(DEPTH)/toolkit/locales libs-$*  XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C $(DEPTH)/devtools/client/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C $(DEPTH)/devtools/startup/locales AB_CD=$* XPI_NAME=locale-$* XPI_ROOT_APPID='$(XPI_ROOT_APPID)'
 	@$(MAKE) -C ../../chat/locales AB_CD=$* XPI_NAME=locale-$*
-ifdef MOZ_CALENDAR
 	@$(MAKE) -C ../../calendar/locales AB_CD=$* XPI_NAME=locale-$*
-endif
 	@$(MAKE) -C $(DEPTH)/extensions/spellcheck/locales AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref
 	@$(MAKE) multilocale.txt-$* AB_CD=$* XPI_NAME=locale-$*
 	@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$*
 
 
 package-win32-installer: $(SUBMAKEFILES)
 	$(MAKE) -C ../installer/windows CONFIG_DIR=l10ngen ZIP_IN='$(ZIP_OUT)' installer
--- a/mailnews/moz.configure
+++ b/mailnews/moz.configure
@@ -1,33 +1,14 @@
 # -*- 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/.
 
-
-# =========================================================
-# = Lightning extension
-# =========================================================
-@depends(application)
-def calendar_default(app):
-    return app[0].endswith('/suite')
-
-option('--enable-calendar', default=calendar_default,
-       help='Enable building of the Lightning calendar extension')
-
-
-@depends_if('--enable-calendar')
-def calendar(arg):
-    return True
-
-
-set_config('MOZ_CALENDAR', calendar)
-
 # =========================================================
 # = LDAP
 # =========================================================
 option('--disable-ldap',
        help='Disable LDAP support')
 
 
 @depends_if('--enable-ldap')
@@ -70,8 +51,17 @@ def openpgp(arg):
 
 
 set_config('MOZ_OPENPGP', openpgp)
 set_define('MOZ_OPENPGP', openpgp)
 
 
 set_config('MOZ_MOVEMAIL', target_is_unix)
 set_define('HAVE_MOVEMAIL', target_is_unix)
+
+
+option('--enable-calendar', default=False,
+       help='Deprecated. Please remove it from your mozconfig.')
+
+
+@depends_if('--enable-calendar')
+def calendar_deprecated(arg):
+    return True