Bug 545625 - "back-fork ifdef'd mozStorage of
bug 507414 into comm-central or mozilla-1.9.2 for TB 3.1 release". v1 make changes to sub comm-central/storage-backport for mozilla/storage for mail/ builds. note: this only affects Thunderbird builds. r=Standard8.
--- a/mail/build.mk
+++ b/mail/build.mk
@@ -36,16 +36,23 @@
# ***** END LICENSE BLOCK *****
ifndef COMM_BUILD # Mozilla Makefile
ifndef LIBXUL_SDK
include $(topsrcdir)/toolkit/toolkit-tiers.mk
endif
+## storage backfork.
+# replace toolkit's storage with our own
+tier_gecko_dirs := $(patsubst storage,../storage-backport,$(tier_gecko_dirs))
+# necko also has a dependency...
+tier_necko_dirs := $(patsubst storage/public,../storage-backport/public,$(tier_necko_dirs))
+
+
TIERS += app
ifdef MOZ_EXTENSIONS
tier_app_dirs += extensions
endif
else # toplevel Makefile
--- a/mail/makefiles.sh
+++ b/mail/makefiles.sh
@@ -59,16 +59,25 @@ mail/installer/Makefile
mail/installer/windows/Makefile
mail/themes/Makefile
mail/themes/pinstripe/Makefile
mail/themes/qute/Makefile
mail/themes/gnomestripe/Makefile
mail/test/mozmill/Makefile
"
+# storage-backport stuff
+add_makefiles "
+storage-backport/Makefile
+storage-backport/public/Makefile
+storage-backport/src/Makefile
+storage-backport/build/Makefile
+storage-backport/test/Makefile
+"
+
if test -n "$MOZ_BRANDING_DIRECTORY"; then
add_makefiles "
$MOZ_BRANDING_DIRECTORY/Makefile
$MOZ_BRANDING_DIRECTORY/locales/Makefile
"
fi
fi
--- a/storage-backport/Makefile.in
+++ b/storage-backport/Makefile.in
@@ -32,26 +32,27 @@
# 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 = ..
+RELDEPTH = ../mozilla
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
-include $(DEPTH)/config/autoconf.mk
+include $(RELDEPTH)/config/autoconf.mk
MODULE = storage
ifndef MOZ_NATIVE_SQLITE
-DIRS = ../db/sqlite3/src
+DIRS = ../mozilla/db/sqlite3/src
endif
DIRS += public \
src \
build \
$(NULL)
ifdef ENABLE_TESTS
--- a/storage-backport/build/Makefile.in
+++ b/storage-backport/build/Makefile.in
@@ -68,10 +68,15 @@ SHARED_LIBRARY_LIBS = \
EXTRA_DSO_LDOPTS += \
$(LIBS_DIR) \
$(SQLITE_LIBS) \
$(MOZ_UNICHARUTIL_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
$(NULL)
+
+# do not install into our module dir; comm-central snafu
+include $(topsrcdir)/config/config.mk
+PUBLIC=$(DIST)/include
+
include $(topsrcdir)/config/rules.mk
--- a/storage-backport/public/Makefile.in
+++ b/storage-backport/public/Makefile.in
@@ -73,9 +73,14 @@ EXPORTS_NAMESPACES = mozilla
EXPORTS = \
mozStorageHelper.h \
mozStorage.h \
$(NULL)
EXPORTS_mozilla = storage.h
+
+# do not install into our module dir; comm-central snafu
+include $(topsrcdir)/config/config.mk
+PUBLIC=$(DIST)/include
+
include $(topsrcdir)/config/rules.mk
--- a/storage-backport/src/Makefile.in
+++ b/storage-backport/src/Makefile.in
@@ -84,9 +84,13 @@ CPPSRCS = \
LOCAL_INCLUDES = \
$(SQLITE_CFLAGS)
# This is the default value. If we ever change it when compiling sqlite, we
# will need to change it here as well.
DEFINES += -DSQLITE_MAX_LIKE_PATTERN_LENGTH=50000
+# do not install into our module dir; comm-central snafu
+include $(topsrcdir)/config/config.mk
+PUBLIC=$(DIST)/include
+
include $(topsrcdir)/config/rules.mk
--- a/storage-backport/src/Variant_inl.h
+++ b/storage-backport/src/Variant_inl.h
@@ -246,17 +246,20 @@ Variant_base::GetAsStringWithSize(PRUint
inline
NS_IMETHODIMP
Variant_base::GetAsWStringWithSize(PRUint32 *,
PRUnichar **)
{
return NS_ERROR_CANNOT_CONVERT_DATA;
}
+// Mozilla 1.9.2 does not have this method.
+#ifndef MOZILLA_1_9_2_BRANCH
inline
NS_IMETHODIMP
Variant_base::GetAsJSVal(jsval *)
{
return NS_ERROR_CANNOT_CONVERT_DATA;
}
+#endif
} // namespace storage
} // namespace mozilla
--- a/storage-backport/test/Makefile.in
+++ b/storage-backport/test/Makefile.in
@@ -73,9 +73,13 @@ LOCAL_INCLUDES = \
LIBS = \
$(LIBS_DIR) \
$(LIBXUL_DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
$(MOZ_COMPONENT_LIBS) \
$(SQLITE_LIBS) \
$(NULL)
+# do not install into our module dir; comm-central snafu
+include $(topsrcdir)/config/config.mk
+PUBLIC=$(DIST)/include
+
include $(topsrcdir)/config/rules.mk