Bug 545625. Modify the SQLite 3.6.22 backport to be built by our storage-backport. Additionally, revert to using the 'sqlite3' lib name instead of 'mozsqlite3' at lesat until mozilla-1.9.2 takes the library name change too. (We do this for packaging consistency reasons.) This only affects Thunderbird on mozilla-1.9.2. rs=dmose
☠☠ backed out by 9860af44e25d ☠ ☠
authorAndrew Sutherland <asutherland@asutherland.org>
Sat, 20 Mar 2010 01:24:52 -0700
changeset 5215 cac6fa2ca1981c114447c405a2f87118c3d625c4
parent 5214 e1e838f974a512d4a277d9ef9ee701e352ba3c24
child 5216 9860af44e25dbafb80bb12bbe2ff65d136845307
push idunknown
push userunknown
push dateunknown
reviewersdmose
bugs545625
Bug 545625. Modify the SQLite 3.6.22 backport to be built by our storage-backport. Additionally, revert to using the 'sqlite3' lib name instead of 'mozsqlite3' at lesat until mozilla-1.9.2 takes the library name change too. (We do this for packaging consistency reasons.) This only affects Thunderbird on mozilla-1.9.2. rs=dmose
sqlite-backport/src/Makefile.in
sqlite-backport/src/sqlite.def
storage-backport/Makefile.in
storage-backport/src/Makefile.in
--- a/sqlite-backport/src/Makefile.in
+++ b/sqlite-backport/src/Makefile.in
@@ -33,25 +33,28 @@
 # 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@
+DEPTH		= ../..
+RELDEPTH 	= ../../mozilla
+realtopsrcdir	= @top_srcdir@
+moztopsrcdir	= @top_srcdir@/mozilla
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
+topsrcdir = $(realtopsrcdir)
 include $(DEPTH)/config/autoconf.mk
 
 MODULE           = sqlite3
-LIBRARY_NAME     = mozsqlite3
+LIBRARY_NAME     = sqlite3
 SHORT_LIBNAME    = mozsqlt3
 FORCE_SHARED_LIB = 1
 VISIBILITY_FLAGS =
 LIB_IS_C_ONLY    = 1
 
 ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
 ifndef GNU_CC
 DEFFILE = $(CURDIR)/sqlite-processed.def
@@ -65,17 +68,17 @@ GARBAGE += \
 
 # We generate the appropriate version header file with our python script.
 sqlite-version.h: sqlite-version.py sqlite3.h
 	$(PYTHON) $^ > $@
 
 # We have to preprocess our def file because we need different symbols in debug
 # builds exposed that are not built in non-debug builds.
 $(DEFFILE): sqlite.def
-	@$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) \
+	@$(PYTHON) $(moztopsrcdir)/config/Preprocessor.py $(DEFINES) \
 	  $(srcdir)/sqlite.def > $(DEFFILE)
 
 export:: sqlite-version.h
 endif
 endif
 
 ifdef GNU_CC
 MODULE_OPTIMIZE_FLAGS = -O2
@@ -129,12 +132,12 @@ endif
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 # next line allows use of MOZ_OBJDIR in .mozconfig with older gcc on BeOS, maybe others
 LOCAL_INCLUDES += -I$(srcdir)
 
 ifeq ($(OS_ARCH),OS2)
-ADD_TO_DEF_FILE = $(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) \
+ADD_TO_DEF_FILE = $(PYTHON) $(moztopsrcdir)/config/Preprocessor.py $(DEFINES) \
        $(srcdir)/sqlite.def | sed -e '1,/^EXPORTS$$/ d' -e 's,sqlite3,_\0,' \
        -e 's,\ DATA.*$$,,' >> $(DEF_FILE)
 endif
--- a/sqlite-backport/src/sqlite.def
+++ b/sqlite-backport/src/sqlite.def
@@ -28,17 +28,17 @@
 ; 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 *****
 
-LIBRARY mozsqlite3.dll
+LIBRARY sqlite3.dll
 
 EXPORTS
         sqlite3_aggregate_context
         sqlite3_aggregate_count
         sqlite3_auto_extension
         sqlite3_bind_blob
         sqlite3_bind_double
         sqlite3_bind_int
--- a/storage-backport/Makefile.in
+++ b/storage-backport/Makefile.in
@@ -42,22 +42,32 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(RELDEPTH)/config/autoconf.mk
 
 MODULE		= storage
 
 ifndef MOZ_NATIVE_SQLITE
-DIRS		= ../mozilla/db/sqlite3/src
+DIRS		= ../sqlite-backport/src
 endif
 
 DIRS		+= public \
 		   src \
 		   build \
 		   $(NULL)
 
 ifdef ENABLE_TESTS
 TOOL_DIRS += test
 endif
 
 include $(topsrcdir)/config/rules.mk
 
+ifdef SUBMAKEFILES
+# if topsrcdir includes mozilla, keep it, otherwise add mozilla
+ifeq ($(notdir @top_srcdir@),mozilla)
+../sqlite-backport/src/Makefile: AUTOCONF_TOOLS:=@top_srcdir@/build/autoconf
+../sqlite-backport/src/Makefile: topsrcdir:=@top_srcdir@/..
+else
+../sqlite-backport/src/Makefile: AUTOCONF_TOOLS:=@top_srcdir@/mozilla/build/autoconf
+../sqlite-backport/src/Makefile: topsrcdir:=@top_srcdir@
+endif
+endif
--- a/storage-backport/src/Makefile.in
+++ b/storage-backport/src/Makefile.in
@@ -45,16 +45,17 @@ include $(DEPTH)/config/autoconf.mk
 
 MODULE           = storage
 LIBRARY_NAME     = storage_s
 MODULE_NAME      = mozStorageModule
 FORCE_STATIC_LIB = 1
 GRE_MODULE       = 1
 LIBXUL_LIBRARY = 1
 
+REQUIRES = sqlite3
 
 EXPORTS_NAMESPACES = mozilla/storage
 
 EXPORTS_mozilla/storage = \
   Variant.h \
   Variant_inl.h \
   $(NULL)