Gentoo Archives: gentoo-commits

From: "Jakov Smolić" <jsmolic@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/files/, dev-db/sqlite/
Date: Wed, 02 Feb 2022 12:22:02
Message-Id: 1643804047.6911314208cb54f79a643db77f6eba7874fd0d8a.jsmolic@gentoo
1 commit: 6911314208cb54f79a643db77f6eba7874fd0d8a
2 Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 2 11:10:26 2022 +0000
4 Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 2 12:14:07 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69113142
7
8 dev-db/sqlite: drop 3.35.5, 3.37.0
9
10 Starting with version 3.37.2 we're no longer carrying custom
11 undocumented patchset in stable versions of sqlite. Given that there was
12 no clear rationale behind adding these patches and no consumers in
13 Gentoo that actually use the functionality enabled we are removing them.
14
15 Closes: https://bugs.gentoo.org/825278
16 Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
17
18 dev-db/sqlite/Manifest | 4 -
19 dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch | 375 ----------------
20 dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch | 500 ----------------------
21 dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch | 292 -------------
22 dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch | 441 -------------------
23 dev-db/sqlite/sqlite-3.35.5.ebuild | 428 ------------------
24 dev-db/sqlite/sqlite-3.37.0.ebuild | 428 ------------------
25 7 files changed, 2468 deletions(-)
26
27 diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
28 index 7fe97b8231a8..1f04fd8148ec 100644
29 --- a/dev-db/sqlite/Manifest
30 +++ b/dev-db/sqlite/Manifest
31 @@ -1,6 +1,2 @@
32 -DIST sqlite-doc-3350500.zip 10205830 BLAKE2B e078713786522f8da7984df6ddf62671c24ec5381cac88fe976c97fcdf4800cff8dc1a595df9c9010c687c9929cb5ab070957f8ccbc0b5e8bd7add88ae9a0514 SHA512 2da5357623f4db7003f46ec7ea8bdd8a794ad6e1be9a25a8ebccfe5222da43eabc32d9d17acfd7766aa4cf1fd010e476a8087fab78ac6f6596c7c5b8a06de685
33 -DIST sqlite-doc-3370000.zip 6094848 BLAKE2B 7008936db7a744ace0e8ce10b7b3386d6075589fa1c178449c1065592f3a90f3325eed2d978e946e1766685814ad84ab39a20bcd1b94ea4cf2afb1a5952ec82b SHA512 37a764ba98d855a726998754605b501cdc887e02edbc75c19eab01916cea9659cf3bbf4baa120e3de2fbe298d00dd6ff1a09966f3a69b39f67c23baa94a67f01
34 DIST sqlite-doc-3370200.zip 10542395 BLAKE2B 129ae0bac8099eb2571cc31ded186ed6c166c1b31af493047608ffb63ac7a90ccbaa5df733661c92660d2436bab6e3796f92e42ac8bb4154ff15212afc74b9b0 SHA512 02c68a3906aee3fd05a4340549144032a239e5ab885d9b3b09236ed2b74a90c770de373e4ca9f99e72f92df090d0fb6789213fb361e954d9dd6709af20336857
35 -DIST sqlite-src-3350500.zip 12819198 BLAKE2B 0f0d39cd663d78a3c698df62dd533019c32244e8c998e625354cb069f5839cc374476b825e2e2a6408916301333a9954c0c7b9cbab5493522fdffe8859f9b6a5 SHA512 f9afd11b3c42a8241f91e2ecafc3928e7391cc0f1fbee236b8122c2d3ca922d0c82d2605968b131351b6c5e38f983f8eed29b86c94cfa72799e2387b3b3db561
36 -DIST sqlite-src-3370000.zip 13141152 BLAKE2B 72e3ba37dcc1e10ab822ce080319c98e67aae5092946fb32c0da02bf3fd50e043c0e35b807270f2f20aee5fd53ecdf125113571f807f2facf1d9033f5e84d7a6 SHA512 5a3c358c42782bc248a0795ca78a10d834861f98ab0a021a05d8358ba1716f3febb3da29ded187dfd205902f77bbf284ed3207aabe4979b68b90d0557d1676f7
37 DIST sqlite-src-3370200.zip 13145234 BLAKE2B 296eb8ac0e83552c348847ea1d0b06ce1b610ca1f53d8b56fa872196ccdc29c343a3b5cc671716854950c97425f8a5b78968e1b22c137ea1ff3bf386e94d8acc SHA512 2db103965934bb34c8336cf82ff7d77e75dc1ca00fa6324ac5697f3bf4b41bffff355dec7593515a68816449e5c9827a9503f6d7841c4c13981c231d3414ff76
38
39 diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch
40 deleted file mode 100644
41 index 1506f3da93e7..000000000000
42 --- a/dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch
43 +++ /dev/null
44 @@ -1,375 +0,0 @@
45 -Add initialization functions for internal usage in libsqlite3.so.
46 -
47 -SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
48 -
49 ---- /ext/misc/amatch.c
50 -+++ /ext/misc/amatch.c
51 -@@ -1480,9 +1480,18 @@
52 -
53 - #endif /* SQLITE_OMIT_VIRTUALTABLE */
54 -
55 -+int sqlite3AmatchInit(sqlite3 *db){
56 -+ int rc = SQLITE_OK;
57 -+#ifndef SQLITE_OMIT_VIRTUALTABLE
58 -+ rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
59 -+#endif /* SQLITE_OMIT_VIRTUALTABLE */
60 -+ return rc;
61 -+}
62 -+
63 - /*
64 - ** Register the amatch virtual table
65 - */
66 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
67 - #ifdef _WIN32
68 - __declspec(dllexport)
69 - #endif
70 -@@ -1491,11 +1500,8 @@
71 - char **pzErrMsg,
72 - const sqlite3_api_routines *pApi
73 - ){
74 -- int rc = SQLITE_OK;
75 - SQLITE_EXTENSION_INIT2(pApi);
76 - (void)pzErrMsg; /* Not used */
77 --#ifndef SQLITE_OMIT_VIRTUALTABLE
78 -- rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
79 --#endif /* SQLITE_OMIT_VIRTUALTABLE */
80 -- return rc;
81 -+ return sqlite3AmatchInit(db);
82 - }
83 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
84 ---- /ext/misc/carray.c
85 -+++ /ext/misc/carray.c
86 -@@ -498,16 +498,8 @@
87 -
88 - #endif /* SQLITE_OMIT_VIRTUALTABLE */
89 -
90 --#ifdef _WIN32
91 --__declspec(dllexport)
92 --#endif
93 --int sqlite3_carray_init(
94 -- sqlite3 *db,
95 -- char **pzErrMsg,
96 -- const sqlite3_api_routines *pApi
97 --){
98 -+int sqlite3CarrayInit(sqlite3 *db){
99 - int rc = SQLITE_OK;
100 -- SQLITE_EXTENSION_INIT2(pApi);
101 - #ifndef SQLITE_OMIT_VIRTUALTABLE
102 - rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
103 - #ifdef SQLITE_TEST
104 -@@ -519,3 +511,18 @@
105 - #endif /* SQLITE_OMIT_VIRTUALTABLE */
106 - return rc;
107 - }
108 -+
109 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
110 -+#ifdef _WIN32
111 -+__declspec(dllexport)
112 -+#endif
113 -+int sqlite3_carray_init(
114 -+ sqlite3 *db,
115 -+ char **pzErrMsg,
116 -+ const sqlite3_api_routines *pApi
117 -+){
118 -+ SQLITE_EXTENSION_INIT2(pApi);
119 -+ (void)pzErrMsg; /* Unused parameter */
120 -+ return sqlite3CarrayInit(db);
121 -+}
122 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
123 ---- /ext/misc/completion.c
124 -+++ /ext/misc/completion.c
125 -@@ -483,12 +483,13 @@
126 - return rc;
127 - }
128 -
129 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
130 - #ifdef _WIN32
131 - __declspec(dllexport)
132 - #endif
133 - int sqlite3_completion_init(
134 -- sqlite3 *db,
135 -- char **pzErrMsg,
136 -+ sqlite3 *db,
137 -+ char **pzErrMsg,
138 - const sqlite3_api_routines *pApi
139 - ){
140 - int rc = SQLITE_OK;
141 -@@ -499,3 +500,4 @@
142 - #endif
143 - return rc;
144 - }
145 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
146 ---- /ext/misc/csv.c
147 -+++ /ext/misc/csv.c
148 -@@ -928,6 +928,22 @@
149 - #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
150 -
151 -
152 -+int sqlite3CsvInit(sqlite3 *db){
153 -+#ifndef SQLITE_OMIT_VIRTUALTABLE
154 -+ int rc;
155 -+ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
156 -+#ifdef SQLITE_TEST
157 -+ if( rc==SQLITE_OK ){
158 -+ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
159 -+ }
160 -+#endif
161 -+ return rc;
162 -+#else
163 -+ return SQLITE_OK;
164 -+#endif
165 -+}
166 -+
167 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
168 - #ifdef _WIN32
169 - __declspec(dllexport)
170 - #endif
171 -@@ -941,17 +957,8 @@
172 - char **pzErrMsg,
173 - const sqlite3_api_routines *pApi
174 - ){
175 --#ifndef SQLITE_OMIT_VIRTUALTABLE
176 -- int rc;
177 - SQLITE_EXTENSION_INIT2(pApi);
178 -- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
179 --#ifdef SQLITE_TEST
180 -- if( rc==SQLITE_OK ){
181 -- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
182 -- }
183 --#endif
184 -- return rc;
185 --#else
186 -- return SQLITE_OK;
187 --#endif
188 -+ (void)pzErrMsg; /* Unused parameter */
189 -+ return sqlite3CsvInit(db);
190 - }
191 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
192 ---- /ext/misc/dbdata.c
193 -+++ /ext/misc/dbdata.c
194 -@@ -803,7 +803,7 @@
195 - /*
196 - ** Invoke this routine to register the "sqlite_dbdata" virtual table module
197 - */
198 --static int sqlite3DbdataRegister(sqlite3 *db){
199 -+int sqlite3DbdataRegister(sqlite3 *db){
200 - static sqlite3_module dbdata_module = {
201 - 0, /* iVersion */
202 - 0, /* xCreate */
203 -@@ -838,6 +838,7 @@
204 - return rc;
205 - }
206 -
207 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
208 - #ifdef _WIN32
209 - __declspec(dllexport)
210 - #endif
211 -@@ -849,3 +850,4 @@
212 - SQLITE_EXTENSION_INIT2(pApi);
213 - return sqlite3DbdataRegister(db);
214 - }
215 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
216 ---- /ext/misc/decimal.c
217 -+++ /ext/misc/decimal.c
218 -@@ -590,14 +590,7 @@
219 - decimal_free(pB);
220 - }
221 -
222 --#ifdef _WIN32
223 --__declspec(dllexport)
224 --#endif
225 --int sqlite3_decimal_init(
226 -- sqlite3 *db,
227 -- char **pzErrMsg,
228 -- const sqlite3_api_routines *pApi
229 --){
230 -+int sqlite3DecimalInit(sqlite3 *db){
231 - int rc = SQLITE_OK;
232 - static const struct {
233 - const char *zFuncName;
234 -@@ -611,10 +604,6 @@
235 - { "decimal_mul", 2, decimalMulFunc },
236 - };
237 - unsigned int i;
238 -- (void)pzErrMsg; /* Unused parameter */
239 --
240 -- SQLITE_EXTENSION_INIT2(pApi);
241 --
242 - for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
243 - rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
244 - SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
245 -@@ -632,3 +621,20 @@
246 - }
247 - return rc;
248 - }
249 -+
250 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
251 -+#ifdef _WIN32
252 -+__declspec(dllexport)
253 -+#endif
254 -+int sqlite3_decimal_init(
255 -+ sqlite3 *db,
256 -+ char **pzErrMsg,
257 -+ const sqlite3_api_routines *pApi
258 -+){
259 -+ (void)pzErrMsg; /* Unused parameter */
260 -+
261 -+ SQLITE_EXTENSION_INIT2(pApi);
262 -+
263 -+ return sqlite3DecimalInit(db);
264 -+}
265 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
266 ---- /ext/misc/eval.c
267 -+++ /ext/misc/eval.c
268 -@@ -102,6 +102,20 @@
269 - }
270 -
271 -
272 -+int sqlite3EvalInit(sqlite3 *db){
273 -+ int rc = SQLITE_OK;
274 -+ rc = sqlite3_create_function(db, "eval", 1,
275 -+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
276 -+ sqlEvalFunc, 0, 0);
277 -+ if( rc==SQLITE_OK ){
278 -+ rc = sqlite3_create_function(db, "eval", 2,
279 -+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
280 -+ sqlEvalFunc, 0, 0);
281 -+ }
282 -+ return rc;
283 -+}
284 -+
285 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
286 - #ifdef _WIN32
287 - __declspec(dllexport)
288 - #endif
289 -@@ -110,16 +124,8 @@
290 - char **pzErrMsg,
291 - const sqlite3_api_routines *pApi
292 - ){
293 -- int rc = SQLITE_OK;
294 - SQLITE_EXTENSION_INIT2(pApi);
295 - (void)pzErrMsg; /* Unused parameter */
296 -- rc = sqlite3_create_function(db, "eval", 1,
297 -- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
298 -- sqlEvalFunc, 0, 0);
299 -- if( rc==SQLITE_OK ){
300 -- rc = sqlite3_create_function(db, "eval", 2,
301 -- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
302 -- sqlEvalFunc, 0, 0);
303 -- }
304 -- return rc;
305 -+ return sqlite3EvalInit(db);
306 - }
307 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
308 ---- /ext/misc/fileio.c
309 -+++ /ext/misc/fileio.c
310 -@@ -340,7 +340,7 @@
311 - ** This function does the work for the writefile() UDF. Refer to
312 - ** header comments at the top of this file for details.
313 - */
314 --static int writeFile(
315 -+static int writeFileContents(
316 - sqlite3_context *pCtx, /* Context to return bytes written in */
317 - const char *zFile, /* File to write */
318 - sqlite3_value *pData, /* Data to write */
319 -@@ -480,10 +480,10 @@
320 - mtime = sqlite3_value_int64(argv[3]);
321 - }
322 -
323 -- res = writeFile(context, zFile, argv[1], mode, mtime);
324 -+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
325 - if( res==1 && errno==ENOENT ){
326 - if( makeDirectory(zFile)==SQLITE_OK ){
327 -- res = writeFile(context, zFile, argv[1], mode, mtime);
328 -+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
329 - }
330 - }
331 -
332 -@@ -970,18 +970,9 @@
333 - # define fsdirRegister(x) SQLITE_OK
334 - #endif
335 -
336 --#ifdef _WIN32
337 --__declspec(dllexport)
338 --#endif
339 --int sqlite3_fileio_init(
340 -- sqlite3 *db,
341 -- char **pzErrMsg,
342 -- const sqlite3_api_routines *pApi
343 --){
344 -+int sqlite3FileioInit(sqlite3 *db){
345 - int rc = SQLITE_OK;
346 -- SQLITE_EXTENSION_INIT2(pApi);
347 -- (void)pzErrMsg; /* Unused parameter */
348 -- rc = sqlite3_create_function(db, "readfile", 1,
349 -+ rc = sqlite3_create_function(db, "readfile", 1,
350 - SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
351 - readfileFunc, 0, 0);
352 - if( rc==SQLITE_OK ){
353 -@@ -998,3 +989,18 @@
354 - }
355 - return rc;
356 - }
357 -+
358 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
359 -+#ifdef _WIN32
360 -+__declspec(dllexport)
361 -+#endif
362 -+int sqlite3_fileio_init(
363 -+ sqlite3 *db,
364 -+ char **pzErrMsg,
365 -+ const sqlite3_api_routines *pApi
366 -+){
367 -+ SQLITE_EXTENSION_INIT2(pApi);
368 -+ (void)pzErrMsg; /* Unused parameter */
369 -+ return sqlite3FileioInit(db);
370 -+}
371 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
372 ---- /ext/misc/ieee754.c
373 -+++ /ext/misc/ieee754.c
374 -@@ -253,14 +253,7 @@
375 - }
376 -
377 -
378 --#ifdef _WIN32
379 --__declspec(dllexport)
380 --#endif
381 --int sqlite3_ieee_init(
382 -- sqlite3 *db,
383 -- char **pzErrMsg,
384 -- const sqlite3_api_routines *pApi
385 --){
386 -+int sqlite3IeeeInit(sqlite3 *db){
387 - static const struct {
388 - char *zFName;
389 - int nArg;
390 -@@ -277,13 +270,26 @@
391 - };
392 - unsigned int i;
393 - int rc = SQLITE_OK;
394 -- SQLITE_EXTENSION_INIT2(pApi);
395 -- (void)pzErrMsg; /* Unused parameter */
396 - for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
397 -- rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
398 -+ rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
399 - SQLITE_UTF8|SQLITE_INNOCUOUS,
400 - (void*)&aFunc[i].iAux,
401 - aFunc[i].xFunc, 0, 0);
402 - }
403 - return rc;
404 - }
405 -+
406 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
407 -+#ifdef _WIN32
408 -+__declspec(dllexport)
409 -+#endif
410 -+int sqlite3_ieee_init(
411 -+ sqlite3 *db,
412 -+ char **pzErrMsg,
413 -+ const sqlite3_api_routines *pApi
414 -+){
415 -+ SQLITE_EXTENSION_INIT2(pApi);
416 -+ (void)pzErrMsg; /* Unused parameter */
417 -+ return sqlite3IeeeInit(db);
418 -+}
419 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
420
421 diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch
422 deleted file mode 100644
423 index 0c3577fd3a1c..000000000000
424 --- a/dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch
425 +++ /dev/null
426 @@ -1,500 +0,0 @@
427 -Add initialization functions for internal usage in libsqlite3.so.
428 -
429 -SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
430 -
431 ---- /ext/misc/nextchar.c
432 -+++ /ext/misc/nextchar.c
433 -@@ -286,17 +286,8 @@
434 - sqlite3_free(c.aResult);
435 - }
436 -
437 --#ifdef _WIN32
438 --__declspec(dllexport)
439 --#endif
440 --int sqlite3_nextchar_init(
441 -- sqlite3 *db,
442 -- char **pzErrMsg,
443 -- const sqlite3_api_routines *pApi
444 --){
445 -+int sqlite3NextcharInit(sqlite3 *db){
446 - int rc = SQLITE_OK;
447 -- SQLITE_EXTENSION_INIT2(pApi);
448 -- (void)pzErrMsg; /* Unused parameter */
449 - rc = sqlite3_create_function(db, "next_char", 3,
450 - SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
451 - nextCharFunc, 0, 0);
452 -@@ -312,3 +303,18 @@
453 - }
454 - return rc;
455 - }
456 -+
457 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
458 -+#ifdef _WIN32
459 -+__declspec(dllexport)
460 -+#endif
461 -+int sqlite3_nextchar_init(
462 -+ sqlite3 *db,
463 -+ char **pzErrMsg,
464 -+ const sqlite3_api_routines *pApi
465 -+){
466 -+ SQLITE_EXTENSION_INIT2(pApi);
467 -+ (void)pzErrMsg; /* Unused parameter */
468 -+ return sqlite3NextcharInit(db);
469 -+}
470 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
471 ---- /ext/misc/percentile.c
472 -+++ /ext/misc/percentile.c
473 -@@ -202,6 +202,15 @@
474 - }
475 -
476 -
477 -+int sqlite3PercentileInit(sqlite3 *db){
478 -+ int rc = SQLITE_OK;
479 -+ rc = sqlite3_create_function(db, "percentile", 2,
480 -+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
481 -+ 0, percentStep, percentFinal);
482 -+ return rc;
483 -+}
484 -+
485 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
486 - #ifdef _WIN32
487 - __declspec(dllexport)
488 - #endif
489 -@@ -210,11 +219,8 @@
490 - char **pzErrMsg,
491 - const sqlite3_api_routines *pApi
492 - ){
493 -- int rc = SQLITE_OK;
494 - SQLITE_EXTENSION_INIT2(pApi);
495 - (void)pzErrMsg; /* Unused parameter */
496 -- rc = sqlite3_create_function(db, "percentile", 2,
497 -- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
498 -- 0, percentStep, percentFinal);
499 -- return rc;
500 -+ return sqlite3PercentileInit(db);
501 - }
502 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
503 ---- /ext/misc/regexp.c
504 -+++ /ext/misc/regexp.c
505 -@@ -740,10 +740,18 @@
506 - }
507 - }
508 -
509 -+int sqlite3RegexpInit(sqlite3 *db){
510 -+ int rc = SQLITE_OK;
511 -+ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
512 -+ 0, re_sql_func, 0, 0);
513 -+ return rc;
514 -+}
515 -+
516 - /*
517 - ** Invoke this routine to register the regexp() function with the
518 - ** SQLite database connection.
519 - */
520 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
521 - #ifdef _WIN32
522 - __declspec(dllexport)
523 - #endif
524 -@@ -752,9 +760,8 @@
525 - char **pzErrMsg,
526 - const sqlite3_api_routines *pApi
527 - ){
528 -- int rc = SQLITE_OK;
529 - SQLITE_EXTENSION_INIT2(pApi);
530 -- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
531 -- 0, re_sql_func, 0, 0);
532 -- return rc;
533 -+ (void)pzErrMsg; /* Unused parameter */
534 -+ return sqlite3RegexpInit(db);
535 - }
536 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
537 ---- /ext/misc/series.c
538 -+++ /ext/misc/series.c
539 -@@ -423,6 +423,15 @@
540 -
541 - #endif /* SQLITE_OMIT_VIRTUALTABLE */
542 -
543 -+int sqlite3SeriesInit(sqlite3 *db){
544 -+ int rc = SQLITE_OK;
545 -+#ifndef SQLITE_OMIT_VIRTUALTABLE
546 -+ rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
547 -+#endif
548 -+ return rc;
549 -+}
550 -+
551 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
552 - #ifdef _WIN32
553 - __declspec(dllexport)
554 - #endif
555 -@@ -431,7 +440,6 @@
556 - char **pzErrMsg,
557 - const sqlite3_api_routines *pApi
558 - ){
559 -- int rc = SQLITE_OK;
560 - SQLITE_EXTENSION_INIT2(pApi);
561 - #ifndef SQLITE_OMIT_VIRTUALTABLE
562 - if( sqlite3_libversion_number()<3008012 ){
563 -@@ -439,7 +447,7 @@
564 - "generate_series() requires SQLite 3.8.12 or later");
565 - return SQLITE_ERROR;
566 - }
567 -- rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
568 - #endif
569 -- return rc;
570 -+ return sqlite3SeriesInit(db);
571 - }
572 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
573 ---- /ext/misc/sha1.c
574 -+++ /ext/misc/sha1.c
575 -@@ -175,7 +175,7 @@
576 - }
577 -
578 - /* Compute a string using sqlite3_vsnprintf() and hash it */
579 --static void hash_step_vformat(
580 -+static void sha1_hash_step_vformat(
581 - SHA1Context *p, /* Add content to this context */
582 - const char *zFormat,
583 - ...
584 -@@ -306,7 +306,7 @@
585 - nCol = sqlite3_column_count(pStmt);
586 - z = sqlite3_sql(pStmt);
587 - n = (int)strlen(z);
588 -- hash_step_vformat(&cx,"S%d:",n);
589 -+ sha1_hash_step_vformat(&cx,"S%d:",n);
590 - hash_step(&cx,(unsigned char*)z,n);
591 -
592 - /* Compute a hash over the result of the query */
593 -@@ -349,14 +349,14 @@
594 - case SQLITE_TEXT: {
595 - int n2 = sqlite3_column_bytes(pStmt, i);
596 - const unsigned char *z2 = sqlite3_column_text(pStmt, i);
597 -- hash_step_vformat(&cx,"T%d:",n2);
598 -+ sha1_hash_step_vformat(&cx,"T%d:",n2);
599 - hash_step(&cx, z2, n2);
600 - break;
601 - }
602 - case SQLITE_BLOB: {
603 - int n2 = sqlite3_column_bytes(pStmt, i);
604 - const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
605 -- hash_step_vformat(&cx,"B%d:",n2);
606 -+ sha1_hash_step_vformat(&cx,"B%d:",n2);
607 - hash_step(&cx, z2, n2);
608 - break;
609 - }
610 -@@ -370,6 +370,20 @@
611 - }
612 -
613 -
614 -+int sqlite3ShaInit(sqlite3 *db){
615 -+ int rc = SQLITE_OK;
616 -+ rc = sqlite3_create_function(db, "sha1", 1,
617 -+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
618 -+ 0, sha1Func, 0, 0);
619 -+ if( rc==SQLITE_OK ){
620 -+ rc = sqlite3_create_function(db, "sha1_query", 1,
621 -+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
622 -+ sha1QueryFunc, 0, 0);
623 -+ }
624 -+ return rc;
625 -+}
626 -+
627 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
628 - #ifdef _WIN32
629 - __declspec(dllexport)
630 - #endif
631 -@@ -378,16 +392,8 @@
632 - char **pzErrMsg,
633 - const sqlite3_api_routines *pApi
634 - ){
635 -- int rc = SQLITE_OK;
636 - SQLITE_EXTENSION_INIT2(pApi);
637 - (void)pzErrMsg; /* Unused parameter */
638 -- rc = sqlite3_create_function(db, "sha1", 1,
639 -- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
640 -- 0, sha1Func, 0, 0);
641 -- if( rc==SQLITE_OK ){
642 -- rc = sqlite3_create_function(db, "sha1_query", 1,
643 -- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
644 -- sha1QueryFunc, 0, 0);
645 -- }
646 -- return rc;
647 -+ return sqlite3ShaInit(db);
648 - }
649 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
650 ---- /ext/misc/shathree.c
651 -+++ /ext/misc/shathree.c
652 -@@ -530,7 +530,7 @@
653 - /* Compute a string using sqlite3_vsnprintf() with a maximum length
654 - ** of 50 bytes and add it to the hash.
655 - */
656 --static void hash_step_vformat(
657 -+static void sha3_hash_step_vformat(
658 - SHA3Context *p, /* Add content to this context */
659 - const char *zFormat,
660 - ...
661 -@@ -626,7 +626,7 @@
662 - z = sqlite3_sql(pStmt);
663 - if( z ){
664 - n = (int)strlen(z);
665 -- hash_step_vformat(&cx,"S%d:",n);
666 -+ sha3_hash_step_vformat(&cx,"S%d:",n);
667 - SHA3Update(&cx,(unsigned char*)z,n);
668 - }
669 -
670 -@@ -670,14 +670,14 @@
671 - case SQLITE_TEXT: {
672 - int n2 = sqlite3_column_bytes(pStmt, i);
673 - const unsigned char *z2 = sqlite3_column_text(pStmt, i);
674 -- hash_step_vformat(&cx,"T%d:",n2);
675 -+ sha3_hash_step_vformat(&cx,"T%d:",n2);
676 - SHA3Update(&cx, z2, n2);
677 - break;
678 - }
679 - case SQLITE_BLOB: {
680 - int n2 = sqlite3_column_bytes(pStmt, i);
681 - const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
682 -- hash_step_vformat(&cx,"B%d:",n2);
683 -+ sha3_hash_step_vformat(&cx,"B%d:",n2);
684 - SHA3Update(&cx, z2, n2);
685 - break;
686 - }
687 -@@ -690,17 +690,8 @@
688 - }
689 -
690 -
691 --#ifdef _WIN32
692 --__declspec(dllexport)
693 --#endif
694 --int sqlite3_shathree_init(
695 -- sqlite3 *db,
696 -- char **pzErrMsg,
697 -- const sqlite3_api_routines *pApi
698 --){
699 -+int sqlite3ShathreeInit(sqlite3 *db){
700 - int rc = SQLITE_OK;
701 -- SQLITE_EXTENSION_INIT2(pApi);
702 -- (void)pzErrMsg; /* Unused parameter */
703 - rc = sqlite3_create_function(db, "sha3", 1,
704 - SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
705 - 0, sha3Func, 0, 0);
706 -@@ -721,3 +712,18 @@
707 - }
708 - return rc;
709 - }
710 -+
711 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
712 -+#ifdef _WIN32
713 -+__declspec(dllexport)
714 -+#endif
715 -+int sqlite3_shathree_init(
716 -+ sqlite3 *db,
717 -+ char **pzErrMsg,
718 -+ const sqlite3_api_routines *pApi
719 -+){
720 -+ SQLITE_EXTENSION_INIT2(pApi);
721 -+ (void)pzErrMsg; /* Unused parameter */
722 -+ return sqlite3ShathreeInit(db);
723 -+}
724 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
725 ---- /ext/misc/sqlar.c
726 -+++ /ext/misc/sqlar.c
727 -@@ -14,6 +14,8 @@
728 - ** for working with sqlar archives and used by the shell tool's built-in
729 - ** sqlar support.
730 - */
731 -+#ifdef SQLITE_HAVE_ZLIB
732 -+
733 - #include "sqlite3ext.h"
734 - SQLITE_EXTENSION_INIT1
735 - #include <zlib.h>
736 -@@ -101,6 +103,20 @@
737 - }
738 -
739 -
740 -+int sqlite3SqlarInit(sqlite3 *db){
741 -+ int rc = SQLITE_OK;
742 -+ rc = sqlite3_create_function(db, "sqlar_compress", 1,
743 -+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
744 -+ sqlarCompressFunc, 0, 0);
745 -+ if( rc==SQLITE_OK ){
746 -+ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
747 -+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
748 -+ sqlarUncompressFunc, 0, 0);
749 -+ }
750 -+ return rc;
751 -+}
752 -+
753 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
754 - #ifdef _WIN32
755 - __declspec(dllexport)
756 - #endif
757 -@@ -109,16 +125,10 @@
758 - char **pzErrMsg,
759 - const sqlite3_api_routines *pApi
760 - ){
761 -- int rc = SQLITE_OK;
762 - SQLITE_EXTENSION_INIT2(pApi);
763 - (void)pzErrMsg; /* Unused parameter */
764 -- rc = sqlite3_create_function(db, "sqlar_compress", 1,
765 -- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
766 -- sqlarCompressFunc, 0, 0);
767 -- if( rc==SQLITE_OK ){
768 -- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
769 -- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
770 -- sqlarUncompressFunc, 0, 0);
771 -- }
772 -- return rc;
773 -+ return sqlite3SqlarInit(db);
774 - }
775 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
776 -+
777 -+#endif /* SQLITE_HAVE_ZLIB */
778 ---- /ext/misc/totype.c
779 -+++ /ext/misc/totype.c
780 -@@ -491,17 +491,8 @@
781 - #pragma warning(default: 4748)
782 - #endif
783 -
784 --#ifdef _WIN32
785 --__declspec(dllexport)
786 --#endif
787 --int sqlite3_totype_init(
788 -- sqlite3 *db,
789 -- char **pzErrMsg,
790 -- const sqlite3_api_routines *pApi
791 --){
792 -+int sqlite3TotypeInit(sqlite3 *db){
793 - int rc = SQLITE_OK;
794 -- SQLITE_EXTENSION_INIT2(pApi);
795 -- (void)pzErrMsg; /* Unused parameter */
796 - rc = sqlite3_create_function(db, "tointeger", 1,
797 - SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
798 - tointegerFunc, 0, 0);
799 -@@ -512,3 +503,18 @@
800 - }
801 - return rc;
802 - }
803 -+
804 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
805 -+#ifdef _WIN32
806 -+__declspec(dllexport)
807 -+#endif
808 -+int sqlite3_totype_init(
809 -+ sqlite3 *db,
810 -+ char **pzErrMsg,
811 -+ const sqlite3_api_routines *pApi
812 -+){
813 -+ SQLITE_EXTENSION_INIT2(pApi);
814 -+ (void)pzErrMsg; /* Unused parameter */
815 -+ return sqlite3TotypeInit(db);
816 -+}
817 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
818 ---- /ext/misc/uint.c
819 -+++ /ext/misc/uint.c
820 -@@ -78,6 +78,11 @@
821 - return (nKey1 - i) - (nKey2 - j);
822 - }
823 -
824 -+int sqlite3UintInit(sqlite3 *db){
825 -+ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
826 -+}
827 -+
828 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
829 - #ifdef _WIN32
830 - __declspec(dllexport)
831 - #endif
832 -@@ -88,5 +93,6 @@
833 - ){
834 - SQLITE_EXTENSION_INIT2(pApi);
835 - (void)pzErrMsg; /* Unused parameter */
836 -- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
837 -+ return sqlite3UintInit(db);
838 - }
839 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
840 ---- /ext/misc/uuid.c
841 -+++ /ext/misc/uuid.c
842 -@@ -206,21 +206,12 @@
843 - sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
844 - }
845 -
846 --#ifdef _WIN32
847 --__declspec(dllexport)
848 --#endif
849 --int sqlite3_uuid_init(
850 -- sqlite3 *db,
851 -- char **pzErrMsg,
852 -- const sqlite3_api_routines *pApi
853 --){
854 -+int sqlite3UuidInit(sqlite3 *db){
855 - int rc = SQLITE_OK;
856 -- SQLITE_EXTENSION_INIT2(pApi);
857 -- (void)pzErrMsg; /* Unused parameter */
858 - rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
859 - sqlite3UuidFunc, 0, 0);
860 - if( rc==SQLITE_OK ){
861 -- rc = sqlite3_create_function(db, "uuid_str", 1,
862 -+ rc = sqlite3_create_function(db, "uuid_str", 1,
863 - SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
864 - 0, sqlite3UuidStrFunc, 0, 0);
865 - }
866 -@@ -231,3 +222,18 @@
867 - }
868 - return rc;
869 - }
870 -+
871 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
872 -+#ifdef _WIN32
873 -+__declspec(dllexport)
874 -+#endif
875 -+int sqlite3_uuid_init(
876 -+ sqlite3 *db,
877 -+ char **pzErrMsg,
878 -+ const sqlite3_api_routines *pApi
879 -+){
880 -+ SQLITE_EXTENSION_INIT2(pApi);
881 -+ (void)pzErrMsg; /* Unused parameter */
882 -+ return sqlite3UuidInit(db);
883 -+}
884 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
885 ---- /ext/misc/zipfile.c
886 -+++ /ext/misc/zipfile.c
887 -@@ -24,6 +24,8 @@
888 - ** * No support for zip64 extensions
889 - ** * Only the "inflate/deflate" (zlib) compression method is supported
890 - */
891 -+#ifdef SQLITE_HAVE_ZLIB
892 -+
893 - #include "sqlite3ext.h"
894 - SQLITE_EXTENSION_INIT1
895 - #include <stdio.h>
896 -@@ -2139,7 +2141,7 @@
897 - /*
898 - ** Register the "zipfile" virtual table.
899 - */
900 --static int zipfileRegister(sqlite3 *db){
901 -+int sqlite3ZipfileInit(sqlite3 *db){
902 - static sqlite3_module zipfileModule = {
903 - 1, /* iVersion */
904 - zipfileConnect, /* xCreate */
905 -@@ -2173,9 +2175,10 @@
906 - return rc;
907 - }
908 - #else /* SQLITE_OMIT_VIRTUALTABLE */
909 --# define zipfileRegister(x) SQLITE_OK
910 -+# define sqlite3ZipfileInit(x) SQLITE_OK
911 - #endif
912 -
913 -+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
914 - #ifdef _WIN32
915 - __declspec(dllexport)
916 - #endif
917 -@@ -2186,5 +2189,8 @@
918 - ){
919 - SQLITE_EXTENSION_INIT2(pApi);
920 - (void)pzErrMsg; /* Unused parameter */
921 -- return zipfileRegister(db);
922 -+ return sqlite3ZipfileInit(db);
923 - }
924 -+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
925 -+
926 -+#endif /* SQLITE_HAVE_ZLIB */
927
928 diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch
929 deleted file mode 100644
930 index 383a4936bf0f..000000000000
931 --- a/dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch
932 +++ /dev/null
933 @@ -1,292 +0,0 @@
934 -Move some code to libsqlite3.so to avoid duplication.
935 -Link executables against libsqlite3.so.
936 -Increase timeout for fuzzcheck.
937 -Update list of optionally available functions.
938 -Fix building with dlopen() not available.
939 -
940 -SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
941 -
942 ---- /Makefile.in
943 -+++ /Makefile.in
944 -@@ -313,6 +313,9 @@
945 - # Source code for extensions
946 - #
947 - SRC += \
948 -+ $(TOP)/ext/expert/sqlite3expert.c \
949 -+ $(TOP)/ext/expert/sqlite3expert.h
950 -+SRC += \
951 - $(TOP)/ext/fts1/fts1.c \
952 - $(TOP)/ext/fts1/fts1.h \
953 - $(TOP)/ext/fts1/fts1_hash.c \
954 -@@ -365,8 +368,29 @@
955 - $(TOP)/ext/rbu/sqlite3rbu.h \
956 - $(TOP)/ext/rbu/sqlite3rbu.c
957 - SRC += \
958 -+ $(TOP)/ext/misc/amatch.c \
959 -+ $(TOP)/ext/misc/appendvfs.c \
960 -+ $(TOP)/ext/misc/carray.c \
961 -+ $(TOP)/ext/misc/completion.c \
962 -+ $(TOP)/ext/misc/csv.c \
963 -+ $(TOP)/ext/misc/dbdata.c \
964 -+ $(TOP)/ext/misc/decimal.c \
965 -+ $(TOP)/ext/misc/eval.c \
966 -+ $(TOP)/ext/misc/fileio.c \
967 -+ $(TOP)/ext/misc/ieee754.c \
968 - $(TOP)/ext/misc/json1.c \
969 -- $(TOP)/ext/misc/stmt.c
970 -+ $(TOP)/ext/misc/nextchar.c \
971 -+ $(TOP)/ext/misc/percentile.c \
972 -+ $(TOP)/ext/misc/regexp.c \
973 -+ $(TOP)/ext/misc/series.c \
974 -+ $(TOP)/ext/misc/sha1.c \
975 -+ $(TOP)/ext/misc/shathree.c \
976 -+ $(TOP)/ext/misc/sqlar.c \
977 -+ $(TOP)/ext/misc/stmt.c \
978 -+ $(TOP)/ext/misc/totype.c \
979 -+ $(TOP)/ext/misc/uint.c \
980 -+ $(TOP)/ext/misc/uuid.c \
981 -+ $(TOP)/ext/misc/zipfile.c
982 -
983 - # Generated source code files
984 - #
985 -@@ -437,36 +461,21 @@
986 - # Statically linked extensions
987 - #
988 - TESTSRC += \
989 -- $(TOP)/ext/expert/sqlite3expert.c \
990 - $(TOP)/ext/expert/test_expert.c \
991 -- $(TOP)/ext/misc/amatch.c \
992 -- $(TOP)/ext/misc/appendvfs.c \
993 -- $(TOP)/ext/misc/carray.c \
994 - $(TOP)/ext/misc/cksumvfs.c \
995 - $(TOP)/ext/misc/closure.c \
996 -- $(TOP)/ext/misc/csv.c \
997 -- $(TOP)/ext/misc/decimal.c \
998 -- $(TOP)/ext/misc/eval.c \
999 - $(TOP)/ext/misc/explain.c \
1000 -- $(TOP)/ext/misc/fileio.c \
1001 - $(TOP)/ext/misc/fuzzer.c \
1002 - $(TOP)/ext/fts5/fts5_tcl.c \
1003 - $(TOP)/ext/fts5/fts5_test_mi.c \
1004 - $(TOP)/ext/fts5/fts5_test_tok.c \
1005 -- $(TOP)/ext/misc/ieee754.c \
1006 - $(TOP)/ext/misc/mmapwarm.c \
1007 -- $(TOP)/ext/misc/nextchar.c \
1008 - $(TOP)/ext/misc/normalize.c \
1009 -- $(TOP)/ext/misc/percentile.c \
1010 - $(TOP)/ext/misc/prefixes.c \
1011 -- $(TOP)/ext/misc/regexp.c \
1012 - $(TOP)/ext/misc/remember.c \
1013 -- $(TOP)/ext/misc/series.c \
1014 - $(TOP)/ext/misc/spellfix.c \
1015 -- $(TOP)/ext/misc/totype.c \
1016 - $(TOP)/ext/misc/unionvtab.c \
1017 - $(TOP)/ext/misc/wholenumber.c \
1018 -- $(TOP)/ext/misc/zipfile.c \
1019 - $(TOP)/ext/userauth/userauth.c
1020 -
1021 - # Source code to the library files needed by the test fixture
1022 -@@ -648,25 +657,25 @@
1023 -
1024 - libtclsqlite3.la: tclsqlite.lo libsqlite3.la
1025 - $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
1026 -- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
1027 -+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
1028 - -rpath "$(TCLLIBDIR)" \
1029 - -version-info "8:6:8" \
1030 - -avoid-version
1031 -
1032 --sqlite3$(TEXE): shell.c sqlite3.c
1033 -- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
1034 -- shell.c sqlite3.c \
1035 -- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
1036 -+sqlite3$(TEXE): shell.c libsqlite3.la
1037 -+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
1038 -+ shell.c libsqlite3.la \
1039 -+ $(LIBREADLINE)
1040 -
1041 --sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
1042 -- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
1043 -+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
1044 -+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
1045 -
1046 --dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
1047 -- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
1048 -+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
1049 -+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
1050 -
1051 --scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
1052 -+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
1053 - $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
1054 -- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
1055 -+ $(TOP)/ext/misc/scrub.c libsqlite3.la
1056 -
1057 - srcck1$(BEXE): $(TOP)/tool/srcck1.c
1058 - $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
1059 -@@ -777,7 +786,7 @@
1060 - # Rule to build the amalgamation
1061 - #
1062 - sqlite3.lo: sqlite3.c
1063 -- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
1064 -+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
1065 -
1066 - # Rules to build the LEMON compiler generator
1067 - #
1068 -@@ -1083,18 +1092,6 @@
1069 - # Source files that go into making shell.c
1070 - SHELL_SRC = \
1071 - $(TOP)/src/shell.c.in \
1072 -- $(TOP)/ext/misc/appendvfs.c \
1073 -- $(TOP)/ext/misc/completion.c \
1074 -- $(TOP)/ext/misc/decimal.c \
1075 -- $(TOP)/ext/misc/fileio.c \
1076 -- $(TOP)/ext/misc/ieee754.c \
1077 -- $(TOP)/ext/misc/series.c \
1078 -- $(TOP)/ext/misc/shathree.c \
1079 -- $(TOP)/ext/misc/sqlar.c \
1080 -- $(TOP)/ext/misc/uint.c \
1081 -- $(TOP)/ext/expert/sqlite3expert.c \
1082 -- $(TOP)/ext/expert/sqlite3expert.h \
1083 -- $(TOP)/ext/misc/zipfile.c \
1084 - $(TOP)/ext/misc/memtrace.c \
1085 - $(TOP)/src/test_windirent.c
1086 -
1087 -@@ -1264,11 +1261,11 @@
1088 -
1089 - # Fuzz testing
1090 - fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
1091 -- ./fuzzcheck$(TEXE) $(FUZZDATA)
1092 -+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
1093 - ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
1094 -
1095 - valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
1096 -- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M $(FUZZDATA)
1097 -+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
1098 - valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
1099 -
1100 - # The veryquick.test TCL tests.
1101 -@@ -1302,24 +1299,23 @@
1102 - shelltest: $(TESTPROGS)
1103 - ./testfixture$(TEXT) $(TOP)/test/permutations.test shell
1104 -
1105 --sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
1106 -+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
1107 - $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
1108 -
1109 --sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
1110 -- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
1111 -+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
1112 -+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
1113 -
1114 --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
1115 -+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
1116 - $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
1117 -
1118 --sqltclsh$(TEXE): sqltclsh.c
1119 -- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
1120 -+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
1121 -+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
1122 -
1123 --sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
1124 -- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
1125 -+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
1126 -+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
1127 -
1128 - CHECKER_DEPS =\
1129 - $(TOP)/tool/mkccode.tcl \
1130 -- sqlite3.c \
1131 - $(TOP)/src/tclsqlite.c \
1132 - $(TOP)/ext/repair/sqlite3_checker.tcl \
1133 - $(TOP)/ext/repair/checkindex.c \
1134 -@@ -1330,36 +1326,36 @@
1135 - sqlite3_checker.c: $(CHECKER_DEPS)
1136 - $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
1137 -
1138 --sqlite3_checker$(TEXE): sqlite3_checker.c
1139 -- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
1140 -+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
1141 -+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
1142 -
1143 --dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
1144 -+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
1145 - $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
1146 -- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
1147 -+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
1148 -
1149 --dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
1150 -- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
1151 -+dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
1152 -+ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
1153 -
1154 --showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
1155 -- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
1156 -+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
1157 -+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
1158 -
1159 --showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
1160 -- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
1161 -+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
1162 -+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
1163 -
1164 --showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
1165 -- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
1166 -+showjournal$(TEXE): $(TOP)/tool/showjournal.c
1167 -+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
1168 -
1169 --showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
1170 -- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
1171 -+showwal$(TEXE): $(TOP)/tool/showwal.c
1172 -+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
1173 -
1174 - showshm$(TEXE): $(TOP)/tool/showshm.c
1175 - $(LTLINK) -o $@ $(TOP)/tool/showshm.c
1176 -
1177 --index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
1178 -- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
1179 -+index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
1180 -+ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
1181 -
1182 --changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
1183 -- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
1184 -+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
1185 -+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
1186 -
1187 - changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
1188 - $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
1189 -@@ -1387,11 +1383,11 @@
1190 - kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
1191 - $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
1192 -
1193 --rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
1194 -- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
1195 -+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
1196 -+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
1197 -
1198 --loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
1199 -- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
1200 -+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
1201 -+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
1202 -
1203 - # This target will fail if the SQLite amalgamation contains any exported
1204 - # symbols that do not begin with "sqlite3_". It is run as part of the
1205 ---- /configure.ac
1206 -+++ /configure.ac
1207 -@@ -108,7 +108,7 @@
1208 - #########
1209 - # Figure out whether or not we have these functions
1210 - #
1211 --AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
1212 -+AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
1213 -
1214 - #########
1215 - # By default, we use the amalgamation (this may be changed below...)
1216 -@@ -587,6 +587,9 @@
1217 - if test "${enable_load_extension}" = "yes" ; then
1218 - OPT_FEATURE_FLAGS=""
1219 - AC_SEARCH_LIBS(dlopen, dl)
1220 -+ if test "${ac_cv_search_dlopen}" = "no" ; then
1221 -+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
1222 -+ fi
1223 - else
1224 - OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
1225 - fi
1226
1227 diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch
1228 deleted file mode 100644
1229 index 99350c794495..000000000000
1230 --- a/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch
1231 +++ /dev/null
1232 @@ -1,441 +0,0 @@
1233 -Move some code to libsqlite3.so to avoid duplication.
1234 -Initialize some extensions in libsqlite3.so.
1235 -Update test suite.
1236 -
1237 -SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
1238 -
1239 ---- /ext/repair/sqlite3_checker.c.in
1240 -+++ /ext/repair/sqlite3_checker.c.in
1241 -@@ -2,6 +2,7 @@
1242 - ** Read an SQLite database file and analyze its space utilization. Generate
1243 - ** text on standard output.
1244 - */
1245 -+#define SQLITE_CORE 1
1246 - #define TCLSH_INIT_PROC sqlite3_checker_init_proc
1247 - #define SQLITE_ENABLE_DBPAGE_VTAB 1
1248 - #define SQLITE_ENABLE_JSON1 1
1249 -@@ -14,7 +15,7 @@
1250 - #define SQLITE_OMIT_SHARED_CACHE 1
1251 - #define SQLITE_DEFAULT_MEMSTATUS 0
1252 - #define SQLITE_MAX_EXPR_DEPTH 0
1253 --INCLUDE sqlite3.c
1254 -+#include "sqlite3.h"
1255 - INCLUDE $ROOT/src/tclsqlite.c
1256 - INCLUDE $ROOT/ext/misc/btreeinfo.c
1257 - INCLUDE $ROOT/ext/repair/checkindex.c
1258 ---- /src/main.c
1259 -+++ /src/main.c
1260 -@@ -50,12 +50,36 @@
1261 - #ifdef SQLITE_ENABLE_FTS5
1262 - int sqlite3Fts5Init(sqlite3*);
1263 - #endif
1264 -+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
1265 -+int sqlite3DbdataRegister(sqlite3*);
1266 -+#endif
1267 - #ifdef SQLITE_ENABLE_JSON1
1268 - int sqlite3Json1Init(sqlite3*);
1269 - #endif
1270 - #ifdef SQLITE_ENABLE_STMTVTAB
1271 - int sqlite3StmtVtabInit(sqlite3*);
1272 - #endif
1273 -+int sqlite3AmatchInit(sqlite3*);
1274 -+int sqlite3CarrayInit(sqlite3*);
1275 -+int sqlite3CompletionVtabInit(sqlite3*);
1276 -+int sqlite3CsvInit(sqlite3*);
1277 -+int sqlite3DecimalInit(sqlite3*);
1278 -+int sqlite3EvalInit(sqlite3*);
1279 -+int sqlite3FileioInit(sqlite3*);
1280 -+int sqlite3IeeeInit(sqlite3*);
1281 -+int sqlite3NextcharInit(sqlite3*);
1282 -+int sqlite3PercentileInit(sqlite3*);
1283 -+int sqlite3RegexpInit(sqlite3*);
1284 -+int sqlite3SeriesInit(sqlite3*);
1285 -+int sqlite3ShaInit(sqlite3*);
1286 -+int sqlite3ShathreeInit(sqlite3*);
1287 -+int sqlite3TotypeInit(sqlite3*);
1288 -+int sqlite3UintInit(sqlite3*);
1289 -+int sqlite3UuidInit(sqlite3*);
1290 -+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
1291 -+int sqlite3ZipfileInit(sqlite3*);
1292 -+int sqlite3SqlarInit(sqlite3*);
1293 -+#endif
1294 -
1295 - /*
1296 - ** An array of pointers to extension initializer functions for
1297 -@@ -83,6 +107,9 @@
1298 - #ifdef SQLITE_ENABLE_DBPAGE_VTAB
1299 - sqlite3DbpageRegister,
1300 - #endif
1301 -+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
1302 -+ sqlite3DbdataRegister,
1303 -+#endif
1304 - #ifdef SQLITE_ENABLE_DBSTAT_VTAB
1305 - sqlite3DbstatRegister,
1306 - #endif
1307 -@@ -96,6 +123,27 @@
1308 - #ifdef SQLITE_ENABLE_BYTECODE_VTAB
1309 - sqlite3VdbeBytecodeVtabInit,
1310 - #endif
1311 -+ sqlite3AmatchInit,
1312 -+ sqlite3CarrayInit,
1313 -+ sqlite3CompletionVtabInit,
1314 -+ sqlite3CsvInit,
1315 -+ sqlite3DecimalInit,
1316 -+ sqlite3EvalInit,
1317 -+ sqlite3FileioInit,
1318 -+ sqlite3IeeeInit,
1319 -+ sqlite3NextcharInit,
1320 -+ sqlite3PercentileInit,
1321 -+ sqlite3RegexpInit,
1322 -+ sqlite3SeriesInit,
1323 -+ sqlite3ShaInit,
1324 -+ sqlite3ShathreeInit,
1325 -+ sqlite3TotypeInit,
1326 -+ sqlite3UintInit,
1327 -+ sqlite3UuidInit,
1328 -+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
1329 -+ sqlite3ZipfileInit,
1330 -+ sqlite3SqlarInit,
1331 -+#endif
1332 - };
1333 -
1334 - #ifndef SQLITE_AMALGAMATION
1335 ---- /src/shell.c.in
1336 -+++ /src/shell.c.in
1337 -@@ -69,6 +69,7 @@
1338 - #include <stdio.h>
1339 - #include <assert.h>
1340 - #include "sqlite3.h"
1341 -+#include "ext/expert/sqlite3expert.h"
1342 - typedef sqlite3_int64 i64;
1343 - typedef sqlite3_uint64 u64;
1344 - typedef unsigned char u8;
1345 -@@ -135,6 +136,10 @@
1346 - # define SHELL_USE_LOCAL_GETLINE 1
1347 - #endif
1348 -
1349 -+#ifdef SQLITE_HAVE_ZLIB
1350 -+#include <zlib.h>
1351 -+#endif
1352 -+
1353 -
1354 - #if defined(_WIN32) || defined(WIN32)
1355 - # if SQLITE_OS_WINRT
1356 -@@ -1018,25 +1023,7 @@
1357 - INCLUDE test_windirent.c
1358 - #define dirent DIRENT
1359 - #endif
1360 --INCLUDE ../ext/misc/shathree.c
1361 --INCLUDE ../ext/misc/fileio.c
1362 --INCLUDE ../ext/misc/completion.c
1363 --INCLUDE ../ext/misc/appendvfs.c
1364 - INCLUDE ../ext/misc/memtrace.c
1365 --INCLUDE ../ext/misc/uint.c
1366 --INCLUDE ../ext/misc/decimal.c
1367 --INCLUDE ../ext/misc/ieee754.c
1368 --INCLUDE ../ext/misc/series.c
1369 --#ifdef SQLITE_HAVE_ZLIB
1370 --INCLUDE ../ext/misc/zipfile.c
1371 --INCLUDE ../ext/misc/sqlar.c
1372 --#endif
1373 --INCLUDE ../ext/expert/sqlite3expert.h
1374 --INCLUDE ../ext/expert/sqlite3expert.c
1375 --
1376 --#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
1377 --INCLUDE ../ext/misc/dbdata.c
1378 --#endif
1379 -
1380 - #if defined(SQLITE_ENABLE_SESSION)
1381 - /*
1382 -@@ -4608,20 +4595,6 @@
1383 - #ifndef SQLITE_OMIT_LOAD_EXTENSION
1384 - sqlite3_enable_load_extension(p->db, 1);
1385 - #endif
1386 -- sqlite3_fileio_init(p->db, 0, 0);
1387 -- sqlite3_shathree_init(p->db, 0, 0);
1388 -- sqlite3_completion_init(p->db, 0, 0);
1389 -- sqlite3_uint_init(p->db, 0, 0);
1390 -- sqlite3_decimal_init(p->db, 0, 0);
1391 -- sqlite3_ieee_init(p->db, 0, 0);
1392 -- sqlite3_series_init(p->db, 0, 0);
1393 --#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
1394 -- sqlite3_dbdata_init(p->db, 0, 0);
1395 --#endif
1396 --#ifdef SQLITE_HAVE_ZLIB
1397 -- sqlite3_zipfile_init(p->db, 0, 0);
1398 -- sqlite3_sqlar_init(p->db, 0, 0);
1399 --#endif
1400 - sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
1401 - shellAddSchemaName, 0, 0);
1402 - sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
1403 -@@ -6644,8 +6617,6 @@
1404 - );
1405 - goto end_ar_command;
1406 - }
1407 -- sqlite3_fileio_init(cmd.db, 0, 0);
1408 -- sqlite3_sqlar_init(cmd.db, 0, 0);
1409 - sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
1410 - shellPutsFunc, 0, 0);
1411 -
1412 -@@ -11108,6 +11079,7 @@
1413 - #endif
1414 - }
1415 - data.out = stdout;
1416 -+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
1417 - sqlite3_appendvfs_init(0,0,0);
1418 -
1419 - /* Go ahead and open the database file if it already exists. If the
1420 ---- /src/test_config.c
1421 -+++ /src/test_config.c
1422 -@@ -359,6 +359,8 @@
1423 - Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
1424 - #endif
1425 -
1426 -+ Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
1427 -+
1428 - #ifdef SQLITE_OMIT_DECLTYPE
1429 - Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
1430 - #else
1431 -@@ -546,6 +548,8 @@
1432 - Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
1433 - #endif
1434 -
1435 -+ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
1436 -+
1437 - #ifdef SQLITE_OMIT_REINDEX
1438 - Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
1439 - #else
1440 -@@ -668,6 +672,8 @@
1441 - Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
1442 - #endif
1443 -
1444 -+ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
1445 -+
1446 - #ifdef SQLITE_OMIT_UTF16
1447 - Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
1448 - #else
1449 ---- /test/e_expr.test
1450 -+++ /test/e_expr.test
1451 -@@ -1079,7 +1079,7 @@
1452 - #
1453 - # There is a regexp function if ICU is enabled though.
1454 - #
1455 --ifcapable !icu {
1456 -+ifcapable !icu&&!regexp {
1457 - do_catchsql_test e_expr-18.1.1 {
1458 - SELECT regexp('abc', 'def')
1459 - } {1 {no such function: regexp}}
1460 ---- /test/icu.test
1461 -+++ /test/icu.test
1462 -@@ -41,7 +41,7 @@
1463 - #
1464 - test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
1465 - test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
1466 -- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
1467 -+ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
1468 - test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
1469 - test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
1470 -
1471 ---- /test/pragma.test
1472 -+++ /test/pragma.test
1473 -@@ -1370,17 +1370,62 @@
1474 - } ;# ifcapable trigger
1475 -
1476 - ifcapable schema_pragmas {
1477 -- do_test pragma-11.1 {
1478 -- execsql2 {
1479 -- pragma collation_list;
1480 -+ ifcapable decimal {
1481 -+ ifcapable uint {
1482 -+ do_test pragma-11.1 {
1483 -+ execsql2 {
1484 -+ pragma collation_list;
1485 -+ }
1486 -+ } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
1487 -+ do_test pragma-11.2 {
1488 -+ db collate New_Collation blah...
1489 -+ execsql {
1490 -+ pragma collation_list;
1491 -+ }
1492 -+ } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
1493 - }
1494 -- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
1495 -- do_test pragma-11.2 {
1496 -- db collate New_Collation blah...
1497 -- execsql {
1498 -- pragma collation_list;
1499 -+ ifcapable !uint {
1500 -+ do_test pragma-11.1 {
1501 -+ execsql2 {
1502 -+ pragma collation_list;
1503 -+ }
1504 -+ } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
1505 -+ do_test pragma-11.2 {
1506 -+ db collate New_Collation blah...
1507 -+ execsql {
1508 -+ pragma collation_list;
1509 -+ }
1510 -+ } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
1511 - }
1512 -- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
1513 -+ }
1514 -+ ifcapable !decimal {
1515 -+ ifcapable uint {
1516 -+ do_test pragma-11.1 {
1517 -+ execsql2 {
1518 -+ pragma collation_list;
1519 -+ }
1520 -+ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
1521 -+ do_test pragma-11.2 {
1522 -+ db collate New_Collation blah...
1523 -+ execsql {
1524 -+ pragma collation_list;
1525 -+ }
1526 -+ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
1527 -+ }
1528 -+ ifcapable !uint {
1529 -+ do_test pragma-11.1 {
1530 -+ execsql2 {
1531 -+ pragma collation_list;
1532 -+ }
1533 -+ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
1534 -+ do_test pragma-11.2 {
1535 -+ db collate New_Collation blah...
1536 -+ execsql {
1537 -+ pragma collation_list;
1538 -+ }
1539 -+ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
1540 -+ }
1541 -+ }
1542 - }
1543 -
1544 - ifcapable schema_pragmas&&tempdb {
1545 ---- /test/sessionfuzz.c
1546 -+++ /test/sessionfuzz.c
1547 -@@ -698,49 +698,6 @@
1548 - #include <stdio.h>
1549 - #include <string.h>
1550 - #include <assert.h>
1551 --#ifndef OMIT_ZLIB
1552 --#include "zlib.h"
1553 --#endif
1554 --
1555 --/*
1556 --** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
1557 --**
1558 --** Parameter SZ is interpreted as an integer. If it is less than or
1559 --** equal to zero, then this function returns a copy of X. Or, if
1560 --** SZ is equal to the size of X when interpreted as a blob, also
1561 --** return a copy of X. Otherwise, decompress blob X using zlib
1562 --** utility function uncompress() and return the results (another
1563 --** blob).
1564 --*/
1565 --static void sqlarUncompressFunc(
1566 -- sqlite3_context *context,
1567 -- int argc,
1568 -- sqlite3_value **argv
1569 --){
1570 --#ifdef OMIT_ZLIB
1571 -- sqlite3_result_value(context, argv[0]);
1572 --#else
1573 -- uLong nData;
1574 -- uLongf sz;
1575 --
1576 -- assert( argc==2 );
1577 -- sz = sqlite3_value_int(argv[1]);
1578 --
1579 -- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
1580 -- sqlite3_result_value(context, argv[0]);
1581 -- }else{
1582 -- const Bytef *pData= sqlite3_value_blob(argv[0]);
1583 -- Bytef *pOut = sqlite3_malloc(sz);
1584 -- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
1585 -- sqlite3_result_error(context, "error in uncompress()", -1);
1586 -- }else{
1587 -- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
1588 -- }
1589 -- sqlite3_free(pOut);
1590 -- }
1591 --#endif
1592 --}
1593 --
1594 -
1595 - /* Run a chunk of SQL. If any errors happen, print an error message
1596 - ** and exit.
1597 ---- /tool/mksqlite3c.tcl
1598 -+++ /tool/mksqlite3c.tcl
1599 -@@ -129,6 +129,7 @@
1600 - rtree.h
1601 - sqlite3session.h
1602 - sqlite3.h
1603 -+ sqlite3expert.h
1604 - sqlite3ext.h
1605 - sqlite3rbu.h
1606 - sqliteicu.h
1607 -@@ -416,6 +417,28 @@
1608 - sqlite3session.c
1609 - fts5.c
1610 - stmt.c
1611 -+ amatch.c
1612 -+ appendvfs.c
1613 -+ carray.c
1614 -+ completion.c
1615 -+ csv.c
1616 -+ dbdata.c
1617 -+ decimal.c
1618 -+ eval.c
1619 -+ fileio.c
1620 -+ ieee754.c
1621 -+ nextchar.c
1622 -+ percentile.c
1623 -+ regexp.c
1624 -+ series.c
1625 -+ sha1.c
1626 -+ shathree.c
1627 -+ sqlar.c
1628 -+ sqlite3expert.c
1629 -+ totype.c
1630 -+ uint.c
1631 -+ uuid.c
1632 -+ zipfile.c
1633 - } {
1634 - copy_file tsrc/$file
1635 - }
1636 ---- /tool/sqlite3_analyzer.c.in
1637 -+++ /tool/sqlite3_analyzer.c.in
1638 -@@ -14,9 +14,6 @@
1639 - #define SQLITE_DEFAULT_MEMSTATUS 0
1640 - #define SQLITE_MAX_EXPR_DEPTH 0
1641 - #define SQLITE_OMIT_LOAD_EXTENSION 1
1642 --#ifndef USE_EXTERNAL_SQLITE
1643 --INCLUDE sqlite3.c
1644 --#endif
1645 - INCLUDE $ROOT/src/tclsqlite.c
1646 -
1647 - const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
1648 ---- /tool/sqltclsh.c.in
1649 -+++ /tool/sqltclsh.c.in
1650 -@@ -27,21 +27,13 @@
1651 - #define SQLITE_OMIT_SHARED_CACHE 1
1652 - #define SQLITE_DEFAULT_MEMSTATUS 0
1653 - #define SQLITE_MAX_EXPR_DEPTH 0
1654 --INCLUDE sqlite3.c
1655 --INCLUDE $ROOT/ext/misc/appendvfs.c
1656 --#ifdef SQLITE_HAVE_ZLIB
1657 --INCLUDE $ROOT/ext/misc/zipfile.c
1658 --INCLUDE $ROOT/ext/misc/sqlar.c
1659 --#endif
1660 -+#include "sqlite3.h"
1661 - INCLUDE $ROOT/src/tclsqlite.c
1662 -
1663 - const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
1664 - (void)interp;
1665 -+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
1666 - sqlite3_appendvfs_init(0,0,0);
1667 --#ifdef SQLITE_HAVE_ZLIB
1668 -- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
1669 -- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
1670 --#endif
1671 -
1672 - return
1673 - BEGIN_STRING
1674
1675 diff --git a/dev-db/sqlite/sqlite-3.35.5.ebuild b/dev-db/sqlite/sqlite-3.35.5.ebuild
1676 deleted file mode 100644
1677 index a9876482cab1..000000000000
1678 --- a/dev-db/sqlite/sqlite-3.35.5.ebuild
1679 +++ /dev/null
1680 @@ -1,428 +0,0 @@
1681 -# Copyright 1999-2021 Gentoo Authors
1682 -# Distributed under the terms of the GNU General Public License v2
1683 -
1684 -EAPI="7"
1685 -
1686 -inherit autotools flag-o-matic multilib-minimal toolchain-funcs
1687 -
1688 -if [[ "${PV}" != "9999" ]]; then
1689 - SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
1690 - DOC_PV="${SRC_PV}"
1691 - # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
1692 -fi
1693 -
1694 -DESCRIPTION="SQL database engine"
1695 -HOMEPAGE="https://sqlite.org/"
1696 -if [[ "${PV}" == "9999" ]]; then
1697 - SRC_URI=""
1698 -else
1699 - SRC_URI="https://sqlite.org/2021/${PN}-src-${SRC_PV}.zip
1700 - doc? ( https://sqlite.org/2021/${PN}-doc-${DOC_PV}.zip )"
1701 -fi
1702 -
1703 -LICENSE="public-domain"
1704 -SLOT="3"
1705 -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
1706 -IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
1707 -if [[ "${PV}" == "9999" ]]; then
1708 - PROPERTIES="live"
1709 -fi
1710 -RESTRICT="!test? ( test )"
1711 -
1712 -if [[ "${PV}" == "9999" ]]; then
1713 - BDEPEND=">=dev-lang/tcl-8.6:0
1714 - dev-vcs/fossil"
1715 -else
1716 - BDEPEND="app-arch/unzip
1717 - >=dev-lang/tcl-8.6:0"
1718 -fi
1719 -RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
1720 - icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
1721 - readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
1722 - tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
1723 - tools? ( dev-lang/tcl:0= )"
1724 -DEPEND="${RDEPEND}
1725 - test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
1726 -
1727 -if [[ "${PV}" == "9999" ]]; then
1728 - S="${WORKDIR}/${PN}"
1729 -else
1730 - S="${WORKDIR}/${PN}-src-${SRC_PV}"
1731 -fi
1732 -
1733 -_fossil_fetch() {
1734 - local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
1735 - local repo_id="${1}"
1736 - local repo_uri="${2}"
1737 -
1738 - local -x FOSSIL_HOME="${HOME}"
1739 -
1740 - mkdir -p "${T}/fossil/${repo_id}" || die
1741 - pushd "${T}/fossil/${repo_id}" > /dev/null || die
1742 -
1743 - if [[ -n "${EVCS_OFFLINE}" ]]; then
1744 - if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
1745 - die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
1746 - fi
1747 - else
1748 - if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
1749 - einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
1750 - fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
1751 - echo
1752 - else
1753 - cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
1754 - einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
1755 - fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
1756 - echo
1757 - fi
1758 -
1759 - (
1760 - addwrite "${distdir}"
1761 - mkdir -p "${distdir}/fossil-src/${repo_id}" || die
1762 - cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
1763 - )
1764 - fi
1765 -
1766 - popd > /dev/null || die
1767 -}
1768 -
1769 -_fossil_checkout() {
1770 - local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
1771 - local repo_id="${1}"
1772 - local branch_or_commit="${2}"
1773 - local target_directory="${3}"
1774 -
1775 - local -x FOSSIL_HOME="${HOME}"
1776 -
1777 - if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
1778 - die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
1779 - fi
1780 -
1781 - if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
1782 - mkdir -p "${T}/fossil/${repo_id}" || die
1783 - cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
1784 - fi
1785 -
1786 - mkdir "${target_directory}" || die
1787 - pushd "${target_directory}" > /dev/null || die
1788 -
1789 - einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
1790 - fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
1791 - echo
1792 -
1793 - popd > /dev/null || die
1794 -}
1795 -
1796 -fossil_fetch() {
1797 - local repo_id="${1}"
1798 - local repo_uri="${2}"
1799 - local target_directory="${3}"
1800 -
1801 - local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
1802 -
1803 - _fossil_fetch "${repo_id}" "${repo_uri}"
1804 - _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
1805 -}
1806 -
1807 -src_unpack() {
1808 - if [[ "${PV}" == "9999" ]]; then
1809 - fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
1810 - if use doc; then
1811 - fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
1812 - fi
1813 - else
1814 - default
1815 - fi
1816 -}
1817 -
1818 -src_prepare() {
1819 - eapply "${FILESDIR}/"${PN}-3.35.0-build_{1.1,1.2,2.1,2.2}.patch
1820 -
1821 - eapply_user
1822 -
1823 - eautoreconf
1824 -
1825 - multilib_copy_sources
1826 -}
1827 -
1828 -multilib_src_configure() {
1829 - local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
1830 - local options=()
1831 -
1832 - options+=(
1833 - --enable-load-extension
1834 - --enable-threadsafe
1835 - )
1836 -
1837 - # Support detection of misuse of SQLite API.
1838 - # https://sqlite.org/compile.html#enable_api_armor
1839 - append-cppflags -DSQLITE_ENABLE_API_ARMOR
1840 -
1841 - # Support bytecode and tables_used virtual tables.
1842 - # https://sqlite.org/compile.html#enable_bytecode_vtab
1843 - # https://sqlite.org/bytecodevtab.html
1844 - append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
1845 -
1846 - # Support column metadata functions.
1847 - # https://sqlite.org/compile.html#enable_column_metadata
1848 - # https://sqlite.org/c3ref/column_database_name.html
1849 - append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
1850 -
1851 - # Support sqlite_dbpage virtual table.
1852 - # https://sqlite.org/compile.html#enable_dbpage_vtab
1853 - # https://sqlite.org/dbpage.html
1854 - append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
1855 -
1856 - # Support dbstat virtual table.
1857 - # https://sqlite.org/compile.html#enable_dbstat_vtab
1858 - # https://sqlite.org/dbstat.html
1859 - append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
1860 -
1861 - # Support sqlite3_serialize() and sqlite3_deserialize() functions.
1862 - # https://sqlite.org/compile.html#enable_deserialize
1863 - # https://sqlite.org/c3ref/serialize.html
1864 - # https://sqlite.org/c3ref/deserialize.html
1865 - append-cppflags -DSQLITE_ENABLE_DESERIALIZE
1866 -
1867 - # Support comments in output of EXPLAIN.
1868 - # https://sqlite.org/compile.html#enable_explain_comments
1869 - append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
1870 -
1871 - # Support Full-Text Search versions 3, 4 and 5.
1872 - # https://sqlite.org/compile.html#enable_fts3
1873 - # https://sqlite.org/compile.html#enable_fts3_parenthesis
1874 - # https://sqlite.org/compile.html#enable_fts4
1875 - # https://sqlite.org/compile.html#enable_fts5
1876 - # https://sqlite.org/fts3.html
1877 - # https://sqlite.org/fts5.html
1878 - append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
1879 - options+=(--enable-fts5)
1880 -
1881 - # Support hidden columns.
1882 - append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
1883 -
1884 - # Support JSON1 extension.
1885 - # https://sqlite.org/compile.html#enable_json1
1886 - # https://sqlite.org/json1.html
1887 - append-cppflags -DSQLITE_ENABLE_JSON1
1888 -
1889 - # Support memsys5 memory allocator.
1890 - # https://sqlite.org/compile.html#enable_memsys5
1891 - # https://sqlite.org/malloc.html#memsys5
1892 - append-cppflags -DSQLITE_ENABLE_MEMSYS5
1893 -
1894 - # Support sqlite3_normalized_sql() function.
1895 - # https://sqlite.org/c3ref/expanded_sql.html
1896 - append-cppflags -DSQLITE_ENABLE_NORMALIZE
1897 -
1898 - # Support sqlite_offset() function.
1899 - # https://sqlite.org/compile.html#enable_offset_sql_func
1900 - # https://sqlite.org/lang_corefunc.html#sqlite_offset
1901 - append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
1902 -
1903 - # Support pre-update hook functions.
1904 - # https://sqlite.org/compile.html#enable_preupdate_hook
1905 - # https://sqlite.org/c3ref/preupdate_count.html
1906 - append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
1907 -
1908 - # Support Resumable Bulk Update extension.
1909 - # https://sqlite.org/compile.html#enable_rbu
1910 - # https://sqlite.org/rbu.html
1911 - append-cppflags -DSQLITE_ENABLE_RBU
1912 -
1913 - # Support R*Trees.
1914 - # https://sqlite.org/compile.html#enable_rtree
1915 - # https://sqlite.org/compile.html#enable_geopoly
1916 - # https://sqlite.org/rtree.html
1917 - # https://sqlite.org/geopoly.html
1918 - append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
1919 -
1920 - # Support Session extension.
1921 - # https://sqlite.org/compile.html#enable_session
1922 - # https://sqlite.org/sessionintro.html
1923 - append-cppflags -DSQLITE_ENABLE_SESSION
1924 -
1925 - # Support scan status functions.
1926 - # https://sqlite.org/compile.html#enable_stmt_scanstatus
1927 - # https://sqlite.org/c3ref/stmt_scanstatus.html
1928 - # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
1929 - append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
1930 -
1931 - # Support sqlite_stmt virtual table.
1932 - # https://sqlite.org/compile.html#enable_stmtvtab
1933 - # https://sqlite.org/stmt.html
1934 - append-cppflags -DSQLITE_ENABLE_STMTVTAB
1935 -
1936 - # Support unknown() function.
1937 - # https://sqlite.org/compile.html#enable_unknown_sql_function
1938 - append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
1939 -
1940 - # Support unlock notification.
1941 - # https://sqlite.org/compile.html#enable_unlock_notify
1942 - # https://sqlite.org/c3ref/unlock_notify.html
1943 - # https://sqlite.org/unlock_notify.html
1944 - append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
1945 -
1946 - # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
1947 - # https://sqlite.org/compile.html#enable_update_delete_limit
1948 - # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
1949 - # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
1950 - append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
1951 -
1952 - # Support soundex() function.
1953 - # https://sqlite.org/compile.html#soundex
1954 - # https://sqlite.org/lang_corefunc.html#soundex
1955 - append-cppflags -DSQLITE_SOUNDEX
1956 -
1957 - # Support URI filenames.
1958 - # https://sqlite.org/compile.html#use_uri
1959 - # https://sqlite.org/uri.html
1960 - append-cppflags -DSQLITE_USE_URI
1961 -
1962 - # debug USE flag.
1963 - options+=($(use_enable debug))
1964 -
1965 - # icu USE flag.
1966 - if use icu; then
1967 - # Support ICU extension.
1968 - # https://sqlite.org/compile.html#enable_icu
1969 - append-cppflags -DSQLITE_ENABLE_ICU
1970 - sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
1971 - fi
1972 -
1973 - # readline USE flag.
1974 - options+=(
1975 - --disable-editline
1976 - $(use_enable readline)
1977 - )
1978 - if use readline; then
1979 - options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
1980 - fi
1981 -
1982 - # secure-delete USE flag.
1983 - if use secure-delete; then
1984 - # Enable secure_delete pragma by default.
1985 - # https://sqlite.org/compile.html#secure_delete
1986 - # https://sqlite.org/pragma.html#pragma_secure_delete
1987 - append-cppflags -DSQLITE_SECURE_DELETE
1988 - fi
1989 -
1990 - # static-libs USE flag.
1991 - options+=($(use_enable static-libs static))
1992 -
1993 - # tcl, test, tools USE flags.
1994 - if use tcl || use test || { use tools && multilib_is_native_abi; }; then
1995 - options+=(
1996 - --enable-tcl
1997 - --with-tcl="${ESYSROOT}/usr/$(get_libdir)"
1998 - )
1999 - else
2000 - options+=(--disable-tcl)
2001 - fi
2002 -
2003 - if [[ "${ABI}" == "x86" ]]; then
2004 - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
2005 - append-cflags -mfpmath=sse
2006 - else
2007 - append-cflags -ffloat-store
2008 - fi
2009 - fi
2010 -
2011 - econf "${options[@]}"
2012 -}
2013 -
2014 -multilib_src_compile() {
2015 - emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
2016 -
2017 - if use tools && multilib_is_native_abi; then
2018 - emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
2019 - fi
2020 -
2021 - if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
2022 - emake tclsqlite3.c
2023 -
2024 - local build_directory="$(pwd)"
2025 - build_directory="${build_directory##*/}"
2026 -
2027 - mkdir "${WORKDIR}/${PN}-doc-build" || die
2028 - pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
2029 -
2030 - emake -f "../${PN}-doc/Makefile" -j1 SRC="../${PN}" BLD="../${build_directory}" DOC="../${PN}-doc" CC="$(tc-getBUILD_CC)" TCLINC="" TCLFLAGS="$($(tc-getBUILD_PKG_CONFIG) --libs tcl) -ldl -lm" base doc
2031 - rmdir doc/matrix{/*,} || die
2032 -
2033 - popd > /dev/null || die
2034 - fi
2035 -}
2036 -
2037 -multilib_src_test() {
2038 - if [[ "${EUID}" -eq 0 ]]; then
2039 - ewarn "Skipping tests due to root permissions"
2040 - return
2041 - fi
2042 -
2043 - local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
2044 -
2045 - emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
2046 -}
2047 -
2048 -multilib_src_install() {
2049 - emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
2050 -
2051 - if use tools && multilib_is_native_abi; then
2052 - install_tool() {
2053 - if [[ -f ".libs/${1}" ]]; then
2054 - newbin ".libs/${1}" "${2}"
2055 - else
2056 - newbin "${1}" "${2}"
2057 - fi
2058 - }
2059 -
2060 - install_tool changeset sqlite3-changeset
2061 - install_tool dbdump sqlite3-db-dump
2062 - install_tool dbhash sqlite3-db-hash
2063 - install_tool dbtotxt sqlite3-db-to-txt
2064 - install_tool index_usage sqlite3-index-usage
2065 - install_tool rbu sqlite3-rbu
2066 - install_tool scrub sqlite3-scrub
2067 - install_tool showdb sqlite3-show-db
2068 - install_tool showjournal sqlite3-show-journal
2069 - install_tool showshm sqlite3-show-shm
2070 - install_tool showstat4 sqlite3-show-stat4
2071 - install_tool showwal sqlite3-show-wal
2072 - install_tool sqldiff sqlite3-diff
2073 - install_tool sqlite3_analyzer sqlite3-analyzer
2074 - install_tool sqlite3_checker sqlite3-checker
2075 - install_tool sqlite3_expert sqlite3-expert
2076 - install_tool sqltclsh sqlite3-tclsh
2077 -
2078 - unset -f install_tool
2079 - fi
2080 -}
2081 -
2082 -multilib_src_install_all() {
2083 - find "${ED}" -name "*.la" -delete || die
2084 -
2085 - doman sqlite3.1
2086 -
2087 - if use doc; then
2088 - if [[ "${PV}" == "9999" ]]; then
2089 - pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
2090 - else
2091 - pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
2092 - fi
2093 -
2094 - find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
2095 - if [[ "${PV}" != "9999" ]]; then
2096 - rm search search.d/admin || die
2097 - rmdir search.d || die
2098 - find -name "*~" -delete || die
2099 - fi
2100 -
2101 - (
2102 - docinto html
2103 - dodoc -r *
2104 - )
2105 -
2106 - popd > /dev/null || die
2107 - fi
2108 -}
2109
2110 diff --git a/dev-db/sqlite/sqlite-3.37.0.ebuild b/dev-db/sqlite/sqlite-3.37.0.ebuild
2111 deleted file mode 100644
2112 index e76f8331b160..000000000000
2113 --- a/dev-db/sqlite/sqlite-3.37.0.ebuild
2114 +++ /dev/null
2115 @@ -1,428 +0,0 @@
2116 -# Copyright 1999-2021 Gentoo Authors
2117 -# Distributed under the terms of the GNU General Public License v2
2118 -
2119 -EAPI="7"
2120 -
2121 -inherit autotools flag-o-matic multilib-minimal toolchain-funcs
2122 -
2123 -if [[ "${PV}" != "9999" ]]; then
2124 - SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
2125 - DOC_PV="${SRC_PV}"
2126 - # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
2127 -fi
2128 -
2129 -DESCRIPTION="SQL database engine"
2130 -HOMEPAGE="https://sqlite.org/"
2131 -if [[ "${PV}" == "9999" ]]; then
2132 - SRC_URI=""
2133 -else
2134 - SRC_URI="https://sqlite.org/2021/${PN}-src-${SRC_PV}.zip
2135 - doc? ( https://sqlite.org/2021/${PN}-doc-${DOC_PV}.zip )"
2136 -fi
2137 -
2138 -LICENSE="public-domain"
2139 -SLOT="3"
2140 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
2141 -IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
2142 -if [[ "${PV}" == "9999" ]]; then
2143 - PROPERTIES="live"
2144 -fi
2145 -RESTRICT="!test? ( test )"
2146 -
2147 -if [[ "${PV}" == "9999" ]]; then
2148 - BDEPEND=">=dev-lang/tcl-8.6:0
2149 - dev-vcs/fossil"
2150 -else
2151 - BDEPEND="app-arch/unzip
2152 - >=dev-lang/tcl-8.6:0"
2153 -fi
2154 -RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
2155 - icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
2156 - readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
2157 - tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
2158 - tools? ( dev-lang/tcl:0= )"
2159 -DEPEND="${RDEPEND}
2160 - test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
2161 -
2162 -if [[ "${PV}" == "9999" ]]; then
2163 - S="${WORKDIR}/${PN}"
2164 -else
2165 - S="${WORKDIR}/${PN}-src-${SRC_PV}"
2166 -fi
2167 -
2168 -_fossil_fetch() {
2169 - local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
2170 - local repo_id="${1}"
2171 - local repo_uri="${2}"
2172 -
2173 - local -x FOSSIL_HOME="${HOME}"
2174 -
2175 - mkdir -p "${T}/fossil/${repo_id}" || die
2176 - pushd "${T}/fossil/${repo_id}" > /dev/null || die
2177 -
2178 - if [[ -n "${EVCS_OFFLINE}" ]]; then
2179 - if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
2180 - die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
2181 - fi
2182 - else
2183 - if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
2184 - einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
2185 - fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
2186 - echo
2187 - else
2188 - cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
2189 - einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
2190 - fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
2191 - echo
2192 - fi
2193 -
2194 - (
2195 - addwrite "${distdir}"
2196 - mkdir -p "${distdir}/fossil-src/${repo_id}" || die
2197 - cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
2198 - )
2199 - fi
2200 -
2201 - popd > /dev/null || die
2202 -}
2203 -
2204 -_fossil_checkout() {
2205 - local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
2206 - local repo_id="${1}"
2207 - local branch_or_commit="${2}"
2208 - local target_directory="${3}"
2209 -
2210 - local -x FOSSIL_HOME="${HOME}"
2211 -
2212 - if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
2213 - die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
2214 - fi
2215 -
2216 - if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
2217 - mkdir -p "${T}/fossil/${repo_id}" || die
2218 - cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
2219 - fi
2220 -
2221 - mkdir "${target_directory}" || die
2222 - pushd "${target_directory}" > /dev/null || die
2223 -
2224 - einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
2225 - fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
2226 - echo
2227 -
2228 - popd > /dev/null || die
2229 -}
2230 -
2231 -fossil_fetch() {
2232 - local repo_id="${1}"
2233 - local repo_uri="${2}"
2234 - local target_directory="${3}"
2235 -
2236 - local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
2237 -
2238 - _fossil_fetch "${repo_id}" "${repo_uri}"
2239 - _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
2240 -}
2241 -
2242 -src_unpack() {
2243 - if [[ "${PV}" == "9999" ]]; then
2244 - fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
2245 - if use doc; then
2246 - fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
2247 - fi
2248 - else
2249 - default
2250 - fi
2251 -}
2252 -
2253 -src_prepare() {
2254 - eapply "${FILESDIR}"/sqlite-3.37.0-configure-amalgamation.patch
2255 -
2256 - eapply_user
2257 -
2258 - eautoreconf
2259 -
2260 - multilib_copy_sources
2261 -}
2262 -
2263 -multilib_src_configure() {
2264 - local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
2265 - local options=()
2266 -
2267 - options+=(
2268 - --enable-load-extension
2269 - --enable-threadsafe
2270 - )
2271 -
2272 - # Support detection of misuse of SQLite API.
2273 - # https://sqlite.org/compile.html#enable_api_armor
2274 - append-cppflags -DSQLITE_ENABLE_API_ARMOR
2275 -
2276 - # Support bytecode and tables_used virtual tables.
2277 - # https://sqlite.org/compile.html#enable_bytecode_vtab
2278 - # https://sqlite.org/bytecodevtab.html
2279 - append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
2280 -
2281 - # Support column metadata functions.
2282 - # https://sqlite.org/compile.html#enable_column_metadata
2283 - # https://sqlite.org/c3ref/column_database_name.html
2284 - append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
2285 -
2286 - # Support sqlite_dbpage virtual table.
2287 - # https://sqlite.org/compile.html#enable_dbpage_vtab
2288 - # https://sqlite.org/dbpage.html
2289 - append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
2290 -
2291 - # Support dbstat virtual table.
2292 - # https://sqlite.org/compile.html#enable_dbstat_vtab
2293 - # https://sqlite.org/dbstat.html
2294 - append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
2295 -
2296 - # Support sqlite3_serialize() and sqlite3_deserialize() functions.
2297 - # https://sqlite.org/compile.html#enable_deserialize
2298 - # https://sqlite.org/c3ref/serialize.html
2299 - # https://sqlite.org/c3ref/deserialize.html
2300 - append-cppflags -DSQLITE_ENABLE_DESERIALIZE
2301 -
2302 - # Support comments in output of EXPLAIN.
2303 - # https://sqlite.org/compile.html#enable_explain_comments
2304 - append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
2305 -
2306 - # Support Full-Text Search versions 3, 4 and 5.
2307 - # https://sqlite.org/compile.html#enable_fts3
2308 - # https://sqlite.org/compile.html#enable_fts3_parenthesis
2309 - # https://sqlite.org/compile.html#enable_fts4
2310 - # https://sqlite.org/compile.html#enable_fts5
2311 - # https://sqlite.org/fts3.html
2312 - # https://sqlite.org/fts5.html
2313 - append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
2314 - options+=(--enable-fts5)
2315 -
2316 - # Support hidden columns.
2317 - append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
2318 -
2319 - # Support JSON1 extension.
2320 - # https://sqlite.org/compile.html#enable_json1
2321 - # https://sqlite.org/json1.html
2322 - append-cppflags -DSQLITE_ENABLE_JSON1
2323 -
2324 - # Support memsys5 memory allocator.
2325 - # https://sqlite.org/compile.html#enable_memsys5
2326 - # https://sqlite.org/malloc.html#memsys5
2327 - append-cppflags -DSQLITE_ENABLE_MEMSYS5
2328 -
2329 - # Support sqlite3_normalized_sql() function.
2330 - # https://sqlite.org/c3ref/expanded_sql.html
2331 - append-cppflags -DSQLITE_ENABLE_NORMALIZE
2332 -
2333 - # Support sqlite_offset() function.
2334 - # https://sqlite.org/compile.html#enable_offset_sql_func
2335 - # https://sqlite.org/lang_corefunc.html#sqlite_offset
2336 - append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
2337 -
2338 - # Support pre-update hook functions.
2339 - # https://sqlite.org/compile.html#enable_preupdate_hook
2340 - # https://sqlite.org/c3ref/preupdate_count.html
2341 - append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
2342 -
2343 - # Support Resumable Bulk Update extension.
2344 - # https://sqlite.org/compile.html#enable_rbu
2345 - # https://sqlite.org/rbu.html
2346 - append-cppflags -DSQLITE_ENABLE_RBU
2347 -
2348 - # Support R*Trees.
2349 - # https://sqlite.org/compile.html#enable_rtree
2350 - # https://sqlite.org/compile.html#enable_geopoly
2351 - # https://sqlite.org/rtree.html
2352 - # https://sqlite.org/geopoly.html
2353 - append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
2354 -
2355 - # Support Session extension.
2356 - # https://sqlite.org/compile.html#enable_session
2357 - # https://sqlite.org/sessionintro.html
2358 - append-cppflags -DSQLITE_ENABLE_SESSION
2359 -
2360 - # Support scan status functions.
2361 - # https://sqlite.org/compile.html#enable_stmt_scanstatus
2362 - # https://sqlite.org/c3ref/stmt_scanstatus.html
2363 - # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
2364 - append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
2365 -
2366 - # Support sqlite_stmt virtual table.
2367 - # https://sqlite.org/compile.html#enable_stmtvtab
2368 - # https://sqlite.org/stmt.html
2369 - append-cppflags -DSQLITE_ENABLE_STMTVTAB
2370 -
2371 - # Support unknown() function.
2372 - # https://sqlite.org/compile.html#enable_unknown_sql_function
2373 - append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
2374 -
2375 - # Support unlock notification.
2376 - # https://sqlite.org/compile.html#enable_unlock_notify
2377 - # https://sqlite.org/c3ref/unlock_notify.html
2378 - # https://sqlite.org/unlock_notify.html
2379 - append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
2380 -
2381 - # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
2382 - # https://sqlite.org/compile.html#enable_update_delete_limit
2383 - # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
2384 - # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
2385 - append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
2386 -
2387 - # Support soundex() function.
2388 - # https://sqlite.org/compile.html#soundex
2389 - # https://sqlite.org/lang_corefunc.html#soundex
2390 - append-cppflags -DSQLITE_SOUNDEX
2391 -
2392 - # Support URI filenames.
2393 - # https://sqlite.org/compile.html#use_uri
2394 - # https://sqlite.org/uri.html
2395 - append-cppflags -DSQLITE_USE_URI
2396 -
2397 - # debug USE flag.
2398 - options+=($(use_enable debug))
2399 -
2400 - # icu USE flag.
2401 - if use icu; then
2402 - # Support ICU extension.
2403 - # https://sqlite.org/compile.html#enable_icu
2404 - append-cppflags -DSQLITE_ENABLE_ICU
2405 - sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
2406 - fi
2407 -
2408 - # readline USE flag.
2409 - options+=(
2410 - --disable-editline
2411 - $(use_enable readline)
2412 - )
2413 - if use readline; then
2414 - options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
2415 - fi
2416 -
2417 - # secure-delete USE flag.
2418 - if use secure-delete; then
2419 - # Enable secure_delete pragma by default.
2420 - # https://sqlite.org/compile.html#secure_delete
2421 - # https://sqlite.org/pragma.html#pragma_secure_delete
2422 - append-cppflags -DSQLITE_SECURE_DELETE
2423 - fi
2424 -
2425 - # static-libs USE flag.
2426 - options+=($(use_enable static-libs static))
2427 -
2428 - # tcl, test, tools USE flags.
2429 - if use tcl || use test || { use tools && multilib_is_native_abi; }; then
2430 - options+=(
2431 - --enable-tcl
2432 - --with-tcl="${ESYSROOT}/usr/$(get_libdir)"
2433 - )
2434 - else
2435 - options+=(--disable-tcl)
2436 - fi
2437 -
2438 - if [[ "${ABI}" == "x86" ]]; then
2439 - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
2440 - append-cflags -mfpmath=sse
2441 - else
2442 - append-cflags -ffloat-store
2443 - fi
2444 - fi
2445 -
2446 - econf "${options[@]}"
2447 -}
2448 -
2449 -multilib_src_compile() {
2450 - emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
2451 -
2452 - if use tools && multilib_is_native_abi; then
2453 - emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
2454 - fi
2455 -
2456 - if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
2457 - emake tclsqlite3.c
2458 -
2459 - local build_directory="$(pwd)"
2460 - build_directory="${build_directory##*/}"
2461 -
2462 - mkdir "${WORKDIR}/${PN}-doc-build" || die
2463 - pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
2464 -
2465 - emake -f "../${PN}-doc/Makefile" -j1 SRC="../${PN}" BLD="../${build_directory}" DOC="../${PN}-doc" CC="$(tc-getBUILD_CC)" TCLINC="" TCLFLAGS="$($(tc-getBUILD_PKG_CONFIG) --libs tcl) -ldl -lm" base doc
2466 - rmdir doc/matrix{/*,} || die
2467 -
2468 - popd > /dev/null || die
2469 - fi
2470 -}
2471 -
2472 -multilib_src_test() {
2473 - if [[ "${EUID}" -eq 0 ]]; then
2474 - ewarn "Skipping tests due to root permissions"
2475 - return
2476 - fi
2477 -
2478 - local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
2479 -
2480 - emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
2481 -}
2482 -
2483 -multilib_src_install() {
2484 - emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
2485 -
2486 - if use tools && multilib_is_native_abi; then
2487 - install_tool() {
2488 - if [[ -f ".libs/${1}" ]]; then
2489 - newbin ".libs/${1}" "${2}"
2490 - else
2491 - newbin "${1}" "${2}"
2492 - fi
2493 - }
2494 -
2495 - install_tool changeset sqlite3-changeset
2496 - install_tool dbdump sqlite3-db-dump
2497 - install_tool dbhash sqlite3-db-hash
2498 - install_tool dbtotxt sqlite3-db-to-txt
2499 - install_tool index_usage sqlite3-index-usage
2500 - install_tool rbu sqlite3-rbu
2501 - install_tool scrub sqlite3-scrub
2502 - install_tool showdb sqlite3-show-db
2503 - install_tool showjournal sqlite3-show-journal
2504 - install_tool showshm sqlite3-show-shm
2505 - install_tool showstat4 sqlite3-show-stat4
2506 - install_tool showwal sqlite3-show-wal
2507 - install_tool sqldiff sqlite3-diff
2508 - install_tool sqlite3_analyzer sqlite3-analyzer
2509 - install_tool sqlite3_checker sqlite3-checker
2510 - install_tool sqlite3_expert sqlite3-expert
2511 - install_tool sqltclsh sqlite3-tclsh
2512 -
2513 - unset -f install_tool
2514 - fi
2515 -}
2516 -
2517 -multilib_src_install_all() {
2518 - find "${ED}" -name "*.la" -delete || die
2519 -
2520 - doman sqlite3.1
2521 -
2522 - if use doc; then
2523 - if [[ "${PV}" == "9999" ]]; then
2524 - pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
2525 - else
2526 - pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
2527 - fi
2528 -
2529 - find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
2530 - if [[ "${PV}" != "9999" ]]; then
2531 - rm search search.d/admin || die
2532 - rmdir search.d || die
2533 - find -name "*~" -delete || die
2534 - fi
2535 -
2536 - (
2537 - docinto html
2538 - dodoc -r *
2539 - )
2540 -
2541 - popd > /dev/null || die
2542 - fi
2543 -}