Bug 618195 part 2 - Only build services-crypto component as part of platform. r=mconnor,a=mconnor
authorMike Hommey <mh+mozilla@glandium.org>
Mon, 20 Dec 2010 10:12:12 +0100
changeset 59501 a7dea879b4b445a23186f438900562155bb39e99
parent 59500 b31d9d9d8527a45af220f618008f0351c0fbff00
child 59502 9b7157931d79e4ad870a417290c59ffc4a781ad0
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersmconnor, mconnor
bugs618195
milestone2.0b9pre
Bug 618195 part 2 - Only build services-crypto component as part of platform. r=mconnor,a=mconnor
browser/build.mk
browser/installer/package-manifest.in
services/crypto/Makefile.in
services/crypto/component/Makefile.in
services/crypto/component/nsISyncJPAKE.idl
services/crypto/component/nsSyncJPAKE.cpp
services/crypto/component/nsSyncJPAKE.h
services/crypto/component/tests/Makefile.in
services/crypto/component/tests/unit/test_jpake.js
services/crypto/nsISyncJPAKE.idl
services/crypto/nsSyncJPAKE.cpp
services/crypto/nsSyncJPAKE.h
services/crypto/tests/unit/test_jpake.js
toolkit/toolkit-tiers.mk
--- a/browser/build.mk
+++ b/browser/build.mk
@@ -45,17 +45,17 @@ ifdef MOZ_EXTENSIONS
 tier_app_dirs += extensions
 endif
 
 tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
 
 tier_app_dirs += toolkit/components/console/hudservice
 
 ifdef MOZ_SERVICES_SYNC
-tier_app_dirs += services/sync
+tier_app_dirs += services
 endif
 
 tier_app_dirs += browser
 # Never add other tier_app_dirs after browser. They won't get packaged
 # properly on mac.
 
 installer:
 	@$(MAKE) -C browser/installer installer
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -225,16 +225,17 @@
 @BINPATH@/components/proxyObject.xpt
 @BINPATH@/components/rdf.xpt
 @BINPATH@/components/satchel.xpt
 @BINPATH@/components/saxparser.xpt
 @BINPATH@/components/sessionstore.xpt
 #ifdef MOZ_SERVICES_SYNC
 @BINPATH@/components/services-crypto.xpt
 #endif
+@BINPATH@/components/services-crypto-component.xpt
 @BINPATH@/components/shellservice.xpt
 @BINPATH@/components/shistory.xpt
 @BINPATH@/components/spellchecker.xpt
 @BINPATH@/components/storage.xpt
 @BINPATH@/components/toolkitprofile.xpt
 #ifdef MOZ_ENABLE_XREMOTE
 @BINPATH@/components/toolkitremote.xpt
 #endif
--- a/services/crypto/Makefile.in
+++ b/services/crypto/Makefile.in
@@ -43,37 +43,18 @@ VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = services-crypto
 XPIDL_MODULE = services-crypto
 
 XPIDLSRCS = \
   IWeaveCrypto.idl \
-  nsISyncJPAKE.idl \
-  $(NULL)
-
-LIBRARY_NAME   = services-crypto
-EXPORT_LIBRARY = 1
-IS_COMPONENT   = 1
-MODULE_NAME    = nsServicesCryptoModule
-LIBXUL_LIBRARY = 1
-FORCE_USE_PIC  = 1
-MOZILLA_INTERNAL_API = 1
-
-CPPSRCS = \
-  nsSyncJPAKE.cpp \
   $(NULL)
 
 libs::
 	$(PYTHON) $(topsrcdir)/config/nsinstall.py $(srcdir)/modules/* $(FINAL_TARGET)/modules/services-crypto
 
 ifdef ENABLE_TESTS
 DIRS += tests
 endif
 
 include $(topsrcdir)/config/rules.mk
-
-EXTRA_DSO_LDOPTS += \
-	$(MOZ_COMPONENT_LIBS) \
-    $(NSPR_LIBS) \
-    $(NSS_LIBS) \
-    $(NULL)
new file mode 100644
--- /dev/null
+++ b/services/crypto/component/Makefile.in
@@ -0,0 +1,75 @@
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2010
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Philipp von Weitershausen <philipp@weitershausen.de>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH     = ../../..
+topsrcdir = @top_srcdir@
+srcdir    = @srcdir@
+VPATH     = @srcdir@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = services-crypto
+XPIDL_MODULE = services-crypto-component
+
+XPIDLSRCS = \
+  nsISyncJPAKE.idl \
+  $(NULL)
+
+LIBRARY_NAME   = services-crypto
+EXPORT_LIBRARY = 1
+IS_COMPONENT   = 1
+MODULE_NAME    = nsServicesCryptoModule
+LIBXUL_LIBRARY = 1
+FORCE_USE_PIC  = 1
+MOZILLA_INTERNAL_API = 1
+
+CPPSRCS = \
+  nsSyncJPAKE.cpp \
+  $(NULL)
+
+ifdef ENABLE_TESTS
+DIRS += tests
+endif
+
+include $(topsrcdir)/config/rules.mk
+
+EXTRA_DSO_LDOPTS += \
+    $(MOZ_COMPONENT_LIBS) \
+    $(NSPR_LIBS) \
+    $(NSS_LIBS) \
+    $(NULL)
rename from services/crypto/nsISyncJPAKE.idl
rename to services/crypto/component/nsISyncJPAKE.idl
rename from services/crypto/nsSyncJPAKE.cpp
rename to services/crypto/component/nsSyncJPAKE.cpp
rename from services/crypto/nsSyncJPAKE.h
rename to services/crypto/component/nsSyncJPAKE.h
new file mode 100644
--- /dev/null
+++ b/services/crypto/component/tests/Makefile.in
@@ -0,0 +1,50 @@
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation.
+# Portions created by the Initial Developer are Copyright (C) 2010
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+# Philipp von Weitershausen <philipp@weitershausen.de>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH     = ../../../..
+topsrcdir = @top_srcdir@
+srcdir    = @srcdir@
+VPATH     = @srcdir@
+relativesrcdir = services/crypto/components/tests
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE = test_services_crypto
+XPCSHELL_TESTS = unit
+
+include $(topsrcdir)/config/rules.mk
rename from services/crypto/tests/unit/test_jpake.js
rename to services/crypto/component/tests/unit/test_jpake.js
--- a/services/crypto/tests/unit/test_jpake.js
+++ b/services/crypto/component/tests/unit/test_jpake.js
@@ -1,8 +1,11 @@
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+
 // Ensure PSM is initialized.
 Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports);
 
 function do_check_throws(func) {
   let have_error = false;
   try {
     func();
   } catch(ex) {
--- a/toolkit/toolkit-tiers.mk
+++ b/toolkit/toolkit-tiers.mk
@@ -230,17 +230,17 @@ tier_platform_dirs	+= security/manager
 else
 tier_platform_dirs	+= security/manager/boot/public security/manager/ssl/public
 endif
 
 ifdef MOZ_PREF_EXTENSIONS
 tier_platform_dirs += extensions/pref
 endif
 
-tier_platform_dirs += services/crypto
+tier_platform_dirs += services/crypto/component
 
 # JavaXPCOM JNI code is compiled into libXUL
 ifdef MOZ_JAVAXPCOM
 tier_platform_dirs += extensions/java/xpcom/src
 endif
 
 ifndef BUILD_STATIC_LIBS
 ifneq (,$(MOZ_ENABLE_GTK2))