Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/files/
Date: Sun, 27 May 2018 16:11:15
Message-Id: 1527437352.60f72f89b59cf3eff1f589e9731f1d39f68443b3.bman@gentoo
1 commit: 60f72f89b59cf3eff1f589e9731f1d39f68443b3
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Sun May 27 11:54:37 2018 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sun May 27 16:09:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60f72f89
7
8 dev-db/sqlite: remove unused patches
9
10 Closes: https://github.com/gentoo/gentoo/pull/8606
11
12 .../sqlite-3.16.0-nonfull_tarball-build.patch | 14 -
13 .../files/sqlite-3.20.0-full_tarball-build.patch | 158 --------
14 ...ite-3.20.1-full_tarball-csv-unsigned_char.patch | 33 --
15 ...lite-3.20.1-full_tarball-tests-big-endian.patch | 95 -----
16 .../files/sqlite-3.21.0-full_archive-build.patch | 153 --------
17 .../files/sqlite-3.22.0-full_archive-build.patch | 405 ---------------------
18 .../files/sqlite-3.22.0-full_archive-headers.patch | 15 -
19 .../files/sqlite-3.22.0-full_archive-tests.patch | 249 -------------
20 8 files changed, 1122 deletions(-)
21
22 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
23 deleted file mode 100644
24 index 81ef29d8a5d..00000000000
25 --- a/dev-db/sqlite/files/sqlite-3.16.0-nonfull_tarball-build.patch
26 +++ /dev/null
27 @@ -1,14 +0,0 @@
28 -Fix building with dlopen() not available.
29 -
30 ---- configure.ac
31 -+++ configure.ac
32 -@@ -102,6 +102,9 @@
33 - [], [enable_dynamic_extensions=yes])
34 - if test x"$enable_dynamic_extensions" != "xno"; then
35 - AC_SEARCH_LIBS(dlopen, dl)
36 -+ if test "${ac_cv_search_dlopen}" = "no" ; then
37 -+ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
38 -+ fi
39 - else
40 - DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
41 - fi
42
43 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
44 deleted file mode 100644
45 index cc95be3ee60..00000000000
46 --- a/dev-db/sqlite/files/sqlite-3.20.0-full_tarball-build.patch
47 +++ /dev/null
48 @@ -1,158 +0,0 @@
49 -Link executables against libsqlite3.so.
50 -Increase timeout for fuzzcheck.
51 -Fix building with dlopen() not available.
52 -
53 ---- Makefile.in
54 -+++ Makefile.in
55 -@@ -565,6 +565,7 @@
56 - #
57 - SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
58 - # SHELL_OPT += -DSQLITE_ENABLE_FTS5
59 -+SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
60 - SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
61 - SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
62 - SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
63 -@@ -591,25 +592,25 @@
64 -
65 - libtclsqlite3.la: tclsqlite.lo libsqlite3.la
66 - $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
67 -- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
68 -+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
69 - -rpath "$(TCLLIBDIR)" \
70 - -version-info "8:6:8" \
71 - -avoid-version
72 -
73 --sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
74 -- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
75 -- $(TOP)/src/shell.c sqlite3.c \
76 -- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
77 -+sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
78 -+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
79 -+ $(TOP)/src/shell.c libsqlite3.la \
80 -+ $(LIBREADLINE)
81 -
82 --sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
83 -- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
84 -+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
85 -+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
86 -
87 --dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
88 -- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
89 -+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
90 -+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
91 -
92 --scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
93 -+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
94 - $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
95 -- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
96 -+ $(TOP)/ext/misc/scrub.c libsqlite3.la
97 -
98 - srcck1$(BEXE): $(TOP)/tool/srcck1.c
99 - $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
100 -@@ -685,7 +686,7 @@
101 - # Rule to build the amalgamation
102 - #
103 - sqlite3.lo: sqlite3.c
104 -- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
105 -+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
106 -
107 - # Rules to build the LEMON compiler generator
108 - #
109 -@@ -1115,13 +1116,13 @@
110 -
111 - # Fuzz testing
112 - fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
113 -- ./fuzzcheck$(TEXE) $(FUZZDATA)
114 -+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
115 -
116 - fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
117 -- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
118 -+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
119 -
120 - valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
121 -- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
122 -+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
123 -
124 - # The veryquick.test TCL tests.
125 - #
126 -@@ -1151,36 +1152,35 @@
127 - smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
128 - ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
129 -
130 --sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
131 -+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
132 - echo "#define TCLSH 2" > $@
133 -- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
134 -- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
135 -+ cat $(TOP)/src/tclsqlite.c >> $@
136 - echo "static const char *tclsh_main_loop(void){" >> $@
137 - echo "static const char *zMainloop = " >> $@
138 - $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
139 - echo "; return zMainloop; }" >> $@
140 -
141 --sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
142 -- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
143 -+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
144 -+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
145 -
146 --dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
147 -+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
148 - $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
149 -- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
150 -+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
151 -
152 --showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
153 -- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
154 -+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
155 -+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
156 -
157 --showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
158 -- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
159 -+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
160 -+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
161 -
162 --showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
163 -- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
164 -+showjournal$(TEXE): $(TOP)/tool/showjournal.c
165 -+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
166 -
167 --showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
168 -- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
169 -+showwal$(TEXE): $(TOP)/tool/showwal.c
170 -+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
171 -
172 --changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
173 -- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
174 -+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
175 -+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
176 -
177 - rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
178 - $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
179 -@@ -1199,11 +1199,11 @@
180 - kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
181 - $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
182 -
183 --rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
184 -- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
185 -+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
186 -+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
187 -
188 --loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
189 -- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
190 -+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
191 -+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
192 -
193 - # This target will fail if the SQLite amalgamation contains any exported
194 - # symbols that do not begin with "sqlite3_". It is run as part of the
195 ---- configure.ac
196 -+++ configure.ac
197 -@@ -584,6 +584,9 @@
198 - if test "${use_loadextension}" = "yes" ; then
199 - OPT_FEATURE_FLAGS=""
200 - AC_SEARCH_LIBS(dlopen, dl)
201 -+ if test "${ac_cv_search_dlopen}" = "no" ; then
202 -+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
203 -+ fi
204 - else
205 - OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
206 - fi
207
208 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
209 deleted file mode 100644
210 index 86236c4b4bf..00000000000
211 --- a/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-csv-unsigned_char.patch
212 +++ /dev/null
213 @@ -1,33 +0,0 @@
214 -https://sqlite.org/src/info/42f0777555675875
215 -
216 ---- ext/misc/csv.c
217 -+++ ext/misc/csv.c
218 -@@ -78,7 +78,7 @@
219 - int nAlloc; /* Space allocated for z[] */
220 - int nLine; /* Current line number */
221 - int bNotFirst; /* True if prior text has been seen */
222 -- char cTerm; /* Character that terminated the most recent field */
223 -+ int cTerm; /* Character that terminated the most recent field */
224 - size_t iIn; /* Next unread character in the input buffer */
225 - size_t nIn; /* Number of characters in the input buffer */
226 - char *zIn; /* The input buffer */
227 -@@ -166,7 +166,7 @@
228 - if( p->in!=0 ) return csv_getc_refill(p);
229 - return EOF;
230 - }
231 -- return p->zIn[p->iIn++];
232 -+ return ((unsigned char*)p->zIn)[p->iIn++];
233 - }
234 -
235 - /* Increase the size of p->z and append character c to the end.
236 ---- test/releasetest.tcl
237 -+++ test/releasetest.tcl
238 -@@ -114,7 +114,7 @@
239 - }
240 - "Debug-One" {
241 - --disable-shared
242 -- -O2
243 -+ -O2 -funsigned-char
244 - -DSQLITE_DEBUG=1
245 - -DSQLITE_MEMDEBUG=1
246 - -DSQLITE_MUTEX_NOOP=1
247
248 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
249 deleted file mode 100644
250 index 427021d2f7b..00000000000
251 --- a/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch
252 +++ /dev/null
253 @@ -1,95 +0,0 @@
254 -https://www.sqlite.org/src/info/87ccdf9cbb928455
255 -
256 ---- test/fts3conf.test
257 -+++ test/fts3conf.test
258 -@@ -136,47 +136,49 @@
259 - do_execsql_test 2.2.3 { SELECT * FROM t1 } {{a b c} {a b c}}
260 - fts3_integrity 2.2.4 db t1
261 -
262 --do_execsql_test 3.1 {
263 -- CREATE VIRTUAL TABLE t3 USING fts4;
264 -- REPLACE INTO t3(docid, content) VALUES (1, 'one two');
265 -- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
266 --} {X'0100000002000000'}
267 --
268 --do_execsql_test 3.2 {
269 -- REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
270 -- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
271 --} {X'0200000003000000'}
272 --
273 --do_execsql_test 3.3 {
274 -- REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
275 -- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
276 --} {X'0200000005000000'}
277 --
278 --do_execsql_test 3.4 {
279 -- UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
280 -- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
281 --} {X'0100000006000000'}
282 --
283 --do_execsql_test 3.5 {
284 -- UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
285 -- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
286 --} {X'0100000006000000'}
287 --
288 --do_execsql_test 3.6 {
289 -- REPLACE INTO t3(docid, content) VALUES (3, 'one two');
290 -- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
291 --} {X'0100000002000000'}
292 --
293 --do_execsql_test 3.7 {
294 -- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four');
295 -- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four five six');
296 -- SELECT docid FROM t3;
297 --} {3 4 5}
298 --
299 --do_execsql_test 3.8 {
300 -- UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
301 -- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
302 --} {X'0200000002000000'}
303 -+if {$tcl_platform(byteOrder)=="littleEndian"} {
304 -+ do_execsql_test 3.1 {
305 -+ CREATE VIRTUAL TABLE t3 USING fts4;
306 -+ REPLACE INTO t3(docid, content) VALUES (1, 'one two');
307 -+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
308 -+ } {X'0100000002000000'}
309 -+
310 -+ do_execsql_test 3.2 {
311 -+ REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
312 -+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
313 -+ } {X'0200000003000000'}
314 -+
315 -+ do_execsql_test 3.3 {
316 -+ REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
317 -+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
318 -+ } {X'0200000005000000'}
319 -+
320 -+ do_execsql_test 3.4 {
321 -+ UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
322 -+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
323 -+ } {X'0100000006000000'}
324 -+
325 -+ do_execsql_test 3.5 {
326 -+ UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
327 -+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
328 -+ } {X'0100000006000000'}
329 -+
330 -+ do_execsql_test 3.6 {
331 -+ REPLACE INTO t3(docid, content) VALUES (3, 'one two');
332 -+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
333 -+ } {X'0100000002000000'}
334 -+
335 -+ do_execsql_test 3.7 {
336 -+ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four');
337 -+ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four five six');
338 -+ SELECT docid FROM t3;
339 -+ } {3 4 5}
340 -+
341 -+ do_execsql_test 3.8 {
342 -+ UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
343 -+ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
344 -+ } {X'0200000002000000'}
345 -+}
346 -
347 - #-------------------------------------------------------------------------
348 - # Test that the xSavepoint is invoked correctly if the first write
349
350 diff --git a/dev-db/sqlite/files/sqlite-3.21.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.21.0-full_archive-build.patch
351 deleted file mode 100644
352 index dfc01c88b56..00000000000
353 --- a/dev-db/sqlite/files/sqlite-3.21.0-full_archive-build.patch
354 +++ /dev/null
355 @@ -1,153 +0,0 @@
356 -Link executables against libsqlite3.so.
357 -Increase timeout for fuzzcheck.
358 -Fix building with dlopen() not available.
359 -
360 ---- /Makefile.in
361 -+++ /Makefile.in
362 -@@ -600,25 +600,25 @@
363 -
364 - libtclsqlite3.la: tclsqlite.lo libsqlite3.la
365 - $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
366 -- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
367 -+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
368 - -rpath "$(TCLLIBDIR)" \
369 - -version-info "8:6:8" \
370 - -avoid-version
371 -
372 --sqlite3$(TEXE): shell.c sqlite3.c
373 -- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
374 -- shell.c sqlite3.c \
375 -- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
376 -+sqlite3$(TEXE): shell.c libsqlite3.la
377 -+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
378 -+ shell.c libsqlite3.la \
379 -+ $(LIBREADLINE)
380 -
381 --sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
382 -- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
383 -+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
384 -+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
385 -
386 --dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
387 -- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
388 -+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
389 -+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
390 -
391 --scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
392 -+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
393 - $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
394 -- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
395 -+ $(TOP)/ext/misc/scrub.c libsqlite3.la
396 -
397 - srcck1$(BEXE): $(TOP)/tool/srcck1.c
398 - $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
399 -@@ -694,7 +694,7 @@
400 - # Rule to build the amalgamation
401 - #
402 - sqlite3.lo: sqlite3.c
403 -- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
404 -+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
405 -
406 - # Rules to build the LEMON compiler generator
407 - #
408 -@@ -1145,13 +1145,13 @@
409 -
410 - # Fuzz testing
411 - fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
412 -- ./fuzzcheck$(TEXE) $(FUZZDATA)
413 -+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
414 -
415 - fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
416 -- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
417 -+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
418 -
419 - valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
420 -- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
421 -+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
422 -
423 - # The veryquick.test TCL tests.
424 - #
425 -@@ -1181,30 +1181,30 @@
426 - smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
427 - ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
428 -
429 --sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
430 -+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
431 - $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
432 -
433 --sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
434 -- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
435 -+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
436 -+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
437 -
438 --dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
439 -+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
440 - $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
441 -- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
442 -+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
443 -
444 --showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
445 -- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
446 -+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
447 -+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
448 -
449 --showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
450 -- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
451 -+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
452 -+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
453 -
454 --showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
455 -- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
456 -+showjournal$(TEXE): $(TOP)/tool/showjournal.c
457 -+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
458 -
459 --showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
460 -- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
461 -+showwal$(TEXE): $(TOP)/tool/showwal.c
462 -+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
463 -
464 --changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
465 -- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
466 -+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
467 -+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
468 -
469 - rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
470 - $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
471 -@@ -1223,11 +1223,11 @@
472 - kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
473 - $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
474 -
475 --rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
476 -- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
477 -+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
478 -+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
479 -
480 --loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
481 -- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
482 -+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
483 -+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
484 -
485 - # This target will fail if the SQLite amalgamation contains any exported
486 - # symbols that do not begin with "sqlite3_". It is run as part of the
487 ---- /configure.ac
488 -+++ /configure.ac
489 -@@ -584,6 +584,9 @@
490 - if test "${use_loadextension}" = "yes" ; then
491 - OPT_FEATURE_FLAGS=""
492 - AC_SEARCH_LIBS(dlopen, dl)
493 -+ if test "${ac_cv_search_dlopen}" = "no" ; then
494 -+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
495 -+ fi
496 - else
497 - OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
498 - fi
499 ---- /tool/sqlite3_analyzer.c.in
500 -+++ /tool/sqlite3_analyzer.c.in
501 -@@ -14,7 +14,6 @@
502 - #define SQLITE_DEFAULT_MEMSTATUS 0
503 - #define SQLITE_MAX_EXPR_DEPTH 0
504 - #define SQLITE_OMIT_LOAD_EXTENSION 1
505 --INCLUDE sqlite3.c
506 - INCLUDE $ROOT/src/tclsqlite.c
507 -
508 - const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
509
510 diff --git a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-build.patch
511 deleted file mode 100644
512 index 5e1236a4e96..00000000000
513 --- a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-build.patch
514 +++ /dev/null
515 @@ -1,405 +0,0 @@
516 -Move some code to libsqlite3.so to avoid duplication.
517 -Link executables against libsqlite3.so.
518 -Increase timeout for fuzzcheck.
519 -Fix building with dlopen() not available.
520 -
521 ---- /Makefile.in
522 -+++ /Makefile.in
523 -@@ -307,6 +307,9 @@
524 - # Source code for extensions
525 - #
526 - SRC += \
527 -+ $(TOP)/ext/expert/sqlite3expert.c \
528 -+ $(TOP)/ext/expert/sqlite3expert.h
529 -+SRC += \
530 - $(TOP)/ext/fts1/fts1.c \
531 - $(TOP)/ext/fts1/fts1.h \
532 - $(TOP)/ext/fts1/fts1_hash.c \
533 -@@ -355,8 +358,11 @@
534 - $(TOP)/ext/rbu/sqlite3rbu.h \
535 - $(TOP)/ext/rbu/sqlite3rbu.c
536 - SRC += \
537 -+ $(TOP)/ext/misc/appendvfs.c \
538 - $(TOP)/ext/misc/json1.c \
539 -- $(TOP)/ext/misc/stmt.c
540 -+ $(TOP)/ext/misc/sqlar.c \
541 -+ $(TOP)/ext/misc/stmt.c \
542 -+ $(TOP)/ext/misc/zipfile.c
543 -
544 - # Generated source code files
545 - #
546 -@@ -425,7 +431,6 @@
547 - # Statically linked extensions
548 - #
549 - TESTSRC += \
550 -- $(TOP)/ext/expert/sqlite3expert.c \
551 - $(TOP)/ext/expert/test_expert.c \
552 - $(TOP)/ext/misc/amatch.c \
553 - $(TOP)/ext/misc/carray.c \
554 -@@ -447,8 +452,7 @@
555 - $(TOP)/ext/misc/spellfix.c \
556 - $(TOP)/ext/misc/totype.c \
557 - $(TOP)/ext/misc/unionvtab.c \
558 -- $(TOP)/ext/misc/wholenumber.c \
559 -- $(TOP)/ext/misc/zipfile.c
560 -+ $(TOP)/ext/misc/wholenumber.c
561 -
562 - # Source code to the library files needed by the test fixture
563 - #
564 -@@ -610,25 +614,25 @@
565 -
566 - libtclsqlite3.la: tclsqlite.lo libsqlite3.la
567 - $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
568 -- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
569 -+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
570 - -rpath "$(TCLLIBDIR)" \
571 - -version-info "8:6:8" \
572 - -avoid-version
573 -
574 --sqlite3$(TEXE): shell.c sqlite3.c
575 -- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
576 -- shell.c sqlite3.c \
577 -- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
578 -+sqlite3$(TEXE): shell.c libsqlite3.la
579 -+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
580 -+ shell.c libsqlite3.la \
581 -+ $(LIBREADLINE)
582 -
583 --sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
584 -- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
585 -+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
586 -+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
587 -
588 --dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
589 -- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
590 -+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
591 -+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
592 -
593 --scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
594 -+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
595 - $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
596 -- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
597 -+ $(TOP)/ext/misc/scrub.c libsqlite3.la
598 -
599 - srcck1$(BEXE): $(TOP)/tool/srcck1.c
600 - $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
601 -@@ -704,7 +708,7 @@
602 - # Rule to build the amalgamation
603 - #
604 - sqlite3.lo: sqlite3.c
605 -- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
606 -+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
607 -
608 - # Rules to build the LEMON compiler generator
609 - #
610 -@@ -995,14 +999,9 @@
611 - # Source files that go into making shell.c
612 - SHELL_SRC = \
613 - $(TOP)/src/shell.c.in \
614 -- $(TOP)/ext/misc/appendvfs.c \
615 - $(TOP)/ext/misc/shathree.c \
616 - $(TOP)/ext/misc/fileio.c \
617 - $(TOP)/ext/misc/completion.c \
618 -- $(TOP)/ext/misc/sqlar.c \
619 -- $(TOP)/ext/expert/sqlite3expert.c \
620 -- $(TOP)/ext/expert/sqlite3expert.h \
621 -- $(TOP)/ext/misc/zipfile.c \
622 - $(TOP)/src/test_windirent.c
623 -
624 - shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
625 -@@ -1161,13 +1160,13 @@
626 -
627 - # Fuzz testing
628 - fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
629 -- ./fuzzcheck$(TEXE) $(FUZZDATA)
630 -+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
631 -
632 - fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
633 -- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
634 -+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
635 -
636 - valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
637 -- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
638 -+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
639 -
640 - # The veryquick.test TCL tests.
641 - #
642 -@@ -1197,24 +1196,23 @@
643 - smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
644 - ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
645 -
646 --sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
647 -+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
648 - $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
649 -
650 --sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
651 -- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
652 -+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
653 -+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
654 -
655 --sqltclsh.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/ext/misc/appendvfs.c $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
656 -+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
657 - $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
658 -
659 --sqltclsh$(TEXE): sqltclsh.c
660 -- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
661 -+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
662 -+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
663 -
664 --sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
665 -- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
666 -+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
667 -+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
668 -
669 - CHECKER_DEPS =\
670 - $(TOP)/tool/mkccode.tcl \
671 -- sqlite3.c \
672 - $(TOP)/src/tclsqlite.c \
673 - $(TOP)/ext/repair/sqlite3_checker.tcl \
674 - $(TOP)/ext/repair/checkindex.c \
675 -@@ -1225,30 +1223,30 @@
676 - sqlite3_checker.c: $(CHECKER_DEPS)
677 - $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
678 -
679 --sqlite3_checker$(TEXE): sqlite3_checker.c
680 -- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
681 -+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
682 -+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
683 -
684 --dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
685 -+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
686 - $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
687 -- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
688 -+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
689 -
690 --showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
691 -- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
692 -+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
693 -+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
694 -
695 --showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
696 -- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
697 -+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
698 -+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
699 -
700 --showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
701 -- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
702 -+showjournal$(TEXE): $(TOP)/tool/showjournal.c
703 -+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
704 -
705 --showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
706 -- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
707 -+showwal$(TEXE): $(TOP)/tool/showwal.c
708 -+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
709 -
710 - showshm$(TEXE): $(TOP)/tool/showshm.c
711 - $(LTLINK) -o $@ $(TOP)/tool/showshm.c
712 -
713 --changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
714 -- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
715 -+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
716 -+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
717 -
718 - rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
719 - $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
720 -@@ -1267,11 +1265,11 @@
721 - kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
722 - $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
723 -
724 --rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
725 -- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
726 -+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
727 -+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
728 -
729 --loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
730 -- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
731 -+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
732 -+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
733 -
734 - # This target will fail if the SQLite amalgamation contains any exported
735 - # symbols that do not begin with "sqlite3_". It is run as part of the
736 ---- /configure.ac
737 -+++ /configure.ac
738 -@@ -590,6 +590,9 @@
739 - if test "${use_loadextension}" = "yes" ; then
740 - OPT_FEATURE_FLAGS=""
741 - AC_SEARCH_LIBS(dlopen, dl)
742 -+ if test "${ac_cv_search_dlopen}" = "no" ; then
743 -+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
744 -+ fi
745 - else
746 - OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
747 - fi
748 ---- /ext/misc/sqlar.c
749 -+++ /ext/misc/sqlar.c
750 -@@ -14,6 +14,8 @@
751 - ** for working with sqlar archives and used by the shell tool's built-in
752 - ** sqlar support.
753 - */
754 -+#ifdef SQLITE_HAVE_ZLIB
755 -+
756 - #include "sqlite3ext.h"
757 - SQLITE_EXTENSION_INIT1
758 - #include <zlib.h>
759 -@@ -119,3 +121,5 @@
760 - }
761 - return rc;
762 - }
763 -+
764 -+#endif /* SQLITE_HAVE_ZLIB */
765 ---- /ext/misc/zipfile.c
766 -+++ /ext/misc/zipfile.c
767 -@@ -24,6 +24,8 @@
768 - ** * No support for zip64 extensions
769 - ** * Only the "inflate/deflate" (zlib) compression method is supported
770 - */
771 -+#ifdef SQLITE_HAVE_ZLIB
772 -+
773 - #include "sqlite3ext.h"
774 - SQLITE_EXTENSION_INIT1
775 - #include <stdio.h>
776 -@@ -1665,3 +1667,5 @@
777 - (void)pzErrMsg; /* Unused parameter */
778 - return zipfileRegister(db);
779 - }
780 -+
781 -+#endif /* SQLITE_HAVE_ZLIB */
782 ---- /ext/repair/sqlite3_checker.c.in
783 -+++ /ext/repair/sqlite3_checker.c.in
784 -@@ -2,6 +2,7 @@
785 - ** Read an SQLite database file and analyze its space utilization. Generate
786 - ** text on standard output.
787 - */
788 -+#define SQLITE_CORE 1
789 - #define TCLSH_INIT_PROC sqlite3_checker_init_proc
790 - #define SQLITE_ENABLE_DBPAGE_VTAB 1
791 - #define SQLITE_ENABLE_JSON1 1
792 -@@ -14,7 +15,7 @@
793 - #define SQLITE_OMIT_SHARED_CACHE 1
794 - #define SQLITE_DEFAULT_MEMSTATUS 0
795 - #define SQLITE_MAX_EXPR_DEPTH 0
796 --INCLUDE sqlite3.c
797 -+#include "sqlite3.h"
798 - INCLUDE $ROOT/src/tclsqlite.c
799 - INCLUDE $ROOT/ext/misc/btreeinfo.c
800 - INCLUDE $ROOT/ext/repair/checkindex.c
801 ---- /src/shell.c.in
802 -+++ /src/shell.c.in
803 -@@ -61,6 +61,7 @@
804 - #include <stdio.h>
805 - #include <assert.h>
806 - #include "sqlite3.h"
807 -+#include "ext/expert/sqlite3expert.h"
808 - typedef sqlite3_int64 i64;
809 - typedef sqlite3_uint64 u64;
810 - typedef unsigned char u8;
811 -@@ -124,6 +125,10 @@
812 - # define SHELL_USE_LOCAL_GETLINE 1
813 - #endif
814 -
815 -+#ifdef SQLITE_HAVE_ZLIB
816 -+#include <zlib.h>
817 -+#endif
818 -+
819 -
820 - #if defined(_WIN32) || defined(WIN32)
821 - # include <io.h>
822 -@@ -963,13 +968,6 @@
823 - INCLUDE ../ext/misc/shathree.c
824 - INCLUDE ../ext/misc/fileio.c
825 - INCLUDE ../ext/misc/completion.c
826 --INCLUDE ../ext/misc/appendvfs.c
827 --#ifdef SQLITE_HAVE_ZLIB
828 --INCLUDE ../ext/misc/zipfile.c
829 --INCLUDE ../ext/misc/sqlar.c
830 --#endif
831 --INCLUDE ../ext/expert/sqlite3expert.h
832 --INCLUDE ../ext/expert/sqlite3expert.c
833 -
834 - #if defined(SQLITE_ENABLE_SESSION)
835 - /*
836 -@@ -3467,7 +3465,9 @@
837 - sqlite3_shathree_init(p->db, 0, 0);
838 - sqlite3_completion_init(p->db, 0, 0);
839 - #ifdef SQLITE_HAVE_ZLIB
840 -+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
841 - sqlite3_zipfile_init(p->db, 0, 0);
842 -+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
843 - sqlite3_sqlar_init(p->db, 0, 0);
844 - #endif
845 - sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
846 -@@ -5316,6 +5316,7 @@
847 - }
848 - sqlite3_fileio_init(cmd.db, 0, 0);
849 - #ifdef SQLITE_HAVE_ZLIB
850 -+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
851 - sqlite3_sqlar_init(cmd.db, 0, 0);
852 - #endif
853 - sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
854 -@@ -8222,6 +8223,7 @@
855 - #endif
856 - }
857 - data.out = stdout;
858 -+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
859 - sqlite3_appendvfs_init(0,0,0);
860 -
861 - /* Go ahead and open the database file if it already exists. If the
862 ---- /tool/mksqlite3c.tcl
863 -+++ /tool/mksqlite3c.tcl
864 -@@ -116,6 +116,7 @@
865 - rtree.h
866 - sqlite3session.h
867 - sqlite3.h
868 -+ sqlite3expert.h
869 - sqlite3ext.h
870 - sqlite3rbu.h
871 - sqliteicu.h
872 -@@ -399,6 +400,10 @@
873 - json1.c
874 - fts5.c
875 - stmt.c
876 -+ appendvfs.c
877 -+ sqlar.c
878 -+ sqlite3expert.c
879 -+ zipfile.c
880 - } {
881 - copy_file tsrc/$file
882 - }
883 ---- /tool/sqlite3_analyzer.c.in
884 -+++ /tool/sqlite3_analyzer.c.in
885 -@@ -14,9 +14,6 @@
886 - #define SQLITE_DEFAULT_MEMSTATUS 0
887 - #define SQLITE_MAX_EXPR_DEPTH 0
888 - #define SQLITE_OMIT_LOAD_EXTENSION 1
889 --#ifndef USE_EXTERNAL_SQLITE
890 --INCLUDE sqlite3.c
891 --#endif
892 - INCLUDE $ROOT/src/tclsqlite.c
893 -
894 - const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
895 ---- /tool/sqltclsh.c.in
896 -+++ /tool/sqltclsh.c.in
897 -@@ -27,19 +27,17 @@
898 - #define SQLITE_OMIT_SHARED_CACHE 1
899 - #define SQLITE_DEFAULT_MEMSTATUS 0
900 - #define SQLITE_MAX_EXPR_DEPTH 0
901 --INCLUDE sqlite3.c
902 --INCLUDE $ROOT/ext/misc/appendvfs.c
903 --#ifdef SQLITE_HAVE_ZLIB
904 --INCLUDE $ROOT/ext/misc/zipfile.c
905 --INCLUDE $ROOT/ext/misc/sqlar.c
906 --#endif
907 -+#include "sqlite3.h"
908 - INCLUDE $ROOT/src/tclsqlite.c
909 -
910 - const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
911 - (void)interp;
912 -+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
913 - sqlite3_appendvfs_init(0,0,0);
914 - #ifdef SQLITE_HAVE_ZLIB
915 -+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
916 - sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
917 -+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
918 - sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
919 - #endif
920 -
921
922 diff --git a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-headers.patch b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-headers.patch
923 deleted file mode 100644
924 index 751f00a62bd..00000000000
925 --- a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-headers.patch
926 +++ /dev/null
927 @@ -1,15 +0,0 @@
928 -https://sqlite.org/src/info/6185d190e250faae
929 -
930 ---- /src/sqlite3ext.h
931 -+++ /src/sqlite3ext.h
932 -@@ -563,8 +563,8 @@
933 - #define sqlite3_value_pointer sqlite3_api->value_pointer
934 - /* Version 3.22.0 and later */
935 - #define sqlite3_vtab_nochange sqlite3_api->vtab_nochange
936 --#define sqlite3_value_nochange sqltie3_api->value_nochange
937 --#define sqlite3_vtab_collation sqltie3_api->vtab_collation
938 -+#define sqlite3_value_nochange sqlite3_api->value_nochange
939 -+#define sqlite3_vtab_collation sqlite3_api->vtab_collation
940 - #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
941 -
942 - #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
943
944 diff --git a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-tests.patch b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-tests.patch
945 deleted file mode 100644
946 index a253028b7f4..00000000000
947 --- a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-tests.patch
948 +++ /dev/null
949 @@ -1,249 +0,0 @@
950 -https://sqlite.org/src/info/e4766cabdf64d8e9
951 -https://sqlite.org/src/info/d9e59cfb8476e1ec
952 -https://sqlite.org/src/info/ba0631de60ca38bf
953 -https://sqlite.org/src/info/b685d3231097fb90
954 -
955 ---- /test/fts3rank.test
956 -+++ /test/fts3rank.test
957 -@@ -14,7 +14,7 @@
958 -
959 - set testdir [file dirname $argv0]
960 - source $testdir/tester.tcl
961 --set testprefix fts3expr5
962 -+set testprefix fts3rank
963 -
964 - # If SQLITE_ENABLE_FTS3 is defined, omit this file.
965 - ifcapable !fts3 {
966 -@@ -56,9 +56,14 @@
967 - SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
968 - } {0 {{one two} one {one two} three {one two} two}}
969 -
970 --do_catchsql_test 1.5 {
971 -- SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
972 --} {1 {invalid matchinfo blob passed to function rank()}}
973 -+if {$tcl_platform(byteOrder)=="littleEndian"} {
974 -+ do_catchsql_test 1.5le {
975 -+ SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
976 -+ } {1 {invalid matchinfo blob passed to function rank()}}
977 -+} else {
978 -+ do_catchsql_test 1.5be {
979 -+ SELECT * FROM t1 ORDER BY rank(x'0000000100000001') DESC, rowid
980 -+ } {1 {invalid matchinfo blob passed to function rank()}}
981 -+}
982 -
983 - finish_test
984 --
985 ---- /test/func6.test
986 -+++ /test/func6.test
987 -@@ -33,54 +33,125 @@
988 - CREATE TABLE t2(x TEXT PRIMARY KEY, y) WITHOUT ROWID;
989 - INSERT INTO t2(x,y) SELECT a, b FROM t1;
990 - }
991 -+
992 -+# Load the contents of $file from disk and return it encoded as a hex
993 -+# string.
994 -+proc loadhex {file} {
995 -+ set fd [open $file]
996 -+ fconfigure $fd -translation binary -encoding binary
997 -+ set data [read $fd]
998 -+ close $fd
999 -+ binary encode hex $data
1000 -+}
1001 -+
1002 -+# Each argument is either an integer between 0 and 65535, a text value, or
1003 -+# an empty string representing an SQL NULL. This command builds an SQLite
1004 -+# record containing the values passed as arguments and returns it encoded
1005 -+# as a hex string.
1006 -+proc hexrecord {args} {
1007 -+ set hdr ""
1008 -+ set body ""
1009 -+ foreach x $args {
1010 -+ if {$x==""} {
1011 -+ append hdr 00
1012 -+ } elseif {[string is integer $x]==0} {
1013 -+ set n [string length $x]
1014 -+ append hdr [format %02x [expr $n*2 + 13]]
1015 -+ append body [binary encode hex $x]
1016 -+ } elseif {$x == 0} {
1017 -+ append hdr 08
1018 -+ } elseif {$x == 1} {
1019 -+ append hdr 09
1020 -+ } elseif {$x <= 127} {
1021 -+ append hdr 01
1022 -+ append body [format %02x $x]
1023 -+ } else {
1024 -+ append hdr 02
1025 -+ append body [format %04x $x]
1026 -+ }
1027 -+ }
1028 -+ set res [format %02x [expr 1 + [string length $hdr]/2]]
1029 -+ append res $hdr
1030 -+ append res $body
1031 -+}
1032 -+
1033 -+# Argument $off is an offset into the database image encoded as a hex string
1034 -+# in argument $hexdb. This command returns 0 if the offset contains the hex
1035 -+# $hexrec, or throws an exception otherwise.
1036 -+#
1037 -+proc offset_contains_record {off hexdb hexrec} {
1038 -+ set n [string length $hexrec]
1039 -+ set off [expr $off*2]
1040 -+ if { [string compare $hexrec [string range $hexdb $off [expr $off+$n-1]]] } {
1041 -+ error "record not found!"
1042 -+ }
1043 -+ return 0
1044 -+}
1045 -+
1046 -+# This command is the implementation of SQL function "offrec()". The first
1047 -+# argument to this is an offset value. The remaining values are used to
1048 -+# formulate an SQLite record. If database file test.db does not contain
1049 -+# an equivalent record at the specified offset, an exception is thrown.
1050 -+# Otherwise, 0 is returned.
1051 -+#
1052 -+proc offrec {args} {
1053 -+ set offset [lindex $args 0]
1054 -+ set rec [hexrecord {*}[lrange $args 1 end]]
1055 -+ offset_contains_record $offset $::F $rec
1056 -+}
1057 -+set F [loadhex test.db]
1058 -+db func offrec offrec
1059 -+
1060 -+# Test the sanity of the tests.
1061 -+do_execsql_test func6-105 {
1062 -+ SELECT sqlite_offset(d) FROM t1 ORDER BY rowid LIMIT 1;
1063 -+} {8179}
1064 -+do_test func6-106 {
1065 -+ set r [hexrecord abc001 1 999 {}]
1066 -+ offset_contains_record 8179 $F $r
1067 -+} 0
1068 -+
1069 -+set z100 [string trim [string repeat "0 " 100]]
1070 -+
1071 -+# Test offsets within table b-tree t1.
1072 - do_execsql_test func6-110 {
1073 -- SELECT a, sqlite_offset(d)/4096 + 1,
1074 -- sqlite_offset(d)%4096 FROM t1
1075 -- ORDER BY rowid LIMIT 2;
1076 --} {abc001 2 4084 abc002 2 4069}
1077 -+ SELECT offrec(sqlite_offset(d), a, b, c, d) FROM t1 ORDER BY rowid
1078 -+} $z100
1079 -+
1080 - do_execsql_test func6-120 {
1081 - SELECT a, typeof(sqlite_offset(+a)) FROM t1
1082 - ORDER BY rowid LIMIT 2;
1083 - } {abc001 null abc002 null}
1084 -+
1085 -+# Test offsets within index b-tree t1a.
1086 - do_execsql_test func6-130 {
1087 -- SELECT a, sqlite_offset(a)/4096+1,
1088 -- sqlite_offset(a)%4096
1089 -- FROM t1
1090 -- ORDER BY a LIMIT 2;
1091 --} {abc001 3 4087 abc002 3 4076}
1092 -+ SELECT offrec(sqlite_offset(a), a, rowid) FROM t1 ORDER BY a
1093 -+} $z100
1094 -+
1095 -+# Test offsets within table b-tree t1 with a temp b-tree ORDER BY.
1096 - do_execsql_test func6-140 {
1097 -- SELECT a, sqlite_offset(d)/4096+1,
1098 -- sqlite_offset(d)%4096
1099 -- FROM t1
1100 -- ORDER BY a LIMIT 2;
1101 --} {abc001 2 4084 abc002 2 4069}
1102 -+ SELECT offrec(sqlite_offset(d), a, b, c, d) FROM t1 ORDER BY a
1103 -+} $z100
1104 -+
1105 -+# Test offsets from both index t1a and table t1 in the same query.
1106 - do_execsql_test func6-150 {
1107 -- SELECT a,
1108 -- sqlite_offset(a)/4096+1,
1109 -- sqlite_offset(a)%4096,
1110 -- sqlite_offset(d)/4096+1,
1111 -- sqlite_offset(d)%4096
1112 -- FROM t1
1113 -- ORDER BY a LIMIT 2;
1114 --} {abc001 3 4087 2 4084 abc002 3 4076 2 4069}
1115 --do_execsql_test func6-160 {
1116 -- SELECT b,
1117 -- sqlite_offset(b)/4096+1,
1118 -- sqlite_offset(b)%4096,
1119 -- sqlite_offset(c)/4096+1,
1120 -- sqlite_offset(c)%4096,
1121 -- sqlite_offset(d)/4096+1,
1122 -- sqlite_offset(d)%4096
1123 -- FROM t1
1124 -- ORDER BY b LIMIT 2;
1125 --} {1 4 4090 4 4090 2 4084 2 4 4081 4 4081 2 4069}
1126 -+ SELECT offrec(sqlite_offset(a), a, rowid),
1127 -+ offrec(sqlite_offset(d), a, b, c, d)
1128 -+ FROM t1 ORDER BY a
1129 -+} [concat $z100 $z100]
1130 -
1131 -+# Test offsets from both index t1bc and table t1 in the same query.
1132 -+do_execsql_test func6-160 {
1133 -+ SELECT offrec(sqlite_offset(b), b, c, rowid),
1134 -+ offrec(sqlite_offset(c), b, c, rowid),
1135 -+ offrec(sqlite_offset(d), a, b, c, d)
1136 -+ FROM t1
1137 -+ ORDER BY b
1138 -+} [concat $z100 $z100 $z100]
1139 -
1140 -+# Test offsets in WITHOUT ROWID table t2.
1141 - do_execsql_test func6-200 {
1142 -- SELECT y, sqlite_offset(y)/4096+1,
1143 -- sqlite_offset(y)%4096
1144 -- FROM t2
1145 -- ORDER BY x LIMIT 2;
1146 --} {1 5 4087 2 5 4076}
1147 -+ SELECT offrec( sqlite_offset(y), x, y ) FROM t2 ORDER BY x
1148 -+} $z100
1149 -
1150 - finish_test
1151 ---- /test/walro2.test
1152 -+++ /test/walro2.test
1153 -@@ -39,6 +39,18 @@
1154 - }
1155 - }
1156 -
1157 -+# Most systems allocate the *-shm file in 32KB trunks. But on UNIX systems
1158 -+# for which the getpagesize() call returns greater than 32K, the *-shm
1159 -+# file is allocated in page-sized units (since you cannot mmap part of
1160 -+# a page). The following code sets variable $MINSHMSZ to the smallest
1161 -+# possible *-shm file (i.e. the greater of 32KB and the system page-size).
1162 -+#
1163 -+do_execsql_test 0.0 {
1164 -+ PRAGMA journal_mode = wal;
1165 -+ CREATE TABLE t1(x);
1166 -+} {wal}
1167 -+set MINSHMSZ [file size test.db-shm]
1168 -+
1169 - foreach bZeroShm {0 1} {
1170 - set TN [expr $bZeroShm+1]
1171 - do_multiclient_test tn {
1172 -@@ -169,7 +181,7 @@
1173 - } {a b c d e f g h 1 2}
1174 - do_test $TN.3.2.2 {
1175 - list [file size test.db-wal] [file size test.db-shm]
1176 -- } {0 32768}
1177 -+ } [list 0 $MINSHMSZ]
1178 -
1179 - do_test $TN.3.3.0 {
1180 - code2 { sqlite3 db2 test.db }
1181 -@@ -182,7 +194,7 @@
1182 - code2 { db2 close }
1183 - code1 { db close }
1184 - list [file size test.db-wal] [file size test.db-shm]
1185 -- } [list [wal_file_size 4 1024] 32768]
1186 -+ } [list [wal_file_size 4 1024] $MINSHMSZ]
1187 - do_test $TN.3.3.1 {
1188 - code1 { sqlite3 db file:test.db?readonly_shm=1 }
1189 - sql1 { SELECT * FROM t1 }
1190 -@@ -196,7 +208,7 @@
1191 - }
1192 - code2 { db2 close }
1193 - list [file size test.db-wal] [file size test.db-shm]
1194 -- } [list [wal_file_size 4 1024] 32768]
1195 -+ } [list [wal_file_size 4 1024] $MINSHMSZ]
1196 - do_test $TN.3.3.3 {
1197 - sql1 { SELECT * FROM t1 }
1198 - } {i ii}