diff options
Diffstat (limited to 'dev-db/sqlite/files')
6 files changed, 605 insertions, 0 deletions
diff --git a/dev-db/sqlite/files/sqlite-3.16.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.16.0-full_tarball-build.patch new file mode 100644 index 000000000000..60907e795f92 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.16.0-full_tarball-build.patch @@ -0,0 +1,147 @@ +Link executables against libsqlite3.so. +Increase timeout for fuzzcheck. +Fix building with dlopen() not available. + +--- Makefile.in ++++ Makefile.in +@@ -562,6 +562,7 @@ + # + SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 + # SHELL_OPT += -DSQLITE_ENABLE_FTS5 ++SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB + SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS + SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 +@@ -586,25 +587,25 @@ + + libtclsqlite3.la: tclsqlite.lo libsqlite3.la + $(LTLINK) -no-undefined -o $@ tclsqlite.lo \ +- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ ++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \ + -rpath "$(TCLLIBDIR)" \ + -version-info "8:6:8" \ + -avoid-version + +-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c +- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \ +- $(TOP)/src/shell.c sqlite3.c \ +- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" ++sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la ++ $(LTLINK) $(READLINE_FLAGS) -o $@ \ ++ $(TOP)/src/shell.c libsqlite3.la \ ++ $(LIBREADLINE) + +-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h +- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS) ++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la + +-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h +- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS) ++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la + +-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo ++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la + $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \ +- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS) ++ $(TOP)/ext/misc/scrub.c libsqlite3.la + + srcck1$(BEXE): $(TOP)/tool/srcck1.c + $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c +@@ -679,7 +680,7 @@ + # Rule to build the amalgamation + # + sqlite3.lo: sqlite3.c +- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c ++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c + + # Rules to build the LEMON compiler generator + # +@@ -1105,13 +1106,13 @@ + + # Fuzz testing + fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) +- ./fuzzcheck$(TEXE) $(FUZZDATA) ++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA) + + fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) +- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA) ++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA) + + valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) +- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA) ++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA) + + # The veryquick.test TCL tests. + # +@@ -1141,32 +1142,31 @@ + smoketest: $(TESTPROGS) fuzzcheck$(TEXE) + ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS) + +-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl ++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl + echo "#define TCLSH 2" > $@ +- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@ +- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@ ++ cat $(TOP)/src/tclsqlite.c >> $@ + echo "static const char *tclsh_main_loop(void){" >> $@ + echo "static const char *zMainloop = " >> $@ + $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@ + echo "; return zMainloop; }" >> $@ + +-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c +- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS) ++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la ++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL) + +-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS) ++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la + +-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS) ++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la + +-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS) ++showjournal$(TEXE): $(TOP)/tool/showjournal.c ++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c + +-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS) ++showwal$(TEXE): $(TOP)/tool/showwal.c ++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c + +-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS) ++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la + + rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo + $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS) +@@ -1180,8 +1180,8 @@ + speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo + $(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS) + +-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo +- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS) ++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la ++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la + + loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la + $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS) +--- configure.ac ++++ configure.ac +@@ -584,6 +584,9 @@ + if test "${use_loadextension}" = "yes" ; then + OPT_FEATURE_FLAGS="" + AC_SEARCH_LIBS(dlopen, dl) ++ if test "${ac_cv_search_dlopen}" = "no" ; then ++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" ++ fi + else + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" + fi diff --git a/dev-db/sqlite/files/sqlite-3.16.0-nonfull_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.16.0-nonfull_tarball-build.patch new file mode 100644 index 000000000000..81ef29d8a5d5 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.16.0-nonfull_tarball-build.patch @@ -0,0 +1,14 @@ +Fix building with dlopen() not available. + +--- configure.ac ++++ configure.ac +@@ -102,6 +102,9 @@ + [], [enable_dynamic_extensions=yes]) + if test x"$enable_dynamic_extensions" != "xno"; then + AC_SEARCH_LIBS(dlopen, dl) ++ if test "${ac_cv_search_dlopen}" = "no" ; then ++ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 ++ fi + else + DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 + fi diff --git a/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch new file mode 100644 index 000000000000..1278630c0927 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch @@ -0,0 +1,158 @@ +Link executables against libsqlite3.so. +Increase timeout for fuzzcheck. +Fix building with dlopen() not available. + +--- Makefile.in ++++ Makefile.in +@@ -562,6 +562,7 @@ + # + SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 + # SHELL_OPT += -DSQLITE_ENABLE_FTS5 ++SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB + SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS + SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1 +@@ -587,25 +588,25 @@ + + libtclsqlite3.la: tclsqlite.lo libsqlite3.la + $(LTLINK) -no-undefined -o $@ tclsqlite.lo \ +- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ ++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \ + -rpath "$(TCLLIBDIR)" \ + -version-info "8:6:8" \ + -avoid-version + +-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c +- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \ +- $(TOP)/src/shell.c sqlite3.c \ +- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" ++sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la ++ $(LTLINK) $(READLINE_FLAGS) -o $@ \ ++ $(TOP)/src/shell.c libsqlite3.la \ ++ $(LIBREADLINE) + +-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h +- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS) ++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la + +-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h +- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS) ++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la + +-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo ++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la + $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \ +- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS) ++ $(TOP)/ext/misc/scrub.c libsqlite3.la + + srcck1$(BEXE): $(TOP)/tool/srcck1.c + $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c +@@ -681,7 +682,7 @@ + # Rule to build the amalgamation + # + sqlite3.lo: sqlite3.c +- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c ++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c + + # Rules to build the LEMON compiler generator + # +@@ -1107,13 +1108,13 @@ + + # Fuzz testing + fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) +- ./fuzzcheck$(TEXE) $(FUZZDATA) ++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA) + + fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) +- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA) ++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA) + + valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) +- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA) ++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA) + + # The veryquick.test TCL tests. + # +@@ -1143,36 +1144,35 @@ + smoketest: $(TESTPROGS) fuzzcheck$(TEXE) + ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS) + +-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl ++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl + echo "#define TCLSH 2" > $@ +- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@ +- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@ ++ cat $(TOP)/src/tclsqlite.c >> $@ + echo "static const char *tclsh_main_loop(void){" >> $@ + echo "static const char *zMainloop = " >> $@ + $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@ + echo "; return zMainloop; }" >> $@ + +-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c +- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS) ++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la ++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL) + +-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo ++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la + $(LTLINK) -DDBDUMP_STANDALONE -o $@ \ +- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS) ++ $(TOP)/ext/misc/dbdump.c libsqlite3.la + +-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS) ++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la + +-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS) ++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la + +-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS) ++showjournal$(TEXE): $(TOP)/tool/showjournal.c ++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c + +-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS) ++showwal$(TEXE): $(TOP)/tool/showwal.c ++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c + +-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS) ++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la + + rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo + $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS) +@@ -1191,11 +1191,11 @@ + kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c + $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS) + +-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo +- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS) ++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la ++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la + +-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la +- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS) ++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la ++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ + + # This target will fail if the SQLite amalgamation contains any exported + # symbols that do not begin with "sqlite3_". It is run as part of the +--- configure.ac ++++ configure.ac +@@ -584,6 +584,9 @@ + if test "${use_loadextension}" = "yes" ; then + OPT_FEATURE_FLAGS="" + AC_SEARCH_LIBS(dlopen, dl) ++ if test "${ac_cv_search_dlopen}" = "no" ; then ++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" ++ fi + else + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" + fi diff --git a/dev-db/sqlite/files/sqlite-3.20.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.20.0-full_tarball-build.patch new file mode 100644 index 000000000000..cc95be3ee60e --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.20.0-full_tarball-build.patch @@ -0,0 +1,158 @@ +Link executables against libsqlite3.so. +Increase timeout for fuzzcheck. +Fix building with dlopen() not available. + +--- Makefile.in ++++ Makefile.in +@@ -565,6 +565,7 @@ + # + SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4 + # SHELL_OPT += -DSQLITE_ENABLE_FTS5 ++SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB + SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS + SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION + SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB +@@ -591,25 +592,25 @@ + + libtclsqlite3.la: tclsqlite.lo libsqlite3.la + $(LTLINK) -no-undefined -o $@ tclsqlite.lo \ +- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ ++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \ + -rpath "$(TCLLIBDIR)" \ + -version-info "8:6:8" \ + -avoid-version + +-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c +- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \ +- $(TOP)/src/shell.c sqlite3.c \ +- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" ++sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la ++ $(LTLINK) $(READLINE_FLAGS) -o $@ \ ++ $(TOP)/src/shell.c libsqlite3.la \ ++ $(LIBREADLINE) + +-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h +- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS) ++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la + +-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h +- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS) ++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la + +-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo ++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la + $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \ +- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS) ++ $(TOP)/ext/misc/scrub.c libsqlite3.la + + srcck1$(BEXE): $(TOP)/tool/srcck1.c + $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c +@@ -685,7 +686,7 @@ + # Rule to build the amalgamation + # + sqlite3.lo: sqlite3.c +- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c ++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c + + # Rules to build the LEMON compiler generator + # +@@ -1115,13 +1116,13 @@ + + # Fuzz testing + fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) +- ./fuzzcheck$(TEXE) $(FUZZDATA) ++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA) + + fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) +- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA) ++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA) + + valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) +- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA) ++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA) + + # The veryquick.test TCL tests. + # +@@ -1151,36 +1152,35 @@ + smoketest: $(TESTPROGS) fuzzcheck$(TEXE) + ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS) + +-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl ++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl + echo "#define TCLSH 2" > $@ +- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@ +- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@ ++ cat $(TOP)/src/tclsqlite.c >> $@ + echo "static const char *tclsh_main_loop(void){" >> $@ + echo "static const char *zMainloop = " >> $@ + $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@ + echo "; return zMainloop; }" >> $@ + +-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c +- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS) ++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la ++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL) + +-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo ++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la + $(LTLINK) -DDBDUMP_STANDALONE -o $@ \ +- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS) ++ $(TOP)/ext/misc/dbdump.c libsqlite3.la + +-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS) ++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la + +-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS) ++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la + +-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS) ++showjournal$(TEXE): $(TOP)/tool/showjournal.c ++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c + +-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS) ++showwal$(TEXE): $(TOP)/tool/showwal.c ++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c + +-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo +- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS) ++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la ++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la + + rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo + $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS) +@@ -1199,11 +1199,11 @@ + kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c + $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS) + +-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo +- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS) ++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la ++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la + +-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la +- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS) ++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la ++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ + + # This target will fail if the SQLite amalgamation contains any exported + # symbols that do not begin with "sqlite3_". It is run as part of the +--- configure.ac ++++ configure.ac +@@ -584,6 +584,9 @@ + if test "${use_loadextension}" = "yes" ; then + OPT_FEATURE_FLAGS="" + AC_SEARCH_LIBS(dlopen, dl) ++ if test "${ac_cv_search_dlopen}" = "no" ; then ++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" ++ fi + else + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" + fi diff --git a/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-csv-unsigned_char.patch b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-csv-unsigned_char.patch new file mode 100644 index 000000000000..86236c4b4bfe --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-csv-unsigned_char.patch @@ -0,0 +1,33 @@ +https://sqlite.org/src/info/42f0777555675875 + +--- ext/misc/csv.c ++++ ext/misc/csv.c +@@ -78,7 +78,7 @@ + int nAlloc; /* Space allocated for z[] */ + int nLine; /* Current line number */ + int bNotFirst; /* True if prior text has been seen */ +- char cTerm; /* Character that terminated the most recent field */ ++ int cTerm; /* Character that terminated the most recent field */ + size_t iIn; /* Next unread character in the input buffer */ + size_t nIn; /* Number of characters in the input buffer */ + char *zIn; /* The input buffer */ +@@ -166,7 +166,7 @@ + if( p->in!=0 ) return csv_getc_refill(p); + return EOF; + } +- return p->zIn[p->iIn++]; ++ return ((unsigned char*)p->zIn)[p->iIn++]; + } + + /* Increase the size of p->z and append character c to the end. +--- test/releasetest.tcl ++++ test/releasetest.tcl +@@ -114,7 +114,7 @@ + } + "Debug-One" { + --disable-shared +- -O2 ++ -O2 -funsigned-char + -DSQLITE_DEBUG=1 + -DSQLITE_MEMDEBUG=1 + -DSQLITE_MUTEX_NOOP=1 diff --git a/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch new file mode 100644 index 000000000000..427021d2f7b5 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch @@ -0,0 +1,95 @@ +https://www.sqlite.org/src/info/87ccdf9cbb928455 + +--- test/fts3conf.test ++++ test/fts3conf.test +@@ -136,47 +136,49 @@ + do_execsql_test 2.2.3 { SELECT * FROM t1 } {{a b c} {a b c}} + fts3_integrity 2.2.4 db t1 + +-do_execsql_test 3.1 { +- CREATE VIRTUAL TABLE t3 USING fts4; +- REPLACE INTO t3(docid, content) VALUES (1, 'one two'); +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' +-} {X'0100000002000000'} +- +-do_execsql_test 3.2 { +- REPLACE INTO t3(docid, content) VALUES (2, 'one two three four'); +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four' +-} {X'0200000003000000'} +- +-do_execsql_test 3.3 { +- REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six'); +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' +-} {X'0200000005000000'} +- +-do_execsql_test 3.4 { +- UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1; +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' +-} {X'0100000006000000'} +- +-do_execsql_test 3.5 { +- UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2; +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' +-} {X'0100000006000000'} +- +-do_execsql_test 3.6 { +- REPLACE INTO t3(docid, content) VALUES (3, 'one two'); +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' +-} {X'0100000002000000'} +- +-do_execsql_test 3.7 { +- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four'); +- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four five six'); +- SELECT docid FROM t3; +-} {3 4 5} +- +-do_execsql_test 3.8 { +- UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4; +- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' +-} {X'0200000002000000'} ++if {$tcl_platform(byteOrder)=="littleEndian"} { ++ do_execsql_test 3.1 { ++ CREATE VIRTUAL TABLE t3 USING fts4; ++ REPLACE INTO t3(docid, content) VALUES (1, 'one two'); ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' ++ } {X'0100000002000000'} ++ ++ do_execsql_test 3.2 { ++ REPLACE INTO t3(docid, content) VALUES (2, 'one two three four'); ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four' ++ } {X'0200000003000000'} ++ ++ do_execsql_test 3.3 { ++ REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six'); ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' ++ } {X'0200000005000000'} ++ ++ do_execsql_test 3.4 { ++ UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1; ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' ++ } {X'0100000006000000'} ++ ++ do_execsql_test 3.5 { ++ UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2; ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six' ++ } {X'0100000006000000'} ++ ++ do_execsql_test 3.6 { ++ REPLACE INTO t3(docid, content) VALUES (3, 'one two'); ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' ++ } {X'0100000002000000'} ++ ++ do_execsql_test 3.7 { ++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four'); ++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four five six'); ++ SELECT docid FROM t3; ++ } {3 4 5} ++ ++ do_execsql_test 3.8 { ++ UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4; ++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one' ++ } {X'0200000002000000'} ++} + + #------------------------------------------------------------------------- + # Test that the xSavepoint is invoked correctly if the first write |