1 |
commit: de3e209e06e06633a4be943468831d6392e54680 |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> |
3 |
AuthorDate: Tue Oct 2 19:18:50 2018 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 2 20:07:24 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de3e209e |
7 |
|
8 |
dev-db/sqlite: Version bump (3.25.2). |
9 |
|
10 |
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
dev-db/sqlite/Manifest | 3 + |
14 |
.../files/sqlite-3.25.0-full_archive-build.patch | 407 +++++++++++++++++++++ |
15 |
.../sqlite-3.25.0-nonfull_archive-build.patch | 14 + |
16 |
...low_window_functions_in_recursive_queries.patch | 49 +++ |
17 |
.../files/sqlite-3.25.2-full_archive-tests.patch | 70 ++++ |
18 |
...low_window_functions_in_recursive_queries.patch | 19 + |
19 |
dev-db/sqlite/sqlite-3.25.2.ebuild | 322 ++++++++++++++++ |
20 |
7 files changed, 884 insertions(+) |
21 |
|
22 |
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest |
23 |
index f351977d074..d61f68c44ac 100644 |
24 |
--- a/dev-db/sqlite/Manifest |
25 |
+++ b/dev-db/sqlite/Manifest |
26 |
@@ -1,6 +1,9 @@ |
27 |
DIST sqlite-autoconf-3230100.tar.gz 2675362 BLAKE2B 2dd075f0dc05425563a8e679bb463724296294b5845746f06b51a24c9601be203ee0f2213f43eaca0757fcbb54b777cee746d873c98f377a0b010d8066d7fcb5 SHA512 52cae7ed0678b763d40373ae260672b906861379428529a58a017cbc82419a6b109e0b2ac7ff5532e6d941693cc4ab68e6563f424b92b3b27c8916859a6e4826 |
28 |
DIST sqlite-autoconf-3240000.tar.gz 2699252 BLAKE2B c8beb3b90bdd06f76cafeba859cbf91cf4d0cb313fc9202d210ccbad5fca7f9a062ede63387e814d664f0ae38bcfa48db222f466dbcd429fecfb53cfdac155c4 SHA512 eaec866de26003ec36559aab15dd18dc0e6029453002a4eec5e176bb35a712b8b06c235436e6c1a226b67c7eb90d7a26c2b3b3d9a5e6e92a5af485236b77c878 |
29 |
+DIST sqlite-autoconf-3250200.tar.gz 2763876 BLAKE2B 3d97cc60edf8f91855215bd59260362665c8ec7699510f2e07c7ba57e10c400dcc99bb392e216f798bef1ffa7120b48ee62ce144a871741ef57b3aefeab875d6 SHA512 5ef9a6dfbb0822257af1a3a379785a95ab02edecbbb53b57074ddd0b8dc294fc07cbb9a8a7acc4e1640fb1743525ed6331fecebbddce01bc017330b20e127ad9 |
30 |
DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471 |
31 |
DIST sqlite-doc-3240000.zip 9030826 BLAKE2B 4444e3dd0ce782e19fa01c881e0b5453723419ef1cf95cbe751d759a264bbe288a5c23a2b6514ed459b99b11637349c02def68fed7df8625bfc161307e44564c SHA512 31e9046cea569d7ad1b3af176e1bb18cd59474afb6849871ead6e7c9c096f046162fb313a38684a8c944fad9f689c4c3c692be1d7dc6a8ef5a6685bbc7dfdab6 |
32 |
+DIST sqlite-doc-3250200.zip 9229732 BLAKE2B 9bc4499c2934d15428dd30e0522362a2c2e703061c293f1b657f01d3945612760be3b4f145ddf76d9cf87953fae26884646887e53c0c55683ce42bc239dcf952 SHA512 a0b764ca0eea0e9719d46b6e1f92db78578457c8331976d4712c56cd10fc062fd73629686a0e45dfdeb505fbfbe0c53652a5e64507702ff4e12b62a2fc8d8211 |
33 |
DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b |
34 |
DIST sqlite-src-3240000.zip 10980065 BLAKE2B 201a59cb34271e5ac79e96e4e2ea64f8b61aa99c44eedf61c0a21752ad4376caaf7980a6923dca66266b1a315d9867871d0d172c17907b4147c15431aa212a70 SHA512 812c2df7179abb1e445b5b3e161c940b120c53366a7b2c1f0bfc3599cd9921e5543ba39ca3f297eeaefec318f10c15f630f00f9cf04133c7cd419a04f3bbdd0e |
35 |
+DIST sqlite-src-3250200.zip 11381811 BLAKE2B 6183436f66c862c32d1dfd59ea4ccb5eaf3dd516ffcf9d7edf786e8fbf56eff3cb84d08e291b2e86fae25e537bed452aed693bdb0f0d6bb6581da86641013557 SHA512 7354af2d45c574ba867fab8aabc6ff903279f028aebed50c71019066df78f61a0b941564c572c87b0f3ed3e5783bf325a690a9957d775228fbbb293dd9a5ad37 |
36 |
|
37 |
diff --git a/dev-db/sqlite/files/sqlite-3.25.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.25.0-full_archive-build.patch |
38 |
new file mode 100644 |
39 |
index 00000000000..d39d843d12c |
40 |
--- /dev/null |
41 |
+++ b/dev-db/sqlite/files/sqlite-3.25.0-full_archive-build.patch |
42 |
@@ -0,0 +1,407 @@ |
43 |
+Move some code to libsqlite3.so to avoid duplication. |
44 |
+Link executables against libsqlite3.so. |
45 |
+Increase timeout for fuzzcheck. |
46 |
+Fix building with dlopen() not available. |
47 |
+ |
48 |
+--- /Makefile.in |
49 |
++++ /Makefile.in |
50 |
+@@ -310,6 +310,9 @@ |
51 |
+ # Source code for extensions |
52 |
+ # |
53 |
+ SRC += \ |
54 |
++ $(TOP)/ext/expert/sqlite3expert.c \ |
55 |
++ $(TOP)/ext/expert/sqlite3expert.h |
56 |
++SRC += \ |
57 |
+ $(TOP)/ext/fts1/fts1.c \ |
58 |
+ $(TOP)/ext/fts1/fts1.h \ |
59 |
+ $(TOP)/ext/fts1/fts1_hash.c \ |
60 |
+@@ -359,8 +362,11 @@ |
61 |
+ $(TOP)/ext/rbu/sqlite3rbu.h \ |
62 |
+ $(TOP)/ext/rbu/sqlite3rbu.c |
63 |
+ SRC += \ |
64 |
++ $(TOP)/ext/misc/appendvfs.c \ |
65 |
+ $(TOP)/ext/misc/json1.c \ |
66 |
+- $(TOP)/ext/misc/stmt.c |
67 |
++ $(TOP)/ext/misc/sqlar.c \ |
68 |
++ $(TOP)/ext/misc/stmt.c \ |
69 |
++ $(TOP)/ext/misc/zipfile.c |
70 |
+ |
71 |
+ # Generated source code files |
72 |
+ # |
73 |
+@@ -430,7 +436,6 @@ |
74 |
+ # Statically linked extensions |
75 |
+ # |
76 |
+ TESTSRC += \ |
77 |
+- $(TOP)/ext/expert/sqlite3expert.c \ |
78 |
+ $(TOP)/ext/expert/test_expert.c \ |
79 |
+ $(TOP)/ext/misc/amatch.c \ |
80 |
+ $(TOP)/ext/misc/carray.c \ |
81 |
+@@ -453,8 +458,7 @@ |
82 |
+ $(TOP)/ext/misc/spellfix.c \ |
83 |
+ $(TOP)/ext/misc/totype.c \ |
84 |
+ $(TOP)/ext/misc/unionvtab.c \ |
85 |
+- $(TOP)/ext/misc/wholenumber.c \ |
86 |
+- $(TOP)/ext/misc/zipfile.c |
87 |
++ $(TOP)/ext/misc/wholenumber.c |
88 |
+ |
89 |
+ # Source code to the library files needed by the test fixture |
90 |
+ # |
91 |
+@@ -620,25 +624,25 @@ |
92 |
+ |
93 |
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la |
94 |
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \ |
95 |
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ |
96 |
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \ |
97 |
+ -rpath "$(TCLLIBDIR)" \ |
98 |
+ -version-info "8:6:8" \ |
99 |
+ -avoid-version |
100 |
+ |
101 |
+-sqlite3$(TEXE): shell.c sqlite3.c |
102 |
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \ |
103 |
+- shell.c sqlite3.c \ |
104 |
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)" |
105 |
++sqlite3$(TEXE): shell.c libsqlite3.la |
106 |
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \ |
107 |
++ shell.c libsqlite3.la \ |
108 |
++ $(LIBREADLINE) |
109 |
+ |
110 |
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h |
111 |
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS) |
112 |
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la |
113 |
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la |
114 |
+ |
115 |
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h |
116 |
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS) |
117 |
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la |
118 |
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la |
119 |
+ |
120 |
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo |
121 |
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la |
122 |
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \ |
123 |
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS) |
124 |
++ $(TOP)/ext/misc/scrub.c libsqlite3.la |
125 |
+ |
126 |
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c |
127 |
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c |
128 |
+@@ -717,7 +721,7 @@ |
129 |
+ # Rule to build the amalgamation |
130 |
+ # |
131 |
+ sqlite3.lo: sqlite3.c |
132 |
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c |
133 |
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c |
134 |
+ |
135 |
+ # Rules to build the LEMON compiler generator |
136 |
+ # |
137 |
+@@ -1017,14 +1021,9 @@ |
138 |
+ # Source files that go into making shell.c |
139 |
+ SHELL_SRC = \ |
140 |
+ $(TOP)/src/shell.c.in \ |
141 |
+- $(TOP)/ext/misc/appendvfs.c \ |
142 |
+ $(TOP)/ext/misc/shathree.c \ |
143 |
+ $(TOP)/ext/misc/fileio.c \ |
144 |
+ $(TOP)/ext/misc/completion.c \ |
145 |
+- $(TOP)/ext/misc/sqlar.c \ |
146 |
+- $(TOP)/ext/expert/sqlite3expert.c \ |
147 |
+- $(TOP)/ext/expert/sqlite3expert.h \ |
148 |
+- $(TOP)/ext/misc/zipfile.c \ |
149 |
+ $(TOP)/src/test_windirent.c |
150 |
+ |
151 |
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl |
152 |
+@@ -1183,15 +1182,15 @@ |
153 |
+ |
154 |
+ # Fuzz testing |
155 |
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db |
156 |
+- ./fuzzcheck$(TEXE) $(FUZZDATA) |
157 |
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA) |
158 |
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db |
159 |
+ |
160 |
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db |
161 |
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA) |
162 |
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA) |
163 |
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db |
164 |
+ |
165 |
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db |
166 |
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA) |
167 |
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA) |
168 |
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db |
169 |
+ |
170 |
+ # The veryquick.test TCL tests. |
171 |
+@@ -1222,24 +1221,23 @@ |
172 |
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE) |
173 |
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS) |
174 |
+ |
175 |
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in |
176 |
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in |
177 |
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c |
178 |
+ |
179 |
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c |
180 |
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS) |
181 |
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la |
182 |
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL) |
183 |
+ |
184 |
+-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 |
185 |
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in |
186 |
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c |
187 |
+ |
188 |
+-sqltclsh$(TEXE): sqltclsh.c |
189 |
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS) |
190 |
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la |
191 |
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL) |
192 |
+ |
193 |
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c |
194 |
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS) |
195 |
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la |
196 |
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la |
197 |
+ |
198 |
+ CHECKER_DEPS =\ |
199 |
+ $(TOP)/tool/mkccode.tcl \ |
200 |
+- sqlite3.c \ |
201 |
+ $(TOP)/src/tclsqlite.c \ |
202 |
+ $(TOP)/ext/repair/sqlite3_checker.tcl \ |
203 |
+ $(TOP)/ext/repair/checkindex.c \ |
204 |
+@@ -1250,30 +1248,30 @@ |
205 |
+ sqlite3_checker.c: $(CHECKER_DEPS) |
206 |
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@ |
207 |
+ |
208 |
+-sqlite3_checker$(TEXE): sqlite3_checker.c |
209 |
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS) |
210 |
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la |
211 |
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL) |
212 |
+ |
213 |
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo |
214 |
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la |
215 |
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \ |
216 |
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS) |
217 |
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la |
218 |
+ |
219 |
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo |
220 |
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS) |
221 |
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la |
222 |
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la |
223 |
+ |
224 |
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo |
225 |
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS) |
226 |
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la |
227 |
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la |
228 |
+ |
229 |
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo |
230 |
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS) |
231 |
++showjournal$(TEXE): $(TOP)/tool/showjournal.c |
232 |
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c |
233 |
+ |
234 |
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo |
235 |
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS) |
236 |
++showwal$(TEXE): $(TOP)/tool/showwal.c |
237 |
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c |
238 |
+ |
239 |
+ showshm$(TEXE): $(TOP)/tool/showshm.c |
240 |
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c |
241 |
+ |
242 |
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo |
243 |
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS) |
244 |
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la |
245 |
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la |
246 |
+ |
247 |
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo |
248 |
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS) |
249 |
+@@ -1295,11 +1293,11 @@ |
250 |
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c |
251 |
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS) |
252 |
+ |
253 |
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo |
254 |
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS) |
255 |
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la |
256 |
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la |
257 |
+ |
258 |
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la |
259 |
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS) |
260 |
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la |
261 |
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ |
262 |
+ |
263 |
+ # This target will fail if the SQLite amalgamation contains any exported |
264 |
+ # symbols that do not begin with "sqlite3_". It is run as part of the |
265 |
+--- /configure.ac |
266 |
++++ /configure.ac |
267 |
+@@ -587,6 +587,9 @@ |
268 |
+ if test "${enable_load_extension}" = "yes" ; then |
269 |
+ OPT_FEATURE_FLAGS="" |
270 |
+ AC_SEARCH_LIBS(dlopen, dl) |
271 |
++ if test "${ac_cv_search_dlopen}" = "no" ; then |
272 |
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" |
273 |
++ fi |
274 |
+ else |
275 |
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" |
276 |
+ fi |
277 |
+--- /ext/misc/sqlar.c |
278 |
++++ /ext/misc/sqlar.c |
279 |
+@@ -14,6 +14,8 @@ |
280 |
+ ** for working with sqlar archives and used by the shell tool's built-in |
281 |
+ ** sqlar support. |
282 |
+ */ |
283 |
++#ifdef SQLITE_HAVE_ZLIB |
284 |
++ |
285 |
+ #include "sqlite3ext.h" |
286 |
+ SQLITE_EXTENSION_INIT1 |
287 |
+ #include <zlib.h> |
288 |
+@@ -119,3 +121,5 @@ |
289 |
+ } |
290 |
+ return rc; |
291 |
+ } |
292 |
++ |
293 |
++#endif /* SQLITE_HAVE_ZLIB */ |
294 |
+--- /ext/misc/zipfile.c |
295 |
++++ /ext/misc/zipfile.c |
296 |
+@@ -24,6 +24,8 @@ |
297 |
+ ** * No support for zip64 extensions |
298 |
+ ** * Only the "inflate/deflate" (zlib) compression method is supported |
299 |
+ */ |
300 |
++#ifdef SQLITE_HAVE_ZLIB |
301 |
++ |
302 |
+ #include "sqlite3ext.h" |
303 |
+ SQLITE_EXTENSION_INIT1 |
304 |
+ #include <stdio.h> |
305 |
+@@ -2175,3 +2177,5 @@ |
306 |
+ (void)pzErrMsg; /* Unused parameter */ |
307 |
+ return zipfileRegister(db); |
308 |
+ } |
309 |
++ |
310 |
++#endif /* SQLITE_HAVE_ZLIB */ |
311 |
+--- /ext/repair/sqlite3_checker.c.in |
312 |
++++ /ext/repair/sqlite3_checker.c.in |
313 |
+@@ -2,6 +2,7 @@ |
314 |
+ ** Read an SQLite database file and analyze its space utilization. Generate |
315 |
+ ** text on standard output. |
316 |
+ */ |
317 |
++#define SQLITE_CORE 1 |
318 |
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc |
319 |
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1 |
320 |
+ #define SQLITE_ENABLE_JSON1 1 |
321 |
+@@ -14,7 +15,7 @@ |
322 |
+ #define SQLITE_OMIT_SHARED_CACHE 1 |
323 |
+ #define SQLITE_DEFAULT_MEMSTATUS 0 |
324 |
+ #define SQLITE_MAX_EXPR_DEPTH 0 |
325 |
+-INCLUDE sqlite3.c |
326 |
++#include "sqlite3.h" |
327 |
+ INCLUDE $ROOT/src/tclsqlite.c |
328 |
+ INCLUDE $ROOT/ext/misc/btreeinfo.c |
329 |
+ INCLUDE $ROOT/ext/repair/checkindex.c |
330 |
+--- /src/shell.c.in |
331 |
++++ /src/shell.c.in |
332 |
+@@ -61,6 +61,7 @@ |
333 |
+ #include <stdio.h> |
334 |
+ #include <assert.h> |
335 |
+ #include "sqlite3.h" |
336 |
++#include "ext/expert/sqlite3expert.h" |
337 |
+ typedef sqlite3_int64 i64; |
338 |
+ typedef sqlite3_uint64 u64; |
339 |
+ typedef unsigned char u8; |
340 |
+@@ -127,6 +128,10 @@ |
341 |
+ # define SHELL_USE_LOCAL_GETLINE 1 |
342 |
+ #endif |
343 |
+ |
344 |
++#ifdef SQLITE_HAVE_ZLIB |
345 |
++#include <zlib.h> |
346 |
++#endif |
347 |
++ |
348 |
+ |
349 |
+ #if defined(_WIN32) || defined(WIN32) |
350 |
+ # include <io.h> |
351 |
+@@ -936,13 +941,6 @@ |
352 |
+ INCLUDE ../ext/misc/shathree.c |
353 |
+ INCLUDE ../ext/misc/fileio.c |
354 |
+ INCLUDE ../ext/misc/completion.c |
355 |
+-INCLUDE ../ext/misc/appendvfs.c |
356 |
+-#ifdef SQLITE_HAVE_ZLIB |
357 |
+-INCLUDE ../ext/misc/zipfile.c |
358 |
+-INCLUDE ../ext/misc/sqlar.c |
359 |
+-#endif |
360 |
+-INCLUDE ../ext/expert/sqlite3expert.h |
361 |
+-INCLUDE ../ext/expert/sqlite3expert.c |
362 |
+ |
363 |
+ #if defined(SQLITE_ENABLE_SESSION) |
364 |
+ /* |
365 |
+@@ -3654,7 +3652,9 @@ |
366 |
+ sqlite3_shathree_init(p->db, 0, 0); |
367 |
+ sqlite3_completion_init(p->db, 0, 0); |
368 |
+ #ifdef SQLITE_HAVE_ZLIB |
369 |
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *); |
370 |
+ sqlite3_zipfile_init(p->db, 0, 0); |
371 |
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *); |
372 |
+ sqlite3_sqlar_init(p->db, 0, 0); |
373 |
+ #endif |
374 |
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0, |
375 |
+@@ -5549,6 +5549,7 @@ |
376 |
+ goto end_ar_command; |
377 |
+ } |
378 |
+ sqlite3_fileio_init(cmd.db, 0, 0); |
379 |
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *); |
380 |
+ sqlite3_sqlar_init(cmd.db, 0, 0); |
381 |
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p, |
382 |
+ shellPutsFunc, 0, 0); |
383 |
+@@ -8584,6 +8585,7 @@ |
384 |
+ #endif |
385 |
+ } |
386 |
+ data.out = stdout; |
387 |
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *); |
388 |
+ sqlite3_appendvfs_init(0,0,0); |
389 |
+ |
390 |
+ /* Go ahead and open the database file if it already exists. If the |
391 |
+--- /tool/mksqlite3c.tcl |
392 |
++++ /tool/mksqlite3c.tcl |
393 |
+@@ -117,6 +117,7 @@ |
394 |
+ rtree.h |
395 |
+ sqlite3session.h |
396 |
+ sqlite3.h |
397 |
++ sqlite3expert.h |
398 |
+ sqlite3ext.h |
399 |
+ sqlite3rbu.h |
400 |
+ sqliteicu.h |
401 |
+@@ -403,6 +404,10 @@ |
402 |
+ sqlite3session.c |
403 |
+ fts5.c |
404 |
+ stmt.c |
405 |
++ appendvfs.c |
406 |
++ sqlar.c |
407 |
++ sqlite3expert.c |
408 |
++ zipfile.c |
409 |
+ } { |
410 |
+ copy_file tsrc/$file |
411 |
+ } |
412 |
+--- /tool/sqlite3_analyzer.c.in |
413 |
++++ /tool/sqlite3_analyzer.c.in |
414 |
+@@ -14,9 +14,6 @@ |
415 |
+ #define SQLITE_DEFAULT_MEMSTATUS 0 |
416 |
+ #define SQLITE_MAX_EXPR_DEPTH 0 |
417 |
+ #define SQLITE_OMIT_LOAD_EXTENSION 1 |
418 |
+-#ifndef USE_EXTERNAL_SQLITE |
419 |
+-INCLUDE sqlite3.c |
420 |
+-#endif |
421 |
+ INCLUDE $ROOT/src/tclsqlite.c |
422 |
+ |
423 |
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){ |
424 |
+--- /tool/sqltclsh.c.in |
425 |
++++ /tool/sqltclsh.c.in |
426 |
+@@ -27,19 +27,17 @@ |
427 |
+ #define SQLITE_OMIT_SHARED_CACHE 1 |
428 |
+ #define SQLITE_DEFAULT_MEMSTATUS 0 |
429 |
+ #define SQLITE_MAX_EXPR_DEPTH 0 |
430 |
+-INCLUDE sqlite3.c |
431 |
+-INCLUDE $ROOT/ext/misc/appendvfs.c |
432 |
+-#ifdef SQLITE_HAVE_ZLIB |
433 |
+-INCLUDE $ROOT/ext/misc/zipfile.c |
434 |
+-INCLUDE $ROOT/ext/misc/sqlar.c |
435 |
+-#endif |
436 |
++#include "sqlite3.h" |
437 |
+ INCLUDE $ROOT/src/tclsqlite.c |
438 |
+ |
439 |
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){ |
440 |
+ (void)interp; |
441 |
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *); |
442 |
+ sqlite3_appendvfs_init(0,0,0); |
443 |
+ #ifdef SQLITE_HAVE_ZLIB |
444 |
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *); |
445 |
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init); |
446 |
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *); |
447 |
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init); |
448 |
+ #endif |
449 |
+ |
450 |
|
451 |
diff --git a/dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch b/dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch |
452 |
new file mode 100644 |
453 |
index 00000000000..be0a7e30dde |
454 |
--- /dev/null |
455 |
+++ b/dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch |
456 |
@@ -0,0 +1,14 @@ |
457 |
+Fix building with dlopen() not available. |
458 |
+ |
459 |
+--- /configure.ac |
460 |
++++ /configure.ac |
461 |
+@@ -102,6 +102,9 @@ |
462 |
+ [], [enable_dynamic_extensions=yes]) |
463 |
+ if test x"$enable_dynamic_extensions" != "xno"; then |
464 |
+ AC_SEARCH_LIBS(dlopen, dl) |
465 |
++ if test "${ac_cv_search_dlopen}" = "no"; then |
466 |
++ BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_OMIT_LOAD_EXTENSION=1" |
467 |
++ fi |
468 |
+ else |
469 |
+ BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_OMIT_LOAD_EXTENSION=1" |
470 |
+ fi |
471 |
|
472 |
diff --git a/dev-db/sqlite/files/sqlite-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch b/dev-db/sqlite/files/sqlite-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch |
473 |
new file mode 100644 |
474 |
index 00000000000..6b34e2e4f9d |
475 |
--- /dev/null |
476 |
+++ b/dev-db/sqlite/files/sqlite-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch |
477 |
@@ -0,0 +1,49 @@ |
478 |
+https://sqlite.org/src/info/e8275b415a2f03bee |
479 |
+https://sqlite.org/src/info/7fc2994434c7d9ed |
480 |
+ |
481 |
+--- /src/select.c |
482 |
++++ /src/select.c |
483 |
+@@ -2318,6 +2318,13 @@ |
484 |
+ Expr *pLimit; /* Saved LIMIT and OFFSET */ |
485 |
+ int regLimit, regOffset; /* Registers used by LIMIT and OFFSET */ |
486 |
+ |
487 |
++#ifndef SQLITE_OMIT_WINDOWFUNC |
488 |
++ if( p->pWin ){ |
489 |
++ sqlite3ErrorMsg(pParse, "cannot use window functions in recursive queries"); |
490 |
++ return; |
491 |
++ } |
492 |
++#endif |
493 |
++ |
494 |
+ /* Obtain authorization to do a recursive query */ |
495 |
+ if( sqlite3AuthCheck(pParse, SQLITE_RECURSIVE, 0, 0, 0) ) return; |
496 |
+ |
497 |
+--- /test/with1.test |
498 |
++++ /test/with1.test |
499 |
+@@ -865,6 +865,27 @@ |
500 |
+ SELECT * FROM i; |
501 |
+ } {1 {recursive aggregate queries not supported}} |
502 |
+ |
503 |
++# Or window-function recursive queries. Ticket e8275b41. |
504 |
++# |
505 |
++ifcapable windowfunc { |
506 |
++ do_catchsql_test 16.2 { |
507 |
++ WITH RECURSIVE |
508 |
++ i(x) AS (VALUES(1) UNION SELECT count(*) OVER () FROM i) |
509 |
++ SELECT * FROM i; |
510 |
++ } {1 {cannot use window functions in recursive queries}} |
511 |
++ do_catchsql_test 16.3 { |
512 |
++ WITH RECURSIVE |
513 |
++ t(id, parent) AS (VALUES(1,2)), |
514 |
++ q(id, parent, rn) AS ( |
515 |
++ VALUES(1,2,3) |
516 |
++ UNION ALL |
517 |
++ SELECT t.*, ROW_NUMBER() OVER (ORDER BY t.id) AS rn |
518 |
++ FROM q JOIN t ON t.parent = q.id |
519 |
++ ) |
520 |
++ SELECT * FROM q; |
521 |
++ } {1 {cannot use window functions in recursive queries}} |
522 |
++} |
523 |
++ |
524 |
+ #------------------------------------------------------------------------- |
525 |
+ do_execsql_test 17.1 { |
526 |
+ WITH x(a) AS ( |
527 |
|
528 |
diff --git a/dev-db/sqlite/files/sqlite-3.25.2-full_archive-tests.patch b/dev-db/sqlite/files/sqlite-3.25.2-full_archive-tests.patch |
529 |
new file mode 100644 |
530 |
index 00000000000..2868b3fc123 |
531 |
--- /dev/null |
532 |
+++ b/dev-db/sqlite/files/sqlite-3.25.2-full_archive-tests.patch |
533 |
@@ -0,0 +1,70 @@ |
534 |
+https://sqlite.org/src/info/d04b2013b5436430 |
535 |
+ |
536 |
+--- /test/like3.test |
537 |
++++ /test/like3.test |
538 |
+@@ -130,12 +130,14 @@ |
539 |
+ do_execsql_test like3-5.110 { |
540 |
+ SELECT x FROM t5a WHERE x LIKE '/a%'; |
541 |
+ } {/abc} |
542 |
++ifcapable !icu { |
543 |
+ do_eqp_test like3-5.111 { |
544 |
+ SELECT x FROM t5a WHERE x LIKE '/a%'; |
545 |
+ } { |
546 |
+ QUERY PLAN |
547 |
+ `--SEARCH TABLE t5a USING COVERING INDEX sqlite_autoindex_t5a_1 (x>? AND x<?) |
548 |
+ } |
549 |
++} |
550 |
+ do_execsql_test like3-5.120 { |
551 |
+ SELECT x FROM t5a WHERE x LIKE '^12%' ESCAPE '^'; |
552 |
+ } {123} |
553 |
+--- /test/window6.test |
554 |
++++ /test/window6.test |
555 |
+@@ -147,17 +147,17 @@ |
556 |
+ #------------------------------------------------------------------------- |
557 |
+ # |
558 |
+ |
559 |
+-do_execsql_test 6.0 { |
560 |
+- SELECT LIKE('!', '', '!') x WHERE x; |
561 |
+-} {} |
562 |
+- |
563 |
+-do_execsql_test 6.1 { |
564 |
+- SELECT LIKE("!","","!")""WHeRE""; |
565 |
+-} {} |
566 |
+- |
567 |
+-do_catchsql_test 6.2 { |
568 |
+- SELECT LIKE("!","","!")""window""; |
569 |
+-} {1 {near "window": syntax error}} |
570 |
++ifcapable !icu { |
571 |
++ do_execsql_test 6.0 { |
572 |
++ SELECT LIKE('!', '', '!') x WHERE x; |
573 |
++ } {} |
574 |
++ do_execsql_test 6.1 { |
575 |
++ SELECT LIKE("!","","!")""WHeRE""; |
576 |
++ } {} |
577 |
++ do_catchsql_test 6.2 { |
578 |
++ SELECT LIKE("!","","!")""window""; |
579 |
++ } {1 {near "window": syntax error}} |
580 |
++} |
581 |
+ |
582 |
+ reset_db |
583 |
+ do_execsql_test 7.0 { |
584 |
+@@ -166,9 +166,11 @@ |
585 |
+ INSERT INTO t1 VALUES(''); |
586 |
+ } |
587 |
+ |
588 |
+-do_execsql_test 7.1 { |
589 |
+- SELECT count(*) FROM t1 WHERE x LIKE '!' ESCAPE '!'; |
590 |
+-} {0} |
591 |
++ifcapable !icu { |
592 |
++ do_execsql_test 7.1 { |
593 |
++ SELECT count(*) FROM t1 WHERE x LIKE '!' ESCAPE '!'; |
594 |
++ } {0} |
595 |
++} |
596 |
+ |
597 |
+ #------------------------------------------------------------------------- |
598 |
+ # |
599 |
+@@ -336,4 +338,3 @@ |
600 |
+ } |
601 |
+ |
602 |
+ finish_test |
603 |
+- |
604 |
|
605 |
diff --git a/dev-db/sqlite/files/sqlite-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch b/dev-db/sqlite/files/sqlite-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch |
606 |
new file mode 100644 |
607 |
index 00000000000..4ee3d477cfc |
608 |
--- /dev/null |
609 |
+++ b/dev-db/sqlite/files/sqlite-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch |
610 |
@@ -0,0 +1,19 @@ |
611 |
+https://sqlite.org/src/info/e8275b415a2f03bee |
612 |
+https://sqlite.org/src/info/7fc2994434c7d9ed |
613 |
+ |
614 |
+--- /sqlite3.c |
615 |
++++ /sqlite3.c |
616 |
+@@ -125441,6 +125441,13 @@ |
617 |
+ Expr *pLimit; /* Saved LIMIT and OFFSET */ |
618 |
+ int regLimit, regOffset; /* Registers used by LIMIT and OFFSET */ |
619 |
+ |
620 |
++#ifndef SQLITE_OMIT_WINDOWFUNC |
621 |
++ if( p->pWin ){ |
622 |
++ sqlite3ErrorMsg(pParse, "cannot use window functions in recursive queries"); |
623 |
++ return; |
624 |
++ } |
625 |
++#endif |
626 |
++ |
627 |
+ /* Obtain authorization to do a recursive query */ |
628 |
+ if( sqlite3AuthCheck(pParse, SQLITE_RECURSIVE, 0, 0, 0) ) return; |
629 |
+ |
630 |
|
631 |
diff --git a/dev-db/sqlite/sqlite-3.25.2.ebuild b/dev-db/sqlite/sqlite-3.25.2.ebuild |
632 |
new file mode 100644 |
633 |
index 00000000000..9ca3d39f36c |
634 |
--- /dev/null |
635 |
+++ b/dev-db/sqlite/sqlite-3.25.2.ebuild |
636 |
@@ -0,0 +1,322 @@ |
637 |
+# Copyright 1999-2018 Arfrever Frehtes Taifersar Arahesis and others |
638 |
+# Distributed under the terms of the GNU General Public License v2 |
639 |
+ |
640 |
+EAPI="7" |
641 |
+ |
642 |
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs |
643 |
+ |
644 |
+SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))" |
645 |
+DOC_PV="${SRC_PV}" |
646 |
+# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))" |
647 |
+ |
648 |
+DESCRIPTION="SQL database engine" |
649 |
+HOMEPAGE="https://sqlite.org/" |
650 |
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip ) |
651 |
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip ) |
652 |
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip ) |
653 |
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip ) |
654 |
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )" |
655 |
+ |
656 |
+LICENSE="public-domain" |
657 |
+SLOT="3" |
658 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
659 |
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools" |
660 |
+RESTRICT="!test? ( test )" |
661 |
+ |
662 |
+BDEPEND="doc? ( app-arch/unzip ) |
663 |
+ tcl? ( |
664 |
+ app-arch/unzip |
665 |
+ >=dev-lang/tcl-8.6:0 |
666 |
+ ) |
667 |
+ test? ( |
668 |
+ app-arch/unzip |
669 |
+ >=dev-lang/tcl-8.6:0 |
670 |
+ ) |
671 |
+ tools? ( |
672 |
+ app-arch/unzip |
673 |
+ >=dev-lang/tcl-8.6:0 |
674 |
+ )" |
675 |
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}] |
676 |
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] ) |
677 |
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] ) |
678 |
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] ) |
679 |
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )" |
680 |
+DEPEND="${RDEPEND} |
681 |
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )" |
682 |
+ |
683 |
+full_archive() { |
684 |
+ use tcl || use test || use tools |
685 |
+} |
686 |
+ |
687 |
+pkg_setup() { |
688 |
+ if full_archive; then |
689 |
+ S="${WORKDIR}/${PN}-src-${SRC_PV}" |
690 |
+ else |
691 |
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}" |
692 |
+ fi |
693 |
+} |
694 |
+ |
695 |
+src_prepare() { |
696 |
+ if full_archive; then |
697 |
+ eapply "${FILESDIR}/${PN}-3.25.0-full_archive-build.patch" |
698 |
+ eapply "${FILESDIR}/${PN}-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch" |
699 |
+ eapply "${FILESDIR}/${PN}-3.25.2-full_archive-tests.patch" |
700 |
+ |
701 |
+ eapply_user |
702 |
+ |
703 |
+ # Fix AC_CHECK_FUNCS. |
704 |
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html |
705 |
+ sed -e "s/AC_CHECK_FUNCS(.*)/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" -i configure.ac || die "sed failed" |
706 |
+ else |
707 |
+ eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch" |
708 |
+ eapply "${FILESDIR}/${PN}-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch" |
709 |
+ |
710 |
+ eapply_user |
711 |
+ |
712 |
+ # Fix AC_CHECK_FUNCS. |
713 |
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html |
714 |
+ sed \ |
715 |
+ -e "s/AC_CHECK_FUNCS(\[fdatasync.*/AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])/" \ |
716 |
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \ |
717 |
+ -i configure.ac || die "sed failed" |
718 |
+ fi |
719 |
+ |
720 |
+ eautoreconf |
721 |
+ |
722 |
+ multilib_copy_sources |
723 |
+} |
724 |
+ |
725 |
+multilib_src_configure() { |
726 |
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=() |
727 |
+ |
728 |
+ options+=( |
729 |
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions) |
730 |
+ --enable-threadsafe |
731 |
+ ) |
732 |
+ if ! full_archive; then |
733 |
+ options+=(--disable-static-shell) |
734 |
+ fi |
735 |
+ |
736 |
+ # Support detection of misuse of SQLite API. |
737 |
+ # https://sqlite.org/compile.html#enable_api_armor |
738 |
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR |
739 |
+ |
740 |
+ # Support column metadata functions. |
741 |
+ # https://sqlite.org/c3ref/column_database_name.html |
742 |
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA |
743 |
+ |
744 |
+ # Support sqlite_dbpage virtual table. |
745 |
+ # https://sqlite.org/compile.html#enable_dbpage_vtab |
746 |
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB |
747 |
+ |
748 |
+ # Support dbstat virtual table. |
749 |
+ # https://sqlite.org/dbstat.html |
750 |
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB |
751 |
+ |
752 |
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions. |
753 |
+ # https://sqlite.org/compile.html#enable_deserialize |
754 |
+ # https://sqlite.org/c3ref/serialize.html |
755 |
+ # https://sqlite.org/c3ref/deserialize.html |
756 |
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE |
757 |
+ |
758 |
+ # Support comments in output of EXPLAIN. |
759 |
+ # https://sqlite.org/compile.html#enable_explain_comments |
760 |
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
761 |
+ |
762 |
+ # Support Full-Text Search versions 3, 4 and 5. |
763 |
+ # https://sqlite.org/fts3.html |
764 |
+ # https://sqlite.org/fts5.html |
765 |
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 |
766 |
+ options+=(--enable-fts5) |
767 |
+ |
768 |
+ # Support hidden columns. |
769 |
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS |
770 |
+ |
771 |
+ # Support JSON1 extension. |
772 |
+ # https://sqlite.org/json1.html |
773 |
+ append-cppflags -DSQLITE_ENABLE_JSON1 |
774 |
+ |
775 |
+ # Support memsys5 memory allocator. |
776 |
+ # https://sqlite.org/malloc.html#memsys5 |
777 |
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5 |
778 |
+ |
779 |
+ # Support sqlite_offset() function. |
780 |
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset |
781 |
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC |
782 |
+ |
783 |
+ # Support pre-update hook functions. |
784 |
+ # https://sqlite.org/c3ref/preupdate_count.html |
785 |
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK |
786 |
+ |
787 |
+ # Support Resumable Bulk Update extension. |
788 |
+ # https://sqlite.org/rbu.html |
789 |
+ append-cppflags -DSQLITE_ENABLE_RBU |
790 |
+ |
791 |
+ # Support R*Trees. |
792 |
+ # https://sqlite.org/rtree.html |
793 |
+ # https://sqlite.org/geopoly.html |
794 |
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY |
795 |
+ |
796 |
+ # Support scan status functions. |
797 |
+ # https://sqlite.org/c3ref/stmt_scanstatus.html |
798 |
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html |
799 |
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS |
800 |
+ |
801 |
+ # Support sqlite_stmt virtual table. |
802 |
+ # https://sqlite.org/stmt.html |
803 |
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB |
804 |
+ |
805 |
+ # Support Session extension. |
806 |
+ # https://sqlite.org/sessionintro.html |
807 |
+ options+=(--enable-session) |
808 |
+ |
809 |
+ # Support unknown() function. |
810 |
+ # https://sqlite.org/compile.html#enable_unknown_sql_function |
811 |
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION |
812 |
+ |
813 |
+ # Support unlock notification. |
814 |
+ # https://sqlite.org/unlock_notify.html |
815 |
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY |
816 |
+ |
817 |
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements. |
818 |
+ # https://sqlite.org/compile.html#enable_update_delete_limit |
819 |
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT |
820 |
+ |
821 |
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements. |
822 |
+ # https://sqlite.org/pragma.html#pragma_function_list |
823 |
+ # https://sqlite.org/pragma.html#pragma_module_list |
824 |
+ # https://sqlite.org/pragma.html#pragma_pragma_list |
825 |
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS |
826 |
+ |
827 |
+ # Support soundex() function. |
828 |
+ # https://sqlite.org/lang_corefunc.html#soundex |
829 |
+ append-cppflags -DSQLITE_SOUNDEX |
830 |
+ |
831 |
+ # Support URI filenames. |
832 |
+ # https://sqlite.org/uri.html |
833 |
+ append-cppflags -DSQLITE_USE_URI |
834 |
+ |
835 |
+ # debug USE flag. |
836 |
+ if full_archive; then |
837 |
+ options+=($(use_enable debug)) |
838 |
+ else |
839 |
+ if use debug; then |
840 |
+ append-cppflags -DSQLITE_DEBUG |
841 |
+ else |
842 |
+ append-cppflags -DNDEBUG |
843 |
+ fi |
844 |
+ fi |
845 |
+ |
846 |
+ # icu USE flag. |
847 |
+ if use icu; then |
848 |
+ # Support ICU extension. |
849 |
+ # https://sqlite.org/compile.html#enable_icu |
850 |
+ append-cppflags -DSQLITE_ENABLE_ICU |
851 |
+ if full_archive; then |
852 |
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" |
853 |
+ else |
854 |
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" |
855 |
+ fi |
856 |
+ fi |
857 |
+ |
858 |
+ # readline USE flag. |
859 |
+ options+=( |
860 |
+ --disable-editline |
861 |
+ $(use_enable readline) |
862 |
+ ) |
863 |
+ if full_archive && use readline; then |
864 |
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline") |
865 |
+ fi |
866 |
+ |
867 |
+ # secure-delete USE flag. |
868 |
+ if use secure-delete; then |
869 |
+ # Enable secure_delete pragma by default. |
870 |
+ # https://sqlite.org/pragma.html#pragma_secure_delete |
871 |
+ append-cppflags -DSQLITE_SECURE_DELETE |
872 |
+ fi |
873 |
+ |
874 |
+ # static-libs USE flag. |
875 |
+ options+=($(use_enable static-libs static)) |
876 |
+ |
877 |
+ # tcl, test, tools USE flags. |
878 |
+ if full_archive; then |
879 |
+ options+=(--enable-tcl) |
880 |
+ fi |
881 |
+ |
882 |
+ if [[ "${CHOST}" == *-mint* ]]; then |
883 |
+ append-cppflags -DSQLITE_OMIT_WAL |
884 |
+ fi |
885 |
+ |
886 |
+ if [[ "${ABI}" == "x86" ]]; then |
887 |
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then |
888 |
+ append-cflags -mfpmath=sse |
889 |
+ else |
890 |
+ append-cflags -ffloat-store |
891 |
+ fi |
892 |
+ fi |
893 |
+ |
894 |
+ econf "${options[@]}" |
895 |
+} |
896 |
+ |
897 |
+multilib_src_compile() { |
898 |
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" |
899 |
+ |
900 |
+ if use tools && multilib_is_native_abi; then |
901 |
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh |
902 |
+ fi |
903 |
+} |
904 |
+ |
905 |
+multilib_src_test() { |
906 |
+ if [[ "${EUID}" -eq 0 ]]; then |
907 |
+ ewarn "Skipping tests due to root permissions" |
908 |
+ return |
909 |
+ fi |
910 |
+ |
911 |
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test) |
912 |
+} |
913 |
+ |
914 |
+multilib_src_install() { |
915 |
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install |
916 |
+ |
917 |
+ if use tools && multilib_is_native_abi; then |
918 |
+ install_tool() { |
919 |
+ if [[ -f ".libs/${1}" ]]; then |
920 |
+ newbin ".libs/${1}" "${2}" |
921 |
+ else |
922 |
+ newbin "${1}" "${2}" |
923 |
+ fi |
924 |
+ } |
925 |
+ |
926 |
+ install_tool changeset sqlite3-changeset |
927 |
+ install_tool dbdump sqlite3-db-dump |
928 |
+ install_tool dbhash sqlite3-db-hash |
929 |
+ install_tool rbu sqlite3-rbu |
930 |
+ install_tool scrub sqlite3-scrub |
931 |
+ install_tool showdb sqlite3-show-db |
932 |
+ install_tool showjournal sqlite3-show-journal |
933 |
+ install_tool showshm sqlite3-show-shm |
934 |
+ install_tool showstat4 sqlite3-show-stat4 |
935 |
+ install_tool showwal sqlite3-show-wal |
936 |
+ install_tool sqldiff sqlite3-diff |
937 |
+ install_tool sqlite3_analyzer sqlite3-analyzer |
938 |
+ install_tool sqlite3_checker sqlite3-checker |
939 |
+ install_tool sqlite3_expert sqlite3-expert |
940 |
+ install_tool sqltclsh sqlite3-tclsh |
941 |
+ |
942 |
+ unset -f install_tool |
943 |
+ fi |
944 |
+} |
945 |
+ |
946 |
+multilib_src_install_all() { |
947 |
+ find "${D}" -name "*.la" -delete || die |
948 |
+ |
949 |
+ doman sqlite3.1 |
950 |
+ |
951 |
+ if use doc; then |
952 |
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} |
953 |
+ ( |
954 |
+ docinto html |
955 |
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"* |
956 |
+ ) |
957 |
+ fi |
958 |
+} |