Bug 906002 Don't build S/Mime as a separate component r=jcranmer
authorNeil Rashbrook <neil@parkwaycc.co.uk>
Sun, 18 Aug 2013 00:13:38 +0100
changeset 16405 d13e87b882054c4bd7f2dcfc75723408bb822c49
parent 16404 118b12c0499fc6d6d7c324c8ec14a96906f47788
child 16406 228d8e28581b5eb089d596094e094c31bc94b3dc
push idunknown
push userunknown
push dateunknown
reviewersjcranmer
bugs906002
Bug 906002 Don't build S/Mime as a separate component r=jcranmer a=Callek for checkin to a CLOSED TREE
mail/confvars.sh
mailnews/build/Makefile.in
mailnews/build/nsMailModule.cpp
mailnews/extensions/smime/build/Makefile.in
mailnews/extensions/smime/build/moz.build
mailnews/extensions/smime/build/nsMsgSMIMEFactory.cpp
mailnews/extensions/smime/moz.build
mailnews/import/build/Makefile.in
suite/confvars.sh
--- a/mail/confvars.sh
+++ b/mail/confvars.sh
@@ -22,18 +22,18 @@ fi
 # Disable Accessibility on Mac for now as unit tests fail (bug 862238).
 if test "$OS_ARCH" = "Darwin"; then
   ACCESSIBILITY=
 fi
 
 MOZ_SAFE_BROWSING=1
 MOZ_MEDIA_NAVIGATOR=1
 MOZ_MORK=1
-MAIL_COMPONENT="mail msgsmime import"
-MAIL_MODULE="MODULE(nsMailModule) MODULE(nsMsgSMIMEModule) MODULE(nsImportServiceModule)"
+MAIL_COMPONENT="mail import"
+MAIL_MODULE="MODULE(nsMailModule) MODULE(nsImportServiceModule)"
 if test -n "$MOZ_MAPI_SUPPORT"; then
   MAIL_COMPONENT="$MAIL_COMPONENT msgMapi"
   MAIL_MODULE="$MAIL_MODULE MODULE(msgMapiModule)"
 fi
 
 MOZ_APP_VERSION_TXT=${_topsrcdir}/$MOZ_BUILD_APP/config/version.txt
 MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TXT`
 THUNDERBIRD_VERSION=$MOZ_APP_VERSION
--- a/mailnews/build/Makefile.in
+++ b/mailnews/build/Makefile.in
@@ -40,16 +40,17 @@ SHARED_LIBRARY_LIBS = \
 	        ../addrbook/src/$(LIB_PREFIX)addrbook_s.$(LIB_SUFFIX) \
 	        ../news/src/$(LIB_PREFIX)msgnews_s.$(LIB_SUFFIX) \
 	        ../mime/src/$(LIB_PREFIX)mime_s.$(LIB_SUFFIX) \
 	        ../mime/emitters/$(LIB_PREFIX)emitterutil_s.$(LIB_SUFFIX) \
 	        ../extensions/bayesian-spam-filter/src/$(LIB_PREFIX)bayesflt_s.$(LIB_SUFFIX) \
 	        ../extensions/fts3/src/$(LIB_PREFIX)fts3tok_s.$(LIB_SUFFIX) \
 	        ../extensions/mailviews/src/$(LIB_PREFIX)mailview_s.$(LIB_SUFFIX) \
                 ../extensions/mdn/src/$(LIB_PREFIX)msgmdn_s.$(LIB_SUFFIX) \
+                ../extensions/smime/src/$(LIB_PREFIX)msgsmime_s.$(LIB_SUFFIX) \
                 ../mime/cthandlers/vcard/$(LIB_PREFIX)vcard_s.$(LIB_SUFFIX) \
                 ../mime/cthandlers/glue/$(LIB_PREFIX)mimecthglue_s.$(LIB_SUFFIX) \
                 ../mime/cthandlers/pgpmime/$(LIB_PREFIX)pgpmime_s.$(LIB_SUFFIX) \
                 $(NULL)
 
 ifdef MOZILLA_INTERNAL_API
 EXTRA_DSO_LDOPTS = \
 		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
@@ -92,15 +93,16 @@ LOCAL_INCLUDES = -I$(srcdir) \
                  -I$(srcdir)/../base/search/src \
                  -I$(srcdir)/../mime/src \
                  -I$(srcdir)/../mime/emitters \
                  -I$(srcdir)/../news/src \
                  -I$(srcdir)/../extensions/bayesian-spam-filter/src \
                  -I$(srcdir)/../extensions/fts3/src \
                  -I$(srcdir)/../extensions/mailviews/src \
                  -I$(srcdir)/../extensions/mdn/src \
+                 -I$(srcdir)/../extensions/smime/src \
                  $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS	+= $(call EXPAND_LIBNAME,shell32)
 endif
--- a/mailnews/build/nsMailModule.cpp
+++ b/mailnews/build/nsMailModule.cpp
@@ -274,16 +274,24 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 // mdn includes
 ///////////////////////////////////////////////////////////////////////////////
 #include "nsMsgMdnCID.h"
 #include "nsMsgMdnGenerator.h"
 
 ///////////////////////////////////////////////////////////////////////////////
+// smime includes
+///////////////////////////////////////////////////////////////////////////////
+#include "nsMsgSMIMECID.h"
+#include "nsMsgComposeSecure.h"
+#include "nsSMimeJSHelper.h"
+#include "nsEncryptedSMIMEURIsService.h"
+
+///////////////////////////////////////////////////////////////////////////////
 // vcard includes
 ///////////////////////////////////////////////////////////////////////////////
 #include "nsMimeContentTypeHandler.h"
 
 ///////////////////////////////////////////////////////////////////////////////
 // FTS3 Tokenizer
 ///////////////////////////////////////////////////////////////////////////////
 #include "nsFts3TokenizerCID.h"
@@ -717,16 +725,29 @@ NS_DEFINE_NAMED_CID(NS_MSGMAILVIEWLIST_C
 ////////////////////////////////////////////////////////////////////////////////
 // mdn factories
 ////////////////////////////////////////////////////////////////////////////////
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgMdnGenerator)
 
 NS_DEFINE_NAMED_CID(NS_MSGMDNGENERATOR_CID);
 
 ////////////////////////////////////////////////////////////////////////////////
+// smime factories
+////////////////////////////////////////////////////////////////////////////////
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgComposeSecure)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSMIMEComposeFields)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsSMimeJSHelper)
+NS_GENERIC_FACTORY_CONSTRUCTOR(nsEncryptedSMIMEURIsService)
+
+NS_DEFINE_NAMED_CID(NS_MSGCOMPOSESECURE_CID);
+NS_DEFINE_NAMED_CID(NS_MSGSMIMECOMPFIELDS_CID);
+NS_DEFINE_NAMED_CID(NS_SMIMEJSJELPER_CID);
+NS_DEFINE_NAMED_CID(NS_SMIMEENCRYPTURISERVICE_CID);
+
+////////////////////////////////////////////////////////////////////////////////
 // vcard factories
 ////////////////////////////////////////////////////////////////////////////////
 
 NS_DEFINE_NAMED_CID(NS_VCARD_CONTENT_TYPE_HANDLER_CID);
 
 // XXX this vcard stuff needs cleaned up to use a generic factory constructor
 extern "C" MimeObjectClass *
 MIME_VCardCreateContentTypeHandlerClass(const char *content_type,
@@ -980,16 +1001,21 @@ const mozilla::Module::CIDEntry kMailNew
   { &kNS_NNTPNEWSGROUPPOST_CID, false, NULL, nsNNTPNewsgroupPostConstructor },
   { &kNS_NNTPNEWSGROUPLIST_CID, false, NULL, nsNNTPNewsgroupListConstructor },
   { &kNS_NNTPARTICLELIST_CID, false, NULL, nsNNTPArticleListConstructor },
   { &kNS_NEWSDOWNLOADDIALOGARGS_CID, false, NULL, nsNewsDownloadDialogArgsConstructor },
   // Mail View Entries
   { &kNS_MSGMAILVIEWLIST_CID, false, NULL, nsMsgMailViewListConstructor },
   // mdn Entries
   { &kNS_MSGMDNGENERATOR_CID, false, NULL, nsMsgMdnGeneratorConstructor },
+  // SMime Entries
+  { &kNS_MSGCOMPOSESECURE_CID, false, NULL, nsMsgComposeSecureConstructor },
+  { &kNS_MSGSMIMECOMPFIELDS_CID, false, NULL, nsMsgSMIMEComposeFieldsConstructor },
+  { &kNS_SMIMEJSJELPER_CID, false, NULL, nsSMimeJSHelperConstructor },
+  { &kNS_SMIMEENCRYPTURISERVICE_CID, false, NULL, nsEncryptedSMIMEURIsServiceConstructor },
   // Vcard Entries
   { &kNS_VCARD_CONTENT_TYPE_HANDLER_CID, false, NULL, nsVCardMimeContentTypeHandlerConstructor},
   // PGP/MIME Entries
   { &kNS_PGPMIME_CONTENT_TYPE_HANDLER_CID, false, NULL, nsPgpMimeMimeContentTypeHandlerConstructor },
   { &kNS_PGPMIMEPROXY_CID, false, NULL, nsPgpMimeProxyConstructor },
   // Tokenizer Entries
   { NULL }
 };
@@ -1208,16 +1234,21 @@ const mozilla::Module::ContractIDEntry k
   { NS_NNTPNEWSGROUPPOST_CONTRACTID, &kNS_NNTPNEWSGROUPPOST_CID },
   { NS_NNTPNEWSGROUPLIST_CONTRACTID, &kNS_NNTPNEWSGROUPLIST_CID },
   { NS_NNTPARTICLELIST_CONTRACTID, &kNS_NNTPARTICLELIST_CID },
   { NS_NEWSDOWNLOADDIALOGARGS_CONTRACTID, &kNS_NEWSDOWNLOADDIALOGARGS_CID },
   // Mail View Entries
   { NS_MSGMAILVIEWLIST_CONTRACTID, &kNS_MSGMAILVIEWLIST_CID },
   // mdn Entries
   { NS_MSGMDNGENERATOR_CONTRACTID, &kNS_MSGMDNGENERATOR_CID },
+  // SMime Entries
+  { NS_MSGCOMPOSESECURE_CONTRACTID, &kNS_MSGCOMPOSESECURE_CID },
+  { NS_MSGSMIMECOMPFIELDS_CONTRACTID, &kNS_MSGSMIMECOMPFIELDS_CID },
+  { NS_SMIMEJSHELPER_CONTRACTID, &kNS_SMIMEJSJELPER_CID },
+  { NS_SMIMEENCRYPTURISERVICE_CONTRACTID, &kNS_SMIMEENCRYPTURISERVICE_CID },
   // Vcard Entries
   { "@mozilla.org/mimecth;1?type=text/x-vcard", &kNS_VCARD_CONTENT_TYPE_HANDLER_CID },
   // PGP/MIME Entries
   { "@mozilla.org/mimecth;1?type=multipart/encrypted", &kNS_PGPMIME_CONTENT_TYPE_HANDLER_CID },
   { NS_PGPMIMEPROXY_CONTRACTID, &kNS_PGPMIMEPROXY_CID },
   // Tokenizer Entries
   { NULL }
 };
deleted file mode 100644
--- a/mailnews/extensions/smime/build/Makefile.in
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# 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/.
-
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-LIBRARY_NAME	= msgsmime
-EXPORT_LIBRARY = 1
-ifdef MOZ_INCOMPLETE_EXTERNAL_LINKAGE
-IS_COMPONENT	= 1
-MODULE_NAME	= nsMsgSMIMEModule
-else
-MOZILLA_INTERNAL_API = 1
-LIBXUL_LIBRARY = 1
-endif
-
-
-LOCAL_INCLUDES += -I$(srcdir)/../src
-
-SHARED_LIBRARY_LIBS = \
-		../src/$(LIB_PREFIX)msgsmime_s.$(LIB_SUFFIX) \
-		$(NULL)
-
-include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/mailnews/extensions/smime/build/moz.build
+++ /dev/null
@@ -1,11 +0,0 @@
-# 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/.
-
-MODULE = 'msgsmime'
-
-CPP_SOURCES += [
-    'nsMsgSMIMEFactory.cpp',
-]
-
deleted file mode 100644
--- a/mailnews/extensions/smime/build/nsMsgSMIMEFactory.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* 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/. */
-
-#include "mozilla/ModuleUtils.h"
-#include "nsISupports.h"
-#include "nsCOMPtr.h"
-
-#include "nsIFactory.h"
-#include "nsIServiceManager.h"
-#include "nsIModule.h"
-
-#include "nsMsgSMIMECID.h"
-#include "nsMsgCompCID.h"
-
-/* Include all of the interfaces our factory can generate components for */
-#include "nsMsgComposeSecure.h"
-#include "nsSMimeJSHelper.h"
-#include "nsEncryptedSMIMEURIsService.h"
-
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgComposeSecure)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsMsgSMIMEComposeFields)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsSMimeJSHelper)
-NS_GENERIC_FACTORY_CONSTRUCTOR(nsEncryptedSMIMEURIsService)
-
-NS_DEFINE_NAMED_CID(NS_MSGCOMPOSESECURE_CID);
-NS_DEFINE_NAMED_CID(NS_MSGSMIMECOMPFIELDS_CID);
-NS_DEFINE_NAMED_CID(NS_SMIMEJSJELPER_CID);
-NS_DEFINE_NAMED_CID(NS_SMIMEENCRYPTURISERVICE_CID);
-
-const mozilla::Module::CIDEntry kMsgSMIMECIDs[] = {
-  { &kNS_MSGCOMPOSESECURE_CID, false, NULL, nsMsgComposeSecureConstructor },
-  { &kNS_MSGSMIMECOMPFIELDS_CID, false, NULL, nsMsgSMIMEComposeFieldsConstructor },
-  { &kNS_SMIMEJSJELPER_CID, false, NULL, nsSMimeJSHelperConstructor },
-  { &kNS_SMIMEENCRYPTURISERVICE_CID, false, NULL, nsEncryptedSMIMEURIsServiceConstructor },
-  { NULL }
-};
-
-const mozilla::Module::ContractIDEntry kMsgSMIMEContracts[] = {
-  { NS_MSGCOMPOSESECURE_CONTRACTID, &kNS_MSGCOMPOSESECURE_CID },
-  { NS_MSGSMIMECOMPFIELDS_CONTRACTID, &kNS_MSGSMIMECOMPFIELDS_CID },
-  { NS_SMIMEJSHELPER_CONTRACTID, &kNS_SMIMEJSJELPER_CID },
-  { NS_SMIMEENCRYPTURISERVICE_CONTRACTID, &kNS_SMIMEENCRYPTURISERVICE_CID },
-  { NULL }
-};
-
-/////////////////////////////////////////////////////////////////////////////
-//
-/////////////////////////////////////////////////////////////////////////////
-
-static const mozilla::Module kMsgSMIMEModule = {
-    mozilla::Module::kVersion,
-    kMsgSMIMECIDs,
-    kMsgSMIMEContracts
-};
-
-NSMODULE_DEFN(nsMsgSMIMEModule) = &kMsgSMIMEModule;
--- a/mailnews/extensions/smime/moz.build
+++ b/mailnews/extensions/smime/moz.build
@@ -3,12 +3,10 @@
 # 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/.
 
 PARALLEL_DIRS += [
     'public',
     'src',
 ]
 
-DIRS += ['build']
-
 MODULE = 'msgsmime'
 
--- a/mailnews/import/build/Makefile.in
+++ b/mailnews/import/build/Makefile.in
@@ -66,9 +66,54 @@ LOCAL_INCLUDES += -I$(srcdir)/../oexpres
 	-I$(srcdir)/../winlivemail  \
 	$(NULL)
 endif
 ifdef MOZ_MAPI_SUPPORT
 LOCAL_INCLUDES	+= -I$(srcdir)/../outlook/src
 endif
 endif
 
+EXTRA_DSO_LDOPTS += ../../base/util/$(LIB_PREFIX)msgbsutl_s.$(LIB_SUFFIX)
+
+ifdef MOZILLA_INTERNAL_API
+EXTRA_DSO_LDOPTS += \
+	$(LIBS_DIR) \
+	$(EXTRA_DSO_LIBS) \
+	$(MOZ_UNICHARUTIL_LIBS) \
+	$(MOZ_COMPONENT_LIBS) \
+	$(NULL)
+else
+EXTRA_DSO_LDOPTS += \
+	$(LIBS_DIR) \
+	$(MOZ_JS_LIBS) \
+	$(XPCOM_GLUE_LDOPTS) \
+	$(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib) \
+	$(MOZDEPTH)/rdf/util/src/$(LIB_PREFIX)rdfutil_external_s.$(LIB_SUFFIX) \
+	$(NSPR_LIBS) \
+	$(XPCOM_LIBS) \
+	$(NULL)
+ifneq (WINNT,$(OS_ARCH))
+EXTRA_DSO_LDOPTS += \
+	$(MOZ_ZLIB_LIBS) \
+	$(NULL)
+endif
+endif
+
+ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
+EXTRA_DSO_LDOPTS += \
+	-framework Cocoa  \
+	$(TK_LIBS) \
+	$(NULL)
+endif
+
+ifeq ($(OS_ARCH),AIX)
+ifdef MOZILLA_INTERNAL_API
+EXTRA_DSO_LDOPTS += \
+	$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+	$(NULL)
+else
+EXTRA_DSO_LDOPTS += \
+	$(MOZDEPTH)/rdf/util/src/$(LIB_PREFIX)rdfutil_external_s.$(LIB_SUFFIX) \
+	$(NULL)
+endif
+endif
+
 include $(topsrcdir)/config/rules.mk
--- a/suite/confvars.sh
+++ b/suite/confvars.sh
@@ -20,18 +20,18 @@ MOZ_UPDATER=1
 # of values.
 ACCEPTED_MAR_CHANNEL_IDS=seamonkey-comm-central
 # The MAR_CHANNEL_ID must not contain the following 3 characters: ",\t "
 MAR_CHANNEL_ID=seamonkey-comm-central
 MOZ_HELP_VIEWER=1
 MOZ_MEDIA_NAVIGATOR=1
 MOZ_MORK=1
 MOZ_STATIC_BUILD_UNSUPPORTED=1
-MAIL_COMPONENT="mail msgsmime import"
-MAIL_MODULE="MODULE(nsMailModule) MODULE(nsMsgSMIMEModule) MODULE(nsImportServiceModule)"
+MAIL_COMPONENT="mail import"
+MAIL_MODULE="MODULE(nsMailModule) MODULE(nsImportServiceModule)"
 if test -n "$MOZ_MAPI_SUPPORT"; then
   MAIL_COMPONENT="$MAIL_COMPONENT msgMapi"
   MAIL_MODULE="$MAIL_MODULE MODULE(msgMapiModule)"
 fi
 MOZ_SERVICES_COMMON=1
 MOZ_SERVICES_CRYPTO=1
 MOZ_SERVICES_SYNC=1
 MOZ_URL_CLASSIFIER=1