* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2016-02-20 17:23 Pacho Ramos
0 siblings, 0 replies; 35+ messages in thread
From: Pacho Ramos @ 2016-02-20 17:23 UTC (permalink / raw
To: gentoo-commits
commit: 3de4f1ab68f29c0aba5e0b264efd89f5ea7a952b
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 20 17:23:32 2016 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Feb 20 17:23:32 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3de4f1ab
dev-db/sqlite: Drop masked for removal version (#249418)
Package-Manager: portage-2.2.27
dev-db/sqlite/Manifest | 1 -
.../files/sqlite-2.8.15-alignement-fix.patch | 12 --
dev-db/sqlite/files/sqlite-2.8.16-exit.patch | 12 --
dev-db/sqlite/files/sqlite-2.8.16-multilib.patch | 108 ------------------
dev-db/sqlite/sqlite-2.8.16-r5.ebuild | 127 ---------------------
5 files changed, 260 deletions(-)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 8d3eb63..c1e7536 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,4 +1,3 @@
-DIST sqlite-2.8.16.tar.gz 981834 SHA256 d26e8a6fac1ad497a3ade719da4f1d6d60f586fd10f66253f1c3d3db7168984e SHA512 262cacbb9a6e615cd6ce7c2992c4dd5b0cd59de096daa74925e81baef4c0e4b3d9a7e4ebf8f4ba949afac4fe2fbf2c627ead29fa72ff38dffe6446ae46c40d4a WHIRLPOOL 78c4dc05f94d97483c03b1f1eee67f86fd5d9499e82b082ba3951878867d10d18ecbb5cac9086ce509c0cb1cb47b57661709a28d2ee7e61038512d1c11c77bff
DIST sqlite-autoconf-3081001.tar.gz 2049377 SHA256 5f8f2ae6461e637ff63e50fef10b6962764dfc3b81a8c0f80a19794b9d59f7ca SHA512 8e206952b351ef8a9cf523558574cba9630c8c07ef7ae90fb0712d2b99fea91742a26d0af1b01816593ea769fad343101fdbbab9c1626a4d712bb1a18b2b6b30 WHIRLPOOL 83fd822bd9eb6fedea29d968381726be24153375c06ad8c39d4ef34fd3d2e1001c8d5440880d6a880ba24242cd87782afa445ce145cdf7e75843419275136da5
DIST sqlite-autoconf-3081002.tar.gz 2049387 SHA256 8382e55a4e7d853c93038562ca3dd00307937fccf1c6b65ddd813e503a56d626 SHA512 afdf11d5482a645c37cc0c4c5c2b3f8c56f26c95ee94658c92bfa0ffeb68981f67834215a45a658f733333c68f28231448e87995f9614a56f9f1672cedd13a65 WHIRLPOOL f3c7b1a11d63213a29f9dc6c04c02db9900b25dd0a8c0551bbf6d220493e7cc420d5775d99147d92c781b7f0068889e6dbeb32a10f447009341827908eee4ad8
DIST sqlite-autoconf-3081101.tar.gz 2101885 SHA256 fb99b0ac038c4a7e48b44b61836cb41d4eeba36b4d0ee757beeab59031a1d3b6 SHA512 b87e3a94462c26e875833c7f83dcc453146377a403d173169e2db7198bede2467f8c480645141da678e0fd3071764558f2dd2630086964431ead25ac43212ee6 WHIRLPOOL 2045496055b02151211080110dc8fc2c474337788704a0e4db8841a1928b82d6490afa682c8d8b1bb6b9e98808d7eabf0f763a41e4768b1c21629107895bb66b
diff --git a/dev-db/sqlite/files/sqlite-2.8.15-alignement-fix.patch b/dev-db/sqlite/files/sqlite-2.8.15-alignement-fix.patch
deleted file mode 100644
index 7081ffd..0000000
--- a/dev-db/sqlite/files/sqlite-2.8.15-alignement-fix.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -uNr sqlite.orig/src/vdbeInt.h sqlite/src/vdbeInt.h
---- sqlite.orig/src/vdbeInt.h 2004-10-16 01:33:02.779442000 +0200
-+++ sqlite/src/vdbeInt.h 2004-10-16 01:35:01.139442000 +0200
-@@ -115,7 +115,7 @@
- int flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
- double r; /* Real value */
- char *z; /* String value */
-- char zShort[NBFS]; /* Space for short strings */
-+ char zShort[NBFS] __attribute__ ((__aligned__(16))); /* Space for short strings */
- };
- typedef struct Mem Mem;
-
diff --git a/dev-db/sqlite/files/sqlite-2.8.16-exit.patch b/dev-db/sqlite/files/sqlite-2.8.16-exit.patch
deleted file mode 100644
index aaccb57..0000000
--- a/dev-db/sqlite/files/sqlite-2.8.16-exit.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-temp.c:4:1: warning: incompatible implicit declaration of built-in function ‘exit’
-
---- Makefile.in
-+++ Makefile.in
-@@ -269,6 +269,7 @@
- #
- config.h:
- echo '#include <stdio.h>' >temp.c
-+ echo '#include <stdlib.h>' >>temp.c
- echo 'int main(){printf(' >>temp.c
- echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
- echo 'exit(0);}' >>temp.c
diff --git a/dev-db/sqlite/files/sqlite-2.8.16-multilib.patch b/dev-db/sqlite/files/sqlite-2.8.16-multilib.patch
deleted file mode 100644
index 3211187..0000000
--- a/dev-db/sqlite/files/sqlite-2.8.16-multilib.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-diff -Naurp sqlite-2.8.16.orig/Makefile.in sqlite-2.8.16/Makefile.in
---- sqlite-2.8.16.orig/Makefile.in 2005-02-14 00:22:04.000000000 +0000
-+++ sqlite-2.8.16/Makefile.in 2005-02-17 18:22:50.174537727 +0000
-@@ -187,12 +187,12 @@ last_change: $(SRC)
- | awk '{print $$5,$$6}' >last_change
-
- libsqlite.la: $(LIBOBJ)
-- $(LTLINK) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath @exec_prefix@/lib \
-+ $(LTLINK) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath @libdir@ \
- -version-info "8:6:8"
-
- libtclsqlite.la: tclsqlite.lo libsqlite.la
- $(LTLINK) -o libtclsqlite.la tclsqlite.lo \
-- libsqlite.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite \
-+ libsqlite.la $(LIBTCL) -rpath @libdir@/sqlite \
- -version-info "8:6:8"
-
- sqlite@TARGET_EXEEXT@: $(TOP)/src/shell.c libsqlite.la sqlite.h
-@@ -465,14 +465,14 @@ doc: $(DOC)
- mv $(DOC) doc
-
- install: sqlite libsqlite.la sqlite.h
-- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib
-- $(LTINSTALL) libsqlite.la $(DESTDIR)$(exec_prefix)/lib
-+ $(INSTALL) -d $(DESTDIR)@libdir@
-+ $(LTINSTALL) libsqlite.la $(DESTDIR)@libdir@
- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin
- $(LTINSTALL) sqlite $(DESTDIR)$(exec_prefix)/bin
- $(INSTALL) -d $(DESTDIR)$(prefix)/include
- $(INSTALL) -m 0644 sqlite.h $(DESTDIR)$(prefix)/include
-- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
-- $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig;
-+ $(INSTALL) -d $(DESTDIR)@libdir@/pkgconfig;
-+ $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)@libdir@/pkgconfig;
-
- clean:
- rm -f *.lo *.la *.o sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.*
-diff -Naurp sqlite-2.8.16.orig/Makefile.linux-gcc sqlite-2.8.16/Makefile.linux-gcc
---- sqlite-2.8.16.orig/Makefile.linux-gcc 2005-02-14 00:22:04.000000000 +0000
-+++ sqlite-2.8.16/Makefile.linux-gcc 2005-02-17 18:21:47.654969648 +0000
-@@ -14,7 +14,7 @@
- #### The toplevel directory of the source tree. This is the directory
- # that contains this "Makefile.in" and the "configure.in" script.
- #
--TOP = ../sqlite
-+TOP = @@S@@
-
- #### C Compiler and options for use in building executables that
- # will run on the platform that is doing the build.
-@@ -38,8 +38,8 @@ THREADSAFE = -DTHREADSAFE=0
- #### Specify any extra linker options needed to make the library
- # thread safe
- #
--#THREADLIB = -lpthread
--THREADLIB =
-+THREADLIB = -lpthread
-+#THREADLIB =
-
- #### Leave MEMORY_DEBUG undefined for maximum speed. Use MEMORY_DEBUG=1
- # to check for memory leaks. Use MEMORY_DEBUG=2 to print a log of all
-@@ -64,7 +64,7 @@ EXE =
- # will run on the target platform. This is usually the same
- # as BCC, unless you are cross-compiling.
- #
--TCC = gcc -O6
-+TCC = @@CC@@ @@CFLAGS@@
- #TCC = gcc -g -O0 -Wall
- #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
- #TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
-@@ -72,23 +72,23 @@ TCC = gcc -O6
-
- #### Tools used to build a static library.
- #
--AR = ar cr
-+AR = @@AR@@ cr
- #AR = /opt/mingw/bin/i386-mingw32-ar cr
--RANLIB = ranlib
-+RANLIB = @@RANLIB@@
- #RANLIB = /opt/mingw/bin/i386-mingw32-ranlib
-
- #### Extra compiler options needed for programs that use the TCL library.
- #
--#TCL_FLAGS =
-+#TCL_FLAGS = @@TCL_FLAGS@@
- #TCL_FLAGS = -DSTATIC_BUILD=1
--TCL_FLAGS = -I/home/drh/tcltk/8.4linux
-+#TCL_FLAGS = -I/home/drh/tcltk/8.4linux
- #TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1
- #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
-
- #### Linker options needed to link against the TCL library.
- #
--#LIBTCL = -ltcl -lm -ldl
--LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl
-+LIBTCL = -ltcl -lm -ldl
-+#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl
- #LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt
- #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
-
-@@ -100,7 +100,7 @@ READLINE_FLAGS = -DHAVE_READLINE=1 -I/us
- #### Linker options needed by programs using readline() must link against.
- #
- #LIBREADLINE =
--LIBREADLINE = -static -lreadline -ltermcap
-+LIBREADLINE = -static -lreadline -lncurses
-
- #### Should the database engine assume text is coded as UTF-8 or iso8859?
- #
diff --git a/dev-db/sqlite/sqlite-2.8.16-r5.ebuild b/dev-db/sqlite/sqlite-2.8.16-r5.ebuild
deleted file mode 100644
index 2cb8a32..0000000
--- a/dev-db/sqlite/sqlite-2.8.16-r5.ebuild
+++ /dev/null
@@ -1,127 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils alternatives multilib toolchain-funcs
-
-KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-
-DESCRIPTION="SQLite: an SQL Database Engine in a C Library"
-HOMEPAGE="http://www.sqlite.org/"
-SRC_URI="http://www.sqlite.org/${P}.tar.gz"
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="doc nls tcl"
-
-DEPEND="doc? ( dev-lang/tcl )
- tcl? ( dev-lang/tcl )"
-
-RDEPEND="tcl? ( dev-lang/tcl )"
-
-SOURCE="/usr/bin/lemon"
-ALTERNATIVES="${SOURCE}-3 ${SOURCE}-0"
-
-RESTRICT="!tcl? ( test )"
-
-src_unpack() {
- # test
- if has test ${FEATURES}; then
- if ! has userpriv ${FEATURES}; then
- ewarn "The userpriv feature must be enabled to run tests."
- eerror "Testsuite will not be run."
- fi
- if ! use tcl; then
- ewarn "You must enable the tcl use flag if you want to run the test"
- ewarn "suite."
- eerror "Testsuite will not be run."
- fi
- fi
-
- unpack ${A}
- cd "${S}"
-
- use hppa && epatch "${FILESDIR}"/${PN}-2.8.15-alignement-fix.patch
-
- epatch \
- "${FILESDIR}"/${P}-multilib.patch \
- "${FILESDIR}"/${P}-exit.patch
-
- epunt_cxx
-
- if use nls ; then
- ENCODING=${ENCODING-"UTF8"}
- else
- ENCODING="ISO8859"
- fi
-
- sed -i -e "s:@@S@@:${S}:g" \
- -e "s:@@CC@@:$(tc-getCC):g" \
- -e "s:@@CFLAGS@@:${CFLAGS}:g" \
- -e "s:@@AR@@:$(tc-getAR):g" \
- -e "s:@@RANLIB@@:$(tc-getRANLIB):g" \
- -e "s:@@ENCODING@@:${ENCODING}:g" \
- "${S}"/Makefile.linux-gcc
-
- sed -i \
- -e '/^LTLINK/s:$(TCC):& $(LDFLAGS):' \
- -e '/lemon/s:-o:$(LDFLAGS) &:' \
- "${S}"/{main.mk,Makefile.in}
-}
-
-src_compile() {
- local myconf="--enable-incore-db --enable-tempdb-in-ram"
-
- if ! use tcl ; then
- myconf="${myconf} --without-tcl"
- fi
-
- econf ${myconf} \
- --disable-static \
- $(use_enable nls utf8)
-
- emake all || die "emake all failed"
-
- if use doc ; then
- emake doc || die "emake doc failed"
- fi
-
- if use tcl ; then
- cp -P "${FILESDIR}"/maketcllib.sh "${S}"
- chmod +x ./maketcllib.sh
- ./maketcllib.sh
- fi
-}
-
-src_test() {
- if use tcl ; then
- if has userpriv ${FEATURES} ; then
- elog "SQLite 2.x is known to have problems on 64 bit architectures."
- elog "If you observe segmentation faults please use 3.x instead!"
-
- cd "${S}"
- emake test || die "some test failed"
- fi
- fi
-}
-
-src_install () {
- dodir /usr/{bin,include,$(get_libdir)}
-
- make DESTDIR="${D}" install || die "make install failed"
-
- find "${D}" -name '*.la' -exec rm -f {} +
-
- newbin lemon lemon-${SLOT}
-
- dodoc README VERSION
- doman sqlite.1
-
- use doc && dohtml doc/*.html doc/*.txt doc/*.png
-
- if use tcl ; then
- mkdir "${D}"/usr/$(get_libdir)/tclsqlite${PV}
- cp "${S}"/tclsqlite.so "${D}"/usr/$(get_libdir)/tclsqlite${PV}/
- cp "${S}"/pkgIndex.tcl "${D}"/usr/$(get_libdir)/tclsqlite${PV}/
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2016-03-03 1:54 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2016-03-03 1:54 UTC (permalink / raw
To: gentoo-commits
commit: 259d8bab051acba85157426d1df7c03d0c9d97bf
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Mar 2 03:34:16 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Mar 3 01:50:01 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=259d8bab
dev-db/sqlite: Version bump (3.11.0).
Link executables against libsqlite3.so instead of statically including code from sqlite3.c.
Backport SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER from 3.12.0.
dev-db/sqlite/Manifest | 3 +
...all-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch | 443 +++++++++++++++++++++
.../files/sqlite-3.11.0-full_tarball-build.patch | 132 ++++++
...all-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch | 232 +++++++++++
.../sqlite-3.11.0-nonfull_tarball-build.patch | 38 ++
dev-db/sqlite/sqlite-3.11.0.ebuild | 243 +++++++++++
6 files changed, 1091 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index c1e7536..3940f57 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -5,6 +5,7 @@ DIST sqlite-autoconf-3090100.tar.gz 2284128 SHA256 d89d0e1d93deafebd0aa067d20d90
DIST sqlite-autoconf-3090200.tar.gz 2284431 SHA256 064c0abe9c9177534d4c770bca7a5902f9924b629ac886b4c08956be6dfbc36b SHA512 c4fdd7dee58e2e4c83091f2a98d8099c6403a66f566be46b54d465c5a58404555fdc1d08050ca60edb6366d220407cfc7409921c123915f78a04cd9930217fa7 WHIRLPOOL c57c3a3f9a7186606a8de0f562490d6c1db27204e9799f39313ea139fabb64bfc918243a20173119bc73776dbd42fc4c316590eb3a4c4334ef669a93be819adf
DIST sqlite-autoconf-3100000.tar.gz 2331542 SHA256 43cc292d70711fa7580250c8a1cd7c64813a4a0a479dbd502cce5f10b5d91042 SHA512 0d34f511f386e841b60ca6354715e7196c2c3d47e0ae13f09b9ae8d0f95118104b2bd8e13697c4c97b994269c2b2e112841ab74e82a2a64c50243d8ec8d8f46e WHIRLPOOL 090ee131929573a71f3049ee9accf3e8df21dd9d6834e499baf0988cad6bd64f433ef5f05cdb0ba0a15254ced47d94591c913be5e15d0de76e4a41f391393d94
DIST sqlite-autoconf-3100200.tar.gz 2332013 SHA256 a2b3b4bd1291ea7d6c8252f7edff36a4362f2f0e5d5370444ba6cbe313ae2971 SHA512 fa4e3757d76c9f0cf167481346c0844f41a3a7ea0e8fde186be7ebcc14f9b45b770386110e23860c6dcaaf1819aa12725fde7507271a0a8b59610dcc458c552f WHIRLPOOL 5bc1f324bb9fb7baa70a12e6e1519ccae7f2beef51ec48312df4a1a8890406bfbd4a9c0ee0b5a186619624763c65238fa34b88bb478c76e7a39b23c4a96eb66a
+DIST sqlite-autoconf-3110000.tar.gz 2359347 SHA256 508d4dcbcf7a7181e95c717a1dc4ae3c0880b3d593be0c4b40abb6c3a0e201fb SHA512 208bb41e9b2a67ba5efdefe5393161996b7741a153647bd28b680a41a7d3c23f6c916bf6eede5325f507697fa92571c4982522ba9396a58e7a675564dec73865 WHIRLPOOL 9096de033729f27ccbdea0753b27a5170b1c1d7c6b016d00ad27c1a4b29dc8eabf15a1b8afcf97682f33b064552db3ceac5eb9d9612c8fd17d3602d3a592eb3d
DIST sqlite-doc-3081001.zip 5060040 SHA256 0b6c186a2da8b7d7397eb3942e97fd85b88734beb300702ace0dca4a3db729a6 SHA512 76caf476c98d8a0f5da55c4608bfc31235289e3ab2286089195fab86da6b5d98b2d5eb0fe7b81e3aff8f04939c9bcbfded6be22f0eeb21103478bf519e9ff78b WHIRLPOOL 5edd1d06babf19d54e326f6262d45851d43a0907adad66b130c93cf63efbfadcad6dbc98330bd4d2f80d1d528cd9088ada0727475b42005de6bcdbc4914e5d7c
DIST sqlite-doc-3081002.zip 5068441 SHA256 e355ec10989829d485d2df08f076f6c3f598f7fc1d45d307b4fd70d5e609e6c4 SHA512 c222b250de6c8e182da1b534f459600a81b300c87578f9484b7d6f1fbbfaad9e8be70c306d0200b163850f48c974c55ce25782fefd55672ef72f03dc0b5f8d19 WHIRLPOOL 148bbce9bc3ffb1f9101e45936ce060aa49dbc88647effabf5418fa95ccdb91a4971d171d940de3307a2d59144e73250c43f8d8d79927ac36a1e02784f143061
DIST sqlite-doc-3081101.zip 5108061 SHA256 89e3fc4bce7463885da3b03602b4260fe07240f9ea674ba4ac7ce2ee4987357f SHA512 8a39e05b1647f4769126234b9759552138f3e3874bc008686ef2f9136833ddc30b3b0696222a736d604e8910a436acedc4954e46894f4adc085eb5f2b6ab9280 WHIRLPOOL f47308753f8df2c497e1bf3cd941b862d69d4f6bbabb2f0606d144966cbb186c5e1513022a5adc122939180fc6cfaa7c83a9537481cce455a83b7bf68deec9cd
@@ -12,6 +13,7 @@ DIST sqlite-doc-3090100.zip 5289099 SHA256 c8549a4261f74395496d1ebc4b7d36a51b2b3
DIST sqlite-doc-3090200.zip 5295693 SHA256 4b9ecb9d2b0424ca2a288184ee36fa16a11033400638117dd7c669ad2d39177c SHA512 aef3b340613eed376dca491fd25b98ced30b69454b24412cb094854c53496bddfb479293634b46f1c793377981d4094c38a6b9c3e67775b471407c4d8cc21435 WHIRLPOOL bf0a660a5fb88c50d71beb12b07cb1eb269d564817d9aaef0a5903d114af8d9d74c803346ca00dea9ac6c76a722a3d305c6303c1220cd712162325c916174cfe
DIST sqlite-doc-3100000.zip 5350213 SHA256 40af646d8c2109e5a15b1787e53524ed16c8e0d1705dda5f005b6186f18c2f2a SHA512 b04846e180d71c0bd3f76399f68df352ba663939a141fb1368f0099cfefb22e290ce1f5cf69eeb63a9136097c463ff9446670629f5b0662e5a230691c36e20c8 WHIRLPOOL 36802a6cb26b4f53945fcd79e5f665c0b9607ce8207fd647ac2735fb30fdba0419c0ecdfc946f74bd237fe646857bbb01a93c1e5135bd6aa13827c691d69c888
DIST sqlite-doc-3100200.zip 5374707 SHA256 21637344807efb9b6c6f615fd98b72620d074c720660940182888a4dbc2af982 SHA512 188f7b982066ba6680b13966b2d6f2c466fb99bef0c5c8ee0ca1a18a6760e5a26eef43ef985f2c9031e4299c27dc91a444f113549353c3209c5b50b97015aabb WHIRLPOOL f614a00fe9cc12e97f5c1bff6af008c3eeca5aa761656b0af3a1b790bee697f8316da2b57c457eb4c252463834b51a89911b9117c7d4508d4eba85eb73780a6b
+DIST sqlite-doc-3110000.zip 5382519 SHA256 4a942d89d5bf0aa70c0a01267a52961632b27512c293eb6452f6efe909dcec50 SHA512 1c9a17c1461bae78d34a89a7c2bc7e7108d95ece40c909835fc08a7f332823a152a7a357f83755d66307336ce116d9539ef67be44c5e11ec742721ac819fd708 WHIRLPOOL 742df247b6930062cf0904d03a9e543c1affc8f592f8675a99a95acf34501cc14b47ca9eb7ee8062f83960cfdb62b2a05656989e2438d45fe70c90c2c5ce518a
DIST sqlite-src-3081001.zip 7648823 SHA256 def6e2401c8da91b489de19d1a1734f722b4e629148ab804776d27b49ba49e7b SHA512 7604ac35eddd4aca53c02b0ab7ae7682856aec2eb4e6a9627da041ea19d464bb6080a70d84070a94abf77eb14ae616a0a8c5fe2f2a6c19fc899d1b21535d3e1a WHIRLPOOL c44e4f446d12af1f4df49e171276d853381784e979d3521cafbfdd5b5359c792586d298f3573bbda8a260b9008a4b7fcdc4ce0382fdda18574287018a2cb4f4c
DIST sqlite-src-3081002.zip 7648737 SHA256 fda379bc4590761838d02ac8008433b7c3eae6e120e45d639d24b09d0004b42d SHA512 99661c709ffe8d5776c3ed2c1a64c70f541b68f0c7745e3e769528273966f71eeb29e8911d42ede9420f179b7fcbda63c4d0980a9d7bc05e937d0a6deb7b814f WHIRLPOOL 4e13138a5f92f5c5fe65c8b670097b57ea778244a37a5bcabf75f86f4ac3f0bc17860f3e55833adc9adcc335b6aece396c685421b58ccb0ddca66f37edfda7fc
DIST sqlite-src-3081101.zip 9057103 SHA256 261ad454663f66fda6101b278bb7b3931cf01884deefbf4ea6b152f83a624662 SHA512 e84048a4a7f9c51219698b59d45c0c533ffe46ba6a20b96ca40f8066fd3825f80f963283d61dc22b2eb5bbca35db3ed4a6e13b1ab3c8b70b0af83469d2760f16 WHIRLPOOL c1add1e5a269546883e58c1666b8acdc58b16b6ad37ea546c99c8ece3348196d5ba33effb17fc773f4d49b1ee45583de7fec3fbe2f6d48e95fdfe4a802c6a824
@@ -19,3 +21,4 @@ DIST sqlite-src-3090100.zip 9283333 SHA256 9a572415375d709d347c316b36c59a9181831
DIST sqlite-src-3090200.zip 9284007 SHA256 d0899e14797ded1e3cfdd7280c8fb485a07c64f44559df1d0290937997c4451d SHA512 59dad1a6e6ac68b93a158b66758a529cbc1d3c0225746f5dd9acb79274e55c440be483b7796ba6da8686f448594dc13238f5e4f1a8fbedb9baf12ad9169d79f8 WHIRLPOOL cbde5d16b7540e1b1fb4c78d8c8fb978f65d022bab5e5c2448f5d81c003be19cd1905fa3108b7a8a50531755d3825e75405d42245381e6b1d61cc85b9c8b7434
DIST sqlite-src-3100000.zip 9222423 SHA256 7dd893f5569f0aa2fdd4f463f1f4ee670cff3f493d880d5e365c72fcdd777566 SHA512 70f09a41e516a8152e5e3b08e4e2e2e54dbe2976c89c4dfca08efbf2124dd3f73ef1d3b49742e03ea92fb99061c1ac67e0d7ad6d327c194faec0f48a1550264e WHIRLPOOL 7ffa03e617c7d53eeccacb178f4fece689e4bf7bbdee07ab532e93fa018a977a9604ae967ca6aa325606ee69ed77a4c2e7fbb24fe1800dc94b91f84f18f6a446
DIST sqlite-src-3100200.zip 9223036 SHA256 a45e1574e77951116cef6ad7eb79a683385a3a33fc78037e3cfcfd9243c4fb86 SHA512 08bd94f6fc282ab9e30e602c5eb27e0611bd7d9841f1135b037b9a3b09055f88a0351ce4973753fbd186ac912cdb2cf2e62835c67c35f9146697147bd7b7713d WHIRLPOOL 2a3de53f7eb944edb31602c121c2be518d1ce28d8b21933ac262fac7f48e803b9267ea0abbc7b578b44bc1104d65c4610a862c821f9797806fb674a7ab32729c
+DIST sqlite-src-3110000.zip 9293025 SHA256 ac670e151222f5deee88d7883d8d509a874fe0e5df288659ada011ca8b435db0 SHA512 c83c1449e4f39f3aa22522a0ae8afa875259a7e1db7af129a7d185246567337435093d1f3a21a5038bbc97e35bb582b240ecffbe24d9fd6b60012016b9ebeecc WHIRLPOOL bcee84e44827a2a051b7d7b99e6e636373d656cf682eb12dae33bb884f4596f5223007a0e4f13993edb8da13551acb2d0957e6c53260d1ff056ac44c3fecb7d8
diff --git a/dev-db/sqlite/files/sqlite-3.11.0-full_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch b/dev-db/sqlite/files/sqlite-3.11.0-full_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch
new file mode 100644
index 0000000..9aaf244
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.11.0-full_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch
@@ -0,0 +1,443 @@
+https://www.sqlite.org/cgi/src/info/374b5108087a2eae
+
+--- ext/fts3/fts3_tokenizer.c
++++ ext/fts3/fts3_tokenizer.c
+@@ -30,6 +30,18 @@
+ #include <string.h>
+
+ /*
++** Return true if the two-argument version of fts3_tokenizer()
++** has been activated via a prior call to sqlite3_db_config(db,
++** SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
++*/
++static int fts3TokenizerEnabled(sqlite3_context *context){
++ sqlite3 *db = sqlite3_context_db_handle(context);
++ int isEnabled = 0;
++ sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER,-1,&isEnabled);
++ return isEnabled;
++}
++
++/*
+ ** Implementation of the SQL scalar function for accessing the underlying
+ ** hash table. This function may be called as follows:
+ **
+@@ -49,7 +61,7 @@
+ ** is a blob containing the pointer stored as the hash data corresponding
+ ** to string <key-name> (after the hash-table is updated, if applicable).
+ */
+-static void scalarFunc(
++static void fts3TokenizerFunc(
+ sqlite3_context *context,
+ int argc,
+ sqlite3_value **argv
+@@ -67,27 +79,23 @@
+ nName = sqlite3_value_bytes(argv[0])+1;
+
+ if( argc==2 ){
+-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
+- void *pOld;
+- int n = sqlite3_value_bytes(argv[1]);
+- if( zName==0 || n!=sizeof(pPtr) ){
+- sqlite3_result_error(context, "argument type mismatch", -1);
+- return;
+- }
+- pPtr = *(void **)sqlite3_value_blob(argv[1]);
+- pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
+- if( pOld==pPtr ){
+- sqlite3_result_error(context, "out of memory", -1);
++ if( fts3TokenizerEnabled(context) ){
++ void *pOld;
++ int n = sqlite3_value_bytes(argv[1]);
++ if( zName==0 || n!=sizeof(pPtr) ){
++ sqlite3_result_error(context, "argument type mismatch", -1);
++ return;
++ }
++ pPtr = *(void **)sqlite3_value_blob(argv[1]);
++ pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
++ if( pOld==pPtr ){
++ sqlite3_result_error(context, "out of memory", -1);
++ }
++ }else{
++ sqlite3_result_error(context, "fts3tokenize disabled", -1);
+ return;
+ }
+-#else
+- sqlite3_result_error(context, "fts3tokenize: "
+- "disabled - rebuild with -DSQLITE_ENABLE_FTS3_TOKENIZER", -1
+- );
+- return;
+-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
+- }else
+- {
++ }else{
+ if( zName ){
+ pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
+ }
+@@ -98,7 +106,6 @@
+ return;
+ }
+ }
+-
+ sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
+ }
+
+@@ -336,7 +343,6 @@
+ Tcl_DecrRefCount(pRet);
+ }
+
+-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
+ static
+ int registerTokenizer(
+ sqlite3 *db,
+@@ -358,7 +364,6 @@
+
+ return sqlite3_finalize(pStmt);
+ }
+-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
+
+
+ static
+@@ -431,13 +436,13 @@
+ assert( 0==strcmp(sqlite3_errmsg(db), "unknown tokenizer: nosuchtokenizer") );
+
+ /* Test the storage function */
+-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
+- rc = registerTokenizer(db, "nosuchtokenizer", p1);
+- assert( rc==SQLITE_OK );
+- rc = queryTokenizer(db, "nosuchtokenizer", &p2);
+- assert( rc==SQLITE_OK );
+- assert( p2==p1 );
+-#endif
++ if( fts3TokenizerEnabled(context) ){
++ rc = registerTokenizer(db, "nosuchtokenizer", p1);
++ assert( rc==SQLITE_OK );
++ rc = queryTokenizer(db, "nosuchtokenizer", &p2);
++ assert( rc==SQLITE_OK );
++ assert( p2==p1 );
++ }
+
+ sqlite3_result_text(context, "ok", -1, SQLITE_STATIC);
+ }
+@@ -453,7 +458,7 @@
+ ** sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
+ **
+ ** This function adds a scalar function (see header comment above
+-** scalarFunc() in this file for details) and, if ENABLE_TABLE is
++** fts3TokenizerFunc() in this file for details) and, if ENABLE_TABLE is
+ ** defined at compilation time, a temporary virtual table (see header
+ ** comment above struct HashTableVtab) to the database schema. Both
+ ** provide read/write access to the contents of *pHash.
+@@ -482,10 +487,10 @@
+ #endif
+
+ if( SQLITE_OK==rc ){
+- rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
++ rc = sqlite3_create_function(db, zName, 1, any, p, fts3TokenizerFunc, 0, 0);
+ }
+ if( SQLITE_OK==rc ){
+- rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
++ rc = sqlite3_create_function(db, zName, 2, any, p, fts3TokenizerFunc, 0, 0);
+ }
+ #ifdef SQLITE_TEST
+ if( SQLITE_OK==rc ){
+--- src/main.c
++++ src/main.c
+@@ -797,8 +797,9 @@
+ int op; /* The opcode */
+ u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
+ } aFlagOp[] = {
+- { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
+- { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
++ { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
++ { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
++ { SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_Fts3Tokenizer },
+ };
+ unsigned int i;
+ rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
+@@ -2815,6 +2816,9 @@
+ #if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
+ | SQLITE_CellSizeCk
+ #endif
++#if defined(SQLITE_ENABLE_FTS3_TOKENIZER)
++ | SQLITE_Fts3Tokenizer
++#endif
+ ;
+ sqlite3HashInit(&db->aCollSeq);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+--- src/sqlite.h.in
++++ src/sqlite.h.in
+@@ -1904,11 +1904,25 @@
+ ** following this call. The second parameter may be a NULL pointer, in
+ ** which case the trigger setting is not reported back. </dd>
+ **
++** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
++** <dd> ^This option is used to enable or disable the two-argument
++** version of the [fts3_tokenizer()] function which is part of the
++** [FTS3] full-text search engine extension.
++** There should be two additional arguments.
++** The first argument is an integer which is 0 to disable fts3_tokenizer() or
++** positive to enable fts3_tokenizer() or negative to leave the setting
++** unchanged.
++** The second parameter is a pointer to an integer into which
++** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
++** following this call. The second parameter may be a NULL pointer, in
++** which case the new setting is not reported back. </dd>
++**
+ ** </dl>
+ */
+-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
+-#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
+-#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
++#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
++#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
++#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
++#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
+
+
+ /*
+--- src/sqliteInt.h
++++ src/sqliteInt.h
+@@ -1317,6 +1317,7 @@
+ #define SQLITE_VdbeEQP 0x04000000 /* Debug EXPLAIN QUERY PLAN */
+ #define SQLITE_Vacuum 0x08000000 /* Currently in a VACUUM */
+ #define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
++#define SQLITE_Fts3Tokenizer 0x20000000 /* Enable fts3_tokenizer(2) */
+
+
+ /*
+--- src/test1.c
++++ src/test1.c
+@@ -6921,6 +6921,53 @@
+ }
+
+ /*
++** tclcmd: sqlite3_db_config DB SETTING VALUE
++**
++** Invoke sqlite3_db_config() for one of the setting values.
++*/
++static int test_sqlite3_db_config(
++ void *clientData,
++ Tcl_Interp *interp,
++ int objc,
++ Tcl_Obj *CONST objv[]
++){
++ static const struct {
++ const char *zName;
++ int eVal;
++ } aSetting[] = {
++ { "FKEY", SQLITE_DBCONFIG_ENABLE_FKEY },
++ { "TRIGGER", SQLITE_DBCONFIG_ENABLE_TRIGGER },
++ { "FTS3_TOKENIZER", SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER },
++ };
++ int i;
++ int v;
++ const char *zSetting;
++ sqlite3 *db;
++
++ if( objc!=4 ){
++ Tcl_WrongNumArgs(interp, 1, objv, "DB SETTING VALUE");
++ return TCL_ERROR;
++ }
++ if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
++ zSetting = Tcl_GetString(objv[2]);
++ if( sqlite3_strglob("SQLITE_*", zSetting)==0 ) zSetting += 7;
++ if( sqlite3_strglob("DBCONFIG_*", zSetting)==0 ) zSetting += 9;
++ if( sqlite3_strglob("ENABLE_*", zSetting)==0 ) zSetting += 7;
++ for(i=0; i<ArraySize(aSetting); i++){
++ if( strcmp(zSetting, aSetting[i].zName)==0 ) break;
++ }
++ if( i>=ArraySize(aSetting) ){
++ Tcl_SetObjResult(interp,
++ Tcl_NewStringObj("unknown sqlite3_db_config setting", -1));
++ return TCL_ERROR;
++ }
++ if( Tcl_GetIntFromObj(interp, objv[3], &v) ) return TCL_ERROR;
++ sqlite3_db_config(db, aSetting[i].eVal, v, &v);
++ Tcl_SetObjResult(interp, Tcl_NewIntObj(v));
++ return TCL_OK;
++}
++
++/*
+ ** Register commands with the TCL interpreter.
+ */
+ int Sqlitetest1_Init(Tcl_Interp *interp){
+@@ -6989,6 +7036,7 @@
+ Tcl_ObjCmdProc *xProc;
+ void *clientData;
+ } aObjCmd[] = {
++ { "sqlite3_db_config", test_sqlite3_db_config, 0 },
+ { "bad_behavior", test_bad_behavior, (void*)&iZero },
+ { "register_dbstat_vtab", test_register_dbstat_vtab },
+ { "sqlite3_connection_pointer", get_sqlite_pointer, 0 },
+--- src/test_config.c
++++ src/test_config.c
+@@ -370,12 +370,6 @@
+ Tcl_SetVar2(interp, "sqlite_options", "fts3", "0", TCL_GLOBAL_ONLY);
+ #endif
+
+-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
+- Tcl_SetVar2(interp, "sqlite_options", "fts3_tokenizer", "1", TCL_GLOBAL_ONLY);
+-#else
+- Tcl_SetVar2(interp, "sqlite_options", "fts3_tokenizer", "0", TCL_GLOBAL_ONLY);
+-#endif
+-
+ #ifdef SQLITE_ENABLE_FTS5
+ Tcl_SetVar2(interp, "sqlite_options", "fts5", "1", TCL_GLOBAL_ONLY);
+ #else
+--- test/fts3atoken.test
++++ test/fts3atoken.test
+@@ -56,40 +56,41 @@
+ #
+ # 5: Test that the table created to use tokenizer 'blah' is usable.
+ #
+-ifcapable fts3_tokenizer {
+- do_test fts3atoken-1.1 {
+- catchsql {
+- CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
+- }
+- } {1 {unknown tokenizer: blah}}
+- do_test fts3atoken-1.2 {
+- execsql {
+- SELECT fts3_tokenizer('blah', fts3_tokenizer('simple')) IS NULL;
+- }
+- } {0}
+- do_test fts3atoken-1.3 {
+- execsql {
+- SELECT fts3_tokenizer('blah') == fts3_tokenizer('simple');
+- }
+- } {1}
+- do_test fts3atoken-1.4 {
+- catchsql {
+- CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
+- }
+- } {0 {}}
+- do_test fts3atoken-1.5 {
+- execsql {
+- INSERT INTO t1(content) VALUES('There was movement at the station');
+- INSERT INTO t1(content) VALUES('For the word has passed around');
+- INSERT INTO t1(content) VALUES('That the colt from ol regret had got');
+- SELECT content FROM t1 WHERE content MATCH 'movement'
+- }
+- } {{There was movement at the station}}
+-} else {
+- do_catchsql_test 1.6 {
++sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
++do_test fts3atoken-1.1 {
++ catchsql {
++ CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
++ }
++} {1 {unknown tokenizer: blah}}
++do_test fts3atoken-1.2 {
++ execsql {
+ SELECT fts3_tokenizer('blah', fts3_tokenizer('simple')) IS NULL;
+- } {1 {fts3tokenize: disabled - rebuild with -DSQLITE_ENABLE_FTS3_TOKENIZER}}
+-}
++ }
++} {0}
++do_test fts3atoken-1.3 {
++ execsql {
++ SELECT fts3_tokenizer('blah') == fts3_tokenizer('simple');
++ }
++} {1}
++do_test fts3atoken-1.4 {
++ catchsql {
++ CREATE VIRTUAL TABLE t1 USING fts3(content, tokenize blah);
++ }
++} {0 {}}
++do_test fts3atoken-1.5 {
++ execsql {
++ INSERT INTO t1(content) VALUES('There was movement at the station');
++ INSERT INTO t1(content) VALUES('For the word has passed around');
++ INSERT INTO t1(content) VALUES('That the colt from ol regret had got');
++ SELECT content FROM t1 WHERE content MATCH 'movement'
++ }
++} {{There was movement at the station}}
++
++sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 0
++do_catchsql_test 1.6 {
++ SELECT fts3_tokenizer('blah', fts3_tokenizer('simple')) IS NULL;
++} {1 {fts3tokenize disabled}}
++
+
+ #--------------------------------------------------------------------------
+ # Test cases fts3atoken-2.* test error cases in the scalar function based
+@@ -212,14 +213,14 @@
+ do_catchsql_test 6.2.1 {
+ SELECT fts3_tokenizer(NULL);
+ } {1 {unknown tokenizer: }}
+-ifcapable fts3_tokenizer {
+- do_catchsql_test 6.2.2 {
+- SELECT fts3_tokenizer(NULL, X'1234567812345678');
+- } {1 {argument type mismatch}}
+- do_catchsql_test 6.2.3 {
+- SELECT fts3_tokenizer(NULL, X'12345678');
+- } {1 {argument type mismatch}}
+-}
++
++sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
++do_catchsql_test 6.2.2 {
++ SELECT fts3_tokenizer(NULL, X'1234567812345678');
++} {1 {argument type mismatch}}
++do_catchsql_test 6.2.3 {
++ SELECT fts3_tokenizer(NULL, X'12345678');
++} {1 {argument type mismatch}}
+
+
+ finish_test
+--- test/fts4langid.test
++++ test/fts4langid.test
+@@ -358,31 +358,30 @@
+ }
+ }
+
+-ifcapable fts3_tokenizer {
+- do_test 4.1.0 {
+- reset_db
+- set ptr [fts3_test_tokenizer]
+- execsql { SELECT fts3_tokenizer('testtokenizer', $ptr) }
+- build_multilingual_db_2 db
+- } {}
+- do_execsql_test 4.1.1 {
+- SELECT docid FROM t4 WHERE t4 MATCH 'quick';
+- } {0}
+- do_execsql_test 4.1.2 {
+- SELECT docid FROM t4 WHERE t4 MATCH 'quick' AND lid=1;
+- } {}
+- do_execsql_test 4.1.3 {
+- SELECT docid FROM t4 WHERE t4 MATCH 'Quick' AND lid=1;
+- } {1}
+- for {set i 0} {$i < 50} {incr i} {
+- do_execsql_test 4.1.4.$i {
+- SELECT count(*) FROM t4 WHERE t4 MATCH 'fox' AND lid=$i;
+- } [expr 0==($i%2)]
+- }
+- do_catchsql_test 4.1.5 {
+- INSERT INTO t4(content, lid) VALUES('hello world', 101)
+- } {1 {SQL logic error or missing database}}
++do_test 4.1.0 {
++ reset_db
++ set ptr [fts3_test_tokenizer]
++ sqlite3_db_config db SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1
++ execsql { SELECT fts3_tokenizer('testtokenizer', $ptr) }
++ build_multilingual_db_2 db
++} {}
++do_execsql_test 4.1.1 {
++ SELECT docid FROM t4 WHERE t4 MATCH 'quick';
++} {0}
++do_execsql_test 4.1.2 {
++ SELECT docid FROM t4 WHERE t4 MATCH 'quick' AND lid=1;
++} {}
++do_execsql_test 4.1.3 {
++ SELECT docid FROM t4 WHERE t4 MATCH 'Quick' AND lid=1;
++} {1}
++for {set i 0} {$i < 50} {incr i} {
++ do_execsql_test 4.1.4.$i {
++ SELECT count(*) FROM t4 WHERE t4 MATCH 'fox' AND lid=$i;
++ } [expr 0==($i%2)]
+ }
++do_catchsql_test 4.1.5 {
++ INSERT INTO t4(content, lid) VALUES('hello world', 101)
++} {1 {SQL logic error or missing database}}
+
+ #-------------------------------------------------------------------------
+ # Test cases 5.*
diff --git a/dev-db/sqlite/files/sqlite-3.11.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.11.0-full_tarball-build.patch
new file mode 100644
index 0000000..4745f05
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.11.0-full_tarball-build.patch
@@ -0,0 +1,132 @@
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- Makefile.in
++++ Makefile.in
+@@ -550,7 +550,7 @@
+ # Extra compiler options for various shell tools
+ #
+ SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
+-SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
++SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_DBSTAT_VTAB
+ FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
+ FUZZCHECK_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMSYS5
+
+@@ -571,18 +571,18 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- $(TOP)/src/shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ $(TOP)/src/shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.c sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.c $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -650,7 +650,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1074,13 +1074,13 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+
+ # Minimal testing that runs in less than 3 minutes
+ #
+@@ -1106,29 +1106,29 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
+ echo "#define TCLSH 2" > $@
+ echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
+- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
++ cat $(TOP)/src/tclsqlite.c >> $@
+ echo "static const char *tclsh_main_loop(void){" >> $@
+ echo "static const char *zMainloop = " >> $@
+ $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
+ echo "; return zMainloop; }" >> $@
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1142,8 +1142,8 @@
+ speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+ loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
+--- configure.ac
++++ configure.ac
+@@ -570,6 +570,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/files/sqlite-3.11.0-nonfull_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch b/dev-db/sqlite/files/sqlite-3.11.0-nonfull_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch
new file mode 100644
index 0000000..0ed2517
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.11.0-nonfull_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch
@@ -0,0 +1,232 @@
+https://www.sqlite.org/cgi/src/info/374b5108087a2eae
+
+--- sqlite3.c
++++ sqlite3.c
+@@ -2121,11 +2121,25 @@
+ ** following this call. The second parameter may be a NULL pointer, in
+ ** which case the trigger setting is not reported back. </dd>
+ **
++** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
++** <dd> ^This option is used to enable or disable the two-argument
++** version of the [fts3_tokenizer()] function which is part of the
++** [FTS3] full-text search engine extension.
++** There should be two additional arguments.
++** The first argument is an integer which is 0 to disable fts3_tokenizer() or
++** positive to enable fts3_tokenizer() or negative to leave the setting
++** unchanged.
++** The second parameter is a pointer to an integer into which
++** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
++** following this call. The second parameter may be a NULL pointer, in
++** which case the new setting is not reported back. </dd>
++**
+ ** </dl>
+ */
+-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
+-#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
+-#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
++#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
++#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
++#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
++#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
+
+
+ /*
+@@ -12206,6 +12220,7 @@
+ #define SQLITE_VdbeEQP 0x04000000 /* Debug EXPLAIN QUERY PLAN */
+ #define SQLITE_Vacuum 0x08000000 /* Currently in a VACUUM */
+ #define SQLITE_CellSizeCk 0x10000000 /* Check btree cell sizes on load */
++#define SQLITE_Fts3Tokenizer 0x20000000 /* Enable fts3_tokenizer(2) */
+
+
+ /*
+@@ -133589,8 +133604,9 @@
+ int op; /* The opcode */
+ u32 mask; /* Mask of the bit in sqlite3.flags to set/clear */
+ } aFlagOp[] = {
+- { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
+- { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
++ { SQLITE_DBCONFIG_ENABLE_FKEY, SQLITE_ForeignKeys },
++ { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger },
++ { SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, SQLITE_Fts3Tokenizer },
+ };
+ unsigned int i;
+ rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
+@@ -135607,6 +135623,9 @@
+ #if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
+ | SQLITE_CellSizeCk
+ #endif
++#if defined(SQLITE_ENABLE_FTS3_TOKENIZER)
++ | SQLITE_Fts3Tokenizer
++#endif
+ ;
+ sqlite3HashInit(&db->aCollSeq);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+@@ -146857,6 +146876,18 @@
+ /* #include <string.h> */
+
+ /*
++** Return true if the two-argument version of fts3_tokenizer()
++** has been activated via a prior call to sqlite3_db_config(db,
++** SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER, 1, 0);
++*/
++static int fts3TokenizerEnabled(sqlite3_context *context){
++ sqlite3 *db = sqlite3_context_db_handle(context);
++ int isEnabled = 0;
++ sqlite3_db_config(db,SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER,-1,&isEnabled);
++ return isEnabled;
++}
++
++/*
+ ** Implementation of the SQL scalar function for accessing the underlying
+ ** hash table. This function may be called as follows:
+ **
+@@ -146876,7 +146907,7 @@
+ ** is a blob containing the pointer stored as the hash data corresponding
+ ** to string <key-name> (after the hash-table is updated, if applicable).
+ */
+-static void scalarFunc(
++static void fts3TokenizerFunc(
+ sqlite3_context *context,
+ int argc,
+ sqlite3_value **argv
+@@ -146894,27 +146925,23 @@
+ nName = sqlite3_value_bytes(argv[0])+1;
+
+ if( argc==2 ){
+-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
+- void *pOld;
+- int n = sqlite3_value_bytes(argv[1]);
+- if( zName==0 || n!=sizeof(pPtr) ){
+- sqlite3_result_error(context, "argument type mismatch", -1);
+- return;
+- }
+- pPtr = *(void **)sqlite3_value_blob(argv[1]);
+- pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
+- if( pOld==pPtr ){
+- sqlite3_result_error(context, "out of memory", -1);
++ if( fts3TokenizerEnabled(context) ){
++ void *pOld;
++ int n = sqlite3_value_bytes(argv[1]);
++ if( zName==0 || n!=sizeof(pPtr) ){
++ sqlite3_result_error(context, "argument type mismatch", -1);
++ return;
++ }
++ pPtr = *(void **)sqlite3_value_blob(argv[1]);
++ pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
++ if( pOld==pPtr ){
++ sqlite3_result_error(context, "out of memory", -1);
++ }
++ }else{
++ sqlite3_result_error(context, "fts3tokenize disabled", -1);
+ return;
+ }
+-#else
+- sqlite3_result_error(context, "fts3tokenize: "
+- "disabled - rebuild with -DSQLITE_ENABLE_FTS3_TOKENIZER", -1
+- );
+- return;
+-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
+- }else
+- {
++ }else{
+ if( zName ){
+ pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
+ }
+@@ -146925,7 +146952,6 @@
+ return;
+ }
+ }
+-
+ sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
+ }
+
+@@ -147163,7 +147189,6 @@
+ Tcl_DecrRefCount(pRet);
+ }
+
+-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
+ static
+ int registerTokenizer(
+ sqlite3 *db,
+@@ -147185,7 +147210,6 @@
+
+ return sqlite3_finalize(pStmt);
+ }
+-#endif /* SQLITE_ENABLE_FTS3_TOKENIZER */
+
+
+ static
+@@ -147258,13 +147282,13 @@
+ assert( 0==strcmp(sqlite3_errmsg(db), "unknown tokenizer: nosuchtokenizer") );
+
+ /* Test the storage function */
+-#ifdef SQLITE_ENABLE_FTS3_TOKENIZER
+- rc = registerTokenizer(db, "nosuchtokenizer", p1);
+- assert( rc==SQLITE_OK );
+- rc = queryTokenizer(db, "nosuchtokenizer", &p2);
+- assert( rc==SQLITE_OK );
+- assert( p2==p1 );
+-#endif
++ if( fts3TokenizerEnabled(context) ){
++ rc = registerTokenizer(db, "nosuchtokenizer", p1);
++ assert( rc==SQLITE_OK );
++ rc = queryTokenizer(db, "nosuchtokenizer", &p2);
++ assert( rc==SQLITE_OK );
++ assert( p2==p1 );
++ }
+
+ sqlite3_result_text(context, "ok", -1, SQLITE_STATIC);
+ }
+@@ -147280,7 +147304,7 @@
+ ** sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
+ **
+ ** This function adds a scalar function (see header comment above
+-** scalarFunc() in this file for details) and, if ENABLE_TABLE is
++** fts3TokenizerFunc() in this file for details) and, if ENABLE_TABLE is
+ ** defined at compilation time, a temporary virtual table (see header
+ ** comment above struct HashTableVtab) to the database schema. Both
+ ** provide read/write access to the contents of *pHash.
+@@ -147309,10 +147333,10 @@
+ #endif
+
+ if( SQLITE_OK==rc ){
+- rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
++ rc = sqlite3_create_function(db, zName, 1, any, p, fts3TokenizerFunc, 0, 0);
+ }
+ if( SQLITE_OK==rc ){
+- rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
++ rc = sqlite3_create_function(db, zName, 2, any, p, fts3TokenizerFunc, 0, 0);
+ }
+ #ifdef SQLITE_TEST
+ if( SQLITE_OK==rc ){
+--- sqlite3.h
++++ sqlite3.h
+@@ -1904,11 +1904,25 @@
+ ** following this call. The second parameter may be a NULL pointer, in
+ ** which case the trigger setting is not reported back. </dd>
+ **
++** <dt>SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER</dt>
++** <dd> ^This option is used to enable or disable the two-argument
++** version of the [fts3_tokenizer()] function which is part of the
++** [FTS3] full-text search engine extension.
++** There should be two additional arguments.
++** The first argument is an integer which is 0 to disable fts3_tokenizer() or
++** positive to enable fts3_tokenizer() or negative to leave the setting
++** unchanged.
++** The second parameter is a pointer to an integer into which
++** is written 0 or 1 to indicate whether fts3_tokenizer is disabled or enabled
++** following this call. The second parameter may be a NULL pointer, in
++** which case the new setting is not reported back. </dd>
++**
+ ** </dl>
+ */
+-#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
+-#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
+-#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
++#define SQLITE_DBCONFIG_LOOKASIDE 1001 /* void* int int */
++#define SQLITE_DBCONFIG_ENABLE_FKEY 1002 /* int int* */
++#define SQLITE_DBCONFIG_ENABLE_TRIGGER 1003 /* int int* */
++#define SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER 1004 /* int int* */
+
+
+ /*
diff --git a/dev-db/sqlite/files/sqlite-3.11.0-nonfull_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.11.0-nonfull_tarball-build.patch
new file mode 100644
index 0000000..e0b477c
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.11.0-nonfull_tarball-build.patch
@@ -0,0 +1,38 @@
+Link executables against libsqlite3.so.
+Fix building with dlopen() not available.
+
+--- Makefile.am
++++ Makefile.am
+@@ -1,15 +1,16 @@
+
+-AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
++AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
+
+ lib_LTLIBRARIES = libsqlite3.la
+ libsqlite3_la_SOURCES = sqlite3.c
+ libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
+
+ bin_PROGRAMS = sqlite3
+-sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h
+-sqlite3_LDADD = @READLINE_LIBS@
++sqlite3_SOURCES = shell.c sqlite3.h
++EXTRA_sqlite3_SOURCES = sqlite3.c
++sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
+ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
+-sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
++sqlite3_CFLAGS = $(AM_CFLAGS)
+
+ include_HEADERS = sqlite3.h sqlite3ext.h
+
+--- configure.ac
++++ configure.ac
+@@ -89,6 +89,9 @@
+ [], [enable_dynamic_extensions=yes])
+ if test x"$enable_dynamic_extensions" != "xno"; then
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
++ fi
+ else
+ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
+ fi
diff --git a/dev-db/sqlite/sqlite-3.11.0.ebuild b/dev-db/sqlite/sqlite-3.11.0.ebuild
new file mode 100644
index 0000000..f73b1ad
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.11.0.ebuild
@@ -0,0 +1,243 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="http://sqlite.org/"
+SRC_URI="doc? ( http://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( http://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ test? ( http://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ tools? ( http://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( http://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20131008-r14
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_tarball() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_tarball; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_tarball; then
+ epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-build.patch"
+ epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch"
+
+ # Fix shell1-5.0 test.
+ # http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2015-May/002575.html
+ sed -e "/if {\$i==0x0D /s/\$i==0x0D /&|| (\$i>=0xE0 \&\& \$i<=0xEF) /" -i test/shell1.test
+ else
+ epatch "${FILESDIR}/${PN}-3.11.0-nonfull_tarball-build.patch"
+ epatch "${FILESDIR}/${PN}-3.11.0-nonfull_tarball-SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER.patch"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_tarball; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # http://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # http://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support dbstat virtual table.
+ # http://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # http://sqlite.org/fts3.html
+ # http://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # http://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support Resumable Bulk Update extension.
+ # http://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # http://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # http://sqlite.org/c3ref/stmt_scanstatus.html
+ # http://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support unlock notification.
+ # http://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support soundex() function.
+ # http://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_tarball; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # http://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_tarball; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_tarball && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # http://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_tarball; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ # Use pread(), pread64(), pwrite(), pwrite64() functions for better performance if they are available.
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread_pwrite_test" <<< $'#include <unistd.h>\nint main()\n{\n pread(0, NULL, 0, 0);\n pwrite(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
+ append-cppflags -DUSE_PREAD
+ fi
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
+ append-cppflags -DUSE_PREAD64
+ elif $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -D_LARGEFILE64_SOURCE -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then
+ append-cppflags -DUSE_PREAD64 -D_LARGEFILE64_SOURCE
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake rbu showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool rbu sqlite3-rbu
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ dohtml -A ico,odf,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2016-04-02 21:31 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2016-04-02 21:31 UTC (permalink / raw
To: gentoo-commits
commit: 21f0466c6373876309a6c6164659482d9dffe063
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Apr 2 00:50:48 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Apr 2 21:30:40 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21f0466c
dev-db/sqlite: Version bump (3.12.0).
dev-db/sqlite/Manifest | 3 +
.../sqlite-3.12.0-nonfull_tarball-build.patch | 14 ++
dev-db/sqlite/sqlite-3.12.0.ebuild | 238 +++++++++++++++++++++
3 files changed, 255 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 24f5c37..29105ac 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -7,6 +7,7 @@ DIST sqlite-autoconf-3100000.tar.gz 2331542 SHA256 43cc292d70711fa7580250c8a1cd7
DIST sqlite-autoconf-3100200.tar.gz 2332013 SHA256 a2b3b4bd1291ea7d6c8252f7edff36a4362f2f0e5d5370444ba6cbe313ae2971 SHA512 fa4e3757d76c9f0cf167481346c0844f41a3a7ea0e8fde186be7ebcc14f9b45b770386110e23860c6dcaaf1819aa12725fde7507271a0a8b59610dcc458c552f WHIRLPOOL 5bc1f324bb9fb7baa70a12e6e1519ccae7f2beef51ec48312df4a1a8890406bfbd4a9c0ee0b5a186619624763c65238fa34b88bb478c76e7a39b23c4a96eb66a
DIST sqlite-autoconf-3110000.tar.gz 2359347 SHA256 508d4dcbcf7a7181e95c717a1dc4ae3c0880b3d593be0c4b40abb6c3a0e201fb SHA512 208bb41e9b2a67ba5efdefe5393161996b7741a153647bd28b680a41a7d3c23f6c916bf6eede5325f507697fa92571c4982522ba9396a58e7a675564dec73865 WHIRLPOOL 9096de033729f27ccbdea0753b27a5170b1c1d7c6b016d00ad27c1a4b29dc8eabf15a1b8afcf97682f33b064552db3ceac5eb9d9612c8fd17d3602d3a592eb3d
DIST sqlite-autoconf-3110100.tar.gz 2359545 SHA256 533ff1d0271c2e666f01591271cef01a31648563affa0c95e80ef735077d4377 SHA512 c3efd2693e6a9526a2901d9879982a421e81e7e979aef65a160e71b255339344079a1943395480d5c37a1acc6243a8d45f45fa688f7e996774da38a3a99e71a1 WHIRLPOOL b8062e2030dffd8b44cc0eba32c93312b8ae20064004c460321a4251806037fe62ec5ef83499e491cb248786b9302f0495de0c0624128d0063cbff71b77b8864
+DIST sqlite-autoconf-3120000.tar.gz 2374101 SHA256 53ecdbb5287af673eca3710c5f6c2305e73bb2d034f2a28770bea2be92ed269e SHA512 84a9107ca9045ddc724d7e37dfe2b1dc00a106769260c7bd429a95beedc46a906985b65e0b2bf597de23dd56d132b9ef6888a8c4e5f8a731c8a5c026b971d89e WHIRLPOOL 4ec76b383670f2ee9c50870587696a3c86357161344851b487f54a03c668dac8c4272738b44e5a4048dd00bf2b3122904c53b6d2195f9b48aef3ad928f34b85b
DIST sqlite-doc-3081001.zip 5060040 SHA256 0b6c186a2da8b7d7397eb3942e97fd85b88734beb300702ace0dca4a3db729a6 SHA512 76caf476c98d8a0f5da55c4608bfc31235289e3ab2286089195fab86da6b5d98b2d5eb0fe7b81e3aff8f04939c9bcbfded6be22f0eeb21103478bf519e9ff78b WHIRLPOOL 5edd1d06babf19d54e326f6262d45851d43a0907adad66b130c93cf63efbfadcad6dbc98330bd4d2f80d1d528cd9088ada0727475b42005de6bcdbc4914e5d7c
DIST sqlite-doc-3081002.zip 5068441 SHA256 e355ec10989829d485d2df08f076f6c3f598f7fc1d45d307b4fd70d5e609e6c4 SHA512 c222b250de6c8e182da1b534f459600a81b300c87578f9484b7d6f1fbbfaad9e8be70c306d0200b163850f48c974c55ce25782fefd55672ef72f03dc0b5f8d19 WHIRLPOOL 148bbce9bc3ffb1f9101e45936ce060aa49dbc88647effabf5418fa95ccdb91a4971d171d940de3307a2d59144e73250c43f8d8d79927ac36a1e02784f143061
DIST sqlite-doc-3081101.zip 5108061 SHA256 89e3fc4bce7463885da3b03602b4260fe07240f9ea674ba4ac7ce2ee4987357f SHA512 8a39e05b1647f4769126234b9759552138f3e3874bc008686ef2f9136833ddc30b3b0696222a736d604e8910a436acedc4954e46894f4adc085eb5f2b6ab9280 WHIRLPOOL f47308753f8df2c497e1bf3cd941b862d69d4f6bbabb2f0606d144966cbb186c5e1513022a5adc122939180fc6cfaa7c83a9537481cce455a83b7bf68deec9cd
@@ -16,6 +17,7 @@ DIST sqlite-doc-3100000.zip 5350213 SHA256 40af646d8c2109e5a15b1787e53524ed16c8e
DIST sqlite-doc-3100200.zip 5374707 SHA256 21637344807efb9b6c6f615fd98b72620d074c720660940182888a4dbc2af982 SHA512 188f7b982066ba6680b13966b2d6f2c466fb99bef0c5c8ee0ca1a18a6760e5a26eef43ef985f2c9031e4299c27dc91a444f113549353c3209c5b50b97015aabb WHIRLPOOL f614a00fe9cc12e97f5c1bff6af008c3eeca5aa761656b0af3a1b790bee697f8316da2b57c457eb4c252463834b51a89911b9117c7d4508d4eba85eb73780a6b
DIST sqlite-doc-3110000.zip 5382519 SHA256 4a942d89d5bf0aa70c0a01267a52961632b27512c293eb6452f6efe909dcec50 SHA512 1c9a17c1461bae78d34a89a7c2bc7e7108d95ece40c909835fc08a7f332823a152a7a357f83755d66307336ce116d9539ef67be44c5e11ec742721ac819fd708 WHIRLPOOL 742df247b6930062cf0904d03a9e543c1affc8f592f8675a99a95acf34501cc14b47ca9eb7ee8062f83960cfdb62b2a05656989e2438d45fe70c90c2c5ce518a
DIST sqlite-doc-3110100.zip 5386958 SHA256 3f127c51c7936d13de96255b00a6be3862693ff025f61a1d3d17d3d57ee295d0 SHA512 b8fe71a852ce2fa3d7da27c09e3a1e8d019a9c55eb7e5516425754148f8d8a6cc88571d006768d5fd5b2c72aa513544bfc0ce4208f376099f8f08b7fee480d06 WHIRLPOOL 8cf7b3495ff184622dbf2842931d6b77061dc166c9d66e6bb6e400525c59ccc5b689b22cea45dad0fa7a7117692a1c16fea46aa4789084ce8c4de3655e973812
+DIST sqlite-doc-3120000.zip 5402611 SHA256 346d9d56a0193d9396948192b7eca9e45c2adfeea6bbf71df62502830da510f3 SHA512 7879d006e528d692ea5718f27d03e2dfe2a5e54aa135be983b992836102720df4dc690d84795115a25ed19a663e895a3f3f8a59d0de079c451d215e07081281e WHIRLPOOL 00f5bc4b82af1ba8d43ae4d0761dacd2e608009812a12fee9aedd333baec9b36f74542c60de4acacd19f5ef898d3bd57dfb705f3b21219ba3862ca91c2f76402
DIST sqlite-src-3081001.zip 7648823 SHA256 def6e2401c8da91b489de19d1a1734f722b4e629148ab804776d27b49ba49e7b SHA512 7604ac35eddd4aca53c02b0ab7ae7682856aec2eb4e6a9627da041ea19d464bb6080a70d84070a94abf77eb14ae616a0a8c5fe2f2a6c19fc899d1b21535d3e1a WHIRLPOOL c44e4f446d12af1f4df49e171276d853381784e979d3521cafbfdd5b5359c792586d298f3573bbda8a260b9008a4b7fcdc4ce0382fdda18574287018a2cb4f4c
DIST sqlite-src-3081002.zip 7648737 SHA256 fda379bc4590761838d02ac8008433b7c3eae6e120e45d639d24b09d0004b42d SHA512 99661c709ffe8d5776c3ed2c1a64c70f541b68f0c7745e3e769528273966f71eeb29e8911d42ede9420f179b7fcbda63c4d0980a9d7bc05e937d0a6deb7b814f WHIRLPOOL 4e13138a5f92f5c5fe65c8b670097b57ea778244a37a5bcabf75f86f4ac3f0bc17860f3e55833adc9adcc335b6aece396c685421b58ccb0ddca66f37edfda7fc
DIST sqlite-src-3081101.zip 9057103 SHA256 261ad454663f66fda6101b278bb7b3931cf01884deefbf4ea6b152f83a624662 SHA512 e84048a4a7f9c51219698b59d45c0c533ffe46ba6a20b96ca40f8066fd3825f80f963283d61dc22b2eb5bbca35db3ed4a6e13b1ab3c8b70b0af83469d2760f16 WHIRLPOOL c1add1e5a269546883e58c1666b8acdc58b16b6ad37ea546c99c8ece3348196d5ba33effb17fc773f4d49b1ee45583de7fec3fbe2f6d48e95fdfe4a802c6a824
@@ -25,3 +27,4 @@ DIST sqlite-src-3100000.zip 9222423 SHA256 7dd893f5569f0aa2fdd4f463f1f4ee670cff3
DIST sqlite-src-3100200.zip 9223036 SHA256 a45e1574e77951116cef6ad7eb79a683385a3a33fc78037e3cfcfd9243c4fb86 SHA512 08bd94f6fc282ab9e30e602c5eb27e0611bd7d9841f1135b037b9a3b09055f88a0351ce4973753fbd186ac912cdb2cf2e62835c67c35f9146697147bd7b7713d WHIRLPOOL 2a3de53f7eb944edb31602c121c2be518d1ce28d8b21933ac262fac7f48e803b9267ea0abbc7b578b44bc1104d65c4610a862c821f9797806fb674a7ab32729c
DIST sqlite-src-3110000.zip 9293025 SHA256 ac670e151222f5deee88d7883d8d509a874fe0e5df288659ada011ca8b435db0 SHA512 c83c1449e4f39f3aa22522a0ae8afa875259a7e1db7af129a7d185246567337435093d1f3a21a5038bbc97e35bb582b240ecffbe24d9fd6b60012016b9ebeecc WHIRLPOOL bcee84e44827a2a051b7d7b99e6e636373d656cf682eb12dae33bb884f4596f5223007a0e4f13993edb8da13551acb2d0957e6c53260d1ff056ac44c3fecb7d8
DIST sqlite-src-3110100.zip 9294249 SHA256 ade6aa93fd1d52dec0d8712f9ba4df59ecc6ec442f32ef28631c3b9341aadf97 SHA512 350c3019922a6adc1b7372f5e27c810a08f4bf576ea4e07d46bc59e1939a919d1bda1a29581f4df258f577202d79253292f719ca56ba30d1e7a1a2d801b65a48 WHIRLPOOL 3f7cc7baa7c59930e2e676d859478a68fddd392ccc4747630aa68c3909eb0b633d6031e9a998c1a741054594935dd52b3143ce05b574ff1b14f20f6ededc0a6e
+DIST sqlite-src-3120000.zip 9367749 SHA256 d891e7ffd56cd97d069a6ed99d7e85cbe655b0a97ca6b5398c7806e888642df1 SHA512 9669e33e328b826f4692725ec09e21d85f4f2c386c624a81b0535f41ca7d2f996ebf5018db8ecdfdac18cff39a881a953111801499705dfb599f00e3bb5d10e4 WHIRLPOOL 865aaecbe331ec93b1a8c5b965c3edc43d35994c2db79d336febb27860ee91d68753d3ea274b4639f3e05d3f0a589fb21aedac33bc2120a4de8d094383d7b923
diff --git a/dev-db/sqlite/files/sqlite-3.12.0-nonfull_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.12.0-nonfull_tarball-build.patch
new file mode 100644
index 0000000..fe9f70a
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.12.0-nonfull_tarball-build.patch
@@ -0,0 +1,14 @@
+Fix building with dlopen() not available.
+
+--- configure.ac
++++ configure.ac
+@@ -89,6 +89,9 @@
+ [], [enable_dynamic_extensions=yes])
+ if test x"$enable_dynamic_extensions" != "xno"; then
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
++ fi
+ else
+ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
+ fi
diff --git a/dev-db/sqlite/sqlite-3.12.0.ebuild b/dev-db/sqlite/sqlite-3.12.0.ebuild
new file mode 100644
index 0000000..d99bf41
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.12.0.ebuild
@@ -0,0 +1,238 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_tarball() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_tarball; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_tarball; then
+ epatch "${FILESDIR}/${PN}-3.11.0-full_tarball-build.patch"
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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
+ else
+ epatch "${FILESDIR}/${PN}-3.12.0-nonfull_tarball-build.patch"
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_tarball; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_tarball; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_tarball; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_tarball && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_tarball; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake rbu showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool rbu sqlite3-rbu
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ dohtml -A ico,odf,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2016-08-16 18:37 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2016-08-16 18:37 UTC (permalink / raw
To: gentoo-commits
commit: 7023f7efb89f8aad6ef32103fec6e2ffd97dfe0a
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Aug 16 14:33:22 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Aug 16 18:36:45 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7023f7ef
dev-db/sqlite: Version bump.
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.14.0-full_tarball-build.patch | 147 ++++++++++++
dev-db/sqlite/sqlite-3.14.1.ebuild | 261 +++++++++++++++++++++
3 files changed, 411 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index a93c381..8241c77 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -2,11 +2,14 @@ DIST sqlite-autoconf-3120000.tar.gz 2374101 SHA256 53ecdbb5287af673eca3710c5f6c2
DIST sqlite-autoconf-3120100.tar.gz 2374576 SHA256 1c038519862b3983b0475f3ed3143ce4bbfcd21bfbd0741192f415838c831a7c SHA512 eb0b892bb6a1783df9b712d5f78c9f5fb5aa8ff1b1735fd2806e96b1c04e2a5f87b2e47469185195611a5cf6c446ec32935e9ae0b01734383a8fefc1bcaf5842 WHIRLPOOL 0284241a3fd6dbee16ba5fe4c1a0dc15b1b3134bd39ba8a2219c2da4e426e3572809459bbdc8bbf3fa4ea055406b85c547d8e7f05afcb57baa712653ce0d6f64
DIST sqlite-autoconf-3120200.tar.gz 2374804 SHA256 fd00770c9afd39db555c78400e52f55e8bd6568c78be23561abb472a22d09abb SHA512 e56b8d5b8fb41d27437659db669259198663c266c0b3faf44ba9b130441550fb79bd040e6488f56280b33230d9cf4e51c7906f968ffdd36206354bfabc4b6eb4 WHIRLPOOL bd1231f0cce91281c9e42338ae698a06446078d2070f4f16b5472ed4004dbf1913339a3f0e5a34d87d0e71390a130c347f3c97353967530b65b23e1492664b7e
DIST sqlite-autoconf-3130000.tar.gz 2459805 SHA256 e2797026b3310c9d08bd472f6d430058c6dd139ff9d4e30289884ccd9744086b SHA512 c2547ff9a144c46829344058b4f8dcc5b8c9c823cbc667be2944dc7beecb9cc213858cc9ce302a763200278397d9a0fc6bb35c542028a124ef0980fedd574c2f WHIRLPOOL b9bcfb2eecf30719f7a673d569949b4e497c9682de08ca6f0ccc6c67a8f1541a51e88108bebde94a14802516b114c9f8cad83fbdbb130774b3082a8107657255
+DIST sqlite-autoconf-3140100.tar.gz 2473610 SHA256 bc7182476900017becb81565ecea7775d46ab747a97281aa610f4f45881c47a6 SHA512 14d78eea1aef5bd143f942b88f01ef2c1ef58aeac6c0a10c0807761ac5301b71db7d787f82ba8215d804b80c115ee4800072d4aa86616d04d01aaf529e168461 WHIRLPOOL b43a9397b24b3cd6841bf5468d03d4ca10805c355df5afa6b0e69b6cf5d924f1e11e03b5b78549f9e21028d5a1ba2467707e84eb2e2955df21a59abd464dacb2
DIST sqlite-doc-3120000.zip 5402611 SHA256 346d9d56a0193d9396948192b7eca9e45c2adfeea6bbf71df62502830da510f3 SHA512 7879d006e528d692ea5718f27d03e2dfe2a5e54aa135be983b992836102720df4dc690d84795115a25ed19a663e895a3f3f8a59d0de079c451d215e07081281e WHIRLPOOL 00f5bc4b82af1ba8d43ae4d0761dacd2e608009812a12fee9aedd333baec9b36f74542c60de4acacd19f5ef898d3bd57dfb705f3b21219ba3862ca91c2f76402
DIST sqlite-doc-3120100.zip 5410493 SHA256 dbe53c076922c711a467dde57432583fbf9a12eac57cb75f6116a310880eb088 SHA512 d0117618d97744255248b9160816203147ba2afdb0bea5fe02d5e464541e09bc9147189317c6f849cc56059d6ae96e3e4b2a30cd8d0bc7b0e1ecacb573cfcdd4 WHIRLPOOL e3f054eda83301b9e4b5170bf9c56895756e4ac78a1c6256467c990fafccaeadec5f7ca54f1bf118bcb950f25db63df6c0972a138d36a10a0a9cfdf688eb207b
DIST sqlite-doc-3120200.zip 5416790 SHA256 67c640c4b01b961016717db61e3e43c63c33248c78ce0de9f10b88ea7ce97670 SHA512 4ded937565b2d9b63ae55495d4b536bc0056e0d9aa7119ee54ddea127c42ba7de17986db7b85c172043fab1112132cbc126a102b248770fca6cde9a8fda438ae WHIRLPOOL 7eefecb6d0450c85ec3f30cdeb853117f4067e1bace7d3c0524e5c6cb13d2e31772211aec8562f972491da413d9bd79022bc29c16968b086562e7f17bff984eb
DIST sqlite-doc-3130000.zip 5550186 SHA256 510606a9cdd89814b2d44e7b7f284ebb0a58153e1800de6daadfab445190f79c SHA512 0bf4544a07bd92533bc248dc16ed43c4fcad870ab535591618d3006f38c2741a8c0ed1da082444ea1af2f57936575c678bc12b651252426b908660023b36cd39 WHIRLPOOL 78fd5de701224e39d07fbb03a9193dff45237845b215d83f27a623f289d9da0df7082d53115e90474856b775d350ee3f9d2970ca2c1a4a33b24543de06fd3b9a
+DIST sqlite-doc-3140100.zip 5689913 SHA256 036203c71ca5796fd80b9d9d3bd710f698da3d5393d4df5c7cdf5468258c9ec6 SHA512 4a5292f6b6a117a0bf7ef8446c9748cde534d6a6f3a02a12fc4eb4cddcf1d11479bc4e2eebdb21866a1994143e02fd66b79a08b98acfdb3390689cbe425b0b6e WHIRLPOOL 4c82e3e950396504846a14d62c01a94c9063978b9aa42656adbb0219dbd6f89a4d7703ee2a4ed7265b7875f612f2b0869b098b09a2bfcafa01e7694dfaa57c06
DIST sqlite-src-3120000.zip 9367749 SHA256 d891e7ffd56cd97d069a6ed99d7e85cbe655b0a97ca6b5398c7806e888642df1 SHA512 9669e33e328b826f4692725ec09e21d85f4f2c386c624a81b0535f41ca7d2f996ebf5018db8ecdfdac18cff39a881a953111801499705dfb599f00e3bb5d10e4 WHIRLPOOL 865aaecbe331ec93b1a8c5b965c3edc43d35994c2db79d336febb27860ee91d68753d3ea274b4639f3e05d3f0a589fb21aedac33bc2120a4de8d094383d7b923
DIST sqlite-src-3120100.zip 9368459 SHA256 49b9819683f8f7329a78d2008e3f7c4e02126b556b95e5dfe3be102b9e741cff SHA512 6d0d7230343ca460215b5764d4a546631ddc2bcfc0777051379fb4632ccf9c36a53d26eda6811823156be166643c001c994a0f52498c6196ed13b34e931d55e1 WHIRLPOOL e41fd7a1ba870efb5421657975990c1d7e1ecc27023882771474a62e82b2ae305bc3d0b8556e0627de886d35e1b375fec223b3f70582d64fc5345c525b293131
DIST sqlite-src-3120200.zip 9370396 SHA256 2c16caa653e57f3c71873aa88797c97117981d6b0974254ce24d933dd27f9a86 SHA512 6cc9718c23ca3f65a42cc715eb67c8d174ecf0e397457efb6bfc5bd2efc9a51ea2f84266d31826068bf46efc550eb277b3c8e93cb85c5d23645e8b8ae4e2fc07 WHIRLPOOL ffdbbc384189f0d62a93ee8219051ff936b7c0c2fd39449f6ff72a734ab219f23f049648de7c0ec510a74aad85ba07ef0c8bebea4c3b83e043464744d2c039f4
DIST sqlite-src-3130000.zip 9506412 SHA256 b46b62dc27abbde52db69d8e2a710469b9af613ba251eb98e412d4f3827f915b SHA512 4cb7531105869ff7db5c08aa8e4d303fa3d80c8c67e21d9a835a09f7dddb4c9dbba837e2030dd4af6bcdb00a305b057cbd6430e11b3f2ae5e470f27b69b6c1e6 WHIRLPOOL 901f6cd343daaa62970f8d768e3c6ccb0b1da75fb5643b27e76f60d224005a08955fde9df5b8bb63250ab27994e2428ce19e21b4a1ccabec47cd4b8df4a13657
+DIST sqlite-src-3140100.zip 9574478 SHA256 9411f67f383256d8d1520bac727b9e96eed5494222d2f8af76548d233b0adc74 SHA512 055f5f7db4088f527750358e7e9575b248a48137db5b4720269206141518b2426370e3c02d46278f1b7abf0b2f491e1f536e78d6d051a00b4e79579810cc57a6 WHIRLPOOL 0b1884844b0cec05c4a830a453221d2390f396c913133e259d0bea2800949d57894a43f729f97b7955c91db7f6a24e56d71fe63286b6e5b952fa8e24726b3448
diff --git a/dev-db/sqlite/files/sqlite-3.14.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.14.0-full_tarball-build.patch
new file mode 100644
index 0000000..7ddb613
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.14.0-full_tarball-build.patch
@@ -0,0 +1,147 @@
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- Makefile.in
++++ Makefile.in
+@@ -559,6 +559,7 @@
+ #
+ SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
+ # SHELL_OPT += -DSQLITE_ENABLE_FTS5
++SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
+ SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+ SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+ FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
+@@ -581,25 +582,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- $(TOP)/src/shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ $(TOP)/src/shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -668,7 +669,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1094,13 +1095,13 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+
+ # Minimal testing that runs in less than 3 minutes
+ #
+@@ -1126,32 +1127,31 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
+ echo "#define TCLSH 2" > $@
+- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
+- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
++ cat $(TOP)/src/tclsqlite.c >> $@
+ echo "static const char *tclsh_main_loop(void){" >> $@
+ echo "static const char *zMainloop = " >> $@
+ $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
+ echo "; return zMainloop; }" >> $@
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1165,8 +1165,8 @@
+ speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+ loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
+--- configure.ac
++++ configure.ac
+@@ -584,6 +584,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/sqlite-3.14.1.ebuild b/dev-db/sqlite/sqlite-3.14.1.ebuild
new file mode 100644
index 0000000..9a00cfb
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.14.1.ebuild
@@ -0,0 +1,261 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_tarball() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_tarball; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_tarball; then
+ epatch "${FILESDIR}/${PN}-3.14.0-full_tarball-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ epatch "${FILESDIR}/${PN}-3.12.0-nonfull_tarball-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_tarball; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_tarball; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_tarball; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_tarball && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_tarball; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2016-11-10 18:19 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2016-11-10 18:19 UTC (permalink / raw
To: gentoo-commits
commit: 861d3e9ed122fbf939b6e3ef5f36dcc800f050b3
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Nov 10 18:05:56 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Nov 10 18:17:42 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=861d3e9e
dev-db/sqlite: Version bump (3.15.1).
dev-db/sqlite/Manifest | 3 +
.../sqlite-3.15.0-full_tarball-tests-icu.patch | 64 +++++
dev-db/sqlite/sqlite-3.15.1.ebuild | 262 +++++++++++++++++++++
3 files changed, 329 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 6ef0b6f..dc03dba 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -4,15 +4,18 @@ DIST sqlite-autoconf-3120200.tar.gz 2374804 SHA256 fd00770c9afd39db555c78400e52f
DIST sqlite-autoconf-3130000.tar.gz 2459805 SHA256 e2797026b3310c9d08bd472f6d430058c6dd139ff9d4e30289884ccd9744086b SHA512 c2547ff9a144c46829344058b4f8dcc5b8c9c823cbc667be2944dc7beecb9cc213858cc9ce302a763200278397d9a0fc6bb35c542028a124ef0980fedd574c2f WHIRLPOOL b9bcfb2eecf30719f7a673d569949b4e497c9682de08ca6f0ccc6c67a8f1541a51e88108bebde94a14802516b114c9f8cad83fbdbb130774b3082a8107657255
DIST sqlite-autoconf-3140100.tar.gz 2473610 SHA256 bc7182476900017becb81565ecea7775d46ab747a97281aa610f4f45881c47a6 SHA512 14d78eea1aef5bd143f942b88f01ef2c1ef58aeac6c0a10c0807761ac5301b71db7d787f82ba8215d804b80c115ee4800072d4aa86616d04d01aaf529e168461 WHIRLPOOL b43a9397b24b3cd6841bf5468d03d4ca10805c355df5afa6b0e69b6cf5d924f1e11e03b5b78549f9e21028d5a1ba2467707e84eb2e2955df21a59abd464dacb2
DIST sqlite-autoconf-3140200.tar.gz 2472940 SHA256 644f0c127f7d0cbe8765b9bbdf9ed09d6a2f2b9dfba48ddfd8ca0a42fdb5b3fc SHA512 02c5ca3073e29307f842af3305793dd6251d2ac43ce3f37b5b9402d6582a6bda56a41f82b130d03997ebb3cc109d6ab7baa9a946c03e74ae5158426bc154fd70 WHIRLPOOL c98f2b004838e5b767704248fdc5afd0428559155838240943861edd6e4a20121f81e24fca672cd8408c9c6907ef4e5d6c228c167ab7b3a0670b787420006377
+DIST sqlite-autoconf-3150100.tar.gz 2491350 SHA256 5dfa89b7697ee3c2ac7b44e8e157e7f204bf999c866afcaa8bb1c7ff656ae2c5 SHA512 516d683fb64a6a0ef170d718059420c9b0023bffd75780194d9c06fab1142a749700fafd83577c81dfc7a7a21eee955df9a879f8c2f818f542c7adb968daa0ed WHIRLPOOL 550a7a1e85860ab656ad78d7bfb61d859cc146343caf5b59009b29ee206a635725a0d65b261b08f4430192f064a01cc35a4088946275f4f239aa821622b8fd8c
DIST sqlite-doc-3120000.zip 5402611 SHA256 346d9d56a0193d9396948192b7eca9e45c2adfeea6bbf71df62502830da510f3 SHA512 7879d006e528d692ea5718f27d03e2dfe2a5e54aa135be983b992836102720df4dc690d84795115a25ed19a663e895a3f3f8a59d0de079c451d215e07081281e WHIRLPOOL 00f5bc4b82af1ba8d43ae4d0761dacd2e608009812a12fee9aedd333baec9b36f74542c60de4acacd19f5ef898d3bd57dfb705f3b21219ba3862ca91c2f76402
DIST sqlite-doc-3120100.zip 5410493 SHA256 dbe53c076922c711a467dde57432583fbf9a12eac57cb75f6116a310880eb088 SHA512 d0117618d97744255248b9160816203147ba2afdb0bea5fe02d5e464541e09bc9147189317c6f849cc56059d6ae96e3e4b2a30cd8d0bc7b0e1ecacb573cfcdd4 WHIRLPOOL e3f054eda83301b9e4b5170bf9c56895756e4ac78a1c6256467c990fafccaeadec5f7ca54f1bf118bcb950f25db63df6c0972a138d36a10a0a9cfdf688eb207b
DIST sqlite-doc-3120200.zip 5416790 SHA256 67c640c4b01b961016717db61e3e43c63c33248c78ce0de9f10b88ea7ce97670 SHA512 4ded937565b2d9b63ae55495d4b536bc0056e0d9aa7119ee54ddea127c42ba7de17986db7b85c172043fab1112132cbc126a102b248770fca6cde9a8fda438ae WHIRLPOOL 7eefecb6d0450c85ec3f30cdeb853117f4067e1bace7d3c0524e5c6cb13d2e31772211aec8562f972491da413d9bd79022bc29c16968b086562e7f17bff984eb
DIST sqlite-doc-3130000.zip 5550186 SHA256 510606a9cdd89814b2d44e7b7f284ebb0a58153e1800de6daadfab445190f79c SHA512 0bf4544a07bd92533bc248dc16ed43c4fcad870ab535591618d3006f38c2741a8c0ed1da082444ea1af2f57936575c678bc12b651252426b908660023b36cd39 WHIRLPOOL 78fd5de701224e39d07fbb03a9193dff45237845b215d83f27a623f289d9da0df7082d53115e90474856b775d350ee3f9d2970ca2c1a4a33b24543de06fd3b9a
DIST sqlite-doc-3140100.zip 5689913 SHA256 036203c71ca5796fd80b9d9d3bd710f698da3d5393d4df5c7cdf5468258c9ec6 SHA512 4a5292f6b6a117a0bf7ef8446c9748cde534d6a6f3a02a12fc4eb4cddcf1d11479bc4e2eebdb21866a1994143e02fd66b79a08b98acfdb3390689cbe425b0b6e WHIRLPOOL 4c82e3e950396504846a14d62c01a94c9063978b9aa42656adbb0219dbd6f89a4d7703ee2a4ed7265b7875f612f2b0869b098b09a2bfcafa01e7694dfaa57c06
DIST sqlite-doc-3140200.zip 5386739 SHA256 421d2ea3d288dd301ec98155a6765d6bc8ce93b9a3ae82bac56a21cdd91190c2 SHA512 4acd9818cc864332cbc57c9533d45c26d62f5c62ab9dff3f0fb1bb98530fe974f83699ccc0b098b14bcbfd718a2aa6b4d3b7c2ca880e4097d9b0833b8d902069 WHIRLPOOL b2593b17da42d41425d5579d36193945dc20d7bc11b271c0d94f005fef06352d3bf8b1c2963b9b811ba8f46190f35a9ea61080c09e765b28e9c7330ca613f3e6
+DIST sqlite-doc-3150100.zip 5461172 SHA256 121363c75da7f6c8988f70dfa5bed5f0f06b5c9d37b4e2230316c55a80760825 SHA512 fa58e69d74cc816e4541385ad0a62b1987eb1abf4cb325867500030b4fa8a5058a63133314aef685a2158e9171f98a557d555e99a13417bc7bf8240da7feda30 WHIRLPOOL 6eac94d6c71b28850592a9135a487d0d69a74c7d366f072d02f02de2091fe8169469b4ccba0605d555d10c5549cca6138d5938ad03dc5b453d3a342fb43d8101
DIST sqlite-src-3120000.zip 9367749 SHA256 d891e7ffd56cd97d069a6ed99d7e85cbe655b0a97ca6b5398c7806e888642df1 SHA512 9669e33e328b826f4692725ec09e21d85f4f2c386c624a81b0535f41ca7d2f996ebf5018db8ecdfdac18cff39a881a953111801499705dfb599f00e3bb5d10e4 WHIRLPOOL 865aaecbe331ec93b1a8c5b965c3edc43d35994c2db79d336febb27860ee91d68753d3ea274b4639f3e05d3f0a589fb21aedac33bc2120a4de8d094383d7b923
DIST sqlite-src-3120100.zip 9368459 SHA256 49b9819683f8f7329a78d2008e3f7c4e02126b556b95e5dfe3be102b9e741cff SHA512 6d0d7230343ca460215b5764d4a546631ddc2bcfc0777051379fb4632ccf9c36a53d26eda6811823156be166643c001c994a0f52498c6196ed13b34e931d55e1 WHIRLPOOL e41fd7a1ba870efb5421657975990c1d7e1ecc27023882771474a62e82b2ae305bc3d0b8556e0627de886d35e1b375fec223b3f70582d64fc5345c525b293131
DIST sqlite-src-3120200.zip 9370396 SHA256 2c16caa653e57f3c71873aa88797c97117981d6b0974254ce24d933dd27f9a86 SHA512 6cc9718c23ca3f65a42cc715eb67c8d174ecf0e397457efb6bfc5bd2efc9a51ea2f84266d31826068bf46efc550eb277b3c8e93cb85c5d23645e8b8ae4e2fc07 WHIRLPOOL ffdbbc384189f0d62a93ee8219051ff936b7c0c2fd39449f6ff72a734ab219f23f049648de7c0ec510a74aad85ba07ef0c8bebea4c3b83e043464744d2c039f4
DIST sqlite-src-3130000.zip 9506412 SHA256 b46b62dc27abbde52db69d8e2a710469b9af613ba251eb98e412d4f3827f915b SHA512 4cb7531105869ff7db5c08aa8e4d303fa3d80c8c67e21d9a835a09f7dddb4c9dbba837e2030dd4af6bcdb00a305b057cbd6430e11b3f2ae5e470f27b69b6c1e6 WHIRLPOOL 901f6cd343daaa62970f8d768e3c6ccb0b1da75fb5643b27e76f60d224005a08955fde9df5b8bb63250ab27994e2428ce19e21b4a1ccabec47cd4b8df4a13657
DIST sqlite-src-3140100.zip 9574478 SHA256 9411f67f383256d8d1520bac727b9e96eed5494222d2f8af76548d233b0adc74 SHA512 055f5f7db4088f527750358e7e9575b248a48137db5b4720269206141518b2426370e3c02d46278f1b7abf0b2f491e1f536e78d6d051a00b4e79579810cc57a6 WHIRLPOOL 0b1884844b0cec05c4a830a453221d2390f396c913133e259d0bea2800949d57894a43f729f97b7955c91db7f6a24e56d71fe63286b6e5b952fa8e24726b3448
DIST sqlite-src-3140200.zip 9577094 SHA256 52507e20c2757b24b703b43ede77ce464c8106c1658a5b357974c435aa0677a6 SHA512 d68412bceec463674790adb4388988dd4e1db40b095ba3f88cc3404979191930805b0a46603ef0b81ab41657167b3efa904535c0516170e2fc8c825a2729946c WHIRLPOOL 7084e7df53edf22de6fca51c0dbf12c16e3cb4b1ee62251e72a4a4820b6fdafee188654b2a3c5ecd2ae1054cf7f13b5e4dedad18eb94f307960c4a5d7cb3495c
+DIST sqlite-src-3150100.zip 9632944 SHA256 423a73936931c5148a4812ee7d82534ec7d998576ea1b4e1573af91ec15a4b01 SHA512 c659d52287b8f9ae86d327490feeb4dad824712c3827483688b72fd43e067139ec5434086cf02e9f8f375adf6967337ebdd6aa696698ed5936b27ece01cff8a6 WHIRLPOOL 8ae9b7c56e4a8c22c2dba1d9656f6735610a7b8b9cd12de6417f1c6cd77e1dc5341ace9aef68ed2813f7b7d43583190312c8097186f58bcd51237d73cc7def49
diff --git a/dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch b/dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch
new file mode 100644
index 00000000..7a979ae
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.15.0-full_tarball-tests-icu.patch
@@ -0,0 +1,64 @@
+https://www.sqlite.org/src/info/afbbb6c66a85ff3f
+
+--- ext/icu/icu.c
++++ ext/icu/icu.c
+@@ -500,20 +500,20 @@
+ void *pContext; /* sqlite3_user_data() context */
+ void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
+ } scalars[] = {
+- {"regexp", 2, SQLITE_ANY, 0, icuRegexpFunc},
++ {"regexp", 2, SQLITE_ANY|SQLITE_DETERMINISTIC, 0, icuRegexpFunc},
+
+- {"lower", 1, SQLITE_UTF16, 0, icuCaseFunc16},
+- {"lower", 2, SQLITE_UTF16, 0, icuCaseFunc16},
+- {"upper", 1, SQLITE_UTF16, (void*)1, icuCaseFunc16},
+- {"upper", 2, SQLITE_UTF16, (void*)1, icuCaseFunc16},
++ {"lower", 1, SQLITE_UTF16|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"lower", 2, SQLITE_UTF16|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"upper", 1, SQLITE_UTF16|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
++ {"upper", 2, SQLITE_UTF16|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
+
+- {"lower", 1, SQLITE_UTF8, 0, icuCaseFunc16},
+- {"lower", 2, SQLITE_UTF8, 0, icuCaseFunc16},
+- {"upper", 1, SQLITE_UTF8, (void*)1, icuCaseFunc16},
+- {"upper", 2, SQLITE_UTF8, (void*)1, icuCaseFunc16},
++ {"lower", 1, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"lower", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuCaseFunc16},
++ {"upper", 1, SQLITE_UTF8|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
++ {"upper", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, (void*)1, icuCaseFunc16},
+
+- {"like", 2, SQLITE_UTF8, 0, icuLikeFunc},
+- {"like", 3, SQLITE_UTF8, 0, icuLikeFunc},
++ {"like", 2, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuLikeFunc},
++ {"like", 3, SQLITE_UTF8|SQLITE_DETERMINISTIC, 0, icuLikeFunc},
+
+ {"icu_load_collation", 2, SQLITE_UTF8, (void*)db, icuLoadCollation},
+ };
+--- test/cursorhint2.test
++++ test/cursorhint2.test
+@@ -164,17 +164,19 @@
+ x2 {AND(EQ(c1,ADD(32,32)),EQ(c0,r[2]))}
+ }
+
+-do_extract_hints_test 2.11 {
+- SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE x2.b LIKE 'abc%'
+-} {
+- x2 {AND(expr,EQ(c0,r[2]))}
++ifcapable !icu {
++ # This test only works using the built-in LIKE, not the ICU LIKE extension.
++ do_extract_hints_test 2.11 {
++ SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE x2.b LIKE 'abc%'
++ } {
++ x2 {AND(expr,EQ(c0,r[2]))}
++ }
+ }
+
+-do_extract_hints_test 2.11 {
++do_extract_hints_test 2.12 {
+ SELECT * FROM x1 LEFT JOIN x2 ON (a=x) WHERE coalesce(x2.b, 1)
+ } {
+ x2 {EQ(c0,r[2])}
+ }
+
+ finish_test
+-
diff --git a/dev-db/sqlite/sqlite-3.15.1.ebuild b/dev-db/sqlite/sqlite-3.15.1.ebuild
new file mode 100644
index 00000000..a38cdb2
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.15.1.ebuild
@@ -0,0 +1,262 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2016/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2016/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2016/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_tarball() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_tarball; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_tarball; then
+ epatch "${FILESDIR}/${PN}-3.14.0-full_tarball-build.patch"
+ epatch "${FILESDIR}/${PN}-3.15.0-full_tarball-tests-icu.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ epatch "${FILESDIR}/${PN}-3.12.0-nonfull_tarball-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_tarball; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_tarball; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_tarball; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_tarball && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_tarball; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2017-04-04 19:50 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2017-04-04 19:50 UTC (permalink / raw
To: gentoo-commits
commit: 4486cd1d6599120e49ebe589f17b4312647a6239
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Apr 4 19:23:41 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Apr 4 19:50:06 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4486cd1d
dev-db/sqlite: Version bump (3.18.0).
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.18.0-full_tarball-build.patch | 158 +++++++++++++
dev-db/sqlite/sqlite-3.18.0.ebuild | 261 +++++++++++++++++++++
3 files changed, 422 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index e599eec48fb..1dd06bb5ced 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,6 +1,9 @@
DIST sqlite-autoconf-3160200.tar.gz 2508179 SHA256 65cc0c3e9366f50c0679c5ccd31432cea894bc4a3e8947dabab88c8693263615 SHA512 83bdd588504f265bbe93fb98a33a292aff5618c14f94d521c8557efbb5f777e82dfbb2d186cbfd4c628ee9522b1fcb73857e24ca2318fa34af3a3f9540e72b9a WHIRLPOOL 850a5051739f65eade0ee5740641a0503870f88d1ebdb40cab36b68d956896270ed59e387d57db74eede5ecd7fc9b3c14bc5841ff02e17eb50abc4701eba18fc
DIST sqlite-autoconf-3170000.tar.gz 2515143 SHA256 a4e485ad3a16e054765baf6371826b5000beed07e626510896069c0bf013874c SHA512 bebf2693ade1c99b6a178bbe663f64911bf7751932a2524506994cbbb19ab254e7febe3693a76084e55853c1ea85db9e4ece87192422583555fbe569915a2ca8 WHIRLPOOL c3ddeb9691470dfd10950ef36bca8f05f06faa171e3ee87da66d431ba364b7dd903b1350b8ab1aae445a2696ea56dd3f0c50e07d25bc83a09d673a9b92c84e3f
+DIST sqlite-autoconf-3180000.tar.gz 2533004 SHA256 3757612463976e7d08c5e9f0af3021613fc24bbcfe1c51197d6776b9ece9ac5c SHA512 4c2efda1d63d1849f7a351cc57c02cc1820efe3c19f88460a131a1d6ae4f7411e4b7672a5581055e581093df29f65cebd9ff5b24125c18802523b17477dce1ef WHIRLPOOL 5424d028af1649cedeb9192d86939753000bb94676b0578d5bdd33591ddd064f2e9ca60a1abc6e185a8fbbfd13c04361e7bfd82945b3b7c01073b8e79e985031
DIST sqlite-doc-3160200.zip 5521023 SHA256 c13ffbb6019f3849b251c22358f31ccb862a842c0a2379f552f2935600157dcb SHA512 b79d21074d1ab154e3b324fb2943f24321ad5cdbc6e2030f1d21940ae46538462af049e0e0cd7c6cf96dec2c59708eaf70aa4cb3c84ba1a0e87238ffcf31fca2 WHIRLPOOL 4d07279b8f186c4a015324021d60f3e76840594a35a2466cc023cd3ef32b5b01572d8a83db5d96f7281c617a8384485bdef60d390e1c12c4ecbc7e0223e1a194
DIST sqlite-doc-3170000.zip 5533032 SHA256 3102d9eab879074776216357e4c9e272f63d0cda975a0819ec5baba5e0922ff6 SHA512 6a7813be301416dc59401b7732733f44efad60b458ded0f4ed8d845aab0843a1123dd20d1e6f209dd32184a87bcd7e68e213e3676c43d1d05d2df5acc2c64b74 WHIRLPOOL dc1c9b6802985be34ac7819e08883c456a0a76fb1822eff46b26613760063b72888d34323cf15f0f48be69555c0b07b99424a85f29ac580c4ad8fa46b990b723
+DIST sqlite-doc-3180000.zip 5552381 SHA256 6f763eba9f51cb1096d1d40fbdd7ff974203060ddb892fc735adb2d7d42f1dad SHA512 7b65130cb2174d823842cddc912432d206044a8b276fdc2eef437854de7d0b05b8eb5d7aec0ead5c3f88bb7788ae5f1c42ffb1e43ab00774a68f6f7fea72d517 WHIRLPOOL be95f25105aea7f553145b371d64d1192057a2931551758bea418dd41b2ead6e9c07368347320bb041a59051c89ca2c84e3cd4e1f95806cad30dca3adec6042b
DIST sqlite-src-3160200.zip 10081950 SHA256 ee77c2cc5cc4a7b0a746a1d4496f7aee0d71c558a3bbfcf8e9e0b35416910337 SHA512 db49551c09830cf4d8997f0a623deeed9f85db5f27e6ca9d8aa5812a23c1466bbcdf8bb56cf009511f72cafec8f09a305127123f54d90437b28770dac34a0897 WHIRLPOOL b8cc52d5111bde34dae02391be8d83f9e703672b2101b36f5409e9acc23743c00561b02bd14b098e29972077fa1866a506d6343b58e4897ca07dac0bb60f4367
DIST sqlite-src-3170000.zip 10120844 SHA256 86754bee6bcaf1f2a6bf4a02676eb3a43d22d4e5d8339e217424cb2be6b748c3 SHA512 e60381de33fbf566507454e4f1dfb7d3ada554e5c919f05f0dd2f96a6f266adaa62681437f21fdea1c24de57fb6141b798f97854918faa189b507f12f11e0d36 WHIRLPOOL 535c598f7bb9ddbecdd1ca841c0ecf398831c494c99c38542d1cbb756d8333260d6891aa36167aeba75df83fbaf402465dc65c9b3a7fb6685fa54420cb1a1342
+DIST sqlite-src-3180000.zip 10166686 SHA256 eab4d137abd5aa1164244a5d558c9a02122071daf36984b236f8441d749b9ba6 SHA512 b82c5388066f2e905c067d75e890bf2ff03a522733b8c8e0ebdfffe1804d7ecb39b72f6d808fce59133ac8c645f8b6e163e3dff7bbb0d66bbe8748e069ca7a84 WHIRLPOOL b92890b587761dfd550b39fbd64c4fddaf58e495c0f2b7526a624c3415147494648add3fa6968a09411e73c9b0653ec541a49a34daeb7ad2ae4840e829528380
diff --git a/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch
new file mode 100644
index 00000000000..1278630c092
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch
@@ -0,0 +1,158 @@
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- Makefile.in
++++ Makefile.in
+@@ -562,6 +562,7 @@
+ #
+ SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
+ # SHELL_OPT += -DSQLITE_ENABLE_FTS5
++SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
+ SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+ SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+ FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
+@@ -587,25 +588,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- $(TOP)/src/shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ $(TOP)/src/shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -681,7 +682,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1107,13 +1108,13 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+
+ # The veryquick.test TCL tests.
+ #
+@@ -1143,36 +1144,35 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
+ echo "#define TCLSH 2" > $@
+- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
+- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
++ cat $(TOP)/src/tclsqlite.c >> $@
+ echo "static const char *tclsh_main_loop(void){" >> $@
+ echo "static const char *zMainloop = " >> $@
+ $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
+ echo "; return zMainloop; }" >> $@
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1191,11 +1191,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- configure.ac
++++ configure.ac
+@@ -584,6 +584,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/sqlite-3.18.0.ebuild b/dev-db/sqlite/sqlite-3.18.0.ebuild
new file mode 100644
index 00000000000..a607c0afbdc
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.18.0.ebuild
@@ -0,0 +1,261 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_tarball() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_tarball; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_tarball; then
+ eapply -p0 "${FILESDIR}/${PN}-3.18.0-full_tarball-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_tarball; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_tarball; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_tarball; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_tarball && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_tarball; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2017-08-04 18:39 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2017-08-04 18:39 UTC (permalink / raw
To: gentoo-commits
commit: bd050ef11f8be26ed1092007dd8d300ec676d53c
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Aug 4 17:39:24 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Aug 4 18:39:28 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd050ef1
dev-db/sqlite: Version bump (3.20.0).
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.20.0-full_tarball-build.patch | 158 +++++++++++++
dev-db/sqlite/sqlite-3.20.0.ebuild | 261 +++++++++++++++++++++
3 files changed, 422 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index b1c5c00e00a..6204f83c6e2 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -3,13 +3,16 @@ DIST sqlite-autoconf-3170000.tar.gz 2515143 SHA256 a4e485ad3a16e054765baf6371826
DIST sqlite-autoconf-3180000.tar.gz 2533004 SHA256 3757612463976e7d08c5e9f0af3021613fc24bbcfe1c51197d6776b9ece9ac5c SHA512 4c2efda1d63d1849f7a351cc57c02cc1820efe3c19f88460a131a1d6ae4f7411e4b7672a5581055e581093df29f65cebd9ff5b24125c18802523b17477dce1ef WHIRLPOOL 5424d028af1649cedeb9192d86939753000bb94676b0578d5bdd33591ddd064f2e9ca60a1abc6e185a8fbbfd13c04361e7bfd82945b3b7c01073b8e79e985031
DIST sqlite-autoconf-3190200.tar.gz 2542613 SHA256 ca5361fb01cc3ad63d6fd4eb2cb0b6398e629595896d3558f7e121d37dac2ffc SHA512 fc9fbb76a741a22d620902868d5db6c8954db8a2692c8e91080ab96f41b4e18a4d27aa8f549c8fac62aaf5ad20c908abd01ecc0fdf7204310bf0cb6d1a2e5e14 WHIRLPOOL 003b4600a4689d94b690f9122e749401371deb39e0a04ffcdf161fc72b8d89349a7e9cf9883d54064c23ea08a72cac190d1d14fb586349c528a033d72b139a84
DIST sqlite-autoconf-3190300.tar.gz 2542682 SHA256 06129c03dced9f87733a8cba408871bd60673b8f93b920ba8d815efab0a06301 SHA512 7896c99726da75818f1027d5675b24724bc89c738874c868868e60c09d4509ad5a6da93f54cfcecb3a1052e4f164f7cb864ede333b9ccfb4f6b811b052ca1d3d WHIRLPOOL 8881e2077a2f443e849e1c1bc4d824e8dfdf3f47f505288f00772e6f7f64b927ae8df0d2d63f240f8b344d729b8258c797073786d3ef75c40e668784c8a8f1c4
+DIST sqlite-autoconf-3200000.tar.gz 2565548 SHA256 3814c6f629ff93968b2b37a70497cfe98b366bf587a2261a56a5f750af6ae6a0 SHA512 f5b0ffcc27adeed5b27b29962d03defa167151868f2281c5642a8ddfa10ac8971aff22081a5b46bd36bcf664bd271975e80249ec403b73656658b33af084ec94 WHIRLPOOL dd63a903ccd05ba111e5b2aa23e55dba0400a979c26e88a238af9986b4c3c4f469f1a474d09c77bacebc3eb0f0aebd95910ce32e612c44bc49d2afbae5504fa0
DIST sqlite-doc-3160200.zip 5521023 SHA256 c13ffbb6019f3849b251c22358f31ccb862a842c0a2379f552f2935600157dcb SHA512 b79d21074d1ab154e3b324fb2943f24321ad5cdbc6e2030f1d21940ae46538462af049e0e0cd7c6cf96dec2c59708eaf70aa4cb3c84ba1a0e87238ffcf31fca2 WHIRLPOOL 4d07279b8f186c4a015324021d60f3e76840594a35a2466cc023cd3ef32b5b01572d8a83db5d96f7281c617a8384485bdef60d390e1c12c4ecbc7e0223e1a194
DIST sqlite-doc-3170000.zip 5533032 SHA256 3102d9eab879074776216357e4c9e272f63d0cda975a0819ec5baba5e0922ff6 SHA512 6a7813be301416dc59401b7732733f44efad60b458ded0f4ed8d845aab0843a1123dd20d1e6f209dd32184a87bcd7e68e213e3676c43d1d05d2df5acc2c64b74 WHIRLPOOL dc1c9b6802985be34ac7819e08883c456a0a76fb1822eff46b26613760063b72888d34323cf15f0f48be69555c0b07b99424a85f29ac580c4ad8fa46b990b723
DIST sqlite-doc-3180000.zip 5552381 SHA256 6f763eba9f51cb1096d1d40fbdd7ff974203060ddb892fc735adb2d7d42f1dad SHA512 7b65130cb2174d823842cddc912432d206044a8b276fdc2eef437854de7d0b05b8eb5d7aec0ead5c3f88bb7788ae5f1c42ffb1e43ab00774a68f6f7fea72d517 WHIRLPOOL be95f25105aea7f553145b371d64d1192057a2931551758bea418dd41b2ead6e9c07368347320bb041a59051c89ca2c84e3cd4e1f95806cad30dca3adec6042b
DIST sqlite-doc-3190200.zip 5577171 SHA256 0d136abeea8d045ab7acef64ce84028dacb418584fa5a259e7ab4233ef21ff46 SHA512 f81b8719a54cd5e7f993f3dbd76821fc39651ef20b12cfd19c6d58fcb948e7fa00aa97e2f25cab421ba85d27d10b12822a87d1ae49e33c004c83b8f68cbc781c WHIRLPOOL fd8d25184a1e291ea597d42ce76ce5959db8a974e90934e637851806021d054fdda0a37d33db159478158331d52024b8ad5de11410dad5eb595b590ddda1c657
DIST sqlite-doc-3190300.zip 5649351 SHA256 62cda70d5285e35144ddfd4629df8fadc2bae8dbcb43d0638aa874c1c03de101 SHA512 4f99b6797f76dab1859eaf4596c42d6b10a80a1ad9dcb33b82fcc4ef80a8e8299ac24c0d2a0f41debf9e82d43c9ecf9675547eb6163756f29afe847613ef75f3 WHIRLPOOL 4c259efcccca513a55150a349410a9c05cd2faa84a41a2f70f9c9311e3cb24d9e028bb2061a03c4dc6dfebfa3ff7738b571c7bd961b0f4aff5b329183b5e9d7b
+DIST sqlite-doc-3200000.zip 5695366 SHA256 5b7a4dc411937f33f17a8b0b7cb490d5e718fe37a751ee772d8989c23745f394 SHA512 0dfa9487c5e4084a9c17e8bf83a92b9a2cd53642efeff0b12051ecdeaf11e3896031f1b4d59021354a293b8acc8c6fcab827961721fda7a5de8415460d3bd280 WHIRLPOOL cd83788e4c054231b3050c54799781b38344d7bec006e640a489276678146f25ab55ee0bc82fc031e5cab39c92c09877d7ce55af90089691e0d09dac37fbbf19
DIST sqlite-src-3160200.zip 10081950 SHA256 ee77c2cc5cc4a7b0a746a1d4496f7aee0d71c558a3bbfcf8e9e0b35416910337 SHA512 db49551c09830cf4d8997f0a623deeed9f85db5f27e6ca9d8aa5812a23c1466bbcdf8bb56cf009511f72cafec8f09a305127123f54d90437b28770dac34a0897 WHIRLPOOL b8cc52d5111bde34dae02391be8d83f9e703672b2101b36f5409e9acc23743c00561b02bd14b098e29972077fa1866a506d6343b58e4897ca07dac0bb60f4367
DIST sqlite-src-3170000.zip 10120844 SHA256 86754bee6bcaf1f2a6bf4a02676eb3a43d22d4e5d8339e217424cb2be6b748c3 SHA512 e60381de33fbf566507454e4f1dfb7d3ada554e5c919f05f0dd2f96a6f266adaa62681437f21fdea1c24de57fb6141b798f97854918faa189b507f12f11e0d36 WHIRLPOOL 535c598f7bb9ddbecdd1ca841c0ecf398831c494c99c38542d1cbb756d8333260d6891aa36167aeba75df83fbaf402465dc65c9b3a7fb6685fa54420cb1a1342
DIST sqlite-src-3180000.zip 10166686 SHA256 eab4d137abd5aa1164244a5d558c9a02122071daf36984b236f8441d749b9ba6 SHA512 b82c5388066f2e905c067d75e890bf2ff03a522733b8c8e0ebdfffe1804d7ecb39b72f6d808fce59133ac8c645f8b6e163e3dff7bbb0d66bbe8748e069ca7a84 WHIRLPOOL b92890b587761dfd550b39fbd64c4fddaf58e495c0f2b7526a624c3415147494648add3fa6968a09411e73c9b0653ec541a49a34daeb7ad2ae4840e829528380
DIST sqlite-src-3190200.zip 10193843 SHA256 899c370b162a3b1febc644be5363433789a629bd07f5f80231defb5603d1abc1 SHA512 026b97bfc73b6ecf4c48b344a13adfb1c484d76a4fe78fd06bc4d175bb516c324483c6a647eaffc989469b3134c1874a1869b2d6a7d4112e685d75317992deb1 WHIRLPOOL 8af9215bfb2e2c2b418ff19f5e6a31d9ce68c47a3ec5d31fa2747e6de1936a32844fa6d500d876f77038a50dd332d73740594a2a7a9141eff32bc5bf523c5966
DIST sqlite-src-3190300.zip 10193997 SHA256 5595bbf59e7bb6bb43a6e816b9dd2ee74369c6ae3cd60284e24d5f7957286120 SHA512 514c3de6346bdea359036a79c880133f0eeed4cdfc9e811d662dc343f91ea43edda0f9760405a48e7f61ea1dd3478980cc7d3b5409ef27adcb5311a06e36297e WHIRLPOOL 14491a9f14b7f180781ea78010783709e0539b970d0fadec10a3e0afd9fdda8d417dd14811ad10f98b9b8ec5cb491422bc4e9ebad7720a1733fef11e759908c7
+DIST sqlite-src-3200000.zip 10575632 SHA256 4b358e77a85d128651e504aaf548253ffe10d5d399aaef5a6e34f29262614bee SHA512 40fe7972902d041f012c7739c8712aa40069aebc7be680fde8f43b33fed885bfc42331bfb7200651486484edb71cbdd77ddb9c119d0847bdfb0e92063090f029 WHIRLPOOL e64cefd85a78402a40abe647c001cf280fe8469da99a03b776ba12bbf19fd372506430b4f9d1b507617dff3d3adf74ea177a2238e006d6b85e39e67c60ce6a03
diff --git a/dev-db/sqlite/files/sqlite-3.20.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.20.0-full_tarball-build.patch
new file mode 100644
index 00000000000..cc95be3ee60
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.20.0-full_tarball-build.patch
@@ -0,0 +1,158 @@
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- Makefile.in
++++ Makefile.in
+@@ -565,6 +565,7 @@
+ #
+ SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
+ # SHELL_OPT += -DSQLITE_ENABLE_FTS5
++SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
+ SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+ SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+ SHELL_OPT += -DSQLITE_ENABLE_STMTVTAB
+@@ -591,25 +592,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- $(TOP)/src/shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ $(TOP)/src/shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -685,7 +686,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1115,13 +1116,13 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+
+ # The veryquick.test TCL tests.
+ #
+@@ -1151,36 +1152,35 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
+ echo "#define TCLSH 2" > $@
+- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
+- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
++ cat $(TOP)/src/tclsqlite.c >> $@
+ echo "static const char *tclsh_main_loop(void){" >> $@
+ echo "static const char *zMainloop = " >> $@
+ $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
+ echo "; return zMainloop; }" >> $@
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1199,11 +1199,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- configure.ac
++++ configure.ac
+@@ -584,6 +584,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/sqlite-3.20.0.ebuild b/dev-db/sqlite/sqlite-3.20.0.ebuild
new file mode 100644
index 00000000000..931807da09c
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.20.0.ebuild
@@ -0,0 +1,261 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_tarball() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_tarball; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_tarball; then
+ eapply -p0 "${FILESDIR}/${PN}-3.20.0-full_tarball-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_tarball; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_tarball; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_tarball; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_tarball && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_tarball; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2017-09-28 17:18 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2017-09-28 17:18 UTC (permalink / raw
To: gentoo-commits
commit: 339ebb6495f1bd6f9baf0293f7a6e2ae938eea47
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Sep 28 15:34:57 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Sep 28 17:10:59 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=339ebb64
dev-db/sqlite: Fix tests on big-endian architectures (bug #630818).
...lite-3.20.1-full_tarball-tests-big-endian.patch | 95 ++++++++++++++++++++++
dev-db/sqlite/sqlite-3.20.1-r1.ebuild | 1 +
2 files changed, 96 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch
new file mode 100644
index 00000000000..427021d2f7b
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.20.1-full_tarball-tests-big-endian.patch
@@ -0,0 +1,95 @@
+https://www.sqlite.org/src/info/87ccdf9cbb928455
+
+--- test/fts3conf.test
++++ test/fts3conf.test
+@@ -136,47 +136,49 @@
+ do_execsql_test 2.2.3 { SELECT * FROM t1 } {{a b c} {a b c}}
+ fts3_integrity 2.2.4 db t1
+
+-do_execsql_test 3.1 {
+- CREATE VIRTUAL TABLE t3 USING fts4;
+- REPLACE INTO t3(docid, content) VALUES (1, 'one two');
+- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
+-} {X'0100000002000000'}
+-
+-do_execsql_test 3.2 {
+- REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
+- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
+-} {X'0200000003000000'}
+-
+-do_execsql_test 3.3 {
+- REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
+- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
+-} {X'0200000005000000'}
+-
+-do_execsql_test 3.4 {
+- UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
+- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
+-} {X'0100000006000000'}
+-
+-do_execsql_test 3.5 {
+- UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
+- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
+-} {X'0100000006000000'}
+-
+-do_execsql_test 3.6 {
+- REPLACE INTO t3(docid, content) VALUES (3, 'one two');
+- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
+-} {X'0100000002000000'}
+-
+-do_execsql_test 3.7 {
+- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four');
+- REPLACE INTO t3(docid, content) VALUES (NULL, 'one two three four five six');
+- SELECT docid FROM t3;
+-} {3 4 5}
+-
+-do_execsql_test 3.8 {
+- UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
+- SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
+-} {X'0200000002000000'}
++if {$tcl_platform(byteOrder)=="littleEndian"} {
++ do_execsql_test 3.1 {
++ CREATE VIRTUAL TABLE t3 USING fts4;
++ REPLACE INTO t3(docid, content) VALUES (1, 'one two');
++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
++ } {X'0100000002000000'}
++
++ do_execsql_test 3.2 {
++ REPLACE INTO t3(docid, content) VALUES (2, 'one two three four');
++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'four'
++ } {X'0200000003000000'}
++
++ do_execsql_test 3.3 {
++ REPLACE INTO t3(docid, content) VALUES (1, 'one two three four five six');
++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
++ } {X'0200000005000000'}
++
++ do_execsql_test 3.4 {
++ UPDATE OR REPLACE t3 SET docid = 2 WHERE docid=1;
++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
++ } {X'0100000006000000'}
++
++ do_execsql_test 3.5 {
++ UPDATE OR REPLACE t3 SET docid = 3 WHERE docid=2;
++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'six'
++ } {X'0100000006000000'}
++
++ do_execsql_test 3.6 {
++ REPLACE INTO t3(docid, content) VALUES (3, 'one two');
++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
++ } {X'0100000002000000'}
++
++ do_execsql_test 3.7 {
++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four');
++ REPLACE INTO t3(docid, content) VALUES(NULL,'one two three four five six');
++ SELECT docid FROM t3;
++ } {3 4 5}
++
++ do_execsql_test 3.8 {
++ UPDATE OR REPLACE t3 SET docid = 5, content='three four' WHERE docid = 4;
++ SELECT quote(matchinfo(t3, 'na')) FROM t3 WHERE t3 MATCH 'one'
++ } {X'0200000002000000'}
++}
+
+ #-------------------------------------------------------------------------
+ # Test that the xSavepoint is invoked correctly if the first write
diff --git a/dev-db/sqlite/sqlite-3.20.1-r1.ebuild b/dev-db/sqlite/sqlite-3.20.1-r1.ebuild
index 7b6ce7814c0..137b7b0eeb2 100644
--- a/dev-db/sqlite/sqlite-3.20.1-r1.ebuild
+++ b/dev-db/sqlite/sqlite-3.20.1-r1.ebuild
@@ -51,6 +51,7 @@ src_prepare() {
if full_tarball; then
eapply -p0 "${FILESDIR}/${PN}-3.20.0-full_tarball-build.patch"
eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-csv-unsigned_char.patch"
+ eapply -p0 "${FILESDIR}/${PN}-3.20.1-full_tarball-tests-big-endian.patch"
eapply_user
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2017-11-01 20:54 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2017-11-01 20:54 UTC (permalink / raw
To: gentoo-commits
commit: 018c209ae045ecd50b506b3e68e4192cc30a1fcf
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Nov 1 07:16:05 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Nov 1 20:54:13 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=018c209a
dev-db/sqlite: Version bump (3.21.0).
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.21.0-full_archive-build.patch | 153 +++++++++++
.../sqlite-3.21.0-nonfull_archive-build.patch | 14 +
dev-db/sqlite/sqlite-3.21.0.ebuild | 284 +++++++++++++++++++++
4 files changed, 454 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index f058a4057d7..b0577145a91 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -5,6 +5,7 @@ DIST sqlite-autoconf-3190200.tar.gz 2542613 SHA256 ca5361fb01cc3ad63d6fd4eb2cb0b
DIST sqlite-autoconf-3190300.tar.gz 2542682 SHA256 06129c03dced9f87733a8cba408871bd60673b8f93b920ba8d815efab0a06301 SHA512 7896c99726da75818f1027d5675b24724bc89c738874c868868e60c09d4509ad5a6da93f54cfcecb3a1052e4f164f7cb864ede333b9ccfb4f6b811b052ca1d3d WHIRLPOOL 8881e2077a2f443e849e1c1bc4d824e8dfdf3f47f505288f00772e6f7f64b927ae8df0d2d63f240f8b344d729b8258c797073786d3ef75c40e668784c8a8f1c4
DIST sqlite-autoconf-3200000.tar.gz 2565548 SHA256 3814c6f629ff93968b2b37a70497cfe98b366bf587a2261a56a5f750af6ae6a0 SHA512 f5b0ffcc27adeed5b27b29962d03defa167151868f2281c5642a8ddfa10ac8971aff22081a5b46bd36bcf664bd271975e80249ec403b73656658b33af084ec94 WHIRLPOOL dd63a903ccd05ba111e5b2aa23e55dba0400a979c26e88a238af9986b4c3c4f469f1a474d09c77bacebc3eb0f0aebd95910ce32e612c44bc49d2afbae5504fa0
DIST sqlite-autoconf-3200100.tar.gz 2565638 SHA256 ec66595b29bc0798b023a5122021ea646ab4fa9e2f735937c5426feeba950742 SHA512 56e3d326ea2225cadc628c3518d46d9f7c4bafa0e3612f2b7ab0dc0d79fcbb7e095f6d84a9a48e1c6d83adcdc8706ad5ac4404f0f622c7fe38cfde3a7e7e69f0 WHIRLPOOL 9b1f5ae9861ca526a0f01c5981b0dca7a1e633f25d8713a3263e496690f3c7098eff7babae23ba65ace3ef18f56b1c1d0e64311063f22f788c8a489ca2673e26
+DIST sqlite-autoconf-3210000.tar.gz 2568942 SHA256 d7dd516775005ad87a57f428b6f86afd206cb341722927f104d3f0cf65fbbbe3 SHA512 8f00708965eacef171620c49538f75768d350ec3f2bfef412a5c70af865ab03b6a64ce1e65d9fdb3d66f4d00262a30fc162b01fd69f63c05c14d5243374b6298 WHIRLPOOL 1521c6670fd0d87298cbf931e6a729f09891901007e2d4ba50406c923f20366a3ae679f669c56bf742945d0816f2af162f1a808a435573125eb549f79b773462
DIST sqlite-doc-3160200.zip 5521023 SHA256 c13ffbb6019f3849b251c22358f31ccb862a842c0a2379f552f2935600157dcb SHA512 b79d21074d1ab154e3b324fb2943f24321ad5cdbc6e2030f1d21940ae46538462af049e0e0cd7c6cf96dec2c59708eaf70aa4cb3c84ba1a0e87238ffcf31fca2 WHIRLPOOL 4d07279b8f186c4a015324021d60f3e76840594a35a2466cc023cd3ef32b5b01572d8a83db5d96f7281c617a8384485bdef60d390e1c12c4ecbc7e0223e1a194
DIST sqlite-doc-3170000.zip 5533032 SHA256 3102d9eab879074776216357e4c9e272f63d0cda975a0819ec5baba5e0922ff6 SHA512 6a7813be301416dc59401b7732733f44efad60b458ded0f4ed8d845aab0843a1123dd20d1e6f209dd32184a87bcd7e68e213e3676c43d1d05d2df5acc2c64b74 WHIRLPOOL dc1c9b6802985be34ac7819e08883c456a0a76fb1822eff46b26613760063b72888d34323cf15f0f48be69555c0b07b99424a85f29ac580c4ad8fa46b990b723
DIST sqlite-doc-3180000.zip 5552381 SHA256 6f763eba9f51cb1096d1d40fbdd7ff974203060ddb892fc735adb2d7d42f1dad SHA512 7b65130cb2174d823842cddc912432d206044a8b276fdc2eef437854de7d0b05b8eb5d7aec0ead5c3f88bb7788ae5f1c42ffb1e43ab00774a68f6f7fea72d517 WHIRLPOOL be95f25105aea7f553145b371d64d1192057a2931551758bea418dd41b2ead6e9c07368347320bb041a59051c89ca2c84e3cd4e1f95806cad30dca3adec6042b
@@ -12,6 +13,7 @@ DIST sqlite-doc-3190200.zip 5577171 SHA256 0d136abeea8d045ab7acef64ce84028dacb41
DIST sqlite-doc-3190300.zip 5649351 SHA256 62cda70d5285e35144ddfd4629df8fadc2bae8dbcb43d0638aa874c1c03de101 SHA512 4f99b6797f76dab1859eaf4596c42d6b10a80a1ad9dcb33b82fcc4ef80a8e8299ac24c0d2a0f41debf9e82d43c9ecf9675547eb6163756f29afe847613ef75f3 WHIRLPOOL 4c259efcccca513a55150a349410a9c05cd2faa84a41a2f70f9c9311e3cb24d9e028bb2061a03c4dc6dfebfa3ff7738b571c7bd961b0f4aff5b329183b5e9d7b
DIST sqlite-doc-3200000.zip 5695366 SHA256 5b7a4dc411937f33f17a8b0b7cb490d5e718fe37a751ee772d8989c23745f394 SHA512 0dfa9487c5e4084a9c17e8bf83a92b9a2cd53642efeff0b12051ecdeaf11e3896031f1b4d59021354a293b8acc8c6fcab827961721fda7a5de8415460d3bd280 WHIRLPOOL cd83788e4c054231b3050c54799781b38344d7bec006e640a489276678146f25ab55ee0bc82fc031e5cab39c92c09877d7ce55af90089691e0d09dac37fbbf19
DIST sqlite-doc-3200100.zip 5759028 SHA256 0caf410e604411fd925c699d5fcb1d846f9297cdf2e18251eceb3e5708301e85 SHA512 518ca59644cecfcd67f511268112e421c5d7bbd77ef1e33304bf306ef110becf1e2a7fe37c506ec6892edb9d5c6ee77657b374c2e061f49890d18af062dea2b3 WHIRLPOOL ba78e9c6cdac90937dd4b39bbf14d78f309b391908ed22f13e9068da66ff6d191d7ade5deaae43d1636342b2ed9f45e34e0c4312c7a15557b4a36b7ed5ba3098
+DIST sqlite-doc-3210000.zip 5800635 SHA256 78c2fc9b144b168c7df53ff192c84fa7c29bcc44324b48b0f809a13810bc6c36 SHA512 799c7279166b489d1a5acc9410808c2d4b78e64037fc15b60764180fe1c698f35e27e86793140302f560cfa583baa2c33e416d5c9e1842ec58c6cb6093729334 WHIRLPOOL 07fd680e5573ca68eec31208bf52d096df1a20aa5b3bb69cc98f1c017d3772dfb48706ac10e9f9a70990467d4177fb32e751692e72f9c33883d76d770d55d0a4
DIST sqlite-src-3160200.zip 10081950 SHA256 ee77c2cc5cc4a7b0a746a1d4496f7aee0d71c558a3bbfcf8e9e0b35416910337 SHA512 db49551c09830cf4d8997f0a623deeed9f85db5f27e6ca9d8aa5812a23c1466bbcdf8bb56cf009511f72cafec8f09a305127123f54d90437b28770dac34a0897 WHIRLPOOL b8cc52d5111bde34dae02391be8d83f9e703672b2101b36f5409e9acc23743c00561b02bd14b098e29972077fa1866a506d6343b58e4897ca07dac0bb60f4367
DIST sqlite-src-3170000.zip 10120844 SHA256 86754bee6bcaf1f2a6bf4a02676eb3a43d22d4e5d8339e217424cb2be6b748c3 SHA512 e60381de33fbf566507454e4f1dfb7d3ada554e5c919f05f0dd2f96a6f266adaa62681437f21fdea1c24de57fb6141b798f97854918faa189b507f12f11e0d36 WHIRLPOOL 535c598f7bb9ddbecdd1ca841c0ecf398831c494c99c38542d1cbb756d8333260d6891aa36167aeba75df83fbaf402465dc65c9b3a7fb6685fa54420cb1a1342
DIST sqlite-src-3180000.zip 10166686 SHA256 eab4d137abd5aa1164244a5d558c9a02122071daf36984b236f8441d749b9ba6 SHA512 b82c5388066f2e905c067d75e890bf2ff03a522733b8c8e0ebdfffe1804d7ecb39b72f6d808fce59133ac8c645f8b6e163e3dff7bbb0d66bbe8748e069ca7a84 WHIRLPOOL b92890b587761dfd550b39fbd64c4fddaf58e495c0f2b7526a624c3415147494648add3fa6968a09411e73c9b0653ec541a49a34daeb7ad2ae4840e829528380
@@ -19,3 +21,4 @@ DIST sqlite-src-3190200.zip 10193843 SHA256 899c370b162a3b1febc644be5363433789a6
DIST sqlite-src-3190300.zip 10193997 SHA256 5595bbf59e7bb6bb43a6e816b9dd2ee74369c6ae3cd60284e24d5f7957286120 SHA512 514c3de6346bdea359036a79c880133f0eeed4cdfc9e811d662dc343f91ea43edda0f9760405a48e7f61ea1dd3478980cc7d3b5409ef27adcb5311a06e36297e WHIRLPOOL 14491a9f14b7f180781ea78010783709e0539b970d0fadec10a3e0afd9fdda8d417dd14811ad10f98b9b8ec5cb491422bc4e9ebad7720a1733fef11e759908c7
DIST sqlite-src-3200000.zip 10575632 SHA256 4b358e77a85d128651e504aaf548253ffe10d5d399aaef5a6e34f29262614bee SHA512 40fe7972902d041f012c7739c8712aa40069aebc7be680fde8f43b33fed885bfc42331bfb7200651486484edb71cbdd77ddb9c119d0847bdfb0e92063090f029 WHIRLPOOL e64cefd85a78402a40abe647c001cf280fe8469da99a03b776ba12bbf19fd372506430b4f9d1b507617dff3d3adf74ea177a2238e006d6b85e39e67c60ce6a03
DIST sqlite-src-3200100.zip 10575637 SHA256 665bcae19f313c974e3fc2e375b93521c3668d79bc7b66250c24a4a4aeaa2c2a SHA512 845a0d64c9356aadf178c04dd716bbd37a7353526b06cfa8e8f65653cf6a1893a5c5e8c78d20b43910c34d9167272cf517749c91ed0ba7686977e3d0327e8939 WHIRLPOOL cfba088bc57f387e665642df2c4050edeaa3802c8c684dcdaa882c608650afb32de3c9877e518d2b1689e26eafb2e693de7d0edc3ce7ce49b0bcf4537954972d
+DIST sqlite-src-3210000.zip 10577695 SHA256 8681a34e059b30605f611ac85168ca54edbade50c71468b5882f5abbcd66b94e SHA512 3a054422da80d750fd5ab297f9d2728f4e7b55fa790a72d55da8c381835571992d56b349e50d4680b04c9e2e44d6fa83009c2df3ffa045f43ff9059bb8736894 WHIRLPOOL 190c3870efa7c951d2d3abfd938c2b811ccabf73572a885d744059388496cc4ee073b7ca883d4874b3aba20c6ee10df627cd0579c7a448c52ba0568a06b6cee9
diff --git a/dev-db/sqlite/files/sqlite-3.21.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.21.0-full_archive-build.patch
new file mode 100644
index 00000000000..dfc01c88b56
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.21.0-full_archive-build.patch
@@ -0,0 +1,153 @@
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -600,25 +600,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -694,7 +694,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1145,13 +1145,13 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+
+ # The veryquick.test TCL tests.
+ #
+@@ -1181,30 +1181,30 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1223,11 +1223,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -584,6 +584,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,7 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-INCLUDE sqlite3.c
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
diff --git a/dev-db/sqlite/files/sqlite-3.21.0-nonfull_archive-build.patch b/dev-db/sqlite/files/sqlite-3.21.0-nonfull_archive-build.patch
new file mode 100644
index 00000000000..06ea8b29053
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.21.0-nonfull_archive-build.patch
@@ -0,0 +1,14 @@
+Fix building with dlopen() not available.
+
+--- /configure.ac
++++ /configure.ac
+@@ -102,6 +102,9 @@
+ [], [enable_dynamic_extensions=yes])
+ if test x"$enable_dynamic_extensions" != "xno"; then
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
++ fi
+ else
+ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1
+ fi
diff --git a/dev-db/sqlite/sqlite-3.21.0.ebuild b/dev-db/sqlite/sqlite-3.21.0.ebuild
new file mode 100644
index 00000000000..59ef4346af9
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.21.0.ebuild
@@ -0,0 +1,284 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.21.0-full_archive-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+
+ # https://sqlite.org/src/info/bf09fa683ea42b75
+ sed -e "s:cp tsrc/shell\.c tsrc/sqlite3ext\.h \.:cp tsrc/sqlite3ext.h .:" -i Makefile.in || die "sed failed"
+ else
+ eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2017-11-01 20:54 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2017-11-01 20:54 UTC (permalink / raw
To: gentoo-commits
commit: 72a4bd5bf80d1210ba1430a8893373b772e3869a
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Nov 1 07:22:55 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Nov 1 20:54:15 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72a4bd5b
dev-db/sqlite: Delete old versions (<3.19.3).
dev-db/sqlite/Manifest | 12 -
.../files/sqlite-3.16.0-full_tarball-build.patch | 147 ------------
dev-db/sqlite/sqlite-3.16.2.ebuild | 260 --------------------
dev-db/sqlite/sqlite-3.17.0.ebuild | 260 --------------------
dev-db/sqlite/sqlite-3.18.0.ebuild | 261 --------------------
dev-db/sqlite/sqlite-3.19.2.ebuild | 265 ---------------------
6 files changed, 1205 deletions(-)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index b0577145a91..47c5c350200 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,23 +1,11 @@
-DIST sqlite-autoconf-3160200.tar.gz 2508179 SHA256 65cc0c3e9366f50c0679c5ccd31432cea894bc4a3e8947dabab88c8693263615 SHA512 83bdd588504f265bbe93fb98a33a292aff5618c14f94d521c8557efbb5f777e82dfbb2d186cbfd4c628ee9522b1fcb73857e24ca2318fa34af3a3f9540e72b9a WHIRLPOOL 850a5051739f65eade0ee5740641a0503870f88d1ebdb40cab36b68d956896270ed59e387d57db74eede5ecd7fc9b3c14bc5841ff02e17eb50abc4701eba18fc
-DIST sqlite-autoconf-3170000.tar.gz 2515143 SHA256 a4e485ad3a16e054765baf6371826b5000beed07e626510896069c0bf013874c SHA512 bebf2693ade1c99b6a178bbe663f64911bf7751932a2524506994cbbb19ab254e7febe3693a76084e55853c1ea85db9e4ece87192422583555fbe569915a2ca8 WHIRLPOOL c3ddeb9691470dfd10950ef36bca8f05f06faa171e3ee87da66d431ba364b7dd903b1350b8ab1aae445a2696ea56dd3f0c50e07d25bc83a09d673a9b92c84e3f
-DIST sqlite-autoconf-3180000.tar.gz 2533004 SHA256 3757612463976e7d08c5e9f0af3021613fc24bbcfe1c51197d6776b9ece9ac5c SHA512 4c2efda1d63d1849f7a351cc57c02cc1820efe3c19f88460a131a1d6ae4f7411e4b7672a5581055e581093df29f65cebd9ff5b24125c18802523b17477dce1ef WHIRLPOOL 5424d028af1649cedeb9192d86939753000bb94676b0578d5bdd33591ddd064f2e9ca60a1abc6e185a8fbbfd13c04361e7bfd82945b3b7c01073b8e79e985031
-DIST sqlite-autoconf-3190200.tar.gz 2542613 SHA256 ca5361fb01cc3ad63d6fd4eb2cb0b6398e629595896d3558f7e121d37dac2ffc SHA512 fc9fbb76a741a22d620902868d5db6c8954db8a2692c8e91080ab96f41b4e18a4d27aa8f549c8fac62aaf5ad20c908abd01ecc0fdf7204310bf0cb6d1a2e5e14 WHIRLPOOL 003b4600a4689d94b690f9122e749401371deb39e0a04ffcdf161fc72b8d89349a7e9cf9883d54064c23ea08a72cac190d1d14fb586349c528a033d72b139a84
DIST sqlite-autoconf-3190300.tar.gz 2542682 SHA256 06129c03dced9f87733a8cba408871bd60673b8f93b920ba8d815efab0a06301 SHA512 7896c99726da75818f1027d5675b24724bc89c738874c868868e60c09d4509ad5a6da93f54cfcecb3a1052e4f164f7cb864ede333b9ccfb4f6b811b052ca1d3d WHIRLPOOL 8881e2077a2f443e849e1c1bc4d824e8dfdf3f47f505288f00772e6f7f64b927ae8df0d2d63f240f8b344d729b8258c797073786d3ef75c40e668784c8a8f1c4
DIST sqlite-autoconf-3200000.tar.gz 2565548 SHA256 3814c6f629ff93968b2b37a70497cfe98b366bf587a2261a56a5f750af6ae6a0 SHA512 f5b0ffcc27adeed5b27b29962d03defa167151868f2281c5642a8ddfa10ac8971aff22081a5b46bd36bcf664bd271975e80249ec403b73656658b33af084ec94 WHIRLPOOL dd63a903ccd05ba111e5b2aa23e55dba0400a979c26e88a238af9986b4c3c4f469f1a474d09c77bacebc3eb0f0aebd95910ce32e612c44bc49d2afbae5504fa0
DIST sqlite-autoconf-3200100.tar.gz 2565638 SHA256 ec66595b29bc0798b023a5122021ea646ab4fa9e2f735937c5426feeba950742 SHA512 56e3d326ea2225cadc628c3518d46d9f7c4bafa0e3612f2b7ab0dc0d79fcbb7e095f6d84a9a48e1c6d83adcdc8706ad5ac4404f0f622c7fe38cfde3a7e7e69f0 WHIRLPOOL 9b1f5ae9861ca526a0f01c5981b0dca7a1e633f25d8713a3263e496690f3c7098eff7babae23ba65ace3ef18f56b1c1d0e64311063f22f788c8a489ca2673e26
DIST sqlite-autoconf-3210000.tar.gz 2568942 SHA256 d7dd516775005ad87a57f428b6f86afd206cb341722927f104d3f0cf65fbbbe3 SHA512 8f00708965eacef171620c49538f75768d350ec3f2bfef412a5c70af865ab03b6a64ce1e65d9fdb3d66f4d00262a30fc162b01fd69f63c05c14d5243374b6298 WHIRLPOOL 1521c6670fd0d87298cbf931e6a729f09891901007e2d4ba50406c923f20366a3ae679f669c56bf742945d0816f2af162f1a808a435573125eb549f79b773462
-DIST sqlite-doc-3160200.zip 5521023 SHA256 c13ffbb6019f3849b251c22358f31ccb862a842c0a2379f552f2935600157dcb SHA512 b79d21074d1ab154e3b324fb2943f24321ad5cdbc6e2030f1d21940ae46538462af049e0e0cd7c6cf96dec2c59708eaf70aa4cb3c84ba1a0e87238ffcf31fca2 WHIRLPOOL 4d07279b8f186c4a015324021d60f3e76840594a35a2466cc023cd3ef32b5b01572d8a83db5d96f7281c617a8384485bdef60d390e1c12c4ecbc7e0223e1a194
-DIST sqlite-doc-3170000.zip 5533032 SHA256 3102d9eab879074776216357e4c9e272f63d0cda975a0819ec5baba5e0922ff6 SHA512 6a7813be301416dc59401b7732733f44efad60b458ded0f4ed8d845aab0843a1123dd20d1e6f209dd32184a87bcd7e68e213e3676c43d1d05d2df5acc2c64b74 WHIRLPOOL dc1c9b6802985be34ac7819e08883c456a0a76fb1822eff46b26613760063b72888d34323cf15f0f48be69555c0b07b99424a85f29ac580c4ad8fa46b990b723
-DIST sqlite-doc-3180000.zip 5552381 SHA256 6f763eba9f51cb1096d1d40fbdd7ff974203060ddb892fc735adb2d7d42f1dad SHA512 7b65130cb2174d823842cddc912432d206044a8b276fdc2eef437854de7d0b05b8eb5d7aec0ead5c3f88bb7788ae5f1c42ffb1e43ab00774a68f6f7fea72d517 WHIRLPOOL be95f25105aea7f553145b371d64d1192057a2931551758bea418dd41b2ead6e9c07368347320bb041a59051c89ca2c84e3cd4e1f95806cad30dca3adec6042b
-DIST sqlite-doc-3190200.zip 5577171 SHA256 0d136abeea8d045ab7acef64ce84028dacb418584fa5a259e7ab4233ef21ff46 SHA512 f81b8719a54cd5e7f993f3dbd76821fc39651ef20b12cfd19c6d58fcb948e7fa00aa97e2f25cab421ba85d27d10b12822a87d1ae49e33c004c83b8f68cbc781c WHIRLPOOL fd8d25184a1e291ea597d42ce76ce5959db8a974e90934e637851806021d054fdda0a37d33db159478158331d52024b8ad5de11410dad5eb595b590ddda1c657
DIST sqlite-doc-3190300.zip 5649351 SHA256 62cda70d5285e35144ddfd4629df8fadc2bae8dbcb43d0638aa874c1c03de101 SHA512 4f99b6797f76dab1859eaf4596c42d6b10a80a1ad9dcb33b82fcc4ef80a8e8299ac24c0d2a0f41debf9e82d43c9ecf9675547eb6163756f29afe847613ef75f3 WHIRLPOOL 4c259efcccca513a55150a349410a9c05cd2faa84a41a2f70f9c9311e3cb24d9e028bb2061a03c4dc6dfebfa3ff7738b571c7bd961b0f4aff5b329183b5e9d7b
DIST sqlite-doc-3200000.zip 5695366 SHA256 5b7a4dc411937f33f17a8b0b7cb490d5e718fe37a751ee772d8989c23745f394 SHA512 0dfa9487c5e4084a9c17e8bf83a92b9a2cd53642efeff0b12051ecdeaf11e3896031f1b4d59021354a293b8acc8c6fcab827961721fda7a5de8415460d3bd280 WHIRLPOOL cd83788e4c054231b3050c54799781b38344d7bec006e640a489276678146f25ab55ee0bc82fc031e5cab39c92c09877d7ce55af90089691e0d09dac37fbbf19
DIST sqlite-doc-3200100.zip 5759028 SHA256 0caf410e604411fd925c699d5fcb1d846f9297cdf2e18251eceb3e5708301e85 SHA512 518ca59644cecfcd67f511268112e421c5d7bbd77ef1e33304bf306ef110becf1e2a7fe37c506ec6892edb9d5c6ee77657b374c2e061f49890d18af062dea2b3 WHIRLPOOL ba78e9c6cdac90937dd4b39bbf14d78f309b391908ed22f13e9068da66ff6d191d7ade5deaae43d1636342b2ed9f45e34e0c4312c7a15557b4a36b7ed5ba3098
DIST sqlite-doc-3210000.zip 5800635 SHA256 78c2fc9b144b168c7df53ff192c84fa7c29bcc44324b48b0f809a13810bc6c36 SHA512 799c7279166b489d1a5acc9410808c2d4b78e64037fc15b60764180fe1c698f35e27e86793140302f560cfa583baa2c33e416d5c9e1842ec58c6cb6093729334 WHIRLPOOL 07fd680e5573ca68eec31208bf52d096df1a20aa5b3bb69cc98f1c017d3772dfb48706ac10e9f9a70990467d4177fb32e751692e72f9c33883d76d770d55d0a4
-DIST sqlite-src-3160200.zip 10081950 SHA256 ee77c2cc5cc4a7b0a746a1d4496f7aee0d71c558a3bbfcf8e9e0b35416910337 SHA512 db49551c09830cf4d8997f0a623deeed9f85db5f27e6ca9d8aa5812a23c1466bbcdf8bb56cf009511f72cafec8f09a305127123f54d90437b28770dac34a0897 WHIRLPOOL b8cc52d5111bde34dae02391be8d83f9e703672b2101b36f5409e9acc23743c00561b02bd14b098e29972077fa1866a506d6343b58e4897ca07dac0bb60f4367
-DIST sqlite-src-3170000.zip 10120844 SHA256 86754bee6bcaf1f2a6bf4a02676eb3a43d22d4e5d8339e217424cb2be6b748c3 SHA512 e60381de33fbf566507454e4f1dfb7d3ada554e5c919f05f0dd2f96a6f266adaa62681437f21fdea1c24de57fb6141b798f97854918faa189b507f12f11e0d36 WHIRLPOOL 535c598f7bb9ddbecdd1ca841c0ecf398831c494c99c38542d1cbb756d8333260d6891aa36167aeba75df83fbaf402465dc65c9b3a7fb6685fa54420cb1a1342
-DIST sqlite-src-3180000.zip 10166686 SHA256 eab4d137abd5aa1164244a5d558c9a02122071daf36984b236f8441d749b9ba6 SHA512 b82c5388066f2e905c067d75e890bf2ff03a522733b8c8e0ebdfffe1804d7ecb39b72f6d808fce59133ac8c645f8b6e163e3dff7bbb0d66bbe8748e069ca7a84 WHIRLPOOL b92890b587761dfd550b39fbd64c4fddaf58e495c0f2b7526a624c3415147494648add3fa6968a09411e73c9b0653ec541a49a34daeb7ad2ae4840e829528380
-DIST sqlite-src-3190200.zip 10193843 SHA256 899c370b162a3b1febc644be5363433789a629bd07f5f80231defb5603d1abc1 SHA512 026b97bfc73b6ecf4c48b344a13adfb1c484d76a4fe78fd06bc4d175bb516c324483c6a647eaffc989469b3134c1874a1869b2d6a7d4112e685d75317992deb1 WHIRLPOOL 8af9215bfb2e2c2b418ff19f5e6a31d9ce68c47a3ec5d31fa2747e6de1936a32844fa6d500d876f77038a50dd332d73740594a2a7a9141eff32bc5bf523c5966
DIST sqlite-src-3190300.zip 10193997 SHA256 5595bbf59e7bb6bb43a6e816b9dd2ee74369c6ae3cd60284e24d5f7957286120 SHA512 514c3de6346bdea359036a79c880133f0eeed4cdfc9e811d662dc343f91ea43edda0f9760405a48e7f61ea1dd3478980cc7d3b5409ef27adcb5311a06e36297e WHIRLPOOL 14491a9f14b7f180781ea78010783709e0539b970d0fadec10a3e0afd9fdda8d417dd14811ad10f98b9b8ec5cb491422bc4e9ebad7720a1733fef11e759908c7
DIST sqlite-src-3200000.zip 10575632 SHA256 4b358e77a85d128651e504aaf548253ffe10d5d399aaef5a6e34f29262614bee SHA512 40fe7972902d041f012c7739c8712aa40069aebc7be680fde8f43b33fed885bfc42331bfb7200651486484edb71cbdd77ddb9c119d0847bdfb0e92063090f029 WHIRLPOOL e64cefd85a78402a40abe647c001cf280fe8469da99a03b776ba12bbf19fd372506430b4f9d1b507617dff3d3adf74ea177a2238e006d6b85e39e67c60ce6a03
DIST sqlite-src-3200100.zip 10575637 SHA256 665bcae19f313c974e3fc2e375b93521c3668d79bc7b66250c24a4a4aeaa2c2a SHA512 845a0d64c9356aadf178c04dd716bbd37a7353526b06cfa8e8f65653cf6a1893a5c5e8c78d20b43910c34d9167272cf517749c91ed0ba7686977e3d0327e8939 WHIRLPOOL cfba088bc57f387e665642df2c4050edeaa3802c8c684dcdaa882c608650afb32de3c9877e518d2b1689e26eafb2e693de7d0edc3ce7ce49b0bcf4537954972d
diff --git a/dev-db/sqlite/files/sqlite-3.16.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.16.0-full_tarball-build.patch
deleted file mode 100644
index 60907e795f9..00000000000
--- a/dev-db/sqlite/files/sqlite-3.16.0-full_tarball-build.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Fix building with dlopen() not available.
-
---- Makefile.in
-+++ Makefile.in
-@@ -562,6 +562,7 @@
- #
- SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
- # SHELL_OPT += -DSQLITE_ENABLE_FTS5
-+SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
- SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
- SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
- FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
-@@ -586,25 +587,25 @@
-
- libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
-- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- -rpath "$(TCLLIBDIR)" \
- -version-info "8:6:8" \
- -avoid-version
-
--sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
-- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
-- $(TOP)/src/shell.c sqlite3.c \
-- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
-+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
-+ $(TOP)/src/shell.c libsqlite3.la \
-+ $(LIBREADLINE)
-
--sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
-
--dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
-
--scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
- $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
-- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/scrub.c libsqlite3.la
-
- srcck1$(BEXE): $(TOP)/tool/srcck1.c
- $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -679,7 +680,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo: sqlite3.c
-- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
-
- # Rules to build the LEMON compiler generator
- #
-@@ -1105,13 +1106,13 @@
-
- # Fuzz testing
- fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
-- ./fuzzcheck$(TEXE) $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
-
- fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
-- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
-
- valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
-- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
-
- # The veryquick.test TCL tests.
- #
-@@ -1141,32 +1142,31 @@
- smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
- ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
-
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
-+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
- echo "#define TCLSH 2" > $@
-- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
-- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
-+ cat $(TOP)/src/tclsqlite.c >> $@
- echo "static const char *tclsh_main_loop(void){" >> $@
- echo "static const char *zMainloop = " >> $@
- $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
- echo "; return zMainloop; }" >> $@
-
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
-- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
-+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
-
--showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
-
--showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
-
--showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE): $(TOP)/tool/showjournal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
-
--showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE): $(TOP)/tool/showwal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
-
--changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
-
- rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
- $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
-@@ -1180,8 +1180,8 @@
- speedtest1$(TEXE): $(TOP)/test/speedtest1.c sqlite3.lo
- $(LTLINK) -o $@ $(TOP)/test/speedtest1.c sqlite3.lo $(TLIBS)
-
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
-- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
-+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
-
- loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
---- configure.ac
-+++ configure.ac
-@@ -584,6 +584,9 @@
- if test "${use_loadextension}" = "yes" ; then
- OPT_FEATURE_FLAGS=""
- AC_SEARCH_LIBS(dlopen, dl)
-+ if test "${ac_cv_search_dlopen}" = "no" ; then
-+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+ fi
- else
- OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
diff --git a/dev-db/sqlite/sqlite-3.16.2.ebuild b/dev-db/sqlite/sqlite-3.16.2.ebuild
deleted file mode 100644
index 85b1897f9de..00000000000
--- a/dev-db/sqlite/sqlite-3.16.2.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
-
-SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
-DOC_PV="${SRC_PV}"
-# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
-
-DESCRIPTION="A SQL Database Engine in a C Library"
-HOMEPAGE="https://sqlite.org/"
-SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
- tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
-
-LICENSE="public-domain"
-SLOT="3"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-
-RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- doc? ( app-arch/unzip )
- tcl? ( app-arch/unzip )
- test? (
- app-arch/unzip
- dev-lang/tcl:0[${MULTILIB_USEDEP}]
- )
- tools? ( app-arch/unzip )"
-
-full_tarball() {
- use tcl || use test || use tools
-}
-
-pkg_setup() {
- if full_tarball; then
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
- else
- S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
- fi
-}
-
-src_prepare() {
- if full_tarball; then
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-full_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
- else
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- sed \
- -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])/" \
- -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
- -i configure.ac || die "sed failed"
- fi
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local CPPFLAGS="${CPPFLAGS}" options=()
-
- options+=(
- --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
- --enable-threadsafe
- )
- if ! full_tarball; then
- options+=(--disable-static-shell)
- fi
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- append-cppflags -DSQLITE_ENABLE_RTREE
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # debug USE flag.
- if full_tarball; then
- options+=($(use_enable debug))
- else
- if use debug; then
- append-cppflags -DSQLITE_DEBUG
- else
- append-cppflags -DNDEBUG
- fi
- fi
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- if full_tarball; then
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if full_tarball && use readline; then
- options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if full_tarball; then
- options+=(--enable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbhash sqlite3-db-hash
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
diff --git a/dev-db/sqlite/sqlite-3.17.0.ebuild b/dev-db/sqlite/sqlite-3.17.0.ebuild
deleted file mode 100644
index ad572bba348..00000000000
--- a/dev-db/sqlite/sqlite-3.17.0.ebuild
+++ /dev/null
@@ -1,260 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
-
-SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
-DOC_PV="${SRC_PV}"
-# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
-
-DESCRIPTION="A SQL Database Engine in a C Library"
-HOMEPAGE="https://sqlite.org/"
-SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
- tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
-
-LICENSE="public-domain"
-SLOT="3"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-
-RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- doc? ( app-arch/unzip )
- tcl? ( app-arch/unzip )
- test? (
- app-arch/unzip
- dev-lang/tcl:0[${MULTILIB_USEDEP}]
- )
- tools? ( app-arch/unzip )"
-
-full_tarball() {
- use tcl || use test || use tools
-}
-
-pkg_setup() {
- if full_tarball; then
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
- else
- S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
- fi
-}
-
-src_prepare() {
- if full_tarball; then
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-full_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
- else
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- sed \
- -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])/" \
- -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
- -i configure.ac || die "sed failed"
- fi
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local CPPFLAGS="${CPPFLAGS}" options=()
-
- options+=(
- --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
- --enable-threadsafe
- )
- if ! full_tarball; then
- options+=(--disable-static-shell)
- fi
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- append-cppflags -DSQLITE_ENABLE_RTREE
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # debug USE flag.
- if full_tarball; then
- options+=($(use_enable debug))
- else
- if use debug; then
- append-cppflags -DSQLITE_DEBUG
- else
- append-cppflags -DNDEBUG
- fi
- fi
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- if full_tarball; then
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if full_tarball && use readline; then
- options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if full_tarball; then
- options+=(--enable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbhash sqlite3-db-hash
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
diff --git a/dev-db/sqlite/sqlite-3.18.0.ebuild b/dev-db/sqlite/sqlite-3.18.0.ebuild
deleted file mode 100644
index a607c0afbdc..00000000000
--- a/dev-db/sqlite/sqlite-3.18.0.ebuild
+++ /dev/null
@@ -1,261 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
-
-SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
-DOC_PV="${SRC_PV}"
-# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
-
-DESCRIPTION="A SQL Database Engine in a C Library"
-HOMEPAGE="https://sqlite.org/"
-SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
- tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
-
-LICENSE="public-domain"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-
-RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- doc? ( app-arch/unzip )
- tcl? ( app-arch/unzip )
- test? (
- app-arch/unzip
- dev-lang/tcl:0[${MULTILIB_USEDEP}]
- )
- tools? ( app-arch/unzip )"
-
-full_tarball() {
- use tcl || use test || use tools
-}
-
-pkg_setup() {
- if full_tarball; then
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
- else
- S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
- fi
-}
-
-src_prepare() {
- if full_tarball; then
- eapply -p0 "${FILESDIR}/${PN}-3.18.0-full_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
- else
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- sed \
- -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])/" \
- -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
- -i configure.ac || die "sed failed"
- fi
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local CPPFLAGS="${CPPFLAGS}" options=()
-
- options+=(
- --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
- --enable-threadsafe
- )
- if ! full_tarball; then
- options+=(--disable-static-shell)
- fi
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- append-cppflags -DSQLITE_ENABLE_RTREE
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # debug USE flag.
- if full_tarball; then
- options+=($(use_enable debug))
- else
- if use debug; then
- append-cppflags -DSQLITE_DEBUG
- else
- append-cppflags -DNDEBUG
- fi
- fi
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- if full_tarball; then
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if full_tarball && use readline; then
- options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if full_tarball; then
- options+=(--enable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
diff --git a/dev-db/sqlite/sqlite-3.19.2.ebuild b/dev-db/sqlite/sqlite-3.19.2.ebuild
deleted file mode 100644
index cb6dc5fdf17..00000000000
--- a/dev-db/sqlite/sqlite-3.19.2.ebuild
+++ /dev/null
@@ -1,265 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
-
-SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
-DOC_PV="${SRC_PV}"
-# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
-
-DESCRIPTION="A SQL Database Engine in a C Library"
-HOMEPAGE="https://sqlite.org/"
-SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
- tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
-
-LICENSE="public-domain"
-SLOT="3"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-
-RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- doc? ( app-arch/unzip )
- tcl? ( app-arch/unzip )
- test? (
- app-arch/unzip
- dev-lang/tcl:0[${MULTILIB_USEDEP}]
- )
- tools? ( app-arch/unzip )"
-
-full_tarball() {
- use tcl || use test || use tools
-}
-
-pkg_setup() {
- if full_tarball; then
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
- else
- S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
- fi
-}
-
-src_prepare() {
- if full_tarball; then
- eapply -p0 "${FILESDIR}/${PN}-3.18.0-full_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
-
- # Fix references to $(OPT_FEATURE_FLAGS).
- # https://sqlite.org/src/info/43ce3bd3a4b41ea7
- sed -e "s/OPT_FEATURE_FLAGS=\"\$(OPT_FEATURE_FLAGS)/OPT_FEATURE_FLAGS=\"\${OPT_FEATURE_FLAGS}/" -i configure.ac || die "sed failed"
- else
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- sed \
- -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])/" \
- -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
- -i configure.ac || die "sed failed"
- fi
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local CPPFLAGS="${CPPFLAGS}" options=()
-
- options+=(
- --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
- --enable-threadsafe
- )
- if ! full_tarball; then
- options+=(--disable-static-shell)
- fi
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- append-cppflags -DSQLITE_ENABLE_RTREE
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # debug USE flag.
- if full_tarball; then
- options+=($(use_enable debug))
- else
- if use debug; then
- append-cppflags -DSQLITE_DEBUG
- else
- append-cppflags -DNDEBUG
- fi
- fi
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- if full_tarball; then
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if full_tarball && use readline; then
- options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if full_tarball; then
- options+=(--enable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2018-02-12 19:16 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2018-02-12 19:16 UTC (permalink / raw
To: gentoo-commits
commit: 380d244d2c1ec075ab5387fd5302ceba9a4b0e62
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Feb 10 17:00:09 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Feb 12 19:16:12 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=380d244d
dev-db/sqlite: Version bump (3.22.0).
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.22.0-full_archive-build.patch | 405 +++++++++++++++++++++
| 15 +
.../files/sqlite-3.22.0-full_archive-tests.patch | 249 +++++++++++++
dev-db/sqlite/sqlite-3.22.0.ebuild | 303 +++++++++++++++
5 files changed, 975 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 65f0c3790f5..53d8ac0a3fd 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -2,11 +2,14 @@ DIST sqlite-autoconf-3190300.tar.gz 2542682 BLAKE2B bcbc3ce87b569c2d84c099776db2
DIST sqlite-autoconf-3200000.tar.gz 2565548 BLAKE2B 29d88fb8597b6ef7c7b3613c73d8b912cd22e1354c664a2edae0b5d0379103b1025a54d83f24ee74159bed3b928627cb1a50c8df48658ba0cdc5ce7fdbfa5920 SHA512 f5b0ffcc27adeed5b27b29962d03defa167151868f2281c5642a8ddfa10ac8971aff22081a5b46bd36bcf664bd271975e80249ec403b73656658b33af084ec94
DIST sqlite-autoconf-3200100.tar.gz 2565638 BLAKE2B bd1d32c211ea906cb2dbf78ea54d364db1a642d8a3b2751a427521a9da3391a2cd23c1ecdc5ff70b68f4166c583e69373f566cb04847295542185ab598e79c1b SHA512 56e3d326ea2225cadc628c3518d46d9f7c4bafa0e3612f2b7ab0dc0d79fcbb7e095f6d84a9a48e1c6d83adcdc8706ad5ac4404f0f622c7fe38cfde3a7e7e69f0
DIST sqlite-autoconf-3210000.tar.gz 2568942 BLAKE2B 83a7095fd5fd5447a3c16816ceb9f51f393de9689942bd4eb4c6eafe357a1dd1783500f8faf2765fa6628da6a39f550237b661af1337ac063ca285f5f0a5218e SHA512 8f00708965eacef171620c49538f75768d350ec3f2bfef412a5c70af865ab03b6a64ce1e65d9fdb3d66f4d00262a30fc162b01fd69f63c05c14d5243374b6298
+DIST sqlite-autoconf-3220000.tar.gz 2644649 BLAKE2B e73fd7846362e6cc07eb96ea18e8883c1473c2b07c6e0c89e7e65726c5a6556b50bac71904a5b3a431ba40ff72b32e55c3e5ab7461567b5643560a0790a9a4dd SHA512 13e791bb1d7ba7edb5d84f4945f36ce2e03898a5bb1612d28799ef35a100f32e85cbb38f4ef65a7b43d020e5d48bf09b2e79cbb2003cc8aca2b09458b8c5d5bc
DIST sqlite-doc-3190300.zip 5649351 BLAKE2B f0bc52bebe6e3c4be227d8f6cf2689fb2f6d46e6472d61334a7959697d4017dcee87c4ff146293f13a88e69990c2e7f291e4ad8ae5359c378e1bcecf6dfe2aa1 SHA512 4f99b6797f76dab1859eaf4596c42d6b10a80a1ad9dcb33b82fcc4ef80a8e8299ac24c0d2a0f41debf9e82d43c9ecf9675547eb6163756f29afe847613ef75f3
DIST sqlite-doc-3200000.zip 5695366 BLAKE2B 0e6dba7666d449875026772204943c892e8984a85cd517a33d7a5bdccb352070fc2cc8012b9b57b70c2436587ab5d6840ef329253bcb27c7c1cd10b0b4c30c06 SHA512 0dfa9487c5e4084a9c17e8bf83a92b9a2cd53642efeff0b12051ecdeaf11e3896031f1b4d59021354a293b8acc8c6fcab827961721fda7a5de8415460d3bd280
DIST sqlite-doc-3200100.zip 5759028 BLAKE2B a633672b739160873e64b89e1350c85b0002fd8f268b6ae0f5189de12f411125fbb309585175727b8915fe1468b3e70e7c33239826232c3e7bc8c1c59132bec0 SHA512 518ca59644cecfcd67f511268112e421c5d7bbd77ef1e33304bf306ef110becf1e2a7fe37c506ec6892edb9d5c6ee77657b374c2e061f49890d18af062dea2b3
DIST sqlite-doc-3210000.zip 5800635 BLAKE2B c9e15fe7373045783d05bd7b0a70f980e3c8a3c0ec4243f85fe338788830a58e82f1c6b3c053efe75caa33e99a6162e2f9831e4f5b9577c0bf90a305ee2f0381 SHA512 799c7279166b489d1a5acc9410808c2d4b78e64037fc15b60764180fe1c698f35e27e86793140302f560cfa583baa2c33e416d5c9e1842ec58c6cb6093729334
+DIST sqlite-doc-3220000.zip 5856836 BLAKE2B 1be73848040f3ae9734a44c94e4c36cae269d79abb20467f9f8368754e1ae07f4c25490be985b44d08f427e281fc268c6569dc0f5bbb6254621c62798507d687 SHA512 f9141d3907e5c1a3008d3b7e111e46e7ff1f010358eb682d3e1187a67deb7cca7ba1d5fbc5b19da26ee8df3a0c71a098fd0e8d8ca89c25e5ad2b3e12ba7dc312
DIST sqlite-src-3190300.zip 10193997 BLAKE2B 2286d410594cb04acc79e4877101cbd5018cb84802394fbe4fe9ceaca4e9b20064372f5189d8d70bc7c034789fa92799224939e46f35f8fe47fb42d08f9b29e1 SHA512 514c3de6346bdea359036a79c880133f0eeed4cdfc9e811d662dc343f91ea43edda0f9760405a48e7f61ea1dd3478980cc7d3b5409ef27adcb5311a06e36297e
DIST sqlite-src-3200000.zip 10575632 BLAKE2B 2f0f41129e56477531f59d91e02469ccf5e21eaadce57a2a81bde9bcd549c12d55a496f27fd07bf0ded78b55aa8a6e4d48e5073638dc87eaeef8e989906fccfb SHA512 40fe7972902d041f012c7739c8712aa40069aebc7be680fde8f43b33fed885bfc42331bfb7200651486484edb71cbdd77ddb9c119d0847bdfb0e92063090f029
DIST sqlite-src-3200100.zip 10575637 BLAKE2B e45bad50d728e749c258546dd75a9d647ca35584092c663fed176fdd69164623bbe58afd15cd74fcd32a0cec893cffdb0f096873188c42ec5595ef7d635c79ad SHA512 845a0d64c9356aadf178c04dd716bbd37a7353526b06cfa8e8f65653cf6a1893a5c5e8c78d20b43910c34d9167272cf517749c91ed0ba7686977e3d0327e8939
DIST sqlite-src-3210000.zip 10577695 BLAKE2B 21f110d4cdda95864a39b9b9b65985d29e1409ed38a9bda692d33dde845c115476cd77dc3b9cd1b7359ff383dc3050cbf0437b113ea128392aef50dd3b778d46 SHA512 3a054422da80d750fd5ab297f9d2728f4e7b55fa790a72d55da8c381835571992d56b349e50d4680b04c9e2e44d6fa83009c2df3ffa045f43ff9059bb8736894
+DIST sqlite-src-3220000.zip 10721627 BLAKE2B ed4cf93c36c095edeccd6ee4dac5419c516264a42eb9d6d2e333b1d4a134c6198dfcd2bbae41dff811616f0dc7f9e9bb487f9c5b5f631fcb5885540a84bf527a SHA512 e35defb0ffcc10100399051bc734746de40fa3dc5cd673eac470fb58cd8bd6d911b6dacb5e8489e2dd79c6ae75faaeb8c02384f64c4595963e62bd3faeb9446c
diff --git a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-build.patch
new file mode 100644
index 00000000000..5e1236a4e96
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-build.patch
@@ -0,0 +1,405 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -307,6 +307,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -355,8 +358,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -425,7 +431,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -447,8 +452,7 @@
+ $(TOP)/ext/misc/spellfix.c \
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+- $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c
++ $(TOP)/ext/misc/wholenumber.c
+
+ # Source code to the library files needed by the test fixture
+ #
+@@ -610,25 +614,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -704,7 +708,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -995,14 +999,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/src/test_windirent.c
+
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
+@@ -1161,13 +1160,13 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+
+ # The veryquick.test TCL tests.
+ #
+@@ -1197,24 +1196,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1225,30 +1223,30 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1267,11 +1265,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -590,6 +590,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -1665,3 +1667,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -124,6 +125,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -963,13 +968,6 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3467,7 +3465,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5316,6 +5316,7 @@
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ #endif
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+@@ -8222,6 +8223,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -116,6 +116,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -399,6 +400,10 @@
+ json1.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
--git a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-headers.patch b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-headers.patch
new file mode 100644
index 00000000000..751f00a62bd
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-headers.patch
@@ -0,0 +1,15 @@
+https://sqlite.org/src/info/6185d190e250faae
+
+--- /src/sqlite3ext.h
++++ /src/sqlite3ext.h
+@@ -563,8 +563,8 @@
+ #define sqlite3_value_pointer sqlite3_api->value_pointer
+ /* Version 3.22.0 and later */
+ #define sqlite3_vtab_nochange sqlite3_api->vtab_nochange
+-#define sqlite3_value_nochange sqltie3_api->value_nochange
+-#define sqlite3_vtab_collation sqltie3_api->vtab_collation
++#define sqlite3_value_nochange sqlite3_api->value_nochange
++#define sqlite3_vtab_collation sqlite3_api->vtab_collation
+ #endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
+
+ #if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
diff --git a/dev-db/sqlite/files/sqlite-3.22.0-full_archive-tests.patch b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-tests.patch
new file mode 100644
index 00000000000..a253028b7f4
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.22.0-full_archive-tests.patch
@@ -0,0 +1,249 @@
+https://sqlite.org/src/info/e4766cabdf64d8e9
+https://sqlite.org/src/info/d9e59cfb8476e1ec
+https://sqlite.org/src/info/ba0631de60ca38bf
+https://sqlite.org/src/info/b685d3231097fb90
+
+--- /test/fts3rank.test
++++ /test/fts3rank.test
+@@ -14,7 +14,7 @@
+
+ set testdir [file dirname $argv0]
+ source $testdir/tester.tcl
+-set testprefix fts3expr5
++set testprefix fts3rank
+
+ # If SQLITE_ENABLE_FTS3 is defined, omit this file.
+ ifcapable !fts3 {
+@@ -56,9 +56,14 @@
+ SELECT * FROM t1 ORDER BY rank(x'0000000000000000') DESC, rowid
+ } {0 {{one two} one {one two} three {one two} two}}
+
+-do_catchsql_test 1.5 {
+- SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
+-} {1 {invalid matchinfo blob passed to function rank()}}
++if {$tcl_platform(byteOrder)=="littleEndian"} {
++ do_catchsql_test 1.5le {
++ SELECT * FROM t1 ORDER BY rank(x'0100000001000000') DESC, rowid
++ } {1 {invalid matchinfo blob passed to function rank()}}
++} else {
++ do_catchsql_test 1.5be {
++ SELECT * FROM t1 ORDER BY rank(x'0000000100000001') DESC, rowid
++ } {1 {invalid matchinfo blob passed to function rank()}}
++}
+
+ finish_test
+-
+--- /test/func6.test
++++ /test/func6.test
+@@ -33,54 +33,125 @@
+ CREATE TABLE t2(x TEXT PRIMARY KEY, y) WITHOUT ROWID;
+ INSERT INTO t2(x,y) SELECT a, b FROM t1;
+ }
++
++# Load the contents of $file from disk and return it encoded as a hex
++# string.
++proc loadhex {file} {
++ set fd [open $file]
++ fconfigure $fd -translation binary -encoding binary
++ set data [read $fd]
++ close $fd
++ binary encode hex $data
++}
++
++# Each argument is either an integer between 0 and 65535, a text value, or
++# an empty string representing an SQL NULL. This command builds an SQLite
++# record containing the values passed as arguments and returns it encoded
++# as a hex string.
++proc hexrecord {args} {
++ set hdr ""
++ set body ""
++ foreach x $args {
++ if {$x==""} {
++ append hdr 00
++ } elseif {[string is integer $x]==0} {
++ set n [string length $x]
++ append hdr [format %02x [expr $n*2 + 13]]
++ append body [binary encode hex $x]
++ } elseif {$x == 0} {
++ append hdr 08
++ } elseif {$x == 1} {
++ append hdr 09
++ } elseif {$x <= 127} {
++ append hdr 01
++ append body [format %02x $x]
++ } else {
++ append hdr 02
++ append body [format %04x $x]
++ }
++ }
++ set res [format %02x [expr 1 + [string length $hdr]/2]]
++ append res $hdr
++ append res $body
++}
++
++# Argument $off is an offset into the database image encoded as a hex string
++# in argument $hexdb. This command returns 0 if the offset contains the hex
++# $hexrec, or throws an exception otherwise.
++#
++proc offset_contains_record {off hexdb hexrec} {
++ set n [string length $hexrec]
++ set off [expr $off*2]
++ if { [string compare $hexrec [string range $hexdb $off [expr $off+$n-1]]] } {
++ error "record not found!"
++ }
++ return 0
++}
++
++# This command is the implementation of SQL function "offrec()". The first
++# argument to this is an offset value. The remaining values are used to
++# formulate an SQLite record. If database file test.db does not contain
++# an equivalent record at the specified offset, an exception is thrown.
++# Otherwise, 0 is returned.
++#
++proc offrec {args} {
++ set offset [lindex $args 0]
++ set rec [hexrecord {*}[lrange $args 1 end]]
++ offset_contains_record $offset $::F $rec
++}
++set F [loadhex test.db]
++db func offrec offrec
++
++# Test the sanity of the tests.
++do_execsql_test func6-105 {
++ SELECT sqlite_offset(d) FROM t1 ORDER BY rowid LIMIT 1;
++} {8179}
++do_test func6-106 {
++ set r [hexrecord abc001 1 999 {}]
++ offset_contains_record 8179 $F $r
++} 0
++
++set z100 [string trim [string repeat "0 " 100]]
++
++# Test offsets within table b-tree t1.
+ do_execsql_test func6-110 {
+- SELECT a, sqlite_offset(d)/4096 + 1,
+- sqlite_offset(d)%4096 FROM t1
+- ORDER BY rowid LIMIT 2;
+-} {abc001 2 4084 abc002 2 4069}
++ SELECT offrec(sqlite_offset(d), a, b, c, d) FROM t1 ORDER BY rowid
++} $z100
++
+ do_execsql_test func6-120 {
+ SELECT a, typeof(sqlite_offset(+a)) FROM t1
+ ORDER BY rowid LIMIT 2;
+ } {abc001 null abc002 null}
++
++# Test offsets within index b-tree t1a.
+ do_execsql_test func6-130 {
+- SELECT a, sqlite_offset(a)/4096+1,
+- sqlite_offset(a)%4096
+- FROM t1
+- ORDER BY a LIMIT 2;
+-} {abc001 3 4087 abc002 3 4076}
++ SELECT offrec(sqlite_offset(a), a, rowid) FROM t1 ORDER BY a
++} $z100
++
++# Test offsets within table b-tree t1 with a temp b-tree ORDER BY.
+ do_execsql_test func6-140 {
+- SELECT a, sqlite_offset(d)/4096+1,
+- sqlite_offset(d)%4096
+- FROM t1
+- ORDER BY a LIMIT 2;
+-} {abc001 2 4084 abc002 2 4069}
++ SELECT offrec(sqlite_offset(d), a, b, c, d) FROM t1 ORDER BY a
++} $z100
++
++# Test offsets from both index t1a and table t1 in the same query.
+ do_execsql_test func6-150 {
+- SELECT a,
+- sqlite_offset(a)/4096+1,
+- sqlite_offset(a)%4096,
+- sqlite_offset(d)/4096+1,
+- sqlite_offset(d)%4096
+- FROM t1
+- ORDER BY a LIMIT 2;
+-} {abc001 3 4087 2 4084 abc002 3 4076 2 4069}
+-do_execsql_test func6-160 {
+- SELECT b,
+- sqlite_offset(b)/4096+1,
+- sqlite_offset(b)%4096,
+- sqlite_offset(c)/4096+1,
+- sqlite_offset(c)%4096,
+- sqlite_offset(d)/4096+1,
+- sqlite_offset(d)%4096
+- FROM t1
+- ORDER BY b LIMIT 2;
+-} {1 4 4090 4 4090 2 4084 2 4 4081 4 4081 2 4069}
++ SELECT offrec(sqlite_offset(a), a, rowid),
++ offrec(sqlite_offset(d), a, b, c, d)
++ FROM t1 ORDER BY a
++} [concat $z100 $z100]
+
++# Test offsets from both index t1bc and table t1 in the same query.
++do_execsql_test func6-160 {
++ SELECT offrec(sqlite_offset(b), b, c, rowid),
++ offrec(sqlite_offset(c), b, c, rowid),
++ offrec(sqlite_offset(d), a, b, c, d)
++ FROM t1
++ ORDER BY b
++} [concat $z100 $z100 $z100]
+
++# Test offsets in WITHOUT ROWID table t2.
+ do_execsql_test func6-200 {
+- SELECT y, sqlite_offset(y)/4096+1,
+- sqlite_offset(y)%4096
+- FROM t2
+- ORDER BY x LIMIT 2;
+-} {1 5 4087 2 5 4076}
++ SELECT offrec( sqlite_offset(y), x, y ) FROM t2 ORDER BY x
++} $z100
+
+ finish_test
+--- /test/walro2.test
++++ /test/walro2.test
+@@ -39,6 +39,18 @@
+ }
+ }
+
++# Most systems allocate the *-shm file in 32KB trunks. But on UNIX systems
++# for which the getpagesize() call returns greater than 32K, the *-shm
++# file is allocated in page-sized units (since you cannot mmap part of
++# a page). The following code sets variable $MINSHMSZ to the smallest
++# possible *-shm file (i.e. the greater of 32KB and the system page-size).
++#
++do_execsql_test 0.0 {
++ PRAGMA journal_mode = wal;
++ CREATE TABLE t1(x);
++} {wal}
++set MINSHMSZ [file size test.db-shm]
++
+ foreach bZeroShm {0 1} {
+ set TN [expr $bZeroShm+1]
+ do_multiclient_test tn {
+@@ -169,7 +181,7 @@
+ } {a b c d e f g h 1 2}
+ do_test $TN.3.2.2 {
+ list [file size test.db-wal] [file size test.db-shm]
+- } {0 32768}
++ } [list 0 $MINSHMSZ]
+
+ do_test $TN.3.3.0 {
+ code2 { sqlite3 db2 test.db }
+@@ -182,7 +194,7 @@
+ code2 { db2 close }
+ code1 { db close }
+ list [file size test.db-wal] [file size test.db-shm]
+- } [list [wal_file_size 4 1024] 32768]
++ } [list [wal_file_size 4 1024] $MINSHMSZ]
+ do_test $TN.3.3.1 {
+ code1 { sqlite3 db file:test.db?readonly_shm=1 }
+ sql1 { SELECT * FROM t1 }
+@@ -196,7 +208,7 @@
+ }
+ code2 { db2 close }
+ list [file size test.db-wal] [file size test.db-shm]
+- } [list [wal_file_size 4 1024] 32768]
++ } [list [wal_file_size 4 1024] $MINSHMSZ]
+ do_test $TN.3.3.3 {
+ sql1 { SELECT * FROM t1 }
+ } {i ii}
diff --git a/dev-db/sqlite/sqlite-3.22.0.ebuild b/dev-db/sqlite/sqlite-3.22.0.ebuild
new file mode 100644
index 00000000000..56d3540d02b
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.22.0.ebuild
@@ -0,0 +1,303 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.22.0-full_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.22.0-full_archive-headers.patch"
+ eapply "${FILESDIR}/${PN}-3.22.0-full_archive-tests.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
+ eapply -p2 "${FILESDIR}/${PN}-3.22.0-full_archive-headers.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2018-04-16 18:29 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2018-04-16 18:29 UTC (permalink / raw
To: gentoo-commits
commit: 2142114cd62df3e5b61562a5c9b49ffcd7390953
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Apr 16 17:34:57 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Apr 16 18:27:34 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2142114c
dev-db/sqlite: Delete old versions (<3.20.1).
dev-db/sqlite/Manifest | 6 -
.../files/sqlite-3.18.0-full_tarball-build.patch | 158 -------------
dev-db/sqlite/sqlite-3.19.3.ebuild | 261 ---------------------
dev-db/sqlite/sqlite-3.20.0.ebuild | 261 ---------------------
4 files changed, 686 deletions(-)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 53d8ac0a3fd..0ff25d983a4 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,15 +1,9 @@
-DIST sqlite-autoconf-3190300.tar.gz 2542682 BLAKE2B bcbc3ce87b569c2d84c099776db292b10fc0100ec10a285bbb8819b996994aa020d5576620363e9b45debf27481e3f17a8589b71aa7551f4ee44b137d4c538a1 SHA512 7896c99726da75818f1027d5675b24724bc89c738874c868868e60c09d4509ad5a6da93f54cfcecb3a1052e4f164f7cb864ede333b9ccfb4f6b811b052ca1d3d
-DIST sqlite-autoconf-3200000.tar.gz 2565548 BLAKE2B 29d88fb8597b6ef7c7b3613c73d8b912cd22e1354c664a2edae0b5d0379103b1025a54d83f24ee74159bed3b928627cb1a50c8df48658ba0cdc5ce7fdbfa5920 SHA512 f5b0ffcc27adeed5b27b29962d03defa167151868f2281c5642a8ddfa10ac8971aff22081a5b46bd36bcf664bd271975e80249ec403b73656658b33af084ec94
DIST sqlite-autoconf-3200100.tar.gz 2565638 BLAKE2B bd1d32c211ea906cb2dbf78ea54d364db1a642d8a3b2751a427521a9da3391a2cd23c1ecdc5ff70b68f4166c583e69373f566cb04847295542185ab598e79c1b SHA512 56e3d326ea2225cadc628c3518d46d9f7c4bafa0e3612f2b7ab0dc0d79fcbb7e095f6d84a9a48e1c6d83adcdc8706ad5ac4404f0f622c7fe38cfde3a7e7e69f0
DIST sqlite-autoconf-3210000.tar.gz 2568942 BLAKE2B 83a7095fd5fd5447a3c16816ceb9f51f393de9689942bd4eb4c6eafe357a1dd1783500f8faf2765fa6628da6a39f550237b661af1337ac063ca285f5f0a5218e SHA512 8f00708965eacef171620c49538f75768d350ec3f2bfef412a5c70af865ab03b6a64ce1e65d9fdb3d66f4d00262a30fc162b01fd69f63c05c14d5243374b6298
DIST sqlite-autoconf-3220000.tar.gz 2644649 BLAKE2B e73fd7846362e6cc07eb96ea18e8883c1473c2b07c6e0c89e7e65726c5a6556b50bac71904a5b3a431ba40ff72b32e55c3e5ab7461567b5643560a0790a9a4dd SHA512 13e791bb1d7ba7edb5d84f4945f36ce2e03898a5bb1612d28799ef35a100f32e85cbb38f4ef65a7b43d020e5d48bf09b2e79cbb2003cc8aca2b09458b8c5d5bc
-DIST sqlite-doc-3190300.zip 5649351 BLAKE2B f0bc52bebe6e3c4be227d8f6cf2689fb2f6d46e6472d61334a7959697d4017dcee87c4ff146293f13a88e69990c2e7f291e4ad8ae5359c378e1bcecf6dfe2aa1 SHA512 4f99b6797f76dab1859eaf4596c42d6b10a80a1ad9dcb33b82fcc4ef80a8e8299ac24c0d2a0f41debf9e82d43c9ecf9675547eb6163756f29afe847613ef75f3
-DIST sqlite-doc-3200000.zip 5695366 BLAKE2B 0e6dba7666d449875026772204943c892e8984a85cd517a33d7a5bdccb352070fc2cc8012b9b57b70c2436587ab5d6840ef329253bcb27c7c1cd10b0b4c30c06 SHA512 0dfa9487c5e4084a9c17e8bf83a92b9a2cd53642efeff0b12051ecdeaf11e3896031f1b4d59021354a293b8acc8c6fcab827961721fda7a5de8415460d3bd280
DIST sqlite-doc-3200100.zip 5759028 BLAKE2B a633672b739160873e64b89e1350c85b0002fd8f268b6ae0f5189de12f411125fbb309585175727b8915fe1468b3e70e7c33239826232c3e7bc8c1c59132bec0 SHA512 518ca59644cecfcd67f511268112e421c5d7bbd77ef1e33304bf306ef110becf1e2a7fe37c506ec6892edb9d5c6ee77657b374c2e061f49890d18af062dea2b3
DIST sqlite-doc-3210000.zip 5800635 BLAKE2B c9e15fe7373045783d05bd7b0a70f980e3c8a3c0ec4243f85fe338788830a58e82f1c6b3c053efe75caa33e99a6162e2f9831e4f5b9577c0bf90a305ee2f0381 SHA512 799c7279166b489d1a5acc9410808c2d4b78e64037fc15b60764180fe1c698f35e27e86793140302f560cfa583baa2c33e416d5c9e1842ec58c6cb6093729334
DIST sqlite-doc-3220000.zip 5856836 BLAKE2B 1be73848040f3ae9734a44c94e4c36cae269d79abb20467f9f8368754e1ae07f4c25490be985b44d08f427e281fc268c6569dc0f5bbb6254621c62798507d687 SHA512 f9141d3907e5c1a3008d3b7e111e46e7ff1f010358eb682d3e1187a67deb7cca7ba1d5fbc5b19da26ee8df3a0c71a098fd0e8d8ca89c25e5ad2b3e12ba7dc312
-DIST sqlite-src-3190300.zip 10193997 BLAKE2B 2286d410594cb04acc79e4877101cbd5018cb84802394fbe4fe9ceaca4e9b20064372f5189d8d70bc7c034789fa92799224939e46f35f8fe47fb42d08f9b29e1 SHA512 514c3de6346bdea359036a79c880133f0eeed4cdfc9e811d662dc343f91ea43edda0f9760405a48e7f61ea1dd3478980cc7d3b5409ef27adcb5311a06e36297e
-DIST sqlite-src-3200000.zip 10575632 BLAKE2B 2f0f41129e56477531f59d91e02469ccf5e21eaadce57a2a81bde9bcd549c12d55a496f27fd07bf0ded78b55aa8a6e4d48e5073638dc87eaeef8e989906fccfb SHA512 40fe7972902d041f012c7739c8712aa40069aebc7be680fde8f43b33fed885bfc42331bfb7200651486484edb71cbdd77ddb9c119d0847bdfb0e92063090f029
DIST sqlite-src-3200100.zip 10575637 BLAKE2B e45bad50d728e749c258546dd75a9d647ca35584092c663fed176fdd69164623bbe58afd15cd74fcd32a0cec893cffdb0f096873188c42ec5595ef7d635c79ad SHA512 845a0d64c9356aadf178c04dd716bbd37a7353526b06cfa8e8f65653cf6a1893a5c5e8c78d20b43910c34d9167272cf517749c91ed0ba7686977e3d0327e8939
DIST sqlite-src-3210000.zip 10577695 BLAKE2B 21f110d4cdda95864a39b9b9b65985d29e1409ed38a9bda692d33dde845c115476cd77dc3b9cd1b7359ff383dc3050cbf0437b113ea128392aef50dd3b778d46 SHA512 3a054422da80d750fd5ab297f9d2728f4e7b55fa790a72d55da8c381835571992d56b349e50d4680b04c9e2e44d6fa83009c2df3ffa045f43ff9059bb8736894
DIST sqlite-src-3220000.zip 10721627 BLAKE2B ed4cf93c36c095edeccd6ee4dac5419c516264a42eb9d6d2e333b1d4a134c6198dfcd2bbae41dff811616f0dc7f9e9bb487f9c5b5f631fcb5885540a84bf527a SHA512 e35defb0ffcc10100399051bc734746de40fa3dc5cd673eac470fb58cd8bd6d911b6dacb5e8489e2dd79c6ae75faaeb8c02384f64c4595963e62bd3faeb9446c
diff --git a/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch b/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch
deleted file mode 100644
index 1278630c092..00000000000
--- a/dev-db/sqlite/files/sqlite-3.18.0-full_tarball-build.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Fix building with dlopen() not available.
-
---- Makefile.in
-+++ Makefile.in
-@@ -562,6 +562,7 @@
- #
- SHELL_OPT = -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS4
- # SHELL_OPT += -DSQLITE_ENABLE_FTS5
-+SHELL_OPT += -DSQLITE_ENABLE_DBSTAT_VTAB
- SHELL_OPT += -DSQLITE_ENABLE_EXPLAIN_COMMENTS
- SHELL_OPT += -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
- FUZZERSHELL_OPT = -DSQLITE_ENABLE_JSON1
-@@ -587,25 +588,25 @@
-
- libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
-- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- -rpath "$(TCLLIBDIR)" \
- -version-info "8:6:8" \
- -avoid-version
-
--sqlite3$(TEXE): $(TOP)/src/shell.c sqlite3.c
-- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
-- $(TOP)/src/shell.c sqlite3.c \
-- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la
-+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
-+ $(TOP)/src/shell.c libsqlite3.la \
-+ $(LIBREADLINE)
-
--sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
-
--dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
-
--scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
- $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
-- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/scrub.c libsqlite3.la
-
- srcck1$(BEXE): $(TOP)/tool/srcck1.c
- $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -681,7 +682,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo: sqlite3.c
-- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
-
- # Rules to build the LEMON compiler generator
- #
-@@ -1107,13 +1108,13 @@
-
- # Fuzz testing
- fuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
-- ./fuzzcheck$(TEXE) $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
-
- fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA)
-- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
-
- valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA)
-- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
-
- # The veryquick.test TCL tests.
- #
-@@ -1143,36 +1144,35 @@
- smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
- ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
-
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
-+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
- echo "#define TCLSH 2" > $@
-- echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
-- cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
-+ cat $(TOP)/src/tclsqlite.c >> $@
- echo "static const char *tclsh_main_loop(void){" >> $@
- echo "static const char *zMainloop = " >> $@
- $(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
- echo "; return zMainloop; }" >> $@
-
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
-- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
-+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
-
--dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
-+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
- $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
-- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
-
--showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
-
--showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
-
--showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE): $(TOP)/tool/showjournal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
-
--showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE): $(TOP)/tool/showwal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
-
--changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
-
- rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
- $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
-@@ -1191,11 +1191,11 @@
- kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
- $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
-
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
-- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
-+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
-
--loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
-+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
-
- # This target will fail if the SQLite amalgamation contains any exported
- # symbols that do not begin with "sqlite3_". It is run as part of the
---- configure.ac
-+++ configure.ac
-@@ -584,6 +584,9 @@
- if test "${use_loadextension}" = "yes" ; then
- OPT_FEATURE_FLAGS=""
- AC_SEARCH_LIBS(dlopen, dl)
-+ if test "${ac_cv_search_dlopen}" = "no" ; then
-+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+ fi
- else
- OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
diff --git a/dev-db/sqlite/sqlite-3.19.3.ebuild b/dev-db/sqlite/sqlite-3.19.3.ebuild
deleted file mode 100644
index c8602deee4e..00000000000
--- a/dev-db/sqlite/sqlite-3.19.3.ebuild
+++ /dev/null
@@ -1,261 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
-
-SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
-DOC_PV="${SRC_PV}"
-# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
-
-DESCRIPTION="A SQL Database Engine in a C Library"
-HOMEPAGE="https://sqlite.org/"
-SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
- tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
-
-LICENSE="public-domain"
-SLOT="3"
-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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-
-RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- doc? ( app-arch/unzip )
- tcl? ( app-arch/unzip )
- test? (
- app-arch/unzip
- dev-lang/tcl:0[${MULTILIB_USEDEP}]
- )
- tools? ( app-arch/unzip )"
-
-full_tarball() {
- use tcl || use test || use tools
-}
-
-pkg_setup() {
- if full_tarball; then
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
- else
- S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
- fi
-}
-
-src_prepare() {
- if full_tarball; then
- eapply -p0 "${FILESDIR}/${PN}-3.18.0-full_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
- else
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- sed \
- -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])/" \
- -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
- -i configure.ac || die "sed failed"
- fi
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local CPPFLAGS="${CPPFLAGS}" options=()
-
- options+=(
- --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
- --enable-threadsafe
- )
- if ! full_tarball; then
- options+=(--disable-static-shell)
- fi
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- append-cppflags -DSQLITE_ENABLE_RTREE
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # debug USE flag.
- if full_tarball; then
- options+=($(use_enable debug))
- else
- if use debug; then
- append-cppflags -DSQLITE_DEBUG
- else
- append-cppflags -DNDEBUG
- fi
- fi
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- if full_tarball; then
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if full_tarball && use readline; then
- options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if full_tarball; then
- options+=(--enable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
diff --git a/dev-db/sqlite/sqlite-3.20.0.ebuild b/dev-db/sqlite/sqlite-3.20.0.ebuild
deleted file mode 100644
index 8d12b64e110..00000000000
--- a/dev-db/sqlite/sqlite-3.20.0.ebuild
+++ /dev/null
@@ -1,261 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
-
-SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
-DOC_PV="${SRC_PV}"
-# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
-
-DESCRIPTION="A SQL Database Engine in a C Library"
-HOMEPAGE="https://sqlite.org/"
-SRC_URI="doc? ( https://sqlite.org/2017/${PN}-doc-${DOC_PV}.zip )
- tcl? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- test? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- tools? ( https://sqlite.org/2017/${PN}-src-${SRC_PV}.zip )
- !tcl? ( !test? ( !tools? ( https://sqlite.org/2017/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
-
-LICENSE="public-domain"
-SLOT="3"
-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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-
-RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- doc? ( app-arch/unzip )
- tcl? ( app-arch/unzip )
- test? (
- app-arch/unzip
- dev-lang/tcl:0[${MULTILIB_USEDEP}]
- )
- tools? ( app-arch/unzip )"
-
-full_tarball() {
- use tcl || use test || use tools
-}
-
-pkg_setup() {
- if full_tarball; then
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
- else
- S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
- fi
-}
-
-src_prepare() {
- if full_tarball; then
- eapply -p0 "${FILESDIR}/${PN}-3.20.0-full_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
- else
- eapply -p0 "${FILESDIR}/${PN}-3.16.0-nonfull_tarball-build.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- sed \
- -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])/" \
- -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
- -i configure.ac || die "sed failed"
- fi
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local CPPFLAGS="${CPPFLAGS}" options=()
-
- options+=(
- --enable-$(full_tarball && echo load-extension || echo dynamic-extensions)
- --enable-threadsafe
- )
- if ! full_tarball; then
- options+=(--disable-static-shell)
- fi
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- append-cppflags -DSQLITE_ENABLE_RTREE
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # debug USE flag.
- if full_tarball; then
- options+=($(use_enable debug))
- else
- if use debug; then
- append-cppflags -DSQLITE_DEBUG
- else
- append-cppflags -DNDEBUG
- fi
- fi
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- if full_tarball; then
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if full_tarball && use readline; then
- options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if full_tarball; then
- options+=(--enable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash rbu scrub showdb showjournal showstat4 showwal sqldiff sqlite3_analyzer
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- prune_libtool_files
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2018-04-16 18:29 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2018-04-16 18:29 UTC (permalink / raw
To: gentoo-commits
commit: 90e78ec309ae1376c2cd8a84a096beca94e191fc
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Apr 16 17:57:05 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Apr 16 18:27:34 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90e78ec3
dev-db/sqlite: Version bump (3.23.1).
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.23.0-full_archive-build.patch | 407 +++++++++++++++++++++
...to_table-valued_functions_within_triggers.patch | 24 ++
...to_table-valued_functions_within_triggers.patch | 14 +
dev-db/sqlite/sqlite-3.23.1.ebuild | 308 ++++++++++++++++
5 files changed, 756 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 0ff25d983a4..bc2fef0a180 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,9 +1,12 @@
DIST sqlite-autoconf-3200100.tar.gz 2565638 BLAKE2B bd1d32c211ea906cb2dbf78ea54d364db1a642d8a3b2751a427521a9da3391a2cd23c1ecdc5ff70b68f4166c583e69373f566cb04847295542185ab598e79c1b SHA512 56e3d326ea2225cadc628c3518d46d9f7c4bafa0e3612f2b7ab0dc0d79fcbb7e095f6d84a9a48e1c6d83adcdc8706ad5ac4404f0f622c7fe38cfde3a7e7e69f0
DIST sqlite-autoconf-3210000.tar.gz 2568942 BLAKE2B 83a7095fd5fd5447a3c16816ceb9f51f393de9689942bd4eb4c6eafe357a1dd1783500f8faf2765fa6628da6a39f550237b661af1337ac063ca285f5f0a5218e SHA512 8f00708965eacef171620c49538f75768d350ec3f2bfef412a5c70af865ab03b6a64ce1e65d9fdb3d66f4d00262a30fc162b01fd69f63c05c14d5243374b6298
DIST sqlite-autoconf-3220000.tar.gz 2644649 BLAKE2B e73fd7846362e6cc07eb96ea18e8883c1473c2b07c6e0c89e7e65726c5a6556b50bac71904a5b3a431ba40ff72b32e55c3e5ab7461567b5643560a0790a9a4dd SHA512 13e791bb1d7ba7edb5d84f4945f36ce2e03898a5bb1612d28799ef35a100f32e85cbb38f4ef65a7b43d020e5d48bf09b2e79cbb2003cc8aca2b09458b8c5d5bc
+DIST sqlite-autoconf-3230100.tar.gz 2675362 BLAKE2B 2dd075f0dc05425563a8e679bb463724296294b5845746f06b51a24c9601be203ee0f2213f43eaca0757fcbb54b777cee746d873c98f377a0b010d8066d7fcb5 SHA512 52cae7ed0678b763d40373ae260672b906861379428529a58a017cbc82419a6b109e0b2ac7ff5532e6d941693cc4ab68e6563f424b92b3b27c8916859a6e4826
DIST sqlite-doc-3200100.zip 5759028 BLAKE2B a633672b739160873e64b89e1350c85b0002fd8f268b6ae0f5189de12f411125fbb309585175727b8915fe1468b3e70e7c33239826232c3e7bc8c1c59132bec0 SHA512 518ca59644cecfcd67f511268112e421c5d7bbd77ef1e33304bf306ef110becf1e2a7fe37c506ec6892edb9d5c6ee77657b374c2e061f49890d18af062dea2b3
DIST sqlite-doc-3210000.zip 5800635 BLAKE2B c9e15fe7373045783d05bd7b0a70f980e3c8a3c0ec4243f85fe338788830a58e82f1c6b3c053efe75caa33e99a6162e2f9831e4f5b9577c0bf90a305ee2f0381 SHA512 799c7279166b489d1a5acc9410808c2d4b78e64037fc15b60764180fe1c698f35e27e86793140302f560cfa583baa2c33e416d5c9e1842ec58c6cb6093729334
DIST sqlite-doc-3220000.zip 5856836 BLAKE2B 1be73848040f3ae9734a44c94e4c36cae269d79abb20467f9f8368754e1ae07f4c25490be985b44d08f427e281fc268c6569dc0f5bbb6254621c62798507d687 SHA512 f9141d3907e5c1a3008d3b7e111e46e7ff1f010358eb682d3e1187a67deb7cca7ba1d5fbc5b19da26ee8df3a0c71a098fd0e8d8ca89c25e5ad2b3e12ba7dc312
+DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471
DIST sqlite-src-3200100.zip 10575637 BLAKE2B e45bad50d728e749c258546dd75a9d647ca35584092c663fed176fdd69164623bbe58afd15cd74fcd32a0cec893cffdb0f096873188c42ec5595ef7d635c79ad SHA512 845a0d64c9356aadf178c04dd716bbd37a7353526b06cfa8e8f65653cf6a1893a5c5e8c78d20b43910c34d9167272cf517749c91ed0ba7686977e3d0327e8939
DIST sqlite-src-3210000.zip 10577695 BLAKE2B 21f110d4cdda95864a39b9b9b65985d29e1409ed38a9bda692d33dde845c115476cd77dc3b9cd1b7359ff383dc3050cbf0437b113ea128392aef50dd3b778d46 SHA512 3a054422da80d750fd5ab297f9d2728f4e7b55fa790a72d55da8c381835571992d56b349e50d4680b04c9e2e44d6fa83009c2df3ffa045f43ff9059bb8736894
DIST sqlite-src-3220000.zip 10721627 BLAKE2B ed4cf93c36c095edeccd6ee4dac5419c516264a42eb9d6d2e333b1d4a134c6198dfcd2bbae41dff811616f0dc7f9e9bb487f9c5b5f631fcb5885540a84bf527a SHA512 e35defb0ffcc10100399051bc734746de40fa3dc5cd673eac470fb58cd8bd6d911b6dacb5e8489e2dd79c6ae75faaeb8c02384f64c4595963e62bd3faeb9446c
+DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b
diff --git a/dev-db/sqlite/files/sqlite-3.23.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.23.0-full_archive-build.patch
new file mode 100644
index 00000000000..f46df1c15a5
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.23.0-full_archive-build.patch
@@ -0,0 +1,407 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -308,6 +308,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -356,8 +359,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -426,7 +432,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -449,8 +454,7 @@
+ $(TOP)/ext/misc/spellfix.c \
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+- $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c
++ $(TOP)/ext/misc/wholenumber.c
+
+ # Source code to the library files needed by the test fixture
+ #
+@@ -613,25 +617,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -710,7 +714,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1004,14 +1008,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/src/test_windirent.c
+
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
+@@ -1170,15 +1169,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1209,24 +1208,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1237,30 +1235,30 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1279,11 +1277,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -590,6 +590,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2175,3 +2177,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -124,6 +125,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -966,13 +971,6 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3522,7 +3520,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5411,6 +5411,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -8367,6 +8368,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -116,6 +116,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -400,6 +401,10 @@
+ json1.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
diff --git a/dev-db/sqlite/files/sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch b/dev-db/sqlite/files/sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
new file mode 100644
index 00000000000..c97679daf7d
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
@@ -0,0 +1,24 @@
+https://sqlite.org/src/info/b7178209152452e8
+
+--- /src/attach.c
++++ /src/attach.c
+@@ -502,6 +502,9 @@
+ if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
+ if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
+ #endif
++ if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
++ return 1;
++ }
+ }
+ return 0;
+ }
+--- /test/triggerE.test
++++ /test/triggerE.test
+@@ -57,6 +57,7 @@
+ 7 { BEFORE DELETE ON t1 BEGIN SELECT * FROM t2 ORDER BY ?; END; }
+ 8 { BEFORE UPDATE ON t1 BEGIN UPDATE t2 SET c = ?; END; }
+ 9 { BEFORE UPDATE ON t1 BEGIN UPDATE t2 SET c = 1 WHERE d = ?; END; }
++ 10 { AFTER INSERT ON t1 BEGIN SELECT * FROM pragma_stats(?); END; }
+ } {
+ catchsql {drop trigger tr1}
+ do_catchsql_test 1.1.$tn "CREATE TRIGGER tr1 $defn" [list 1 $errmsg]
diff --git a/dev-db/sqlite/files/sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch b/dev-db/sqlite/files/sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
new file mode 100644
index 00000000000..c60cd9c90dc
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch
@@ -0,0 +1,14 @@
+https://sqlite.org/src/info/b7178209152452e8
+
+--- /sqlite3.c
++++ /sqlite3.c
+@@ -102780,6 +102780,9 @@
+ if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
+ if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
+ #endif
++ if( pItem->fg.isTabFunc && sqlite3FixExprList(pFix, pItem->u1.pFuncArg) ){
++ return 1;
++ }
+ }
+ return 0;
+ }
diff --git a/dev-db/sqlite/sqlite-3.23.1.ebuild b/dev-db/sqlite/sqlite-3.23.1.ebuild
new file mode 100644
index 00000000000..ea2190559b2
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.23.1.ebuild
@@ -0,0 +1,308 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="A SQL Database Engine in a C Library"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ dev-lang/tcl:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.23.0-full_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.23.1-full_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_table-valued_functions_within_triggers.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2018-06-13 14:36 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2018-06-13 14:36 UTC (permalink / raw
To: gentoo-commits
commit: f8f76a9e916900b515be9bdb2231d89bd141fcb6
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sun Jun 10 03:45:53 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Jun 13 14:36:22 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8f76a9e
dev-db/sqlite: Version bump (3.24.0).
dev-db/sqlite/Manifest | 3 +
...ll_archive-archive_command_paths_handling.patch | 14 +
.../files/sqlite-3.24.0-full_archive-build.patch | 407 +++++++++++++++++++++
...ll_archive-archive_command_paths_handling.patch | 14 +
dev-db/sqlite/sqlite-3.24.0.ebuild | 308 ++++++++++++++++
5 files changed, 746 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index b65ff1f4c4e..f351977d074 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,3 +1,6 @@
DIST sqlite-autoconf-3230100.tar.gz 2675362 BLAKE2B 2dd075f0dc05425563a8e679bb463724296294b5845746f06b51a24c9601be203ee0f2213f43eaca0757fcbb54b777cee746d873c98f377a0b010d8066d7fcb5 SHA512 52cae7ed0678b763d40373ae260672b906861379428529a58a017cbc82419a6b109e0b2ac7ff5532e6d941693cc4ab68e6563f424b92b3b27c8916859a6e4826
+DIST sqlite-autoconf-3240000.tar.gz 2699252 BLAKE2B c8beb3b90bdd06f76cafeba859cbf91cf4d0cb313fc9202d210ccbad5fca7f9a062ede63387e814d664f0ae38bcfa48db222f466dbcd429fecfb53cfdac155c4 SHA512 eaec866de26003ec36559aab15dd18dc0e6029453002a4eec5e176bb35a712b8b06c235436e6c1a226b67c7eb90d7a26c2b3b3d9a5e6e92a5af485236b77c878
DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471
+DIST sqlite-doc-3240000.zip 9030826 BLAKE2B 4444e3dd0ce782e19fa01c881e0b5453723419ef1cf95cbe751d759a264bbe288a5c23a2b6514ed459b99b11637349c02def68fed7df8625bfc161307e44564c SHA512 31e9046cea569d7ad1b3af176e1bb18cd59474afb6849871ead6e7c9c096f046162fb313a38684a8c944fad9f689c4c3c692be1d7dc6a8ef5a6685bbc7dfdab6
DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b
+DIST sqlite-src-3240000.zip 10980065 BLAKE2B 201a59cb34271e5ac79e96e4e2ea64f8b61aa99c44eedf61c0a21752ad4376caaf7980a6923dca66266b1a315d9867871d0d172c17907b4147c15431aa212a70 SHA512 812c2df7179abb1e445b5b3e161c940b120c53366a7b2c1f0bfc3599cd9921e5543ba39ca3f297eeaefec318f10c15f630f00f9cf04133c7cd419a04f3bbdd0e
diff --git a/dev-db/sqlite/files/sqlite-3.24.0-full_archive-archive_command_paths_handling.patch b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-archive_command_paths_handling.patch
new file mode 100644
index 00000000000..5c27aa3465b
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-archive_command_paths_handling.patch
@@ -0,0 +1,14 @@
+https://sqlite.org/src/info/27291f2d7fd4dadf
+
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -5284,7 +5284,8 @@
+ "SELECT "
+ " ($dir || name),"
+ " writefile(($dir || name), %s, mode, mtime) "
+- "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)";
++ "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)"
++ " AND name NOT GLOB '*..[/\\]*'";
+
+ const char *azExtraArg[] = {
+ "sqlar_uncompress(data, sz)",
diff --git a/dev-db/sqlite/files/sqlite-3.24.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-build.patch
new file mode 100644
index 00000000000..072b8049c14
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.24.0-full_archive-build.patch
@@ -0,0 +1,407 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -309,6 +309,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -357,8 +360,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -427,7 +433,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -450,8 +455,7 @@
+ $(TOP)/ext/misc/spellfix.c \
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+- $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c
++ $(TOP)/ext/misc/wholenumber.c
+
+ # Source code to the library files needed by the test fixture
+ #
+@@ -615,25 +619,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -712,7 +716,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1009,14 +1013,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/src/test_windirent.c
+
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
+@@ -1175,15 +1174,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1214,24 +1213,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1242,30 +1240,30 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1284,11 +1282,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -590,6 +590,9 @@
+ if test "${use_loadextension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2175,3 +2177,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -124,6 +125,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -939,13 +944,6 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3632,7 +3630,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5523,6 +5523,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -8539,6 +8540,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -116,6 +116,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -401,6 +402,10 @@
+ json1.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
diff --git a/dev-db/sqlite/files/sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch b/dev-db/sqlite/files/sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch
new file mode 100644
index 00000000000..69ab0482270
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch
@@ -0,0 +1,14 @@
+https://sqlite.org/src/info/27291f2d7fd4dadf
+
+--- /shell.c
++++ /shell.c
+@@ -12786,7 +12786,8 @@
+ "SELECT "
+ " ($dir || name),"
+ " writefile(($dir || name), %s, mode, mtime) "
+- "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)";
++ "FROM %s WHERE (%s) AND (data IS NULL OR $dirOnly = 0)"
++ " AND name NOT GLOB '*..[/\\]*'";
+
+ const char *azExtraArg[] = {
+ "sqlar_uncompress(data, sz)",
diff --git a/dev-db/sqlite/sqlite-3.24.0.ebuild b/dev-db/sqlite/sqlite-3.24.0.ebuild
new file mode 100644
index 00000000000..bedd681465f
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.24.0.ebuild
@@ -0,0 +1,308 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))"
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ doc? ( app-arch/unzip )
+ tcl? ( app-arch/unzip )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}]
+ )
+ tools? ( app-arch/unzip )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.24.0-full_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.24.0-full_archive-archive_command_paths_handling.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.21.0-nonfull_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.24.0-nonfull_archive-archive_command_paths_handling.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ append-cppflags -DSQLITE_ENABLE_RTREE
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ prune_libtool_files
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2018-10-02 20:08 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2018-10-02 20:08 UTC (permalink / raw
To: gentoo-commits
commit: de3e209e06e06633a4be943468831d6392e54680
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Tue Oct 2 19:18:50 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Oct 2 20:07:24 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de3e209e
dev-db/sqlite: Version bump (3.25.2).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.25.0-full_archive-build.patch | 407 +++++++++++++++++++++
.../sqlite-3.25.0-nonfull_archive-build.patch | 14 +
...low_window_functions_in_recursive_queries.patch | 49 +++
.../files/sqlite-3.25.2-full_archive-tests.patch | 70 ++++
...low_window_functions_in_recursive_queries.patch | 19 +
dev-db/sqlite/sqlite-3.25.2.ebuild | 322 ++++++++++++++++
7 files changed, 884 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index f351977d074..d61f68c44ac 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,6 +1,9 @@
DIST sqlite-autoconf-3230100.tar.gz 2675362 BLAKE2B 2dd075f0dc05425563a8e679bb463724296294b5845746f06b51a24c9601be203ee0f2213f43eaca0757fcbb54b777cee746d873c98f377a0b010d8066d7fcb5 SHA512 52cae7ed0678b763d40373ae260672b906861379428529a58a017cbc82419a6b109e0b2ac7ff5532e6d941693cc4ab68e6563f424b92b3b27c8916859a6e4826
DIST sqlite-autoconf-3240000.tar.gz 2699252 BLAKE2B c8beb3b90bdd06f76cafeba859cbf91cf4d0cb313fc9202d210ccbad5fca7f9a062ede63387e814d664f0ae38bcfa48db222f466dbcd429fecfb53cfdac155c4 SHA512 eaec866de26003ec36559aab15dd18dc0e6029453002a4eec5e176bb35a712b8b06c235436e6c1a226b67c7eb90d7a26c2b3b3d9a5e6e92a5af485236b77c878
+DIST sqlite-autoconf-3250200.tar.gz 2763876 BLAKE2B 3d97cc60edf8f91855215bd59260362665c8ec7699510f2e07c7ba57e10c400dcc99bb392e216f798bef1ffa7120b48ee62ce144a871741ef57b3aefeab875d6 SHA512 5ef9a6dfbb0822257af1a3a379785a95ab02edecbbb53b57074ddd0b8dc294fc07cbb9a8a7acc4e1640fb1743525ed6331fecebbddce01bc017330b20e127ad9
DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471
DIST sqlite-doc-3240000.zip 9030826 BLAKE2B 4444e3dd0ce782e19fa01c881e0b5453723419ef1cf95cbe751d759a264bbe288a5c23a2b6514ed459b99b11637349c02def68fed7df8625bfc161307e44564c SHA512 31e9046cea569d7ad1b3af176e1bb18cd59474afb6849871ead6e7c9c096f046162fb313a38684a8c944fad9f689c4c3c692be1d7dc6a8ef5a6685bbc7dfdab6
+DIST sqlite-doc-3250200.zip 9229732 BLAKE2B 9bc4499c2934d15428dd30e0522362a2c2e703061c293f1b657f01d3945612760be3b4f145ddf76d9cf87953fae26884646887e53c0c55683ce42bc239dcf952 SHA512 a0b764ca0eea0e9719d46b6e1f92db78578457c8331976d4712c56cd10fc062fd73629686a0e45dfdeb505fbfbe0c53652a5e64507702ff4e12b62a2fc8d8211
DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b
DIST sqlite-src-3240000.zip 10980065 BLAKE2B 201a59cb34271e5ac79e96e4e2ea64f8b61aa99c44eedf61c0a21752ad4376caaf7980a6923dca66266b1a315d9867871d0d172c17907b4147c15431aa212a70 SHA512 812c2df7179abb1e445b5b3e161c940b120c53366a7b2c1f0bfc3599cd9921e5543ba39ca3f297eeaefec318f10c15f630f00f9cf04133c7cd419a04f3bbdd0e
+DIST sqlite-src-3250200.zip 11381811 BLAKE2B 6183436f66c862c32d1dfd59ea4ccb5eaf3dd516ffcf9d7edf786e8fbf56eff3cb84d08e291b2e86fae25e537bed452aed693bdb0f0d6bb6581da86641013557 SHA512 7354af2d45c574ba867fab8aabc6ff903279f028aebed50c71019066df78f61a0b941564c572c87b0f3ed3e5783bf325a690a9957d775228fbbb293dd9a5ad37
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
new file mode 100644
index 00000000000..d39d843d12c
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.25.0-full_archive-build.patch
@@ -0,0 +1,407 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -310,6 +310,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -359,8 +362,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -430,7 +436,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -453,8 +458,7 @@
+ $(TOP)/ext/misc/spellfix.c \
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+- $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c
++ $(TOP)/ext/misc/wholenumber.c
+
+ # Source code to the library files needed by the test fixture
+ #
+@@ -620,25 +624,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -717,7 +721,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1017,14 +1021,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/src/test_windirent.c
+
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
+@@ -1183,15 +1182,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1222,24 +1221,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1250,30 +1248,30 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ rollback-test$(TEXE): $(TOP)/tool/rollback-test.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/tool/rollback-test.c sqlite3.lo $(TLIBS)
+@@ -1295,11 +1293,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -587,6 +587,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2175,3 +2177,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -127,6 +128,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -936,13 +941,6 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3654,7 +3652,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5549,6 +5549,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -8584,6 +8585,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -117,6 +117,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -403,6 +404,10 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
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
new file mode 100644
index 00000000000..be0a7e30dde
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch
@@ -0,0 +1,14 @@
+Fix building with dlopen() not available.
+
+--- /configure.ac
++++ /configure.ac
+@@ -102,6 +102,9 @@
+ [], [enable_dynamic_extensions=yes])
+ if test x"$enable_dynamic_extensions" != "xno"; then
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no"; then
++ BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
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
new file mode 100644
index 00000000000..6b34e2e4f9d
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch
@@ -0,0 +1,49 @@
+https://sqlite.org/src/info/e8275b415a2f03bee
+https://sqlite.org/src/info/7fc2994434c7d9ed
+
+--- /src/select.c
++++ /src/select.c
+@@ -2318,6 +2318,13 @@
+ Expr *pLimit; /* Saved LIMIT and OFFSET */
+ int regLimit, regOffset; /* Registers used by LIMIT and OFFSET */
+
++#ifndef SQLITE_OMIT_WINDOWFUNC
++ if( p->pWin ){
++ sqlite3ErrorMsg(pParse, "cannot use window functions in recursive queries");
++ return;
++ }
++#endif
++
+ /* Obtain authorization to do a recursive query */
+ if( sqlite3AuthCheck(pParse, SQLITE_RECURSIVE, 0, 0, 0) ) return;
+
+--- /test/with1.test
++++ /test/with1.test
+@@ -865,6 +865,27 @@
+ SELECT * FROM i;
+ } {1 {recursive aggregate queries not supported}}
+
++# Or window-function recursive queries. Ticket e8275b41.
++#
++ifcapable windowfunc {
++ do_catchsql_test 16.2 {
++ WITH RECURSIVE
++ i(x) AS (VALUES(1) UNION SELECT count(*) OVER () FROM i)
++ SELECT * FROM i;
++ } {1 {cannot use window functions in recursive queries}}
++ do_catchsql_test 16.3 {
++ WITH RECURSIVE
++ t(id, parent) AS (VALUES(1,2)),
++ q(id, parent, rn) AS (
++ VALUES(1,2,3)
++ UNION ALL
++ SELECT t.*, ROW_NUMBER() OVER (ORDER BY t.id) AS rn
++ FROM q JOIN t ON t.parent = q.id
++ )
++ SELECT * FROM q;
++ } {1 {cannot use window functions in recursive queries}}
++}
++
+ #-------------------------------------------------------------------------
+ do_execsql_test 17.1 {
+ WITH x(a) AS (
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
new file mode 100644
index 00000000000..2868b3fc123
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.25.2-full_archive-tests.patch
@@ -0,0 +1,70 @@
+https://sqlite.org/src/info/d04b2013b5436430
+
+--- /test/like3.test
++++ /test/like3.test
+@@ -130,12 +130,14 @@
+ do_execsql_test like3-5.110 {
+ SELECT x FROM t5a WHERE x LIKE '/a%';
+ } {/abc}
++ifcapable !icu {
+ do_eqp_test like3-5.111 {
+ SELECT x FROM t5a WHERE x LIKE '/a%';
+ } {
+ QUERY PLAN
+ `--SEARCH TABLE t5a USING COVERING INDEX sqlite_autoindex_t5a_1 (x>? AND x<?)
+ }
++}
+ do_execsql_test like3-5.120 {
+ SELECT x FROM t5a WHERE x LIKE '^12%' ESCAPE '^';
+ } {123}
+--- /test/window6.test
++++ /test/window6.test
+@@ -147,17 +147,17 @@
+ #-------------------------------------------------------------------------
+ #
+
+-do_execsql_test 6.0 {
+- SELECT LIKE('!', '', '!') x WHERE x;
+-} {}
+-
+-do_execsql_test 6.1 {
+- SELECT LIKE("!","","!")""WHeRE"";
+-} {}
+-
+-do_catchsql_test 6.2 {
+- SELECT LIKE("!","","!")""window"";
+-} {1 {near "window": syntax error}}
++ifcapable !icu {
++ do_execsql_test 6.0 {
++ SELECT LIKE('!', '', '!') x WHERE x;
++ } {}
++ do_execsql_test 6.1 {
++ SELECT LIKE("!","","!")""WHeRE"";
++ } {}
++ do_catchsql_test 6.2 {
++ SELECT LIKE("!","","!")""window"";
++ } {1 {near "window": syntax error}}
++}
+
+ reset_db
+ do_execsql_test 7.0 {
+@@ -166,9 +166,11 @@
+ INSERT INTO t1 VALUES('');
+ }
+
+-do_execsql_test 7.1 {
+- SELECT count(*) FROM t1 WHERE x LIKE '!' ESCAPE '!';
+-} {0}
++ifcapable !icu {
++ do_execsql_test 7.1 {
++ SELECT count(*) FROM t1 WHERE x LIKE '!' ESCAPE '!';
++ } {0}
++}
+
+ #-------------------------------------------------------------------------
+ #
+@@ -336,4 +338,3 @@
+ }
+
+ finish_test
+-
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
new file mode 100644
index 00000000000..4ee3d477cfc
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch
@@ -0,0 +1,19 @@
+https://sqlite.org/src/info/e8275b415a2f03bee
+https://sqlite.org/src/info/7fc2994434c7d9ed
+
+--- /sqlite3.c
++++ /sqlite3.c
+@@ -125441,6 +125441,13 @@
+ Expr *pLimit; /* Saved LIMIT and OFFSET */
+ int regLimit, regOffset; /* Registers used by LIMIT and OFFSET */
+
++#ifndef SQLITE_OMIT_WINDOWFUNC
++ if( p->pWin ){
++ sqlite3ErrorMsg(pParse, "cannot use window functions in recursive queries");
++ return;
++ }
++#endif
++
+ /* Obtain authorization to do a recursive query */
+ if( sqlite3AuthCheck(pParse, SQLITE_RECURSIVE, 0, 0, 0) ) return;
+
diff --git a/dev-db/sqlite/sqlite-3.25.2.ebuild b/dev-db/sqlite/sqlite-3.25.2.ebuild
new file mode 100644
index 00000000000..9ca3d39f36c
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.25.2.ebuild
@@ -0,0 +1,322 @@
+# Copyright 1999-2018 Arfrever Frehtes Taifersar Arahesis and others
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+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"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+RESTRICT="!test? ( test )"
+
+BDEPEND="doc? ( app-arch/unzip )
+ tcl? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ tools? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )"
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.25.0-full_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch"
+ eapply "${FILESDIR}/${PN}-3.25.2-full_archive-tests.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${D}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2018-12-19 17:59 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2018-12-19 17:59 UTC (permalink / raw
To: gentoo-commits
commit: 03c4c2460e7a3c1463352272bbadfae94097e997
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Dec 19 17:17:30 2018 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Dec 19 17:59:03 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03c4c246
dev-db/sqlite: Version bump (3.26.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.26.0-full_archive-build.patch | 405 +++++++++++++++++++++
dev-db/sqlite/sqlite-3.26.0.ebuild | 325 +++++++++++++++++
3 files changed, 733 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 0c139aa5e0e..a65d3bb0dbb 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -2,11 +2,14 @@ DIST sqlite-autoconf-3230100.tar.gz 2675362 BLAKE2B 2dd075f0dc05425563a8e679bb46
DIST sqlite-autoconf-3240000.tar.gz 2699252 BLAKE2B c8beb3b90bdd06f76cafeba859cbf91cf4d0cb313fc9202d210ccbad5fca7f9a062ede63387e814d664f0ae38bcfa48db222f466dbcd429fecfb53cfdac155c4 SHA512 eaec866de26003ec36559aab15dd18dc0e6029453002a4eec5e176bb35a712b8b06c235436e6c1a226b67c7eb90d7a26c2b3b3d9a5e6e92a5af485236b77c878
DIST sqlite-autoconf-3250200.tar.gz 2763876 BLAKE2B 3d97cc60edf8f91855215bd59260362665c8ec7699510f2e07c7ba57e10c400dcc99bb392e216f798bef1ffa7120b48ee62ce144a871741ef57b3aefeab875d6 SHA512 5ef9a6dfbb0822257af1a3a379785a95ab02edecbbb53b57074ddd0b8dc294fc07cbb9a8a7acc4e1640fb1743525ed6331fecebbddce01bc017330b20e127ad9
DIST sqlite-autoconf-3250300.tar.gz 2764429 BLAKE2B 6a79a8785c1e84002c031a86c6563e937a45d6ef4aae1b941d42c06cb8630210c33583f25e41f3f90b181ce47da650f81845ad88cafbf9c764164cf8b5d92e81 SHA512 5bc501d15367e097f4070185974b0c3a8246c06b205fb2258ed18870ff3fbf120ac5e0ba031a6744af89f7659206e28e7de2f0367bdb190b8412e453b43de4ba
+DIST sqlite-autoconf-3260000.tar.gz 2779667 BLAKE2B f4d737eb2249ce32fcb7541ba92f7362d417e84adb5f5c63778b6f427b3270b7e0b16e19daaef7fc7e4fca9ab462c96cdb00c65a731a90102f6bb256a27d84ae SHA512 8c3306b3814a0e9bc69b741f62bdb6efc9f1e07163ca3e3a1581994465de163a7924223522e812d6b3663c1525c7012a6f6d73ad333556eba9f97ce9326fbdb8
DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471
DIST sqlite-doc-3240000.zip 9030826 BLAKE2B 4444e3dd0ce782e19fa01c881e0b5453723419ef1cf95cbe751d759a264bbe288a5c23a2b6514ed459b99b11637349c02def68fed7df8625bfc161307e44564c SHA512 31e9046cea569d7ad1b3af176e1bb18cd59474afb6849871ead6e7c9c096f046162fb313a38684a8c944fad9f689c4c3c692be1d7dc6a8ef5a6685bbc7dfdab6
DIST sqlite-doc-3250200.zip 9229732 BLAKE2B 9bc4499c2934d15428dd30e0522362a2c2e703061c293f1b657f01d3945612760be3b4f145ddf76d9cf87953fae26884646887e53c0c55683ce42bc239dcf952 SHA512 a0b764ca0eea0e9719d46b6e1f92db78578457c8331976d4712c56cd10fc062fd73629686a0e45dfdeb505fbfbe0c53652a5e64507702ff4e12b62a2fc8d8211
DIST sqlite-doc-3250300.zip 9265285 BLAKE2B 0722f00d849b18dabf82d317eb0deeb5567534a9cb55e189f28b18e7a26b863190911a02a26e21cf39b3106e7e1a872c445a3d8b53876a16d245e77affb6abc4 SHA512 a57cefbb2338a87721fb34f7a0d19129a58fbce026f80719af7dbbeb7512c91ab59e07719d860cc1cf742807ab7b0b5f92cff3bf52f4dbbad8c6ca34ad0a68ac
+DIST sqlite-doc-3260000.zip 9321276 BLAKE2B 8e3802212eb938a3997bf8eef971baf8802895a8c38e959b2409857228e9a92b24c3f51679f7dc4847df8d9800f0fff2c09e391b3e30de8b2782bbc5267d5d40 SHA512 e59f74369adb3ffe3afc235e4369101b8ba077f9cac34d524e2425278c3a30f63340613e5baa0fc3c693265525377b6830a1c6b5e97fb06702b89eb604b1eade
DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b
DIST sqlite-src-3240000.zip 10980065 BLAKE2B 201a59cb34271e5ac79e96e4e2ea64f8b61aa99c44eedf61c0a21752ad4376caaf7980a6923dca66266b1a315d9867871d0d172c17907b4147c15431aa212a70 SHA512 812c2df7179abb1e445b5b3e161c940b120c53366a7b2c1f0bfc3599cd9921e5543ba39ca3f297eeaefec318f10c15f630f00f9cf04133c7cd419a04f3bbdd0e
DIST sqlite-src-3250200.zip 11381811 BLAKE2B 6183436f66c862c32d1dfd59ea4ccb5eaf3dd516ffcf9d7edf786e8fbf56eff3cb84d08e291b2e86fae25e537bed452aed693bdb0f0d6bb6581da86641013557 SHA512 7354af2d45c574ba867fab8aabc6ff903279f028aebed50c71019066df78f61a0b941564c572c87b0f3ed3e5783bf325a690a9957d775228fbbb293dd9a5ad37
DIST sqlite-src-3250300.zip 11384253 BLAKE2B dbc1d989b1f7ae26e34d629ae7926cfebacc0e3b9e07abb98ac6e6d2d801f111624d5b3f5a1d486580559ff0b42140bb798aa862df60946efa77d8b26c47fbd0 SHA512 7d6a38aea5626f7a32960fcdd109c647dd24a22ecf0772f01ffdba389f70fdfe6455f69733b22c220d4114a7d61d3d10097c23859d303e02d126988a1f663b65
+DIST sqlite-src-3260000.zip 11939787 BLAKE2B 89fc5294c203473a8817d23496b05b743aa9d64ac7c67c258432b6a48dfe41d554b09ed14820854333fe555442029e9c9ccea736be7b10be42d9184502938557 SHA512 02faacd831781f25a12ffc8858d648f481d8bbdb68814b18c4c96e3a661233d0e25d675b95feeb35eee4b5ea88e5e0a1fc5fbaecbe434d3f7246d80e81bff6a3
diff --git a/dev-db/sqlite/files/sqlite-3.26.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.26.0-full_archive-build.patch
new file mode 100644
index 00000000000..602582cf334
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.26.0-full_archive-build.patch
@@ -0,0 +1,405 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -311,6 +311,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -363,8 +366,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -434,7 +440,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -459,7 +464,6 @@
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+ $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/userauth/userauth.c
+
+ # Source code to the library files needed by the test fixture
+@@ -631,25 +635,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -744,7 +748,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1044,14 +1048,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/src/test_windirent.c
+
+ shell.c: $(SHELL_SRC) $(TOP)/tool/mkshellc.tcl
+@@ -1217,15 +1216,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1256,24 +1255,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1284,30 +1282,30 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1332,11 +1330,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -587,6 +587,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2176,3 +2178,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -127,6 +128,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -936,13 +941,6 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3765,7 +3763,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5649,6 +5649,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -8705,6 +8706,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -117,6 +117,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -403,6 +404,10 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
diff --git a/dev-db/sqlite/sqlite-3.26.0.ebuild b/dev-db/sqlite/sqlite-3.26.0.ebuild
new file mode 100644
index 00000000000..64c23846b1d
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.26.0.ebuild
@@ -0,0 +1,325 @@
+# Copyright 1999-2018 Arfrever Frehtes Taifersar Arahesis and others
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2018/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2018/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2018/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+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"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+RESTRICT="!test? ( test )"
+
+BDEPEND="doc? ( app-arch/unzip )
+ tcl? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ tools? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )"
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.26.0-full_archive-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${D}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2019-02-25 21:25 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2019-02-25 21:25 UTC (permalink / raw
To: gentoo-commits
commit: 288e67e4b78fea0cf549b9cf905e222c0ac188e1
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sat Feb 9 00:00:00 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Feb 25 21:24:53 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=288e67e4
dev-db/sqlite: Version bump (3.27.1).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.27.0-full_archive-build.patch | 461 +++++++++++++++++++++
dev-db/sqlite/sqlite-3.27.1.ebuild | 327 +++++++++++++++
3 files changed, 791 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index a65d3bb0dbb..014cb8bafcf 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -3,13 +3,16 @@ DIST sqlite-autoconf-3240000.tar.gz 2699252 BLAKE2B c8beb3b90bdd06f76cafeba859cb
DIST sqlite-autoconf-3250200.tar.gz 2763876 BLAKE2B 3d97cc60edf8f91855215bd59260362665c8ec7699510f2e07c7ba57e10c400dcc99bb392e216f798bef1ffa7120b48ee62ce144a871741ef57b3aefeab875d6 SHA512 5ef9a6dfbb0822257af1a3a379785a95ab02edecbbb53b57074ddd0b8dc294fc07cbb9a8a7acc4e1640fb1743525ed6331fecebbddce01bc017330b20e127ad9
DIST sqlite-autoconf-3250300.tar.gz 2764429 BLAKE2B 6a79a8785c1e84002c031a86c6563e937a45d6ef4aae1b941d42c06cb8630210c33583f25e41f3f90b181ce47da650f81845ad88cafbf9c764164cf8b5d92e81 SHA512 5bc501d15367e097f4070185974b0c3a8246c06b205fb2258ed18870ff3fbf120ac5e0ba031a6744af89f7659206e28e7de2f0367bdb190b8412e453b43de4ba
DIST sqlite-autoconf-3260000.tar.gz 2779667 BLAKE2B f4d737eb2249ce32fcb7541ba92f7362d417e84adb5f5c63778b6f427b3270b7e0b16e19daaef7fc7e4fca9ab462c96cdb00c65a731a90102f6bb256a27d84ae SHA512 8c3306b3814a0e9bc69b741f62bdb6efc9f1e07163ca3e3a1581994465de163a7924223522e812d6b3663c1525c7012a6f6d73ad333556eba9f97ce9326fbdb8
+DIST sqlite-autoconf-3270100.tar.gz 2797765 BLAKE2B a610528b626229e5379037cb2b8b405a564fecf7f999608bcd41b4ee3531259216c69897e4f2e1cdd78d092edf62c3fec40b6cb377d3c767b9f1bee05b09fa01 SHA512 1dca61b82ce1dbae2fe9c568ff97e0671900bab46b354bd0aadc1946cbc46b3ea84bd1504ae922f795d1ce10791bf7861a2873f045887646609e26b74919e8e4
DIST sqlite-doc-3230100.zip 8882546 BLAKE2B 1e80647e3789b9130a93e881933fb1260794d9ccf359969a16bdeb0df5a51787eaf8404641c4b760bedd45063d46f8874fd74a4da1fef0234f3d8e92db754d76 SHA512 d3a42621480a928446c5f71d0f2ee68e245b071971da38438f9070bd5bcbe1930ea5bd20e06c68543df75badd2e4565abc94420df50b7152c9cd129587471471
DIST sqlite-doc-3240000.zip 9030826 BLAKE2B 4444e3dd0ce782e19fa01c881e0b5453723419ef1cf95cbe751d759a264bbe288a5c23a2b6514ed459b99b11637349c02def68fed7df8625bfc161307e44564c SHA512 31e9046cea569d7ad1b3af176e1bb18cd59474afb6849871ead6e7c9c096f046162fb313a38684a8c944fad9f689c4c3c692be1d7dc6a8ef5a6685bbc7dfdab6
DIST sqlite-doc-3250200.zip 9229732 BLAKE2B 9bc4499c2934d15428dd30e0522362a2c2e703061c293f1b657f01d3945612760be3b4f145ddf76d9cf87953fae26884646887e53c0c55683ce42bc239dcf952 SHA512 a0b764ca0eea0e9719d46b6e1f92db78578457c8331976d4712c56cd10fc062fd73629686a0e45dfdeb505fbfbe0c53652a5e64507702ff4e12b62a2fc8d8211
DIST sqlite-doc-3250300.zip 9265285 BLAKE2B 0722f00d849b18dabf82d317eb0deeb5567534a9cb55e189f28b18e7a26b863190911a02a26e21cf39b3106e7e1a872c445a3d8b53876a16d245e77affb6abc4 SHA512 a57cefbb2338a87721fb34f7a0d19129a58fbce026f80719af7dbbeb7512c91ab59e07719d860cc1cf742807ab7b0b5f92cff3bf52f4dbbad8c6ca34ad0a68ac
DIST sqlite-doc-3260000.zip 9321276 BLAKE2B 8e3802212eb938a3997bf8eef971baf8802895a8c38e959b2409857228e9a92b24c3f51679f7dc4847df8d9800f0fff2c09e391b3e30de8b2782bbc5267d5d40 SHA512 e59f74369adb3ffe3afc235e4369101b8ba077f9cac34d524e2425278c3a30f63340613e5baa0fc3c693265525377b6830a1c6b5e97fb06702b89eb604b1eade
+DIST sqlite-doc-3270100.zip 9361284 BLAKE2B d9705bc5d3a40ec70df2fa16c9f3f7d3d4824ddcb59e101bc6d45bc5f6396c11ed9e5d548f59bc2f48cb515417bb03419e67f669a7e85678d05cb0c71a3a2c27 SHA512 a56cfe57702ab1ab342c24536bcd3c01c3c57fb9e863fc775f07275d236fc0617f7eb832ca5173bf5c4c5c4b7a0b4b80e2d19b91e7724b838bf141cf0852cc1f
DIST sqlite-src-3230100.zip 10849436 BLAKE2B 6bed0a45c83ddb51d665835d174f623b30b1c3b81562fdea2317b58d876a0852136fe4f8a3ebc7679676f366e19c84d0ad2f54d3d8c73712145099975f80cf1a SHA512 69a87b76860c3b172d9e68b0fc0b8c157b606375e2b7d793ce4bd4b898ef737cd721189bc6a3342c749e224e60fa96203d449668c49dff2ebdc682b49630a59b
DIST sqlite-src-3240000.zip 10980065 BLAKE2B 201a59cb34271e5ac79e96e4e2ea64f8b61aa99c44eedf61c0a21752ad4376caaf7980a6923dca66266b1a315d9867871d0d172c17907b4147c15431aa212a70 SHA512 812c2df7179abb1e445b5b3e161c940b120c53366a7b2c1f0bfc3599cd9921e5543ba39ca3f297eeaefec318f10c15f630f00f9cf04133c7cd419a04f3bbdd0e
DIST sqlite-src-3250200.zip 11381811 BLAKE2B 6183436f66c862c32d1dfd59ea4ccb5eaf3dd516ffcf9d7edf786e8fbf56eff3cb84d08e291b2e86fae25e537bed452aed693bdb0f0d6bb6581da86641013557 SHA512 7354af2d45c574ba867fab8aabc6ff903279f028aebed50c71019066df78f61a0b941564c572c87b0f3ed3e5783bf325a690a9957d775228fbbb293dd9a5ad37
DIST sqlite-src-3250300.zip 11384253 BLAKE2B dbc1d989b1f7ae26e34d629ae7926cfebacc0e3b9e07abb98ac6e6d2d801f111624d5b3f5a1d486580559ff0b42140bb798aa862df60946efa77d8b26c47fbd0 SHA512 7d6a38aea5626f7a32960fcdd109c647dd24a22ecf0772f01ffdba389f70fdfe6455f69733b22c220d4114a7d61d3d10097c23859d303e02d126988a1f663b65
DIST sqlite-src-3260000.zip 11939787 BLAKE2B 89fc5294c203473a8817d23496b05b743aa9d64ac7c67c258432b6a48dfe41d554b09ed14820854333fe555442029e9c9ccea736be7b10be42d9184502938557 SHA512 02faacd831781f25a12ffc8858d648f481d8bbdb68814b18c4c96e3a661233d0e25d675b95feeb35eee4b5ea88e5e0a1fc5fbaecbe434d3f7246d80e81bff6a3
+DIST sqlite-src-3270100.zip 12247922 BLAKE2B 324488f345e1b15c4d31772d709a7591e9e278842267d84e44cf62e63cbf0acc4a8da2e0d280a5d43d48f67235c067fd97f791d67916803746c83310cbb62c49 SHA512 5ae0d3ee747df85e5dcd7cb64057ec64843079cfcf163558aa793194ec8ba0ad5570d9c8cb152b6510357ec074da6dba7cfd2f64466f06565c54cd175d9f8945
diff --git a/dev-db/sqlite/files/sqlite-3.27.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.27.0-full_archive-build.patch
new file mode 100644
index 00000000000..18c6d4d7bd3
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.27.0-full_archive-build.patch
@@ -0,0 +1,461 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -311,6 +311,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -363,8 +366,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -434,7 +440,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -460,7 +465,6 @@
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+ $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/userauth/userauth.c
+
+ # Source code to the library files needed by the test fixture
+@@ -639,25 +643,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -767,7 +771,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1067,14 +1071,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/misc/memtrace.c \
+ $(TOP)/src/test_windirent.c
+
+@@ -1242,15 +1241,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1281,24 +1280,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1309,36 +1307,36 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
++ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1363,11 +1361,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -587,6 +587,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2176,3 +2178,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -127,6 +128,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -939,14 +944,7 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -3934,7 +3932,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5868,6 +5868,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -9045,6 +9046,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -700,42 +700,6 @@
+ #include <assert.h>
+ #include "zlib.h"
+
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+- sqlite3_context *context,
+- int argc,
+- sqlite3_value **argv
+-){
+- uLong nData;
+- uLongf sz;
+-
+- assert( argc==2 );
+- sz = sqlite3_value_int(argv[1]);
+-
+- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+- sqlite3_result_value(context, argv[0]);
+- }else{
+- const Bytef *pData= sqlite3_value_blob(argv[0]);
+- Bytef *pOut = sqlite3_malloc(sz);
+- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+- sqlite3_result_error(context, "error in uncompress()", -1);
+- }else{
+- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+- }
+- sqlite3_free(pOut);
+- }
+-}
+-
+-
+ /* Run a chunk of SQL. If any errors happen, print an error message
+ ** and exit.
+ */
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -117,6 +117,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -403,6 +404,10 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
diff --git a/dev-db/sqlite/sqlite-3.27.1.ebuild b/dev-db/sqlite/sqlite-3.27.1.ebuild
new file mode 100644
index 00000000000..570c5a4f74e
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.27.1.ebuild
@@ -0,0 +1,327 @@
+# Copyright 1999-2019 Arfrever Frehtes Taifersar Arahesis and others
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2019/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2019/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+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"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+RESTRICT="!test? ( test )"
+
+BDEPEND="doc? ( app-arch/unzip )
+ tcl? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ tools? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )"
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.27.0-full_archive-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${D}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2019-05-05 19:05 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2019-05-05 19:05 UTC (permalink / raw
To: gentoo-commits
commit: 5c428ae31d0a6189f17ce70609175e409304ddba
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sun May 5 01:28:48 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun May 5 19:04:00 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c428ae3
dev-db/sqlite: Version bump (3.28.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.28.0-full_archive-build.patch | 461 ++++++++++
...8.0-full_archive-segmentation_fault_fixes.patch | 954 +++++++++++++++++++++
.../files/sqlite-3.28.0-full_archive-tests.patch | 19 +
...-nonfull_archive-segmentation_fault_fixes.patch | 114 +++
dev-db/sqlite/sqlite-3.28.0.ebuild | 330 +++++++
6 files changed, 1881 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index e40683c22fb..7b659592e7a 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -2,11 +2,14 @@ DIST sqlite-autoconf-3250300.tar.gz 2764429 BLAKE2B 6a79a8785c1e84002c031a86c656
DIST sqlite-autoconf-3260000.tar.gz 2779667 BLAKE2B f4d737eb2249ce32fcb7541ba92f7362d417e84adb5f5c63778b6f427b3270b7e0b16e19daaef7fc7e4fca9ab462c96cdb00c65a731a90102f6bb256a27d84ae SHA512 8c3306b3814a0e9bc69b741f62bdb6efc9f1e07163ca3e3a1581994465de163a7924223522e812d6b3663c1525c7012a6f6d73ad333556eba9f97ce9326fbdb8
DIST sqlite-autoconf-3270100.tar.gz 2797765 BLAKE2B a610528b626229e5379037cb2b8b405a564fecf7f999608bcd41b4ee3531259216c69897e4f2e1cdd78d092edf62c3fec40b6cb377d3c767b9f1bee05b09fa01 SHA512 1dca61b82ce1dbae2fe9c568ff97e0671900bab46b354bd0aadc1946cbc46b3ea84bd1504ae922f795d1ce10791bf7861a2873f045887646609e26b74919e8e4
DIST sqlite-autoconf-3270200.tar.gz 2797531 BLAKE2B e4d0de32308e519e4f5f68dc0ff1e2098209325ab962a09814aa6af517cb408d1ac70f32fff56cca4ad78bec7d6dedb5b21f222ae391e0fe7e20df5abd37f65a SHA512 0ac2515c7816932a4f725e657122c9f202bd7aba637bad9af5b4592b85efdd10a55ad34ac621b60a7aea91b1021c2ef0924c6ddfe05b2edb4f70e3d34b005972
+DIST sqlite-autoconf-3280000.tar.gz 2810415 BLAKE2B e1af03476d97f96ef78d4e0a9df6ae69a06fb08e48046c843ed668b3f8c00c58263df07a4e8a22a1c7cfc920fd005fa6c2525dceeec4f724b43df7589ca3f777 SHA512 e800c0d9e6c8c01ccf1d714c6c4da4b98e9610c4c06557dda6393d0792a8ae09788703d4a74dcb21844c49b3629ff7ed95a4a86ff79872aafd2b49c672c7a570
DIST sqlite-doc-3250300.zip 9265285 BLAKE2B 0722f00d849b18dabf82d317eb0deeb5567534a9cb55e189f28b18e7a26b863190911a02a26e21cf39b3106e7e1a872c445a3d8b53876a16d245e77affb6abc4 SHA512 a57cefbb2338a87721fb34f7a0d19129a58fbce026f80719af7dbbeb7512c91ab59e07719d860cc1cf742807ab7b0b5f92cff3bf52f4dbbad8c6ca34ad0a68ac
DIST sqlite-doc-3260000.zip 9321276 BLAKE2B 8e3802212eb938a3997bf8eef971baf8802895a8c38e959b2409857228e9a92b24c3f51679f7dc4847df8d9800f0fff2c09e391b3e30de8b2782bbc5267d5d40 SHA512 e59f74369adb3ffe3afc235e4369101b8ba077f9cac34d524e2425278c3a30f63340613e5baa0fc3c693265525377b6830a1c6b5e97fb06702b89eb604b1eade
DIST sqlite-doc-3270100.zip 9361284 BLAKE2B d9705bc5d3a40ec70df2fa16c9f3f7d3d4824ddcb59e101bc6d45bc5f6396c11ed9e5d548f59bc2f48cb515417bb03419e67f669a7e85678d05cb0c71a3a2c27 SHA512 a56cfe57702ab1ab342c24536bcd3c01c3c57fb9e863fc775f07275d236fc0617f7eb832ca5173bf5c4c5c4b7a0b4b80e2d19b91e7724b838bf141cf0852cc1f
DIST sqlite-doc-3270200.zip 9371606 BLAKE2B 6d65f59f21eafab82ede6c89d09b8828e5a5e6f7ad7233877fe938773be0aee6fd347d7bba0101cc1d2e376181e4cfbcc2e36d47567b65af9167c4d1ba7f3540 SHA512 00a7c51aeaea2d9338662553c331addca8cd4ae656f4090630b4b2c2e6ceffffd9bd3c6a97117915577cfd6dafeddf9da21f865ab378f86c4832ba0b1c419a2f
+DIST sqlite-doc-3280000.zip 9421770 BLAKE2B 695eab96f718307a7aff8a171d9e416ddb4b17039ef7230a458dc7d256e2f07a5b41d3aa1a3f085e5e418c297b5dd1d2ba5e4827434329d1ed61d3dd1f618f3d SHA512 83e23dff00614d31d501c66c29d8d4aa780b38859242b58937243235d185fe3db2f9f3c1accf9bf2df0b457a6e32612a00e82f503a8665aad4f19602e2b36396
DIST sqlite-src-3250300.zip 11384253 BLAKE2B dbc1d989b1f7ae26e34d629ae7926cfebacc0e3b9e07abb98ac6e6d2d801f111624d5b3f5a1d486580559ff0b42140bb798aa862df60946efa77d8b26c47fbd0 SHA512 7d6a38aea5626f7a32960fcdd109c647dd24a22ecf0772f01ffdba389f70fdfe6455f69733b22c220d4114a7d61d3d10097c23859d303e02d126988a1f663b65
DIST sqlite-src-3260000.zip 11939787 BLAKE2B 89fc5294c203473a8817d23496b05b743aa9d64ac7c67c258432b6a48dfe41d554b09ed14820854333fe555442029e9c9ccea736be7b10be42d9184502938557 SHA512 02faacd831781f25a12ffc8858d648f481d8bbdb68814b18c4c96e3a661233d0e25d675b95feeb35eee4b5ea88e5e0a1fc5fbaecbe434d3f7246d80e81bff6a3
DIST sqlite-src-3270100.zip 12247922 BLAKE2B 324488f345e1b15c4d31772d709a7591e9e278842267d84e44cf62e63cbf0acc4a8da2e0d280a5d43d48f67235c067fd97f791d67916803746c83310cbb62c49 SHA512 5ae0d3ee747df85e5dcd7cb64057ec64843079cfcf163558aa793194ec8ba0ad5570d9c8cb152b6510357ec074da6dba7cfd2f64466f06565c54cd175d9f8945
DIST sqlite-src-3270200.zip 12248529 BLAKE2B b3c79b85bbfa376b31ebb4ad33aea3f0b60c1f6d1e6505e02758cffff41e44ea0c5b8c24892f0757502ed6213c0f97f00957632ddf0e5ffe25e9f8b7f62c6e9a SHA512 52f61e2fa54558b953dba62b27961eef8563f40e6b4a62638087cb22c7d1fdf2c915ea1071939e2e98f3ce6041da2c9bfb1bdbc1e8b8b4a049b8148e878a4e5e
+DIST sqlite-src-3280000.zip 12477204 BLAKE2B e62e0f36f0bebf89990f8ec91cb1e508a5ebc92bb212eaf9c80eb0febecb5623f5938ecd31c210837314f1f9aab19a18189824f82a106799384d8184ca5f65ab SHA512 49c35c65fa686a2326e13218db583c54fa5fe8f48f0caddd11a942601803b3023f7d32ffbab16641e0d72dc9ed288ad26eaa7226c865ac54e1f181859125651f
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-build.patch
new file mode 100644
index 00000000000..95b53328c43
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-build.patch
@@ -0,0 +1,461 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -311,6 +311,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -363,8 +366,11 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -435,7 +441,6 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+ $(TOP)/ext/misc/carray.c \
+@@ -461,7 +466,6 @@
+ $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+ $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/userauth/userauth.c
+
+ # Source code to the library files needed by the test fixture
+@@ -640,25 +644,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -768,7 +772,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1065,14 +1069,9 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+ $(TOP)/ext/misc/shathree.c \
+ $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/misc/memtrace.c \
+ $(TOP)/src/test_windirent.c
+
+@@ -1240,15 +1239,15 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1279,24 +1278,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1307,36 +1305,36 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
++ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1361,11 +1359,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -587,6 +587,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -119,3 +121,5 @@
+ }
+ return rc;
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2176,3 +2178,5 @@
+ (void)pzErrMsg; /* Unused parameter */
+ return zipfileRegister(db);
+ }
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -61,6 +61,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -127,6 +128,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # include <io.h>
+@@ -939,14 +944,7 @@
+ INCLUDE ../ext/misc/shathree.c
+ INCLUDE ../ext/misc/fileio.c
+ INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -4000,7 +3998,9 @@
+ sqlite3_shathree_init(p->db, 0, 0);
+ sqlite3_completion_init(p->db, 0, 0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_zipfile_init(p->db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(p->db, 0, 0);
+ #endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+@@ -5971,6 +5971,7 @@
+ goto end_ar_command;
+ }
+ sqlite3_fileio_init(cmd.db, 0, 0);
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+@@ -9260,6 +9261,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -700,42 +700,6 @@
+ #include <assert.h>
+ #include "zlib.h"
+
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+- sqlite3_context *context,
+- int argc,
+- sqlite3_value **argv
+-){
+- uLong nData;
+- uLongf sz;
+-
+- assert( argc==2 );
+- sz = sqlite3_value_int(argv[1]);
+-
+- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+- sqlite3_result_value(context, argv[0]);
+- }else{
+- const Bytef *pData= sqlite3_value_blob(argv[0]);
+- Bytef *pOut = sqlite3_malloc(sz);
+- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+- sqlite3_result_error(context, "error in uncompress()", -1);
+- }else{
+- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+- }
+- sqlite3_free(pOut);
+- }
+-}
+-
+-
+ /* Run a chunk of SQL. If any errors happen, print an error message
+ ** and exit.
+ */
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -117,6 +117,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -403,6 +404,10 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ sqlar.c
++ sqlite3expert.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,19 +27,17 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+ #ifdef SQLITE_HAVE_ZLIB
++ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
++ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+ #endif
+
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-segmentation_fault_fixes.patch b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-segmentation_fault_fixes.patch
new file mode 100644
index 00000000000..cf430a9ddc5
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-segmentation_fault_fixes.patch
@@ -0,0 +1,954 @@
+https://sqlite.org/src/info/b2ce5ed175cb5029
+https://sqlite.org/src/info/6e4a5f22811bcd14
+https://sqlite.org/src/info/516ca8945150bdc1
+https://sqlite.org/src/info/e1724f1d618cfbcf
+https://sqlite.org/src/info/c621fc668c6538f9
+https://sqlite.org/src/info/c509d8a8aebe0da4
+https://sqlite.org/src/info/a9b90aa12eecdd9f
+
+--- /ext/fts3/fts3_write.c
++++ /ext/fts3/fts3_write.c
+@@ -3754,7 +3754,7 @@
+ }
+ p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
+
+- if( nPrefix>p->iOff || nSuffix>p->nNode-p->iOff ){
++ if( nPrefix>p->term.n || nSuffix>p->nNode-p->iOff || nSuffix==0 ){
+ return FTS_CORRUPT_VTAB;
+ }
+ blobGrowBuffer(&p->term, nPrefix+nSuffix, &rc);
+@@ -3773,7 +3773,7 @@
+ }
+ }
+
+- assert( p->iOff<=p->nNode );
++ assert_fts3_nc( p->iOff<=p->nNode );
+ return rc;
+ }
+
+--- /ext/fts5/fts5_buffer.c
++++ /ext/fts5/fts5_buffer.c
+@@ -178,7 +178,11 @@
+ i64 iOff = *piOff;
+ int iVal;
+ fts5FastGetVarint32(a, i, iVal);
+- if( iVal==1 ){
++ if( iVal<=1 ){
++ if( iVal==0 ){
++ *pi = i;
++ return 0;
++ }
+ fts5FastGetVarint32(a, i, iVal);
+ iOff = ((i64)iVal) << 32;
+ fts5FastGetVarint32(a, i, iVal);
+--- /ext/fts5/test/fts5corrupt3.test
++++ /ext/fts5/test/fts5corrupt3.test
+@@ -8128,6 +8128,215 @@
+ INSERT INTO t1(t1) VALUES('optimize')
+ } {1 {database disk image is malformed}}
+
++#-------------------------------------------------------------------------
++reset_db
++do_test 58.0 {
++ sqlite3 db {}
++ db deserialize [decode_hexdb {
++.open --hexdb
++| size 24576 pagesize 4096 filename crash-5a5acd0ab42d31.db
++| page 1 offset 0
++| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
++| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 00 .....@ ........
++| 96: 00 00 00 00 0d 00 00 00 06 0e 0f 00 0f aa 0f 53 ...............S
++| 112: 0e e8 0e 8b 0e 33 0e 0f 00 00 00 00 00 00 00 00 .....3..........
++| 3584: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 ................
++| 3600: 06 06 17 11 11 01 31 74 61 62 6c 65 62 62 62 62 ......1tablebbbb
++| 3616: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 62 62 .CREATE TABLE bb
++| 3632: 28 61 29 56 05 06 17 1f 1f 01 7d 74 61 62 6c 65 (a)V.......table
++| 3648: 74 31 5f 63 2a 6e 66 69 68 74 31 5f 63 6f 6e 66 t1_c*nfiht1_conf
++| 3664: 69 67 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 ig.CREATE TABLE
++| 3680: 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 't1_config'(k PR
++| 3696: 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 20 57 49 IMARY KEY, v) WI
++| 3712: 54 48 4f 55 54 20 52 4f 57 49 44 5b 04 07 17 21 THOUT ROWID[...!
++| 3728: 21 01 81 01 74 61 62 6c 65 74 31 5f 64 6f 73 73 !...tablet1_doss
++| 3744: 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 04 43 52 izet1_docsize.CR
++| 3760: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 EATE TABLE 't1_d
++| 3776: 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 54 45 47 ocsize'(id INTEG
++| 3792: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
++| 3808: 73 7a 20 42 4c 4f 42 29 69 03 07 17 19 19 01 81 sz BLOB)i.......
++| 3824: 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 -tablet1_idxt1_i
++| 3840: 64 78 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 dx.CREATE TABLE
++| 3856: 27 74 31 5f 69 64 78 27 28 73 65 67 69 64 2c 20 't1_idx'(segid,
++| 3872: 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 52 49 4d term, pgno, PRIM
++| 3888: 41 52 59 20 4b 45 59 28 73 65 67 69 64 2c 20 74 ARY KEY(segid, t
++| 3904: 65 72 6d 29 29 20 57 49 54 48 4f 55 54 20 52 4f erm)) WITHOUT RO
++| 3920: 57 49 44 55 02 07 17 1b 1b 01 81 01 74 61 62 6c WIDU........tabl
++| 3936: 65 74 31 5f 64 61 74 61 74 31 5f 64 61 74 61 02 et1_datat1_data.
++| 3952: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
++| 3968: 5f 64 61 74 61 27 28 69 64 20 49 4e 54 45 47 45 _data'(id INTEGE
++| 3984: 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 R PRIMARY KEY, b
++| 4000: 6c 6f 63 6b 20 42 4c 4f 42 29 54 01 07 17 11 11 lock BLOB)T.....
++| 4016: 08 81 15 74 61 62 6c 65 74 31 74 31 43 52 45 41 ...tablet1t1CREA
++| 4032: 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 TE VIRTUAL TABLE
++| 4048: 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 28 61 t1 USING fts5(a
++| 4064: 2c 62 2c 70 72 65 66 69 78 3d 22 32 2c 32 2c 33 ,b,prefix=.2,2,3
++| 4080: 2c 34 22 2c 20 63 6f 6e 74 65 6e 74 3d 22 22 29 ,4., content=..)
++| page 2 offset 4096
++| 0: 0d 0b 6a 00 37 09 4c 02 0f e7 09 4c 0f c6 0f a4 ..j.7.L....L....
++| 16: 0f 88 0f 6d 0f 4b 0f 2c 0f 0e 0e ec 0e cd 0e ae ...m.K.,........
++| 32: 0e 8e 0e 6c 0e 4b 0e 29 0e 08 0d e6 0d c4 0d b5 ...l.K.)........
++| 48: 0d 97 0d 76 0d 54 0d 30 fd 15 0c f3 0c d3 0c b5 ...v.T.0........
++| 64: 0c 95 0c 73 0c 54 0c 32 0c 10 0b ee 0b cc 0b b0 ...s.T.2........
++| 80: 0b 8d 0b 7e 0b 48 0b 2e 0b 0b 0a ef 0a cc 0a ad ...~.H..........
++| 96: 0a 8c 0a 6d 0a 4d 0a 2b 0a 0c 00 00 00 00 00 00 ...m.M.+........
++| 2368: 00 00 00 00 00 00 00 00 00 00 00 00 15 0a 03 00 ................
++| 2384: 30 00 00 00 9c 01 03 35 00 03 01 01 12 02 01 12 0......5........
++| 2400: 03 01 11 1c 8c 80 80 80 80 10 03 00 3e 00 00 00 ............>...
++| 2416: 17 01 05 05 34 74 61 62 6c 03 02 03 01 04 77 68 ....4tabl.....wh
++| 2432: 65 72 03 02 06 09 1b 8c 80 80 80 80 0f 03 00 3c er.............<
++| 2448: 00 00 00 16 05 34 66 74 73 34 03 02 02 01 04 6e .....4fts4.....n
++| 2464: 75 6d 62 03 06 01 04 09 1b 8c 80 80 80 80 0e 03 umb.............
++| 2480: 00 3c 00 00 00 16 04 33 74 68 65 03 06 01 01 04 .<.....3the.....
++| 2496: 01 03 77 68 65 03 02 04 04 0a 1b 8c 80 80 80 80 ..whe...........
++| 2512: 0d 03 00 3c 00 00 00 16 04 33 6e 75 6d 03 06 01 ...<.....3num...
++| 2528: 01 05 01 03 74 61 62 05 62 03 04 0a 19 8c 80 80 ....tab.b.......
++| 2544: 80 80 0c 03 00 38 00 00 00 14 03 39 a7 68 03 02 .....8.....9.h..
++| 2560: 04 10 04 33 66 74 73 03 02 02 04 07 18 8c 80 80 ...3fts.........
++| 2576: 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 03 02 .....6.....2ta..
++| 2592: 03 02 01 68 03 06 01 01 04 04 07 1b 8c 80 80 80 ...h............
++| 2608: 80 0a 03 00 3c 00 00 00 16 03 32 6e 75 03 06 01 ....<.....2nu...
++| 2624: 01 05 01 02 6f 66 03 06 01 01 06 04 09 19 8c 80 ....of..........
++| 2640: 80 80 80 09 03 00 38 00 00 00 14 03 32 66 74 03 ......8.....2ft.
++| 2656: 02 02 01 02 69 73 03 06 01 01 03 04 07 18 8c 80 ....is..........
++| 2672: 80 80 80 08 03 00 36 00 00 00 13 02 31 74 03 08 ......6.....1t..
++| 2688: 03 01 01 04 01 01 77 03 02 04 04 09 1a 8c 80 80 ......w.........
++| 2704: 80 80 07 03 00 3a ff 00 00 15 02 31 6e 03 08 01 .....:.....1n...
++| 2720: 01 02 05 01 01 6f 03 06 01 01 06 04 09 18 8c 80 .....o..........
++| 2736: 80 80 80 06 03 00 36 00 00 00 13 04 02 31 66 03 ......6......1f.
++| 2752: 02 01 f1 01 69 03 06 01 01 03 05 06 1c 8c 80 80 ....i...........
++| 2768: 80 80 05 03 00 3e 00 00 00 17 04 30 74 68 65 03 .....>.....0the.
++| 2784: 06 01 01 14 01 05 77 68 65 72 65 03 02 04 0a 15 ......where.....
++| 2800: 8c 80 80 80 80 04 03 00 30 00 00 00 11 01 01 06 ........0.......
++| 2816: 06 30 74 61 62 6c cc 03 02 03 07 1c 8c 80 80 80 .0tabl..........
++| 2832: 80 03 03 00 3e 00 00 00 17 07 30 6e 75 6d 62 65 ....>.....0numbe
++| 2848: 72 03 06 01 01 05 01 02 6f 66 02 06 04 0d 13 8c r.......of......
++| 2864: 80 80 80 80 02 03 00 2c 00 00 00 0f 01 01 03 02 .......,........
++| 2880: 30 6e 03 06 01 01 02 07 1b 8c 80 80 80 80 01 03 0n..............
++| 2896: 00 3c 00 00 00 16 08 30 66 74 73 34 61 75 78 03 .<.....0fts4aux.
++| 2912: 02 02 01 02 69 73 03 06 04 0c 00 00 00 14 2a 00 ....is........*.
++| 2928: 00 00 01 01 02 24 00 02 01 01 12 02 01 12 08 88 .....$..........
++| 2944: 80 80 80 80 12 03 00 16 00 00 00 05 02 1c 88 80 ................
++| 2960: 80 80 80 11 03 00 3e 00 00 00 17 05 34 72 6f 77 ......>.....4row
++| 2976: 73 02 06 01 01 05 01 04 74 68 65 72 02 02 04 0b s.......ther....
++| 2992: 15 88 80 80 80 80 10 03 00 3e 10 00 00 11 02 01 .........>......
++| 3008: 01 07 05 34 62 65 74 77 02 02 04 08 1b 88 80 80 ...4betw........
++| 3024: 80 80 0f 03 00 3c 00 00 00 16 04 04 33 72 6f 77 .....<......3row
++| 3040: 02 06 01 01 05 01 03 74 68 65 02 08 05 0a 1b 88 .......the......
++| 3056: 80 80 80 80 0e 03 05 0c 00 00 00 16 01 01 02 04 ................
++| 3072: 33 61 72 65 02 02 03 01 03 62 65 74 02 02 07 08 3are.....bet....
++| 3088: 1b 88 80 80 80 80 0d 03 00 3c 00 00 00 16 03 32 .........<.....2
++| 3104: 74 68 02 08 02 01 01 07 00 04 33 61 6e 64 02 06 th........3and..
++| 3120: 04 01 1b 88 80 80 80 80 0c 03 00 3c 00 00 00 16 ...........<....
++| 3136: 03 32 69 6e 02 06 01 01 06 01 02 72 6f 02 06 01 .2in.......ro...
++| 3152: 01 05 04 09 18 88 80 80 80 80 0b 03 00 36 00 00 .............6..
++| 3168: 00 13 02 03 32 61 72 02 02 03 01 02 62 65 02 02 ....2ar.....be..
++| 3184: 04 05 07 1b 88 80 bf 80 80 0a 03 00 3c 00 00 00 ............<...
++| 3200: 16 02 31 74 02 08 02 01 01 07 00 03 32 61 6e 02 ..1t........2an.
++| 3216: 06 01 01 04 09 19 88 80 80 80 80 09 03 00 38 00 ..............8.
++| 3232: 00 00 14 02 31 6e 02 06 01 01 03 01 01 72 02 06 ....1n.......r..
++| 3248: 01 01 05 03 08 17 88 80 80 80 80 08 03 00 34 00 ..............4.
++| 3264: 01 00 12 02 31 62 02 02 04 01 01 69 02 06 01 01 ....1b.....i....
++| 3280: 06 04 06 19 88 80 80 80 80 07 03 00 38 00 00 00 ............8...
++| 3296: 14 04 02 31 32 02 02 05 01 01 61 02 08 03 01 01 ...12.....a.....
++| 3312: 02 05 06 1b 88 80 80 80 80 06 03 00 3c 00 00 00 ............<...
++| 3328: 16 06 30 74 68 65 72 65 02 12 02 00 02 31 31 02 ..0there.....11.
++| 3344: 06 01 01 04 0a 15 88 80 80 80 80 05 03 00 30 00 ..............0.
++| 3360: 00 00 11 01 01 05 04 30 74 68 65 02 06 71 01 07 .......0the..q..
++| 3376: 07 1c 88 80 80 80 80 04 03 00 3e 00 00 00 17 01 ..........>.....
++| 3392: 01 06 02 30 6e 02 06 01 01 03 01 04 72 6f 77 73 ...0n.......rows
++| 3408: 02 06 07 08 1b 88 80 80 80 80 03 03 00 3c 00 00 .............<..
++| 3424: 00 16 08 30 62 65 74 77 65 65 6e 02 02 04 01 02 ...0between.....
++| 3440: 69 6e 02 06 04 0c 1a 88 80 80 80 80 02 03 00 3a in.............:
++| 3456: 08 f0 00 15 04 30 61 6e 64 02 06 01 01 02 02 02 .....0and.......
++| 3472: 72 65 02 02 03 04 0a 17 88 80 80 80 80 01 03 00 re..............
++| 3488: 34 00 00 00 12 02 30 31 02 06 01 01 04 01 01 32 4.....01.......2
++| 3504: 02 02 07 04 08 08 84 80 80 80 80 12 03 00 16 00 ................
++| 3520: 00 00 05 04 1b 84 80 80 80 80 11 03 00 3c 00 00 .............<..
++| 3536: 00 16 05 34 74 61 62 6c 01 06 01 01 05 02 03 65 ...4tabl.......e
++| 3552: 72 6d 01 02 04 0b 1b 84 80 80 80 80 10 03 00 3c rm.............<
++| 3568: 00 00 00 16 05 34 65 61 63 68 01 02 03 01 04 70 .....4each.....p
++| 3584: 72 65 73 01 02 05 04 09 1a 84 80 80 80 80 0f 03 res.............
++| 3600: 00 3a 00 00 00 15 04 33 74 65 72 01 02 04 02 02 .:.....3ter.....
++| 3616: 68 65 01 06 01 01 03 04 08 1b 84 80 80 80 80 0e he..............
++| 3632: 03 00 3c 00 00 00 16 04 33 70 72 65 01 02 05 01 ..<.....3pre....
++| 3648: 03 74 61 62 01 06 01 01 05 04 08 1a 84 80 80 80 .tab............
++| 3664: 80 0d 03 00 3a 00 00 00 15 04 33 66 6f 72 01 02 ....:.....3for..
++| 3680: 02 02 02 74 73 01 06 01 01 04 03 f8 1b 84 80 80 ...ts...........
++| 3696: 80 80 0c 03 00 3c 00 00 00 16 03 32 74 68 01 06 .....<.....2th..
++| 3712: 01 01 03 00 04 33 65 61 63 01 02 03 04 09 18 84 .....3eac.......
++| 3728: 80 80 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 .......6.....2ta
++| 3744: 01 06 01 01 05 02 01 65 00 02 04 04 09 19 84 80 .......e........
++| 3760: 80 80 80 0a 03 10 38 00 00 00 14 03 32 69 6e 01 ......8.....2in.
++| 3776: 06 01 01 02 01 02 70 72 01 02 05 04 09 18 84 80 ......pr........
++| 3792: 80 80 80 09 03 00 36 00 00 00 13 03 32 66 6f 01 ......6.....2fo.
++| 3808: 02 02 02 01 74 01 06 01 01 04 04 07 1b 84 80 80 ....t...........
++| 3824: 80 80 08 03 00 3c 00 00 00 16 02 31 74 01 0a 04 .....<.....1t...
++| 3840: 01 00 03 04 00 03 32 65 61 01 02 03 04 0a 17 84 ......2ea.......
++| 3856: 80 80 80 80 07 03 00 34 00 00 00 12 02 31 69 01 .......4.....1i.
++| 3872: 06 01 01 02 de 01 70 01 02 05 04 08 18 84 80 80 ......p.........
++| 3888: 80 80 06 03 00 36 00 00 00 13 02 31 65 01 02 03 .....6.....1e...
++| 3904: 01 01 66 01 08 02 01 01 04 04 06 1b 84 80 80 80 ..f.............
++| 3920: 80 05 03 00 3c 00 00 00 16 05 30 74 65 72 6d 01 ....<.....0term.
++| 3936: 02 04 02 02 68 65 01 06 01 01 03 04 09 14 84 80 ....he..........
++| 3952: 80 80 80 04 03 00 2e 00 00 00 10 06 30 74 61 62 ............0tab
++| 3968: 6c 65 01 06 01 01 05 04 15 84 80 80 80 80 03 03 le..............
++| 3984: 00 30 00 00 00 11 02 08 30 70 72 65 73 65 6e 74 .0......0present
++| 4000: 01 02 05 05 1b 84 80 80 80 80 02 03 00 3c 00 00 .............<..
++| 4016: 00 16 04 30 66 74 73 01 06 01 01 04 01 02 69 6e ...0fts.......in
++| 4032: 01 06 01 01 04 0a 1a 84 80 80 80 80 01 03 00 3a ...............:
++| 4048: 00 00 00 15 05 30 65 61 63 68 00 f2 03 01 03 66 .....0each.....f
++| 4064: 6f 72 01 02 02 04 09 06 01 03 00 12 03 0b 0f 00 or..............
++| 4080: 00 08 8c 80 80 80 80 11 03 00 16 00 00 00 05 04 ................
++| page 3 offset 8192
++| 0: 0a 00 00 00 32 0e 4f 00 0f fa 0f f1 0f e9 0f e1 ....2.O.........
++| 16: 0f d8 0f d1 0f c9 0f c1 0f b9 0f c1 0f a9 0f a0 ................
++| 32: 0f 98 0f 90 0f 87 0f 80 0f 78 0f 71 0f 68 0f 5f .........x.q.h._
++| 48: 0f 56 0f 4d 0f 41 0f 38 0f 2f 0f 26 0f 1d 0f 13 .V.M.A.8./.&....
++| 64: 0f 0a 0f 01 0e f7 0e ee 0e e6 0e dd 0e d7 0e cd ................
++| 80: 0e c3 0e ba 0e b0 0e a8 0e 9f 0e 96 0e 8e 0e 85 ................
++| 3648: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 ................
++| 3664: 04 01 10 01 03 34 74 20 07 04 01 0e 01 03 34 1e .....4t ......4.
++| 3680: 09 04 01 12 34 03 33 74 68 1c 08 04 01 10 01 03 ....4.3th.......
++| 3696: 33 6e 1a 08 04 01 10 01 03 32 77 18 08 04 01 10 3n.......2w.....
++| 3712: 01 03 32 74 16 08 04 01 10 01 03 32 6e 14 07 04 ..2t.......2n...
++| 3728: 01 0e 01 03 32 12 08 04 01 0f f1 03 31 74 10 08 ....2.......1t..
++| 3744: 04 01 10 01 03 31 6e 0e 07 04 01 0e 01 03 30 fc .....1n.......0.
++| 3760: 09 04 01 12 01 03 30 74 68 0a 08 04 01 10 01 03 ......0th.......
++| 3776: 30 74 08 09 04 01 12 01 03 30 6e 75 06 08 04 01 0t.......0nu....
++| 3792: 10 01 03 30 6e 04 06 04 01 0c 01 05 52 08 04 01 ...0n.......R...
++| 3808: 10 01 02 34 72 22 07 04 01 0e 01 02 34 20 08 04 ...4r.......4 ..
++| 3824: 01 10 01 02 33 72 1e 09 04 01 12 01 02 33 61 72 ....3r.......3ar
++| 3840: 1c 08 04 01 10 01 02 32 74 1a 08 04 01 10 b3 02 .......2t.......
++| 3856: 32 69 18 09 04 01 12 01 02 32 61 72 16 08 04 01 2i.......2ar....
++| 3872: 10 01 02 31 74 14 08 04 01 10 01 02 31 6e 12 08 ...1t.......1n..
++| 3888: 04 01 10 01 02 31 62 10 08 04 01 10 01 02 31 32 .....1b.......12
++| 3904: 0e 0b 04 01 16 01 02 30 74 68 65 72 0c 08 04 01 .......0ther....
++| 3920: 10 01 02 30 74 0a 08 04 01 10 01 02 30 6e 08 08 ...0t.......0n..
++| 3936: 04 01 10 01 02 30 62 06 09 04 01 10 01 02 30 61 .....0b.......0a
++| 3952: 04 06 04 01 0c 01 02 02 07 04 09 10 01 34 74 22 .............4t.
++| 3968: 06 04 09 0e 01 34 20 08 04 09 12 01 33 74 65 1e .....4 .....3te.
++| 3984: 07 04 09 10 01 33 70 1c 07 f4 09 11 01 33 66 1a .....3p......3f.
++| 4000: 08 04 09 12 01 32 74 68 18 07 04 09 10 01 32 e4 .....2th......2.
++| 4016: 16 07 04 09 10 01 32 69 14 07 04 09 10 01 32 66 ......2i......2f
++| 4032: 12 07 04 09 10 01 31 74 10 07 04 09 10 01 31 69 ......1t......1i
++| 4048: 0e 06 04 09 0e 01 31 0c 08 04 09 12 01 30 74 65 ......1......0te
++| 4064: 0a 07 04 09 10 01 30 74 08 00 00 00 00 00 00 00 ......0t........
++| page 4 offset 12288
++| 4064: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
++| 4080: 03 05 05 02 03 00 10 04 06 05 01 03 00 10 04 04 ................
++| page 5 offset 16384
++| 0: 0a 00 00 00 02 0f eb 00 0f eb 0f f4 00 00 00 00 ................
++| 4064: 00 00 00 00 00 00 00 00 00 00 00 08 03 15 01 70 ...............p
++| 4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04 gsz.....version.
++| page 6 offset 20480
++| 4080: 00 00 23 03 02 01 03 03 02 00 00 00 00 00 00 00 ..#.............
++| end crash-5a5acd0ab42d31.db
++}]} {}
++
++do_execsql_test 58.1 {
++ SELECT * FROM t1('t*');
++} {{} {} {} {} {} {}}
+
+ sqlite3_fts5_may_be_corrupt 0
+ finish_test
+--- /src/btree.c
++++ /src/btree.c
+@@ -4284,10 +4284,9 @@
+ rc = newDatabase(pBt);
+ pBt->nPage = get4byte(28 + pBt->pPage1->aData);
+
+- /* The database size was written into the offset 28 of the header
+- ** when the transaction started, so we know that the value at offset
+- ** 28 is nonzero. */
+- assert( pBt->nPage>0 );
++ /* pBt->nPage might be zero if the database was corrupt when
++ ** the transaction was started. Otherwise, it must be at least 1. */
++ assert( CORRUPT_DB || pBt->nPage>0 );
+ }
+ sqlite3BtreeLeave(p);
+ }
+@@ -7637,6 +7636,7 @@
+ u16 maskPage = pOld->maskPage;
+ u8 *piCell = aData + pOld->cellOffset;
+ u8 *piEnd;
++ VVA_ONLY( int nCellAtStart = b.nCell; )
+
+ /* Verify that all sibling pages are of the same "type" (table-leaf,
+ ** table-interior, index-leaf, or index-interior).
+@@ -7665,6 +7665,10 @@
+ */
+ memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
+ if( pOld->nOverflow>0 ){
++ if( limit<pOld->aiOvfl[0] ){
++ rc = SQLITE_CORRUPT_BKPT;
++ goto balance_cleanup;
++ }
+ limit = pOld->aiOvfl[0];
+ for(j=0; j<limit; j++){
+ b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
+@@ -7684,6 +7688,7 @@
+ piCell += 2;
+ b.nCell++;
+ }
++ assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
+
+ cntOld[i] = b.nCell;
+ if( i<nOld-1 && !leafData){
+--- /src/resolve.c
++++ /src/resolve.c
+@@ -866,7 +866,9 @@
+ #ifndef SQLITE_OMIT_WINDOWFUNC
+ if( pExpr->y.pWin ){
+ Select *pSel = pNC->pWinSelect;
+- sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
++ if( IN_RENAME_OBJECT==0 ){
++ sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
++ }
+ sqlite3WalkExprList(pWalker, pExpr->y.pWin->pPartition);
+ sqlite3WalkExprList(pWalker, pExpr->y.pWin->pOrderBy);
+ sqlite3WalkExpr(pWalker, pExpr->y.pWin->pFilter);
+--- /src/vdbe.c
++++ /src/vdbe.c
+@@ -264,7 +264,7 @@
+ ** is clear. Otherwise, if this is an ephemeral cursor created by
+ ** OP_OpenDup, the cursor will not be closed and will still be part
+ ** of a BtShared.pCursor list. */
+- p->apCsr[iCur]->isEphemeral = 0;
++ if( p->apCsr[iCur]->pBtx==0 ) p->apCsr[iCur]->isEphemeral = 0;
+ sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
+ p->apCsr[iCur] = 0;
+ }
+@@ -3686,7 +3686,10 @@
+ if( pCx ){
+ /* If the ephermeral table is already open, erase all existing content
+ ** so that the table is empty again, rather than creating a new table. */
+- rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
++ assert( pCx->isEphemeral );
++ if( pCx->pBtx ){
++ rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
++ }
+ }else{
+ pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, CURTYPE_BTREE);
+ if( pCx==0 ) goto no_mem;
+--- /test/altertab3.test
++++ /test/altertab3.test
+@@ -142,6 +142,39 @@
+ ALTER TABLE Table0 RENAME Col0 TO Col0;
+ }
+
++#-------------------------------------------------------------------------
++reset_db
++do_execsql_test 7.1.0 {
++ CREATE TABLE t1(a,b,c);
++ CREATE TRIGGER AFTER INSERT ON t1 BEGIN
++ SELECT a, rank() OVER w1 FROM t1
++ WINDOW w1 AS (PARTITION BY b, percent_rank() OVER w1);
++ END;
++}
++
++do_execsql_test 7.1.2 {
++ ALTER TABLE t1 RENAME TO t1x;
++ SELECT sql FROM sqlite_master;
++} {
++ {CREATE TABLE "t1x"(a,b,c)}
++ {CREATE TRIGGER AFTER INSERT ON "t1x" BEGIN
++ SELECT a, rank() OVER w1 FROM "t1x"
++ WINDOW w1 AS (PARTITION BY b, percent_rank() OVER w1);
++ END}
++}
++
++do_execsql_test 7.2.1 {
++ DROP TRIGGER after;
++ CREATE TRIGGER AFTER INSERT ON t1x BEGIN
++ SELECT a, rank() OVER w1 FROM t1x
++ WINDOW w1 AS (PARTITION BY b, percent_rank() OVER w1 ORDER BY d);
++ END;
++}
++
++do_catchsql_test 7.2.2 {
++ ALTER TABLE t1x RENAME TO t1;
++} {1 {error in trigger AFTER: no such column: d}}
++
+ finish_test
+
+
+--- /test/corruptL.test
++++ /test/corruptL.test
+@@ -838,4 +838,32 @@
+ INSERT INTO t3 SELECT * FROM t2;
+ } {1 {database disk image is malformed}}
+
++#-------------------------------------------------------------------------
++reset_db
++do_test 9.0 {
++ sqlite3 db {}
++ db deserialize [decode_hexdb {
++| size 8192 pagesize 4096 filename crash-ab10597e4e1c32.db
++| page 1 offset 0
++| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
++| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 00 .....@ ........
++| 96: 00 00 00 00 0d 00 00 00 01 0f d6 00 0f d6 00 00 ................
++| 4048: 00 00 00 00 00 00 28 01 06 17 11 11 01 3d 74 61 ......(......=ta
++| 4064: 62 6c 65 74 31 74 31 02 43 52 45 41 54 45 20 54 blet1t1.CREATE T
++| 4080: 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 29 ABLE t1(a,b,c,d)
++| page 2 offset 4096
++| 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
++| end crash-ab10597e4e1c32.db
++}]} {}
++
++do_execsql_test 9.1 {
++ SAVEPOINT one;
++}
++do_catchsql_test 9.3 {
++ INSERT INTO t1(b,c) VALUES(5,6);
++} {1 {database disk image is malformed}}
++do_execsql_test 9.3 {
++ ROLLBACK TO one;
++}
++
+ finish_test
+--- /test/fts3corrupt4.test
++++ /test/fts3corrupt4.test
+@@ -3915,5 +3915,491 @@
+ SELECT 'FyzLy'FROM t1 WHERE t1 MATCH 'j';
+ } {1 {database disk image is malformed}}
+
++#-------------------------------------------------------------------------
++reset_db
++do_test 24.0 {
++ sqlite3 db {}
++ db deserialize [decode_hexdb {
++.open --hexdb
++| size 28672 pagesize 4096 filename crash-369d042958c29b.db
++| page 1 offset 0
++| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
++| 16: 10 00 01 01 00 40 20 20 00 00 03 10 00 00 00 00 .....@ ........
++| 96: 00 00 00 00 0d 0e b1 00 06 0d a4 00 0f 8d 0f 21 ...............!
++| 112: 0e b9 0d c8 0e 7e 0d a4 00 00 00 00 00 00 00 00 .....~..........
++| 3488: 00 00 00 00 22 07 06 17 11 11 01 31 74 61 62 6c ...........1tabl
++| 3504: 65 74 32 74 32 07 43 52 45 41 54 45 20 54 41 42 et2t2.CREATE TAB
++| 3520: 4c 45 20 74 32 28 78 29 81 33 05 07 17 1f 1f 01 LE t2(x).3......
++| 3536: 82 35 74 61 62 6c 65 74 31 5f 73 65 67 64 69 72 .5tablet1_segdir
++| 3552: 74 31 5f 73 65 67 64 69 72 05 43 52 45 41 54 45 t1_segdir.CREATE
++| 3568: 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 TABLE 't1_segdi
++| 3584: 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 r'(level INTEGER
++| 3600: 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 ,idx INTEGER,sta
++| 3616: 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 rt_block INTEGER
++| 3632: 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 ,leaves_end_bloc
++| 3648: 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f 62 6c k INTEGER,end_bl
++| 3664: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f 6f 74 ock INTEGER,root
++| 3680: 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 BLOB,PRIMARY KE
++| 3696: 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 06 Y(level, idx))1.
++| 3712: 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 ..E...indexsqlit
++| 3728: 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 e_autoindex_t1_s
++| 3744: 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 egdir_1t1_segdir
++| 3760: 06 0f c7 00 08 00 10 00 00 66 04 07 17 23 23 01 .........f...##.
++| 3776: 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d 65 6e ..tablet1_segmen
++| 3792: 64 73 74 31 5f 73 65 67 6d 65 6e 74 73 04 43 52 dst1_segments.CR
++| 3808: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
++| 3824: 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 egments'(blockid
++| 3840: 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 INTEGER PRIMARY
++| 3856: 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 KEY, block BLOB
++| 3872: 29 6a 03 07 17 21 21 01 81 1f 74 61 62 6c 65 74 )j...!!...tablet
++| 3888: 31 4f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f 6e 74 1Ocontentt1_cont
++| 3904: 65 6e 74 03 43 52 45 41 54 45 20 54 41 42 4c 45 ent.CREATE TABLE
++| 3920: 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 't1_content'(do
++| 3936: 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 39 4d cid INTEGER PR9M
++| 3952: 41 52 59 20 4b 45 59 2c 20 27 63 30 61 27 2c 20 ARY KEY, 'c0a',
++| 3968: 27 63 31 62 27 2c 20 27 63 32 63 27 29 38 02 06 'c1b', 'c2c')8..
++| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
++| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
++| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 33 LE t1 USING fts3
++| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
++| page 3 offset 8192
++| 0: 0d 00 00 00 26 0b 48 0e 0f d8 0f af 0f 86 0f 74 ....&.H........t
++| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
++| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
++| 48: 0d bb 0d a0 0e 94 03 28 0d 4f 0d 35 0d 1b 05 0b .......(.O.5....
++| 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 0c 0a .......x.W.>.$..
++| 2880: 00 00 00 00 00 00 00 00 81 3f 25 06 00 72 7f 00 .........?%..r..
++| 2896: 00 43 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e .COMPILER=gcc-5.
++| 2912: 34 2e 30 20 32 30 31 36 30 36 30 39 20 44 55 42 4.0 20160609 DUB
++| 2928: 55 47 20 45 4e 41 e4 7c 45 20 44 42 53 54 41 54 UG ENA.|E DBSTAT
++| 2944: e4 d1 54 41 42 20 45 4e 41 42 4c 45 20 46 54 53 ..TAB ENABLE FTS
++| 2960: 34 20 45 4e 41 42 4c 45 20 46 54 53 35 20 45 4e 4 ENABLE FTS5 EN
++| 2976: 41 42 4c 45 20 47 45 4f 50 4f 4c 59 20 45 4e 41 ABLE GEOPOLY ENA
++| 2992: 42 4c 45 20 4a 53 4f 4e 31 20 45 4e 41 42 4c 45 BLE JSON1 ENABLE
++| 3008: 20 4d 45 4d 53 59 53 35 20 45 4e 41 42 4c 45 20 MEMSYS5 ENABLE
++| 3024: 42 54 52 45 45 20 4d 41 58 20 4d 45 4d 4f 52 59 BTREE MAX MEMORY
++| 3040: 3d 35 30 30 30 30 30 30 30 20 4f 4c 49 54 20 4c =50000000 OLIT L
++| 3056: 4f 41 43 20 45 58 54 45 4e 53 49 4f 4e 21 54 48 OAC EXTENSION!TH
++| 3072: 52 45 41 44 53 41 46 45 3d 30 18 24 05 00 25 0f READSAFE=0.$..%.
++| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
++| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
++| 3120: 44 53 41 4b 75 3d 30 58 4d 4f 43 41 53 45 17 22 DSAKu=0XMOCASE..
++| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 46 3d ..%..THREADSAFF=
++| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
++| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 52 49 4f IT LOAD EXTENRIO
++| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
++| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
++| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
++| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
++| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
++| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
++| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
++| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
++| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
++| 3328: 0f 17 4d 42 b8 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MB. MEMORY=500
++| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
++| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
++| 3376: 49 4e 41 52 59 18 1a 05 0d a5 0f 19 45 4e 41 42 INARY.......ENAB
++| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
++| 3408: 19 1c 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
++| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
++| 3440: 4e 41 42 4c 45 20 4d 45 4d 53 59 53 35 58 42 49 NABLE MEMSYS5XBI
++| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
++| 3472: 45 20 4d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 E MEMSYS5XNOCASE
++| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
++| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 14 05 01 25 MSYS5XRTRIM....%
++| 3520: 0f 19 45 4e 12 42 4c 45 20 4a 53 4f 4e 31 58 42 ..EN.BLE JSON1XB
++| 3536: 49 4e 41 52 59 18 14 05 00 25 09 d9 45 4e 41 42 INARY....%..ENAB
++| 3552: 4c 45 20 4a 53 4f 3e 31 58 4e 4f 43 41 53 45 17 LE JSO>1XNOCASE.
++| 3568: 13 05 00 25 0f 17 45 4e 40 42 4c 45 20 4a 53 4f ...%..EN@BLE JSO
++| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 82 29 0f 19 45 N1XRTRIM....)..E
++| 3600: 4e 41 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 NABLE GEOPOLYXBI
++| 3616: 4e 41 52 59 1a 11 05 c9 29 e8 19 46 4e 41 42 4c NARY....)..FNABL
++| 3632: 48 c0 47 45 4f 50 4f 4c 59 58 4e 74 43 41 53 45 H.GEOPOLYXNtCASE
++| 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 47 45 ....)..ENABLE GE
++| 3664: 4f 50 4f 4c 59 58 52 54 52 49 4d 17 0f 05 00 23 OPOLYXRTRIM....#
++| 3680: 0f 19 45 4e 41 42 4c 45 30 46 54 53 35 58 42 49 ..ENABLE0FTS5XBI
++| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
++| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0e 05 E FTS5XNOCASE...
++| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
++| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
++| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE FTS4XBINARY..
++| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
++| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
++| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
++| 3824: 09 05 00 31 0f 19 45 4e 42 42 4c 45 20 44 42 53 ...1..ENBBLE DBS
++| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
++| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
++| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 41 53 45 1d TAT VTABXNOCASE.
++| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
++| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 4a 4d 11 06 TAT VTABXRTRJM..
++| 3920: 05 f0 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
++| 3936: 59 11 05 05 00 17 0e 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
++| 3952: 43 41 53 45 10 04 05 00 17 0f 16 44 45 42 55 47 CASE.......DEBUG
++| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
++| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
++| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
++| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
++| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
++| 4048: 39 58 4e 4f 43 41 53 45 26 01 06 00 43 0f 17 43 9XNOCASE&...C..C
++| 4064: 4f 4d 50 49 4b 45 52 3d 67 63 63 2d 35 2e 34 2e OMPIKER=gcc-5.4.
++| 4080: 30 20 32 30 31 36 30 36 40 39 58 29 54 52 49 4d 0 201606@9X)TRIM
++| page 4 offset 12288
++| 0: 0d 00 10 00 00 10 00 00 00 00 00 00 00 01 00 00 ................
++| page 5 offset 16384
++| 0: 0d 00 00 00 02 0b a0 00 0c ad 0b a0 00 00 00 00 ................
++| 2976: 82 0a 02 08 08 09 08 08 17 84 06 30 20 32 35 33 ...........0 253
++| 2992: 00 01 30 04 25 06 1b 00 00 08 32 30 31 36 30 36 ..0.%.....201606
++| 3008: 30 39 03 25 07 00 00 01 34 03 25 05 00 00 01 35 09.%....4.%....5
++| 3024: 03 25 04 00 01 07 30 30 30 30 30 30 30 03 25 1a .%....0000000.%.
++| 3040: 00 00 08 63 6f 6d 70 69 6c 65 72 03 25 02 00 00 ...compiler.%...
++| 3056: 06 64 62 73 74 61 74 03 25 0a 00 01 04 65 62 75 .dbstat.%....ebu
++| 3072: 67 03 25 08 00 00 06 65 6e 61 62 6c 65 09 25 09 g.%....enable.%.
++| 3088: 05 04 04 04 04 04 00 01 08 78 74 65 6e 73 69 6f .........xtensio
++| 3104: 6e 03 25 1d 00 00 04 66 74 73 34 03 25 0d 00 03 n.%....fts4.%...
++| 3120: 01 35 03 25 0f 00 00 03 67 63 63 03 25 03 00 01 .5.%....gcc.%...
++| 3136: 06 65 6f 70 6f 6c 79 03 25 11 00 00 05 6a 73 6f .eopoly.%....jso
++| 3152: 6e 31 03 25 13 00 00 04 6c 6f 61 64 03 25 1c 00 n1.%....load.%..
++| 3168: 00 03 6d 61 78 03 25 18 00 01 05 65 6e 6f 72 79 ..max.%....enory
++| 3184: 03 25 19 00 03 04 ce 79 73 4d 03 25 15 00 00 04 .%.....ysM.%....
++| 3200: 6f 6d 69 74 03 25 1b 00 00 05 72 74 72 65 65 03 omit.%....rtree.
++| 3216: 25 17 00 00 0a 74 68 72 65 61 64 73 61 66 65 03 %....threadsafe.
++| 3232: 25 0e 00 00 04 76 74 61 62 03 25 0b 00 86 50 01 %....vtab.%...P.
++| 3248: 08 08 08 08 08 17 8d 12 30 20 38 33 35 00 01 30 ........0 835..0
++| 3264: 12 01 06 00 01 06 00 01 06 00 1f 03 00 01 03 09 ................
++| 3280: 51 03 00 00 08 32 30 31 36 30 36 30 39 09 01 07 Q....20160609...
++| 3296: 00 01 07 00 01 07 00 00 01 34 09 01 05 00 01 05 .........4......
++| 3312: 00 01 05 00 00 01 35 09 01 04 00 01 04 00 01 04 ......5.........
++| 3328: 00 01 07 30 30 30 30 30 30 30 09 1c 04 00 01 04 ...0000000......
++| 3344: 00 01 04 00 00 06 62 69 6e 61 72 79 3c 03 01 02 ......binary<...
++| 3360: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
++| 3376: 00 03 01 02 02 00 02 f1 02 02 00 03 01 02 02 00 ................
++| 3392: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 ................
++| 3408: 01 02 02 00 03 01 02 02 00 00 08 63 6f 6d 70 69 ...........compi
++| 3424: 6c 65 72 09 01 02 00 01 02 00 01 02 00 00 06 67 ler............g
++| 3440: d2 73 74 61 74 09 07 03 00 01 03 00 01 03 00 01 .stat...........
++| 3456: 04 65 62 75 67 09 04 02 00 01 02 00 01 02 00 00 .ebug...........
++| 3472: 06 65 6e 6f 82 6c 65 3f 07 02 00 01 02 00 01 02 .eno.le?........
++| 3488: b0 01 02 00 01 02 00 11 02 00 01 02 00 01 02 00 ................
++| 3504: 01 02 00 01 02 00 01 02 00 01 a6 00 01 02 00 01 ................
++| 3520: 02 05 51 02 00 01 02 00 01 02 00 01 02 00 01 02 ..Q.............
++| 3536: 00 01 02 00 01 02 00 01 08 78 74 65 6e 73 69 6f .........xtensio
++| 3552: 6e 09 1f 04 00 01 04 00 00 04 00 00 04 66 74 73 n............fts
++| 3568: 34 09 0a 03 00 01 03 00 01 03 00 03 01 35 09 0d 4............5..
++| 3584: 03 00 01 03 00 01 03 00 00 03 67 63 63 09 01 03 ..........gcc...
++| 3600: 00 01 03 00 01 03 00 01 06 65 6f 70 73 6c 79 09 .........eopsly.
++| 3616: 10 03 00 01 03 00 01 03 00 00 05 6a 73 6f 6e 31 ...........json1
++| 3632: 09 13 03 00 01 03 00 01 03 00 00 04 6c 6f 61 64 ............load
++| 3648: 09 1f 03 00 01 03 00 01 03 00 00 03 6d 61 78 09 ............max.
++| 3664: 1c 02 00 01 02 00 01 02 00 01 05 65 6d 6f 72 79 ...........emory
++| 3680: 09 1c 03 00 01 03 00 01 03 00 03 04 73 79 73 35 ............sys5
++| 3696: 09 16 03 00 01 03 00 01 03 00 00 06 6e 6f 63 61 ............noca
++| 3712: 73 65 3c 02 01 02 02 00 03 01 12 02 00 03 01 02 se<.............
++| 3728: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
++| 3744: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
++| 3760: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 00 ................
++| 3776: 04 6f 6d 69 74 09 1f 02 00 01 02 00 01 02 00 00 .omit...........
++| 3792: 05 72 74 72 65 65 09 19 03 00 01 03 00 01 03 00 .rtree..........
++| 3808: 03 02 69 6d 3c 01 01 02 02 00 03 01 02 02 00 03 ..im<...........
++| 3824: 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 ................
++| 3840: 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 ................
++| 3856: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
++| 3872: 00 00 0a 74 68 72 65 61 64 73 61 66 65 09 22 02 ...threadsafe...
++| 3888: 00 01 02 00 01 02 00 00 04 76 74 61 62 09 07 04 .........vtab...
++| 3904: 00 01 04 00 01 03 ff ff 01 78 b4 01 01 01 01 02 .........x......
++| 3920: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
++| 3936: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
++| 3952: 01 01 02 00 01 01 01 07 30 01 01 01 02 00 01 01 ........0.......
++| 3968: 01 02 00 11 01 01 02 00 01 01 01 02 00 11 01 01 ................
++| 3984: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
++| 4000: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
++| 4016: 01 01 01 01 ff 01 01 01 02 00 01 01 01 02 00 01 ................
++| 4032: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
++| 4048: 01 02 00 01 01 09 c2 00 01 01 01 02 00 01 01 01 ................
++| 4064: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
++| 4080: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
++| page 6 offset 20480
++| 0: 0a 00 00 00 02 0f f5 00 0f fb 0f f5 00 00 00 00 ................
++| 4080: 00 00 00 00 00 05 04 08 09 01 02 04 04 08 08 09 ................
++| page 7 offset 24576
++| 0: 0d 00 00 00 05 0f b8 00 0e f4 0f e9 10 d6 0f c7 ................
++| 4016: 00 00 00 00 00 00 00 00 0d 05 02 23 61 75 74 6f ...........#auto
++| 4032: 6d 65 72 67 65 3d 35 0d 04 02 23 6d 65 72 67 65 merge=5...#merge
++| 4048: 3d 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =1..............
++| end crash-369d042958c29b.db
++}]} {}
++
++do_catchsql_test 24.1 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT '4hE'+x FROM c WHERE x<72)
++ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
++} {0 {}}
++
++do_catchsql_test 24.2 {
++ UPDATE t1 SET b=quote((true) ) WHERE t1 MATCH 'h';
++} {0 {}}
++
++do_catchsql_test 24.3 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT 3+x FROM c WHERE x<72)
++ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
++} {0 {}}
++
++do_catchsql_test 24.4 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT null<<x FROM c WHERE x<72)
++ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
++} {0 {}}
++
++do_catchsql_test 24.5 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT 3+x FROM c WHERE x<72)
++ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
++} {0 {}}
++
++do_catchsql_test 24.7 {
++ INSERT INTO t1(t1) SELECT x FROM t2;
++} {1 {database disk image is malformed}}
++
++#-------------------------------------------------------------------------
++#-------------------------------------------------------------------------
++reset_db
++do_test 25.0 {
++ sqlite3 db {}
++ db deserialize [decode_hexdb {
++.open --hexdb
++| size 28672 pagesize 4096 filename crash-dde9e76ed8ab2d.db
++| page 1 offset 0
++| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
++| 16: 10 00 01 01 00 40 20 20 00 00 03 10 00 00 00 00 .....@ ........
++| 96: 00 00 00 00 0d 0e b1 00 06 0d a4 00 0f 8d 0f 21 ...............!
++| 112: 0e b9 0d c8 0e 7e 0d a4 00 00 00 00 00 00 00 00 .....~..........
++| 3488: 00 00 00 00 22 07 06 17 11 11 01 31 74 61 62 6c ...........1tabl
++| 3504: 65 74 32 74 32 07 43 52 45 41 54 45 20 54 41 42 et2t2.CREATE TAB
++| 3520: 4c 45 20 74 32 28 78 29 81 33 05 07 17 1f 1f 01 LE t2(x).3......
++| 3536: 82 35 74 61 62 6c 65 74 31 5f 73 65 67 64 69 72 .5tablet1_segdir
++| 3552: 74 31 5f 73 65 67 64 69 72 05 43 52 45 41 54 45 t1_segdir.CREATE
++| 3568: 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 TABLE 't1_segdi
++| 3584: 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 r'(level INTEGER
++| 3600: 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 ,idx INTEGER,sta
++| 3616: 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 rt_block INTEGER
++| 3632: 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 ,leaves_end_bloc
++| 3648: 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f 62 6c k INTEGER,end_bl
++| 3664: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f 6f 74 ock INTEGER,root
++| 3680: 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 BLOB,PRIMARY KE
++| 3696: 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 06 Y(level, idx))1.
++| 3712: 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 ..E...indexsqlit
++| 3728: 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 e_autoindex_t1_s
++| 3744: 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 egdir_1t1_segdir
++| 3760: 06 0f c7 00 08 00 00 00 00 66 04 07 17 23 23 01 .........f...##.
++| 3776: 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d 65 6e ..tablet1_segmen
++| 3792: 64 73 74 31 5f 73 65 67 6d 65 6e 74 73 04 43 52 dst1_segments.CR
++| 3808: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
++| 3824: 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 egments'(blockid
++| 3840: 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 INTEGER PRIMARY
++| 3856: 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 KEY, block BLOB
++| 3872: 29 6a 03 07 17 21 21 01 81 1f 74 61 62 6c 65 74 )j...!!...tablet
++| 3888: 31 5f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f 6e 74 1_contentt1_cont
++| 3904: 65 6e 74 03 43 52 45 41 54 45 20 54 41 42 4c 45 ent.CREATE TABLE
++| 3920: 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 't1_content'(do
++| 3936: 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 39 4d cid INTEGER PR9M
++| 3952: 41 52 59 20 4b 45 59 2c 20 27 63 30 61 27 2c 20 ARY KEY, 'c0a',
++| 3968: 27 63 31 62 27 2c 20 27 63 32 63 27 29 38 02 06 'c1b', 'c2c')8..
++| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
++| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
++| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 33 LE t1 USING fts3
++| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
++| page 3 offset 8192
++| 0: 0d 00 00 00 26 0b 48 0e 0f d8 0f af 0f 86 0f 74 ....&.H........t
++| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
++| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
++| 48: 0d bb 0d a0 0e 94 03 28 0d 4f 0d 35 0d 1b 05 0b .......(.O.5....
++| 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 0c 0a .......x.W.>.$..
++| 2880: 00 00 00 00 00 00 00 00 81 3f 25 06 00 72 7f 00 .........?%..r..
++| 2896: 00 43 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e .COMPILER=gcc-5.
++| 2912: 34 2e 30 20 32 30 31 36 30 36 30 39 20 44 55 42 4.0 20160609 DUB
++| 2928: 55 47 20 45 4e 41 e4 7c 45 20 44 42 53 54 41 54 UG ENA.|E DBSTAT
++| 2944: e4 46 54 41 42 20 45 4e 41 42 4c 45 20 46 54 53 .FTAB ENABLE FTS
++| 2960: 34 20 45 4e 41 42 4c 45 20 46 54 53 35 20 45 4e 4 ENABLE FTS5 EN
++| 2976: 41 42 4c 45 20 47 45 4f 50 4f 4c 59 20 45 4e 41 ABLE GEOPOLY ENA
++| 2992: 42 4c 45 20 4a 53 4f 4e 31 20 45 4e 41 42 4c 45 BLE JSON1 ENABLE
++| 3008: 20 4d 45 4d 53 59 53 35 20 45 4e 41 42 4c 45 20 MEMSYS5 ENABLE
++| 3024: 42 54 52 45 45 20 4d 41 58 20 4d 45 4d 4f 52 59 BTREE MAX MEMORY
++| 3040: 3d 35 30 30 30 30 30 30 30 20 4f 4c 49 54 20 4c =50000000 OLIT L
++| 3056: 4f 41 43 20 45 58 54 45 4e 53 49 4f 4e 21 54 48 OAC EXTENSION!TH
++| 3072: 52 45 41 44 53 41 46 45 3d 30 18 24 05 00 25 0f READSAFE=0.$..%.
++| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
++| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
++| 3120: 44 53 41 4b 75 3d 30 58 4d 4f 43 41 53 45 17 22 DSAKu=0XMOCASE..
++| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 46 3d ..%..THREADSAFF=
++| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
++| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 52 49 4f IT LOAD EXTENRIO
++| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
++| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
++| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
++| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
++| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
++| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
++| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
++| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
++| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
++| 3328: 0f 17 4d 42 b8 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MB. MEMORY=500
++| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
++| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
++| 3376: 49 4e 41 52 59 18 1a 05 0d a5 0f 19 45 4e 41 42 INARY.......ENAB
++| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
++| 3408: 19 1c 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
++| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
++| 3440: 4e 41 42 4c 45 20 4d 45 4d 53 59 53 35 58 42 49 NABLE MEMSYS5XBI
++| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
++| 3472: 45 20 4d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 E MEMSYS5XNOCASE
++| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
++| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 14 05 01 25 MSYS5XRTRIM....%
++| 3520: 0f 19 45 4e 12 42 4c 45 20 4a 53 4f 4e 31 58 42 ..EN.BLE JSON1XB
++| 3536: 49 4e 41 52 59 18 14 05 00 25 09 d9 45 4e 41 42 INARY....%..ENAB
++| 3552: 4c 45 20 4a 53 4f 3e 31 58 4e 4f 43 41 53 45 17 LE JSO>1XNOCASE.
++| 3568: 13 05 00 25 0f 17 45 4e 40 42 4c 45 20 4a 53 4f ...%..EN@BLE JSO
++| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 82 29 0f 19 45 N1XRTRIM....)..E
++| 3600: 4e 41 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 NABLE GEOPOLYXBI
++| 3616: 4e 41 52 59 1a 11 05 c9 29 e8 19 46 4e 41 42 4c NARY....)..FNABL
++| 3632: 48 c0 47 45 4f 50 4f 4c 59 58 4e 74 43 41 53 45 H.GEOPOLYXNtCASE
++| 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 47 45 ....)..ENABLE GE
++| 3664: 4f 50 4f 4c 59 58 52 54 52 49 4d 17 0f 05 00 23 OPOLYXRTRIM....#
++| 3680: 0f 19 45 4e 41 42 4c 45 30 46 54 53 35 58 42 49 ..ENABLE0FTS5XBI
++| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
++| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0e 05 E FTS5XNOCASE...
++| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
++| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
++| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE FTS4XBINARY..
++| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
++| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
++| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
++| 3824: 09 05 00 31 0f 19 45 4e 42 42 4c 45 20 44 42 53 ...1..ENBBLE DBS
++| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
++| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
++| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 41 53 45 1d TAT VTABXNOCASE.
++| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
++| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 4a 4d 11 06 TAT VTABXRTRJM..
++| 3920: 05 f0 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
++| 3936: 59 11 05 05 00 17 0e 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
++| 3952: 43 41 53 45 10 04 05 00 17 0f 16 44 45 42 55 47 CASE.......DEBUG
++| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
++| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
++| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
++| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
++| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
++| 4048: 39 58 4e 4f 43 41 53 45 26 01 06 00 43 0f 17 43 9XNOCASE&...C..C
++| 4064: 4f 4d 50 49 4b 45 52 3d 67 63 63 2d 35 2e 34 2e OMPIKER=gcc-5.4.
++| 4080: 30 20 32 30 31 36 30 36 40 39 58 29 54 52 49 4d 0 201606@9X)TRIM
++| page 4 offset 12288
++| 0: 0d 00 10 00 00 10 00 00 00 00 00 00 00 01 00 00 ................
++| page 5 offset 16384
++| 0: 0d 00 00 00 02 0b a0 00 0c ad 0b a0 00 00 00 00 ................
++| 2976: 82 0a 02 08 08 09 08 08 17 84 06 30 20 32 35 33 ...........0 253
++| 2992: 00 01 30 04 25 06 1b 00 00 08 32 30 31 36 30 36 ..0.%.....201606
++| 3008: 30 39 03 25 07 00 00 01 34 03 25 05 00 00 01 35 09.%....4.%....5
++| 3024: 03 25 04 00 01 07 30 30 30 30 30 30 30 03 25 1a .%....0000000.%.
++| 3040: 00 00 08 63 6f 6d 70 69 6c 65 72 03 25 02 00 00 ...compiler.%...
++| 3056: 06 64 62 73 74 61 74 03 25 0a 00 01 04 65 62 75 .dbstat.%....ebu
++| 3072: 67 03 25 08 00 00 06 65 6e 61 62 6c 65 09 25 09 g.%....enable.%.
++| 3088: 05 04 04 04 04 04 00 01 08 78 74 65 6e 73 69 6f .........xtensio
++| 3104: 6e 03 25 1d 00 00 04 66 74 73 34 03 25 0d 00 03 n.%....fts4.%...
++| 3120: 01 35 03 25 0f 00 00 03 67 63 63 03 25 03 00 01 .5.%....gcc.%...
++| 3136: 06 65 6f 70 6f 6c 79 03 25 11 00 00 05 6a 73 6f .eopoly.%....jso
++| 3152: 6e 31 03 25 13 00 00 04 6c 6f 61 64 03 25 1c 00 n1.%....load.%..
++| 3168: 00 03 6d 61 78 03 25 18 00 01 05 65 6e 6f 72 79 ..max.%....enory
++| 3184: 03 25 19 00 03 04 ce 79 73 4d 03 25 15 00 00 04 .%.....ysM.%....
++| 3200: 6f 6d 69 74 03 25 1b 00 00 05 72 74 72 65 65 03 omit.%....rtree.
++| 3216: 25 17 00 00 0a 74 68 72 65 61 64 73 61 66 65 03 %....threadsafe.
++| 3232: 25 0e 00 00 04 76 74 61 62 03 25 0b 00 86 50 01 %....vtab.%...P.
++| 3248: 08 08 08 08 08 17 8d 12 30 20 38 33 35 00 01 30 ........0 835..0
++| 3264: 12 01 06 00 01 06 00 01 06 00 1f 03 00 01 03 09 ................
++| 3280: 51 03 00 00 08 32 30 31 36 30 36 30 39 09 01 07 Q....20160609...
++| 3296: 00 01 07 00 01 07 00 00 01 34 09 01 05 00 01 05 .........4......
++| 3312: 00 01 05 00 00 01 35 09 01 04 00 01 04 00 01 04 ......5.........
++| 3328: 00 01 07 30 30 30 30 30 30 30 09 1c 04 00 01 04 ...0000000......
++| 3344: 00 01 04 00 00 06 62 69 6e 61 72 79 3c 03 01 02 ......binary<...
++| 3360: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
++| 3376: 00 03 01 02 02 00 02 f1 02 02 00 03 01 02 02 00 ................
++| 3392: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 ................
++| 3408: 01 02 02 00 03 01 02 02 00 00 08 63 6f 6d 70 69 ...........compi
++| 3424: 6c 65 72 09 01 02 00 01 02 00 01 02 00 00 06 67 ler............g
++| 3440: d2 73 74 61 74 09 07 03 00 01 03 00 01 03 00 01 .stat...........
++| 3456: 04 65 62 75 67 09 04 02 00 01 02 00 01 02 00 00 .ebug...........
++| 3472: 06 65 6e 6f 82 6c 65 3f 07 02 00 01 02 00 01 02 .eno.le?........
++| 3488: b0 01 02 00 01 02 00 11 02 00 01 02 00 01 02 00 ................
++| 3504: 01 02 00 01 02 00 01 02 00 01 a6 00 01 02 00 01 ................
++| 3520: 02 05 51 02 00 01 02 00 01 02 00 01 02 00 01 02 ..Q.............
++| 3536: 00 01 02 00 01 02 00 01 08 78 74 65 6e 73 69 6f .........xtensio
++| 3552: 6e 09 1f 04 00 01 04 00 00 04 00 00 04 66 74 73 n............fts
++| 3568: 34 09 0a 03 00 01 03 00 01 03 00 03 01 35 09 0d 4............5..
++| 3584: 03 00 01 03 00 01 03 00 00 03 67 63 63 09 01 03 ..........gcc...
++| 3600: 00 01 03 00 01 03 00 01 06 65 6f 70 73 6c 79 09 .........eopsly.
++| 3616: 10 03 00 01 03 00 01 03 00 00 05 6a 73 6f 6e 31 ...........json1
++| 3632: 09 13 03 00 01 03 00 01 03 00 00 04 6c 6f 61 64 ............load
++| 3648: 09 1f 03 00 01 03 00 01 03 00 00 03 6d 61 78 09 ............max.
++| 3664: 1c 02 00 01 02 00 01 02 00 01 05 65 6d 6f 72 79 ...........emory
++| 3680: 09 1c 03 00 01 03 00 01 03 00 03 04 73 79 73 35 ............sys5
++| 3696: 09 16 03 00 01 03 00 01 03 00 00 06 6e 6f 63 61 ............noca
++| 3712: 73 65 3c 02 01 02 02 00 03 01 12 02 00 03 01 02 se<.............
++| 3728: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
++| 3744: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
++| 3760: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 00 ................
++| 3776: 0e 9f 6d 69 74 09 1f 02 00 01 02 00 01 02 00 00 ..mit...........
++| 3792: 05 72 74 72 65 65 09 19 03 00 01 03 00 01 03 00 .rtree..........
++| 3808: 03 02 69 6d 3c 01 01 02 02 00 03 01 02 02 00 03 ..im<...........
++| 3824: 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 ................
++| 3840: 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 ................
++| 3856: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
++| 3872: 00 00 0a 74 68 72 65 61 64 73 61 66 65 09 22 02 ...threadsafe...
++| 3888: 00 01 02 00 01 02 00 00 04 76 74 61 62 09 07 04 .........vtab...
++| 3904: 00 01 04 00 01 04 00 00 01 78 b4 01 01 01 01 02 .........x......
++| 3920: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
++| 3936: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
++| 3952: 01 01 02 00 01 01 01 07 30 01 01 01 02 00 01 01 ........0.......
++| 3968: 01 02 00 11 01 01 02 00 01 01 01 02 00 11 01 01 ................
++| 3984: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
++| 4000: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
++| 4016: 01 01 01 01 ff 01 01 01 02 00 01 01 01 02 00 01 ................
++| 4032: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
++| 4048: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
++| 4064: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
++| 4080: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
++| page 6 offset 20480
++| 0: 0a 00 00 00 02 0f f5 00 0f fb 0f f5 00 00 00 00 ................
++| 4080: 00 00 00 00 00 05 04 08 09 01 02 04 04 08 08 09 ................
++| page 7 offset 24576
++| 0: 0d 00 00 00 05 0f b8 00 0e f4 0f e9 10 d6 0f c7 ................
++| 4016: 00 00 00 00 00 00 00 00 0d 05 02 23 61 75 74 6f ...........#auto
++| 4032: 6d 65 72 67 65 3d 35 0d 04 02 23 6d 65 72 67 65 merge=5...#merge
++| 4048: 3d 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =1..............
++| end crash-dde9e76ed8ab2d.db
++}]} {}
++
++do_catchsql_test 25.1 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x%1 FROM c WHERE x<599237)
++ INSERT INTO t1( a ) SELECT randomblob(3000) FROM t2 ;
++} {0 {}}
++
++do_catchsql_test 25.2 {
++ UPDATE t1 SET b=quote((true) ) WHERE t1 MATCH 'h*';
++} {0 {}}
++
++do_catchsql_test 25.3 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x +x FROM c WHERE 72<x)
++ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
++} {0 {}}
++
++do_catchsql_test 25.4 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x%1 FROM c WHERE 599237<x)
++ INSERT INTO t1(a) SELECT randomblob(3000) FROM t2 ;
++} {0 {}}
++
++do_catchsql_test 25.5 {
++ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x%1 FROM c WHERE x<599237)
++ INSERT INTO t1( a ) SELECT randomblob(3000) FROM t2 ;
++} {0 {}}
++
++do_catchsql_test 25.6 {
++ INSERT INTO t1(t1) SELECT x FROM t2;
++ INSERT INTO t1(t1) SELECT x FROM t2;
++} {1 {database disk image is malformed}}
++
+ finish_test
+
+--- /test/with3.test
++++ /test/with3.test
+@@ -130,4 +130,40 @@
+ `--SEARCH TABLE w1 USING INTEGER PRIMARY KEY (rowid=?)
+ }
+
++do_execsql_test 4.0 {
++ WITH t5(t5col1) AS (
++ SELECT (
++ WITH t3(t3col1) AS (
++ WITH t2 AS (
++ WITH t1 AS (SELECT 1 AS c1 GROUP BY 1)
++ SELECT a.c1 FROM t1 AS a, t1 AS b
++ WHERE anoncol1 = 1
++ )
++ SELECT (SELECT 1 FROM t2) FROM t2
++ )
++ SELECT t3col1 FROM t3 WHERE t3col1
++ ) FROM (SELECT 1 AS anoncol1)
++ )
++ SELECT t5col1, t5col1 FROM t5
++} {1 1}
++do_execsql_test 4.1 {
++ SELECT EXISTS (
++ WITH RECURSIVE Table0 AS (
++ WITH RECURSIVE Table0(Col0) AS (SELECT ALL 1 )
++ SELECT ALL (
++ WITH RECURSIVE Table0 AS (
++ WITH RECURSIVE Table0 AS (
++ WITH RECURSIVE Table0 AS (SELECT DISTINCT 1 GROUP BY 1 )
++ SELECT DISTINCT * FROM Table0 NATURAL INNER JOIN Table0
++ WHERE Col0 = 1
++ )
++ SELECT ALL (SELECT DISTINCT * FROM Table0) FROM Table0 WHERE Col0 = 1
++ )
++ SELECT ALL * FROM Table0 NATURAL INNER JOIN Table0
++ ) FROM Table0 )
++ SELECT DISTINCT * FROM Table0 NATURAL INNER JOIN Table0
++ );
++} {1}
++
++
+ finish_test
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-tests.patch b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-tests.patch
new file mode 100644
index 00000000000..aaa6c580f5f
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-tests.patch
@@ -0,0 +1,19 @@
+https://sqlite.org/src/info/af53c41a127c314c
+
+--- /test/like3.test
++++ /test/like3.test
+@@ -182,6 +182,7 @@
+ # Verify that the LIKE optimization works with an ESCAPE clause when
+ # using PRAGMA case_sensitive_like=ON.
+ #
++ifcapable !icu {
+ do_execsql_test like3-6.100 {
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1(path TEXT COLLATE nocase PRIMARY KEY,a,b,c) WITHOUT ROWID;
+@@ -229,5 +230,6 @@
+ QUERY PLAN
+ `--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
+ }
++}
+
+ finish_test
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-nonfull_archive-segmentation_fault_fixes.patch b/dev-db/sqlite/files/sqlite-3.28.0-nonfull_archive-segmentation_fault_fixes.patch
new file mode 100644
index 00000000000..7278c12b377
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.28.0-nonfull_archive-segmentation_fault_fixes.patch
@@ -0,0 +1,114 @@
+https://sqlite.org/src/info/b2ce5ed175cb5029
+https://sqlite.org/src/info/6e4a5f22811bcd14
+https://sqlite.org/src/info/516ca8945150bdc1
+https://sqlite.org/src/info/e1724f1d618cfbcf
+https://sqlite.org/src/info/c621fc668c6538f9
+https://sqlite.org/src/info/c509d8a8aebe0da4
+https://sqlite.org/src/info/a9b90aa12eecdd9f
+
+--- /sqlite3.c
++++ /sqlite3.c
+@@ -67472,10 +67472,9 @@
+ rc = newDatabase(pBt);
+ pBt->nPage = get4byte(28 + pBt->pPage1->aData);
+
+- /* The database size was written into the offset 28 of the header
+- ** when the transaction started, so we know that the value at offset
+- ** 28 is nonzero. */
+- assert( pBt->nPage>0 );
++ /* pBt->nPage might be zero if the database was corrupt when
++ ** the transaction was started. Otherwise, it must be at least 1. */
++ assert( CORRUPT_DB || pBt->nPage>0 );
+ }
+ sqlite3BtreeLeave(p);
+ }
+@@ -70825,6 +70824,7 @@
+ u16 maskPage = pOld->maskPage;
+ u8 *piCell = aData + pOld->cellOffset;
+ u8 *piEnd;
++ VVA_ONLY( int nCellAtStart = b.nCell; )
+
+ /* Verify that all sibling pages are of the same "type" (table-leaf,
+ ** table-interior, index-leaf, or index-interior).
+@@ -70853,6 +70853,10 @@
+ */
+ memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
+ if( pOld->nOverflow>0 ){
++ if( limit<pOld->aiOvfl[0] ){
++ rc = SQLITE_CORRUPT_BKPT;
++ goto balance_cleanup;
++ }
+ limit = pOld->aiOvfl[0];
+ for(j=0; j<limit; j++){
+ b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
+@@ -70872,6 +70876,7 @@
+ piCell += 2;
+ b.nCell++;
+ }
++ assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
+
+ cntOld[i] = b.nCell;
+ if( i<nOld-1 && !leafData){
+@@ -83747,7 +83752,7 @@
+ ** is clear. Otherwise, if this is an ephemeral cursor created by
+ ** OP_OpenDup, the cursor will not be closed and will still be part
+ ** of a BtShared.pCursor list. */
+- p->apCsr[iCur]->isEphemeral = 0;
++ if( p->apCsr[iCur]->pBtx==0 ) p->apCsr[iCur]->isEphemeral = 0;
+ sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
+ p->apCsr[iCur] = 0;
+ }
+@@ -87258,7 +87263,10 @@
+ if( pCx ){
+ /* If the ephermeral table is already open, erase all existing content
+ ** so that the table is empty again, rather than creating a new table. */
+- rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
++ assert( pCx->isEphemeral );
++ if( pCx->pBtx ){
++ rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
++ }
+ }else{
+ pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, CURTYPE_BTREE);
+ if( pCx==0 ) goto no_mem;
+@@ -95979,7 +95987,9 @@
+ #ifndef SQLITE_OMIT_WINDOWFUNC
+ if( pExpr->y.pWin ){
+ Select *pSel = pNC->pWinSelect;
+- sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
++ if( IN_RENAME_OBJECT==0 ){
++ sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
++ }
+ sqlite3WalkExprList(pWalker, pExpr->y.pWin->pPartition);
+ sqlite3WalkExprList(pWalker, pExpr->y.pWin->pOrderBy);
+ sqlite3WalkExpr(pWalker, pExpr->y.pWin->pFilter);
+@@ -174132,7 +174142,7 @@
+ }
+ p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
+
+- if( nPrefix>p->iOff || nSuffix>p->nNode-p->iOff ){
++ if( nPrefix>p->term.n || nSuffix>p->nNode-p->iOff || nSuffix==0 ){
+ return FTS_CORRUPT_VTAB;
+ }
+ blobGrowBuffer(&p->term, nPrefix+nSuffix, &rc);
+@@ -174151,7 +174161,7 @@
+ }
+ }
+
+- assert( p->iOff<=p->nNode );
++ assert_fts3_nc( p->iOff<=p->nNode );
+ return rc;
+ }
+
+@@ -204287,7 +204297,11 @@
+ i64 iOff = *piOff;
+ int iVal;
+ fts5FastGetVarint32(a, i, iVal);
+- if( iVal==1 ){
++ if( iVal<=1 ){
++ if( iVal==0 ){
++ *pi = i;
++ return 0;
++ }
+ fts5FastGetVarint32(a, i, iVal);
+ iOff = ((i64)iVal) << 32;
+ fts5FastGetVarint32(a, i, iVal);
diff --git a/dev-db/sqlite/sqlite-3.28.0.ebuild b/dev-db/sqlite/sqlite-3.28.0.ebuild
new file mode 100644
index 00000000000..f4eee96e244
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.28.0.ebuild
@@ -0,0 +1,330 @@
+# Copyright 1999-2019 Arfrever Frehtes Taifersar Arahesis and others
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+DOC_PV="${SRC_PV}"
+# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+SRC_URI="doc? ( https://sqlite.org/2019/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2019/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+
+LICENSE="public-domain"
+SLOT="3"
+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"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+RESTRICT="!test? ( test )"
+
+BDEPEND="doc? ( app-arch/unzip )
+ tcl? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ tools? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )"
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+full_archive() {
+ use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.28.0-full_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.28.0-full_archive-segmentation_fault_fixes.patch"
+ eapply "${FILESDIR}/${PN}-3.28.0-full_archive-tests.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
+ eapply "${FILESDIR}/${PN}-3.28.0-nonfull_archive-segmentation_fault_fixes.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
+ # https://sqlite.org/pragma.html#pragma_function_list
+ # https://sqlite.org/pragma.html#pragma_module_list
+ # https://sqlite.org/pragma.html#pragma_pragma_list
+ append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${D}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2019-12-06 20:25 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2019-12-06 20:25 UTC (permalink / raw
To: gentoo-commits
commit: 0350e80f07da9d458b4834aabc516fbab89e5678
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Dec 6 19:59:02 2019 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Dec 6 20:24:37 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0350e80f
dev-db/sqlite: Delete old version (3.28.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 3 -
.../files/sqlite-3.28.0-full_archive-build.patch | 461 ----------
...8.0-full_archive-segmentation_fault_fixes.patch | 954 ---------------------
.../files/sqlite-3.28.0-full_archive-tests.patch | 19 -
...-nonfull_archive-segmentation_fault_fixes.patch | 114 ---
dev-db/sqlite/sqlite-3.28.0.ebuild | 330 -------
6 files changed, 1881 deletions(-)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index d3036d55720..5ab8f5737dd 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,9 +1,6 @@
-DIST sqlite-autoconf-3280000.tar.gz 2810415 BLAKE2B e1af03476d97f96ef78d4e0a9df6ae69a06fb08e48046c843ed668b3f8c00c58263df07a4e8a22a1c7cfc920fd005fa6c2525dceeec4f724b43df7589ca3f777 SHA512 e800c0d9e6c8c01ccf1d714c6c4da4b98e9610c4c06557dda6393d0792a8ae09788703d4a74dcb21844c49b3629ff7ed95a4a86ff79872aafd2b49c672c7a570
DIST sqlite-autoconf-3290000.tar.gz 2833613 BLAKE2B b68a4f9bfe90653f5ce9dbf94b44cecc843fbb639883a7be9dd40150749f8d2eca0c231b215137d2f8da78d33356d72640a943ba06516c6d7c10ebd04cae4766 SHA512 85dcaa72cc2476c628e801d4ce46cf10ed8997f56cb0334062df5553f18c29d607883a1049bf75258204f2f53a29a02a01f014dcca383b05dfac1e2123778024
DIST sqlite-autoconf-3300100.tar.gz 2848951 BLAKE2B 3a541a2b07ebbaf7ddca4693b71765e2ecd11974dd64b4a7a19eaee4eea8a17a6004c69f3b2163213fe7568480152709745e029107711813d4bdd41052763cd1 SHA512 9ec0283c417fb0323b0e43550af2a49e9a63988e4212c27ea62cc9da3534caa6faf5bdc7e051b6772c4ce61560a433b3d3288b68e05e9ba8495f61a3bcebda3e
-DIST sqlite-doc-3280000.zip 9421770 BLAKE2B 695eab96f718307a7aff8a171d9e416ddb4b17039ef7230a458dc7d256e2f07a5b41d3aa1a3f085e5e418c297b5dd1d2ba5e4827434329d1ed61d3dd1f618f3d SHA512 83e23dff00614d31d501c66c29d8d4aa780b38859242b58937243235d185fe3db2f9f3c1accf9bf2df0b457a6e32612a00e82f503a8665aad4f19602e2b36396
DIST sqlite-doc-3290000.zip 9415641 BLAKE2B 97fef1f01d3e7730e5220541ad9ccdf9f8538aa43939c0f513919c8505b3a4f4b4c89eb2e04fddae80b7eeed440eb0f06f7cfd93cd56f0539bd6fdd5f47e1ff7 SHA512 ca856cf250e395d9c7e9817337adb5a16b1d96a20548a4010f5137188d35bb9d49a4a6da47bf2a696deffa68d2976dbb35a036adce19b8320e0e286876ac094f
DIST sqlite-doc-3300100.zip 9485342 BLAKE2B bf5e3909a327c773106d4990b3e3be5dd63db2dbc1a7f8a7c1bd16f39bec83a6b2a98c4c56ded3b58f4087dcdcc934e542db36e142bf338a411ed7115d67d6b3 SHA512 373e843015307071443a0db5fb930f9120718f6118cc2e21b506fdc8535fbe6996e9889e8b5809ffb91257addfe778bdf3412a81e11f6bced2c5e0330337d00d
-DIST sqlite-src-3280000.zip 12477204 BLAKE2B e62e0f36f0bebf89990f8ec91cb1e508a5ebc92bb212eaf9c80eb0febecb5623f5938ecd31c210837314f1f9aab19a18189824f82a106799384d8184ca5f65ab SHA512 49c35c65fa686a2326e13218db583c54fa5fe8f48f0caddd11a942601803b3023f7d32ffbab16641e0d72dc9ed288ad26eaa7226c865ac54e1f181859125651f
DIST sqlite-src-3290000.zip 12557725 BLAKE2B b1aeb80734a2cb7d45c6f2e278bad2996b56ecaf792a8f26322bf50aeaa430eea267f23edb1721bb80ecb6e0c8e14c7a5d8f26178d056fd23efb52f496cc03e1 SHA512 575398fbe20c6471ee2abcbde170b8d48efbb3cb2716a65f42f05c52429a45d14e8046e50c59bbf75bfe2d8f151c34abd50b440c50af571f19e19f3290b230df
DIST sqlite-src-3300100.zip 12648162 BLAKE2B bb239bac9115c74778de0347b4f4e24a82f149f55fe7dea8b89eb859bfe4cf6f6c2f065f5e1741c40624bb88ecd395140064a41d475a1c64a0188990fd6248e7 SHA512 f40236d0bb25f3ea01a1192dace3b6732fb671fbdabb7cfa8d0cc2b99d21aef00ae380999fdee904501cb03304644cddfb2506951f36a2f6a83693f311c3c11d
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-build.patch b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-build.patch
deleted file mode 100644
index 95b53328c43..00000000000
--- a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-build.patch
+++ /dev/null
@@ -1,461 +0,0 @@
-Move some code to libsqlite3.so to avoid duplication.
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Fix building with dlopen() not available.
-
---- /Makefile.in
-+++ /Makefile.in
-@@ -311,6 +311,9 @@
- # Source code for extensions
- #
- SRC += \
-+ $(TOP)/ext/expert/sqlite3expert.c \
-+ $(TOP)/ext/expert/sqlite3expert.h
-+SRC += \
- $(TOP)/ext/fts1/fts1.c \
- $(TOP)/ext/fts1/fts1.h \
- $(TOP)/ext/fts1/fts1_hash.c \
-@@ -363,8 +366,11 @@
- $(TOP)/ext/rbu/sqlite3rbu.h \
- $(TOP)/ext/rbu/sqlite3rbu.c
- SRC += \
-+ $(TOP)/ext/misc/appendvfs.c \
- $(TOP)/ext/misc/json1.c \
-- $(TOP)/ext/misc/stmt.c
-+ $(TOP)/ext/misc/sqlar.c \
-+ $(TOP)/ext/misc/stmt.c \
-+ $(TOP)/ext/misc/zipfile.c
-
- # Generated source code files
- #
-@@ -435,7 +441,6 @@
- # Statically linked extensions
- #
- TESTSRC += \
-- $(TOP)/ext/expert/sqlite3expert.c \
- $(TOP)/ext/expert/test_expert.c \
- $(TOP)/ext/misc/amatch.c \
- $(TOP)/ext/misc/carray.c \
-@@ -461,7 +466,6 @@
- $(TOP)/ext/misc/totype.c \
- $(TOP)/ext/misc/unionvtab.c \
- $(TOP)/ext/misc/wholenumber.c \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/userauth/userauth.c
-
- # Source code to the library files needed by the test fixture
-@@ -640,25 +644,25 @@
-
- libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
-- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- -rpath "$(TCLLIBDIR)" \
- -version-info "8:6:8" \
- -avoid-version
-
--sqlite3$(TEXE): shell.c sqlite3.c
-- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
-- shell.c sqlite3.c \
-- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE): shell.c libsqlite3.la
-+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
-+ shell.c libsqlite3.la \
-+ $(LIBREADLINE)
-
--sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
-
--dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
-
--scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
- $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
-- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/scrub.c libsqlite3.la
-
- srcck1$(BEXE): $(TOP)/tool/srcck1.c
- $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -768,7 +772,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo: sqlite3.c
-- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
-
- # Rules to build the LEMON compiler generator
- #
-@@ -1065,14 +1069,9 @@
- # Source files that go into making shell.c
- SHELL_SRC = \
- $(TOP)/src/shell.c.in \
-- $(TOP)/ext/misc/appendvfs.c \
- $(TOP)/ext/misc/shathree.c \
- $(TOP)/ext/misc/fileio.c \
- $(TOP)/ext/misc/completion.c \
-- $(TOP)/ext/misc/sqlar.c \
-- $(TOP)/ext/expert/sqlite3expert.c \
-- $(TOP)/ext/expert/sqlite3expert.h \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/misc/memtrace.c \
- $(TOP)/src/test_windirent.c
-
-@@ -1240,15 +1239,15 @@
-
- # Fuzz testing
- fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- ./fuzzcheck$(TEXE) $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
- ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- fastfuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- ./fuzzcheck$(TEXE) --limit-mem 100M $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --limit-mem 100M --timeout 3600 $(FUZZDATA)
- ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
- valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- # The veryquick.test TCL tests.
-@@ -1279,24 +1278,23 @@
- smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
- ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
-
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
-+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
-
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
-- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
-+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
-
--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
-+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
-
--sqltclsh$(TEXE): sqltclsh.c
-- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
-+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
-+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
-
--sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
-- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
-+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
-+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
-
- CHECKER_DEPS =\
- $(TOP)/tool/mkccode.tcl \
-- sqlite3.c \
- $(TOP)/src/tclsqlite.c \
- $(TOP)/ext/repair/sqlite3_checker.tcl \
- $(TOP)/ext/repair/checkindex.c \
-@@ -1307,36 +1305,36 @@
- sqlite3_checker.c: $(CHECKER_DEPS)
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
-
--sqlite3_checker$(TEXE): sqlite3_checker.c
-- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
-+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
-
--dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
-+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
- $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
-- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
-
--dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
-+dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-+ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
-
--showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
-
--showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
-
--showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE): $(TOP)/tool/showjournal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
-
--showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE): $(TOP)/tool/showwal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
-
- showshm$(TEXE): $(TOP)/tool/showshm.c
- $(LTLINK) -o $@ $(TOP)/tool/showshm.c
-
--index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
-- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
-+index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
-
--changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
-
- changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
- $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
-@@ -1361,11 +1359,11 @@
- kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
- $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
-
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
-- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
-+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
-
--loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
-+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
-
- # This target will fail if the SQLite amalgamation contains any exported
- # symbols that do not begin with "sqlite3_". It is run as part of the
---- /configure.ac
-+++ /configure.ac
-@@ -587,6 +587,9 @@
- if test "${enable_load_extension}" = "yes" ; then
- OPT_FEATURE_FLAGS=""
- AC_SEARCH_LIBS(dlopen, dl)
-+ if test "${ac_cv_search_dlopen}" = "no" ; then
-+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+ fi
- else
- OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
---- /ext/misc/sqlar.c
-+++ /ext/misc/sqlar.c
-@@ -14,6 +14,8 @@
- ** for working with sqlar archives and used by the shell tool's built-in
- ** sqlar support.
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <zlib.h>
-@@ -119,3 +121,5 @@
- }
- return rc;
- }
-+
-+#endif /* SQLITE_HAVE_ZLIB */
---- /ext/misc/zipfile.c
-+++ /ext/misc/zipfile.c
-@@ -24,6 +24,8 @@
- ** * No support for zip64 extensions
- ** * Only the "inflate/deflate" (zlib) compression method is supported
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <stdio.h>
-@@ -2176,3 +2178,5 @@
- (void)pzErrMsg; /* Unused parameter */
- return zipfileRegister(db);
- }
-+
-+#endif /* SQLITE_HAVE_ZLIB */
---- /ext/repair/sqlite3_checker.c.in
-+++ /ext/repair/sqlite3_checker.c.in
-@@ -2,6 +2,7 @@
- ** Read an SQLite database file and analyze its space utilization. Generate
- ** text on standard output.
- */
-+#define SQLITE_CORE 1
- #define TCLSH_INIT_PROC sqlite3_checker_init_proc
- #define SQLITE_ENABLE_DBPAGE_VTAB 1
- #define SQLITE_ENABLE_JSON1 1
-@@ -14,7 +15,7 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- INCLUDE $ROOT/ext/misc/btreeinfo.c
- INCLUDE $ROOT/ext/repair/checkindex.c
---- /src/shell.c.in
-+++ /src/shell.c.in
-@@ -61,6 +61,7 @@
- #include <stdio.h>
- #include <assert.h>
- #include "sqlite3.h"
-+#include "ext/expert/sqlite3expert.h"
- typedef sqlite3_int64 i64;
- typedef sqlite3_uint64 u64;
- typedef unsigned char u8;
-@@ -127,6 +128,10 @@
- # define SHELL_USE_LOCAL_GETLINE 1
- #endif
-
-+#ifdef SQLITE_HAVE_ZLIB
-+#include <zlib.h>
-+#endif
-+
-
- #if defined(_WIN32) || defined(WIN32)
- # include <io.h>
-@@ -939,14 +944,7 @@
- INCLUDE ../ext/misc/shathree.c
- INCLUDE ../ext/misc/fileio.c
- INCLUDE ../ext/misc/completion.c
--INCLUDE ../ext/misc/appendvfs.c
- INCLUDE ../ext/misc/memtrace.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE ../ext/misc/zipfile.c
--INCLUDE ../ext/misc/sqlar.c
--#endif
--INCLUDE ../ext/expert/sqlite3expert.h
--INCLUDE ../ext/expert/sqlite3expert.c
-
- #if defined(SQLITE_ENABLE_SESSION)
- /*
-@@ -4000,7 +3998,9 @@
- sqlite3_shathree_init(p->db, 0, 0);
- sqlite3_completion_init(p->db, 0, 0);
- #ifdef SQLITE_HAVE_ZLIB
-+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_zipfile_init(p->db, 0, 0);
-+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_sqlar_init(p->db, 0, 0);
- #endif
- sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
-@@ -5971,6 +5971,7 @@
- goto end_ar_command;
- }
- sqlite3_fileio_init(cmd.db, 0, 0);
-+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_sqlar_init(cmd.db, 0, 0);
- sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
- shellPutsFunc, 0, 0);
-@@ -9260,6 +9261,7 @@
- #endif
- }
- data.out = stdout;
-+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
-
- /* Go ahead and open the database file if it already exists. If the
---- /test/sessionfuzz.c
-+++ /test/sessionfuzz.c
-@@ -700,42 +700,6 @@
- #include <assert.h>
- #include "zlib.h"
-
--/*
--** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
--**
--** Parameter SZ is interpreted as an integer. If it is less than or
--** equal to zero, then this function returns a copy of X. Or, if
--** SZ is equal to the size of X when interpreted as a blob, also
--** return a copy of X. Otherwise, decompress blob X using zlib
--** utility function uncompress() and return the results (another
--** blob).
--*/
--static void sqlarUncompressFunc(
-- sqlite3_context *context,
-- int argc,
-- sqlite3_value **argv
--){
-- uLong nData;
-- uLongf sz;
--
-- assert( argc==2 );
-- sz = sqlite3_value_int(argv[1]);
--
-- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
-- sqlite3_result_value(context, argv[0]);
-- }else{
-- const Bytef *pData= sqlite3_value_blob(argv[0]);
-- Bytef *pOut = sqlite3_malloc(sz);
-- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
-- sqlite3_result_error(context, "error in uncompress()", -1);
-- }else{
-- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
-- }
-- sqlite3_free(pOut);
-- }
--}
--
--
- /* Run a chunk of SQL. If any errors happen, print an error message
- ** and exit.
- */
---- /tool/mksqlite3c.tcl
-+++ /tool/mksqlite3c.tcl
-@@ -117,6 +117,7 @@
- rtree.h
- sqlite3session.h
- sqlite3.h
-+ sqlite3expert.h
- sqlite3ext.h
- sqlite3rbu.h
- sqliteicu.h
-@@ -403,6 +404,10 @@
- sqlite3session.c
- fts5.c
- stmt.c
-+ appendvfs.c
-+ sqlar.c
-+ sqlite3expert.c
-+ zipfile.c
- } {
- copy_file tsrc/$file
- }
---- /tool/sqlite3_analyzer.c.in
-+++ /tool/sqlite3_analyzer.c.in
-@@ -14,9 +14,6 @@
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
- #define SQLITE_OMIT_LOAD_EXTENSION 1
--#ifndef USE_EXTERNAL_SQLITE
--INCLUDE sqlite3.c
--#endif
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
---- /tool/sqltclsh.c.in
-+++ /tool/sqltclsh.c.in
-@@ -27,19 +27,17 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
--INCLUDE $ROOT/ext/misc/appendvfs.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE $ROOT/ext/misc/zipfile.c
--INCLUDE $ROOT/ext/misc/sqlar.c
--#endif
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
- (void)interp;
-+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
- #ifdef SQLITE_HAVE_ZLIB
-+ extern int sqlite3_sqlar_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
-+ extern int sqlite3_zipfile_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
- #endif
-
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-segmentation_fault_fixes.patch b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-segmentation_fault_fixes.patch
deleted file mode 100644
index cf430a9ddc5..00000000000
--- a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-segmentation_fault_fixes.patch
+++ /dev/null
@@ -1,954 +0,0 @@
-https://sqlite.org/src/info/b2ce5ed175cb5029
-https://sqlite.org/src/info/6e4a5f22811bcd14
-https://sqlite.org/src/info/516ca8945150bdc1
-https://sqlite.org/src/info/e1724f1d618cfbcf
-https://sqlite.org/src/info/c621fc668c6538f9
-https://sqlite.org/src/info/c509d8a8aebe0da4
-https://sqlite.org/src/info/a9b90aa12eecdd9f
-
---- /ext/fts3/fts3_write.c
-+++ /ext/fts3/fts3_write.c
-@@ -3754,7 +3754,7 @@
- }
- p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
-
-- if( nPrefix>p->iOff || nSuffix>p->nNode-p->iOff ){
-+ if( nPrefix>p->term.n || nSuffix>p->nNode-p->iOff || nSuffix==0 ){
- return FTS_CORRUPT_VTAB;
- }
- blobGrowBuffer(&p->term, nPrefix+nSuffix, &rc);
-@@ -3773,7 +3773,7 @@
- }
- }
-
-- assert( p->iOff<=p->nNode );
-+ assert_fts3_nc( p->iOff<=p->nNode );
- return rc;
- }
-
---- /ext/fts5/fts5_buffer.c
-+++ /ext/fts5/fts5_buffer.c
-@@ -178,7 +178,11 @@
- i64 iOff = *piOff;
- int iVal;
- fts5FastGetVarint32(a, i, iVal);
-- if( iVal==1 ){
-+ if( iVal<=1 ){
-+ if( iVal==0 ){
-+ *pi = i;
-+ return 0;
-+ }
- fts5FastGetVarint32(a, i, iVal);
- iOff = ((i64)iVal) << 32;
- fts5FastGetVarint32(a, i, iVal);
---- /ext/fts5/test/fts5corrupt3.test
-+++ /ext/fts5/test/fts5corrupt3.test
-@@ -8128,6 +8128,215 @@
- INSERT INTO t1(t1) VALUES('optimize')
- } {1 {database disk image is malformed}}
-
-+#-------------------------------------------------------------------------
-+reset_db
-+do_test 58.0 {
-+ sqlite3 db {}
-+ db deserialize [decode_hexdb {
-+.open --hexdb
-+| size 24576 pagesize 4096 filename crash-5a5acd0ab42d31.db
-+| page 1 offset 0
-+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
-+| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 00 .....@ ........
-+| 96: 00 00 00 00 0d 00 00 00 06 0e 0f 00 0f aa 0f 53 ...............S
-+| 112: 0e e8 0e 8b 0e 33 0e 0f 00 00 00 00 00 00 00 00 .....3..........
-+| 3584: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 ................
-+| 3600: 06 06 17 11 11 01 31 74 61 62 6c 65 62 62 62 62 ......1tablebbbb
-+| 3616: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 62 62 .CREATE TABLE bb
-+| 3632: 28 61 29 56 05 06 17 1f 1f 01 7d 74 61 62 6c 65 (a)V.......table
-+| 3648: 74 31 5f 63 2a 6e 66 69 68 74 31 5f 63 6f 6e 66 t1_c*nfiht1_conf
-+| 3664: 69 67 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 ig.CREATE TABLE
-+| 3680: 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b 20 50 52 't1_config'(k PR
-+| 3696: 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 20 57 49 IMARY KEY, v) WI
-+| 3712: 54 48 4f 55 54 20 52 4f 57 49 44 5b 04 07 17 21 THOUT ROWID[...!
-+| 3728: 21 01 81 01 74 61 62 6c 65 74 31 5f 64 6f 73 73 !...tablet1_doss
-+| 3744: 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 04 43 52 izet1_docsize.CR
-+| 3760: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 64 EATE TABLE 't1_d
-+| 3776: 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 54 45 47 ocsize'(id INTEG
-+| 3792: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
-+| 3808: 73 7a 20 42 4c 4f 42 29 69 03 07 17 19 19 01 81 sz BLOB)i.......
-+| 3824: 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 31 5f 69 -tablet1_idxt1_i
-+| 3840: 64 78 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 dx.CREATE TABLE
-+| 3856: 27 74 31 5f 69 64 78 27 28 73 65 67 69 64 2c 20 't1_idx'(segid,
-+| 3872: 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 52 49 4d term, pgno, PRIM
-+| 3888: 41 52 59 20 4b 45 59 28 73 65 67 69 64 2c 20 74 ARY KEY(segid, t
-+| 3904: 65 72 6d 29 29 20 57 49 54 48 4f 55 54 20 52 4f erm)) WITHOUT RO
-+| 3920: 57 49 44 55 02 07 17 1b 1b 01 81 01 74 61 62 6c WIDU........tabl
-+| 3936: 65 74 31 5f 64 61 74 61 74 31 5f 64 61 74 61 02 et1_datat1_data.
-+| 3952: 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 CREATE TABLE 't1
-+| 3968: 5f 64 61 74 61 27 28 69 64 20 49 4e 54 45 47 45 _data'(id INTEGE
-+| 3984: 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 R PRIMARY KEY, b
-+| 4000: 6c 6f 63 6b 20 42 4c 4f 42 29 54 01 07 17 11 11 lock BLOB)T.....
-+| 4016: 08 81 15 74 61 62 6c 65 74 31 74 31 43 52 45 41 ...tablet1t1CREA
-+| 4032: 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 TE VIRTUAL TABLE
-+| 4048: 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 28 61 t1 USING fts5(a
-+| 4064: 2c 62 2c 70 72 65 66 69 78 3d 22 32 2c 32 2c 33 ,b,prefix=.2,2,3
-+| 4080: 2c 34 22 2c 20 63 6f 6e 74 65 6e 74 3d 22 22 29 ,4., content=..)
-+| page 2 offset 4096
-+| 0: 0d 0b 6a 00 37 09 4c 02 0f e7 09 4c 0f c6 0f a4 ..j.7.L....L....
-+| 16: 0f 88 0f 6d 0f 4b 0f 2c 0f 0e 0e ec 0e cd 0e ae ...m.K.,........
-+| 32: 0e 8e 0e 6c 0e 4b 0e 29 0e 08 0d e6 0d c4 0d b5 ...l.K.)........
-+| 48: 0d 97 0d 76 0d 54 0d 30 fd 15 0c f3 0c d3 0c b5 ...v.T.0........
-+| 64: 0c 95 0c 73 0c 54 0c 32 0c 10 0b ee 0b cc 0b b0 ...s.T.2........
-+| 80: 0b 8d 0b 7e 0b 48 0b 2e 0b 0b 0a ef 0a cc 0a ad ...~.H..........
-+| 96: 0a 8c 0a 6d 0a 4d 0a 2b 0a 0c 00 00 00 00 00 00 ...m.M.+........
-+| 2368: 00 00 00 00 00 00 00 00 00 00 00 00 15 0a 03 00 ................
-+| 2384: 30 00 00 00 9c 01 03 35 00 03 01 01 12 02 01 12 0......5........
-+| 2400: 03 01 11 1c 8c 80 80 80 80 10 03 00 3e 00 00 00 ............>...
-+| 2416: 17 01 05 05 34 74 61 62 6c 03 02 03 01 04 77 68 ....4tabl.....wh
-+| 2432: 65 72 03 02 06 09 1b 8c 80 80 80 80 0f 03 00 3c er.............<
-+| 2448: 00 00 00 16 05 34 66 74 73 34 03 02 02 01 04 6e .....4fts4.....n
-+| 2464: 75 6d 62 03 06 01 04 09 1b 8c 80 80 80 80 0e 03 umb.............
-+| 2480: 00 3c 00 00 00 16 04 33 74 68 65 03 06 01 01 04 .<.....3the.....
-+| 2496: 01 03 77 68 65 03 02 04 04 0a 1b 8c 80 80 80 80 ..whe...........
-+| 2512: 0d 03 00 3c 00 00 00 16 04 33 6e 75 6d 03 06 01 ...<.....3num...
-+| 2528: 01 05 01 03 74 61 62 05 62 03 04 0a 19 8c 80 80 ....tab.b.......
-+| 2544: 80 80 0c 03 00 38 00 00 00 14 03 39 a7 68 03 02 .....8.....9.h..
-+| 2560: 04 10 04 33 66 74 73 03 02 02 04 07 18 8c 80 80 ...3fts.........
-+| 2576: 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 03 02 .....6.....2ta..
-+| 2592: 03 02 01 68 03 06 01 01 04 04 07 1b 8c 80 80 80 ...h............
-+| 2608: 80 0a 03 00 3c 00 00 00 16 03 32 6e 75 03 06 01 ....<.....2nu...
-+| 2624: 01 05 01 02 6f 66 03 06 01 01 06 04 09 19 8c 80 ....of..........
-+| 2640: 80 80 80 09 03 00 38 00 00 00 14 03 32 66 74 03 ......8.....2ft.
-+| 2656: 02 02 01 02 69 73 03 06 01 01 03 04 07 18 8c 80 ....is..........
-+| 2672: 80 80 80 08 03 00 36 00 00 00 13 02 31 74 03 08 ......6.....1t..
-+| 2688: 03 01 01 04 01 01 77 03 02 04 04 09 1a 8c 80 80 ......w.........
-+| 2704: 80 80 07 03 00 3a ff 00 00 15 02 31 6e 03 08 01 .....:.....1n...
-+| 2720: 01 02 05 01 01 6f 03 06 01 01 06 04 09 18 8c 80 .....o..........
-+| 2736: 80 80 80 06 03 00 36 00 00 00 13 04 02 31 66 03 ......6......1f.
-+| 2752: 02 01 f1 01 69 03 06 01 01 03 05 06 1c 8c 80 80 ....i...........
-+| 2768: 80 80 05 03 00 3e 00 00 00 17 04 30 74 68 65 03 .....>.....0the.
-+| 2784: 06 01 01 14 01 05 77 68 65 72 65 03 02 04 0a 15 ......where.....
-+| 2800: 8c 80 80 80 80 04 03 00 30 00 00 00 11 01 01 06 ........0.......
-+| 2816: 06 30 74 61 62 6c cc 03 02 03 07 1c 8c 80 80 80 .0tabl..........
-+| 2832: 80 03 03 00 3e 00 00 00 17 07 30 6e 75 6d 62 65 ....>.....0numbe
-+| 2848: 72 03 06 01 01 05 01 02 6f 66 02 06 04 0d 13 8c r.......of......
-+| 2864: 80 80 80 80 02 03 00 2c 00 00 00 0f 01 01 03 02 .......,........
-+| 2880: 30 6e 03 06 01 01 02 07 1b 8c 80 80 80 80 01 03 0n..............
-+| 2896: 00 3c 00 00 00 16 08 30 66 74 73 34 61 75 78 03 .<.....0fts4aux.
-+| 2912: 02 02 01 02 69 73 03 06 04 0c 00 00 00 14 2a 00 ....is........*.
-+| 2928: 00 00 01 01 02 24 00 02 01 01 12 02 01 12 08 88 .....$..........
-+| 2944: 80 80 80 80 12 03 00 16 00 00 00 05 02 1c 88 80 ................
-+| 2960: 80 80 80 11 03 00 3e 00 00 00 17 05 34 72 6f 77 ......>.....4row
-+| 2976: 73 02 06 01 01 05 01 04 74 68 65 72 02 02 04 0b s.......ther....
-+| 2992: 15 88 80 80 80 80 10 03 00 3e 10 00 00 11 02 01 .........>......
-+| 3008: 01 07 05 34 62 65 74 77 02 02 04 08 1b 88 80 80 ...4betw........
-+| 3024: 80 80 0f 03 00 3c 00 00 00 16 04 04 33 72 6f 77 .....<......3row
-+| 3040: 02 06 01 01 05 01 03 74 68 65 02 08 05 0a 1b 88 .......the......
-+| 3056: 80 80 80 80 0e 03 05 0c 00 00 00 16 01 01 02 04 ................
-+| 3072: 33 61 72 65 02 02 03 01 03 62 65 74 02 02 07 08 3are.....bet....
-+| 3088: 1b 88 80 80 80 80 0d 03 00 3c 00 00 00 16 03 32 .........<.....2
-+| 3104: 74 68 02 08 02 01 01 07 00 04 33 61 6e 64 02 06 th........3and..
-+| 3120: 04 01 1b 88 80 80 80 80 0c 03 00 3c 00 00 00 16 ...........<....
-+| 3136: 03 32 69 6e 02 06 01 01 06 01 02 72 6f 02 06 01 .2in.......ro...
-+| 3152: 01 05 04 09 18 88 80 80 80 80 0b 03 00 36 00 00 .............6..
-+| 3168: 00 13 02 03 32 61 72 02 02 03 01 02 62 65 02 02 ....2ar.....be..
-+| 3184: 04 05 07 1b 88 80 bf 80 80 0a 03 00 3c 00 00 00 ............<...
-+| 3200: 16 02 31 74 02 08 02 01 01 07 00 03 32 61 6e 02 ..1t........2an.
-+| 3216: 06 01 01 04 09 19 88 80 80 80 80 09 03 00 38 00 ..............8.
-+| 3232: 00 00 14 02 31 6e 02 06 01 01 03 01 01 72 02 06 ....1n.......r..
-+| 3248: 01 01 05 03 08 17 88 80 80 80 80 08 03 00 34 00 ..............4.
-+| 3264: 01 00 12 02 31 62 02 02 04 01 01 69 02 06 01 01 ....1b.....i....
-+| 3280: 06 04 06 19 88 80 80 80 80 07 03 00 38 00 00 00 ............8...
-+| 3296: 14 04 02 31 32 02 02 05 01 01 61 02 08 03 01 01 ...12.....a.....
-+| 3312: 02 05 06 1b 88 80 80 80 80 06 03 00 3c 00 00 00 ............<...
-+| 3328: 16 06 30 74 68 65 72 65 02 12 02 00 02 31 31 02 ..0there.....11.
-+| 3344: 06 01 01 04 0a 15 88 80 80 80 80 05 03 00 30 00 ..............0.
-+| 3360: 00 00 11 01 01 05 04 30 74 68 65 02 06 71 01 07 .......0the..q..
-+| 3376: 07 1c 88 80 80 80 80 04 03 00 3e 00 00 00 17 01 ..........>.....
-+| 3392: 01 06 02 30 6e 02 06 01 01 03 01 04 72 6f 77 73 ...0n.......rows
-+| 3408: 02 06 07 08 1b 88 80 80 80 80 03 03 00 3c 00 00 .............<..
-+| 3424: 00 16 08 30 62 65 74 77 65 65 6e 02 02 04 01 02 ...0between.....
-+| 3440: 69 6e 02 06 04 0c 1a 88 80 80 80 80 02 03 00 3a in.............:
-+| 3456: 08 f0 00 15 04 30 61 6e 64 02 06 01 01 02 02 02 .....0and.......
-+| 3472: 72 65 02 02 03 04 0a 17 88 80 80 80 80 01 03 00 re..............
-+| 3488: 34 00 00 00 12 02 30 31 02 06 01 01 04 01 01 32 4.....01.......2
-+| 3504: 02 02 07 04 08 08 84 80 80 80 80 12 03 00 16 00 ................
-+| 3520: 00 00 05 04 1b 84 80 80 80 80 11 03 00 3c 00 00 .............<..
-+| 3536: 00 16 05 34 74 61 62 6c 01 06 01 01 05 02 03 65 ...4tabl.......e
-+| 3552: 72 6d 01 02 04 0b 1b 84 80 80 80 80 10 03 00 3c rm.............<
-+| 3568: 00 00 00 16 05 34 65 61 63 68 01 02 03 01 04 70 .....4each.....p
-+| 3584: 72 65 73 01 02 05 04 09 1a 84 80 80 80 80 0f 03 res.............
-+| 3600: 00 3a 00 00 00 15 04 33 74 65 72 01 02 04 02 02 .:.....3ter.....
-+| 3616: 68 65 01 06 01 01 03 04 08 1b 84 80 80 80 80 0e he..............
-+| 3632: 03 00 3c 00 00 00 16 04 33 70 72 65 01 02 05 01 ..<.....3pre....
-+| 3648: 03 74 61 62 01 06 01 01 05 04 08 1a 84 80 80 80 .tab............
-+| 3664: 80 0d 03 00 3a 00 00 00 15 04 33 66 6f 72 01 02 ....:.....3for..
-+| 3680: 02 02 02 74 73 01 06 01 01 04 03 f8 1b 84 80 80 ...ts...........
-+| 3696: 80 80 0c 03 00 3c 00 00 00 16 03 32 74 68 01 06 .....<.....2th..
-+| 3712: 01 01 03 00 04 33 65 61 63 01 02 03 04 09 18 84 .....3eac.......
-+| 3728: 80 80 80 80 0b 03 00 36 00 00 00 13 03 32 74 61 .......6.....2ta
-+| 3744: 01 06 01 01 05 02 01 65 00 02 04 04 09 19 84 80 .......e........
-+| 3760: 80 80 80 0a 03 10 38 00 00 00 14 03 32 69 6e 01 ......8.....2in.
-+| 3776: 06 01 01 02 01 02 70 72 01 02 05 04 09 18 84 80 ......pr........
-+| 3792: 80 80 80 09 03 00 36 00 00 00 13 03 32 66 6f 01 ......6.....2fo.
-+| 3808: 02 02 02 01 74 01 06 01 01 04 04 07 1b 84 80 80 ....t...........
-+| 3824: 80 80 08 03 00 3c 00 00 00 16 02 31 74 01 0a 04 .....<.....1t...
-+| 3840: 01 00 03 04 00 03 32 65 61 01 02 03 04 0a 17 84 ......2ea.......
-+| 3856: 80 80 80 80 07 03 00 34 00 00 00 12 02 31 69 01 .......4.....1i.
-+| 3872: 06 01 01 02 de 01 70 01 02 05 04 08 18 84 80 80 ......p.........
-+| 3888: 80 80 06 03 00 36 00 00 00 13 02 31 65 01 02 03 .....6.....1e...
-+| 3904: 01 01 66 01 08 02 01 01 04 04 06 1b 84 80 80 80 ..f.............
-+| 3920: 80 05 03 00 3c 00 00 00 16 05 30 74 65 72 6d 01 ....<.....0term.
-+| 3936: 02 04 02 02 68 65 01 06 01 01 03 04 09 14 84 80 ....he..........
-+| 3952: 80 80 80 04 03 00 2e 00 00 00 10 06 30 74 61 62 ............0tab
-+| 3968: 6c 65 01 06 01 01 05 04 15 84 80 80 80 80 03 03 le..............
-+| 3984: 00 30 00 00 00 11 02 08 30 70 72 65 73 65 6e 74 .0......0present
-+| 4000: 01 02 05 05 1b 84 80 80 80 80 02 03 00 3c 00 00 .............<..
-+| 4016: 00 16 04 30 66 74 73 01 06 01 01 04 01 02 69 6e ...0fts.......in
-+| 4032: 01 06 01 01 04 0a 1a 84 80 80 80 80 01 03 00 3a ...............:
-+| 4048: 00 00 00 15 05 30 65 61 63 68 00 f2 03 01 03 66 .....0each.....f
-+| 4064: 6f 72 01 02 02 04 09 06 01 03 00 12 03 0b 0f 00 or..............
-+| 4080: 00 08 8c 80 80 80 80 11 03 00 16 00 00 00 05 04 ................
-+| page 3 offset 8192
-+| 0: 0a 00 00 00 32 0e 4f 00 0f fa 0f f1 0f e9 0f e1 ....2.O.........
-+| 16: 0f d8 0f d1 0f c9 0f c1 0f b9 0f c1 0f a9 0f a0 ................
-+| 32: 0f 98 0f 90 0f 87 0f 80 0f 78 0f 71 0f 68 0f 5f .........x.q.h._
-+| 48: 0f 56 0f 4d 0f 41 0f 38 0f 2f 0f 26 0f 1d 0f 13 .V.M.A.8./.&....
-+| 64: 0f 0a 0f 01 0e f7 0e ee 0e e6 0e dd 0e d7 0e cd ................
-+| 80: 0e c3 0e ba 0e b0 0e a8 0e 9f 0e 96 0e 8e 0e 85 ................
-+| 3648: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08 ................
-+| 3664: 04 01 10 01 03 34 74 20 07 04 01 0e 01 03 34 1e .....4t ......4.
-+| 3680: 09 04 01 12 34 03 33 74 68 1c 08 04 01 10 01 03 ....4.3th.......
-+| 3696: 33 6e 1a 08 04 01 10 01 03 32 77 18 08 04 01 10 3n.......2w.....
-+| 3712: 01 03 32 74 16 08 04 01 10 01 03 32 6e 14 07 04 ..2t.......2n...
-+| 3728: 01 0e 01 03 32 12 08 04 01 0f f1 03 31 74 10 08 ....2.......1t..
-+| 3744: 04 01 10 01 03 31 6e 0e 07 04 01 0e 01 03 30 fc .....1n.......0.
-+| 3760: 09 04 01 12 01 03 30 74 68 0a 08 04 01 10 01 03 ......0th.......
-+| 3776: 30 74 08 09 04 01 12 01 03 30 6e 75 06 08 04 01 0t.......0nu....
-+| 3792: 10 01 03 30 6e 04 06 04 01 0c 01 05 52 08 04 01 ...0n.......R...
-+| 3808: 10 01 02 34 72 22 07 04 01 0e 01 02 34 20 08 04 ...4r.......4 ..
-+| 3824: 01 10 01 02 33 72 1e 09 04 01 12 01 02 33 61 72 ....3r.......3ar
-+| 3840: 1c 08 04 01 10 01 02 32 74 1a 08 04 01 10 b3 02 .......2t.......
-+| 3856: 32 69 18 09 04 01 12 01 02 32 61 72 16 08 04 01 2i.......2ar....
-+| 3872: 10 01 02 31 74 14 08 04 01 10 01 02 31 6e 12 08 ...1t.......1n..
-+| 3888: 04 01 10 01 02 31 62 10 08 04 01 10 01 02 31 32 .....1b.......12
-+| 3904: 0e 0b 04 01 16 01 02 30 74 68 65 72 0c 08 04 01 .......0ther....
-+| 3920: 10 01 02 30 74 0a 08 04 01 10 01 02 30 6e 08 08 ...0t.......0n..
-+| 3936: 04 01 10 01 02 30 62 06 09 04 01 10 01 02 30 61 .....0b.......0a
-+| 3952: 04 06 04 01 0c 01 02 02 07 04 09 10 01 34 74 22 .............4t.
-+| 3968: 06 04 09 0e 01 34 20 08 04 09 12 01 33 74 65 1e .....4 .....3te.
-+| 3984: 07 04 09 10 01 33 70 1c 07 f4 09 11 01 33 66 1a .....3p......3f.
-+| 4000: 08 04 09 12 01 32 74 68 18 07 04 09 10 01 32 e4 .....2th......2.
-+| 4016: 16 07 04 09 10 01 32 69 14 07 04 09 10 01 32 66 ......2i......2f
-+| 4032: 12 07 04 09 10 01 31 74 10 07 04 09 10 01 31 69 ......1t......1i
-+| 4048: 0e 06 04 09 0e 01 31 0c 08 04 09 12 01 30 74 65 ......1......0te
-+| 4064: 0a 07 04 09 10 01 30 74 08 00 00 00 00 00 00 00 ......0t........
-+| page 4 offset 12288
-+| 4064: 00 00 00 00 00 00 00 00 00 00 00 05 03 03 00 10 ................
-+| 4080: 03 05 05 02 03 00 10 04 06 05 01 03 00 10 04 04 ................
-+| page 5 offset 16384
-+| 0: 0a 00 00 00 02 0f eb 00 0f eb 0f f4 00 00 00 00 ................
-+| 4064: 00 00 00 00 00 00 00 00 00 00 00 08 03 15 01 70 ...............p
-+| 4080: 67 73 7a 18 0b 03 1b 01 76 65 72 73 69 6f 6e 04 gsz.....version.
-+| page 6 offset 20480
-+| 4080: 00 00 23 03 02 01 03 03 02 00 00 00 00 00 00 00 ..#.............
-+| end crash-5a5acd0ab42d31.db
-+}]} {}
-+
-+do_execsql_test 58.1 {
-+ SELECT * FROM t1('t*');
-+} {{} {} {} {} {} {}}
-
- sqlite3_fts5_may_be_corrupt 0
- finish_test
---- /src/btree.c
-+++ /src/btree.c
-@@ -4284,10 +4284,9 @@
- rc = newDatabase(pBt);
- pBt->nPage = get4byte(28 + pBt->pPage1->aData);
-
-- /* The database size was written into the offset 28 of the header
-- ** when the transaction started, so we know that the value at offset
-- ** 28 is nonzero. */
-- assert( pBt->nPage>0 );
-+ /* pBt->nPage might be zero if the database was corrupt when
-+ ** the transaction was started. Otherwise, it must be at least 1. */
-+ assert( CORRUPT_DB || pBt->nPage>0 );
- }
- sqlite3BtreeLeave(p);
- }
-@@ -7637,6 +7636,7 @@
- u16 maskPage = pOld->maskPage;
- u8 *piCell = aData + pOld->cellOffset;
- u8 *piEnd;
-+ VVA_ONLY( int nCellAtStart = b.nCell; )
-
- /* Verify that all sibling pages are of the same "type" (table-leaf,
- ** table-interior, index-leaf, or index-interior).
-@@ -7665,6 +7665,10 @@
- */
- memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
- if( pOld->nOverflow>0 ){
-+ if( limit<pOld->aiOvfl[0] ){
-+ rc = SQLITE_CORRUPT_BKPT;
-+ goto balance_cleanup;
-+ }
- limit = pOld->aiOvfl[0];
- for(j=0; j<limit; j++){
- b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
-@@ -7684,6 +7688,7 @@
- piCell += 2;
- b.nCell++;
- }
-+ assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
-
- cntOld[i] = b.nCell;
- if( i<nOld-1 && !leafData){
---- /src/resolve.c
-+++ /src/resolve.c
-@@ -866,7 +866,9 @@
- #ifndef SQLITE_OMIT_WINDOWFUNC
- if( pExpr->y.pWin ){
- Select *pSel = pNC->pWinSelect;
-- sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
-+ if( IN_RENAME_OBJECT==0 ){
-+ sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
-+ }
- sqlite3WalkExprList(pWalker, pExpr->y.pWin->pPartition);
- sqlite3WalkExprList(pWalker, pExpr->y.pWin->pOrderBy);
- sqlite3WalkExpr(pWalker, pExpr->y.pWin->pFilter);
---- /src/vdbe.c
-+++ /src/vdbe.c
-@@ -264,7 +264,7 @@
- ** is clear. Otherwise, if this is an ephemeral cursor created by
- ** OP_OpenDup, the cursor will not be closed and will still be part
- ** of a BtShared.pCursor list. */
-- p->apCsr[iCur]->isEphemeral = 0;
-+ if( p->apCsr[iCur]->pBtx==0 ) p->apCsr[iCur]->isEphemeral = 0;
- sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
- p->apCsr[iCur] = 0;
- }
-@@ -3686,7 +3686,10 @@
- if( pCx ){
- /* If the ephermeral table is already open, erase all existing content
- ** so that the table is empty again, rather than creating a new table. */
-- rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
-+ assert( pCx->isEphemeral );
-+ if( pCx->pBtx ){
-+ rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
-+ }
- }else{
- pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, CURTYPE_BTREE);
- if( pCx==0 ) goto no_mem;
---- /test/altertab3.test
-+++ /test/altertab3.test
-@@ -142,6 +142,39 @@
- ALTER TABLE Table0 RENAME Col0 TO Col0;
- }
-
-+#-------------------------------------------------------------------------
-+reset_db
-+do_execsql_test 7.1.0 {
-+ CREATE TABLE t1(a,b,c);
-+ CREATE TRIGGER AFTER INSERT ON t1 BEGIN
-+ SELECT a, rank() OVER w1 FROM t1
-+ WINDOW w1 AS (PARTITION BY b, percent_rank() OVER w1);
-+ END;
-+}
-+
-+do_execsql_test 7.1.2 {
-+ ALTER TABLE t1 RENAME TO t1x;
-+ SELECT sql FROM sqlite_master;
-+} {
-+ {CREATE TABLE "t1x"(a,b,c)}
-+ {CREATE TRIGGER AFTER INSERT ON "t1x" BEGIN
-+ SELECT a, rank() OVER w1 FROM "t1x"
-+ WINDOW w1 AS (PARTITION BY b, percent_rank() OVER w1);
-+ END}
-+}
-+
-+do_execsql_test 7.2.1 {
-+ DROP TRIGGER after;
-+ CREATE TRIGGER AFTER INSERT ON t1x BEGIN
-+ SELECT a, rank() OVER w1 FROM t1x
-+ WINDOW w1 AS (PARTITION BY b, percent_rank() OVER w1 ORDER BY d);
-+ END;
-+}
-+
-+do_catchsql_test 7.2.2 {
-+ ALTER TABLE t1x RENAME TO t1;
-+} {1 {error in trigger AFTER: no such column: d}}
-+
- finish_test
-
-
---- /test/corruptL.test
-+++ /test/corruptL.test
-@@ -838,4 +838,32 @@
- INSERT INTO t3 SELECT * FROM t2;
- } {1 {database disk image is malformed}}
-
-+#-------------------------------------------------------------------------
-+reset_db
-+do_test 9.0 {
-+ sqlite3 db {}
-+ db deserialize [decode_hexdb {
-+| size 8192 pagesize 4096 filename crash-ab10597e4e1c32.db
-+| page 1 offset 0
-+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
-+| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 00 .....@ ........
-+| 96: 00 00 00 00 0d 00 00 00 01 0f d6 00 0f d6 00 00 ................
-+| 4048: 00 00 00 00 00 00 28 01 06 17 11 11 01 3d 74 61 ......(......=ta
-+| 4064: 62 6c 65 74 31 74 31 02 43 52 45 41 54 45 20 54 blet1t1.CREATE T
-+| 4080: 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 29 ABLE t1(a,b,c,d)
-+| page 2 offset 4096
-+| 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-+| end crash-ab10597e4e1c32.db
-+}]} {}
-+
-+do_execsql_test 9.1 {
-+ SAVEPOINT one;
-+}
-+do_catchsql_test 9.3 {
-+ INSERT INTO t1(b,c) VALUES(5,6);
-+} {1 {database disk image is malformed}}
-+do_execsql_test 9.3 {
-+ ROLLBACK TO one;
-+}
-+
- finish_test
---- /test/fts3corrupt4.test
-+++ /test/fts3corrupt4.test
-@@ -3915,5 +3915,491 @@
- SELECT 'FyzLy'FROM t1 WHERE t1 MATCH 'j';
- } {1 {database disk image is malformed}}
-
-+#-------------------------------------------------------------------------
-+reset_db
-+do_test 24.0 {
-+ sqlite3 db {}
-+ db deserialize [decode_hexdb {
-+.open --hexdb
-+| size 28672 pagesize 4096 filename crash-369d042958c29b.db
-+| page 1 offset 0
-+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
-+| 16: 10 00 01 01 00 40 20 20 00 00 03 10 00 00 00 00 .....@ ........
-+| 96: 00 00 00 00 0d 0e b1 00 06 0d a4 00 0f 8d 0f 21 ...............!
-+| 112: 0e b9 0d c8 0e 7e 0d a4 00 00 00 00 00 00 00 00 .....~..........
-+| 3488: 00 00 00 00 22 07 06 17 11 11 01 31 74 61 62 6c ...........1tabl
-+| 3504: 65 74 32 74 32 07 43 52 45 41 54 45 20 54 41 42 et2t2.CREATE TAB
-+| 3520: 4c 45 20 74 32 28 78 29 81 33 05 07 17 1f 1f 01 LE t2(x).3......
-+| 3536: 82 35 74 61 62 6c 65 74 31 5f 73 65 67 64 69 72 .5tablet1_segdir
-+| 3552: 74 31 5f 73 65 67 64 69 72 05 43 52 45 41 54 45 t1_segdir.CREATE
-+| 3568: 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 TABLE 't1_segdi
-+| 3584: 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 r'(level INTEGER
-+| 3600: 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 ,idx INTEGER,sta
-+| 3616: 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 rt_block INTEGER
-+| 3632: 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 ,leaves_end_bloc
-+| 3648: 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f 62 6c k INTEGER,end_bl
-+| 3664: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f 6f 74 ock INTEGER,root
-+| 3680: 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 BLOB,PRIMARY KE
-+| 3696: 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 06 Y(level, idx))1.
-+| 3712: 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 ..E...indexsqlit
-+| 3728: 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 e_autoindex_t1_s
-+| 3744: 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 egdir_1t1_segdir
-+| 3760: 06 0f c7 00 08 00 10 00 00 66 04 07 17 23 23 01 .........f...##.
-+| 3776: 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d 65 6e ..tablet1_segmen
-+| 3792: 64 73 74 31 5f 73 65 67 6d 65 6e 74 73 04 43 52 dst1_segments.CR
-+| 3808: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
-+| 3824: 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 egments'(blockid
-+| 3840: 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 INTEGER PRIMARY
-+| 3856: 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 KEY, block BLOB
-+| 3872: 29 6a 03 07 17 21 21 01 81 1f 74 61 62 6c 65 74 )j...!!...tablet
-+| 3888: 31 4f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f 6e 74 1Ocontentt1_cont
-+| 3904: 65 6e 74 03 43 52 45 41 54 45 20 54 41 42 4c 45 ent.CREATE TABLE
-+| 3920: 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 't1_content'(do
-+| 3936: 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 39 4d cid INTEGER PR9M
-+| 3952: 41 52 59 20 4b 45 59 2c 20 27 63 30 61 27 2c 20 ARY KEY, 'c0a',
-+| 3968: 27 63 31 62 27 2c 20 27 63 32 63 27 29 38 02 06 'c1b', 'c2c')8..
-+| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
-+| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
-+| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 33 LE t1 USING fts3
-+| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
-+| page 3 offset 8192
-+| 0: 0d 00 00 00 26 0b 48 0e 0f d8 0f af 0f 86 0f 74 ....&.H........t
-+| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
-+| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
-+| 48: 0d bb 0d a0 0e 94 03 28 0d 4f 0d 35 0d 1b 05 0b .......(.O.5....
-+| 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 0c 0a .......x.W.>.$..
-+| 2880: 00 00 00 00 00 00 00 00 81 3f 25 06 00 72 7f 00 .........?%..r..
-+| 2896: 00 43 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e .COMPILER=gcc-5.
-+| 2912: 34 2e 30 20 32 30 31 36 30 36 30 39 20 44 55 42 4.0 20160609 DUB
-+| 2928: 55 47 20 45 4e 41 e4 7c 45 20 44 42 53 54 41 54 UG ENA.|E DBSTAT
-+| 2944: e4 d1 54 41 42 20 45 4e 41 42 4c 45 20 46 54 53 ..TAB ENABLE FTS
-+| 2960: 34 20 45 4e 41 42 4c 45 20 46 54 53 35 20 45 4e 4 ENABLE FTS5 EN
-+| 2976: 41 42 4c 45 20 47 45 4f 50 4f 4c 59 20 45 4e 41 ABLE GEOPOLY ENA
-+| 2992: 42 4c 45 20 4a 53 4f 4e 31 20 45 4e 41 42 4c 45 BLE JSON1 ENABLE
-+| 3008: 20 4d 45 4d 53 59 53 35 20 45 4e 41 42 4c 45 20 MEMSYS5 ENABLE
-+| 3024: 42 54 52 45 45 20 4d 41 58 20 4d 45 4d 4f 52 59 BTREE MAX MEMORY
-+| 3040: 3d 35 30 30 30 30 30 30 30 20 4f 4c 49 54 20 4c =50000000 OLIT L
-+| 3056: 4f 41 43 20 45 58 54 45 4e 53 49 4f 4e 21 54 48 OAC EXTENSION!TH
-+| 3072: 52 45 41 44 53 41 46 45 3d 30 18 24 05 00 25 0f READSAFE=0.$..%.
-+| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
-+| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
-+| 3120: 44 53 41 4b 75 3d 30 58 4d 4f 43 41 53 45 17 22 DSAKu=0XMOCASE..
-+| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 46 3d ..%..THREADSAFF=
-+| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
-+| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 52 49 4f IT LOAD EXTENRIO
-+| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
-+| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
-+| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
-+| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
-+| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
-+| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
-+| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
-+| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
-+| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
-+| 3328: 0f 17 4d 42 b8 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MB. MEMORY=500
-+| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
-+| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
-+| 3376: 49 4e 41 52 59 18 1a 05 0d a5 0f 19 45 4e 41 42 INARY.......ENAB
-+| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
-+| 3408: 19 1c 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
-+| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
-+| 3440: 4e 41 42 4c 45 20 4d 45 4d 53 59 53 35 58 42 49 NABLE MEMSYS5XBI
-+| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
-+| 3472: 45 20 4d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 E MEMSYS5XNOCASE
-+| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
-+| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 14 05 01 25 MSYS5XRTRIM....%
-+| 3520: 0f 19 45 4e 12 42 4c 45 20 4a 53 4f 4e 31 58 42 ..EN.BLE JSON1XB
-+| 3536: 49 4e 41 52 59 18 14 05 00 25 09 d9 45 4e 41 42 INARY....%..ENAB
-+| 3552: 4c 45 20 4a 53 4f 3e 31 58 4e 4f 43 41 53 45 17 LE JSO>1XNOCASE.
-+| 3568: 13 05 00 25 0f 17 45 4e 40 42 4c 45 20 4a 53 4f ...%..EN@BLE JSO
-+| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 82 29 0f 19 45 N1XRTRIM....)..E
-+| 3600: 4e 41 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 NABLE GEOPOLYXBI
-+| 3616: 4e 41 52 59 1a 11 05 c9 29 e8 19 46 4e 41 42 4c NARY....)..FNABL
-+| 3632: 48 c0 47 45 4f 50 4f 4c 59 58 4e 74 43 41 53 45 H.GEOPOLYXNtCASE
-+| 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 47 45 ....)..ENABLE GE
-+| 3664: 4f 50 4f 4c 59 58 52 54 52 49 4d 17 0f 05 00 23 OPOLYXRTRIM....#
-+| 3680: 0f 19 45 4e 41 42 4c 45 30 46 54 53 35 58 42 49 ..ENABLE0FTS5XBI
-+| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
-+| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0e 05 E FTS5XNOCASE...
-+| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
-+| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
-+| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE FTS4XBINARY..
-+| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
-+| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
-+| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
-+| 3824: 09 05 00 31 0f 19 45 4e 42 42 4c 45 20 44 42 53 ...1..ENBBLE DBS
-+| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
-+| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
-+| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 41 53 45 1d TAT VTABXNOCASE.
-+| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
-+| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 4a 4d 11 06 TAT VTABXRTRJM..
-+| 3920: 05 f0 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
-+| 3936: 59 11 05 05 00 17 0e 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
-+| 3952: 43 41 53 45 10 04 05 00 17 0f 16 44 45 42 55 47 CASE.......DEBUG
-+| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
-+| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
-+| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
-+| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
-+| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
-+| 4048: 39 58 4e 4f 43 41 53 45 26 01 06 00 43 0f 17 43 9XNOCASE&...C..C
-+| 4064: 4f 4d 50 49 4b 45 52 3d 67 63 63 2d 35 2e 34 2e OMPIKER=gcc-5.4.
-+| 4080: 30 20 32 30 31 36 30 36 40 39 58 29 54 52 49 4d 0 201606@9X)TRIM
-+| page 4 offset 12288
-+| 0: 0d 00 10 00 00 10 00 00 00 00 00 00 00 01 00 00 ................
-+| page 5 offset 16384
-+| 0: 0d 00 00 00 02 0b a0 00 0c ad 0b a0 00 00 00 00 ................
-+| 2976: 82 0a 02 08 08 09 08 08 17 84 06 30 20 32 35 33 ...........0 253
-+| 2992: 00 01 30 04 25 06 1b 00 00 08 32 30 31 36 30 36 ..0.%.....201606
-+| 3008: 30 39 03 25 07 00 00 01 34 03 25 05 00 00 01 35 09.%....4.%....5
-+| 3024: 03 25 04 00 01 07 30 30 30 30 30 30 30 03 25 1a .%....0000000.%.
-+| 3040: 00 00 08 63 6f 6d 70 69 6c 65 72 03 25 02 00 00 ...compiler.%...
-+| 3056: 06 64 62 73 74 61 74 03 25 0a 00 01 04 65 62 75 .dbstat.%....ebu
-+| 3072: 67 03 25 08 00 00 06 65 6e 61 62 6c 65 09 25 09 g.%....enable.%.
-+| 3088: 05 04 04 04 04 04 00 01 08 78 74 65 6e 73 69 6f .........xtensio
-+| 3104: 6e 03 25 1d 00 00 04 66 74 73 34 03 25 0d 00 03 n.%....fts4.%...
-+| 3120: 01 35 03 25 0f 00 00 03 67 63 63 03 25 03 00 01 .5.%....gcc.%...
-+| 3136: 06 65 6f 70 6f 6c 79 03 25 11 00 00 05 6a 73 6f .eopoly.%....jso
-+| 3152: 6e 31 03 25 13 00 00 04 6c 6f 61 64 03 25 1c 00 n1.%....load.%..
-+| 3168: 00 03 6d 61 78 03 25 18 00 01 05 65 6e 6f 72 79 ..max.%....enory
-+| 3184: 03 25 19 00 03 04 ce 79 73 4d 03 25 15 00 00 04 .%.....ysM.%....
-+| 3200: 6f 6d 69 74 03 25 1b 00 00 05 72 74 72 65 65 03 omit.%....rtree.
-+| 3216: 25 17 00 00 0a 74 68 72 65 61 64 73 61 66 65 03 %....threadsafe.
-+| 3232: 25 0e 00 00 04 76 74 61 62 03 25 0b 00 86 50 01 %....vtab.%...P.
-+| 3248: 08 08 08 08 08 17 8d 12 30 20 38 33 35 00 01 30 ........0 835..0
-+| 3264: 12 01 06 00 01 06 00 01 06 00 1f 03 00 01 03 09 ................
-+| 3280: 51 03 00 00 08 32 30 31 36 30 36 30 39 09 01 07 Q....20160609...
-+| 3296: 00 01 07 00 01 07 00 00 01 34 09 01 05 00 01 05 .........4......
-+| 3312: 00 01 05 00 00 01 35 09 01 04 00 01 04 00 01 04 ......5.........
-+| 3328: 00 01 07 30 30 30 30 30 30 30 09 1c 04 00 01 04 ...0000000......
-+| 3344: 00 01 04 00 00 06 62 69 6e 61 72 79 3c 03 01 02 ......binary<...
-+| 3360: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
-+| 3376: 00 03 01 02 02 00 02 f1 02 02 00 03 01 02 02 00 ................
-+| 3392: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 ................
-+| 3408: 01 02 02 00 03 01 02 02 00 00 08 63 6f 6d 70 69 ...........compi
-+| 3424: 6c 65 72 09 01 02 00 01 02 00 01 02 00 00 06 67 ler............g
-+| 3440: d2 73 74 61 74 09 07 03 00 01 03 00 01 03 00 01 .stat...........
-+| 3456: 04 65 62 75 67 09 04 02 00 01 02 00 01 02 00 00 .ebug...........
-+| 3472: 06 65 6e 6f 82 6c 65 3f 07 02 00 01 02 00 01 02 .eno.le?........
-+| 3488: b0 01 02 00 01 02 00 11 02 00 01 02 00 01 02 00 ................
-+| 3504: 01 02 00 01 02 00 01 02 00 01 a6 00 01 02 00 01 ................
-+| 3520: 02 05 51 02 00 01 02 00 01 02 00 01 02 00 01 02 ..Q.............
-+| 3536: 00 01 02 00 01 02 00 01 08 78 74 65 6e 73 69 6f .........xtensio
-+| 3552: 6e 09 1f 04 00 01 04 00 00 04 00 00 04 66 74 73 n............fts
-+| 3568: 34 09 0a 03 00 01 03 00 01 03 00 03 01 35 09 0d 4............5..
-+| 3584: 03 00 01 03 00 01 03 00 00 03 67 63 63 09 01 03 ..........gcc...
-+| 3600: 00 01 03 00 01 03 00 01 06 65 6f 70 73 6c 79 09 .........eopsly.
-+| 3616: 10 03 00 01 03 00 01 03 00 00 05 6a 73 6f 6e 31 ...........json1
-+| 3632: 09 13 03 00 01 03 00 01 03 00 00 04 6c 6f 61 64 ............load
-+| 3648: 09 1f 03 00 01 03 00 01 03 00 00 03 6d 61 78 09 ............max.
-+| 3664: 1c 02 00 01 02 00 01 02 00 01 05 65 6d 6f 72 79 ...........emory
-+| 3680: 09 1c 03 00 01 03 00 01 03 00 03 04 73 79 73 35 ............sys5
-+| 3696: 09 16 03 00 01 03 00 01 03 00 00 06 6e 6f 63 61 ............noca
-+| 3712: 73 65 3c 02 01 02 02 00 03 01 12 02 00 03 01 02 se<.............
-+| 3728: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
-+| 3744: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
-+| 3760: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 00 ................
-+| 3776: 04 6f 6d 69 74 09 1f 02 00 01 02 00 01 02 00 00 .omit...........
-+| 3792: 05 72 74 72 65 65 09 19 03 00 01 03 00 01 03 00 .rtree..........
-+| 3808: 03 02 69 6d 3c 01 01 02 02 00 03 01 02 02 00 03 ..im<...........
-+| 3824: 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 ................
-+| 3840: 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 ................
-+| 3856: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
-+| 3872: 00 00 0a 74 68 72 65 61 64 73 61 66 65 09 22 02 ...threadsafe...
-+| 3888: 00 01 02 00 01 02 00 00 04 76 74 61 62 09 07 04 .........vtab...
-+| 3904: 00 01 04 00 01 03 ff ff 01 78 b4 01 01 01 01 02 .........x......
-+| 3920: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
-+| 3936: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
-+| 3952: 01 01 02 00 01 01 01 07 30 01 01 01 02 00 01 01 ........0.......
-+| 3968: 01 02 00 11 01 01 02 00 01 01 01 02 00 11 01 01 ................
-+| 3984: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
-+| 4000: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
-+| 4016: 01 01 01 01 ff 01 01 01 02 00 01 01 01 02 00 01 ................
-+| 4032: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
-+| 4048: 01 02 00 01 01 09 c2 00 01 01 01 02 00 01 01 01 ................
-+| 4064: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
-+| 4080: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
-+| page 6 offset 20480
-+| 0: 0a 00 00 00 02 0f f5 00 0f fb 0f f5 00 00 00 00 ................
-+| 4080: 00 00 00 00 00 05 04 08 09 01 02 04 04 08 08 09 ................
-+| page 7 offset 24576
-+| 0: 0d 00 00 00 05 0f b8 00 0e f4 0f e9 10 d6 0f c7 ................
-+| 4016: 00 00 00 00 00 00 00 00 0d 05 02 23 61 75 74 6f ...........#auto
-+| 4032: 6d 65 72 67 65 3d 35 0d 04 02 23 6d 65 72 67 65 merge=5...#merge
-+| 4048: 3d 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =1..............
-+| end crash-369d042958c29b.db
-+}]} {}
-+
-+do_catchsql_test 24.1 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT '4hE'+x FROM c WHERE x<72)
-+ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
-+} {0 {}}
-+
-+do_catchsql_test 24.2 {
-+ UPDATE t1 SET b=quote((true) ) WHERE t1 MATCH 'h';
-+} {0 {}}
-+
-+do_catchsql_test 24.3 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT 3+x FROM c WHERE x<72)
-+ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
-+} {0 {}}
-+
-+do_catchsql_test 24.4 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT null<<x FROM c WHERE x<72)
-+ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
-+} {0 {}}
-+
-+do_catchsql_test 24.5 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT 3+x FROM c WHERE x<72)
-+ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
-+} {0 {}}
-+
-+do_catchsql_test 24.7 {
-+ INSERT INTO t1(t1) SELECT x FROM t2;
-+} {1 {database disk image is malformed}}
-+
-+#-------------------------------------------------------------------------
-+#-------------------------------------------------------------------------
-+reset_db
-+do_test 25.0 {
-+ sqlite3 db {}
-+ db deserialize [decode_hexdb {
-+.open --hexdb
-+| size 28672 pagesize 4096 filename crash-dde9e76ed8ab2d.db
-+| page 1 offset 0
-+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
-+| 16: 10 00 01 01 00 40 20 20 00 00 03 10 00 00 00 00 .....@ ........
-+| 96: 00 00 00 00 0d 0e b1 00 06 0d a4 00 0f 8d 0f 21 ...............!
-+| 112: 0e b9 0d c8 0e 7e 0d a4 00 00 00 00 00 00 00 00 .....~..........
-+| 3488: 00 00 00 00 22 07 06 17 11 11 01 31 74 61 62 6c ...........1tabl
-+| 3504: 65 74 32 74 32 07 43 52 45 41 54 45 20 54 41 42 et2t2.CREATE TAB
-+| 3520: 4c 45 20 74 32 28 78 29 81 33 05 07 17 1f 1f 01 LE t2(x).3......
-+| 3536: 82 35 74 61 62 6c 65 74 31 5f 73 65 67 64 69 72 .5tablet1_segdir
-+| 3552: 74 31 5f 73 65 67 64 69 72 05 43 52 45 41 54 45 t1_segdir.CREATE
-+| 3568: 20 54 41 42 4c 45 20 27 74 31 5f 73 65 67 64 69 TABLE 't1_segdi
-+| 3584: 72 27 28 6c 65 76 65 6c 20 49 4e 54 45 47 45 52 r'(level INTEGER
-+| 3600: 2c 69 64 78 20 49 4e 54 45 47 45 52 2c 73 74 61 ,idx INTEGER,sta
-+| 3616: 72 74 5f 62 6c 6f 63 6b 20 49 4e 54 45 47 45 52 rt_block INTEGER
-+| 3632: 2c 6c 65 61 76 65 73 5f 65 6e 64 5f 62 6c 6f 63 ,leaves_end_bloc
-+| 3648: 6b 20 49 4e 54 45 47 45 52 2c 65 6e 64 5f 62 6c k INTEGER,end_bl
-+| 3664: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 72 6f 6f 74 ock INTEGER,root
-+| 3680: 20 42 4c 4f 42 2c 50 52 49 4d 41 52 59 20 4b 45 BLOB,PRIMARY KE
-+| 3696: 59 28 6c 65 76 65 6c 2c 20 69 64 78 29 29 31 06 Y(level, idx))1.
-+| 3712: 06 17 45 1f 01 00 69 6e 64 65 78 73 71 6c 69 74 ..E...indexsqlit
-+| 3728: 65 5f 61 75 74 6f 69 6e 64 65 78 5f 74 31 5f 73 e_autoindex_t1_s
-+| 3744: 65 67 64 69 72 5f 31 74 31 5f 73 65 67 64 69 72 egdir_1t1_segdir
-+| 3760: 06 0f c7 00 08 00 00 00 00 66 04 07 17 23 23 01 .........f...##.
-+| 3776: 81 13 74 61 62 6c 65 74 31 5f 73 65 67 6d 65 6e ..tablet1_segmen
-+| 3792: 64 73 74 31 5f 73 65 67 6d 65 6e 74 73 04 43 52 dst1_segments.CR
-+| 3808: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 73 EATE TABLE 't1_s
-+| 3824: 65 67 6d 65 6e 74 73 27 28 62 6c 6f 63 6b 69 64 egments'(blockid
-+| 3840: 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 INTEGER PRIMARY
-+| 3856: 20 4b 45 59 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 KEY, block BLOB
-+| 3872: 29 6a 03 07 17 21 21 01 81 1f 74 61 62 6c 65 74 )j...!!...tablet
-+| 3888: 31 5f 63 6f 6e 74 65 6e 74 74 31 5f 63 6f 6e 74 1_contentt1_cont
-+| 3904: 65 6e 74 03 43 52 45 41 54 45 20 54 41 42 4c 45 ent.CREATE TABLE
-+| 3920: 20 27 74 31 5f 63 6f 6e 74 65 6e 74 27 28 64 6f 't1_content'(do
-+| 3936: 63 69 64 20 49 4e 54 45 47 45 52 20 50 52 39 4d cid INTEGER PR9M
-+| 3952: 41 52 59 20 4b 45 59 2c 20 27 63 30 61 27 2c 20 ARY KEY, 'c0a',
-+| 3968: 27 63 31 62 27 2c 20 27 63 32 63 27 29 38 02 06 'c1b', 'c2c')8..
-+| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
-+| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
-+| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 33 LE t1 USING fts3
-+| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
-+| page 3 offset 8192
-+| 0: 0d 00 00 00 26 0b 48 0e 0f d8 0f af 0f 86 0f 74 ....&.H........t
-+| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
-+| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
-+| 48: 0d bb 0d a0 0e 94 03 28 0d 4f 0d 35 0d 1b 05 0b .......(.O.5....
-+| 64: 0c da 0c b9 0c 99 0c 78 0c 57 0c 3e 0c 24 0c 0a .......x.W.>.$..
-+| 2880: 00 00 00 00 00 00 00 00 81 3f 25 06 00 72 7f 00 .........?%..r..
-+| 2896: 00 43 4f 4d 50 49 4c 45 52 3d 67 63 63 2d 35 2e .COMPILER=gcc-5.
-+| 2912: 34 2e 30 20 32 30 31 36 30 36 30 39 20 44 55 42 4.0 20160609 DUB
-+| 2928: 55 47 20 45 4e 41 e4 7c 45 20 44 42 53 54 41 54 UG ENA.|E DBSTAT
-+| 2944: e4 46 54 41 42 20 45 4e 41 42 4c 45 20 46 54 53 .FTAB ENABLE FTS
-+| 2960: 34 20 45 4e 41 42 4c 45 20 46 54 53 35 20 45 4e 4 ENABLE FTS5 EN
-+| 2976: 41 42 4c 45 20 47 45 4f 50 4f 4c 59 20 45 4e 41 ABLE GEOPOLY ENA
-+| 2992: 42 4c 45 20 4a 53 4f 4e 31 20 45 4e 41 42 4c 45 BLE JSON1 ENABLE
-+| 3008: 20 4d 45 4d 53 59 53 35 20 45 4e 41 42 4c 45 20 MEMSYS5 ENABLE
-+| 3024: 42 54 52 45 45 20 4d 41 58 20 4d 45 4d 4f 52 59 BTREE MAX MEMORY
-+| 3040: 3d 35 30 30 30 30 30 30 30 20 4f 4c 49 54 20 4c =50000000 OLIT L
-+| 3056: 4f 41 43 20 45 58 54 45 4e 53 49 4f 4e 21 54 48 OAC EXTENSION!TH
-+| 3072: 52 45 41 44 53 41 46 45 3d 30 18 24 05 00 25 0f READSAFE=0.$..%.
-+| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
-+| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
-+| 3120: 44 53 41 4b 75 3d 30 58 4d 4f 43 41 53 45 17 22 DSAKu=0XMOCASE..
-+| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 46 3d ..%..THREADSAFF=
-+| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
-+| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 52 49 4f IT LOAD EXTENRIO
-+| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 0f 19 4f NXBINARY. ..3..O
-+| 3200: 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 MIT LOAD EXTENSI
-+| 3216: 4f 4e 58 4e 4f 43 41 53 45 1e 1f 05 00 33 0f 17 ONXNOCASE....3..
-+| 3232: 4f 4d 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 OMIT LOAD EXTENS
-+| 3248: 49 4f 4e 58 52 54 52 49 4d 1f 1e 05 00 33 0f 19 IONXRTRIM....3..
-+| 3264: 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 30 MAX MEMORY=50000
-+| 3280: 30 30 30 58 42 49 4e 41 52 59 1f 1d 05 00 33 0f 000XBINARY....3.
-+| 3296: 19 4d 41 58 20 4d 45 4d 4f 52 59 3d 35 30 30 30 .MAX MEMORY=5000
-+| 3312: 30 30 30 30 58 4e 4f 43 41 53 45 1e 1c 05 00 33 0000XNOCASE....3
-+| 3328: 0f 17 4d 42 b8 20 4d 45 4d 4f 52 59 3d 35 30 30 ..MB. MEMORY=500
-+| 3344: 30 30 30 30 30 58 52 54 52 49 4d 18 1b 05 00 25 00000XRTRIM....%
-+| 3360: 0f 19 45 4e 41 42 4c 45 20 52 54 52 45 45 58 42 ..ENABLE RTREEXB
-+| 3376: 49 4e 41 52 59 18 1a 05 0d a5 0f 19 45 4e 41 42 INARY.......ENAB
-+| 3392: 4c 45 20 52 54 52 45 45 58 4e 4f 43 41 53 45 17 LE RTREEXNOCASE.
-+| 3408: 19 1c 00 25 0f 17 45 4e 41 42 4c 45 20 52 54 52 ...%..ENABLE RTR
-+| 3424: 45 45 58 52 54 52 49 4d 1a 18 05 00 29 0f 19 45 EEXRTRIM....)..E
-+| 3440: 4e 41 42 4c 45 20 4d 45 4d 53 59 53 35 58 42 49 NABLE MEMSYS5XBI
-+| 3456: 4e 41 52 59 1a 17 05 00 29 0f 19 45 4e 41 42 4c NARY....)..ENABL
-+| 3472: 45 20 4d 45 4d 53 59 53 35 58 4e 4f 43 41 53 45 E MEMSYS5XNOCASE
-+| 3488: 19 16 05 00 29 0f 17 45 4e 41 42 4c 45 20 4d 45 ....)..ENABLE ME
-+| 3504: 4d 53 59 53 35 58 52 54 52 49 4d 18 14 05 01 25 MSYS5XRTRIM....%
-+| 3520: 0f 19 45 4e 12 42 4c 45 20 4a 53 4f 4e 31 58 42 ..EN.BLE JSON1XB
-+| 3536: 49 4e 41 52 59 18 14 05 00 25 09 d9 45 4e 41 42 INARY....%..ENAB
-+| 3552: 4c 45 20 4a 53 4f 3e 31 58 4e 4f 43 41 53 45 17 LE JSO>1XNOCASE.
-+| 3568: 13 05 00 25 0f 17 45 4e 40 42 4c 45 20 4a 53 4f ...%..EN@BLE JSO
-+| 3584: 4e 31 58 52 54 52 49 4d 1a 12 05 82 29 0f 19 45 N1XRTRIM....)..E
-+| 3600: 4e 41 42 4c 45 20 47 45 4f 50 4f 4c 59 58 42 49 NABLE GEOPOLYXBI
-+| 3616: 4e 41 52 59 1a 11 05 c9 29 e8 19 46 4e 41 42 4c NARY....)..FNABL
-+| 3632: 48 c0 47 45 4f 50 4f 4c 59 58 4e 74 43 41 53 45 H.GEOPOLYXNtCASE
-+| 3648: 19 10 05 00 29 0f 17 45 4e 41 42 4c 45 20 47 45 ....)..ENABLE GE
-+| 3664: 4f 50 4f 4c 59 58 52 54 52 49 4d 17 0f 05 00 23 OPOLYXRTRIM....#
-+| 3680: 0f 19 45 4e 41 42 4c 45 30 46 54 53 35 58 42 49 ..ENABLE0FTS5XBI
-+| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
-+| 3712: 45 20 46 54 53 35 58 4e 4f 43 41 53 45 16 0e 05 E FTS5XNOCASE...
-+| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
-+| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
-+| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 17 0b LE FTS4XBINARY..
-+| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
-+| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
-+| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
-+| 3824: 09 05 00 31 0f 19 45 4e 42 42 4c 45 20 44 42 53 ...1..ENBBLE DBS
-+| 3840: 54 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e TAT VTABXBINARY.
-+| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
-+| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 41 53 45 1d TAT VTABXNOCASE.
-+| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
-+| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 4a 4d 11 06 TAT VTABXRTRJM..
-+| 3920: 05 f0 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
-+| 3936: 59 11 05 05 00 17 0e 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
-+| 3952: 43 41 53 45 10 04 05 00 17 0f 16 44 45 42 55 47 CASE.......DEBUG
-+| 3968: 58 52 54 52 49 4d 27 03 05 00 43 0f 19 43 4f 4d XRTRIM'...C..COM
-+| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
-+| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
-+| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
-+| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
-+| 4048: 39 58 4e 4f 43 41 53 45 26 01 06 00 43 0f 17 43 9XNOCASE&...C..C
-+| 4064: 4f 4d 50 49 4b 45 52 3d 67 63 63 2d 35 2e 34 2e OMPIKER=gcc-5.4.
-+| 4080: 30 20 32 30 31 36 30 36 40 39 58 29 54 52 49 4d 0 201606@9X)TRIM
-+| page 4 offset 12288
-+| 0: 0d 00 10 00 00 10 00 00 00 00 00 00 00 01 00 00 ................
-+| page 5 offset 16384
-+| 0: 0d 00 00 00 02 0b a0 00 0c ad 0b a0 00 00 00 00 ................
-+| 2976: 82 0a 02 08 08 09 08 08 17 84 06 30 20 32 35 33 ...........0 253
-+| 2992: 00 01 30 04 25 06 1b 00 00 08 32 30 31 36 30 36 ..0.%.....201606
-+| 3008: 30 39 03 25 07 00 00 01 34 03 25 05 00 00 01 35 09.%....4.%....5
-+| 3024: 03 25 04 00 01 07 30 30 30 30 30 30 30 03 25 1a .%....0000000.%.
-+| 3040: 00 00 08 63 6f 6d 70 69 6c 65 72 03 25 02 00 00 ...compiler.%...
-+| 3056: 06 64 62 73 74 61 74 03 25 0a 00 01 04 65 62 75 .dbstat.%....ebu
-+| 3072: 67 03 25 08 00 00 06 65 6e 61 62 6c 65 09 25 09 g.%....enable.%.
-+| 3088: 05 04 04 04 04 04 00 01 08 78 74 65 6e 73 69 6f .........xtensio
-+| 3104: 6e 03 25 1d 00 00 04 66 74 73 34 03 25 0d 00 03 n.%....fts4.%...
-+| 3120: 01 35 03 25 0f 00 00 03 67 63 63 03 25 03 00 01 .5.%....gcc.%...
-+| 3136: 06 65 6f 70 6f 6c 79 03 25 11 00 00 05 6a 73 6f .eopoly.%....jso
-+| 3152: 6e 31 03 25 13 00 00 04 6c 6f 61 64 03 25 1c 00 n1.%....load.%..
-+| 3168: 00 03 6d 61 78 03 25 18 00 01 05 65 6e 6f 72 79 ..max.%....enory
-+| 3184: 03 25 19 00 03 04 ce 79 73 4d 03 25 15 00 00 04 .%.....ysM.%....
-+| 3200: 6f 6d 69 74 03 25 1b 00 00 05 72 74 72 65 65 03 omit.%....rtree.
-+| 3216: 25 17 00 00 0a 74 68 72 65 61 64 73 61 66 65 03 %....threadsafe.
-+| 3232: 25 0e 00 00 04 76 74 61 62 03 25 0b 00 86 50 01 %....vtab.%...P.
-+| 3248: 08 08 08 08 08 17 8d 12 30 20 38 33 35 00 01 30 ........0 835..0
-+| 3264: 12 01 06 00 01 06 00 01 06 00 1f 03 00 01 03 09 ................
-+| 3280: 51 03 00 00 08 32 30 31 36 30 36 30 39 09 01 07 Q....20160609...
-+| 3296: 00 01 07 00 01 07 00 00 01 34 09 01 05 00 01 05 .........4......
-+| 3312: 00 01 05 00 00 01 35 09 01 04 00 01 04 00 01 04 ......5.........
-+| 3328: 00 01 07 30 30 30 30 30 30 30 09 1c 04 00 01 04 ...0000000......
-+| 3344: 00 01 04 00 00 06 62 69 6e 61 72 79 3c 03 01 02 ......binary<...
-+| 3360: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
-+| 3376: 00 03 01 02 02 00 02 f1 02 02 00 03 01 02 02 00 ................
-+| 3392: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 ................
-+| 3408: 01 02 02 00 03 01 02 02 00 00 08 63 6f 6d 70 69 ...........compi
-+| 3424: 6c 65 72 09 01 02 00 01 02 00 01 02 00 00 06 67 ler............g
-+| 3440: d2 73 74 61 74 09 07 03 00 01 03 00 01 03 00 01 .stat...........
-+| 3456: 04 65 62 75 67 09 04 02 00 01 02 00 01 02 00 00 .ebug...........
-+| 3472: 06 65 6e 6f 82 6c 65 3f 07 02 00 01 02 00 01 02 .eno.le?........
-+| 3488: b0 01 02 00 01 02 00 11 02 00 01 02 00 01 02 00 ................
-+| 3504: 01 02 00 01 02 00 01 02 00 01 a6 00 01 02 00 01 ................
-+| 3520: 02 05 51 02 00 01 02 00 01 02 00 01 02 00 01 02 ..Q.............
-+| 3536: 00 01 02 00 01 02 00 01 08 78 74 65 6e 73 69 6f .........xtensio
-+| 3552: 6e 09 1f 04 00 01 04 00 00 04 00 00 04 66 74 73 n............fts
-+| 3568: 34 09 0a 03 00 01 03 00 01 03 00 03 01 35 09 0d 4............5..
-+| 3584: 03 00 01 03 00 01 03 00 00 03 67 63 63 09 01 03 ..........gcc...
-+| 3600: 00 01 03 00 01 03 00 01 06 65 6f 70 73 6c 79 09 .........eopsly.
-+| 3616: 10 03 00 01 03 00 01 03 00 00 05 6a 73 6f 6e 31 ...........json1
-+| 3632: 09 13 03 00 01 03 00 01 03 00 00 04 6c 6f 61 64 ............load
-+| 3648: 09 1f 03 00 01 03 00 01 03 00 00 03 6d 61 78 09 ............max.
-+| 3664: 1c 02 00 01 02 00 01 02 00 01 05 65 6d 6f 72 79 ...........emory
-+| 3680: 09 1c 03 00 01 03 00 01 03 00 03 04 73 79 73 35 ............sys5
-+| 3696: 09 16 03 00 01 03 00 01 03 00 00 06 6e 6f 63 61 ............noca
-+| 3712: 73 65 3c 02 01 02 02 00 03 01 12 02 00 03 01 02 se<.............
-+| 3728: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
-+| 3744: 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 ................
-+| 3760: 03 01 02 02 00 03 01 02 02 00 03 01 02 02 00 00 ................
-+| 3776: 0e 9f 6d 69 74 09 1f 02 00 01 02 00 01 02 00 00 ..mit...........
-+| 3792: 05 72 74 72 65 65 09 19 03 00 01 03 00 01 03 00 .rtree..........
-+| 3808: 03 02 69 6d 3c 01 01 02 02 00 03 01 02 02 00 03 ..im<...........
-+| 3824: 01 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 ................
-+| 3840: 02 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 ................
-+| 3856: 02 00 03 01 02 02 00 03 01 02 02 00 03 01 02 02 ................
-+| 3872: 00 00 0a 74 68 72 65 61 64 73 61 66 65 09 22 02 ...threadsafe...
-+| 3888: 00 01 02 00 01 02 00 00 04 76 74 61 62 09 07 04 .........vtab...
-+| 3904: 00 01 04 00 01 04 00 00 01 78 b4 01 01 01 01 02 .........x......
-+| 3920: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
-+| 3936: 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 ................
-+| 3952: 01 01 02 00 01 01 01 07 30 01 01 01 02 00 01 01 ........0.......
-+| 3968: 01 02 00 11 01 01 02 00 01 01 01 02 00 11 01 01 ................
-+| 3984: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
-+| 4000: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
-+| 4016: 01 01 01 01 ff 01 01 01 02 00 01 01 01 02 00 01 ................
-+| 4032: 01 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 ................
-+| 4048: 01 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 ................
-+| 4064: 02 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 ................
-+| 4080: 00 01 01 01 02 00 01 01 01 02 00 01 01 01 02 00 ................
-+| page 6 offset 20480
-+| 0: 0a 00 00 00 02 0f f5 00 0f fb 0f f5 00 00 00 00 ................
-+| 4080: 00 00 00 00 00 05 04 08 09 01 02 04 04 08 08 09 ................
-+| page 7 offset 24576
-+| 0: 0d 00 00 00 05 0f b8 00 0e f4 0f e9 10 d6 0f c7 ................
-+| 4016: 00 00 00 00 00 00 00 00 0d 05 02 23 61 75 74 6f ...........#auto
-+| 4032: 6d 65 72 67 65 3d 35 0d 04 02 23 6d 65 72 67 65 merge=5...#merge
-+| 4048: 3d 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =1..............
-+| end crash-dde9e76ed8ab2d.db
-+}]} {}
-+
-+do_catchsql_test 25.1 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x%1 FROM c WHERE x<599237)
-+ INSERT INTO t1( a ) SELECT randomblob(3000) FROM t2 ;
-+} {0 {}}
-+
-+do_catchsql_test 25.2 {
-+ UPDATE t1 SET b=quote((true) ) WHERE t1 MATCH 'h*';
-+} {0 {}}
-+
-+do_catchsql_test 25.3 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x +x FROM c WHERE 72<x)
-+ INSERT INTO t1(a) SELECT randomblob(2829) FROM c;
-+} {0 {}}
-+
-+do_catchsql_test 25.4 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x%1 FROM c WHERE 599237<x)
-+ INSERT INTO t1(a) SELECT randomblob(3000) FROM t2 ;
-+} {0 {}}
-+
-+do_catchsql_test 25.5 {
-+ WITH RECURSIVE c(x) AS (VALUES(1) UNION ALL SELECT x%1 FROM c WHERE x<599237)
-+ INSERT INTO t1( a ) SELECT randomblob(3000) FROM t2 ;
-+} {0 {}}
-+
-+do_catchsql_test 25.6 {
-+ INSERT INTO t1(t1) SELECT x FROM t2;
-+ INSERT INTO t1(t1) SELECT x FROM t2;
-+} {1 {database disk image is malformed}}
-+
- finish_test
-
---- /test/with3.test
-+++ /test/with3.test
-@@ -130,4 +130,40 @@
- `--SEARCH TABLE w1 USING INTEGER PRIMARY KEY (rowid=?)
- }
-
-+do_execsql_test 4.0 {
-+ WITH t5(t5col1) AS (
-+ SELECT (
-+ WITH t3(t3col1) AS (
-+ WITH t2 AS (
-+ WITH t1 AS (SELECT 1 AS c1 GROUP BY 1)
-+ SELECT a.c1 FROM t1 AS a, t1 AS b
-+ WHERE anoncol1 = 1
-+ )
-+ SELECT (SELECT 1 FROM t2) FROM t2
-+ )
-+ SELECT t3col1 FROM t3 WHERE t3col1
-+ ) FROM (SELECT 1 AS anoncol1)
-+ )
-+ SELECT t5col1, t5col1 FROM t5
-+} {1 1}
-+do_execsql_test 4.1 {
-+ SELECT EXISTS (
-+ WITH RECURSIVE Table0 AS (
-+ WITH RECURSIVE Table0(Col0) AS (SELECT ALL 1 )
-+ SELECT ALL (
-+ WITH RECURSIVE Table0 AS (
-+ WITH RECURSIVE Table0 AS (
-+ WITH RECURSIVE Table0 AS (SELECT DISTINCT 1 GROUP BY 1 )
-+ SELECT DISTINCT * FROM Table0 NATURAL INNER JOIN Table0
-+ WHERE Col0 = 1
-+ )
-+ SELECT ALL (SELECT DISTINCT * FROM Table0) FROM Table0 WHERE Col0 = 1
-+ )
-+ SELECT ALL * FROM Table0 NATURAL INNER JOIN Table0
-+ ) FROM Table0 )
-+ SELECT DISTINCT * FROM Table0 NATURAL INNER JOIN Table0
-+ );
-+} {1}
-+
-+
- finish_test
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-tests.patch b/dev-db/sqlite/files/sqlite-3.28.0-full_archive-tests.patch
deleted file mode 100644
index aaa6c580f5f..00000000000
--- a/dev-db/sqlite/files/sqlite-3.28.0-full_archive-tests.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-https://sqlite.org/src/info/af53c41a127c314c
-
---- /test/like3.test
-+++ /test/like3.test
-@@ -182,6 +182,7 @@
- # Verify that the LIKE optimization works with an ESCAPE clause when
- # using PRAGMA case_sensitive_like=ON.
- #
-+ifcapable !icu {
- do_execsql_test like3-6.100 {
- DROP TABLE IF EXISTS t1;
- CREATE TABLE t1(path TEXT COLLATE nocase PRIMARY KEY,a,b,c) WITHOUT ROWID;
-@@ -229,5 +230,6 @@
- QUERY PLAN
- `--SEARCH TABLE t2 USING INDEX t2path2 (path>? AND path<?)
- }
-+}
-
- finish_test
diff --git a/dev-db/sqlite/files/sqlite-3.28.0-nonfull_archive-segmentation_fault_fixes.patch b/dev-db/sqlite/files/sqlite-3.28.0-nonfull_archive-segmentation_fault_fixes.patch
deleted file mode 100644
index 7278c12b377..00000000000
--- a/dev-db/sqlite/files/sqlite-3.28.0-nonfull_archive-segmentation_fault_fixes.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-https://sqlite.org/src/info/b2ce5ed175cb5029
-https://sqlite.org/src/info/6e4a5f22811bcd14
-https://sqlite.org/src/info/516ca8945150bdc1
-https://sqlite.org/src/info/e1724f1d618cfbcf
-https://sqlite.org/src/info/c621fc668c6538f9
-https://sqlite.org/src/info/c509d8a8aebe0da4
-https://sqlite.org/src/info/a9b90aa12eecdd9f
-
---- /sqlite3.c
-+++ /sqlite3.c
-@@ -67472,10 +67472,9 @@
- rc = newDatabase(pBt);
- pBt->nPage = get4byte(28 + pBt->pPage1->aData);
-
-- /* The database size was written into the offset 28 of the header
-- ** when the transaction started, so we know that the value at offset
-- ** 28 is nonzero. */
-- assert( pBt->nPage>0 );
-+ /* pBt->nPage might be zero if the database was corrupt when
-+ ** the transaction was started. Otherwise, it must be at least 1. */
-+ assert( CORRUPT_DB || pBt->nPage>0 );
- }
- sqlite3BtreeLeave(p);
- }
-@@ -70825,6 +70824,7 @@
- u16 maskPage = pOld->maskPage;
- u8 *piCell = aData + pOld->cellOffset;
- u8 *piEnd;
-+ VVA_ONLY( int nCellAtStart = b.nCell; )
-
- /* Verify that all sibling pages are of the same "type" (table-leaf,
- ** table-interior, index-leaf, or index-interior).
-@@ -70853,6 +70853,10 @@
- */
- memset(&b.szCell[b.nCell], 0, sizeof(b.szCell[0])*(limit+pOld->nOverflow));
- if( pOld->nOverflow>0 ){
-+ if( limit<pOld->aiOvfl[0] ){
-+ rc = SQLITE_CORRUPT_BKPT;
-+ goto balance_cleanup;
-+ }
- limit = pOld->aiOvfl[0];
- for(j=0; j<limit; j++){
- b.apCell[b.nCell] = aData + (maskPage & get2byteAligned(piCell));
-@@ -70872,6 +70876,7 @@
- piCell += 2;
- b.nCell++;
- }
-+ assert( (b.nCell-nCellAtStart)==(pOld->nCell+pOld->nOverflow) );
-
- cntOld[i] = b.nCell;
- if( i<nOld-1 && !leafData){
-@@ -83747,7 +83752,7 @@
- ** is clear. Otherwise, if this is an ephemeral cursor created by
- ** OP_OpenDup, the cursor will not be closed and will still be part
- ** of a BtShared.pCursor list. */
-- p->apCsr[iCur]->isEphemeral = 0;
-+ if( p->apCsr[iCur]->pBtx==0 ) p->apCsr[iCur]->isEphemeral = 0;
- sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
- p->apCsr[iCur] = 0;
- }
-@@ -87258,7 +87263,10 @@
- if( pCx ){
- /* If the ephermeral table is already open, erase all existing content
- ** so that the table is empty again, rather than creating a new table. */
-- rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
-+ assert( pCx->isEphemeral );
-+ if( pCx->pBtx ){
-+ rc = sqlite3BtreeClearTable(pCx->pBtx, pCx->pgnoRoot, 0);
-+ }
- }else{
- pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, CURTYPE_BTREE);
- if( pCx==0 ) goto no_mem;
-@@ -95979,7 +95987,9 @@
- #ifndef SQLITE_OMIT_WINDOWFUNC
- if( pExpr->y.pWin ){
- Select *pSel = pNC->pWinSelect;
-- sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
-+ if( IN_RENAME_OBJECT==0 ){
-+ sqlite3WindowUpdate(pParse, pSel->pWinDefn, pExpr->y.pWin, pDef);
-+ }
- sqlite3WalkExprList(pWalker, pExpr->y.pWin->pPartition);
- sqlite3WalkExprList(pWalker, pExpr->y.pWin->pOrderBy);
- sqlite3WalkExpr(pWalker, pExpr->y.pWin->pFilter);
-@@ -174132,7 +174142,7 @@
- }
- p->iOff += fts3GetVarint32(&p->aNode[p->iOff], &nSuffix);
-
-- if( nPrefix>p->iOff || nSuffix>p->nNode-p->iOff ){
-+ if( nPrefix>p->term.n || nSuffix>p->nNode-p->iOff || nSuffix==0 ){
- return FTS_CORRUPT_VTAB;
- }
- blobGrowBuffer(&p->term, nPrefix+nSuffix, &rc);
-@@ -174151,7 +174161,7 @@
- }
- }
-
-- assert( p->iOff<=p->nNode );
-+ assert_fts3_nc( p->iOff<=p->nNode );
- return rc;
- }
-
-@@ -204287,7 +204297,11 @@
- i64 iOff = *piOff;
- int iVal;
- fts5FastGetVarint32(a, i, iVal);
-- if( iVal==1 ){
-+ if( iVal<=1 ){
-+ if( iVal==0 ){
-+ *pi = i;
-+ return 0;
-+ }
- fts5FastGetVarint32(a, i, iVal);
- iOff = ((i64)iVal) << 32;
- fts5FastGetVarint32(a, i, iVal);
diff --git a/dev-db/sqlite/sqlite-3.28.0.ebuild b/dev-db/sqlite/sqlite-3.28.0.ebuild
deleted file mode 100644
index 505ffe1eb7d..00000000000
--- a/dev-db/sqlite/sqlite-3.28.0.ebuild
+++ /dev/null
@@ -1,330 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
-DOC_PV="${SRC_PV}"
-# DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
-
-DESCRIPTION="SQL database engine"
-HOMEPAGE="https://sqlite.org/"
-SRC_URI="doc? ( https://sqlite.org/2019/${PN}-doc-${DOC_PV}.zip )
- tcl? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
- test? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
- tools? ( https://sqlite.org/2019/${PN}-src-${SRC_PV}.zip )
- !tcl? ( !test? ( !tools? ( https://sqlite.org/2019/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
-
-LICENSE="public-domain"
-SLOT="3"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~riscv s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-RESTRICT="!test? ( test )"
-
-BDEPEND="doc? ( app-arch/unzip )
- tcl? (
- app-arch/unzip
- >=dev-lang/tcl-8.6:0
- )
- test? (
- app-arch/unzip
- >=dev-lang/tcl-8.6:0
- )
- tools? (
- app-arch/unzip
- >=dev-lang/tcl-8.6:0
- )"
-RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
-
-full_archive() {
- use tcl || use test || use tools
-}
-
-pkg_setup() {
- if full_archive; then
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
- else
- S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
- fi
-}
-
-src_prepare() {
- if full_archive; then
- eapply "${FILESDIR}/${PN}-3.28.0-full_archive-build.patch"
- eapply "${FILESDIR}/${PN}-3.28.0-full_archive-segmentation_fault_fixes.patch"
- eapply "${FILESDIR}/${PN}-3.28.0-full_archive-tests.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
- else
- eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
- eapply "${FILESDIR}/${PN}-3.28.0-nonfull_archive-segmentation_fault_fixes.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- sed \
- -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])/" \
- -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
- -i configure.ac || die "sed failed"
- fi
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" options=()
-
- options+=(
- --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
- --enable-threadsafe
- )
- if ! full_archive; then
- options+=(--disable-static-shell)
- fi
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support sqlite_dbpage virtual table.
- # https://sqlite.org/compile.html#enable_dbpage_vtab
- append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support sqlite3_serialize() and sqlite3_deserialize() functions.
- # https://sqlite.org/compile.html#enable_deserialize
- # https://sqlite.org/c3ref/serialize.html
- # https://sqlite.org/c3ref/deserialize.html
- append-cppflags -DSQLITE_ENABLE_DESERIALIZE
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support sqlite3_normalized_sql() function.
- # https://sqlite.org/c3ref/expanded_sql.html
- append-cppflags -DSQLITE_ENABLE_NORMALIZE
-
- # Support sqlite_offset() function.
- # https://sqlite.org/lang_corefunc.html#sqlite_offset
- append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
-
- # Support pre-update hook functions.
- # https://sqlite.org/c3ref/preupdate_count.html
- append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- # https://sqlite.org/geopoly.html
- append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support sqlite_stmt virtual table.
- # https://sqlite.org/stmt.html
- append-cppflags -DSQLITE_ENABLE_STMTVTAB
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
- # https://sqlite.org/compile.html#enable_update_delete_limit
- append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-
- # Support PRAGMA function_list, PRAGMA module_list and PRAGMA pragma_list statements.
- # https://sqlite.org/pragma.html#pragma_function_list
- # https://sqlite.org/pragma.html#pragma_module_list
- # https://sqlite.org/pragma.html#pragma_pragma_list
- append-cppflags -DSQLITE_INTROSPECTION_PRAGMAS
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # Support URI filenames.
- # https://sqlite.org/uri.html
- append-cppflags -DSQLITE_USE_URI
-
- # debug USE flag.
- if full_archive; then
- options+=($(use_enable debug))
- else
- if use debug; then
- append-cppflags -DSQLITE_DEBUG
- else
- append-cppflags -DNDEBUG
- fi
- fi
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- if full_archive; then
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- else
- sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if full_archive && use readline; then
- options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if full_archive; then
- options+=(--enable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- if [[ "${ABI}" == "x86" ]]; then
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
- append-cflags -mfpmath=sse
- else
- append-cflags -ffloat-store
- fi
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool dbtotxt sqlite3-db-to-txt
- install_tool index_usage sqlite3-index-usage
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showshm sqlite3-show-shm
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
- install_tool sqlite3_checker sqlite3-checker
- install_tool sqlite3_expert sqlite3-expert
- install_tool sqltclsh sqlite3-tclsh
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- find "${D}" -name "*.la" -delete || die
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt}
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2020-03-09 19:29 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2020-03-09 19:29 UTC (permalink / raw
To: gentoo-commits
commit: f97d093bbdf3d3b6057a3743c4f9f541e51fd435
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Mar 9 16:30:41 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Mar 9 19:26:42 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f97d093b
dev-db/sqlite: Security fixes.
Bug: https://bugs.gentoo.org/711526
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
...sqlite-3.31.1-full_archive-security_fixes.patch | 163 +++++++++++++++++++++
...ite-3.31.1-nonfull_archive-security_fixes.patch | 112 ++++++++++++++
dev-db/sqlite/sqlite-3.31.1.ebuild | 2 +
3 files changed, 277 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.31.1-full_archive-security_fixes.patch b/dev-db/sqlite/files/sqlite-3.31.1-full_archive-security_fixes.patch
new file mode 100644
index 00000000000..c0bb7144a67
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.31.1-full_archive-security_fixes.patch
@@ -0,0 +1,163 @@
+https://sqlite.org/cgi/src/info/9d0d4ab95dc0c56e
+https://sqlite.org/cgi/src/info/abc473fb8fb99900
+https://sqlite.org/cgi/src/info/5aeb5a2d295e10d5
+https://sqlite.org/cgi/src/info/a67cf5b7d37d5b14
+https://sqlite.org/cgi/src/info/14d14eb537075c6a
+https://sqlite.org/cgi/src/info/c431b3fd8fd0f6a6
+
+--- /src/expr.c
++++ /src/expr.c
+@@ -5463,19 +5463,25 @@
+ case TK_LT:
+ case TK_LE:
+ case TK_GT:
+- case TK_GE:
++ case TK_GE: {
++ Expr *pLeft = pExpr->pLeft;
++ Expr *pRight = pExpr->pRight;
+ testcase( pExpr->op==TK_EQ );
+ testcase( pExpr->op==TK_NE );
+ testcase( pExpr->op==TK_LT );
+ testcase( pExpr->op==TK_LE );
+ testcase( pExpr->op==TK_GT );
+ testcase( pExpr->op==TK_GE );
+- if( (pExpr->pLeft->op==TK_COLUMN && IsVirtual(pExpr->pLeft->y.pTab))
+- || (pExpr->pRight->op==TK_COLUMN && IsVirtual(pExpr->pRight->y.pTab))
++ /* The y.pTab=0 assignment in wherecode.c always happens after the
++ ** impliesNotNullRow() test */
++ if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0)
++ && IsVirtual(pLeft->y.pTab))
++ || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0)
++ && IsVirtual(pRight->y.pTab))
+ ){
+- return WRC_Prune;
++ return WRC_Prune;
+ }
+-
++ }
+ default:
+ return WRC_Continue;
+ }
+--- /src/resolve.c
++++ /src/resolve.c
+@@ -1051,7 +1051,7 @@
+ assert( !ExprHasProperty(pExpr, EP_Reduced) );
+ /* Handle special cases of "x IS TRUE", "x IS FALSE", "x IS NOT TRUE",
+ ** and "x IS NOT FALSE". */
+- if( pRight->op==TK_ID ){
++ if( pRight && pRight->op==TK_ID ){
+ int rc = resolveExprStep(pWalker, pRight);
+ if( rc==WRC_Abort ) return WRC_Abort;
+ if( pRight->op==TK_TRUEFALSE ){
+--- /src/select.c
++++ /src/select.c
+@@ -2806,6 +2806,7 @@
+ /* Generate code to take the intersection of the two temporary
+ ** tables.
+ */
++ if( rc ) break;
+ assert( p->pEList );
+ iBreak = sqlite3VdbeMakeLabel(pParse);
+ iCont = sqlite3VdbeMakeLabel(pParse);
+@@ -5148,7 +5149,7 @@
+ pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
+ sqlite3TokenInit(&sColname, zColname);
+ sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
+- if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
++ if( pNew && (p->selFlags & SF_NestedFrom)!=0 && !IN_RENAME_OBJECT ){
+ struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
+ sqlite3DbFree(db, pX->zEName);
+ if( pSub ){
+--- /src/sqliteInt.h
++++ /src/sqliteInt.h
+@@ -2153,8 +2153,11 @@
+ */
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ # define IsVirtual(X) ((X)->nModuleArg)
++# define ExprIsVtab(X) \
++ ((X)->op==TK_COLUMN && (X)->y.pTab!=0 && (X)->y.pTab->nModuleArg)
+ #else
+ # define IsVirtual(X) 0
++# define ExprIsVtab(X) 0
+ #endif
+
+ /*
+--- /src/whereexpr.c
++++ /src/whereexpr.c
+@@ -377,7 +377,8 @@
+ ** MATCH(expression,vtab_column)
+ */
+ pCol = pList->a[1].pExpr;
+- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
++ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
++ if( ExprIsVtab(pCol) ){
+ for(i=0; i<ArraySize(aOp); i++){
+ if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){
+ *peOp2 = aOp[i].eOp2;
+@@ -399,7 +400,8 @@
+ ** with function names in an arbitrary case.
+ */
+ pCol = pList->a[0].pExpr;
+- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
++ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
++ if( ExprIsVtab(pCol) ){
+ sqlite3_vtab *pVtab;
+ sqlite3_module *pMod;
+ void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**);
+@@ -422,10 +424,12 @@
+ int res = 0;
+ Expr *pLeft = pExpr->pLeft;
+ Expr *pRight = pExpr->pRight;
+- if( pLeft->op==TK_COLUMN && IsVirtual(pLeft->y.pTab) ){
++ testcase( pLeft->op==TK_COLUMN && pLeft->y.pTab==0 );
++ if( ExprIsVtab(pLeft) ){
+ res++;
+ }
+- if( pRight && pRight->op==TK_COLUMN && IsVirtual(pRight->y.pTab) ){
++ testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 );
++ if( pRight && ExprIsVtab(pRight) ){
+ res++;
+ SWAP(Expr*, pLeft, pRight);
+ }
+--- /test/altertab.test
++++ /test/altertab.test
+@@ -613,4 +613,21 @@
+ SELECT sql FROM sqlite_master;
+ } {{CREATE TABLE t0 (c1 INTEGER, PRIMARY KEY(c1))}}
+
++# 2020-02-23 ticket f50af3e8a565776b
++reset_db
++do_execsql_test 19.100 {
++ CREATE TABLE t1(x);
++ CREATE VIEW t2 AS SELECT 1 FROM t1, (t1 AS a0, t1);
++ ALTER TABLE t1 RENAME TO t3;
++ SELECT sql FROM sqlite_master;
++} {{CREATE TABLE "t3"(x)} {CREATE VIEW t2 AS SELECT 1 FROM "t3", ("t3" AS a0, "t3")}}
++do_execsql_test 19.110 {
++ INSERT INTO t3(x) VALUES(123);
++ SELECT * FROM t2;
++} {1}
++do_execsql_test 19.120 {
++ INSERT INTO t3(x) VALUES('xyz');
++ SELECT * FROM t2;
++} {1 1 1 1 1 1 1 1}
++
+ finish_test
+--- /test/windowfault.test
++++ /test/windowfault.test
+@@ -263,4 +263,15 @@
+ faultsim_test_result {0 {}}
+ }
+
++do_faultsim_test 11 -faults oom* -prep {
++} -body {
++ execsql {
++ VALUES(false),(current_date collate binary)
++ intersect
++ values(count() not like group_concat(cast(cast(0e00 as text) as integer) <= NULL || 0.4e-0 || 0x8 & true ) over () collate rtrim);
++ }
++} -test {
++ faultsim_test_result {0 {}}
++}
++
+ finish_test
diff --git a/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-security_fixes.patch b/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-security_fixes.patch
new file mode 100644
index 00000000000..3bbbbf7c8dd
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.31.1-nonfull_archive-security_fixes.patch
@@ -0,0 +1,112 @@
+https://sqlite.org/cgi/src/info/9d0d4ab95dc0c56e
+https://sqlite.org/cgi/src/info/abc473fb8fb99900
+https://sqlite.org/cgi/src/info/5aeb5a2d295e10d5
+https://sqlite.org/cgi/src/info/a67cf5b7d37d5b14
+https://sqlite.org/cgi/src/info/c431b3fd8fd0f6a6
+
+--- /sqlite3.c
++++ /sqlite3.c
+@@ -17428,8 +17428,11 @@
+ */
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ # define IsVirtual(X) ((X)->nModuleArg)
++# define ExprIsVtab(X) \
++ ((X)->op==TK_COLUMN && (X)->y.pTab!=0 && (X)->y.pTab->nModuleArg)
+ #else
+ # define IsVirtual(X) 0
++# define ExprIsVtab(X) 0
+ #endif
+
+ /*
+@@ -97816,7 +97819,7 @@
+ assert( !ExprHasProperty(pExpr, EP_Reduced) );
+ /* Handle special cases of "x IS TRUE", "x IS FALSE", "x IS NOT TRUE",
+ ** and "x IS NOT FALSE". */
+- if( pRight->op==TK_ID ){
++ if( pRight && pRight->op==TK_ID ){
+ int rc = resolveExprStep(pWalker, pRight);
+ if( rc==WRC_Abort ) return WRC_Abort;
+ if( pRight->op==TK_TRUEFALSE ){
+@@ -104133,19 +104136,25 @@
+ case TK_LT:
+ case TK_LE:
+ case TK_GT:
+- case TK_GE:
++ case TK_GE: {
++ Expr *pLeft = pExpr->pLeft;
++ Expr *pRight = pExpr->pRight;
+ testcase( pExpr->op==TK_EQ );
+ testcase( pExpr->op==TK_NE );
+ testcase( pExpr->op==TK_LT );
+ testcase( pExpr->op==TK_LE );
+ testcase( pExpr->op==TK_GT );
+ testcase( pExpr->op==TK_GE );
+- if( (pExpr->pLeft->op==TK_COLUMN && IsVirtual(pExpr->pLeft->y.pTab))
+- || (pExpr->pRight->op==TK_COLUMN && IsVirtual(pExpr->pRight->y.pTab))
++ /* The y.pTab=0 assignment in wherecode.c always happens after the
++ ** impliesNotNullRow() test */
++ if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0)
++ && IsVirtual(pLeft->y.pTab))
++ || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0)
++ && IsVirtual(pRight->y.pTab))
+ ){
+- return WRC_Prune;
++ return WRC_Prune;
+ }
+-
++ }
+ default:
+ return WRC_Continue;
+ }
+@@ -130673,6 +130682,7 @@
+ /* Generate code to take the intersection of the two temporary
+ ** tables.
+ */
++ if( rc ) break;
+ assert( p->pEList );
+ iBreak = sqlite3VdbeMakeLabel(pParse);
+ iCont = sqlite3VdbeMakeLabel(pParse);
+@@ -133015,7 +133025,7 @@
+ pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
+ sqlite3TokenInit(&sColname, zColname);
+ sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
+- if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
++ if( pNew && (p->selFlags & SF_NestedFrom)!=0 && !IN_RENAME_OBJECT ){
+ struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
+ sqlite3DbFree(db, pX->zEName);
+ if( pSub ){
+@@ -142593,7 +142603,8 @@
+ ** MATCH(expression,vtab_column)
+ */
+ pCol = pList->a[1].pExpr;
+- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
++ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
++ if( ExprIsVtab(pCol) ){
+ for(i=0; i<ArraySize(aOp); i++){
+ if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){
+ *peOp2 = aOp[i].eOp2;
+@@ -142615,7 +142626,8 @@
+ ** with function names in an arbitrary case.
+ */
+ pCol = pList->a[0].pExpr;
+- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
++ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
++ if( ExprIsVtab(pCol) ){
+ sqlite3_vtab *pVtab;
+ sqlite3_module *pMod;
+ void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**);
+@@ -142638,10 +142650,12 @@
+ int res = 0;
+ Expr *pLeft = pExpr->pLeft;
+ Expr *pRight = pExpr->pRight;
+- if( pLeft->op==TK_COLUMN && IsVirtual(pLeft->y.pTab) ){
++ testcase( pLeft->op==TK_COLUMN && pLeft->y.pTab==0 );
++ if( ExprIsVtab(pLeft) ){
+ res++;
+ }
+- if( pRight && pRight->op==TK_COLUMN && IsVirtual(pRight->y.pTab) ){
++ testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 );
++ if( pRight && ExprIsVtab(pRight) ){
+ res++;
+ SWAP(Expr*, pLeft, pRight);
+ }
diff --git a/dev-db/sqlite/sqlite-3.31.1.ebuild b/dev-db/sqlite/sqlite-3.31.1.ebuild
index 13c2752f2c9..56401e10744 100644
--- a/dev-db/sqlite/sqlite-3.31.1.ebuild
+++ b/dev-db/sqlite/sqlite-3.31.1.ebuild
@@ -126,6 +126,7 @@ src_prepare() {
if full_archive; then
eapply "${FILESDIR}/${PN}-3.31.0-full_archive-build.patch"
eapply "${FILESDIR}/${PN}-3.31.1-full_archive-architectures.patch"
+ eapply "${FILESDIR}/${PN}-3.31.1-full_archive-security_fixes.patch"
eapply_user
@@ -135,6 +136,7 @@ src_prepare() {
else
eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
eapply "${FILESDIR}/${PN}-3.31.1-nonfull_archive-architectures.patch"
+ eapply "${FILESDIR}/${PN}-3.31.1-nonfull_archive-security_fixes.patch"
eapply_user
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2020-07-04 13:53 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2020-07-04 13:53 UTC (permalink / raw
To: gentoo-commits
commit: 51cc692bb2bd55a85dd31fbcd972fe590879e429
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Jul 2 13:57:21 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jul 4 13:52:28 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=51cc692b
dev-db/sqlite: Security fixes.
Bug: https://bugs.gentoo.org/716748
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/sqlite-3.32.3-security_fixes.patch | 146 +++++++++++++++++++++
dev-db/sqlite/sqlite-3.32.3.ebuild | 1 +
2 files changed, 147 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch b/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch
new file mode 100644
index 00000000000..ad2a3bfe16d
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch
@@ -0,0 +1,146 @@
+https://sqlite.org/src/info/cc888878ea8d5bc7
+https://sqlite.org/src/info/be545f85a6ef09cc
+https://sqlite.org/src/info/6e0ffa2053124168
+https://sqlite.org/src/info/4d0cfb1236884349
+
+--- /ext/fts3/fts3.c
++++ /ext/fts3/fts3.c
+@@ -5208,10 +5208,12 @@
+ );
+ if( res ){
+ nNew = (int)(pOut - pPhrase->doclist.pList) - 1;
+- assert( pPhrase->doclist.pList[nNew]=='\0' );
+- assert( nNew<=pPhrase->doclist.nList && nNew>0 );
+- memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
+- pPhrase->doclist.nList = nNew;
++ if( nNew>=0 ){
++ assert( pPhrase->doclist.pList[nNew]=='\0' );
++ assert( nNew<=pPhrase->doclist.nList && nNew>0 );
++ memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
++ pPhrase->doclist.nList = nNew;
++ }
+ *paPoslist = pPhrase->doclist.pList;
+ *pnToken = pPhrase->nToken;
+ }
+--- /ext/fts3/fts3_write.c
++++ /ext/fts3/fts3_write.c
+@@ -341,7 +341,9 @@
+ ** created by merging the oldest :2 segments from absolute level :1. See
+ ** function sqlite3Fts3Incrmerge() for details. */
+ /* 29 */ "SELECT 2 * total(1 + leaves_end_block - start_block) "
+- " FROM %Q.'%q_segdir' WHERE level = ? AND idx < ?",
++ " FROM (SELECT * FROM %Q.'%q_segdir' "
++ " WHERE level = ? ORDER BY idx ASC LIMIT ?"
++ " )",
+
+ /* SQL_DELETE_SEGDIR_ENTRY
+ ** Delete the %_segdir entry on absolute level :1 with index :2. */
+@@ -2853,6 +2855,19 @@
+ return SQLITE_OK;
+ }
+
++static int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, int nReq){
++ if( nReq>pCsr->nBuffer ){
++ char *aNew;
++ pCsr->nBuffer = nReq*2;
++ aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
++ if( !aNew ){
++ return SQLITE_NOMEM;
++ }
++ pCsr->aBuffer = aNew;
++ }
++ return SQLITE_OK;
++}
++
+
+ int sqlite3Fts3SegReaderStep(
+ Fts3Table *p, /* Virtual table handle */
+@@ -2987,15 +3002,9 @@
+ }
+
+ nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
+- if( nDoclist+nByte>pCsr->nBuffer ){
+- char *aNew;
+- pCsr->nBuffer = (nDoclist+nByte)*2;
+- aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
+- if( !aNew ){
+- return SQLITE_NOMEM;
+- }
+- pCsr->aBuffer = aNew;
+- }
++
++ rc = fts3GrowSegReaderBuffer(pCsr, nByte+nDoclist);
++ if( rc ) return rc;
+
+ if( isFirst ){
+ char *a = &pCsr->aBuffer[nDoclist];
+@@ -3020,6 +3029,9 @@
+ fts3SegReaderSort(apSegment, nMerge, j, xCmp);
+ }
+ if( nDoclist>0 ){
++ rc = fts3GrowSegReaderBuffer(pCsr, nDoclist+FTS3_NODE_PADDING);
++ if( rc ) return rc;
++ memset(&pCsr->aBuffer[nDoclist], 0, FTS3_NODE_PADDING);
+ pCsr->aDoclist = pCsr->aBuffer;
+ pCsr->nDoclist = nDoclist;
+ rc = SQLITE_ROW;
+--- /src/expr.c
++++ /src/expr.c
+@@ -4272,7 +4272,9 @@
+ int nCol;
+ testcase( op==TK_EXISTS );
+ testcase( op==TK_SELECT );
+- if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
++ if( pParse->db->mallocFailed ){
++ return 0;
++ }else if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
+ sqlite3SubselectError(pParse, nCol, 1);
+ }else{
+ return sqlite3CodeSubselect(pParse, pExpr);
+--- /test/fts3corrupt4.test
++++ /test/fts3corrupt4.test
+@@ -6123,4 +6123,44 @@
+ SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'rtree ner "json1^enable"';
+ }
+
++#-------------------------------------------------------------------------
++do_execsql_test 42.1 {
++ CREATE VIRTUAL TABLE f USING fts3(a, b);
++}
++do_execsql_test 42.2 {
++ INSERT INTO f_segdir VALUES(0,2,1111,0,0,X'00');
++ INSERT INTO f_segdir VALUES(0,3,0 ,0,0,X'00013003010200');
++}
++do_execsql_test 42.3 {
++ INSERT INTO f(f) VALUES ('merge=107,2');
++}
++
++#-------------------------------------------------------------------------
++reset_db
++set saved $sqlite_fts3_enable_parentheses
++set sqlite_fts3_enable_parentheses 1
++do_execsql_test 43.1 {
++ CREATE VIRTUAL TABLE def USING fts3(xyz);
++ INSERT INTO def_segdir VALUES(0,0,0,0,0, X'0001310301c9000103323334050d81');
++} {}
++
++do_execsql_test 43.2 {
++ SELECT rowid FROM def WHERE def MATCH '1 NEAR 1'
++} {1}
++
++set sqlite_fts3_enable_parentheses $saved
++
++#-------------------------------------------------------------------------
++reset_db
++do_execsql_test 44.1 {
++ CREATE VIRTUAL TABLE t0 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
++ INSERT INTO t0_content VALUES(0,NULL,NULL,NULL,NULL);
++ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'00013103010200010332333405010201ba00000461616161050101020200000462626262050101030200');
++}
++
++do_execsql_test 44.2 {
++ SELECT matchinfo(t0, t0) IS NULL FROM t0 WHERE t0 MATCH '1*'
++} {0}
++
++
+ finish_test
diff --git a/dev-db/sqlite/sqlite-3.32.3.ebuild b/dev-db/sqlite/sqlite-3.32.3.ebuild
index 837ec066c9e..d23c7e7cd72 100644
--- a/dev-db/sqlite/sqlite-3.32.3.ebuild
+++ b/dev-db/sqlite/sqlite-3.32.3.ebuild
@@ -101,6 +101,7 @@ src_unpack() {
src_prepare() {
eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_1.patch"
eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_2.patch"
+ eapply "${FILESDIR}/${PN}-3.32.3-security_fixes.patch"
eapply_user
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2020-07-04 13:53 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2020-07-04 13:53 UTC (permalink / raw
To: gentoo-commits
commit: 1ace56886862557c51491ff03ab6a82fb5373786
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Jul 2 13:37:59 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Jul 4 13:52:27 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ace5688
dev-db/sqlite: Version bump (3.32.3).
Bug: https://bugs.gentoo.org/716748
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 3 +
.../files/sqlite-3.32.1-full_archive-build_1.patch | 670 +++++++++++++++++++++
.../files/sqlite-3.32.1-full_archive-build_2.patch | 640 ++++++++++++++++++++
dev-db/sqlite/sqlite-3.32.3.ebuild | 393 ++++++++++++
4 files changed, 1706 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index a5126e72a2e..1e33d9d9906 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,3 +1,6 @@
DIST sqlite-autoconf-3310100.tar.gz 2887243 BLAKE2B ef5d40b6e6c59a51ae95368eb9f6a938188813f89d5328ea1c1180ef35f124c14b3e83b0832ae5c2fa24cc2df352f1b0ea5f20b64d0762d50a700d9895f9a12e SHA512 d85250ba5f78f0c918880f663741709aba662192f04888b2324a0df17affdf5b8540e8428c6c7315119806e7adad758ea281c9b403c0ad94ac6a9bd1b93fd617
+DIST sqlite-autoconf-3320300.tar.gz 2904404 BLAKE2B 23c75256f31bd24ca14949afd144ac3280dcaaf25301ffcb8b9ecea6834fce9b1aee603ef616c2987674ae30afb59326c6f2010870b075f7d4c6566a2329f155 SHA512 add0ef47c059be0a75add7ab4fe52b2fbd4060cacbf1cbb93f1b4007cdeb8fc92256b1aadc224c4839e733fb868e56d9d73dd33c56a6f66180d1ff001d8d275e
DIST sqlite-doc-3310100.zip 9600405 BLAKE2B 324fb7a0a38bc56476e41504c14996e9d5d83ac659403991515413d49f5ee3aad064ccece25f52b6041ef26bf23f320a9be1b6b02c5fbe96c36372107f54fc2e SHA512 5572e2c2dac30c014ef9cd60a620b7a7bb610f91a47e2890c0641540d39b9d5ce0e914ee697583130317633918b7827e2612a7cbc024f5bd6aa22ad28a78b56b
+DIST sqlite-doc-3320300.zip 9772933 BLAKE2B efd72c18d0398c103e3f9c4cfeb03e7794fd69691b1bcea95b74a0c5d8af22aa13abc84ce8dc5864b5f4cb79be239433933b4daca34d1adfcc6f31ce2cde66bf SHA512 af9dca970b4c03c058d7d1cd55a3d11fa4b112dccac942b8660d82a7e9ba2956963fcb429eedfdc85915637c102e1f904ace98c8e0455c4120422bbd9f2f3cd0
DIST sqlite-src-3310100.zip 12510166 BLAKE2B a856695e8552b8b4dcb28452fdbd48305fdb9072f9d6587f4b1f4445daf386e920eb936dcb50fdfe41a49f84b26a7c5fedcffea5acf3ba3fa935c36695d4b8ee SHA512 af92a00877bcd90372d6f83a27fea12b4fe8d1155b223a6bccbccc31bb8e3d2269cd9e68f329bc55f70d1068ccbf220ff5abccea6f593fd7a3a4bdd732d1cdbe
+DIST sqlite-src-3320300.zip 12461750 BLAKE2B 59cce74d284191cfc69ac09b6014701ddd2b7b3d7ebaad5da4ad71cc200e70285b3b201ff174819aa8dde5f610589d7947f547450334f0f17149014078316185 SHA512 7e027c7163a760fb9b6dbfd2e4ccffb39d4972280583fb0d7f8390017101dfed3b12a36653b3130a548ae4d04c6abb11c0a1921b6f09c54c6ae1e72fbdcb2fd4
diff --git a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch b/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
new file mode 100644
index 00000000000..aec90e4c07a
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
@@ -0,0 +1,670 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+--- /ext/misc/carray.c
++++ /ext/misc/carray.c
+@@ -383,16 +383,8 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_carray_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3CarrayInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
+ #ifdef SQLITE_TEST
+@@ -404,3 +396,18 @@
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_carray_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CarrayInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/completion.c
++++ /ext/misc/completion.c
+@@ -483,12 +483,13 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ int sqlite3_completion_init(
+- sqlite3 *db,
+- char **pzErrMsg,
++ sqlite3 *db,
++ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+ int rc = SQLITE_OK;
+@@ -499,3 +500,4 @@
+ #endif
+ return rc;
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/csv.c
++++ /ext/misc/csv.c
+@@ -928,6 +928,22 @@
+ #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
+
+
++int sqlite3CsvInit(sqlite3 *db){
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ int rc;
++ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
++#ifdef SQLITE_TEST
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
++ }
++#endif
++ return rc;
++#else
++ return SQLITE_OK;
++#endif
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -941,17 +957,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+- int rc;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
+-#ifdef SQLITE_TEST
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
+- }
+-#endif
+- return rc;
+-#else
+- return SQLITE_OK;
+-#endif
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CsvInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/dbdata.c
++++ /ext/misc/dbdata.c
+@@ -803,7 +803,7 @@
+ /*
+ ** Invoke this routine to register the "sqlite_dbdata" virtual table module
+ */
+-static int sqlite3DbdataRegister(sqlite3 *db){
++int sqlite3DbdataRegister(sqlite3 *db){
+ static sqlite3_module dbdata_module = {
+ 0, /* iVersion */
+ 0, /* xCreate */
+@@ -838,6 +838,7 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -849,3 +850,4 @@
+ SQLITE_EXTENSION_INIT2(pApi);
+ return sqlite3DbdataRegister(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/eval.c
++++ /ext/misc/eval.c
+@@ -102,6 +102,20 @@
+ }
+
+
++int sqlite3EvalInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "eval", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "eval", 2,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -110,16 +124,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "eval", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "eval", 2,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3EvalInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/fileio.c
++++ /ext/misc/fileio.c
+@@ -340,7 +340,7 @@
+ ** This function does the work for the writefile() UDF. Refer to
+ ** header comments at the top of this file for details.
+ */
+-static int writeFile(
++static int writeFileContents(
+ sqlite3_context *pCtx, /* Context to return bytes written in */
+ const char *zFile, /* File to write */
+ sqlite3_value *pData, /* Data to write */
+@@ -480,10 +480,10 @@
+ mtime = sqlite3_value_int64(argv[3]);
+ }
+
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ if( res==1 && errno==ENOENT ){
+ if( makeDirectory(zFile)==SQLITE_OK ){
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ }
+ }
+
+@@ -970,18 +970,9 @@
+ # define fsdirRegister(x) SQLITE_OK
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_fileio_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3FileioInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "readfile", 1,
++ rc = sqlite3_create_function(db, "readfile", 1,
+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+ readfileFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+@@ -998,3 +989,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_fileio_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3FileioInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/ieee754.c
++++ /ext/misc/ieee754.c
+@@ -110,6 +110,20 @@
+ }
+
+
++int sqlite3IeeeInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "ieee754", 1,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ ieee754func, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "ieee754", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ ieee754func, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -118,16 +132,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "ieee754", 1,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- ieee754func, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "ieee754", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- ieee754func, 0, 0);
+- }
+- return rc;
++ return sqlite3IeeeInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/regexp.c
++++ /ext/misc/regexp.c
+@@ -740,10 +740,18 @@
+ }
+ }
+
++int sqlite3RegexpInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
++ 0, re_sql_func, 0, 0);
++ return rc;
++}
++
+ /*
+ ** Invoke this routine to register the regexp() function with the
+ ** SQLite database connection.
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -752,9 +760,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
+- 0, re_sql_func, 0, 0);
+- return rc;
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3RegexpInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sha1.c
++++ /ext/misc/sha1.c
+@@ -175,7 +175,7 @@
+ }
+
+ /* Compute a string using sqlite3_vsnprintf() and hash it */
+-static void hash_step_vformat(
++static void sha1_hash_step_vformat(
+ SHA1Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -306,7 +306,7 @@
+ nCol = sqlite3_column_count(pStmt);
+ z = sqlite3_sql(pStmt);
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha1_hash_step_vformat(&cx,"S%d:",n);
+ hash_step(&cx,(unsigned char*)z,n);
+
+ /* Compute a hash over the result of the query */
+@@ -349,14 +349,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha1_hash_step_vformat(&cx,"T%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha1_hash_step_vformat(&cx,"B%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+@@ -370,6 +370,20 @@
+ }
+
+
++int sqlite3ShaInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sha1", 1,
++ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
++ 0, sha1Func, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sha1_query", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sha1QueryFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -378,16 +392,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sha1", 1,
+- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+- 0, sha1Func, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sha1_query", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sha1QueryFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3ShaInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/shathree.c
++++ /ext/misc/shathree.c
+@@ -527,7 +527,7 @@
+ /* Compute a string using sqlite3_vsnprintf() with a maximum length
+ ** of 50 bytes and add it to the hash.
+ */
+-static void hash_step_vformat(
++static void sha3_hash_step_vformat(
+ SHA3Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -622,7 +622,7 @@
+ nCol = sqlite3_column_count(pStmt);
+ z = sqlite3_sql(pStmt);
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha3_hash_step_vformat(&cx,"S%d:",n);
+ SHA3Update(&cx,(unsigned char*)z,n);
+
+ /* Compute a hash over the result of the query */
+@@ -665,14 +665,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha3_hash_step_vformat(&cx,"T%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha3_hash_step_vformat(&cx,"B%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+@@ -685,17 +685,8 @@
+ }
+
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_shathree_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3ShathreeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "sha3", 1,
+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+ 0, sha3Func, 0, 0);
+@@ -716,3 +707,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_shathree_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3ShathreeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -101,6 +103,20 @@
+ }
+
+
++int sqlite3SqlarInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sqlar_compress", 1,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarCompressFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarUncompressFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -109,16 +125,10 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sqlar_compress", 1,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarCompressFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarUncompressFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3SqlarInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/totype.c
++++ /ext/misc/totype.c
+@@ -491,17 +491,8 @@
+ #pragma warning(default: 4748)
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_totype_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3TotypeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "tointeger", 1,
+ SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
+ tointegerFunc, 0, 0);
+@@ -512,3 +503,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_totype_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3TotypeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uint.c
++++ /ext/misc/uint.c
+@@ -78,6 +78,11 @@
+ return (nKey1 - i) - (nKey2 - j);
+ }
+
++int sqlite3UintInit(sqlite3 *db){
++ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -88,5 +93,6 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
++ return sqlite3UintInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uuid.c
++++ /ext/misc/uuid.c
+@@ -206,21 +206,12 @@
+ sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_uuid_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3UuidInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+ sqlite3UuidFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "uuid_str", 1,
++ rc = sqlite3_create_function(db, "uuid_str", 1,
+ SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+ 0, sqlite3UuidStrFunc, 0, 0);
+ }
+@@ -231,3 +222,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_uuid_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3UuidInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2137,7 +2139,7 @@
+ /*
+ ** Register the "zipfile" virtual table.
+ */
+-static int zipfileRegister(sqlite3 *db){
++int sqlite3ZipfileInit(sqlite3 *db){
+ static sqlite3_module zipfileModule = {
+ 1, /* iVersion */
+ zipfileConnect, /* xCreate */
+@@ -2171,9 +2173,10 @@
+ return rc;
+ }
+ #else /* SQLITE_OMIT_VIRTUALTABLE */
+-# define zipfileRegister(x) SQLITE_OK
++# define sqlite3ZipfileInit(x) SQLITE_OK
+ #endif
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -2184,5 +2187,8 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return zipfileRegister(db);
++ return sqlite3ZipfileInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
diff --git a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch b/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch
new file mode 100644
index 00000000000..f12c0b22a48
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch
@@ -0,0 +1,640 @@
+Enable some extensions in libsqlite3.so.
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Fix building with dlopen() not available.
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -313,6 +313,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -365,8 +368,24 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/appendvfs.c \
++ $(TOP)/ext/misc/carray.c \
++ $(TOP)/ext/misc/completion.c \
++ $(TOP)/ext/misc/csv.c \
++ $(TOP)/ext/misc/dbdata.c \
++ $(TOP)/ext/misc/eval.c \
++ $(TOP)/ext/misc/fileio.c \
++ $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/regexp.c \
++ $(TOP)/ext/misc/sha1.c \
++ $(TOP)/ext/misc/shathree.c \
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/totype.c \
++ $(TOP)/ext/misc/uint.c \
++ $(TOP)/ext/misc/uuid.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -437,33 +456,24 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+ $(TOP)/ext/misc/amatch.c \
+- $(TOP)/ext/misc/carray.c \
+ $(TOP)/ext/misc/closure.c \
+- $(TOP)/ext/misc/csv.c \
+- $(TOP)/ext/misc/eval.c \
+ $(TOP)/ext/misc/explain.c \
+- $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/fuzzer.c \
+ $(TOP)/ext/fts5/fts5_tcl.c \
+ $(TOP)/ext/fts5/fts5_test_mi.c \
+ $(TOP)/ext/fts5/fts5_test_tok.c \
+- $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/mmapwarm.c \
+ $(TOP)/ext/misc/nextchar.c \
+ $(TOP)/ext/misc/normalize.c \
+ $(TOP)/ext/misc/percentile.c \
+ $(TOP)/ext/misc/prefixes.c \
+- $(TOP)/ext/misc/regexp.c \
+ $(TOP)/ext/misc/remember.c \
+ $(TOP)/ext/misc/series.c \
+ $(TOP)/ext/misc/spellfix.c \
+- $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+ $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/userauth/userauth.c
+
+ # Source code to the library files needed by the test fixture
+@@ -645,25 +655,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -774,7 +784,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1074,15 +1084,6 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+- $(TOP)/ext/misc/shathree.c \
+- $(TOP)/ext/misc/fileio.c \
+- $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/misc/uint.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/misc/memtrace.c \
+ $(TOP)/src/test_windirent.c
+
+@@ -1251,11 +1252,11 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1286,24 +1287,23 @@
+ smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
+ ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1314,36 +1314,36 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
++ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1368,11 +1368,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -587,6 +587,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/main.c
++++ /src/main.c
+@@ -50,12 +50,31 @@
+ #ifdef SQLITE_ENABLE_FTS5
+ int sqlite3Fts5Init(sqlite3*);
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++int sqlite3DbdataRegister(sqlite3*);
++#endif
+ #ifdef SQLITE_ENABLE_JSON1
+ int sqlite3Json1Init(sqlite3*);
+ #endif
+ #ifdef SQLITE_ENABLE_STMTVTAB
+ int sqlite3StmtVtabInit(sqlite3*);
+ #endif
++int sqlite3CarrayInit(sqlite3*);
++int sqlite3CompletionVtabInit(sqlite3*);
++int sqlite3CsvInit(sqlite3*);
++int sqlite3EvalInit(sqlite3*);
++int sqlite3FileioInit(sqlite3*);
++int sqlite3IeeeInit(sqlite3*);
++int sqlite3RegexpInit(sqlite3*);
++int sqlite3ShaInit(sqlite3*);
++int sqlite3ShathreeInit(sqlite3*);
++int sqlite3TotypeInit(sqlite3*);
++int sqlite3UintInit(sqlite3*);
++int sqlite3UuidInit(sqlite3*);
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++int sqlite3ZipfileInit(sqlite3*);
++int sqlite3SqlarInit(sqlite3*);
++#endif
+
+ /*
+ ** An array of pointers to extension initializer functions for
+@@ -83,6 +102,9 @@
+ #ifdef SQLITE_ENABLE_DBPAGE_VTAB
+ sqlite3DbpageRegister,
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++ sqlite3DbdataRegister,
++#endif
+ #ifdef SQLITE_ENABLE_DBSTAT_VTAB
+ sqlite3DbstatRegister,
+ #endif
+@@ -96,6 +118,22 @@
+ #ifdef SQLITE_ENABLE_BYTECODE_VTAB
+ sqlite3VdbeBytecodeVtabInit,
+ #endif
++ sqlite3CarrayInit,
++ sqlite3CompletionVtabInit,
++ sqlite3CsvInit,
++ sqlite3EvalInit,
++ sqlite3FileioInit,
++ sqlite3IeeeInit,
++ sqlite3RegexpInit,
++ sqlite3ShaInit,
++ sqlite3ShathreeInit,
++ sqlite3TotypeInit,
++ sqlite3UintInit,
++ sqlite3UuidInit,
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++ sqlite3ZipfileInit,
++ sqlite3SqlarInit,
++#endif
+ };
+
+ #ifndef SQLITE_AMALGAMATION
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -69,6 +69,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -135,6 +136,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # if SQLITE_OS_WINRT
+@@ -1005,22 +1010,7 @@
+ INCLUDE test_windirent.c
+ #define dirent DIRENT
+ #endif
+-INCLUDE ../ext/misc/shathree.c
+-INCLUDE ../ext/misc/fileio.c
+-INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-INCLUDE ../ext/misc/uint.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+-
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-INCLUDE ../ext/misc/dbdata.c
+-#endif
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -4261,17 +4251,6 @@
+ #ifndef SQLITE_OMIT_LOAD_EXTENSION
+ sqlite3_enable_load_extension(p->db, 1);
+ #endif
+- sqlite3_fileio_init(p->db, 0, 0);
+- sqlite3_shathree_init(p->db, 0, 0);
+- sqlite3_completion_init(p->db, 0, 0);
+- sqlite3_uint_init(p->db, 0, 0);
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+- sqlite3_dbdata_init(p->db, 0, 0);
+-#endif
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_zipfile_init(p->db, 0, 0);
+- sqlite3_sqlar_init(p->db, 0, 0);
+-#endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+ shellAddSchemaName, 0, 0);
+ sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
+@@ -6281,8 +6260,6 @@
+ );
+ goto end_ar_command;
+ }
+- sqlite3_fileio_init(cmd.db, 0, 0);
+- sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+
+@@ -10621,6 +10598,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /src/test_config.c
++++ /src/test_config.c
+@@ -540,6 +540,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_REINDEX
+ Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -662,6 +664,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_UTF16
+ Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
+ #else
+--- /test/e_expr.test
++++ /test/e_expr.test
+@@ -1078,7 +1078,7 @@
+ #
+ # There is a regexp function if ICU is enabled though.
+ #
+-ifcapable !icu {
++ifcapable !icu&&!regexp {
+ do_catchsql_test e_expr-18.1.1 {
+ SELECT regexp('abc', 'def')
+ } {1 {no such function: regexp}}
+--- /test/icu.test
++++ /test/icu.test
+@@ -41,7 +41,7 @@
+ #
+ test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
+ test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
+- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
++ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
+ test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
+ test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
+
+--- /test/pragma.test
++++ /test/pragma.test
+@@ -1360,17 +1360,32 @@
+ } ;# ifcapable trigger
+
+ ifcapable schema_pragmas {
+- do_test pragma-11.1 {
+- execsql2 {
+- pragma collation_list;
+- }
+- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
+- do_test pragma-11.2 {
+- db collate New_Collation blah...
+- execsql {
+- pragma collation_list;
+- }
+- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ ifcapable uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
++ }
++ ifcapable !uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ }
+ }
+
+ ifcapable schema_pragmas&&tempdb {
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -700,42 +700,6 @@
+ #include <assert.h>
+ #include "zlib.h"
+
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+- sqlite3_context *context,
+- int argc,
+- sqlite3_value **argv
+-){
+- uLong nData;
+- uLongf sz;
+-
+- assert( argc==2 );
+- sz = sqlite3_value_int(argv[1]);
+-
+- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+- sqlite3_result_value(context, argv[0]);
+- }else{
+- const Bytef *pData= sqlite3_value_blob(argv[0]);
+- Bytef *pOut = sqlite3_malloc(sz);
+- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+- sqlite3_result_error(context, "error in uncompress()", -1);
+- }else{
+- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+- }
+- sqlite3_free(pOut);
+- }
+-}
+-
+-
+ /* Run a chunk of SQL. If any errors happen, print an error message
+ ** and exit.
+ */
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -117,6 +117,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -404,6 +405,23 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ appendvfs.c
++ carray.c
++ completion.c
++ csv.c
++ dbdata.c
++ eval.c
++ fileio.c
++ ieee754.c
++ regexp.c
++ sha1.c
++ shathree.c
++ sqlar.c
++ sqlite3expert.c
++ totype.c
++ uint.c
++ uuid.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,21 +27,13 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
+- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+-#endif
+
+ return
+ BEGIN_STRING
diff --git a/dev-db/sqlite/sqlite-3.32.3.ebuild b/dev-db/sqlite/sqlite-3.32.3.ebuild
new file mode 100644
index 00000000000..42d31da076a
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.32.3.ebuild
@@ -0,0 +1,393 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+if [[ "${PV}" != "9999" ]]; then
+ SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+ DOC_PV="${SRC_PV}"
+ # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+fi
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )
+ tcl? ( https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip )
+ test? ( https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip )
+ tools? ( https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip )
+ !tcl? ( !test? ( !tools? ( https://sqlite.org/2020/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )"
+fi
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+if [[ "${PV}" == "9999" ]]; then
+ PROPERTIES="live"
+fi
+RESTRICT="!test? ( test )"
+
+if [[ "${PV}" == "9999" ]]; then
+ BDEPEND=">=dev-lang/tcl-8.6:0
+ dev-vcs/fossil"
+else
+ BDEPEND="doc? ( app-arch/unzip )
+ tcl? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ test? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )
+ tools? (
+ app-arch/unzip
+ >=dev-lang/tcl-8.6:0
+ )"
+fi
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+full_archive() {
+ [[ "${PV}" == "9999" ]] || use tcl || use test || use tools
+}
+
+pkg_setup() {
+ if [[ "${PV}" == "9999" ]]; then
+ S="${WORKDIR}/${PN}"
+ else
+ if full_archive; then
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+ else
+ S="${WORKDIR}/${PN}-autoconf-${SRC_PV}"
+ fi
+ fi
+}
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ addwrite "${distdir}"
+ mkdir -p "${distdir}/fossil-src/${PN}" || die
+
+ mkdir "${WORKDIR}/${PN}" || die
+ pushd "${WORKDIR}/${PN}" > /dev/null || die
+ if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
+ einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
+ fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
+ einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
+ fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
+ echo
+ fi
+ cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
+ einfo fossil open --quiet sqlite.fossil
+ fossil open --quiet sqlite.fossil || die
+ echo
+ popd > /dev/null || die
+
+ if use doc; then
+ mkdir "${WORKDIR}/${PN}-doc" || die
+ pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
+ if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
+ einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
+ fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
+ einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
+ fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
+ echo
+ fi
+ cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
+ einfo fossil open --quiet sqlite-doc.fossil
+ fossil open --quiet sqlite-doc.fossil || die
+ echo
+ popd > /dev/null || die
+ fi
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ if full_archive; then
+ eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_1.patch"
+ eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_2.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+ else
+ eapply "${FILESDIR}/${PN}-3.25.0-nonfull_archive-build.patch"
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ sed \
+ -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])/" \
+ -e "/AC_CHECK_FUNCS(posix_fallocate)/d" \
+ -i configure.ac || die "sed failed"
+ fi
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
+ local options=()
+
+ options+=(
+ --enable-$(full_archive && echo load-extension || echo dynamic-extensions)
+ --enable-threadsafe
+ )
+ if ! full_archive; then
+ options+=(--disable-static-shell)
+ fi
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support bytecode and tables_used virtual tables.
+ # https://sqlite.org/bytecodevtab.html
+ append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/dbpage.html
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
+ # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ if full_archive; then
+ options+=($(use_enable debug))
+ else
+ if use debug; then
+ append-cppflags -DSQLITE_DEBUG
+ else
+ append-cppflags -DNDEBUG
+ fi
+ fi
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ if full_archive; then
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ else
+ sed -e "s/^LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if full_archive && use readline; then
+ options+=(--with-readline-inc="-I${EPREFIX}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ if full_archive; then
+ options+=(--enable-tcl)
+ fi
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${D}" -name "*.la" -type f -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2020-07-29 18:46 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2020-07-29 18:46 UTC (permalink / raw
To: gentoo-commits
commit: dd5e959e06f605b7caa81d8f44ae7b83f98440fb
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Jul 27 00:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Wed Jul 29 18:46:04 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd5e959e
dev-db/sqlite: Security fixes and other fixes (3.32.3-r1).
Bug: https://bugs.gentoo.org/732604
Closes: https://bugs.gentoo.org/685874
Closes: https://bugs.gentoo.org/733092
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../sqlite/files/sqlite-3.32.3-backports_1.patch | 361 +++++++++++++++++++++
.../sqlite/files/sqlite-3.32.3-backports_2.patch | 302 +++++++++++++++++
.../sqlite/files/sqlite-3.32.3-backports_3.patch | 220 +++++++++++++
dev-db/sqlite/sqlite-3.32.3-r1.ebuild | 339 +++++++++++++++++++
4 files changed, 1222 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-backports_1.patch b/dev-db/sqlite/files/sqlite-3.32.3-backports_1.patch
new file mode 100644
index 00000000000..256d18ee76f
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.32.3-backports_1.patch
@@ -0,0 +1,361 @@
+https://sqlite.org/src/info/d48af4d2cfff3d5f
+https://sqlite.org/src/info/cc888878ea8d5bc7
+https://sqlite.org/src/info/be545f85a6ef09cc
+https://sqlite.org/src/info/6e0ffa2053124168
+https://sqlite.org/src/info/4d0cfb1236884349
+https://sqlite.org/src/info/ccff8cb8267d4c56
+https://sqlite.org/src/info/5124732370fd53c9
+
+--- /ext/fts3/fts3.c
++++ /ext/fts3/fts3.c
+@@ -2068,7 +2068,7 @@
+ sqlite3_int64 *piPrev, /* IN/OUT: Previous value written to list */
+ sqlite3_int64 iVal /* Write this value to the list */
+ ){
+- assert( iVal-*piPrev > 0 || (*piPrev==0 && iVal==0) );
++ assert_fts3_nc( iVal-*piPrev > 0 || (*piPrev==0 && iVal==0) );
+ *pp += sqlite3Fts3PutVarint(*pp, iVal-*piPrev);
+ *piPrev = iVal;
+ }
+@@ -5208,10 +5208,12 @@
+ );
+ if( res ){
+ nNew = (int)(pOut - pPhrase->doclist.pList) - 1;
+- assert( pPhrase->doclist.pList[nNew]=='\0' );
+- assert( nNew<=pPhrase->doclist.nList && nNew>0 );
+- memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
+- pPhrase->doclist.nList = nNew;
++ if( nNew>=0 ){
++ assert( pPhrase->doclist.pList[nNew]=='\0' );
++ assert( nNew<=pPhrase->doclist.nList && nNew>0 );
++ memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
++ pPhrase->doclist.nList = nNew;
++ }
+ *paPoslist = pPhrase->doclist.pList;
+ *pnToken = pPhrase->nToken;
+ }
+@@ -5563,7 +5565,10 @@
+ }else
+ #endif
+ {
+- bHit = (pExpr->bEof==0 && pExpr->iDocid==pCsr->iPrevId);
++ bHit = (
++ pExpr->bEof==0 && pExpr->iDocid==pCsr->iPrevId
++ && pExpr->pPhrase->doclist.nList>0
++ );
+ }
+ break;
+ }
+--- /ext/fts3/fts3_write.c
++++ /ext/fts3/fts3_write.c
+@@ -341,7 +341,9 @@
+ ** created by merging the oldest :2 segments from absolute level :1. See
+ ** function sqlite3Fts3Incrmerge() for details. */
+ /* 29 */ "SELECT 2 * total(1 + leaves_end_block - start_block) "
+- " FROM %Q.'%q_segdir' WHERE level = ? AND idx < ?",
++ " FROM (SELECT * FROM %Q.'%q_segdir' "
++ " WHERE level = ? ORDER BY idx ASC LIMIT ?"
++ " )",
+
+ /* SQL_DELETE_SEGDIR_ENTRY
+ ** Delete the %_segdir entry on absolute level :1 with index :2. */
+@@ -2853,6 +2855,19 @@
+ return SQLITE_OK;
+ }
+
++static int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, int nReq){
++ if( nReq>pCsr->nBuffer ){
++ char *aNew;
++ pCsr->nBuffer = nReq*2;
++ aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
++ if( !aNew ){
++ return SQLITE_NOMEM;
++ }
++ pCsr->aBuffer = aNew;
++ }
++ return SQLITE_OK;
++}
++
+
+ int sqlite3Fts3SegReaderStep(
+ Fts3Table *p, /* Virtual table handle */
+@@ -2987,15 +3002,9 @@
+ }
+
+ nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
+- if( nDoclist+nByte>pCsr->nBuffer ){
+- char *aNew;
+- pCsr->nBuffer = (nDoclist+nByte)*2;
+- aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
+- if( !aNew ){
+- return SQLITE_NOMEM;
+- }
+- pCsr->aBuffer = aNew;
+- }
++
++ rc = fts3GrowSegReaderBuffer(pCsr, nByte+nDoclist);
++ if( rc ) return rc;
+
+ if( isFirst ){
+ char *a = &pCsr->aBuffer[nDoclist];
+@@ -3020,6 +3029,9 @@
+ fts3SegReaderSort(apSegment, nMerge, j, xCmp);
+ }
+ if( nDoclist>0 ){
++ rc = fts3GrowSegReaderBuffer(pCsr, nDoclist+FTS3_NODE_PADDING);
++ if( rc ) return rc;
++ memset(&pCsr->aBuffer[nDoclist], 0, FTS3_NODE_PADDING);
+ pCsr->aDoclist = pCsr->aBuffer;
+ pCsr->nDoclist = nDoclist;
+ rc = SQLITE_ROW;
+@@ -4288,7 +4300,7 @@
+ int i;
+ int nHeight = (int)aRoot[0];
+ NodeWriter *pNode;
+- if( nHeight<1 || nHeight>FTS_MAX_APPENDABLE_HEIGHT ){
++ if( nHeight<1 || nHeight>=FTS_MAX_APPENDABLE_HEIGHT ){
+ sqlite3_reset(pSelect);
+ return FTS_CORRUPT_VTAB;
+ }
+--- /src/expr.c
++++ /src/expr.c
+@@ -4272,7 +4272,9 @@
+ int nCol;
+ testcase( op==TK_EXISTS );
+ testcase( op==TK_SELECT );
+- if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
++ if( pParse->db->mallocFailed ){
++ return 0;
++ }else if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
+ sqlite3SubselectError(pParse, nCol, 1);
+ }else{
+ return sqlite3CodeSubselect(pParse, pExpr);
+--- /test/fts3corrupt4.test
++++ /test/fts3corrupt4.test
+@@ -6123,4 +6123,163 @@
+ SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'rtree ner "json1^enable"';
+ }
+
++#-------------------------------------------------------------------------
++do_execsql_test 42.1 {
++ CREATE VIRTUAL TABLE f USING fts3(a, b);
++}
++do_execsql_test 42.2 {
++ INSERT INTO f_segdir VALUES(0,2,1111,0,0,X'00');
++ INSERT INTO f_segdir VALUES(0,3,0 ,0,0,X'00013003010200');
++}
++do_execsql_test 42.3 {
++ INSERT INTO f(f) VALUES ('merge=107,2');
++}
++
++#-------------------------------------------------------------------------
++reset_db
++set saved $sqlite_fts3_enable_parentheses
++set sqlite_fts3_enable_parentheses 1
++do_execsql_test 43.1 {
++ CREATE VIRTUAL TABLE def USING fts3(xyz);
++ INSERT INTO def_segdir VALUES(0,0,0,0,0, X'0001310301c9000103323334050d81');
++} {}
++
++do_execsql_test 43.2 {
++ SELECT rowid FROM def WHERE def MATCH '1 NEAR 1'
++} {1}
++
++set sqlite_fts3_enable_parentheses $saved
++
++#-------------------------------------------------------------------------
++reset_db
++do_execsql_test 44.1 {
++ CREATE VIRTUAL TABLE t0 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
++ INSERT INTO t0_content VALUES(0,NULL,NULL,NULL,NULL);
++ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'00013103010200010332333405010201ba00000461616161050101020200000462626262050101030200');
++}
++
++do_execsql_test 44.2 {
++ SELECT matchinfo(t0, t0) IS NULL FROM t0 WHERE t0 MATCH '1*'
++} {0}
++
++#-------------------------------------------------------------------------
++#
++reset_db
++do_test 45.0 {
++ sqlite3 db {}
++ db deserialize [decode_hexdb {
++.open --hexdb
++| size 24576 pagesize 4096 filename crash-65c98512cc9e49.db
++| page 1 offset 0
++| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
++| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 06 .....@ ........
++| 96: 00 00 00 00 0d 0e fc 00 06 0d bc 00 0f ca 0f 6c ...............l
++| 112: 0f 04 0e 13 0e c9 0d bc 00 00 00 00 00 00 00 00 ................
++| 3504: 00 00 00 00 00 00 00 00 00 00 00 00 55 06 07 17 ............U...
++| 3520: 1b 1b 01 81 01 74 61 62 6c 65 78 31 5f 73 74 61 .....tablex1_sta
++| 3536: 74 78 31 5f 73 74 61 74 06 43 52 45 41 54 45 20 tx1_stat.CREATE
++| 3552: 54 41 42 4c 45 20 27 78 31 5f 73 74 61 74 27 28 TABLE 'x1_stat'(
++| 3568: 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 id INTEGER PRIMA
++| 3584: 52 59 20 4b 45 59 2c 20 76 61 6c 75 65 20 42 4c RY KEY, value BL
++| 3600: 41 82 29 81 33 04 07 17 1f 1f 01 82 35 74 61 62 A.).3.......5tab
++| 3616: 6c 65 78 31 5f 73 65 67 64 69 72 78 31 5f 73 65 lex1_segdirx1_se
++| 3632: 67 64 69 72 04 43 52 45 41 54 45 20 54 41 42 4c gdir.CREATE TABL
++| 3648: 45 20 27 78 31 5f 73 65 67 64 69 72 27 28 6c 65 E 'x1_segdir'(le
++| 3664: 76 65 6c 20 49 4e 54 45 47 45 52 2c 69 64 78 20 vel INTEGER,idx
++| 3680: 49 4e 54 45 47 45 52 2c 73 74 61 72 74 5f 62 6c INTEGER,start_bl
++| 3696: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 6c 65 61 76 ock INTEGER,leav
++| 3712: 65 73 5f 65 6e 64 5f 62 6c 6f 63 6b 20 49 4e 54 es_end_block INT
++| 3728: 45 47 45 52 2c 65 6e 64 5f 62 6c 6f 63 6b 20 49 EGER,end_block I
++| 3744: 4e 54 45 47 45 52 2c 72 6f 6f 74 20 42 4c 4f 42 NTEGER,root BLOB
++| 3760: 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 6c 65 76 ,PRIMARY KEY(lev
++| 3776: 65 6c 2c 20 69 64 78 29 29 31 05 06 17 45 1f 01 el, idx))1...E..
++| 3792: 00 69 6e 64 65 78 73 71 6c 69 74 65 5f 61 75 74 .indexsqlite_aut
++| 3808: 6f 69 6e 64 65 78 5f 78 31 5f 73 65 67 64 69 72 oindex_x1_segdir
++| 3824: 5f 31 78 31 5f 73 65 67 64 69 72 05 00 00 00 08 _1x1_segdir.....
++| 3840: 60 00 00 00 66 03 07 17 23 23 01 81 13 74 61 62 `...f...##...tab
++| 3856: 6c 65 78 31 5f 73 65 67 6d 65 6e 74 73 78 31 5f lex1_segmentsx1_
++| 3872: 73 65 67 6d 65 6e 74 73 03 43 52 45 41 54 45 20 segments.CREATE
++| 3888: 54 41 42 4c 45 20 27 78 31 5f 73 65 67 6d 65 6e TABLE 'x1_segmen
++| 3904: 74 73 27 28 62 6c 6f 63 6b 69 64 20 49 4e 54 45 ts'(blockid INTE
++| 3920: 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c GER PRIMARY KEY,
++| 3936: 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 5c 02 07 17 block BLOB)....
++| 3952: 21 21 01 81 03 74 61 62 6c 65 78 31 5f 63 6f 6e !!...tablex1_con
++| 3968: 74 65 6e 74 78 31 5f 63 6f 6e 74 65 6e 74 02 43 tentx1_content.C
++| 3984: 52 45 41 54 45 20 54 41 42 4c 45 20 27 78 31 5f REATE TABLE 'x1_
++| 4000: 63 6f 6e 74 65 6e 74 27 28 64 6f 63 69 64 20 49 content'(docid I
++| 4016: 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b NTEGER PRIMARY K
++| 4032: 45 59 2c 20 27 63 30 78 27 29 34 01 06 17 11 11 EY, 'c0x')4.....
++| 4048: 08 57 74 61 62 6c 65 78 31 78 31 43 52 45 41 54 .Wtablex1x1CREAT
++| 4064: 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 E VIRTUAL TABLE
++| 4080: 78 31 20 55 53 49 4e 47 20 66 74 73 33 28 78 29 x1 USING fts3(x)
++| page 2 offset 4096
++| 0: 0d 00 00 00 11 0f 77 f0 0f f8 0f f0 0f e8 0f e0 ......w.........
++| 16: 0f d8 0f d0 0f c8 0f c0 00 00 00 00 00 00 00 00 ................
++| 3952: 00 00 00 00 00 00 00 00 06 11 03 00 13 77 78 79 .............wxy
++| 3968: 06 10 03 00 13 74 75 76 06 0f 03 00 13 71 33 73 .....tuv.....q3s
++| 3984: 06 0e 03 00 13 6e 6f 70 06 0d 03 00 13 6b 6c 6d .....nop.....klm
++| 4000: 06 0c 03 04 c3 68 69 6a 06 0b 03 00 13 65 66 67 .....hij.....efg
++| 4016: 06 0a 03 00 13 62 63 64 06 09 03 00 13 79 7a 61 .....bcd.....yza
++| 4032: 06 08 03 00 13 76 77 78 06 07 03 00 13 73 74 75 .....vwx.....stu
++| 4048: 06 06 03 00 13 70 71 72 06 05 03 00 13 6d 6e 6f .....pqr.....mno
++| 4064: 06 03 03 00 13 6a 6b 6c 06 03 03 00 13 67 68 69 .....jkl.....ghi
++| 4080: 06 02 02 00 03 64 65 66 06 01 03 00 13 61 52 63 .....def.....aRc
++| page 3 offset 8192
++| 0: 0d 00 00 00 03 0f a7 00 0f b5 0f a7 0f fa 01 00 ................
++| 4000: 00 00 00 00 00 00 00 0c 02 03 00 1e 00 03 6b 6c ..............kl
++| 4016: 6d 03 0d 02 00 43 01 04 00 81 0a 00 03 61 62 63 m....C.......abc
++| 4032: 03 0b 32 00 00 03 62 63 64 03 0a 02 00 00 03 64 ..2...bcd......d
++| 4048: 69 26 03 02 02 00 00 03 65 66 67 03 0b 02 00 00 i&......efg.....
++| 4064: 03 67 68 69 03 03 02 00 00 03 68 69 6a 03 0c 02 .ghi......hij...
++| 4080: 00 00 03 6a 6a 2c 03 04 02 00 03 81 00 03 00 00 ...jj,..........
++| page 4 offset 12288
++| 0: 0d 0f 3a 00 05 0f 25 00 0f 9e 0f 88 0f 43 0f 25 ..:...%......C.%
++| 16: 0f 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .r..............
++| 3856: 00 00 00 00 00 00 00 00 00 56 01 08 08 13 1e 03 .........V......
++| 3872: 30 20 39 00 03 13 05 07 08 08 18 08 13 1e 30 20 0 9...........0
++| 3888: 39 00 03 77 78 79 03 11 02 00 0f 6c 00 09 01 08 9..wxy.....l....
++| 3904: 08 15 54 27 04 07 09 01 08 08 15 42 02 30 20 33 ..T'.......B.0 3
++| 3920: 36 00 03 6e 6f 70 03 0e 02 00 00 03 71 72 73 03 6..nop......qrs.
++| 3936: 0f 02 00 00 03 74 75 76 03 10 02 00 0f cf b1 06 .....tuv........
++| 3952: 01 08 14 06 07 01 08 09 01 1b 14 02 02 31 32 38 .............128
++| 3968: 20 2d 37 32 10 01 01 6b 14 03 07 09 09 08 08 15 -72...k........
++| 3984: 1e 30 20 33 36 00 03 79 7a 61 03 09 02 00 2f 02 .0 36..yza..../.
++| 4000: 07 09 08 08 08 15 54 30 20 33 36 00 03 6d 6e 6f ......T0 36..mno
++| 4016: 03 05 02 00 00 03 70 71 72 03 06 02 00 00 03 73 ......pqr......s
++| 4032: 74 75 03 07 02 00 00 03 76 77 78 03 08 02 00 00 tu......vwx.....
++| 4048: 00 00 4a 08 08 08 15 54 30 20 33 36 00 03 61 62 ..J....T0 36..ab
++| 4064: 63 03 01 02 00 00 03 64 65 66 03 02 02 00 00 03 c......def......
++| 4080: 67 68 69 03 03 67 00 00 03 6a 6b 6c 03 04 02 00 ghi..g...jkl....
++| page 5 offset 16384
++| 0: 0a 0f e7 00 05 0f da 00 0f e1 0f fa 0f f4 0f ed ................
++| 16: 0f da 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
++| 4048: 00 00 00 00 00 00 00 1a 01 03 06 04 01 08 01 02 ................
++| 4064: 06 05 04 08 08 01 05 00 00 00 06 01 03 06 04 09 ................
++| 4080: 02 01 02 04 05 04 09 09 01 03 05 04 09 08 01 02 ................
++| page 6 offset 20480
++| 0: 0d 00 10 00 01 0f f9 00 0f f9 00 00 00 00 00 00 ................
++| 4080: 00 00 00 00 00 00 00 00 00 05 01 03 00 10 01 03 ................
++| end crash-65c98512cc9e49.db
++}]} {}
++
++do_catchsql_test 45.2 {
++ INSERT INTO x1(x1) VALUES( 'merge=1' )
++} {1 {database disk image is malformed}}
++
++#-------------------------------------------------------------------------
++reset_db
++set saved $sqlite_fts3_enable_parentheses
++set sqlite_fts3_enable_parentheses 1
++do_execsql_test 46.1 {
++ CREATE VIRTUAL TABLE t0 USING fts3(a INTEGER PRIMARY KEY,b,c,d);
++ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'0001310301c9000103323334050d8000f200000461616161050101020200000462626262050101030200');
++} {}
++
++do_catchsql_test 46.2 {
++ SELECT * FROM t0
++ WHERE t0 MATCH x'2b0a312b0a312a312a2a0b5d0a0b0b0a312a0a0b0b0a312a0b310a392a0b0a27312a2a0b5d0a312a0b310a31315d0b310a312a316d2a0b313b15bceaa50a312a0b0a27312a2a0b5d0a312a0b310a312b0b2a310a312a0b2a0b2a0b2e5d0a0bff313336e34a2a312a0b0a3c310b0a0b4b4b0b4b2a4bec40322b2a0b310a0a312a0a0a0a0a0a0a0a0a0b310a312a2a2a0b5d0a0b0b0a312a0b310a312a0b0a4e4541530b310a5df5ced70a0a0a0a0a4f520a0a0a0a0a0a0a312a0b0a4e4541520b310a5d616161610a0a0a0a4f520a0a0a0a0a0a312b0a312a312a0a0a0a0a0a0a004a0b0a310b220a0b0a310a4a22310a0b0a7e6fe0e0e030e0e0e0e0e01176e02000e0e0e0e0e01131320226310a0b0a310a4a22310a0b0a310a766f8b8b4ee0e0300ae0090909090909090909090909090909090909090909090909090909090909090947aaaa540b09090909090909090909090909090909090909090909090909090909090909fae0e0f2f22164e0e0f273e07fefefef7d6dfafafafa6d6d6d6d';
++} {1 {database disk image is malformed}}
++
++set sqlite_fts3_enable_parentheses $saved
++
+ finish_test
+--- /test/fts3corrupt6.test
++++ /test/fts3corrupt6.test
+@@ -0,0 +1,60 @@
++# 2020 June 8
++#
++# The author disclaims copyright to this source code. In place of
++# a legal notice, here is a blessing:
++#
++# May you do good and not evil.
++# May you find forgiveness for yourself and forgive others.
++# May you share freely, never taking more than you give.
++#
++#*************************************************************************
++# This file implements regression tests for SQLite library. The
++# focus of this script is testing the FTS3 module.
++#
++# $Id: fts3aa.test,v 1.1 2007/08/20 17:38:42 shess Exp $
++#
++
++set testdir [file dirname $argv0]
++source $testdir/tester.tcl
++source $testdir/fts3_common.tcl
++set testprefix fts3corrupt6
++
++# If SQLITE_ENABLE_FTS3 is defined, omit this file.
++ifcapable !fts3 {
++ finish_test
++ return
++}
++
++set ::saved_sqlite_fts3_enable_parentheses $::sqlite_fts3_enable_parentheses
++set sqlite_fts3_enable_parentheses 1
++sqlite3_fts3_may_be_corrupt 1
++database_may_be_corrupt
++
++do_execsql_test 1.0 {
++ BEGIN TRANSACTION;
++ CREATE TABLE t_content(col0 INTEGER);
++ PRAGMA writable_schema=ON;
++ CREATE VIRTUAL TABLE t0 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
++ INSERT INTO t0_content VALUES(0,NULL,NULL,NULL,NULL);
++ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'000131030102000103323334050101010200000461616161050101020200000462626262050101030200');
++ COMMIT;
++}
++
++do_execsql_test 1.1 {
++ SELECT 0+matchinfo(t0,'yxyyxy') FROM t0 WHERE t0 MATCH CAST( x'2b0a312b0a312a312a2a0b5d0a0b0b0a312a0a0b0b0a312a0b310a392a0b0a27312a2a0b5d0a312a0b310a31315d0b310a312a316d2a0b313b15bceaa50a312a0b0a27312a2a0b5d0a312a0b310a312b0b2a310a312a0b2a0b2a0b2e5d0a0bff313336e34a2a312a0b0a3c310b0a0b4b4b0b4b2a4bec40322b2a0b310a0a312a0a0a0a0a0a0a0a0a0b310a312a2a2a0b5d0a0b0b0a312a0b310a312a0b0a4e4541530b310a5df5ced70a0a0a0a0a4f520a0a0a0a0a0a0a312a0b0a4e4541520b310a5d616161610a0a0a0a4f520a0a0a0a0a0a312b0a312a312a0a0a0a0a0a0a004a0b0a310b220a0b0a310a4a22310a0b0a7e6fe0e0e030e0e0e0e0e01176e02000e0e0e0e0e01131320226310a0b0a310a4a22310a0b0a310a766f8b8b4ee0e0300ae0090909090909090909090909090909090909090909090909090909090909090947aaaa540b09090909090909090909090909090909090909090909090909090909090909fae0e0f2f22164e0e0f273e07fefefef7d6dfafafafa6d6d6d6d' AS TEXT);
++} {0}
++
++do_execsql_test 1.2 {
++ CREATE VIRTUAL TABLE t1 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
++ INSERT INTO t1_content VALUES(0,NULL,NULL,NULL,NULL);
++ INSERT INTO t1_segdir VALUES(0,0,0,0,'0 42',X'000131030102000103323334050101010200000461616161050101020200000462626262050101030200');
++}
++
++do_execsql_test 1.3 {
++ SELECT 42+matchinfo(t1,'yxyyxy') FROM t1 WHERE t1 MATCH x'2b0a312b0a312a312a2a0b5d0a0b0b0a312a0a0b0b0a312a0b310a392a0b0a27312a2a0b5d0a312a0b310a31315d0b310a312a316d2a0b313b15bceaa50a312a0b0a27312a2a0b5d0a312a0b310a312b0b2a310a312a0b2a0b2a0b2e5d0a0bff313336e34a2a312a0b0a3c310b0a0b4b4b0b4b2a4bec40322b2a0b310a0a312a0a0a0a0a0a0a0a0a0b310a312a2a2a0b5d0a0b0b0a312a0b310a312a0b0a4e4541530b310a5df5ced70a0a0a0a0a4f520a0a0a0a0a0a0a312a0b0a4e4541520b310a5d616161610a0a0a0a4f520a0a0a0a0a0a312b0a312a312a0a0a0a0a0a0a004a0b0a310b220a0b0a310a4a22310a0b0a7e6fe0e0e030e0e0e0e0e01176e02000e0e0e0e0e01131320226310a0b0a310a4a22310a0b0a310a766f8b8b4ee0e0300ae0090909090909090909090909090909090909090909090909090909090909090947aaaa540b09090909090909090909090909090909090909090909090909090909090909fae0e0f2f22164e0e0f273e07fefefef7d6dfafafafa6d6d6d6d';
++} {42}
++
++set sqlite_fts3_enable_parentheses $saved_sqlite_fts3_enable_parentheses
++finish_test
++
++
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-backports_2.patch b/dev-db/sqlite/files/sqlite-3.32.3-backports_2.patch
new file mode 100644
index 00000000000..32b6f9b1624
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.32.3-backports_2.patch
@@ -0,0 +1,302 @@
+https://sqlite.org/src/info/30735432bc33cb95
+https://sqlite.org/src/info/1bd18ca35bdbf303
+https://sqlite.org/src/info/49da8bdce17ced91
+https://sqlite.org/src/info/f25a56c26e28abd4
+
+--- /ext/fts5/fts5_index.c
++++ /ext/fts5/fts5_index.c
+@@ -2321,11 +2321,11 @@
+ }
+
+ search_success:
+- pIter->iLeafOffset = iOff + nNew;
+- if( pIter->iLeafOffset>n || nNew<1 ){
++ if( (i64)iOff+nNew>n || nNew<1 ){
+ p->rc = FTS5_CORRUPT;
+ return;
+ }
++ pIter->iLeafOffset = iOff + nNew;
+ pIter->iTermLeafOffset = pIter->iLeafOffset;
+ pIter->iTermLeafPgno = pIter->iLeafPgno;
+
+--- /ext/fts5/test/fts5corrupt3.test
++++ /ext/fts5/test/fts5corrupt3.test
+@@ -10108,6 +10108,221 @@
+ INSERT INTO t1(t1) SELECT x FROM t2;
+ } {1 {database disk image is malformed}}
+
++#-------------------------------------------------------------------------
++reset_db
++do_test 69.0 {
++ sqlite3 db {}
++ db deserialize [decode_hexdb {
++.open --hexdb
++| size 32768 pagesize 4096 filename crash-31c462b8b665d0.db
++| page 1 offset 0
++| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
++| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
++| 32: 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 ................
++| 96: 00 00 00 00 0d 0f c7 00 07 0d 92 00 0f 8d 0f 36 ...............6
++| 112: 0e cb 0e 6b 0e 0e 0d b6 0d 92 00 00 00 00 00 00 ...k............
++| 3472: 00 00 22 08 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
++| 3488: 32 74 32 08 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
++| 3504: 20 74 32 28 78 29 56 07 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
++| 3520: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
++| 3536: 6f 6e 66 69 67 07 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
++| 3552: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
++| 3568: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
++| 3584: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 06 WITHOUT ROWID[.
++| 3600: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
++| 3616: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
++| 3632: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
++| 3648: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
++| 3664: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
++| 3680: 59 2c 20 73 7a 20 42 4c 4f 42 29 5e 05 07 17 21 Y, sz BLOB)^...!
++| 3696: 21 01 81 07 74 61 62 6c 65 74 31 5f 63 6f 6e 74 !...tablet1_cont
++| 3712: 65 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 05 43 52 entt1_content.CR
++| 3728: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 EATE TABLE 't1_c
++| 3744: 6f 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 ontent'(id INTEG
++| 3760: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
++| 3776: 63 39 2c 20 63 31 2c 20 63 32 29 69 04 07 17 19 c9, c1, c2)i....
++| 3792: 19 01 81 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 ...-tablet1_idxt
++| 3808: 31 5f 69 64 78 04 43 52 45 41 54 45 20 54 41 42 1_idx.CREATE TAB
++| 3824: 4c 45 20 27 74 31 5f 69 64 78 27 28 73 65 67 69 LE 't1_idx'(segi
++| 3840: 64 2c 20 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 d, term, pgno, P
++| 3856: 52 49 4d 41 52 59 20 4b 45 59 28 73 65 67 69 64 RIMARY KEY(segid
++| 3872: 2c 20 74 65 72 6d 29 29 20 57 49 54 48 4f 55 54 , term)) WITHOUT
++| 3888: 20 52 4f 57 49 44 55 03 07 17 1b 1b 01 81 01 74 ROWIDU........t
++| 3904: 61 62 6c 65 74 31 5f 64 61 74 61 74 31 5f 64 61 ablet1_datat1_da
++| 3920: 74 61 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 ta.CREATE TABLE
++| 3936: 27 74 31 5f 64 61 74 61 27 28 69 64 20 49 4e 54 't1_data'(id INT
++| 3952: 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 EGER PRIMARY KEY
++| 3968: 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 38 02 06 , block BLOB)8..
++| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
++| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
++| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 LE t1 USING fts5
++| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
++| page 3 offset 8192
++| 0: 0d 00 00 00 03 0c 94 00 0f e6 0f ef 0c 94 00 00 ................
++| 3216: 00 00 00 00 86 4a 84 80 80 80 80 01 04 00 8d 18 .....J..........
++| 3232: 00 00 03 2b 02 30 30 01 02 06 01 02 06 01 02 06 ...+.00.........
++| 3248: 1f 02 03 01 02 03 01 02 03 01 08 32 30 31 36 30 ...........20160
++| 3264: 36 30 39 01 02 07 01 02 07 01 02 07 01 01 34 01 609...........4.
++| 3280: 02 05 01 02 05 01 02 05 01 01 35 01 02 04 01 02 ..........5.....
++| 3296: 04 01 02 04 02 07 30 30 30 30 30 30 30 1c 02 04 ......0000000...
++| 3312: 01 02 04 01 02 04 01 06 62 69 6e 61 72 79 03 06 ........binary..
++| 3328: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
++| 3344: 02 02 03 06 00 02 02 03 06 01 02 02 03 06 01 02 ................
++| 3360: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
++| 3376: 03 06 01 02 02 03 06 01 02 02 01 08 63 6f 6d 70 ............comp
++| 3392: 69 6c 65 72 01 02 02 01 02 02 01 02 02 01 06 64 iler...........d
++| 3408: 62 73 74 61 74 07 02 03 01 02 03 01 02 03 02 04 bstat...........
++| 3424: 65 62 75 67 04 02 02 01 02 02 01 02 02 01 06 65 ebug...........e
++| 3440: 6e 61 62 6c 65 07 02 02 01 02 02 01 02 02 01 02 nable...........
++| 3456: 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 ................
++| 3472: 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 ................
++| 3488: 01 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 ................
++| 3504: 02 01 02 02 02 08 78 74 65 6e 73 69 6f 6e 1f 02 ......xtension..
++| 3520: 04 01 02 04 01 02 04 01 04 66 74 73 34 1a 02 03 .........fts4...
++| 3536: 01 02 03 01 02 03 04 01 35 0d 02 03 01 02 03 01 ........5.......
++| 3552: 02 03 01 03 67 63 63 01 aa 03 01 02 03 01 02 03 ....gcc.........
++| 3568: 02 06 65 6f 70 6f 6c 79 10 02 03 02 02 03 01 02 ..eopoly........
++| 3584: 03 01 05 6a 73 6f 6e 31 13 02 03 01 02 03 01 02 ...json1........
++| 3600: 03 01 04 6c 6f 61 64 1f 02 03 01 02 03 01 02 03 ...load.........
++| 3616: 01 03 6d 61 78 1c 02 02 01 02 02 01 02 02 02 05 ..max...........
++| 3632: 65 6d 6f 72 79 1c 02 03 01 02 03 01 02 03 04 04 emory...........
++| 3648: 73 79 73 35 16 02 03 01 02 03 01 02 03 01 06 6e sys5...........n
++| 3664: 6f 63 61 73 65 02 06 01 02 02 03 06 01 02 02 03 ocase...........
++| 3680: 06 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 ................
++| 3696: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
++| 3712: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
++| 3728: 02 01 04 6f 6d 69 74 1f 02 02 01 02 02 01 02 01 ...omit.........
++| 3744: ff ff ff ff ff ff ff ff f0 00 00 00 00 00 01 02 ................
++| 3760: 58 81 96 4d 01 06 01 02 02 03 06 01 02 02 03 06 X..M............
++| 3776: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
++| 3792: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
++| 3808: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
++| 3824: 01 0a 74 68 72 65 61 64 73 61 66 65 22 02 02 01 ..threadsafe....
++| 3840: 02 02 01 02 02 01 04 76 74 61 62 07 02 04 01 02 .......vtab.....
++| 3856: 04 01 02 04 01 01 78 01 06 01 01 02 01 06 01 01 ......x.........
++| 3872: 02 01 06 01 1e 02 01 06 01 01 02 01 06 01 01 02 ................
++| 3888: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
++| 3904: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
++| 3920: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
++| 3936: 00 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
++| 3952: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 ................
++| 3968: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
++| 3984: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
++| 4000: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
++| 4016: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
++| 4032: 02 01 06 01 01 02 01 06 01 01 02 04 15 13 0c 0c ................
++| 4048: 12 44 13 11 0f 47 13 0f 0b 0e 11 10 0f 0e 10 0f .D...G..........
++| 4064: 44 0f 10 40 15 0f 07 01 03 00 14 24 5a 24 24 0f D..@.......$Z$$.
++| 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
++| page 4 offset 12288
++| 0: 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
++| 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
++| page 5 offset 16384
++| 0: 0d 00 00 00 24 0c 0a 00 0f d8 0f af 0f 86 0f 74 ....$..........t
++| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
++| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
++| 48: 0d bb 0d a0 0d 84 0d 68 0d 4f 0d 00 00 00 00 00 .......h.O......
++| 3072: 00 00 00 00 00 00 00 00 00 00 18 24 05 00 25 0f ...........$..%.
++| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
++| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
++| 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
++| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 45 3d ..%..THREADSAFE=
++| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
++| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
++| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 d3 19 4f NXBINARY. ..3..O
++| 3200: 4d 49 54 28 2c 4f 41 44 b2 04 55 85 44 54 e5 34 MIT(,OAD..U.DT.4
++| 3216: 94 f4 e5 84 e4 f4 34 15 34 51 e1 f0 50 03 30 f1 ......4.4Q..P.0.
++| 3232: 74 f4 d4 95 42 04 c4 f4 14 42 04 55 85 44 54 e5 t...B....B.U.DT.
++| 3248: 34 94 f4 e5 85 25 45 24 94 d1 f1 e0 50 03 30 f1 4....%E$....P.0.
++| 3264: 94 d4 15 82 04 d4 54 d4 f5 25 93 d3 53 03 03 03 ......T..%..S...
++| 3280: 03 03 03 05 84 24 94 e4 15 25 91 f1 d0 50 03 30 .....$...%...P.0
++| 3296: f1 94 d4 15 82 04 d4 54 d4 f5 25 93 d3 53 03 03 .......T..%..S..
++| 3312: 03 03 03 03 05 84 e4 f4 34 15 34 51 e1 c0 50 03 ........4.4Q..P.
++| 3328: 30 f1 74 d4 15 82 04 d4 54 d4 f5 25 93 d3 53 03 0.t.....T..%..S.
++| 3344: 03 03 03 03 03 05 85 25 45 24 94 d1 81 b0 50 02 .......%E$....P.
++| 3360: 50 f1 94 54 e4 14 24 c4 52 05 25 45 24 54 55 84 P..T..$.R.%E$TU.
++| 3376: 24 94 e4 15 25 91 81 a0 50 02 50 f1 94 54 e4 14 $...%...P.P..T..
++| 3392: 24 c4 52 05 25 45 24 54 55 84 e4 f4 34 15 34 51 $.R.%E$TU...4.4Q
++| 3408: 71 90 50 02 50 f1 74 54 e4 14 24 c4 52 05 25 45 q.P.P.tT..$.R.%E
++| 3424: 24 54 55 85 25 45 24 94 d1 a1 80 50 02 90 f1 94 $TU.%E$....P....
++| 3440: 54 e4 14 24 c4 52 04 d4 54 d5 35 95 33 55 84 24 T..$.R..T.5.3U.$
++| 3456: 94 e4 15 25 91 a1 70 50 02 90 f1 94 54 e4 14 24 ...%..pP....T..$
++| 3472: c4 52 04 d4 54 d5 35 95 33 55 84 e4 f4 34 15 34 .R..T.5.3U...4.4
++| 3488: 51 91 60 50 02 90 f1 74 54 e4 14 24 c4 52 04 d4 Q.`P...tT..$.R..
++| 3504: 54 d5 35 95 33 55 85 25 45 24 94 d1 81 50 50 02 T.5.3U.%E$...PP.
++| 3520: 50 f1 94 54 e4 14 24 c4 52 04 a5 34 f4 e3 15 84 P..T..$.R..4....
++| 3536: 24 94 e4 15 25 91 81 40 50 02 50 f1 94 54 e4 14 $...%..@P.P..T..
++| 3552: 24 c4 52 04 a5 34 f4 e3 15 84 e4 f4 34 15 34 51 $.R..4......4.4Q
++| 3568: 71 30 50 02 4f f1 74 54 e4 14 24 c4 52 04 a5 34 q0P.O.tT..$.R..4
++| 3584: f4 e3 15 85 25 45 24 94 d1 a1 20 50 02 90 f1 94 ....%E$... P....
++| 3600: 54 e4 14 24 c4 52 04 74 54 f5 04 f4 c5 95 84 24 T..$.R.tT......$
++| 3616: 94 e4 15 25 91 a1 10 50 02 90 f1 94 54 e4 14 24 ...%...P....T..$
++| 3632: c4 52 04 74 54 f5 04 f4 c5 95 84 e4 f4 34 15 34 .R.tT........4.4
++| 3648: 51 91 00 50 02 90 f1 74 54 e4 14 24 c4 51 f4 74 Q..P...tT..$.Q.t
++| 3664: 54 f5 04 f4 c5 95 85 25 45 24 94 d1 70 f0 50 02 T......%E$..p.P.
++| 3680: 30 f1 94 54 e4 14 24 c5 20 46 54 53 35 58 42 49 0..T..$. FTS5XBI
++| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
++| 3712: 45 20 46 54 53 35 58 4f 4f 43 41 53 45 16 0d 05 E FTS5XOOCASE...
++| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
++| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
++| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 97 0b LE FTS4XBINARY..
++| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
++| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
++| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
++| 3824: 09 05 00 3e 5f 19 45 4e 41 42 4c 45 20 44 42 53 ...>_.ENABLE DBS
++| 3840: 44 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e DAT VTABXBINARY.
++| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
++| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 4d e3 45 1d TAT VTABXNOCM.E.
++| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
++| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
++| 3920: 05 00 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
++| 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
++| 3952: 43 41 53 45 10 02 02 50 08 5f 17 44 45 42 55 47 CASE...P._.DEBUG
++| 3968: 58 52 54 52 49 4d 27 03 05 00 44 0f 19 43 4f 4d XRTRIM'...D..COM
++| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
++| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
++| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
++| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
++| 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 c9 17 43 9XNOCASE&...C..C
++| 4064: 4f 4d 50 49 4c 47 02 3d 67 63 63 2d 35 2e 34 2e OMPILG.=gcc-5.4.
++| 4080: 30 20 32 30 31 36 30 36 30 39 58 52 54 52 49 4d 0 20160609XRTRIM
++| page 6 offset 20480
++| 0: 0d 00 00 00 24 0e e0 00 0f f8 0f f0 0f e8 0f e0 ....$...........
++| 16: 0f d8 0f d0 0f c8 0f c0 0f b8 0f b0 0f a8 0f a0 ................
++| 32: 0f 98 0f 90 0f 88 0f 80 0f 78 0f 70 0f 68 0f 60 .........x.p.h.`
++| 48: 0f 58 0f 50 0f 48 0f 40 0f 38 00 00 00 00 00 00 .X.P.H.@.8......
++| 3808: 06 24 03 00 12 02 01 01 06 23 03 00 12 02 01 01 .$.......#......
++| 3824: 06 22 03 00 12 02 01 01 06 21 03 00 12 03 01 01 .........!......
++| 3840: 06 20 03 00 12 03 01 01 06 1f 03 00 12 03 01 01 . ..............
++| 3856: 06 1e 03 00 12 03 01 01 06 1d 03 00 12 03 01 01 ................
++| 3872: 06 1c 03 00 12 03 01 01 06 1b 03 00 12 02 01 01 ................
++| 3888: 06 1a 03 00 12 02 01 01 06 19 03 00 12 02 01 01 ................
++| 3904: 06 18 03 00 12 02 01 01 06 17 03 00 12 02 01 01 ................
++| 3920: 06 16 03 00 12 02 01 01 06 15 03 00 12 02 01 01 ................
++| 3936: 06 14 03 00 12 02 01 01 06 13 03 00 12 02 01 01 ................
++| 3952: 06 12 03 00 12 02 01 01 06 11 03 00 12 02 01 01 ................
++| 3968: 06 10 03 00 12 02 01 01 06 1f 03 00 12 02 01 01 ................
++| 3984: 06 0e 03 00 12 02 01 01 06 0d 03 00 12 02 01 01 ................
++| 4000: 06 0c 03 00 12 02 01 01 06 0b 03 00 12 02 01 01 ................
++| 4016: 06 0a 03 00 12 02 01 01 06 09 03 00 12 03 01 01 ................
++| 4032: 06 08 03 00 12 03 01 01 06 07 03 00 12 03 01 01 ................
++| 4048: 06 06 03 00 12 01 01 01 06 05 03 00 12 01 01 01 ................
++| 4064: 06 04 03 00 12 01 01 01 06 03 03 00 12 06 01 01 ................
++| 4080: 06 02 03 00 12 06 01 01 06 01 03 00 12 06 01 01 ................
++| page 7 offset 24576
++| 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
++| 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
++| page 8 offset 28672
++| 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
++| 4048: 00 00 00 00 00 00 11 03 02 2b 69 6e 74 65 67 72 .........+integr
++| 4064: 69 74 79 2d 63 68 65 63 6b 09 00 00 00 00 00 00 ity-check.......
++| end crash-31c462b8b665d0.db
++}]} {}
++
++
++do_catchsql_test 69.2 {
++ SELECT * FROM t1 WHERE a MATCH 'fx*'
++} {1 {database disk image is malformed}}
+
+ sqlite3_fts5_may_be_corrupt 0
+ finish_test
+--- /src/btree.c
++++ /src/btree.c
+@@ -3886,7 +3886,7 @@
+ Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
+ Pgno nFin = finalDbSize(pBt, nOrig, nFree);
+
+- if( nOrig<nFin ){
++ if( nOrig<nFin || nFree>=nOrig ){
+ rc = SQLITE_CORRUPT_BKPT;
+ }else if( nFree>0 ){
+ rc = saveAllCursors(pBt, 0, 0);
+@@ -8772,7 +8772,11 @@
+ assert( pPage->intKey || pX->nKey>=0 );
+ assert( pPage->leaf || !pPage->intKey );
+ if( pPage->nFree<0 ){
+- rc = btreeComputeFreeSpace(pPage);
++ if( pCur->eState>CURSOR_INVALID ){
++ rc = SQLITE_CORRUPT_BKPT;
++ }else{
++ rc = btreeComputeFreeSpace(pPage);
++ }
+ if( rc ) return rc;
+ }
+
+--- /test/corruptL.test
++++ /test/corruptL.test
+@@ -1266,5 +1266,30 @@
+ do_execsql_test 15.1 {
+ UPDATE c1 SET c= NOT EXISTS(SELECT 1 FROM c1 ORDER BY (SELECT 1 FROM c1 ORDER BY a)) +10 WHERE d BETWEEN 4 AND 7;
+ } {}
++
++#-------------------------------------------------------------------------
++reset_db
++do_execsql_test 16.0 {
++ CREATE TABLE t1(w, x, y, z, UNIQUE(w, x), UNIQUE(y, z));
++ INSERT INTO t1 VALUES(1, 1, 1, 1);
++
++ CREATE TABLE t1idx(x, y, i INTEGER, PRIMARY KEY(x)) WITHOUT ROWID;
++ INSERT INTO t1idx VALUES(10, NULL, 5);
++
++ PRAGMA writable_schema = 1;
++ UPDATE sqlite_master SET rootpage = (
++ SELECT rootpage FROM sqlite_master WHERE name='t1idx'
++ ) WHERE type = 'index';
++}
++
++db close
++sqlite3 db test.db
++
++do_catchsql_test 16.1 {
++ PRAGMA writable_schema = ON;
++ INSERT INTO t1(rowid, w, x, y, z) VALUES(5, 10, 11, 10, NULL);
++} {1 {database disk image is malformed}}
++
+ finish_test
+
++
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-backports_3.patch b/dev-db/sqlite/files/sqlite-3.32.3-backports_3.patch
new file mode 100644
index 00000000000..07cb5d4a396
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.32.3-backports_3.patch
@@ -0,0 +1,220 @@
+https://sqlite.org/src/info/14eed318aa9e6e16
+https://sqlite.org/src/info/9679c0c61131f0e9
+https://sqlite.org/src/info/28515bbbae4fbc26
+https://sqlite.org/src/info/892e9191dc8f8056
+https://sqlite.org/src/info/270ac1a0f232d755
+
+--- /ext/fts3/fts3.c
++++ /ext/fts3/fts3.c
+@@ -5831,7 +5831,8 @@
+ fts3EvalRestart(pCsr, pRoot, &rc);
+ do {
+ fts3EvalNextRow(pCsr, pRoot, &rc);
+- assert( pRoot->bEof==0 );
++ assert_fts3_nc( pRoot->bEof==0 );
++ if( pRoot->bEof ) rc = FTS_CORRUPT_VTAB;
+ }while( pRoot->iDocid!=iDocid && rc==SQLITE_OK );
+ }
+ }
+--- /ext/misc/appendvfs.c
++++ /ext/misc/appendvfs.c
+@@ -439,7 +439,7 @@
+ p = (ApndFile*)pFile;
+ memset(p, 0, sizeof(*p));
+ pSubFile = ORIGFILE(pFile);
+- p->base.pMethods = &apnd_io_methods;
++ pFile->pMethods = &apnd_io_methods;
+ rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
+ if( rc ) goto apnd_open_done;
+ rc = pSubFile->pMethods->xFileSize(pSubFile, &sz);
+--- /ext/misc/cksumvfs.c
++++ /ext/misc/cksumvfs.c
+@@ -634,7 +634,7 @@
+ p = (CksmFile*)pFile;
+ memset(p, 0, sizeof(*p));
+ pSubFile = ORIGFILE(pFile);
+- p->base.pMethods = &cksm_io_methods;
++ pFile->pMethods = &cksm_io_methods;
+ rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
+ if( rc ) goto cksm_open_done;
+ if( flags & SQLITE_OPEN_WAL ){
+--- /src/date.c
++++ /src/date.c
+@@ -1112,8 +1112,8 @@
+ case 'm': sqlite3_snprintf(3, &z[j],"%02d",x.M); j+=2; break;
+ case 'M': sqlite3_snprintf(3, &z[j],"%02d",x.m); j+=2; break;
+ case 's': {
+- sqlite3_snprintf(30,&z[j],"%lld",
+- (i64)(x.iJD/1000 - 21086676*(i64)10000));
++ i64 iS = (i64)(x.iJD/1000 - 21086676*(i64)10000);
++ sqlite3Int64ToText(iS, &z[j]);
+ j += sqlite3Strlen30(&z[j]);
+ break;
+ }
+--- /src/memdb.c
++++ /src/memdb.c
+@@ -339,7 +339,7 @@
+ p->mFlags = SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE;
+ assert( pOutFlags!=0 ); /* True because flags==SQLITE_OPEN_MAIN_DB */
+ *pOutFlags = flags | SQLITE_OPEN_MEMORY;
+- p->base.pMethods = &memdb_io_methods;
++ pFile->pMethods = &memdb_io_methods;
+ p->szMax = sqlite3GlobalConfig.mxMemdbSize;
+ return SQLITE_OK;
+ }
+--- /src/memjournal.c
++++ /src/memjournal.c
+@@ -366,7 +366,7 @@
+ assert( MEMJOURNAL_DFLT_FILECHUNKSIZE==fileChunkSize(p->nChunkSize) );
+ }
+
+- p->pMethod = (const sqlite3_io_methods*)&MemJournalMethods;
++ pJfd->pMethods = (const sqlite3_io_methods*)&MemJournalMethods;
+ p->nSpill = nSpill;
+ p->flags = flags;
+ p->zJournal = zName;
+@@ -392,7 +392,7 @@
+ int sqlite3JournalCreate(sqlite3_file *pJfd){
+ int rc = SQLITE_OK;
+ MemJournal *p = (MemJournal*)pJfd;
+- if( p->pMethod==&MemJournalMethods && (
++ if( pJfd->pMethods==&MemJournalMethods && (
+ #ifdef SQLITE_ENABLE_ATOMIC_WRITE
+ p->nSpill>0
+ #else
+--- /src/os_unix.c
++++ /src/os_unix.c
+@@ -5689,7 +5689,7 @@
+ if( rc!=SQLITE_OK ){
+ if( h>=0 ) robust_close(pNew, h, __LINE__);
+ }else{
+- pNew->pMethod = pLockingStyle;
++ pId->pMethods = pLockingStyle;
+ OpenCounter(+1);
+ verifyDbFile(pNew);
+ }
+--- /src/os_win.c
++++ /src/os_win.c
+@@ -5266,7 +5266,7 @@
+ }
+
+ sqlite3_free(zTmpname);
+- pFile->pMethod = pAppData ? pAppData->pMethod : &winIoMethod;
++ id->pMethods = pAppData ? pAppData->pMethod : &winIoMethod;
+ pFile->pVfs = pVfs;
+ pFile->h = h;
+ if( isReadonly ){
+--- /src/sqliteInt.h
++++ /src/sqliteInt.h
+@@ -4437,6 +4437,7 @@
+ int sqlite3FixExprList(DbFixer*, ExprList*);
+ int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);
+ int sqlite3RealSameAsInt(double,sqlite3_int64);
++void sqlite3Int64ToText(i64,char*);
+ int sqlite3AtoF(const char *z, double*, int, u8);
+ int sqlite3GetInt32(const char *, int*);
+ int sqlite3Atoi(const char*);
+--- /src/test_multiplex.c
++++ /src/test_multiplex.c
+@@ -591,9 +591,9 @@
+
+ if( rc==SQLITE_OK ){
+ if( pSubOpen->pMethods->iVersion==1 ){
+- pMultiplexOpen->base.pMethods = &gMultiplex.sIoMethodsV1;
++ pConn->pMethods = &gMultiplex.sIoMethodsV1;
+ }else{
+- pMultiplexOpen->base.pMethods = &gMultiplex.sIoMethodsV2;
++ pConn->pMethods = &gMultiplex.sIoMethodsV2;
+ }
+ }else{
+ multiplexFreeComponents(pGroup);
+--- /src/util.c
++++ /src/util.c
+@@ -596,6 +596,30 @@
+ #endif
+
+ /*
++** Render an signed 64-bit integer as text. Store the result in zOut[].
++**
++** The caller must ensure that zOut[] is at least 21 bytes in size.
++*/
++void sqlite3Int64ToText(i64 v, char *zOut){
++ int i;
++ u64 x;
++ char zTemp[22];
++ if( v<0 ){
++ x = (v==SMALLEST_INT64) ? ((u64)1)<<63 : -v;
++ }else{
++ x = v;
++ }
++ i = sizeof(zTemp)-2;
++ zTemp[sizeof(zTemp)-1] = 0;
++ do{
++ zTemp[i--] = (x%10) + '0';
++ x = x/10;
++ }while( x );
++ if( v<0 ) zTemp[i--] = '-';
++ memcpy(zOut, &zTemp[i+1], sizeof(zTemp)-1-i);
++}
++
++/*
+ ** Compare the 19-character string zNum against the text representation
+ ** value 2^63: 9223372036854775808. Return negative, zero, or positive
+ ** if zNum is less than, equal to, or greater than the string.
+--- /src/vdbemem.c
++++ /src/vdbemem.c
+@@ -104,16 +104,25 @@
+ static void vdbeMemRenderNum(int sz, char *zBuf, Mem *p){
+ StrAccum acc;
+ assert( p->flags & (MEM_Int|MEM_Real|MEM_IntReal) );
+- sqlite3StrAccumInit(&acc, 0, zBuf, sz, 0);
++ assert( sz>22 );
+ if( p->flags & MEM_Int ){
+- sqlite3_str_appendf(&acc, "%lld", p->u.i);
+- }else if( p->flags & MEM_IntReal ){
+- sqlite3_str_appendf(&acc, "%!.15g", (double)p->u.i);
++#if GCC_VERSION>=7000000
++ /* Work-around for GCC bug
++ ** https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270 */
++ i64 x;
++ assert( (p->flags&MEM_Int)*2==sizeof(x) );
++ memcpy(&x, (char*)&p->u, (p->flags&MEM_Int)*2);
++ sqlite3Int64ToText(x, zBuf);
++#else
++ sqlite3Int64ToText(p->u.i, zBuf);
++#endif
+ }else{
+- sqlite3_str_appendf(&acc, "%!.15g", p->u.r);
++ sqlite3StrAccumInit(&acc, 0, zBuf, sz, 0);
++ sqlite3_str_appendf(&acc, "%!.15g",
++ (p->flags & MEM_IntReal)!=0 ? (double)p->u.i : p->u.r);
++ assert( acc.zText==zBuf && acc.mxAlloc<=0 );
++ zBuf[acc.nChar] = 0; /* Fast version of sqlite3StrAccumFinish(&acc) */
+ }
+- assert( acc.zText==zBuf && acc.mxAlloc<=0 );
+- zBuf[acc.nChar] = 0; /* Fast version of sqlite3StrAccumFinish(&acc) */
+ }
+
+ #ifdef SQLITE_DEBUG
+--- /test/fts3corrupt4.test
++++ /test/fts3corrupt4.test
+@@ -6282,4 +6282,19 @@
+
+ set sqlite_fts3_enable_parentheses $saved
+
++#-------------------------------------------------------------------------
++reset_db
++do_execsql_test 47.1 {
++ CREATE VIRTUAL TABLE t1 USING fts3(a,b,c);
++}
++do_execsql_test 47.2 {
++ INSERT INTO t1_segdir VALUES(0,0,0,0,0,X'000130120106000106000106001f030001030001030000083230313630363039090107000107000107000001340901050001050001050000013509010400010400010400010730303030303030091c0400010400010400000662696e6172793c0301020200030102020003010202000301020200030102020003010202000301020200030102020003010202000301020200030102020003010202000008636f6d70696c657209010200010200010200000664627374617409070300010300010300010465627567090402000102000102000006656e61626c653f07020001020001020001020001020001020001020001020001020001020001020001020001010001020001020001020001020001020001020001020001020001087874656e73696f6e091f0400010400010400000466747334090a0300010300010300030135090d03000103000103000003676363090103000103000103000106656f706f6c790910030001030001030000056a736f6e310913030001030001030000046c6f6164091f030001030001030000036d6178091c02000102000102000105656d6f7279091c03000103000103000304737973350916030001030001030000066e6f636173653c020102020003010202000301020200030102020003010
20200030102020003010202000301020200030102020003010202000301020200030102020000046f6d6974091f020001020001020000057274726565091903000103000103000302696d3c01010202000301020200030102020003010202000301020200030102020003010202000301a202000301020200030102020003010202000301020200000a746872656164736166650922020001020001020000047674616209070400010400010400000178b401010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200');
++ INSERT INTO t1_segdir VALUES(0,1,0,0,0,X'0001300425061b000008323031363036303903250700000134032505000001350325040001073030303030303003251a000008636f6d70696c657203250200000664627374617403250a00010465627567032508000006656e61626c650925090504040404040001087874656e73696f6e03251d0000046674733403250d0003013503250f000003676363032503000106656f706f6c790325110000056a736f6e310325130000046c6f616403251c0000036d6178032518000105656d6f7279032519000304737973350325150000046f6d697403251b000005727472656503251700000a7468726561647361666503251e0000047674616333250b00');
++}
++
++do_catchsql_test 47.3 {
++ SELECT matchinfo(t1) FROM t1 WHERE t1 MATCH '"json1 enable"';
++} {1 {database disk image is malformed}}
++
++
+ finish_test
diff --git a/dev-db/sqlite/sqlite-3.32.3-r1.ebuild b/dev-db/sqlite/sqlite-3.32.3-r1.ebuild
new file mode 100644
index 00000000000..78ff6e09570
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.32.3-r1.ebuild
@@ -0,0 +1,339 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+if [[ "${PV}" != "9999" ]]; then
+ SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+ DOC_PV="${SRC_PV}"
+ # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+fi
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip
+ doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )"
+fi
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+if [[ "${PV}" == "9999" ]]; then
+ PROPERTIES="live"
+fi
+RESTRICT="!test? ( test )"
+
+if [[ "${PV}" == "9999" ]]; then
+ BDEPEND=">=dev-lang/tcl-8.6:0
+ dev-vcs/fossil"
+else
+ BDEPEND="app-arch/unzip
+ >=dev-lang/tcl-8.6:0"
+fi
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+if [[ "${PV}" == "9999" ]]; then
+ S="${WORKDIR}/${PN}"
+else
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+fi
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ addwrite "${distdir}"
+ mkdir -p "${distdir}/fossil-src/${PN}" || die
+
+ mkdir "${WORKDIR}/${PN}" || die
+ pushd "${WORKDIR}/${PN}" > /dev/null || die
+ if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
+ einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
+ fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
+ einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
+ fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
+ echo
+ fi
+ cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
+ einfo fossil open --quiet sqlite.fossil
+ fossil open --quiet sqlite.fossil || die
+ echo
+ popd > /dev/null || die
+
+ if use doc; then
+ mkdir "${WORKDIR}/${PN}-doc" || die
+ pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
+ if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
+ einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
+ fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
+ einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
+ fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
+ echo
+ fi
+ cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
+ einfo fossil open --quiet sqlite-doc.fossil
+ fossil open --quiet sqlite-doc.fossil || die
+ echo
+ popd > /dev/null || die
+ fi
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/"${PN}-3.32.1-full_archive-build_{1,2}.patch
+ eapply "${FILESDIR}/"${PN}-3.32.3-backports_{1,2,3}.patch
+
+ eapply_user
+
+ # Fix AC_CHECK_FUNCS.
+ # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
+ 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"
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
+ local options=()
+
+ options+=(
+ --enable-load-extension
+ --enable-threadsafe
+ )
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support bytecode and tables_used virtual tables.
+ # https://sqlite.org/bytecodevtab.html
+ append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
+
+ # Support column metadata functions.
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/dbpage.html
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support scan status functions.
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support Session extension.
+ # https://sqlite.org/sessionintro.html
+ options+=(--enable-session)
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
+ # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support soundex() function.
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ options+=($(use_enable debug))
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if use readline; then
+ options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ options+=(--enable-tcl)
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${D}" -name "*.la" -type f -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
+ (
+ docinto html
+ dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ )
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2020-09-15 18:34 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2020-09-15 18:34 UTC (permalink / raw
To: gentoo-commits
commit: 022a6609aaf851c09482de563a692407b4a4a472
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Sep 14 11:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Sep 15 18:33:39 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=022a6609
dev-db/sqlite: Delete old version (3.32.3).
Bug: https://bugs.gentoo.org/732604
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
.../files/sqlite-3.32.3-security_fixes.patch | 146 ---------
dev-db/sqlite/sqlite-3.32.3.ebuild | 340 ---------------------
2 files changed, 486 deletions(-)
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch b/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch
deleted file mode 100644
index ad2a3bfe16d..00000000000
--- a/dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-https://sqlite.org/src/info/cc888878ea8d5bc7
-https://sqlite.org/src/info/be545f85a6ef09cc
-https://sqlite.org/src/info/6e0ffa2053124168
-https://sqlite.org/src/info/4d0cfb1236884349
-
---- /ext/fts3/fts3.c
-+++ /ext/fts3/fts3.c
-@@ -5208,10 +5208,12 @@
- );
- if( res ){
- nNew = (int)(pOut - pPhrase->doclist.pList) - 1;
-- assert( pPhrase->doclist.pList[nNew]=='\0' );
-- assert( nNew<=pPhrase->doclist.nList && nNew>0 );
-- memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
-- pPhrase->doclist.nList = nNew;
-+ if( nNew>=0 ){
-+ assert( pPhrase->doclist.pList[nNew]=='\0' );
-+ assert( nNew<=pPhrase->doclist.nList && nNew>0 );
-+ memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
-+ pPhrase->doclist.nList = nNew;
-+ }
- *paPoslist = pPhrase->doclist.pList;
- *pnToken = pPhrase->nToken;
- }
---- /ext/fts3/fts3_write.c
-+++ /ext/fts3/fts3_write.c
-@@ -341,7 +341,9 @@
- ** created by merging the oldest :2 segments from absolute level :1. See
- ** function sqlite3Fts3Incrmerge() for details. */
- /* 29 */ "SELECT 2 * total(1 + leaves_end_block - start_block) "
-- " FROM %Q.'%q_segdir' WHERE level = ? AND idx < ?",
-+ " FROM (SELECT * FROM %Q.'%q_segdir' "
-+ " WHERE level = ? ORDER BY idx ASC LIMIT ?"
-+ " )",
-
- /* SQL_DELETE_SEGDIR_ENTRY
- ** Delete the %_segdir entry on absolute level :1 with index :2. */
-@@ -2853,6 +2855,19 @@
- return SQLITE_OK;
- }
-
-+static int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, int nReq){
-+ if( nReq>pCsr->nBuffer ){
-+ char *aNew;
-+ pCsr->nBuffer = nReq*2;
-+ aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
-+ if( !aNew ){
-+ return SQLITE_NOMEM;
-+ }
-+ pCsr->aBuffer = aNew;
-+ }
-+ return SQLITE_OK;
-+}
-+
-
- int sqlite3Fts3SegReaderStep(
- Fts3Table *p, /* Virtual table handle */
-@@ -2987,15 +3002,9 @@
- }
-
- nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
-- if( nDoclist+nByte>pCsr->nBuffer ){
-- char *aNew;
-- pCsr->nBuffer = (nDoclist+nByte)*2;
-- aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
-- if( !aNew ){
-- return SQLITE_NOMEM;
-- }
-- pCsr->aBuffer = aNew;
-- }
-+
-+ rc = fts3GrowSegReaderBuffer(pCsr, nByte+nDoclist);
-+ if( rc ) return rc;
-
- if( isFirst ){
- char *a = &pCsr->aBuffer[nDoclist];
-@@ -3020,6 +3029,9 @@
- fts3SegReaderSort(apSegment, nMerge, j, xCmp);
- }
- if( nDoclist>0 ){
-+ rc = fts3GrowSegReaderBuffer(pCsr, nDoclist+FTS3_NODE_PADDING);
-+ if( rc ) return rc;
-+ memset(&pCsr->aBuffer[nDoclist], 0, FTS3_NODE_PADDING);
- pCsr->aDoclist = pCsr->aBuffer;
- pCsr->nDoclist = nDoclist;
- rc = SQLITE_ROW;
---- /src/expr.c
-+++ /src/expr.c
-@@ -4272,7 +4272,9 @@
- int nCol;
- testcase( op==TK_EXISTS );
- testcase( op==TK_SELECT );
-- if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
-+ if( pParse->db->mallocFailed ){
-+ return 0;
-+ }else if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
- sqlite3SubselectError(pParse, nCol, 1);
- }else{
- return sqlite3CodeSubselect(pParse, pExpr);
---- /test/fts3corrupt4.test
-+++ /test/fts3corrupt4.test
-@@ -6123,4 +6123,44 @@
- SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'rtree ner "json1^enable"';
- }
-
-+#-------------------------------------------------------------------------
-+do_execsql_test 42.1 {
-+ CREATE VIRTUAL TABLE f USING fts3(a, b);
-+}
-+do_execsql_test 42.2 {
-+ INSERT INTO f_segdir VALUES(0,2,1111,0,0,X'00');
-+ INSERT INTO f_segdir VALUES(0,3,0 ,0,0,X'00013003010200');
-+}
-+do_execsql_test 42.3 {
-+ INSERT INTO f(f) VALUES ('merge=107,2');
-+}
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+set saved $sqlite_fts3_enable_parentheses
-+set sqlite_fts3_enable_parentheses 1
-+do_execsql_test 43.1 {
-+ CREATE VIRTUAL TABLE def USING fts3(xyz);
-+ INSERT INTO def_segdir VALUES(0,0,0,0,0, X'0001310301c9000103323334050d81');
-+} {}
-+
-+do_execsql_test 43.2 {
-+ SELECT rowid FROM def WHERE def MATCH '1 NEAR 1'
-+} {1}
-+
-+set sqlite_fts3_enable_parentheses $saved
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+do_execsql_test 44.1 {
-+ CREATE VIRTUAL TABLE t0 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
-+ INSERT INTO t0_content VALUES(0,NULL,NULL,NULL,NULL);
-+ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'00013103010200010332333405010201ba00000461616161050101020200000462626262050101030200');
-+}
-+
-+do_execsql_test 44.2 {
-+ SELECT matchinfo(t0, t0) IS NULL FROM t0 WHERE t0 MATCH '1*'
-+} {0}
-+
-+
- finish_test
diff --git a/dev-db/sqlite/sqlite-3.32.3.ebuild b/dev-db/sqlite/sqlite-3.32.3.ebuild
deleted file mode 100644
index fd258a4bd4c..00000000000
--- a/dev-db/sqlite/sqlite-3.32.3.ebuild
+++ /dev/null
@@ -1,340 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-if [[ "${PV}" != "9999" ]]; then
- SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
- DOC_PV="${SRC_PV}"
- # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
-fi
-
-DESCRIPTION="SQL database engine"
-HOMEPAGE="https://sqlite.org/"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip
- doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )"
-fi
-
-LICENSE="public-domain"
-SLOT="3"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-if [[ "${PV}" == "9999" ]]; then
- PROPERTIES="live"
-fi
-RESTRICT="!test? ( test )"
-
-if [[ "${PV}" == "9999" ]]; then
- BDEPEND=">=dev-lang/tcl-8.6:0
- dev-vcs/fossil"
-else
- BDEPEND="app-arch/unzip
- >=dev-lang/tcl-8.6:0"
-fi
-RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
-
-if [[ "${PV}" == "9999" ]]; then
- S="${WORKDIR}/${PN}"
-else
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
-fi
-
-src_unpack() {
- if [[ "${PV}" == "9999" ]]; then
- local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
- addwrite "${distdir}"
- mkdir -p "${distdir}/fossil-src/${PN}" || die
-
- mkdir "${WORKDIR}/${PN}" || die
- pushd "${WORKDIR}/${PN}" > /dev/null || die
- if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
- einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
- fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
- echo
- else
- cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
- einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
- fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
- echo
- fi
- cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
- einfo fossil open --quiet sqlite.fossil
- fossil open --quiet sqlite.fossil || die
- echo
- popd > /dev/null || die
-
- if use doc; then
- mkdir "${WORKDIR}/${PN}-doc" || die
- pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
- if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
- einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
- fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
- echo
- else
- cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
- einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
- fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
- echo
- fi
- cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
- einfo fossil open --quiet sqlite-doc.fossil
- fossil open --quiet sqlite-doc.fossil || die
- echo
- popd > /dev/null || die
- fi
- else
- default
- fi
-}
-
-src_prepare() {
- eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_1.patch"
- eapply "${FILESDIR}/${PN}-3.32.1-full_archive-build_2.patch"
- eapply "${FILESDIR}/${PN}-3.32.3-security_fixes.patch"
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
- local options=()
-
- options+=(
- --enable-load-extension
- --enable-threadsafe
- )
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support bytecode and tables_used virtual tables.
- # https://sqlite.org/bytecodevtab.html
- append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support sqlite_dbpage virtual table.
- # https://sqlite.org/dbpage.html
- append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support sqlite3_serialize() and sqlite3_deserialize() functions.
- # https://sqlite.org/c3ref/serialize.html
- # https://sqlite.org/c3ref/deserialize.html
- append-cppflags -DSQLITE_ENABLE_DESERIALIZE
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support sqlite3_normalized_sql() function.
- # https://sqlite.org/c3ref/expanded_sql.html
- append-cppflags -DSQLITE_ENABLE_NORMALIZE
-
- # Support sqlite_offset() function.
- # https://sqlite.org/lang_corefunc.html#sqlite_offset
- append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
-
- # Support pre-update hook functions.
- # https://sqlite.org/c3ref/preupdate_count.html
- append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- # https://sqlite.org/geopoly.html
- append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support sqlite_stmt virtual table.
- # https://sqlite.org/stmt.html
- append-cppflags -DSQLITE_ENABLE_STMTVTAB
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
- # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
- # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
- append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # Support URI filenames.
- # https://sqlite.org/uri.html
- append-cppflags -DSQLITE_USE_URI
-
- # debug USE flag.
- options+=($(use_enable debug))
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if use readline; then
- options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- options+=(--enable-tcl)
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- if [[ "${ABI}" == "x86" ]]; then
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
- append-cflags -mfpmath=sse
- else
- append-cflags -ffloat-store
- fi
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool dbtotxt sqlite3-db-to-txt
- install_tool index_usage sqlite3-index-usage
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showshm sqlite3-show-shm
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
- install_tool sqlite3_checker sqlite3-checker
- install_tool sqlite3_expert sqlite3-expert
- install_tool sqltclsh sqlite3-tclsh
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- find "${D}" -name "*.la" -type f -delete || die
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2020-12-27 18:39 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2020-12-27 18:39 UTC (permalink / raw
To: gentoo-commits
commit: 406a76d5dacf834cbaca4939650f65849a5c6220
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Fri Dec 18 00:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Dec 27 18:39:08 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=406a76d5
dev-db/sqlite: Version bump (3.34.0).
Closes: https://bugs.gentoo.org/658912
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 2 +
dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch | 375 ++++++++++++++++
dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch | 500 ++++++++++++++++++++++
dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch | 291 +++++++++++++
dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch | 441 +++++++++++++++++++
dev-db/sqlite/sqlite-3.34.0.ebuild | 427 ++++++++++++++++++
6 files changed, 2036 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index e9654e2a638..87df89ad6bb 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,4 +1,6 @@
DIST sqlite-doc-3320300.zip 9772933 BLAKE2B efd72c18d0398c103e3f9c4cfeb03e7794fd69691b1bcea95b74a0c5d8af22aa13abc84ce8dc5864b5f4cb79be239433933b4daca34d1adfcc6f31ce2cde66bf SHA512 af9dca970b4c03c058d7d1cd55a3d11fa4b112dccac942b8660d82a7e9ba2956963fcb429eedfdc85915637c102e1f904ace98c8e0455c4120422bbd9f2f3cd0
DIST sqlite-doc-3330000.zip 9834159 BLAKE2B f67155a8ce8e46c2fbc0a4e35722d1fcad86e905a15230adc70732cee267b6b2002c7499883b938129aaa908b99634e4214360e9d1dbdae333b09060de24530e SHA512 14a3cccb4ff6af57738990eeadd37a1b827f89c9c1b16201c62ca5bb9301d39223d48677b9c269ce332210e5c9ae3f42aa0f9de7d79b38acb9809c732d038368
+DIST sqlite-doc-3340000.zip 10069888 BLAKE2B 343df62bc8b75d57dffe69c779cceb856d9e94a5b2a77c3a972761eedd8b4b0f5f8849102ec271652c3aa4039df75d7f2e503fd04b0547be03e024fdfbd894ac SHA512 1bdf20030e656ec4ce38a264c8ef7a95c9f2731cd7d756a44b35b6c68827e8aba92018007139ee09d1c27b34bcd72bff1a201dc3f30aa13e96120af5d58e835e
DIST sqlite-src-3320300.zip 12461750 BLAKE2B 59cce74d284191cfc69ac09b6014701ddd2b7b3d7ebaad5da4ad71cc200e70285b3b201ff174819aa8dde5f610589d7947f547450334f0f17149014078316185 SHA512 7e027c7163a760fb9b6dbfd2e4ccffb39d4972280583fb0d7f8390017101dfed3b12a36653b3130a548ae4d04c6abb11c0a1921b6f09c54c6ae1e72fbdcb2fd4
DIST sqlite-src-3330000.zip 12591089 BLAKE2B 14888bca229683e97c4666f8efb535be5bd3e322de0089f0175ba15e038016be3a3cc00b5bfa8c111538116914cf6d8439839ca5d1e20339b184e547ddf260a4 SHA512 3260e3e03ee2f6a4ff2bc4ea4bada5a1497afeca33878c155a8005824970c6c1eb8a2db58eb3023cab084af475fadb81d1c3c9892ae92c07f884881e6602e173
+DIST sqlite-src-3340000.zip 12623425 BLAKE2B 548293cf0166407727cd068804eb5e1ce62f654533c88a87b71a6ff62da37eb2af21b89b8d63ee677777ca917e0d685ddcf9b8d5c3c8b2a2b787d71da8e5a161 SHA512 520fbca59da02452e2861a140bde891aedfc8254eafaa6894e8d845369d60d6a921595a411efb2611c0f7b0cadd69a713dcdaaeaad1e4254e9fd9a6efde07f91
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch
new file mode 100644
index 00000000000..762f1359b9f
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch
@@ -0,0 +1,375 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
+
+--- /ext/misc/amatch.c
++++ /ext/misc/amatch.c
+@@ -1480,9 +1480,18 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
++int sqlite3AmatchInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
++#endif /* SQLITE_OMIT_VIRTUALTABLE */
++ return rc;
++}
++
+ /*
+ ** Register the amatch virtual table
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -1491,11 +1500,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Not used */
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+- rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
+-#endif /* SQLITE_OMIT_VIRTUALTABLE */
+- return rc;
++ return sqlite3AmatchInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/carray.c
++++ /ext/misc/carray.c
+@@ -498,16 +498,8 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_carray_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3CarrayInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
+ #ifdef SQLITE_TEST
+@@ -519,3 +511,18 @@
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_carray_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CarrayInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/completion.c
++++ /ext/misc/completion.c
+@@ -483,12 +483,13 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ int sqlite3_completion_init(
+- sqlite3 *db,
+- char **pzErrMsg,
++ sqlite3 *db,
++ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+ int rc = SQLITE_OK;
+@@ -499,3 +500,4 @@
+ #endif
+ return rc;
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/csv.c
++++ /ext/misc/csv.c
+@@ -928,6 +928,22 @@
+ #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
+
+
++int sqlite3CsvInit(sqlite3 *db){
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ int rc;
++ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
++#ifdef SQLITE_TEST
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
++ }
++#endif
++ return rc;
++#else
++ return SQLITE_OK;
++#endif
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -941,17 +957,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+- int rc;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
+-#ifdef SQLITE_TEST
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
+- }
+-#endif
+- return rc;
+-#else
+- return SQLITE_OK;
+-#endif
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CsvInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/dbdata.c
++++ /ext/misc/dbdata.c
+@@ -803,7 +803,7 @@
+ /*
+ ** Invoke this routine to register the "sqlite_dbdata" virtual table module
+ */
+-static int sqlite3DbdataRegister(sqlite3 *db){
++int sqlite3DbdataRegister(sqlite3 *db){
+ static sqlite3_module dbdata_module = {
+ 0, /* iVersion */
+ 0, /* xCreate */
+@@ -838,6 +838,7 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -849,3 +850,4 @@
+ SQLITE_EXTENSION_INIT2(pApi);
+ return sqlite3DbdataRegister(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/decimal.c
++++ /ext/misc/decimal.c
+@@ -590,14 +590,7 @@
+ decimal_free(pB);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_decimal_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3DecimalInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+ static const struct {
+ const char *zFuncName;
+@@ -611,10 +604,6 @@
+ { "decimal_mul", 2, decimalMulFunc },
+ };
+ unsigned int i;
+- (void)pzErrMsg; /* Unused parameter */
+-
+- SQLITE_EXTENSION_INIT2(pApi);
+-
+ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+ rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
+ SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+@@ -632,3 +621,20 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_decimal_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ (void)pzErrMsg; /* Unused parameter */
++
++ SQLITE_EXTENSION_INIT2(pApi);
++
++ return sqlite3DecimalInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/eval.c
++++ /ext/misc/eval.c
+@@ -102,6 +102,20 @@
+ }
+
+
++int sqlite3EvalInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "eval", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "eval", 2,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -110,16 +124,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "eval", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "eval", 2,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3EvalInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/fileio.c
++++ /ext/misc/fileio.c
+@@ -340,7 +340,7 @@
+ ** This function does the work for the writefile() UDF. Refer to
+ ** header comments at the top of this file for details.
+ */
+-static int writeFile(
++static int writeFileContents(
+ sqlite3_context *pCtx, /* Context to return bytes written in */
+ const char *zFile, /* File to write */
+ sqlite3_value *pData, /* Data to write */
+@@ -480,10 +480,10 @@
+ mtime = sqlite3_value_int64(argv[3]);
+ }
+
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ if( res==1 && errno==ENOENT ){
+ if( makeDirectory(zFile)==SQLITE_OK ){
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ }
+ }
+
+@@ -970,18 +970,9 @@
+ # define fsdirRegister(x) SQLITE_OK
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_fileio_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3FileioInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "readfile", 1,
++ rc = sqlite3_create_function(db, "readfile", 1,
+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+ readfileFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+@@ -998,3 +989,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_fileio_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3FileioInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/ieee754.c
++++ /ext/misc/ieee754.c
+@@ -245,14 +245,7 @@
+ }
+
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_ieee_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3IeeeInit(sqlite3 *db){
+ static const struct {
+ char *zFName;
+ int nArg;
+@@ -269,13 +262,26 @@
+ };
+ unsigned int i;
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+- rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
++ rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
+ SQLITE_UTF8|SQLITE_INNOCUOUS,
+ (void*)&aFunc[i].iAux,
+ aFunc[i].xFunc, 0, 0);
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_ieee_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3IeeeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch
new file mode 100644
index 00000000000..7fb5d28e4ba
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch
@@ -0,0 +1,500 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
+
+--- /ext/misc/nextchar.c
++++ /ext/misc/nextchar.c
+@@ -286,17 +286,8 @@
+ sqlite3_free(c.aResult);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_nextchar_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3NextcharInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "next_char", 3,
+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+ nextCharFunc, 0, 0);
+@@ -312,3 +303,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_nextchar_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3NextcharInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/percentile.c
++++ /ext/misc/percentile.c
+@@ -202,6 +202,15 @@
+ }
+
+
++int sqlite3PercentileInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "percentile", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ 0, percentStep, percentFinal);
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -210,11 +219,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "percentile", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- 0, percentStep, percentFinal);
+- return rc;
++ return sqlite3PercentileInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/regexp.c
++++ /ext/misc/regexp.c
+@@ -740,10 +740,18 @@
+ }
+ }
+
++int sqlite3RegexpInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
++ 0, re_sql_func, 0, 0);
++ return rc;
++}
++
+ /*
+ ** Invoke this routine to register the regexp() function with the
+ ** SQLite database connection.
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -752,9 +760,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
+- 0, re_sql_func, 0, 0);
+- return rc;
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3RegexpInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/series.c
++++ /ext/misc/series.c
+@@ -413,6 +413,15 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
++int sqlite3SeriesInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
++#endif
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -421,7 +430,6 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ if( sqlite3_libversion_number()<3008012 ){
+@@ -429,7 +437,7 @@
+ "generate_series() requires SQLite 3.8.12 or later");
+ return SQLITE_ERROR;
+ }
+- rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
+ #endif
+- return rc;
++ return sqlite3SeriesInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sha1.c
++++ /ext/misc/sha1.c
+@@ -175,7 +175,7 @@
+ }
+
+ /* Compute a string using sqlite3_vsnprintf() and hash it */
+-static void hash_step_vformat(
++static void sha1_hash_step_vformat(
+ SHA1Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -306,7 +306,7 @@
+ nCol = sqlite3_column_count(pStmt);
+ z = sqlite3_sql(pStmt);
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha1_hash_step_vformat(&cx,"S%d:",n);
+ hash_step(&cx,(unsigned char*)z,n);
+
+ /* Compute a hash over the result of the query */
+@@ -349,14 +349,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha1_hash_step_vformat(&cx,"T%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha1_hash_step_vformat(&cx,"B%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+@@ -370,6 +370,20 @@
+ }
+
+
++int sqlite3ShaInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sha1", 1,
++ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
++ 0, sha1Func, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sha1_query", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sha1QueryFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -378,16 +392,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sha1", 1,
+- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+- 0, sha1Func, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sha1_query", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sha1QueryFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3ShaInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/shathree.c
++++ /ext/misc/shathree.c
+@@ -527,7 +527,7 @@
+ /* Compute a string using sqlite3_vsnprintf() with a maximum length
+ ** of 50 bytes and add it to the hash.
+ */
+-static void hash_step_vformat(
++static void sha3_hash_step_vformat(
+ SHA3Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -622,7 +622,7 @@
+ nCol = sqlite3_column_count(pStmt);
+ z = sqlite3_sql(pStmt);
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha3_hash_step_vformat(&cx,"S%d:",n);
+ SHA3Update(&cx,(unsigned char*)z,n);
+
+ /* Compute a hash over the result of the query */
+@@ -665,14 +665,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha3_hash_step_vformat(&cx,"T%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha3_hash_step_vformat(&cx,"B%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+@@ -685,17 +685,8 @@
+ }
+
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_shathree_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3ShathreeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "sha3", 1,
+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+ 0, sha3Func, 0, 0);
+@@ -716,3 +707,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_shathree_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3ShathreeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -101,6 +103,20 @@
+ }
+
+
++int sqlite3SqlarInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sqlar_compress", 1,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarCompressFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarUncompressFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -109,16 +125,10 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sqlar_compress", 1,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarCompressFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarUncompressFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3SqlarInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/totype.c
++++ /ext/misc/totype.c
+@@ -491,17 +491,8 @@
+ #pragma warning(default: 4748)
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_totype_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3TotypeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "tointeger", 1,
+ SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
+ tointegerFunc, 0, 0);
+@@ -512,3 +503,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_totype_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3TotypeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uint.c
++++ /ext/misc/uint.c
+@@ -78,6 +78,11 @@
+ return (nKey1 - i) - (nKey2 - j);
+ }
+
++int sqlite3UintInit(sqlite3 *db){
++ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -88,5 +93,6 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
++ return sqlite3UintInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uuid.c
++++ /ext/misc/uuid.c
+@@ -206,21 +206,12 @@
+ sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_uuid_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3UuidInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+ sqlite3UuidFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "uuid_str", 1,
++ rc = sqlite3_create_function(db, "uuid_str", 1,
+ SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+ 0, sqlite3UuidStrFunc, 0, 0);
+ }
+@@ -231,3 +222,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_uuid_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3UuidInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2139,7 +2141,7 @@
+ /*
+ ** Register the "zipfile" virtual table.
+ */
+-static int zipfileRegister(sqlite3 *db){
++int sqlite3ZipfileInit(sqlite3 *db){
+ static sqlite3_module zipfileModule = {
+ 1, /* iVersion */
+ zipfileConnect, /* xCreate */
+@@ -2173,9 +2175,10 @@
+ return rc;
+ }
+ #else /* SQLITE_OMIT_VIRTUALTABLE */
+-# define zipfileRegister(x) SQLITE_OK
++# define sqlite3ZipfileInit(x) SQLITE_OK
+ #endif
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -2186,5 +2189,8 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return zipfileRegister(db);
++ return sqlite3ZipfileInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch
new file mode 100644
index 00000000000..16210a6bddc
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch
@@ -0,0 +1,291 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Update list of optionally available functions.
+Fix building with dlopen() not available.
+
+SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -313,6 +313,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -365,8 +368,29 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/amatch.c \
++ $(TOP)/ext/misc/appendvfs.c \
++ $(TOP)/ext/misc/carray.c \
++ $(TOP)/ext/misc/completion.c \
++ $(TOP)/ext/misc/csv.c \
++ $(TOP)/ext/misc/dbdata.c \
++ $(TOP)/ext/misc/decimal.c \
++ $(TOP)/ext/misc/eval.c \
++ $(TOP)/ext/misc/fileio.c \
++ $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/nextchar.c \
++ $(TOP)/ext/misc/percentile.c \
++ $(TOP)/ext/misc/regexp.c \
++ $(TOP)/ext/misc/series.c \
++ $(TOP)/ext/misc/sha1.c \
++ $(TOP)/ext/misc/shathree.c \
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/totype.c \
++ $(TOP)/ext/misc/uint.c \
++ $(TOP)/ext/misc/uuid.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -437,35 +461,21 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+- $(TOP)/ext/misc/amatch.c \
+- $(TOP)/ext/misc/carray.c \
+ $(TOP)/ext/misc/cksumvfs.c \
+ $(TOP)/ext/misc/closure.c \
+- $(TOP)/ext/misc/csv.c \
+- $(TOP)/ext/misc/decimal.c \
+- $(TOP)/ext/misc/eval.c \
+ $(TOP)/ext/misc/explain.c \
+- $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/fuzzer.c \
+ $(TOP)/ext/fts5/fts5_tcl.c \
+ $(TOP)/ext/fts5/fts5_test_mi.c \
+ $(TOP)/ext/fts5/fts5_test_tok.c \
+- $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/mmapwarm.c \
+- $(TOP)/ext/misc/nextchar.c \
+ $(TOP)/ext/misc/normalize.c \
+- $(TOP)/ext/misc/percentile.c \
+ $(TOP)/ext/misc/prefixes.c \
+- $(TOP)/ext/misc/regexp.c \
+ $(TOP)/ext/misc/remember.c \
+- $(TOP)/ext/misc/series.c \
+ $(TOP)/ext/misc/spellfix.c \
+- $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+ $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/userauth/userauth.c
+
+ # Source code to the library files needed by the test fixture
+@@ -647,25 +657,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -776,7 +786,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1082,18 +1092,6 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+- $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/decimal.c \
+- $(TOP)/ext/misc/fileio.c \
+- $(TOP)/ext/misc/ieee754.c \
+- $(TOP)/ext/misc/series.c \
+- $(TOP)/ext/misc/shathree.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/misc/uint.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/misc/memtrace.c \
+ $(TOP)/src/test_windirent.c
+
+@@ -1263,11 +1261,11 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1301,24 +1299,23 @@
+ shelltest: $(TESTPROGS)
+ ./testfixture$(TEXT) $(TOP)/test/permutations.test shell
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1329,36 +1326,36 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
++ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1383,11 +1380,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -108,7 +108,7 @@
+ #########
+ # Figure out whether or not we have these functions
+ #
+-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
++AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
+
+ #########
+ # By default, we use the amalgamation (this may be changed below...)
+@@ -582,6 +582,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch
new file mode 100644
index 00000000000..1aa60a0b162
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch
@@ -0,0 +1,441 @@
+Move some code to libsqlite3.so to avoid duplication.
+Initialize some extensions in libsqlite3.so.
+Update test suite.
+
+SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
+
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/main.c
++++ /src/main.c
+@@ -50,12 +50,36 @@
+ #ifdef SQLITE_ENABLE_FTS5
+ int sqlite3Fts5Init(sqlite3*);
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++int sqlite3DbdataRegister(sqlite3*);
++#endif
+ #ifdef SQLITE_ENABLE_JSON1
+ int sqlite3Json1Init(sqlite3*);
+ #endif
+ #ifdef SQLITE_ENABLE_STMTVTAB
+ int sqlite3StmtVtabInit(sqlite3*);
+ #endif
++int sqlite3AmatchInit(sqlite3*);
++int sqlite3CarrayInit(sqlite3*);
++int sqlite3CompletionVtabInit(sqlite3*);
++int sqlite3CsvInit(sqlite3*);
++int sqlite3DecimalInit(sqlite3*);
++int sqlite3EvalInit(sqlite3*);
++int sqlite3FileioInit(sqlite3*);
++int sqlite3IeeeInit(sqlite3*);
++int sqlite3NextcharInit(sqlite3*);
++int sqlite3PercentileInit(sqlite3*);
++int sqlite3RegexpInit(sqlite3*);
++int sqlite3SeriesInit(sqlite3*);
++int sqlite3ShaInit(sqlite3*);
++int sqlite3ShathreeInit(sqlite3*);
++int sqlite3TotypeInit(sqlite3*);
++int sqlite3UintInit(sqlite3*);
++int sqlite3UuidInit(sqlite3*);
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++int sqlite3ZipfileInit(sqlite3*);
++int sqlite3SqlarInit(sqlite3*);
++#endif
+
+ /*
+ ** An array of pointers to extension initializer functions for
+@@ -83,6 +107,9 @@
+ #ifdef SQLITE_ENABLE_DBPAGE_VTAB
+ sqlite3DbpageRegister,
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++ sqlite3DbdataRegister,
++#endif
+ #ifdef SQLITE_ENABLE_DBSTAT_VTAB
+ sqlite3DbstatRegister,
+ #endif
+@@ -96,6 +123,27 @@
+ #ifdef SQLITE_ENABLE_BYTECODE_VTAB
+ sqlite3VdbeBytecodeVtabInit,
+ #endif
++ sqlite3AmatchInit,
++ sqlite3CarrayInit,
++ sqlite3CompletionVtabInit,
++ sqlite3CsvInit,
++ sqlite3DecimalInit,
++ sqlite3EvalInit,
++ sqlite3FileioInit,
++ sqlite3IeeeInit,
++ sqlite3NextcharInit,
++ sqlite3PercentileInit,
++ sqlite3RegexpInit,
++ sqlite3SeriesInit,
++ sqlite3ShaInit,
++ sqlite3ShathreeInit,
++ sqlite3TotypeInit,
++ sqlite3UintInit,
++ sqlite3UuidInit,
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++ sqlite3ZipfileInit,
++ sqlite3SqlarInit,
++#endif
+ };
+
+ #ifndef SQLITE_AMALGAMATION
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -69,6 +69,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -135,6 +136,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # if SQLITE_OS_WINRT
+@@ -1018,25 +1023,7 @@
+ INCLUDE test_windirent.c
+ #define dirent DIRENT
+ #endif
+-INCLUDE ../ext/misc/shathree.c
+-INCLUDE ../ext/misc/fileio.c
+-INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-INCLUDE ../ext/misc/uint.c
+-INCLUDE ../ext/misc/decimal.c
+-INCLUDE ../ext/misc/ieee754.c
+-INCLUDE ../ext/misc/series.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+-
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-INCLUDE ../ext/misc/dbdata.c
+-#endif
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -4608,20 +4595,6 @@
+ #ifndef SQLITE_OMIT_LOAD_EXTENSION
+ sqlite3_enable_load_extension(p->db, 1);
+ #endif
+- sqlite3_fileio_init(p->db, 0, 0);
+- sqlite3_shathree_init(p->db, 0, 0);
+- sqlite3_completion_init(p->db, 0, 0);
+- sqlite3_uint_init(p->db, 0, 0);
+- sqlite3_decimal_init(p->db, 0, 0);
+- sqlite3_ieee_init(p->db, 0, 0);
+- sqlite3_series_init(p->db, 0, 0);
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+- sqlite3_dbdata_init(p->db, 0, 0);
+-#endif
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_zipfile_init(p->db, 0, 0);
+- sqlite3_sqlar_init(p->db, 0, 0);
+-#endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+ shellAddSchemaName, 0, 0);
+ sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
+@@ -6644,8 +6617,6 @@
+ );
+ goto end_ar_command;
+ }
+- sqlite3_fileio_init(cmd.db, 0, 0);
+- sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+
+@@ -11076,6 +11047,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /src/test_config.c
++++ /src/test_config.c
+@@ -353,6 +353,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_DECLTYPE
+ Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -540,6 +542,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_REINDEX
+ Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -662,6 +666,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_UTF16
+ Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
+ #else
+--- /test/e_expr.test
++++ /test/e_expr.test
+@@ -1079,7 +1079,7 @@
+ #
+ # There is a regexp function if ICU is enabled though.
+ #
+-ifcapable !icu {
++ifcapable !icu&&!regexp {
+ do_catchsql_test e_expr-18.1.1 {
+ SELECT regexp('abc', 'def')
+ } {1 {no such function: regexp}}
+--- /test/icu.test
++++ /test/icu.test
+@@ -41,7 +41,7 @@
+ #
+ test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
+ test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
+- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
++ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
+ test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
+ test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
+
+--- /test/pragma.test
++++ /test/pragma.test
+@@ -1370,17 +1370,62 @@
+ } ;# ifcapable trigger
+
+ ifcapable schema_pragmas {
+- do_test pragma-11.1 {
+- execsql2 {
+- pragma collation_list;
++ ifcapable decimal {
++ ifcapable uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
+ }
+- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
+- do_test pragma-11.2 {
+- db collate New_Collation blah...
+- execsql {
+- pragma collation_list;
++ ifcapable !uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
+ }
+- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ }
++ ifcapable !decimal {
++ ifcapable uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
++ }
++ ifcapable !uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ }
++ }
+ }
+
+ ifcapable schema_pragmas&&tempdb {
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -698,49 +698,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <assert.h>
+-#ifndef OMIT_ZLIB
+-#include "zlib.h"
+-#endif
+-
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+- sqlite3_context *context,
+- int argc,
+- sqlite3_value **argv
+-){
+-#ifdef OMIT_ZLIB
+- sqlite3_result_value(context, argv[0]);
+-#else
+- uLong nData;
+- uLongf sz;
+-
+- assert( argc==2 );
+- sz = sqlite3_value_int(argv[1]);
+-
+- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+- sqlite3_result_value(context, argv[0]);
+- }else{
+- const Bytef *pData= sqlite3_value_blob(argv[0]);
+- Bytef *pOut = sqlite3_malloc(sz);
+- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+- sqlite3_result_error(context, "error in uncompress()", -1);
+- }else{
+- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+- }
+- sqlite3_free(pOut);
+- }
+-#endif
+-}
+-
+
+ /* Run a chunk of SQL. If any errors happen, print an error message
+ ** and exit.
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -129,6 +129,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -416,6 +417,28 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ amatch.c
++ appendvfs.c
++ carray.c
++ completion.c
++ csv.c
++ dbdata.c
++ decimal.c
++ eval.c
++ fileio.c
++ ieee754.c
++ nextchar.c
++ percentile.c
++ regexp.c
++ series.c
++ sha1.c
++ shathree.c
++ sqlar.c
++ sqlite3expert.c
++ totype.c
++ uint.c
++ uuid.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,21 +27,13 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
+- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+-#endif
+
+ return
+ BEGIN_STRING
diff --git a/dev-db/sqlite/sqlite-3.34.0.ebuild b/dev-db/sqlite/sqlite-3.34.0.ebuild
new file mode 100644
index 00000000000..93740884fe5
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.34.0.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+if [[ "${PV}" != "9999" ]]; then
+ SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+ DOC_PV="${SRC_PV}"
+ # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+fi
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip
+ doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )"
+fi
+
+LICENSE="public-domain"
+SLOT="3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+if [[ "${PV}" == "9999" ]]; then
+ PROPERTIES="live"
+fi
+RESTRICT="!test? ( test )"
+
+if [[ "${PV}" == "9999" ]]; then
+ BDEPEND=">=dev-lang/tcl-8.6:0
+ dev-vcs/fossil"
+else
+ BDEPEND="app-arch/unzip
+ >=dev-lang/tcl-8.6:0"
+fi
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+if [[ "${PV}" == "9999" ]]; then
+ S="${WORKDIR}/${PN}"
+else
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+fi
+
+_fossil_fetch() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local repo_uri="${2}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ pushd "${T}/fossil/${repo_id}" > /dev/null || die
+
+ if [[ -n "${EVCS_OFFLINE}" ]]; then
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+ else
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
+ fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
+ einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
+ fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
+ echo
+ fi
+
+ (
+ addwrite "${distdir}"
+ mkdir -p "${distdir}/fossil-src/${repo_id}" || die
+ cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
+ )
+ fi
+
+ popd > /dev/null || die
+}
+
+_fossil_checkout() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local branch_or_commit="${2}"
+ local target_directory="${3}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+
+ if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
+ fi
+
+ mkdir "${target_directory}" || die
+ pushd "${target_directory}" > /dev/null || die
+
+ einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
+ fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
+ echo
+
+ popd > /dev/null || die
+}
+
+fossil_fetch() {
+ local repo_id="${1}"
+ local repo_uri="${2}"
+ local target_directory="${3}"
+
+ local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
+
+ _fossil_fetch "${repo_id}" "${repo_uri}"
+ _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
+}
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
+ if use doc; then
+ fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
+ fi
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/"${PN}-3.34.0-build_{1.1,1.2,2.1,2.2}.patch
+
+ eapply_user
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
+ local options=()
+
+ options+=(
+ --enable-load-extension
+ --enable-threadsafe
+ )
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support bytecode and tables_used virtual tables.
+ # https://sqlite.org/compile.html#enable_bytecode_vtab
+ # https://sqlite.org/bytecodevtab.html
+ append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
+
+ # Support column metadata functions.
+ # https://sqlite.org/compile.html#enable_column_metadata
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ # https://sqlite.org/dbpage.html
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/compile.html#enable_dbstat_vtab
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/compile.html#enable_fts3
+ # https://sqlite.org/compile.html#enable_fts3_parenthesis
+ # https://sqlite.org/compile.html#enable_fts4
+ # https://sqlite.org/compile.html#enable_fts5
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/compile.html#enable_json1
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/compile.html#enable_memsys5
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/compile.html#enable_offset_sql_func
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/compile.html#enable_preupdate_hook
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/compile.html#enable_rbu
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/compile.html#enable_rtree
+ # https://sqlite.org/compile.html#enable_geopoly
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support Session extension.
+ # https://sqlite.org/compile.html#enable_session
+ # https://sqlite.org/sessionintro.html
+ append-cppflags -DSQLITE_ENABLE_SESSION
+
+ # Support scan status functions.
+ # https://sqlite.org/compile.html#enable_stmt_scanstatus
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/compile.html#enable_stmtvtab
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/compile.html#enable_unlock_notify
+ # https://sqlite.org/c3ref/unlock_notify.html
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
+ # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support soundex() function.
+ # https://sqlite.org/compile.html#soundex
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/compile.html#use_uri
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ options+=($(use_enable debug))
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if use readline; then
+ options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/compile.html#secure_delete
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ options+=(--enable-tcl)
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ # sys/mman.h not available in MiNTLib.
+ # https://sqlite.org/compile.html#omit_wal
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+
+ if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
+ emake tclsqlite3.c
+
+ local build_directory="$(pwd)"
+ build_directory="${build_directory##*/}"
+
+ mkdir "${WORKDIR}/${PN}-doc-build" || die
+ pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
+
+ 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
+ rmdir doc/matrix{/*,} || die
+
+ popd > /dev/null || die
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ if [[ "${PV}" == "9999" ]]; then
+ pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
+ else
+ pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
+ fi
+
+ find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
+ if [[ "${PV}" != "9999" ]]; then
+ rm search search.d/admin || die
+ rmdir search.d || die
+ find -name "*~" -delete || die
+ fi
+
+ (
+ docinto html
+ dodoc -r *
+ )
+
+ popd > /dev/null || die
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2020-12-28 0:01 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2020-12-28 0:01 UTC (permalink / raw
To: gentoo-commits
commit: 04746cf32c1cb9e984e6b0a47f85e1008aa62963
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Sun Dec 27 06:00:00 2020 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 00:01:23 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04746cf3
dev-db/sqlite: Delete old version (3.32.3-r1).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 2 -
.../files/sqlite-3.32.1-full_archive-build_1.patch | 670 ---------------------
.../files/sqlite-3.32.1-full_archive-build_2.patch | 640 --------------------
.../sqlite/files/sqlite-3.32.3-backports_1.patch | 361 -----------
.../sqlite/files/sqlite-3.32.3-backports_2.patch | 302 ----------
.../sqlite/files/sqlite-3.32.3-backports_3.patch | 220 -------
dev-db/sqlite/sqlite-3.32.3-r1.ebuild | 339 -----------
7 files changed, 2534 deletions(-)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 87df89ad6bb..b26fd917aad 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,6 +1,4 @@
-DIST sqlite-doc-3320300.zip 9772933 BLAKE2B efd72c18d0398c103e3f9c4cfeb03e7794fd69691b1bcea95b74a0c5d8af22aa13abc84ce8dc5864b5f4cb79be239433933b4daca34d1adfcc6f31ce2cde66bf SHA512 af9dca970b4c03c058d7d1cd55a3d11fa4b112dccac942b8660d82a7e9ba2956963fcb429eedfdc85915637c102e1f904ace98c8e0455c4120422bbd9f2f3cd0
DIST sqlite-doc-3330000.zip 9834159 BLAKE2B f67155a8ce8e46c2fbc0a4e35722d1fcad86e905a15230adc70732cee267b6b2002c7499883b938129aaa908b99634e4214360e9d1dbdae333b09060de24530e SHA512 14a3cccb4ff6af57738990eeadd37a1b827f89c9c1b16201c62ca5bb9301d39223d48677b9c269ce332210e5c9ae3f42aa0f9de7d79b38acb9809c732d038368
DIST sqlite-doc-3340000.zip 10069888 BLAKE2B 343df62bc8b75d57dffe69c779cceb856d9e94a5b2a77c3a972761eedd8b4b0f5f8849102ec271652c3aa4039df75d7f2e503fd04b0547be03e024fdfbd894ac SHA512 1bdf20030e656ec4ce38a264c8ef7a95c9f2731cd7d756a44b35b6c68827e8aba92018007139ee09d1c27b34bcd72bff1a201dc3f30aa13e96120af5d58e835e
-DIST sqlite-src-3320300.zip 12461750 BLAKE2B 59cce74d284191cfc69ac09b6014701ddd2b7b3d7ebaad5da4ad71cc200e70285b3b201ff174819aa8dde5f610589d7947f547450334f0f17149014078316185 SHA512 7e027c7163a760fb9b6dbfd2e4ccffb39d4972280583fb0d7f8390017101dfed3b12a36653b3130a548ae4d04c6abb11c0a1921b6f09c54c6ae1e72fbdcb2fd4
DIST sqlite-src-3330000.zip 12591089 BLAKE2B 14888bca229683e97c4666f8efb535be5bd3e322de0089f0175ba15e038016be3a3cc00b5bfa8c111538116914cf6d8439839ca5d1e20339b184e547ddf260a4 SHA512 3260e3e03ee2f6a4ff2bc4ea4bada5a1497afeca33878c155a8005824970c6c1eb8a2db58eb3023cab084af475fadb81d1c3c9892ae92c07f884881e6602e173
DIST sqlite-src-3340000.zip 12623425 BLAKE2B 548293cf0166407727cd068804eb5e1ce62f654533c88a87b71a6ff62da37eb2af21b89b8d63ee677777ca917e0d685ddcf9b8d5c3c8b2a2b787d71da8e5a161 SHA512 520fbca59da02452e2861a140bde891aedfc8254eafaa6894e8d845369d60d6a921595a411efb2611c0f7b0cadd69a713dcdaaeaad1e4254e9fd9a6efde07f91
diff --git a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch b/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
deleted file mode 100644
index aec90e4c07a..00000000000
--- a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_1.patch
+++ /dev/null
@@ -1,670 +0,0 @@
-Add initialization functions for internal usage in libsqlite3.so.
-
---- /ext/misc/carray.c
-+++ /ext/misc/carray.c
-@@ -383,16 +383,8 @@
-
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_carray_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3CarrayInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
- #ifndef SQLITE_OMIT_VIRTUALTABLE
- rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
- #ifdef SQLITE_TEST
-@@ -404,3 +396,18 @@
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_carray_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3CarrayInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/completion.c
-+++ /ext/misc/completion.c
-@@ -483,12 +483,13 @@
- return rc;
- }
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
- int sqlite3_completion_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-+ sqlite3 *db,
-+ char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
- int rc = SQLITE_OK;
-@@ -499,3 +500,4 @@
- #endif
- return rc;
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/csv.c
-+++ /ext/misc/csv.c
-@@ -928,6 +928,22 @@
- #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
-
-
-+int sqlite3CsvInit(sqlite3 *db){
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+ int rc;
-+ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
-+#ifdef SQLITE_TEST
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-+ }
-+#endif
-+ return rc;
-+#else
-+ return SQLITE_OK;
-+#endif
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -941,17 +957,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
--#ifndef SQLITE_OMIT_VIRTUALTABLE
-- int rc;
- SQLITE_EXTENSION_INIT2(pApi);
-- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
--#ifdef SQLITE_TEST
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-- }
--#endif
-- return rc;
--#else
-- return SQLITE_OK;
--#endif
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3CsvInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/dbdata.c
-+++ /ext/misc/dbdata.c
-@@ -803,7 +803,7 @@
- /*
- ** Invoke this routine to register the "sqlite_dbdata" virtual table module
- */
--static int sqlite3DbdataRegister(sqlite3 *db){
-+int sqlite3DbdataRegister(sqlite3 *db){
- static sqlite3_module dbdata_module = {
- 0, /* iVersion */
- 0, /* xCreate */
-@@ -838,6 +838,7 @@
- return rc;
- }
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -849,3 +850,4 @@
- SQLITE_EXTENSION_INIT2(pApi);
- return sqlite3DbdataRegister(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/eval.c
-+++ /ext/misc/eval.c
-@@ -102,6 +102,20 @@
- }
-
-
-+int sqlite3EvalInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "eval", 1,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sqlEvalFunc, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "eval", 2,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sqlEvalFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -110,16 +124,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "eval", 1,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sqlEvalFunc, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "eval", 2,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sqlEvalFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3EvalInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/fileio.c
-+++ /ext/misc/fileio.c
-@@ -340,7 +340,7 @@
- ** This function does the work for the writefile() UDF. Refer to
- ** header comments at the top of this file for details.
- */
--static int writeFile(
-+static int writeFileContents(
- sqlite3_context *pCtx, /* Context to return bytes written in */
- const char *zFile, /* File to write */
- sqlite3_value *pData, /* Data to write */
-@@ -480,10 +480,10 @@
- mtime = sqlite3_value_int64(argv[3]);
- }
-
-- res = writeFile(context, zFile, argv[1], mode, mtime);
-+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
- if( res==1 && errno==ENOENT ){
- if( makeDirectory(zFile)==SQLITE_OK ){
-- res = writeFile(context, zFile, argv[1], mode, mtime);
-+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
- }
- }
-
-@@ -970,18 +970,9 @@
- # define fsdirRegister(x) SQLITE_OK
- #endif
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_fileio_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3FileioInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "readfile", 1,
-+ rc = sqlite3_create_function(db, "readfile", 1,
- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
- readfileFunc, 0, 0);
- if( rc==SQLITE_OK ){
-@@ -998,3 +989,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_fileio_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3FileioInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/ieee754.c
-+++ /ext/misc/ieee754.c
-@@ -110,6 +110,20 @@
- }
-
-
-+int sqlite3IeeeInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "ieee754", 1,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ ieee754func, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "ieee754", 2,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ ieee754func, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -118,16 +132,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "ieee754", 1,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- ieee754func, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "ieee754", 2,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- ieee754func, 0, 0);
-- }
-- return rc;
-+ return sqlite3IeeeInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/regexp.c
-+++ /ext/misc/regexp.c
-@@ -740,10 +740,18 @@
- }
- }
-
-+int sqlite3RegexpInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
-+ 0, re_sql_func, 0, 0);
-+ return rc;
-+}
-+
- /*
- ** Invoke this routine to register the regexp() function with the
- ** SQLite database connection.
- */
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -752,9 +760,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
-- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
-- 0, re_sql_func, 0, 0);
-- return rc;
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3RegexpInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/sha1.c
-+++ /ext/misc/sha1.c
-@@ -175,7 +175,7 @@
- }
-
- /* Compute a string using sqlite3_vsnprintf() and hash it */
--static void hash_step_vformat(
-+static void sha1_hash_step_vformat(
- SHA1Context *p, /* Add content to this context */
- const char *zFormat,
- ...
-@@ -306,7 +306,7 @@
- nCol = sqlite3_column_count(pStmt);
- z = sqlite3_sql(pStmt);
- n = (int)strlen(z);
-- hash_step_vformat(&cx,"S%d:",n);
-+ sha1_hash_step_vformat(&cx,"S%d:",n);
- hash_step(&cx,(unsigned char*)z,n);
-
- /* Compute a hash over the result of the query */
-@@ -349,14 +349,14 @@
- case SQLITE_TEXT: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_text(pStmt, i);
-- hash_step_vformat(&cx,"T%d:",n2);
-+ sha1_hash_step_vformat(&cx,"T%d:",n2);
- hash_step(&cx, z2, n2);
- break;
- }
- case SQLITE_BLOB: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
-- hash_step_vformat(&cx,"B%d:",n2);
-+ sha1_hash_step_vformat(&cx,"B%d:",n2);
- hash_step(&cx, z2, n2);
- break;
- }
-@@ -370,6 +370,20 @@
- }
-
-
-+int sqlite3ShaInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "sha1", 1,
-+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
-+ 0, sha1Func, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "sha1_query", 1,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sha1QueryFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -378,16 +392,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "sha1", 1,
-- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
-- 0, sha1Func, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "sha1_query", 1,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sha1QueryFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3ShaInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/shathree.c
-+++ /ext/misc/shathree.c
-@@ -527,7 +527,7 @@
- /* Compute a string using sqlite3_vsnprintf() with a maximum length
- ** of 50 bytes and add it to the hash.
- */
--static void hash_step_vformat(
-+static void sha3_hash_step_vformat(
- SHA3Context *p, /* Add content to this context */
- const char *zFormat,
- ...
-@@ -622,7 +622,7 @@
- nCol = sqlite3_column_count(pStmt);
- z = sqlite3_sql(pStmt);
- n = (int)strlen(z);
-- hash_step_vformat(&cx,"S%d:",n);
-+ sha3_hash_step_vformat(&cx,"S%d:",n);
- SHA3Update(&cx,(unsigned char*)z,n);
-
- /* Compute a hash over the result of the query */
-@@ -665,14 +665,14 @@
- case SQLITE_TEXT: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_text(pStmt, i);
-- hash_step_vformat(&cx,"T%d:",n2);
-+ sha3_hash_step_vformat(&cx,"T%d:",n2);
- SHA3Update(&cx, z2, n2);
- break;
- }
- case SQLITE_BLOB: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
-- hash_step_vformat(&cx,"B%d:",n2);
-+ sha3_hash_step_vformat(&cx,"B%d:",n2);
- SHA3Update(&cx, z2, n2);
- break;
- }
-@@ -685,17 +685,8 @@
- }
-
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_shathree_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3ShathreeInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "sha3", 1,
- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
- 0, sha3Func, 0, 0);
-@@ -716,3 +707,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_shathree_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3ShathreeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/sqlar.c
-+++ /ext/misc/sqlar.c
-@@ -14,6 +14,8 @@
- ** for working with sqlar archives and used by the shell tool's built-in
- ** sqlar support.
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <zlib.h>
-@@ -101,6 +103,20 @@
- }
-
-
-+int sqlite3SqlarInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "sqlar_compress", 1,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ sqlarCompressFunc, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ sqlarUncompressFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -109,16 +125,10 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "sqlar_compress", 1,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- sqlarCompressFunc, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- sqlarUncompressFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3SqlarInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
-+
-+#endif /* SQLITE_HAVE_ZLIB */
---- /ext/misc/totype.c
-+++ /ext/misc/totype.c
-@@ -491,17 +491,8 @@
- #pragma warning(default: 4748)
- #endif
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_totype_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3TotypeInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "tointeger", 1,
- SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
- tointegerFunc, 0, 0);
-@@ -512,3 +503,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_totype_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3TotypeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/uint.c
-+++ /ext/misc/uint.c
-@@ -78,6 +78,11 @@
- return (nKey1 - i) - (nKey2 - j);
- }
-
-+int sqlite3UintInit(sqlite3 *db){
-+ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -88,5 +93,6 @@
- ){
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
-+ return sqlite3UintInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/uuid.c
-+++ /ext/misc/uuid.c
-@@ -206,21 +206,12 @@
- sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
- }
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_uuid_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3UuidInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
- sqlite3UuidFunc, 0, 0);
- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "uuid_str", 1,
-+ rc = sqlite3_create_function(db, "uuid_str", 1,
- SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
- 0, sqlite3UuidStrFunc, 0, 0);
- }
-@@ -231,3 +222,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_uuid_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3UuidInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/zipfile.c
-+++ /ext/misc/zipfile.c
-@@ -24,6 +24,8 @@
- ** * No support for zip64 extensions
- ** * Only the "inflate/deflate" (zlib) compression method is supported
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <stdio.h>
-@@ -2137,7 +2139,7 @@
- /*
- ** Register the "zipfile" virtual table.
- */
--static int zipfileRegister(sqlite3 *db){
-+int sqlite3ZipfileInit(sqlite3 *db){
- static sqlite3_module zipfileModule = {
- 1, /* iVersion */
- zipfileConnect, /* xCreate */
-@@ -2171,9 +2173,10 @@
- return rc;
- }
- #else /* SQLITE_OMIT_VIRTUALTABLE */
--# define zipfileRegister(x) SQLITE_OK
-+# define sqlite3ZipfileInit(x) SQLITE_OK
- #endif
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -2184,5 +2187,8 @@
- ){
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- return zipfileRegister(db);
-+ return sqlite3ZipfileInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
-+
-+#endif /* SQLITE_HAVE_ZLIB */
diff --git a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch b/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch
deleted file mode 100644
index f12c0b22a48..00000000000
--- a/dev-db/sqlite/files/sqlite-3.32.1-full_archive-build_2.patch
+++ /dev/null
@@ -1,640 +0,0 @@
-Enable some extensions in libsqlite3.so.
-Move some code to libsqlite3.so to avoid duplication.
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Fix building with dlopen() not available.
-
---- /Makefile.in
-+++ /Makefile.in
-@@ -313,6 +313,9 @@
- # Source code for extensions
- #
- SRC += \
-+ $(TOP)/ext/expert/sqlite3expert.c \
-+ $(TOP)/ext/expert/sqlite3expert.h
-+SRC += \
- $(TOP)/ext/fts1/fts1.c \
- $(TOP)/ext/fts1/fts1.h \
- $(TOP)/ext/fts1/fts1_hash.c \
-@@ -365,8 +368,24 @@
- $(TOP)/ext/rbu/sqlite3rbu.h \
- $(TOP)/ext/rbu/sqlite3rbu.c
- SRC += \
-+ $(TOP)/ext/misc/appendvfs.c \
-+ $(TOP)/ext/misc/carray.c \
-+ $(TOP)/ext/misc/completion.c \
-+ $(TOP)/ext/misc/csv.c \
-+ $(TOP)/ext/misc/dbdata.c \
-+ $(TOP)/ext/misc/eval.c \
-+ $(TOP)/ext/misc/fileio.c \
-+ $(TOP)/ext/misc/ieee754.c \
- $(TOP)/ext/misc/json1.c \
-- $(TOP)/ext/misc/stmt.c
-+ $(TOP)/ext/misc/regexp.c \
-+ $(TOP)/ext/misc/sha1.c \
-+ $(TOP)/ext/misc/shathree.c \
-+ $(TOP)/ext/misc/sqlar.c \
-+ $(TOP)/ext/misc/stmt.c \
-+ $(TOP)/ext/misc/totype.c \
-+ $(TOP)/ext/misc/uint.c \
-+ $(TOP)/ext/misc/uuid.c \
-+ $(TOP)/ext/misc/zipfile.c
-
- # Generated source code files
- #
-@@ -437,33 +456,24 @@
- # Statically linked extensions
- #
- TESTSRC += \
-- $(TOP)/ext/expert/sqlite3expert.c \
- $(TOP)/ext/expert/test_expert.c \
- $(TOP)/ext/misc/amatch.c \
-- $(TOP)/ext/misc/carray.c \
- $(TOP)/ext/misc/closure.c \
-- $(TOP)/ext/misc/csv.c \
-- $(TOP)/ext/misc/eval.c \
- $(TOP)/ext/misc/explain.c \
-- $(TOP)/ext/misc/fileio.c \
- $(TOP)/ext/misc/fuzzer.c \
- $(TOP)/ext/fts5/fts5_tcl.c \
- $(TOP)/ext/fts5/fts5_test_mi.c \
- $(TOP)/ext/fts5/fts5_test_tok.c \
-- $(TOP)/ext/misc/ieee754.c \
- $(TOP)/ext/misc/mmapwarm.c \
- $(TOP)/ext/misc/nextchar.c \
- $(TOP)/ext/misc/normalize.c \
- $(TOP)/ext/misc/percentile.c \
- $(TOP)/ext/misc/prefixes.c \
-- $(TOP)/ext/misc/regexp.c \
- $(TOP)/ext/misc/remember.c \
- $(TOP)/ext/misc/series.c \
- $(TOP)/ext/misc/spellfix.c \
-- $(TOP)/ext/misc/totype.c \
- $(TOP)/ext/misc/unionvtab.c \
- $(TOP)/ext/misc/wholenumber.c \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/userauth/userauth.c
-
- # Source code to the library files needed by the test fixture
-@@ -645,25 +655,25 @@
-
- libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
-- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- -rpath "$(TCLLIBDIR)" \
- -version-info "8:6:8" \
- -avoid-version
-
--sqlite3$(TEXE): shell.c sqlite3.c
-- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
-- shell.c sqlite3.c \
-- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE): shell.c libsqlite3.la
-+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
-+ shell.c libsqlite3.la \
-+ $(LIBREADLINE)
-
--sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
-
--dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
-
--scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
- $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
-- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/scrub.c libsqlite3.la
-
- srcck1$(BEXE): $(TOP)/tool/srcck1.c
- $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -774,7 +784,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo: sqlite3.c
-- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
-
- # Rules to build the LEMON compiler generator
- #
-@@ -1074,15 +1084,6 @@
- # Source files that go into making shell.c
- SHELL_SRC = \
- $(TOP)/src/shell.c.in \
-- $(TOP)/ext/misc/appendvfs.c \
-- $(TOP)/ext/misc/shathree.c \
-- $(TOP)/ext/misc/fileio.c \
-- $(TOP)/ext/misc/completion.c \
-- $(TOP)/ext/misc/sqlar.c \
-- $(TOP)/ext/misc/uint.c \
-- $(TOP)/ext/expert/sqlite3expert.c \
-- $(TOP)/ext/expert/sqlite3expert.h \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/misc/memtrace.c \
- $(TOP)/src/test_windirent.c
-
-@@ -1251,11 +1252,11 @@
-
- # Fuzz testing
- fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- ./fuzzcheck$(TEXE) $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
- ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
- valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- # The veryquick.test TCL tests.
-@@ -1286,24 +1287,23 @@
- smoketest: $(TESTPROGS) fuzzcheck$(TEXE)
- ./testfixture$(TEXE) $(TOP)/test/main.test $(TESTOPTS)
-
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
-+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
-
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
-- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
-+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
-
--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
-+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
-
--sqltclsh$(TEXE): sqltclsh.c
-- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
-+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
-+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
-
--sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
-- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
-+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
-+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
-
- CHECKER_DEPS =\
- $(TOP)/tool/mkccode.tcl \
-- sqlite3.c \
- $(TOP)/src/tclsqlite.c \
- $(TOP)/ext/repair/sqlite3_checker.tcl \
- $(TOP)/ext/repair/checkindex.c \
-@@ -1314,36 +1314,36 @@
- sqlite3_checker.c: $(CHECKER_DEPS)
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
-
--sqlite3_checker$(TEXE): sqlite3_checker.c
-- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
-+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
-
--dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
-+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
- $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
-- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
-
--dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
-+dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-+ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
-
--showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
-
--showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
-
--showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE): $(TOP)/tool/showjournal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
-
--showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE): $(TOP)/tool/showwal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
-
- showshm$(TEXE): $(TOP)/tool/showshm.c
- $(LTLINK) -o $@ $(TOP)/tool/showshm.c
-
--index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
-- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
-+index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
-
--changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
-
- changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
- $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
-@@ -1368,11 +1368,11 @@
- kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
- $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
-
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
-- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
-+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
-
--loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
-+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
-
- # This target will fail if the SQLite amalgamation contains any exported
- # symbols that do not begin with "sqlite3_". It is run as part of the
---- /configure.ac
-+++ /configure.ac
-@@ -587,6 +587,9 @@
- if test "${enable_load_extension}" = "yes" ; then
- OPT_FEATURE_FLAGS=""
- AC_SEARCH_LIBS(dlopen, dl)
-+ if test "${ac_cv_search_dlopen}" = "no" ; then
-+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+ fi
- else
- OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
---- /ext/repair/sqlite3_checker.c.in
-+++ /ext/repair/sqlite3_checker.c.in
-@@ -2,6 +2,7 @@
- ** Read an SQLite database file and analyze its space utilization. Generate
- ** text on standard output.
- */
-+#define SQLITE_CORE 1
- #define TCLSH_INIT_PROC sqlite3_checker_init_proc
- #define SQLITE_ENABLE_DBPAGE_VTAB 1
- #define SQLITE_ENABLE_JSON1 1
-@@ -14,7 +15,7 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- INCLUDE $ROOT/ext/misc/btreeinfo.c
- INCLUDE $ROOT/ext/repair/checkindex.c
---- /src/main.c
-+++ /src/main.c
-@@ -50,12 +50,31 @@
- #ifdef SQLITE_ENABLE_FTS5
- int sqlite3Fts5Init(sqlite3*);
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+int sqlite3DbdataRegister(sqlite3*);
-+#endif
- #ifdef SQLITE_ENABLE_JSON1
- int sqlite3Json1Init(sqlite3*);
- #endif
- #ifdef SQLITE_ENABLE_STMTVTAB
- int sqlite3StmtVtabInit(sqlite3*);
- #endif
-+int sqlite3CarrayInit(sqlite3*);
-+int sqlite3CompletionVtabInit(sqlite3*);
-+int sqlite3CsvInit(sqlite3*);
-+int sqlite3EvalInit(sqlite3*);
-+int sqlite3FileioInit(sqlite3*);
-+int sqlite3IeeeInit(sqlite3*);
-+int sqlite3RegexpInit(sqlite3*);
-+int sqlite3ShaInit(sqlite3*);
-+int sqlite3ShathreeInit(sqlite3*);
-+int sqlite3TotypeInit(sqlite3*);
-+int sqlite3UintInit(sqlite3*);
-+int sqlite3UuidInit(sqlite3*);
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+int sqlite3ZipfileInit(sqlite3*);
-+int sqlite3SqlarInit(sqlite3*);
-+#endif
-
- /*
- ** An array of pointers to extension initializer functions for
-@@ -83,6 +102,9 @@
- #ifdef SQLITE_ENABLE_DBPAGE_VTAB
- sqlite3DbpageRegister,
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+ sqlite3DbdataRegister,
-+#endif
- #ifdef SQLITE_ENABLE_DBSTAT_VTAB
- sqlite3DbstatRegister,
- #endif
-@@ -96,6 +118,22 @@
- #ifdef SQLITE_ENABLE_BYTECODE_VTAB
- sqlite3VdbeBytecodeVtabInit,
- #endif
-+ sqlite3CarrayInit,
-+ sqlite3CompletionVtabInit,
-+ sqlite3CsvInit,
-+ sqlite3EvalInit,
-+ sqlite3FileioInit,
-+ sqlite3IeeeInit,
-+ sqlite3RegexpInit,
-+ sqlite3ShaInit,
-+ sqlite3ShathreeInit,
-+ sqlite3TotypeInit,
-+ sqlite3UintInit,
-+ sqlite3UuidInit,
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+ sqlite3ZipfileInit,
-+ sqlite3SqlarInit,
-+#endif
- };
-
- #ifndef SQLITE_AMALGAMATION
---- /src/shell.c.in
-+++ /src/shell.c.in
-@@ -69,6 +69,7 @@
- #include <stdio.h>
- #include <assert.h>
- #include "sqlite3.h"
-+#include "ext/expert/sqlite3expert.h"
- typedef sqlite3_int64 i64;
- typedef sqlite3_uint64 u64;
- typedef unsigned char u8;
-@@ -135,6 +136,10 @@
- # define SHELL_USE_LOCAL_GETLINE 1
- #endif
-
-+#ifdef SQLITE_HAVE_ZLIB
-+#include <zlib.h>
-+#endif
-+
-
- #if defined(_WIN32) || defined(WIN32)
- # if SQLITE_OS_WINRT
-@@ -1005,22 +1010,7 @@
- INCLUDE test_windirent.c
- #define dirent DIRENT
- #endif
--INCLUDE ../ext/misc/shathree.c
--INCLUDE ../ext/misc/fileio.c
--INCLUDE ../ext/misc/completion.c
--INCLUDE ../ext/misc/appendvfs.c
- INCLUDE ../ext/misc/memtrace.c
--INCLUDE ../ext/misc/uint.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE ../ext/misc/zipfile.c
--INCLUDE ../ext/misc/sqlar.c
--#endif
--INCLUDE ../ext/expert/sqlite3expert.h
--INCLUDE ../ext/expert/sqlite3expert.c
--
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
--INCLUDE ../ext/misc/dbdata.c
--#endif
-
- #if defined(SQLITE_ENABLE_SESSION)
- /*
-@@ -4261,17 +4251,6 @@
- #ifndef SQLITE_OMIT_LOAD_EXTENSION
- sqlite3_enable_load_extension(p->db, 1);
- #endif
-- sqlite3_fileio_init(p->db, 0, 0);
-- sqlite3_shathree_init(p->db, 0, 0);
-- sqlite3_completion_init(p->db, 0, 0);
-- sqlite3_uint_init(p->db, 0, 0);
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-- sqlite3_dbdata_init(p->db, 0, 0);
--#endif
--#ifdef SQLITE_HAVE_ZLIB
-- sqlite3_zipfile_init(p->db, 0, 0);
-- sqlite3_sqlar_init(p->db, 0, 0);
--#endif
- sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
- shellAddSchemaName, 0, 0);
- sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
-@@ -6281,8 +6260,6 @@
- );
- goto end_ar_command;
- }
-- sqlite3_fileio_init(cmd.db, 0, 0);
-- sqlite3_sqlar_init(cmd.db, 0, 0);
- sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
- shellPutsFunc, 0, 0);
-
-@@ -10621,6 +10598,7 @@
- #endif
- }
- data.out = stdout;
-+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
-
- /* Go ahead and open the database file if it already exists. If the
---- /src/test_config.c
-+++ /src/test_config.c
-@@ -540,6 +540,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_REINDEX
- Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
- #else
-@@ -662,6 +664,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_UTF16
- Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
- #else
---- /test/e_expr.test
-+++ /test/e_expr.test
-@@ -1078,7 +1078,7 @@
- #
- # There is a regexp function if ICU is enabled though.
- #
--ifcapable !icu {
-+ifcapable !icu&&!regexp {
- do_catchsql_test e_expr-18.1.1 {
- SELECT regexp('abc', 'def')
- } {1 {no such function: regexp}}
---- /test/icu.test
-+++ /test/icu.test
-@@ -41,7 +41,7 @@
- #
- test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
- test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
-- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
-+ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
- test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
- test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
-
---- /test/pragma.test
-+++ /test/pragma.test
-@@ -1360,17 +1360,32 @@
- } ;# ifcapable trigger
-
- ifcapable schema_pragmas {
-- do_test pragma-11.1 {
-- execsql2 {
-- pragma collation_list;
-- }
-- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
-- do_test pragma-11.2 {
-- db collate New_Collation blah...
-- execsql {
-- pragma collation_list;
-- }
-- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+ ifcapable uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
-+ }
-+ ifcapable !uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+ }
- }
-
- ifcapable schema_pragmas&&tempdb {
---- /test/sessionfuzz.c
-+++ /test/sessionfuzz.c
-@@ -700,42 +700,6 @@
- #include <assert.h>
- #include "zlib.h"
-
--/*
--** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
--**
--** Parameter SZ is interpreted as an integer. If it is less than or
--** equal to zero, then this function returns a copy of X. Or, if
--** SZ is equal to the size of X when interpreted as a blob, also
--** return a copy of X. Otherwise, decompress blob X using zlib
--** utility function uncompress() and return the results (another
--** blob).
--*/
--static void sqlarUncompressFunc(
-- sqlite3_context *context,
-- int argc,
-- sqlite3_value **argv
--){
-- uLong nData;
-- uLongf sz;
--
-- assert( argc==2 );
-- sz = sqlite3_value_int(argv[1]);
--
-- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
-- sqlite3_result_value(context, argv[0]);
-- }else{
-- const Bytef *pData= sqlite3_value_blob(argv[0]);
-- Bytef *pOut = sqlite3_malloc(sz);
-- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
-- sqlite3_result_error(context, "error in uncompress()", -1);
-- }else{
-- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
-- }
-- sqlite3_free(pOut);
-- }
--}
--
--
- /* Run a chunk of SQL. If any errors happen, print an error message
- ** and exit.
- */
---- /tool/mksqlite3c.tcl
-+++ /tool/mksqlite3c.tcl
-@@ -117,6 +117,7 @@
- rtree.h
- sqlite3session.h
- sqlite3.h
-+ sqlite3expert.h
- sqlite3ext.h
- sqlite3rbu.h
- sqliteicu.h
-@@ -404,6 +405,23 @@
- sqlite3session.c
- fts5.c
- stmt.c
-+ appendvfs.c
-+ carray.c
-+ completion.c
-+ csv.c
-+ dbdata.c
-+ eval.c
-+ fileio.c
-+ ieee754.c
-+ regexp.c
-+ sha1.c
-+ shathree.c
-+ sqlar.c
-+ sqlite3expert.c
-+ totype.c
-+ uint.c
-+ uuid.c
-+ zipfile.c
- } {
- copy_file tsrc/$file
- }
---- /tool/sqlite3_analyzer.c.in
-+++ /tool/sqlite3_analyzer.c.in
-@@ -14,9 +14,6 @@
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
- #define SQLITE_OMIT_LOAD_EXTENSION 1
--#ifndef USE_EXTERNAL_SQLITE
--INCLUDE sqlite3.c
--#endif
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
---- /tool/sqltclsh.c.in
-+++ /tool/sqltclsh.c.in
-@@ -27,21 +27,13 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
--INCLUDE $ROOT/ext/misc/appendvfs.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE $ROOT/ext/misc/zipfile.c
--INCLUDE $ROOT/ext/misc/sqlar.c
--#endif
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
- (void)interp;
-+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
--#ifdef SQLITE_HAVE_ZLIB
-- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
-- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
--#endif
-
- return
- BEGIN_STRING
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-backports_1.patch b/dev-db/sqlite/files/sqlite-3.32.3-backports_1.patch
deleted file mode 100644
index 256d18ee76f..00000000000
--- a/dev-db/sqlite/files/sqlite-3.32.3-backports_1.patch
+++ /dev/null
@@ -1,361 +0,0 @@
-https://sqlite.org/src/info/d48af4d2cfff3d5f
-https://sqlite.org/src/info/cc888878ea8d5bc7
-https://sqlite.org/src/info/be545f85a6ef09cc
-https://sqlite.org/src/info/6e0ffa2053124168
-https://sqlite.org/src/info/4d0cfb1236884349
-https://sqlite.org/src/info/ccff8cb8267d4c56
-https://sqlite.org/src/info/5124732370fd53c9
-
---- /ext/fts3/fts3.c
-+++ /ext/fts3/fts3.c
-@@ -2068,7 +2068,7 @@
- sqlite3_int64 *piPrev, /* IN/OUT: Previous value written to list */
- sqlite3_int64 iVal /* Write this value to the list */
- ){
-- assert( iVal-*piPrev > 0 || (*piPrev==0 && iVal==0) );
-+ assert_fts3_nc( iVal-*piPrev > 0 || (*piPrev==0 && iVal==0) );
- *pp += sqlite3Fts3PutVarint(*pp, iVal-*piPrev);
- *piPrev = iVal;
- }
-@@ -5208,10 +5208,12 @@
- );
- if( res ){
- nNew = (int)(pOut - pPhrase->doclist.pList) - 1;
-- assert( pPhrase->doclist.pList[nNew]=='\0' );
-- assert( nNew<=pPhrase->doclist.nList && nNew>0 );
-- memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
-- pPhrase->doclist.nList = nNew;
-+ if( nNew>=0 ){
-+ assert( pPhrase->doclist.pList[nNew]=='\0' );
-+ assert( nNew<=pPhrase->doclist.nList && nNew>0 );
-+ memset(&pPhrase->doclist.pList[nNew], 0, pPhrase->doclist.nList - nNew);
-+ pPhrase->doclist.nList = nNew;
-+ }
- *paPoslist = pPhrase->doclist.pList;
- *pnToken = pPhrase->nToken;
- }
-@@ -5563,7 +5565,10 @@
- }else
- #endif
- {
-- bHit = (pExpr->bEof==0 && pExpr->iDocid==pCsr->iPrevId);
-+ bHit = (
-+ pExpr->bEof==0 && pExpr->iDocid==pCsr->iPrevId
-+ && pExpr->pPhrase->doclist.nList>0
-+ );
- }
- break;
- }
---- /ext/fts3/fts3_write.c
-+++ /ext/fts3/fts3_write.c
-@@ -341,7 +341,9 @@
- ** created by merging the oldest :2 segments from absolute level :1. See
- ** function sqlite3Fts3Incrmerge() for details. */
- /* 29 */ "SELECT 2 * total(1 + leaves_end_block - start_block) "
-- " FROM %Q.'%q_segdir' WHERE level = ? AND idx < ?",
-+ " FROM (SELECT * FROM %Q.'%q_segdir' "
-+ " WHERE level = ? ORDER BY idx ASC LIMIT ?"
-+ " )",
-
- /* SQL_DELETE_SEGDIR_ENTRY
- ** Delete the %_segdir entry on absolute level :1 with index :2. */
-@@ -2853,6 +2855,19 @@
- return SQLITE_OK;
- }
-
-+static int fts3GrowSegReaderBuffer(Fts3MultiSegReader *pCsr, int nReq){
-+ if( nReq>pCsr->nBuffer ){
-+ char *aNew;
-+ pCsr->nBuffer = nReq*2;
-+ aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
-+ if( !aNew ){
-+ return SQLITE_NOMEM;
-+ }
-+ pCsr->aBuffer = aNew;
-+ }
-+ return SQLITE_OK;
-+}
-+
-
- int sqlite3Fts3SegReaderStep(
- Fts3Table *p, /* Virtual table handle */
-@@ -2987,15 +3002,9 @@
- }
-
- nByte = sqlite3Fts3VarintLen(iDelta) + (isRequirePos?nList+1:0);
-- if( nDoclist+nByte>pCsr->nBuffer ){
-- char *aNew;
-- pCsr->nBuffer = (nDoclist+nByte)*2;
-- aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
-- if( !aNew ){
-- return SQLITE_NOMEM;
-- }
-- pCsr->aBuffer = aNew;
-- }
-+
-+ rc = fts3GrowSegReaderBuffer(pCsr, nByte+nDoclist);
-+ if( rc ) return rc;
-
- if( isFirst ){
- char *a = &pCsr->aBuffer[nDoclist];
-@@ -3020,6 +3029,9 @@
- fts3SegReaderSort(apSegment, nMerge, j, xCmp);
- }
- if( nDoclist>0 ){
-+ rc = fts3GrowSegReaderBuffer(pCsr, nDoclist+FTS3_NODE_PADDING);
-+ if( rc ) return rc;
-+ memset(&pCsr->aBuffer[nDoclist], 0, FTS3_NODE_PADDING);
- pCsr->aDoclist = pCsr->aBuffer;
- pCsr->nDoclist = nDoclist;
- rc = SQLITE_ROW;
-@@ -4288,7 +4300,7 @@
- int i;
- int nHeight = (int)aRoot[0];
- NodeWriter *pNode;
-- if( nHeight<1 || nHeight>FTS_MAX_APPENDABLE_HEIGHT ){
-+ if( nHeight<1 || nHeight>=FTS_MAX_APPENDABLE_HEIGHT ){
- sqlite3_reset(pSelect);
- return FTS_CORRUPT_VTAB;
- }
---- /src/expr.c
-+++ /src/expr.c
-@@ -4272,7 +4272,9 @@
- int nCol;
- testcase( op==TK_EXISTS );
- testcase( op==TK_SELECT );
-- if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
-+ if( pParse->db->mallocFailed ){
-+ return 0;
-+ }else if( op==TK_SELECT && (nCol = pExpr->x.pSelect->pEList->nExpr)!=1 ){
- sqlite3SubselectError(pParse, nCol, 1);
- }else{
- return sqlite3CodeSubselect(pParse, pExpr);
---- /test/fts3corrupt4.test
-+++ /test/fts3corrupt4.test
-@@ -6123,4 +6123,163 @@
- SELECT offsets(t1) FROM t1 WHERE t1 MATCH 'rtree ner "json1^enable"';
- }
-
-+#-------------------------------------------------------------------------
-+do_execsql_test 42.1 {
-+ CREATE VIRTUAL TABLE f USING fts3(a, b);
-+}
-+do_execsql_test 42.2 {
-+ INSERT INTO f_segdir VALUES(0,2,1111,0,0,X'00');
-+ INSERT INTO f_segdir VALUES(0,3,0 ,0,0,X'00013003010200');
-+}
-+do_execsql_test 42.3 {
-+ INSERT INTO f(f) VALUES ('merge=107,2');
-+}
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+set saved $sqlite_fts3_enable_parentheses
-+set sqlite_fts3_enable_parentheses 1
-+do_execsql_test 43.1 {
-+ CREATE VIRTUAL TABLE def USING fts3(xyz);
-+ INSERT INTO def_segdir VALUES(0,0,0,0,0, X'0001310301c9000103323334050d81');
-+} {}
-+
-+do_execsql_test 43.2 {
-+ SELECT rowid FROM def WHERE def MATCH '1 NEAR 1'
-+} {1}
-+
-+set sqlite_fts3_enable_parentheses $saved
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+do_execsql_test 44.1 {
-+ CREATE VIRTUAL TABLE t0 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
-+ INSERT INTO t0_content VALUES(0,NULL,NULL,NULL,NULL);
-+ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'00013103010200010332333405010201ba00000461616161050101020200000462626262050101030200');
-+}
-+
-+do_execsql_test 44.2 {
-+ SELECT matchinfo(t0, t0) IS NULL FROM t0 WHERE t0 MATCH '1*'
-+} {0}
-+
-+#-------------------------------------------------------------------------
-+#
-+reset_db
-+do_test 45.0 {
-+ sqlite3 db {}
-+ db deserialize [decode_hexdb {
-+.open --hexdb
-+| size 24576 pagesize 4096 filename crash-65c98512cc9e49.db
-+| page 1 offset 0
-+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
-+| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 06 .....@ ........
-+| 96: 00 00 00 00 0d 0e fc 00 06 0d bc 00 0f ca 0f 6c ...............l
-+| 112: 0f 04 0e 13 0e c9 0d bc 00 00 00 00 00 00 00 00 ................
-+| 3504: 00 00 00 00 00 00 00 00 00 00 00 00 55 06 07 17 ............U...
-+| 3520: 1b 1b 01 81 01 74 61 62 6c 65 78 31 5f 73 74 61 .....tablex1_sta
-+| 3536: 74 78 31 5f 73 74 61 74 06 43 52 45 41 54 45 20 tx1_stat.CREATE
-+| 3552: 54 41 42 4c 45 20 27 78 31 5f 73 74 61 74 27 28 TABLE 'x1_stat'(
-+| 3568: 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 id INTEGER PRIMA
-+| 3584: 52 59 20 4b 45 59 2c 20 76 61 6c 75 65 20 42 4c RY KEY, value BL
-+| 3600: 41 82 29 81 33 04 07 17 1f 1f 01 82 35 74 61 62 A.).3.......5tab
-+| 3616: 6c 65 78 31 5f 73 65 67 64 69 72 78 31 5f 73 65 lex1_segdirx1_se
-+| 3632: 67 64 69 72 04 43 52 45 41 54 45 20 54 41 42 4c gdir.CREATE TABL
-+| 3648: 45 20 27 78 31 5f 73 65 67 64 69 72 27 28 6c 65 E 'x1_segdir'(le
-+| 3664: 76 65 6c 20 49 4e 54 45 47 45 52 2c 69 64 78 20 vel INTEGER,idx
-+| 3680: 49 4e 54 45 47 45 52 2c 73 74 61 72 74 5f 62 6c INTEGER,start_bl
-+| 3696: 6f 63 6b 20 49 4e 54 45 47 45 52 2c 6c 65 61 76 ock INTEGER,leav
-+| 3712: 65 73 5f 65 6e 64 5f 62 6c 6f 63 6b 20 49 4e 54 es_end_block INT
-+| 3728: 45 47 45 52 2c 65 6e 64 5f 62 6c 6f 63 6b 20 49 EGER,end_block I
-+| 3744: 4e 54 45 47 45 52 2c 72 6f 6f 74 20 42 4c 4f 42 NTEGER,root BLOB
-+| 3760: 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 6c 65 76 ,PRIMARY KEY(lev
-+| 3776: 65 6c 2c 20 69 64 78 29 29 31 05 06 17 45 1f 01 el, idx))1...E..
-+| 3792: 00 69 6e 64 65 78 73 71 6c 69 74 65 5f 61 75 74 .indexsqlite_aut
-+| 3808: 6f 69 6e 64 65 78 5f 78 31 5f 73 65 67 64 69 72 oindex_x1_segdir
-+| 3824: 5f 31 78 31 5f 73 65 67 64 69 72 05 00 00 00 08 _1x1_segdir.....
-+| 3840: 60 00 00 00 66 03 07 17 23 23 01 81 13 74 61 62 `...f...##...tab
-+| 3856: 6c 65 78 31 5f 73 65 67 6d 65 6e 74 73 78 31 5f lex1_segmentsx1_
-+| 3872: 73 65 67 6d 65 6e 74 73 03 43 52 45 41 54 45 20 segments.CREATE
-+| 3888: 54 41 42 4c 45 20 27 78 31 5f 73 65 67 6d 65 6e TABLE 'x1_segmen
-+| 3904: 74 73 27 28 62 6c 6f 63 6b 69 64 20 49 4e 54 45 ts'(blockid INTE
-+| 3920: 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c GER PRIMARY KEY,
-+| 3936: 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 5c 02 07 17 block BLOB)....
-+| 3952: 21 21 01 81 03 74 61 62 6c 65 78 31 5f 63 6f 6e !!...tablex1_con
-+| 3968: 74 65 6e 74 78 31 5f 63 6f 6e 74 65 6e 74 02 43 tentx1_content.C
-+| 3984: 52 45 41 54 45 20 54 41 42 4c 45 20 27 78 31 5f REATE TABLE 'x1_
-+| 4000: 63 6f 6e 74 65 6e 74 27 28 64 6f 63 69 64 20 49 content'(docid I
-+| 4016: 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b NTEGER PRIMARY K
-+| 4032: 45 59 2c 20 27 63 30 78 27 29 34 01 06 17 11 11 EY, 'c0x')4.....
-+| 4048: 08 57 74 61 62 6c 65 78 31 78 31 43 52 45 41 54 .Wtablex1x1CREAT
-+| 4064: 45 20 56 49 52 54 55 41 4c 20 54 41 42 4c 45 20 E VIRTUAL TABLE
-+| 4080: 78 31 20 55 53 49 4e 47 20 66 74 73 33 28 78 29 x1 USING fts3(x)
-+| page 2 offset 4096
-+| 0: 0d 00 00 00 11 0f 77 f0 0f f8 0f f0 0f e8 0f e0 ......w.........
-+| 16: 0f d8 0f d0 0f c8 0f c0 00 00 00 00 00 00 00 00 ................
-+| 3952: 00 00 00 00 00 00 00 00 06 11 03 00 13 77 78 79 .............wxy
-+| 3968: 06 10 03 00 13 74 75 76 06 0f 03 00 13 71 33 73 .....tuv.....q3s
-+| 3984: 06 0e 03 00 13 6e 6f 70 06 0d 03 00 13 6b 6c 6d .....nop.....klm
-+| 4000: 06 0c 03 04 c3 68 69 6a 06 0b 03 00 13 65 66 67 .....hij.....efg
-+| 4016: 06 0a 03 00 13 62 63 64 06 09 03 00 13 79 7a 61 .....bcd.....yza
-+| 4032: 06 08 03 00 13 76 77 78 06 07 03 00 13 73 74 75 .....vwx.....stu
-+| 4048: 06 06 03 00 13 70 71 72 06 05 03 00 13 6d 6e 6f .....pqr.....mno
-+| 4064: 06 03 03 00 13 6a 6b 6c 06 03 03 00 13 67 68 69 .....jkl.....ghi
-+| 4080: 06 02 02 00 03 64 65 66 06 01 03 00 13 61 52 63 .....def.....aRc
-+| page 3 offset 8192
-+| 0: 0d 00 00 00 03 0f a7 00 0f b5 0f a7 0f fa 01 00 ................
-+| 4000: 00 00 00 00 00 00 00 0c 02 03 00 1e 00 03 6b 6c ..............kl
-+| 4016: 6d 03 0d 02 00 43 01 04 00 81 0a 00 03 61 62 63 m....C.......abc
-+| 4032: 03 0b 32 00 00 03 62 63 64 03 0a 02 00 00 03 64 ..2...bcd......d
-+| 4048: 69 26 03 02 02 00 00 03 65 66 67 03 0b 02 00 00 i&......efg.....
-+| 4064: 03 67 68 69 03 03 02 00 00 03 68 69 6a 03 0c 02 .ghi......hij...
-+| 4080: 00 00 03 6a 6a 2c 03 04 02 00 03 81 00 03 00 00 ...jj,..........
-+| page 4 offset 12288
-+| 0: 0d 0f 3a 00 05 0f 25 00 0f 9e 0f 88 0f 43 0f 25 ..:...%......C.%
-+| 16: 0f 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 .r..............
-+| 3856: 00 00 00 00 00 00 00 00 00 56 01 08 08 13 1e 03 .........V......
-+| 3872: 30 20 39 00 03 13 05 07 08 08 18 08 13 1e 30 20 0 9...........0
-+| 3888: 39 00 03 77 78 79 03 11 02 00 0f 6c 00 09 01 08 9..wxy.....l....
-+| 3904: 08 15 54 27 04 07 09 01 08 08 15 42 02 30 20 33 ..T'.......B.0 3
-+| 3920: 36 00 03 6e 6f 70 03 0e 02 00 00 03 71 72 73 03 6..nop......qrs.
-+| 3936: 0f 02 00 00 03 74 75 76 03 10 02 00 0f cf b1 06 .....tuv........
-+| 3952: 01 08 14 06 07 01 08 09 01 1b 14 02 02 31 32 38 .............128
-+| 3968: 20 2d 37 32 10 01 01 6b 14 03 07 09 09 08 08 15 -72...k........
-+| 3984: 1e 30 20 33 36 00 03 79 7a 61 03 09 02 00 2f 02 .0 36..yza..../.
-+| 4000: 07 09 08 08 08 15 54 30 20 33 36 00 03 6d 6e 6f ......T0 36..mno
-+| 4016: 03 05 02 00 00 03 70 71 72 03 06 02 00 00 03 73 ......pqr......s
-+| 4032: 74 75 03 07 02 00 00 03 76 77 78 03 08 02 00 00 tu......vwx.....
-+| 4048: 00 00 4a 08 08 08 15 54 30 20 33 36 00 03 61 62 ..J....T0 36..ab
-+| 4064: 63 03 01 02 00 00 03 64 65 66 03 02 02 00 00 03 c......def......
-+| 4080: 67 68 69 03 03 67 00 00 03 6a 6b 6c 03 04 02 00 ghi..g...jkl....
-+| page 5 offset 16384
-+| 0: 0a 0f e7 00 05 0f da 00 0f e1 0f fa 0f f4 0f ed ................
-+| 16: 0f da 0f 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-+| 4048: 00 00 00 00 00 00 00 1a 01 03 06 04 01 08 01 02 ................
-+| 4064: 06 05 04 08 08 01 05 00 00 00 06 01 03 06 04 09 ................
-+| 4080: 02 01 02 04 05 04 09 09 01 03 05 04 09 08 01 02 ................
-+| page 6 offset 20480
-+| 0: 0d 00 10 00 01 0f f9 00 0f f9 00 00 00 00 00 00 ................
-+| 4080: 00 00 00 00 00 00 00 00 00 05 01 03 00 10 01 03 ................
-+| end crash-65c98512cc9e49.db
-+}]} {}
-+
-+do_catchsql_test 45.2 {
-+ INSERT INTO x1(x1) VALUES( 'merge=1' )
-+} {1 {database disk image is malformed}}
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+set saved $sqlite_fts3_enable_parentheses
-+set sqlite_fts3_enable_parentheses 1
-+do_execsql_test 46.1 {
-+ CREATE VIRTUAL TABLE t0 USING fts3(a INTEGER PRIMARY KEY,b,c,d);
-+ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'0001310301c9000103323334050d8000f200000461616161050101020200000462626262050101030200');
-+} {}
-+
-+do_catchsql_test 46.2 {
-+ SELECT * FROM t0
-+ WHERE t0 MATCH x'2b0a312b0a312a312a2a0b5d0a0b0b0a312a0a0b0b0a312a0b310a392a0b0a27312a2a0b5d0a312a0b310a31315d0b310a312a316d2a0b313b15bceaa50a312a0b0a27312a2a0b5d0a312a0b310a312b0b2a310a312a0b2a0b2a0b2e5d0a0bff313336e34a2a312a0b0a3c310b0a0b4b4b0b4b2a4bec40322b2a0b310a0a312a0a0a0a0a0a0a0a0a0b310a312a2a2a0b5d0a0b0b0a312a0b310a312a0b0a4e4541530b310a5df5ced70a0a0a0a0a4f520a0a0a0a0a0a0a312a0b0a4e4541520b310a5d616161610a0a0a0a4f520a0a0a0a0a0a312b0a312a312a0a0a0a0a0a0a004a0b0a310b220a0b0a310a4a22310a0b0a7e6fe0e0e030e0e0e0e0e01176e02000e0e0e0e0e01131320226310a0b0a310a4a22310a0b0a310a766f8b8b4ee0e0300ae0090909090909090909090909090909090909090909090909090909090909090947aaaa540b09090909090909090909090909090909090909090909090909090909090909fae0e0f2f22164e0e0f273e07fefefef7d6dfafafafa6d6d6d6d';
-+} {1 {database disk image is malformed}}
-+
-+set sqlite_fts3_enable_parentheses $saved
-+
- finish_test
---- /test/fts3corrupt6.test
-+++ /test/fts3corrupt6.test
-@@ -0,0 +1,60 @@
-+# 2020 June 8
-+#
-+# The author disclaims copyright to this source code. In place of
-+# a legal notice, here is a blessing:
-+#
-+# May you do good and not evil.
-+# May you find forgiveness for yourself and forgive others.
-+# May you share freely, never taking more than you give.
-+#
-+#*************************************************************************
-+# This file implements regression tests for SQLite library. The
-+# focus of this script is testing the FTS3 module.
-+#
-+# $Id: fts3aa.test,v 1.1 2007/08/20 17:38:42 shess Exp $
-+#
-+
-+set testdir [file dirname $argv0]
-+source $testdir/tester.tcl
-+source $testdir/fts3_common.tcl
-+set testprefix fts3corrupt6
-+
-+# If SQLITE_ENABLE_FTS3 is defined, omit this file.
-+ifcapable !fts3 {
-+ finish_test
-+ return
-+}
-+
-+set ::saved_sqlite_fts3_enable_parentheses $::sqlite_fts3_enable_parentheses
-+set sqlite_fts3_enable_parentheses 1
-+sqlite3_fts3_may_be_corrupt 1
-+database_may_be_corrupt
-+
-+do_execsql_test 1.0 {
-+ BEGIN TRANSACTION;
-+ CREATE TABLE t_content(col0 INTEGER);
-+ PRAGMA writable_schema=ON;
-+ CREATE VIRTUAL TABLE t0 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
-+ INSERT INTO t0_content VALUES(0,NULL,NULL,NULL,NULL);
-+ INSERT INTO t0_segdir VALUES(0,0,0,0,'0 42',X'000131030102000103323334050101010200000461616161050101020200000462626262050101030200');
-+ COMMIT;
-+}
-+
-+do_execsql_test 1.1 {
-+ SELECT 0+matchinfo(t0,'yxyyxy') FROM t0 WHERE t0 MATCH CAST( x'2b0a312b0a312a312a2a0b5d0a0b0b0a312a0a0b0b0a312a0b310a392a0b0a27312a2a0b5d0a312a0b310a31315d0b310a312a316d2a0b313b15bceaa50a312a0b0a27312a2a0b5d0a312a0b310a312b0b2a310a312a0b2a0b2a0b2e5d0a0bff313336e34a2a312a0b0a3c310b0a0b4b4b0b4b2a4bec40322b2a0b310a0a312a0a0a0a0a0a0a0a0a0b310a312a2a2a0b5d0a0b0b0a312a0b310a312a0b0a4e4541530b310a5df5ced70a0a0a0a0a4f520a0a0a0a0a0a0a312a0b0a4e4541520b310a5d616161610a0a0a0a4f520a0a0a0a0a0a312b0a312a312a0a0a0a0a0a0a004a0b0a310b220a0b0a310a4a22310a0b0a7e6fe0e0e030e0e0e0e0e01176e02000e0e0e0e0e01131320226310a0b0a310a4a22310a0b0a310a766f8b8b4ee0e0300ae0090909090909090909090909090909090909090909090909090909090909090947aaaa540b09090909090909090909090909090909090909090909090909090909090909fae0e0f2f22164e0e0f273e07fefefef7d6dfafafafa6d6d6d6d' AS TEXT);
-+} {0}
-+
-+do_execsql_test 1.2 {
-+ CREATE VIRTUAL TABLE t1 USING fts3(col0 INTEGER PRIMARY KEY,col1 VARCHAR(8),col2 BINARY,col3 BINARY);
-+ INSERT INTO t1_content VALUES(0,NULL,NULL,NULL,NULL);
-+ INSERT INTO t1_segdir VALUES(0,0,0,0,'0 42',X'000131030102000103323334050101010200000461616161050101020200000462626262050101030200');
-+}
-+
-+do_execsql_test 1.3 {
-+ SELECT 42+matchinfo(t1,'yxyyxy') FROM t1 WHERE t1 MATCH x'2b0a312b0a312a312a2a0b5d0a0b0b0a312a0a0b0b0a312a0b310a392a0b0a27312a2a0b5d0a312a0b310a31315d0b310a312a316d2a0b313b15bceaa50a312a0b0a27312a2a0b5d0a312a0b310a312b0b2a310a312a0b2a0b2a0b2e5d0a0bff313336e34a2a312a0b0a3c310b0a0b4b4b0b4b2a4bec40322b2a0b310a0a312a0a0a0a0a0a0a0a0a0b310a312a2a2a0b5d0a0b0b0a312a0b310a312a0b0a4e4541530b310a5df5ced70a0a0a0a0a4f520a0a0a0a0a0a0a312a0b0a4e4541520b310a5d616161610a0a0a0a4f520a0a0a0a0a0a312b0a312a312a0a0a0a0a0a0a004a0b0a310b220a0b0a310a4a22310a0b0a7e6fe0e0e030e0e0e0e0e01176e02000e0e0e0e0e01131320226310a0b0a310a4a22310a0b0a310a766f8b8b4ee0e0300ae0090909090909090909090909090909090909090909090909090909090909090947aaaa540b09090909090909090909090909090909090909090909090909090909090909fae0e0f2f22164e0e0f273e07fefefef7d6dfafafafa6d6d6d6d';
-+} {42}
-+
-+set sqlite_fts3_enable_parentheses $saved_sqlite_fts3_enable_parentheses
-+finish_test
-+
-+
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-backports_2.patch b/dev-db/sqlite/files/sqlite-3.32.3-backports_2.patch
deleted file mode 100644
index 32b6f9b1624..00000000000
--- a/dev-db/sqlite/files/sqlite-3.32.3-backports_2.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-https://sqlite.org/src/info/30735432bc33cb95
-https://sqlite.org/src/info/1bd18ca35bdbf303
-https://sqlite.org/src/info/49da8bdce17ced91
-https://sqlite.org/src/info/f25a56c26e28abd4
-
---- /ext/fts5/fts5_index.c
-+++ /ext/fts5/fts5_index.c
-@@ -2321,11 +2321,11 @@
- }
-
- search_success:
-- pIter->iLeafOffset = iOff + nNew;
-- if( pIter->iLeafOffset>n || nNew<1 ){
-+ if( (i64)iOff+nNew>n || nNew<1 ){
- p->rc = FTS5_CORRUPT;
- return;
- }
-+ pIter->iLeafOffset = iOff + nNew;
- pIter->iTermLeafOffset = pIter->iLeafOffset;
- pIter->iTermLeafPgno = pIter->iLeafPgno;
-
---- /ext/fts5/test/fts5corrupt3.test
-+++ /ext/fts5/test/fts5corrupt3.test
-@@ -10108,6 +10108,221 @@
- INSERT INTO t1(t1) SELECT x FROM t2;
- } {1 {database disk image is malformed}}
-
-+#-------------------------------------------------------------------------
-+reset_db
-+do_test 69.0 {
-+ sqlite3 db {}
-+ db deserialize [decode_hexdb {
-+.open --hexdb
-+| size 32768 pagesize 4096 filename crash-31c462b8b665d0.db
-+| page 1 offset 0
-+| 0: 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 SQLite format 3.
-+| 16: 10 00 01 01 00 40 20 20 00 00 00 00 00 00 00 08 .....@ ........
-+| 32: 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 ................
-+| 96: 00 00 00 00 0d 0f c7 00 07 0d 92 00 0f 8d 0f 36 ...............6
-+| 112: 0e cb 0e 6b 0e 0e 0d b6 0d 92 00 00 00 00 00 00 ...k............
-+| 3472: 00 00 22 08 06 17 11 11 01 31 74 61 62 6c 65 74 .........1tablet
-+| 3488: 32 74 32 08 43 52 45 41 54 45 20 54 41 42 4c 45 2t2.CREATE TABLE
-+| 3504: 20 74 32 28 78 29 56 07 06 17 1f 1f 01 7d 74 61 t2(x)V.......ta
-+| 3520: 62 6c 65 74 31 5f 63 6f 6e 66 69 67 74 31 5f 63 blet1_configt1_c
-+| 3536: 6f 6e 66 69 67 07 43 52 45 41 54 45 20 54 41 42 onfig.CREATE TAB
-+| 3552: 4c 45 20 27 74 31 5f 63 6f 6e 66 69 67 27 28 6b LE 't1_config'(k
-+| 3568: 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 76 29 PRIMARY KEY, v)
-+| 3584: 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 5b 06 WITHOUT ROWID[.
-+| 3600: 07 17 21 21 01 81 01 74 61 62 6c 65 74 31 5f 64 ..!!...tablet1_d
-+| 3616: 6f 63 73 69 7a 65 74 31 5f 64 6f 63 73 69 7a 65 ocsizet1_docsize
-+| 3632: 06 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 74 .CREATE TABLE 't
-+| 3648: 31 5f 64 6f 63 73 69 7a 65 27 28 69 64 20 49 4e 1_docsize'(id IN
-+| 3664: 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 TEGER PRIMARY KE
-+| 3680: 59 2c 20 73 7a 20 42 4c 4f 42 29 5e 05 07 17 21 Y, sz BLOB)^...!
-+| 3696: 21 01 81 07 74 61 62 6c 65 74 31 5f 63 6f 6e 74 !...tablet1_cont
-+| 3712: 65 6e 74 74 31 5f 63 6f 6e 74 65 6e 74 05 43 52 entt1_content.CR
-+| 3728: 45 41 54 45 20 54 41 42 4c 45 20 27 74 31 5f 63 EATE TABLE 't1_c
-+| 3744: 6f 6e 74 65 6e 74 27 28 69 64 20 49 4e 54 45 47 ontent'(id INTEG
-+| 3760: 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 ER PRIMARY KEY,
-+| 3776: 63 39 2c 20 63 31 2c 20 63 32 29 69 04 07 17 19 c9, c1, c2)i....
-+| 3792: 19 01 81 2d 74 61 62 6c 65 74 31 5f 69 64 78 74 ...-tablet1_idxt
-+| 3808: 31 5f 69 64 78 04 43 52 45 41 54 45 20 54 41 42 1_idx.CREATE TAB
-+| 3824: 4c 45 20 27 74 31 5f 69 64 78 27 28 73 65 67 69 LE 't1_idx'(segi
-+| 3840: 64 2c 20 74 65 72 6d 2c 20 70 67 6e 6f 2c 20 50 d, term, pgno, P
-+| 3856: 52 49 4d 41 52 59 20 4b 45 59 28 73 65 67 69 64 RIMARY KEY(segid
-+| 3872: 2c 20 74 65 72 6d 29 29 20 57 49 54 48 4f 55 54 , term)) WITHOUT
-+| 3888: 20 52 4f 57 49 44 55 03 07 17 1b 1b 01 81 01 74 ROWIDU........t
-+| 3904: 61 62 6c 65 74 31 5f 64 61 74 61 74 31 5f 64 61 ablet1_datat1_da
-+| 3920: 74 61 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 ta.CREATE TABLE
-+| 3936: 27 74 31 5f 64 61 74 61 27 28 69 64 20 49 4e 54 't1_data'(id INT
-+| 3952: 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 EGER PRIMARY KEY
-+| 3968: 2c 20 62 6c 6f 63 6b 20 42 4c 4f 42 29 38 02 06 , block BLOB)8..
-+| 3984: 17 11 11 08 5f 74 61 62 6c 65 74 31 74 31 43 52 ...._tablet1t1CR
-+| 4000: 45 41 54 45 20 56 49 52 54 55 41 4c 20 54 41 42 EATE VIRTUAL TAB
-+| 4016: 4c 45 20 74 31 20 55 53 49 4e 47 20 66 74 73 35 LE t1 USING fts5
-+| 4032: 28 61 2c 62 2c 63 29 00 00 00 00 00 00 00 00 00 (a,b,c).........
-+| page 3 offset 8192
-+| 0: 0d 00 00 00 03 0c 94 00 0f e6 0f ef 0c 94 00 00 ................
-+| 3216: 00 00 00 00 86 4a 84 80 80 80 80 01 04 00 8d 18 .....J..........
-+| 3232: 00 00 03 2b 02 30 30 01 02 06 01 02 06 01 02 06 ...+.00.........
-+| 3248: 1f 02 03 01 02 03 01 02 03 01 08 32 30 31 36 30 ...........20160
-+| 3264: 36 30 39 01 02 07 01 02 07 01 02 07 01 01 34 01 609...........4.
-+| 3280: 02 05 01 02 05 01 02 05 01 01 35 01 02 04 01 02 ..........5.....
-+| 3296: 04 01 02 04 02 07 30 30 30 30 30 30 30 1c 02 04 ......0000000...
-+| 3312: 01 02 04 01 02 04 01 06 62 69 6e 61 72 79 03 06 ........binary..
-+| 3328: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
-+| 3344: 02 02 03 06 00 02 02 03 06 01 02 02 03 06 01 02 ................
-+| 3360: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
-+| 3376: 03 06 01 02 02 03 06 01 02 02 01 08 63 6f 6d 70 ............comp
-+| 3392: 69 6c 65 72 01 02 02 01 02 02 01 02 02 01 06 64 iler...........d
-+| 3408: 62 73 74 61 74 07 02 03 01 02 03 01 02 03 02 04 bstat...........
-+| 3424: 65 62 75 67 04 02 02 01 02 02 01 02 02 01 06 65 ebug...........e
-+| 3440: 6e 61 62 6c 65 07 02 02 01 02 02 01 02 02 01 02 nable...........
-+| 3456: 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 ................
-+| 3472: 01 02 02 01 02 02 01 02 02 01 02 02 01 02 02 01 ................
-+| 3488: 01 02 01 02 02 01 02 02 01 02 02 01 02 02 01 02 ................
-+| 3504: 02 01 02 02 02 08 78 74 65 6e 73 69 6f 6e 1f 02 ......xtension..
-+| 3520: 04 01 02 04 01 02 04 01 04 66 74 73 34 1a 02 03 .........fts4...
-+| 3536: 01 02 03 01 02 03 04 01 35 0d 02 03 01 02 03 01 ........5.......
-+| 3552: 02 03 01 03 67 63 63 01 aa 03 01 02 03 01 02 03 ....gcc.........
-+| 3568: 02 06 65 6f 70 6f 6c 79 10 02 03 02 02 03 01 02 ..eopoly........
-+| 3584: 03 01 05 6a 73 6f 6e 31 13 02 03 01 02 03 01 02 ...json1........
-+| 3600: 03 01 04 6c 6f 61 64 1f 02 03 01 02 03 01 02 03 ...load.........
-+| 3616: 01 03 6d 61 78 1c 02 02 01 02 02 01 02 02 02 05 ..max...........
-+| 3632: 65 6d 6f 72 79 1c 02 03 01 02 03 01 02 03 04 04 emory...........
-+| 3648: 73 79 73 35 16 02 03 01 02 03 01 02 03 01 06 6e sys5...........n
-+| 3664: 6f 63 61 73 65 02 06 01 02 02 03 06 01 02 02 03 ocase...........
-+| 3680: 06 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 ................
-+| 3696: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
-+| 3712: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
-+| 3728: 02 01 04 6f 6d 69 74 1f 02 02 01 02 02 01 02 01 ...omit.........
-+| 3744: ff ff ff ff ff ff ff ff f0 00 00 00 00 00 01 02 ................
-+| 3760: 58 81 96 4d 01 06 01 02 02 03 06 01 02 02 03 06 X..M............
-+| 3776: 01 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 ................
-+| 3792: 02 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 ................
-+| 3808: 02 03 06 01 02 02 03 06 01 02 02 03 06 01 02 02 ................
-+| 3824: 01 0a 74 68 72 65 61 64 73 61 66 65 22 02 02 01 ..threadsafe....
-+| 3840: 02 02 01 02 02 01 04 76 74 61 62 07 02 04 01 02 .......vtab.....
-+| 3856: 04 01 02 04 01 01 78 01 06 01 01 02 01 06 01 01 ......x.........
-+| 3872: 02 01 06 01 1e 02 01 06 01 01 02 01 06 01 01 02 ................
-+| 3888: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
-+| 3904: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
-+| 3920: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
-+| 3936: 00 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
-+| 3952: 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 ................
-+| 3968: 01 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 ................
-+| 3984: 06 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 ................
-+| 4000: 01 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 ................
-+| 4016: 01 02 01 06 01 01 02 01 06 01 01 02 01 06 01 01 ................
-+| 4032: 02 01 06 01 01 02 01 06 01 01 02 04 15 13 0c 0c ................
-+| 4048: 12 44 13 11 0f 47 13 0f 0b 0e 11 10 0f 0e 10 0f .D...G..........
-+| 4064: 44 0f 10 40 15 0f 07 01 03 00 14 24 5a 24 24 0f D..@.......$Z$$.
-+| 4080: 0a 03 00 24 00 00 00 00 01 01 01 00 01 01 01 01 ...$............
-+| page 4 offset 12288
-+| 0: 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-+| 4080: 00 00 00 00 00 00 00 00 00 00 05 04 09 0c 01 02 ................
-+| page 5 offset 16384
-+| 0: 0d 00 00 00 24 0c 0a 00 0f d8 0f af 0f 86 0f 74 ....$..........t
-+| 16: 0f 61 0f 4e 0f 2f 0f 0f 0e ef 0e d7 0e be 0e a5 .a.N./..........
-+| 32: 0e 8d 0e 74 0e 5b 0e 40 0e 24 0e 08 0d ef 0d d5 ...t.[.@.$......
-+| 48: 0d bb 0d a0 0d 84 0d 68 0d 4f 0d 00 00 00 00 00 .......h.O......
-+| 3072: 00 00 00 00 00 00 00 00 00 00 18 24 05 00 25 0f ...........$..%.
-+| 3088: 19 54 48 52 45 41 44 53 41 46 45 3d 30 58 42 49 .THREADSAFE=0XBI
-+| 3104: 4e 41 52 59 18 23 05 00 25 0f 19 54 48 52 45 41 NARY.#..%..THREA
-+| 3120: 44 53 41 46 45 3d 30 58 4e 4f 43 41 53 45 17 22 DSAFE=0XNOCASE..
-+| 3136: 05 00 25 0f 17 54 48 52 45 41 44 53 41 46 45 3d ..%..THREADSAFE=
-+| 3152: 30 58 52 54 52 49 4d 1f 21 05 00 33 0f 19 4f 4d 0XRTRIM.!..3..OM
-+| 3168: 49 54 20 4c 4f 41 44 20 45 58 54 45 4e 53 49 4f IT LOAD EXTENSIO
-+| 3184: 4e 58 42 49 4e 41 52 59 1f 20 05 00 33 d3 19 4f NXBINARY. ..3..O
-+| 3200: 4d 49 54 28 2c 4f 41 44 b2 04 55 85 44 54 e5 34 MIT(,OAD..U.DT.4
-+| 3216: 94 f4 e5 84 e4 f4 34 15 34 51 e1 f0 50 03 30 f1 ......4.4Q..P.0.
-+| 3232: 74 f4 d4 95 42 04 c4 f4 14 42 04 55 85 44 54 e5 t...B....B.U.DT.
-+| 3248: 34 94 f4 e5 85 25 45 24 94 d1 f1 e0 50 03 30 f1 4....%E$....P.0.
-+| 3264: 94 d4 15 82 04 d4 54 d4 f5 25 93 d3 53 03 03 03 ......T..%..S...
-+| 3280: 03 03 03 05 84 24 94 e4 15 25 91 f1 d0 50 03 30 .....$...%...P.0
-+| 3296: f1 94 d4 15 82 04 d4 54 d4 f5 25 93 d3 53 03 03 .......T..%..S..
-+| 3312: 03 03 03 03 05 84 e4 f4 34 15 34 51 e1 c0 50 03 ........4.4Q..P.
-+| 3328: 30 f1 74 d4 15 82 04 d4 54 d4 f5 25 93 d3 53 03 0.t.....T..%..S.
-+| 3344: 03 03 03 03 03 05 85 25 45 24 94 d1 81 b0 50 02 .......%E$....P.
-+| 3360: 50 f1 94 54 e4 14 24 c4 52 05 25 45 24 54 55 84 P..T..$.R.%E$TU.
-+| 3376: 24 94 e4 15 25 91 81 a0 50 02 50 f1 94 54 e4 14 $...%...P.P..T..
-+| 3392: 24 c4 52 05 25 45 24 54 55 84 e4 f4 34 15 34 51 $.R.%E$TU...4.4Q
-+| 3408: 71 90 50 02 50 f1 74 54 e4 14 24 c4 52 05 25 45 q.P.P.tT..$.R.%E
-+| 3424: 24 54 55 85 25 45 24 94 d1 a1 80 50 02 90 f1 94 $TU.%E$....P....
-+| 3440: 54 e4 14 24 c4 52 04 d4 54 d5 35 95 33 55 84 24 T..$.R..T.5.3U.$
-+| 3456: 94 e4 15 25 91 a1 70 50 02 90 f1 94 54 e4 14 24 ...%..pP....T..$
-+| 3472: c4 52 04 d4 54 d5 35 95 33 55 84 e4 f4 34 15 34 .R..T.5.3U...4.4
-+| 3488: 51 91 60 50 02 90 f1 74 54 e4 14 24 c4 52 04 d4 Q.`P...tT..$.R..
-+| 3504: 54 d5 35 95 33 55 85 25 45 24 94 d1 81 50 50 02 T.5.3U.%E$...PP.
-+| 3520: 50 f1 94 54 e4 14 24 c4 52 04 a5 34 f4 e3 15 84 P..T..$.R..4....
-+| 3536: 24 94 e4 15 25 91 81 40 50 02 50 f1 94 54 e4 14 $...%..@P.P..T..
-+| 3552: 24 c4 52 04 a5 34 f4 e3 15 84 e4 f4 34 15 34 51 $.R..4......4.4Q
-+| 3568: 71 30 50 02 4f f1 74 54 e4 14 24 c4 52 04 a5 34 q0P.O.tT..$.R..4
-+| 3584: f4 e3 15 85 25 45 24 94 d1 a1 20 50 02 90 f1 94 ....%E$... P....
-+| 3600: 54 e4 14 24 c4 52 04 74 54 f5 04 f4 c5 95 84 24 T..$.R.tT......$
-+| 3616: 94 e4 15 25 91 a1 10 50 02 90 f1 94 54 e4 14 24 ...%...P....T..$
-+| 3632: c4 52 04 74 54 f5 04 f4 c5 95 84 e4 f4 34 15 34 .R.tT........4.4
-+| 3648: 51 91 00 50 02 90 f1 74 54 e4 14 24 c4 51 f4 74 Q..P...tT..$.Q.t
-+| 3664: 54 f5 04 f4 c5 95 85 25 45 24 94 d1 70 f0 50 02 T......%E$..p.P.
-+| 3680: 30 f1 94 54 e4 14 24 c5 20 46 54 53 35 58 42 49 0..T..$. FTS5XBI
-+| 3696: 4e 41 52 59 17 0e 05 00 23 0f 19 45 4e 41 42 4c NARY....#..ENABL
-+| 3712: 45 20 46 54 53 35 58 4f 4f 43 41 53 45 16 0d 05 E FTS5XOOCASE...
-+| 3728: 00 23 0f 17 45 4e 41 42 4c 45 20 46 54 53 35 58 .#..ENABLE FTS5X
-+| 3744: 52 54 52 49 4d 17 0c 05 00 23 0f 19 45 4e 41 42 RTRIM....#..ENAB
-+| 3760: 4c 45 20 46 54 53 34 58 42 49 4e 41 52 59 97 0b LE FTS4XBINARY..
-+| 3776: 05 00 23 0f 19 45 4e 41 42 4c 45 20 46 54 53 34 ..#..ENABLE FTS4
-+| 3792: 58 4e 4f 43 41 53 45 16 0a 05 00 23 0f 17 45 4e XNOCASE....#..EN
-+| 3808: 41 42 4c 45 20 46 54 53 34 58 52 54 52 49 4d 1e ABLE FTS4XRTRIM.
-+| 3824: 09 05 00 3e 5f 19 45 4e 41 42 4c 45 20 44 42 53 ...>_.ENABLE DBS
-+| 3840: 44 41 54 20 56 54 41 42 58 42 49 4e 41 52 59 1e DAT VTABXBINARY.
-+| 3856: 08 05 00 31 0f 19 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
-+| 3872: 54 41 54 20 56 54 41 42 58 4e 4f 43 4d e3 45 1d TAT VTABXNOCM.E.
-+| 3888: 07 05 00 31 0f 17 45 4e 41 42 4c 45 20 44 42 53 ...1..ENABLE DBS
-+| 3904: 54 41 54 20 56 54 41 42 58 52 54 52 49 4d 11 06 TAT VTABXRTRIM..
-+| 3920: 05 00 17 0f 19 44 45 42 55 47 58 42 49 4e 41 52 .....DEBUGXBINAR
-+| 3936: 59 11 05 05 00 17 0f 19 44 45 42 55 47 58 4e 4f Y.......DEBUGXNO
-+| 3952: 43 41 53 45 10 02 02 50 08 5f 17 44 45 42 55 47 CASE...P._.DEBUG
-+| 3968: 58 52 54 52 49 4d 27 03 05 00 44 0f 19 43 4f 4d XRTRIM'...D..COM
-+| 3984: 50 49 4c 45 52 3d 67 63 63 2d 35 2e 34 2e 30 20 PILER=gcc-5.4.0
-+| 4000: 32 30 31 36 30 36 30 39 58 42 49 4e 41 52 59 27 20160609XBINARY'
-+| 4016: 02 05 00 43 0f 19 43 4f 4d 50 49 4c 45 52 3d 67 ...C..COMPILER=g
-+| 4032: 63 63 2d 35 2e 34 2e 30 20 32 30 31 36 30 36 30 cc-5.4.0 2016060
-+| 4048: 39 58 4e 4f 43 41 53 45 26 01 05 00 43 c9 17 43 9XNOCASE&...C..C
-+| 4064: 4f 4d 50 49 4c 47 02 3d 67 63 63 2d 35 2e 34 2e OMPILG.=gcc-5.4.
-+| 4080: 30 20 32 30 31 36 30 36 30 39 58 52 54 52 49 4d 0 20160609XRTRIM
-+| page 6 offset 20480
-+| 0: 0d 00 00 00 24 0e e0 00 0f f8 0f f0 0f e8 0f e0 ....$...........
-+| 16: 0f d8 0f d0 0f c8 0f c0 0f b8 0f b0 0f a8 0f a0 ................
-+| 32: 0f 98 0f 90 0f 88 0f 80 0f 78 0f 70 0f 68 0f 60 .........x.p.h.`
-+| 48: 0f 58 0f 50 0f 48 0f 40 0f 38 00 00 00 00 00 00 .X.P.H.@.8......
-+| 3808: 06 24 03 00 12 02 01 01 06 23 03 00 12 02 01 01 .$.......#......
-+| 3824: 06 22 03 00 12 02 01 01 06 21 03 00 12 03 01 01 .........!......
-+| 3840: 06 20 03 00 12 03 01 01 06 1f 03 00 12 03 01 01 . ..............
-+| 3856: 06 1e 03 00 12 03 01 01 06 1d 03 00 12 03 01 01 ................
-+| 3872: 06 1c 03 00 12 03 01 01 06 1b 03 00 12 02 01 01 ................
-+| 3888: 06 1a 03 00 12 02 01 01 06 19 03 00 12 02 01 01 ................
-+| 3904: 06 18 03 00 12 02 01 01 06 17 03 00 12 02 01 01 ................
-+| 3920: 06 16 03 00 12 02 01 01 06 15 03 00 12 02 01 01 ................
-+| 3936: 06 14 03 00 12 02 01 01 06 13 03 00 12 02 01 01 ................
-+| 3952: 06 12 03 00 12 02 01 01 06 11 03 00 12 02 01 01 ................
-+| 3968: 06 10 03 00 12 02 01 01 06 1f 03 00 12 02 01 01 ................
-+| 3984: 06 0e 03 00 12 02 01 01 06 0d 03 00 12 02 01 01 ................
-+| 4000: 06 0c 03 00 12 02 01 01 06 0b 03 00 12 02 01 01 ................
-+| 4016: 06 0a 03 00 12 02 01 01 06 09 03 00 12 03 01 01 ................
-+| 4032: 06 08 03 00 12 03 01 01 06 07 03 00 12 03 01 01 ................
-+| 4048: 06 06 03 00 12 01 01 01 06 05 03 00 12 01 01 01 ................
-+| 4064: 06 04 03 00 12 01 01 01 06 03 03 00 12 06 01 01 ................
-+| 4080: 06 02 03 00 12 06 01 01 06 01 03 00 12 06 01 01 ................
-+| page 7 offset 24576
-+| 0: 0a 00 00 00 01 0f f4 00 0f f4 00 00 00 00 00 00 ................
-+| 4080: 00 00 00 00 0b 03 1b 01 76 65 72 73 69 6f 6e 04 ........version.
-+| page 8 offset 28672
-+| 0: 0d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-+| 4048: 00 00 00 00 00 00 11 03 02 2b 69 6e 74 65 67 72 .........+integr
-+| 4064: 69 74 79 2d 63 68 65 63 6b 09 00 00 00 00 00 00 ity-check.......
-+| end crash-31c462b8b665d0.db
-+}]} {}
-+
-+
-+do_catchsql_test 69.2 {
-+ SELECT * FROM t1 WHERE a MATCH 'fx*'
-+} {1 {database disk image is malformed}}
-
- sqlite3_fts5_may_be_corrupt 0
- finish_test
---- /src/btree.c
-+++ /src/btree.c
-@@ -3886,7 +3886,7 @@
- Pgno nFree = get4byte(&pBt->pPage1->aData[36]);
- Pgno nFin = finalDbSize(pBt, nOrig, nFree);
-
-- if( nOrig<nFin ){
-+ if( nOrig<nFin || nFree>=nOrig ){
- rc = SQLITE_CORRUPT_BKPT;
- }else if( nFree>0 ){
- rc = saveAllCursors(pBt, 0, 0);
-@@ -8772,7 +8772,11 @@
- assert( pPage->intKey || pX->nKey>=0 );
- assert( pPage->leaf || !pPage->intKey );
- if( pPage->nFree<0 ){
-- rc = btreeComputeFreeSpace(pPage);
-+ if( pCur->eState>CURSOR_INVALID ){
-+ rc = SQLITE_CORRUPT_BKPT;
-+ }else{
-+ rc = btreeComputeFreeSpace(pPage);
-+ }
- if( rc ) return rc;
- }
-
---- /test/corruptL.test
-+++ /test/corruptL.test
-@@ -1266,5 +1266,30 @@
- do_execsql_test 15.1 {
- UPDATE c1 SET c= NOT EXISTS(SELECT 1 FROM c1 ORDER BY (SELECT 1 FROM c1 ORDER BY a)) +10 WHERE d BETWEEN 4 AND 7;
- } {}
-+
-+#-------------------------------------------------------------------------
-+reset_db
-+do_execsql_test 16.0 {
-+ CREATE TABLE t1(w, x, y, z, UNIQUE(w, x), UNIQUE(y, z));
-+ INSERT INTO t1 VALUES(1, 1, 1, 1);
-+
-+ CREATE TABLE t1idx(x, y, i INTEGER, PRIMARY KEY(x)) WITHOUT ROWID;
-+ INSERT INTO t1idx VALUES(10, NULL, 5);
-+
-+ PRAGMA writable_schema = 1;
-+ UPDATE sqlite_master SET rootpage = (
-+ SELECT rootpage FROM sqlite_master WHERE name='t1idx'
-+ ) WHERE type = 'index';
-+}
-+
-+db close
-+sqlite3 db test.db
-+
-+do_catchsql_test 16.1 {
-+ PRAGMA writable_schema = ON;
-+ INSERT INTO t1(rowid, w, x, y, z) VALUES(5, 10, 11, 10, NULL);
-+} {1 {database disk image is malformed}}
-+
- finish_test
-
-+
diff --git a/dev-db/sqlite/files/sqlite-3.32.3-backports_3.patch b/dev-db/sqlite/files/sqlite-3.32.3-backports_3.patch
deleted file mode 100644
index 07cb5d4a396..00000000000
--- a/dev-db/sqlite/files/sqlite-3.32.3-backports_3.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-https://sqlite.org/src/info/14eed318aa9e6e16
-https://sqlite.org/src/info/9679c0c61131f0e9
-https://sqlite.org/src/info/28515bbbae4fbc26
-https://sqlite.org/src/info/892e9191dc8f8056
-https://sqlite.org/src/info/270ac1a0f232d755
-
---- /ext/fts3/fts3.c
-+++ /ext/fts3/fts3.c
-@@ -5831,7 +5831,8 @@
- fts3EvalRestart(pCsr, pRoot, &rc);
- do {
- fts3EvalNextRow(pCsr, pRoot, &rc);
-- assert( pRoot->bEof==0 );
-+ assert_fts3_nc( pRoot->bEof==0 );
-+ if( pRoot->bEof ) rc = FTS_CORRUPT_VTAB;
- }while( pRoot->iDocid!=iDocid && rc==SQLITE_OK );
- }
- }
---- /ext/misc/appendvfs.c
-+++ /ext/misc/appendvfs.c
-@@ -439,7 +439,7 @@
- p = (ApndFile*)pFile;
- memset(p, 0, sizeof(*p));
- pSubFile = ORIGFILE(pFile);
-- p->base.pMethods = &apnd_io_methods;
-+ pFile->pMethods = &apnd_io_methods;
- rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
- if( rc ) goto apnd_open_done;
- rc = pSubFile->pMethods->xFileSize(pSubFile, &sz);
---- /ext/misc/cksumvfs.c
-+++ /ext/misc/cksumvfs.c
-@@ -634,7 +634,7 @@
- p = (CksmFile*)pFile;
- memset(p, 0, sizeof(*p));
- pSubFile = ORIGFILE(pFile);
-- p->base.pMethods = &cksm_io_methods;
-+ pFile->pMethods = &cksm_io_methods;
- rc = pSubVfs->xOpen(pSubVfs, zName, pSubFile, flags, pOutFlags);
- if( rc ) goto cksm_open_done;
- if( flags & SQLITE_OPEN_WAL ){
---- /src/date.c
-+++ /src/date.c
-@@ -1112,8 +1112,8 @@
- case 'm': sqlite3_snprintf(3, &z[j],"%02d",x.M); j+=2; break;
- case 'M': sqlite3_snprintf(3, &z[j],"%02d",x.m); j+=2; break;
- case 's': {
-- sqlite3_snprintf(30,&z[j],"%lld",
-- (i64)(x.iJD/1000 - 21086676*(i64)10000));
-+ i64 iS = (i64)(x.iJD/1000 - 21086676*(i64)10000);
-+ sqlite3Int64ToText(iS, &z[j]);
- j += sqlite3Strlen30(&z[j]);
- break;
- }
---- /src/memdb.c
-+++ /src/memdb.c
-@@ -339,7 +339,7 @@
- p->mFlags = SQLITE_DESERIALIZE_RESIZEABLE | SQLITE_DESERIALIZE_FREEONCLOSE;
- assert( pOutFlags!=0 ); /* True because flags==SQLITE_OPEN_MAIN_DB */
- *pOutFlags = flags | SQLITE_OPEN_MEMORY;
-- p->base.pMethods = &memdb_io_methods;
-+ pFile->pMethods = &memdb_io_methods;
- p->szMax = sqlite3GlobalConfig.mxMemdbSize;
- return SQLITE_OK;
- }
---- /src/memjournal.c
-+++ /src/memjournal.c
-@@ -366,7 +366,7 @@
- assert( MEMJOURNAL_DFLT_FILECHUNKSIZE==fileChunkSize(p->nChunkSize) );
- }
-
-- p->pMethod = (const sqlite3_io_methods*)&MemJournalMethods;
-+ pJfd->pMethods = (const sqlite3_io_methods*)&MemJournalMethods;
- p->nSpill = nSpill;
- p->flags = flags;
- p->zJournal = zName;
-@@ -392,7 +392,7 @@
- int sqlite3JournalCreate(sqlite3_file *pJfd){
- int rc = SQLITE_OK;
- MemJournal *p = (MemJournal*)pJfd;
-- if( p->pMethod==&MemJournalMethods && (
-+ if( pJfd->pMethods==&MemJournalMethods && (
- #ifdef SQLITE_ENABLE_ATOMIC_WRITE
- p->nSpill>0
- #else
---- /src/os_unix.c
-+++ /src/os_unix.c
-@@ -5689,7 +5689,7 @@
- if( rc!=SQLITE_OK ){
- if( h>=0 ) robust_close(pNew, h, __LINE__);
- }else{
-- pNew->pMethod = pLockingStyle;
-+ pId->pMethods = pLockingStyle;
- OpenCounter(+1);
- verifyDbFile(pNew);
- }
---- /src/os_win.c
-+++ /src/os_win.c
-@@ -5266,7 +5266,7 @@
- }
-
- sqlite3_free(zTmpname);
-- pFile->pMethod = pAppData ? pAppData->pMethod : &winIoMethod;
-+ id->pMethods = pAppData ? pAppData->pMethod : &winIoMethod;
- pFile->pVfs = pVfs;
- pFile->h = h;
- if( isReadonly ){
---- /src/sqliteInt.h
-+++ /src/sqliteInt.h
-@@ -4437,6 +4437,7 @@
- int sqlite3FixExprList(DbFixer*, ExprList*);
- int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);
- int sqlite3RealSameAsInt(double,sqlite3_int64);
-+void sqlite3Int64ToText(i64,char*);
- int sqlite3AtoF(const char *z, double*, int, u8);
- int sqlite3GetInt32(const char *, int*);
- int sqlite3Atoi(const char*);
---- /src/test_multiplex.c
-+++ /src/test_multiplex.c
-@@ -591,9 +591,9 @@
-
- if( rc==SQLITE_OK ){
- if( pSubOpen->pMethods->iVersion==1 ){
-- pMultiplexOpen->base.pMethods = &gMultiplex.sIoMethodsV1;
-+ pConn->pMethods = &gMultiplex.sIoMethodsV1;
- }else{
-- pMultiplexOpen->base.pMethods = &gMultiplex.sIoMethodsV2;
-+ pConn->pMethods = &gMultiplex.sIoMethodsV2;
- }
- }else{
- multiplexFreeComponents(pGroup);
---- /src/util.c
-+++ /src/util.c
-@@ -596,6 +596,30 @@
- #endif
-
- /*
-+** Render an signed 64-bit integer as text. Store the result in zOut[].
-+**
-+** The caller must ensure that zOut[] is at least 21 bytes in size.
-+*/
-+void sqlite3Int64ToText(i64 v, char *zOut){
-+ int i;
-+ u64 x;
-+ char zTemp[22];
-+ if( v<0 ){
-+ x = (v==SMALLEST_INT64) ? ((u64)1)<<63 : -v;
-+ }else{
-+ x = v;
-+ }
-+ i = sizeof(zTemp)-2;
-+ zTemp[sizeof(zTemp)-1] = 0;
-+ do{
-+ zTemp[i--] = (x%10) + '0';
-+ x = x/10;
-+ }while( x );
-+ if( v<0 ) zTemp[i--] = '-';
-+ memcpy(zOut, &zTemp[i+1], sizeof(zTemp)-1-i);
-+}
-+
-+/*
- ** Compare the 19-character string zNum against the text representation
- ** value 2^63: 9223372036854775808. Return negative, zero, or positive
- ** if zNum is less than, equal to, or greater than the string.
---- /src/vdbemem.c
-+++ /src/vdbemem.c
-@@ -104,16 +104,25 @@
- static void vdbeMemRenderNum(int sz, char *zBuf, Mem *p){
- StrAccum acc;
- assert( p->flags & (MEM_Int|MEM_Real|MEM_IntReal) );
-- sqlite3StrAccumInit(&acc, 0, zBuf, sz, 0);
-+ assert( sz>22 );
- if( p->flags & MEM_Int ){
-- sqlite3_str_appendf(&acc, "%lld", p->u.i);
-- }else if( p->flags & MEM_IntReal ){
-- sqlite3_str_appendf(&acc, "%!.15g", (double)p->u.i);
-+#if GCC_VERSION>=7000000
-+ /* Work-around for GCC bug
-+ ** https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96270 */
-+ i64 x;
-+ assert( (p->flags&MEM_Int)*2==sizeof(x) );
-+ memcpy(&x, (char*)&p->u, (p->flags&MEM_Int)*2);
-+ sqlite3Int64ToText(x, zBuf);
-+#else
-+ sqlite3Int64ToText(p->u.i, zBuf);
-+#endif
- }else{
-- sqlite3_str_appendf(&acc, "%!.15g", p->u.r);
-+ sqlite3StrAccumInit(&acc, 0, zBuf, sz, 0);
-+ sqlite3_str_appendf(&acc, "%!.15g",
-+ (p->flags & MEM_IntReal)!=0 ? (double)p->u.i : p->u.r);
-+ assert( acc.zText==zBuf && acc.mxAlloc<=0 );
-+ zBuf[acc.nChar] = 0; /* Fast version of sqlite3StrAccumFinish(&acc) */
- }
-- assert( acc.zText==zBuf && acc.mxAlloc<=0 );
-- zBuf[acc.nChar] = 0; /* Fast version of sqlite3StrAccumFinish(&acc) */
- }
-
- #ifdef SQLITE_DEBUG
---- /test/fts3corrupt4.test
-+++ /test/fts3corrupt4.test
-@@ -6282,4 +6282,19 @@
-
- set sqlite_fts3_enable_parentheses $saved
-
-+#-------------------------------------------------------------------------
-+reset_db
-+do_execsql_test 47.1 {
-+ CREATE VIRTUAL TABLE t1 USING fts3(a,b,c);
-+}
-+do_execsql_test 47.2 {
-+ INSERT INTO t1_segdir VALUES(0,0,0,0,0,X'000130120106000106000106001f030001030001030000083230313630363039090107000107000107000001340901050001050001050000013509010400010400010400010730303030303030091c0400010400010400000662696e6172793c0301020200030102020003010202000301020200030102020003010202000301020200030102020003010202000301020200030102020003010202000008636f6d70696c657209010200010200010200000664627374617409070300010300010300010465627567090402000102000102000006656e61626c653f07020001020001020001020001020001020001020001020001020001020001020001020001010001020001020001020001020001020001020001020001020001087874656e73696f6e091f0400010400010400000466747334090a0300010300010300030135090d03000103000103000003676363090103000103000103000106656f706f6c790910030001030001030000056a736f6e310913030001030001030000046c6f6164091f030001030001030000036d6178091c02000102000102000105656d6f7279091c03000103000103000304737973350916030001030001030000066e6f636173653c020102020003010202000301020200030102020003010
20200030102020003010202000301020200030102020003010202000301020200030102020000046f6d6974091f020001020001020000057274726565091903000103000103000302696d3c01010202000301020200030102020003010202000301020200030102020003010202000301a202000301020200030102020003010202000301020200000a746872656164736166650922020001020001020000047674616209070400010400010400000178b401010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200010101020001010102000101010200');
-+ INSERT INTO t1_segdir VALUES(0,1,0,0,0,X'0001300425061b000008323031363036303903250700000134032505000001350325040001073030303030303003251a000008636f6d70696c657203250200000664627374617403250a00010465627567032508000006656e61626c650925090504040404040001087874656e73696f6e03251d0000046674733403250d0003013503250f000003676363032503000106656f706f6c790325110000056a736f6e310325130000046c6f616403251c0000036d6178032518000105656d6f7279032519000304737973350325150000046f6d697403251b000005727472656503251700000a7468726561647361666503251e0000047674616333250b00');
-+}
-+
-+do_catchsql_test 47.3 {
-+ SELECT matchinfo(t1) FROM t1 WHERE t1 MATCH '"json1 enable"';
-+} {1 {database disk image is malformed}}
-+
-+
- finish_test
diff --git a/dev-db/sqlite/sqlite-3.32.3-r1.ebuild b/dev-db/sqlite/sqlite-3.32.3-r1.ebuild
deleted file mode 100644
index 2b9d4a13482..00000000000
--- a/dev-db/sqlite/sqlite-3.32.3-r1.ebuild
+++ /dev/null
@@ -1,339 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-if [[ "${PV}" != "9999" ]]; then
- SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
- DOC_PV="${SRC_PV}"
- # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
-fi
-
-DESCRIPTION="SQL database engine"
-HOMEPAGE="https://sqlite.org/"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip
- doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )"
-fi
-
-LICENSE="public-domain"
-SLOT="3"
-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 ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-if [[ "${PV}" == "9999" ]]; then
- PROPERTIES="live"
-fi
-RESTRICT="!test? ( test )"
-
-if [[ "${PV}" == "9999" ]]; then
- BDEPEND=">=dev-lang/tcl-8.6:0
- dev-vcs/fossil"
-else
- BDEPEND="app-arch/unzip
- >=dev-lang/tcl-8.6:0"
-fi
-RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
-
-if [[ "${PV}" == "9999" ]]; then
- S="${WORKDIR}/${PN}"
-else
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
-fi
-
-src_unpack() {
- if [[ "${PV}" == "9999" ]]; then
- local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
- addwrite "${distdir}"
- mkdir -p "${distdir}/fossil-src/${PN}" || die
-
- mkdir "${WORKDIR}/${PN}" || die
- pushd "${WORKDIR}/${PN}" > /dev/null || die
- if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
- einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
- fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
- echo
- else
- cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
- einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
- fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
- echo
- fi
- cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
- einfo fossil open --quiet sqlite.fossil
- fossil open --quiet sqlite.fossil || die
- echo
- popd > /dev/null || die
-
- if use doc; then
- mkdir "${WORKDIR}/${PN}-doc" || die
- pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
- if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
- einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
- fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
- echo
- else
- cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
- einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
- fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
- echo
- fi
- cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
- einfo fossil open --quiet sqlite-doc.fossil
- fossil open --quiet sqlite-doc.fossil || die
- echo
- popd > /dev/null || die
- fi
- else
- default
- fi
-}
-
-src_prepare() {
- eapply "${FILESDIR}/"${PN}-3.32.1-full_archive-build_{1,2}.patch
- eapply "${FILESDIR}/"${PN}-3.32.3-backports_{1,2,3}.patch
-
- eapply_user
-
- # Fix AC_CHECK_FUNCS.
- # https://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2016-March/002762.html
- 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"
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
- local options=()
-
- options+=(
- --enable-load-extension
- --enable-threadsafe
- )
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support bytecode and tables_used virtual tables.
- # https://sqlite.org/bytecodevtab.html
- append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
-
- # Support column metadata functions.
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support sqlite_dbpage virtual table.
- # https://sqlite.org/dbpage.html
- append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
-
- # Support dbstat virtual table.
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support sqlite3_serialize() and sqlite3_deserialize() functions.
- # https://sqlite.org/c3ref/serialize.html
- # https://sqlite.org/c3ref/deserialize.html
- append-cppflags -DSQLITE_ENABLE_DESERIALIZE
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support sqlite3_normalized_sql() function.
- # https://sqlite.org/c3ref/expanded_sql.html
- append-cppflags -DSQLITE_ENABLE_NORMALIZE
-
- # Support sqlite_offset() function.
- # https://sqlite.org/lang_corefunc.html#sqlite_offset
- append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
-
- # Support pre-update hook functions.
- # https://sqlite.org/c3ref/preupdate_count.html
- append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/rtree.html
- # https://sqlite.org/geopoly.html
- append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
-
- # Support scan status functions.
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support sqlite_stmt virtual table.
- # https://sqlite.org/stmt.html
- append-cppflags -DSQLITE_ENABLE_STMTVTAB
-
- # Support Session extension.
- # https://sqlite.org/sessionintro.html
- options+=(--enable-session)
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
- # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
- # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
- append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-
- # Support soundex() function.
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # Support URI filenames.
- # https://sqlite.org/uri.html
- append-cppflags -DSQLITE_USE_URI
-
- # debug USE flag.
- options+=($(use_enable debug))
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if use readline; then
- options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- options+=(--enable-tcl)
-
- if [[ "${CHOST}" == *-mint* ]]; then
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- if [[ "${ABI}" == "x86" ]]; then
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
- append-cflags -mfpmath=sse
- else
- append-cflags -ffloat-store
- fi
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool dbtotxt sqlite3-db-to-txt
- install_tool index_usage sqlite3-index-usage
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showshm sqlite3-show-shm
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
- install_tool sqlite3_checker sqlite3-checker
- install_tool sqlite3_expert sqlite3-expert
- install_tool sqltclsh sqlite3-tclsh
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- find "${D}" -name "*.la" -type f -delete || die
-
- doman sqlite3.1
-
- if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
- (
- docinto html
- dodoc -r "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
- )
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2021-03-26 14:38 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2021-03-26 14:38 UTC (permalink / raw
To: gentoo-commits
commit: d63454a1e46e59433fbcede480261f6bf51efda7
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Mar 25 01:00:00 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 14:38:01 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d63454a1
dev-db/sqlite: Version bump (3.35.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 2 +
dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch | 375 ++++++++++++++++
dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch | 500 ++++++++++++++++++++++
dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch | 292 +++++++++++++
dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch | 441 +++++++++++++++++++
dev-db/sqlite/sqlite-3.35.0.ebuild | 427 ++++++++++++++++++
6 files changed, 2037 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 94518284309..c3652487bb2 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,6 +1,8 @@
DIST sqlite-doc-3330000.zip 9834159 BLAKE2B f67155a8ce8e46c2fbc0a4e35722d1fcad86e905a15230adc70732cee267b6b2002c7499883b938129aaa908b99634e4214360e9d1dbdae333b09060de24530e SHA512 14a3cccb4ff6af57738990eeadd37a1b827f89c9c1b16201c62ca5bb9301d39223d48677b9c269ce332210e5c9ae3f42aa0f9de7d79b38acb9809c732d038368
DIST sqlite-doc-3340000.zip 10069888 BLAKE2B 343df62bc8b75d57dffe69c779cceb856d9e94a5b2a77c3a972761eedd8b4b0f5f8849102ec271652c3aa4039df75d7f2e503fd04b0547be03e024fdfbd894ac SHA512 1bdf20030e656ec4ce38a264c8ef7a95c9f2731cd7d756a44b35b6c68827e8aba92018007139ee09d1c27b34bcd72bff1a201dc3f30aa13e96120af5d58e835e
DIST sqlite-doc-3340100.zip 10074559 BLAKE2B 66aa999d87b7f3c994c289eda320d6a4e371b0a6a2ab8bcebde540aa955f3bdf4f00b739ca32aa913685cd35a88ee83bebd7fa43a0c148614e9086a1d3f5652a SHA512 20cbb9f05cd329bf7aa2877431781e46192544806042f4104e4eb0e87d84cd2dfc02c7ff226d4bef9bb2c6a69cc612201844d116abe99b0cfed9602adf243a60
+DIST sqlite-doc-3350000.zip 10165959 BLAKE2B e24ae04764617d07fafc82f4c27d96b853df77de2a945109c2ff28abd3b61f8bdd318756d14b8d20e22a0dff05fcca26c9a8c9972f600af0a996cd8e13478c9d SHA512 f6b92cf1a087a97071c55605e85676c4d76b9435a1a433e4663ff3d7937557d72e4fb99931a14abda9ab3dece654da09d10f7ca2560ca3e0972e4b7690997132
DIST sqlite-src-3330000.zip 12591089 BLAKE2B 14888bca229683e97c4666f8efb535be5bd3e322de0089f0175ba15e038016be3a3cc00b5bfa8c111538116914cf6d8439839ca5d1e20339b184e547ddf260a4 SHA512 3260e3e03ee2f6a4ff2bc4ea4bada5a1497afeca33878c155a8005824970c6c1eb8a2db58eb3023cab084af475fadb81d1c3c9892ae92c07f884881e6602e173
DIST sqlite-src-3340000.zip 12623425 BLAKE2B 548293cf0166407727cd068804eb5e1ce62f654533c88a87b71a6ff62da37eb2af21b89b8d63ee677777ca917e0d685ddcf9b8d5c3c8b2a2b787d71da8e5a161 SHA512 520fbca59da02452e2861a140bde891aedfc8254eafaa6894e8d845369d60d6a921595a411efb2611c0f7b0cadd69a713dcdaaeaad1e4254e9fd9a6efde07f91
DIST sqlite-src-3340100.zip 12623711 BLAKE2B 08c98d0c56d46fe909f449f322002ae4d69fd952930d2f04514988a939b31744a13aea85935d84bc05db52faca1aad6a70d7c31e7da0e396bb649685a49699bb SHA512 5ed02fe609b3d08c3297cc43b21e6ee3f56fb51a6616ac391a0e50cd1677dbad03c6bf9bf9c8409cf94b83b16fe6b6e4a112640b18c7d4fd95328066da3c3943
+DIST sqlite-src-3350000.zip 12814378 BLAKE2B f77880bfb335da078623841f9d9d9fc690085630757d8d8e3d40d42646902f809febf8dcc5048d38be0e2d74c0114c35f09789bc261e51d49f9685201f6d1297 SHA512 4b77d963092a6aed61b50e59450edf2af187f16b185b05ca54d81c3eecf71b1cb9bc2883a8aadeb971fcebe343fa430ea788aedb77e3712c8b39d4892c93a797
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
new file mode 100644
index 00000000000..1506f3da93e
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_1.1.patch
@@ -0,0 +1,375 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /ext/misc/amatch.c
++++ /ext/misc/amatch.c
+@@ -1480,9 +1480,18 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
++int sqlite3AmatchInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
++#endif /* SQLITE_OMIT_VIRTUALTABLE */
++ return rc;
++}
++
+ /*
+ ** Register the amatch virtual table
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -1491,11 +1500,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Not used */
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+- rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
+-#endif /* SQLITE_OMIT_VIRTUALTABLE */
+- return rc;
++ return sqlite3AmatchInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/carray.c
++++ /ext/misc/carray.c
+@@ -498,16 +498,8 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_carray_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3CarrayInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
+ #ifdef SQLITE_TEST
+@@ -519,3 +511,18 @@
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_carray_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CarrayInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/completion.c
++++ /ext/misc/completion.c
+@@ -483,12 +483,13 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ int sqlite3_completion_init(
+- sqlite3 *db,
+- char **pzErrMsg,
++ sqlite3 *db,
++ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+ int rc = SQLITE_OK;
+@@ -499,3 +500,4 @@
+ #endif
+ return rc;
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/csv.c
++++ /ext/misc/csv.c
+@@ -928,6 +928,22 @@
+ #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
+
+
++int sqlite3CsvInit(sqlite3 *db){
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ int rc;
++ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
++#ifdef SQLITE_TEST
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
++ }
++#endif
++ return rc;
++#else
++ return SQLITE_OK;
++#endif
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -941,17 +957,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+- int rc;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
+-#ifdef SQLITE_TEST
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
+- }
+-#endif
+- return rc;
+-#else
+- return SQLITE_OK;
+-#endif
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CsvInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/dbdata.c
++++ /ext/misc/dbdata.c
+@@ -803,7 +803,7 @@
+ /*
+ ** Invoke this routine to register the "sqlite_dbdata" virtual table module
+ */
+-static int sqlite3DbdataRegister(sqlite3 *db){
++int sqlite3DbdataRegister(sqlite3 *db){
+ static sqlite3_module dbdata_module = {
+ 0, /* iVersion */
+ 0, /* xCreate */
+@@ -838,6 +838,7 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -849,3 +850,4 @@
+ SQLITE_EXTENSION_INIT2(pApi);
+ return sqlite3DbdataRegister(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/decimal.c
++++ /ext/misc/decimal.c
+@@ -590,14 +590,7 @@
+ decimal_free(pB);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_decimal_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3DecimalInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+ static const struct {
+ const char *zFuncName;
+@@ -611,10 +604,6 @@
+ { "decimal_mul", 2, decimalMulFunc },
+ };
+ unsigned int i;
+- (void)pzErrMsg; /* Unused parameter */
+-
+- SQLITE_EXTENSION_INIT2(pApi);
+-
+ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+ rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
+ SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+@@ -632,3 +621,20 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_decimal_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ (void)pzErrMsg; /* Unused parameter */
++
++ SQLITE_EXTENSION_INIT2(pApi);
++
++ return sqlite3DecimalInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/eval.c
++++ /ext/misc/eval.c
+@@ -102,6 +102,20 @@
+ }
+
+
++int sqlite3EvalInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "eval", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "eval", 2,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -110,16 +124,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "eval", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "eval", 2,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3EvalInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/fileio.c
++++ /ext/misc/fileio.c
+@@ -340,7 +340,7 @@
+ ** This function does the work for the writefile() UDF. Refer to
+ ** header comments at the top of this file for details.
+ */
+-static int writeFile(
++static int writeFileContents(
+ sqlite3_context *pCtx, /* Context to return bytes written in */
+ const char *zFile, /* File to write */
+ sqlite3_value *pData, /* Data to write */
+@@ -480,10 +480,10 @@
+ mtime = sqlite3_value_int64(argv[3]);
+ }
+
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ if( res==1 && errno==ENOENT ){
+ if( makeDirectory(zFile)==SQLITE_OK ){
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ }
+ }
+
+@@ -970,18 +970,9 @@
+ # define fsdirRegister(x) SQLITE_OK
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_fileio_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3FileioInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "readfile", 1,
++ rc = sqlite3_create_function(db, "readfile", 1,
+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+ readfileFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+@@ -998,3 +989,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_fileio_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3FileioInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/ieee754.c
++++ /ext/misc/ieee754.c
+@@ -253,14 +253,7 @@
+ }
+
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_ieee_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3IeeeInit(sqlite3 *db){
+ static const struct {
+ char *zFName;
+ int nArg;
+@@ -277,13 +270,26 @@
+ };
+ unsigned int i;
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+- rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
++ rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
+ SQLITE_UTF8|SQLITE_INNOCUOUS,
+ (void*)&aFunc[i].iAux,
+ aFunc[i].xFunc, 0, 0);
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_ieee_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3IeeeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
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
new file mode 100644
index 00000000000..0c3577fd3a1
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_1.2.patch
@@ -0,0 +1,500 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /ext/misc/nextchar.c
++++ /ext/misc/nextchar.c
+@@ -286,17 +286,8 @@
+ sqlite3_free(c.aResult);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_nextchar_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3NextcharInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "next_char", 3,
+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+ nextCharFunc, 0, 0);
+@@ -312,3 +303,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_nextchar_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3NextcharInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/percentile.c
++++ /ext/misc/percentile.c
+@@ -202,6 +202,15 @@
+ }
+
+
++int sqlite3PercentileInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "percentile", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ 0, percentStep, percentFinal);
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -210,11 +219,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "percentile", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- 0, percentStep, percentFinal);
+- return rc;
++ return sqlite3PercentileInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/regexp.c
++++ /ext/misc/regexp.c
+@@ -740,10 +740,18 @@
+ }
+ }
+
++int sqlite3RegexpInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
++ 0, re_sql_func, 0, 0);
++ return rc;
++}
++
+ /*
+ ** Invoke this routine to register the regexp() function with the
+ ** SQLite database connection.
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -752,9 +760,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
+- 0, re_sql_func, 0, 0);
+- return rc;
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3RegexpInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/series.c
++++ /ext/misc/series.c
+@@ -423,6 +423,15 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
++int sqlite3SeriesInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
++#endif
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -431,7 +440,6 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ if( sqlite3_libversion_number()<3008012 ){
+@@ -439,7 +447,7 @@
+ "generate_series() requires SQLite 3.8.12 or later");
+ return SQLITE_ERROR;
+ }
+- rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
+ #endif
+- return rc;
++ return sqlite3SeriesInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sha1.c
++++ /ext/misc/sha1.c
+@@ -175,7 +175,7 @@
+ }
+
+ /* Compute a string using sqlite3_vsnprintf() and hash it */
+-static void hash_step_vformat(
++static void sha1_hash_step_vformat(
+ SHA1Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -306,7 +306,7 @@
+ nCol = sqlite3_column_count(pStmt);
+ z = sqlite3_sql(pStmt);
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha1_hash_step_vformat(&cx,"S%d:",n);
+ hash_step(&cx,(unsigned char*)z,n);
+
+ /* Compute a hash over the result of the query */
+@@ -349,14 +349,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha1_hash_step_vformat(&cx,"T%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha1_hash_step_vformat(&cx,"B%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+@@ -370,6 +370,20 @@
+ }
+
+
++int sqlite3ShaInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sha1", 1,
++ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
++ 0, sha1Func, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sha1_query", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sha1QueryFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -378,16 +392,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sha1", 1,
+- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+- 0, sha1Func, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sha1_query", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sha1QueryFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3ShaInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/shathree.c
++++ /ext/misc/shathree.c
+@@ -530,7 +530,7 @@
+ /* Compute a string using sqlite3_vsnprintf() with a maximum length
+ ** of 50 bytes and add it to the hash.
+ */
+-static void hash_step_vformat(
++static void sha3_hash_step_vformat(
+ SHA3Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -626,7 +626,7 @@
+ z = sqlite3_sql(pStmt);
+ if( z ){
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha3_hash_step_vformat(&cx,"S%d:",n);
+ SHA3Update(&cx,(unsigned char*)z,n);
+ }
+
+@@ -670,14 +670,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha3_hash_step_vformat(&cx,"T%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha3_hash_step_vformat(&cx,"B%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+@@ -690,17 +690,8 @@
+ }
+
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_shathree_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3ShathreeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "sha3", 1,
+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+ 0, sha3Func, 0, 0);
+@@ -721,3 +712,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_shathree_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3ShathreeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -101,6 +103,20 @@
+ }
+
+
++int sqlite3SqlarInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sqlar_compress", 1,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarCompressFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarUncompressFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -109,16 +125,10 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sqlar_compress", 1,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarCompressFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarUncompressFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3SqlarInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/totype.c
++++ /ext/misc/totype.c
+@@ -491,17 +491,8 @@
+ #pragma warning(default: 4748)
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_totype_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3TotypeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "tointeger", 1,
+ SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
+ tointegerFunc, 0, 0);
+@@ -512,3 +503,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_totype_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3TotypeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uint.c
++++ /ext/misc/uint.c
+@@ -78,6 +78,11 @@
+ return (nKey1 - i) - (nKey2 - j);
+ }
+
++int sqlite3UintInit(sqlite3 *db){
++ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -88,5 +93,6 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
++ return sqlite3UintInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uuid.c
++++ /ext/misc/uuid.c
+@@ -206,21 +206,12 @@
+ sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_uuid_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3UuidInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+ sqlite3UuidFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "uuid_str", 1,
++ rc = sqlite3_create_function(db, "uuid_str", 1,
+ SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+ 0, sqlite3UuidStrFunc, 0, 0);
+ }
+@@ -231,3 +222,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_uuid_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3UuidInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2139,7 +2141,7 @@
+ /*
+ ** Register the "zipfile" virtual table.
+ */
+-static int zipfileRegister(sqlite3 *db){
++int sqlite3ZipfileInit(sqlite3 *db){
+ static sqlite3_module zipfileModule = {
+ 1, /* iVersion */
+ zipfileConnect, /* xCreate */
+@@ -2173,9 +2175,10 @@
+ return rc;
+ }
+ #else /* SQLITE_OMIT_VIRTUALTABLE */
+-# define zipfileRegister(x) SQLITE_OK
++# define sqlite3ZipfileInit(x) SQLITE_OK
+ #endif
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -2186,5 +2189,8 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return zipfileRegister(db);
++ return sqlite3ZipfileInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
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
new file mode 100644
index 00000000000..383a4936bf0
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_2.1.patch
@@ -0,0 +1,292 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Update list of optionally available functions.
+Fix building with dlopen() not available.
+
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -313,6 +313,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -365,8 +368,29 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/amatch.c \
++ $(TOP)/ext/misc/appendvfs.c \
++ $(TOP)/ext/misc/carray.c \
++ $(TOP)/ext/misc/completion.c \
++ $(TOP)/ext/misc/csv.c \
++ $(TOP)/ext/misc/dbdata.c \
++ $(TOP)/ext/misc/decimal.c \
++ $(TOP)/ext/misc/eval.c \
++ $(TOP)/ext/misc/fileio.c \
++ $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/nextchar.c \
++ $(TOP)/ext/misc/percentile.c \
++ $(TOP)/ext/misc/regexp.c \
++ $(TOP)/ext/misc/series.c \
++ $(TOP)/ext/misc/sha1.c \
++ $(TOP)/ext/misc/shathree.c \
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/totype.c \
++ $(TOP)/ext/misc/uint.c \
++ $(TOP)/ext/misc/uuid.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -437,36 +461,21 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+- $(TOP)/ext/misc/amatch.c \
+- $(TOP)/ext/misc/appendvfs.c \
+- $(TOP)/ext/misc/carray.c \
+ $(TOP)/ext/misc/cksumvfs.c \
+ $(TOP)/ext/misc/closure.c \
+- $(TOP)/ext/misc/csv.c \
+- $(TOP)/ext/misc/decimal.c \
+- $(TOP)/ext/misc/eval.c \
+ $(TOP)/ext/misc/explain.c \
+- $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/fuzzer.c \
+ $(TOP)/ext/fts5/fts5_tcl.c \
+ $(TOP)/ext/fts5/fts5_test_mi.c \
+ $(TOP)/ext/fts5/fts5_test_tok.c \
+- $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/mmapwarm.c \
+- $(TOP)/ext/misc/nextchar.c \
+ $(TOP)/ext/misc/normalize.c \
+- $(TOP)/ext/misc/percentile.c \
+ $(TOP)/ext/misc/prefixes.c \
+- $(TOP)/ext/misc/regexp.c \
+ $(TOP)/ext/misc/remember.c \
+- $(TOP)/ext/misc/series.c \
+ $(TOP)/ext/misc/spellfix.c \
+- $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+ $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/userauth/userauth.c
+
+ # Source code to the library files needed by the test fixture
+@@ -648,25 +657,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -777,7 +786,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1083,18 +1092,6 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+- $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/decimal.c \
+- $(TOP)/ext/misc/fileio.c \
+- $(TOP)/ext/misc/ieee754.c \
+- $(TOP)/ext/misc/series.c \
+- $(TOP)/ext/misc/shathree.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/misc/uint.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/misc/memtrace.c \
+ $(TOP)/src/test_windirent.c
+
+@@ -1264,11 +1261,11 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1302,24 +1299,23 @@
+ shelltest: $(TESTPROGS)
+ ./testfixture$(TEXT) $(TOP)/test/permutations.test shell
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1330,36 +1326,36 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
++ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1387,11 +1383,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -108,7 +108,7 @@
+ #########
+ # Figure out whether or not we have these functions
+ #
+-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
++AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
+
+ #########
+ # By default, we use the amalgamation (this may be changed below...)
+@@ -587,6 +587,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch
new file mode 100644
index 00000000000..99350c79449
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.35.0-build_2.2.patch
@@ -0,0 +1,441 @@
+Move some code to libsqlite3.so to avoid duplication.
+Initialize some extensions in libsqlite3.so.
+Update test suite.
+
+SQLite revision: acd63062eb06748bfe9e4886639e4f2b54ea6a496a83f10716abbaba4115500b
+
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/main.c
++++ /src/main.c
+@@ -50,12 +50,36 @@
+ #ifdef SQLITE_ENABLE_FTS5
+ int sqlite3Fts5Init(sqlite3*);
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++int sqlite3DbdataRegister(sqlite3*);
++#endif
+ #ifdef SQLITE_ENABLE_JSON1
+ int sqlite3Json1Init(sqlite3*);
+ #endif
+ #ifdef SQLITE_ENABLE_STMTVTAB
+ int sqlite3StmtVtabInit(sqlite3*);
+ #endif
++int sqlite3AmatchInit(sqlite3*);
++int sqlite3CarrayInit(sqlite3*);
++int sqlite3CompletionVtabInit(sqlite3*);
++int sqlite3CsvInit(sqlite3*);
++int sqlite3DecimalInit(sqlite3*);
++int sqlite3EvalInit(sqlite3*);
++int sqlite3FileioInit(sqlite3*);
++int sqlite3IeeeInit(sqlite3*);
++int sqlite3NextcharInit(sqlite3*);
++int sqlite3PercentileInit(sqlite3*);
++int sqlite3RegexpInit(sqlite3*);
++int sqlite3SeriesInit(sqlite3*);
++int sqlite3ShaInit(sqlite3*);
++int sqlite3ShathreeInit(sqlite3*);
++int sqlite3TotypeInit(sqlite3*);
++int sqlite3UintInit(sqlite3*);
++int sqlite3UuidInit(sqlite3*);
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++int sqlite3ZipfileInit(sqlite3*);
++int sqlite3SqlarInit(sqlite3*);
++#endif
+
+ /*
+ ** An array of pointers to extension initializer functions for
+@@ -83,6 +107,9 @@
+ #ifdef SQLITE_ENABLE_DBPAGE_VTAB
+ sqlite3DbpageRegister,
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++ sqlite3DbdataRegister,
++#endif
+ #ifdef SQLITE_ENABLE_DBSTAT_VTAB
+ sqlite3DbstatRegister,
+ #endif
+@@ -96,6 +123,27 @@
+ #ifdef SQLITE_ENABLE_BYTECODE_VTAB
+ sqlite3VdbeBytecodeVtabInit,
+ #endif
++ sqlite3AmatchInit,
++ sqlite3CarrayInit,
++ sqlite3CompletionVtabInit,
++ sqlite3CsvInit,
++ sqlite3DecimalInit,
++ sqlite3EvalInit,
++ sqlite3FileioInit,
++ sqlite3IeeeInit,
++ sqlite3NextcharInit,
++ sqlite3PercentileInit,
++ sqlite3RegexpInit,
++ sqlite3SeriesInit,
++ sqlite3ShaInit,
++ sqlite3ShathreeInit,
++ sqlite3TotypeInit,
++ sqlite3UintInit,
++ sqlite3UuidInit,
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++ sqlite3ZipfileInit,
++ sqlite3SqlarInit,
++#endif
+ };
+
+ #ifndef SQLITE_AMALGAMATION
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -69,6 +69,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -135,6 +136,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # if SQLITE_OS_WINRT
+@@ -1018,25 +1023,7 @@
+ INCLUDE test_windirent.c
+ #define dirent DIRENT
+ #endif
+-INCLUDE ../ext/misc/shathree.c
+-INCLUDE ../ext/misc/fileio.c
+-INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-INCLUDE ../ext/misc/uint.c
+-INCLUDE ../ext/misc/decimal.c
+-INCLUDE ../ext/misc/ieee754.c
+-INCLUDE ../ext/misc/series.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+-
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-INCLUDE ../ext/misc/dbdata.c
+-#endif
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -4608,20 +4595,6 @@
+ #ifndef SQLITE_OMIT_LOAD_EXTENSION
+ sqlite3_enable_load_extension(p->db, 1);
+ #endif
+- sqlite3_fileio_init(p->db, 0, 0);
+- sqlite3_shathree_init(p->db, 0, 0);
+- sqlite3_completion_init(p->db, 0, 0);
+- sqlite3_uint_init(p->db, 0, 0);
+- sqlite3_decimal_init(p->db, 0, 0);
+- sqlite3_ieee_init(p->db, 0, 0);
+- sqlite3_series_init(p->db, 0, 0);
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+- sqlite3_dbdata_init(p->db, 0, 0);
+-#endif
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_zipfile_init(p->db, 0, 0);
+- sqlite3_sqlar_init(p->db, 0, 0);
+-#endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+ shellAddSchemaName, 0, 0);
+ sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
+@@ -6644,8 +6617,6 @@
+ );
+ goto end_ar_command;
+ }
+- sqlite3_fileio_init(cmd.db, 0, 0);
+- sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+
+@@ -11108,6 +11079,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /src/test_config.c
++++ /src/test_config.c
+@@ -359,6 +359,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_DECLTYPE
+ Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -546,6 +548,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_REINDEX
+ Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -668,6 +672,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_UTF16
+ Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
+ #else
+--- /test/e_expr.test
++++ /test/e_expr.test
+@@ -1079,7 +1079,7 @@
+ #
+ # There is a regexp function if ICU is enabled though.
+ #
+-ifcapable !icu {
++ifcapable !icu&&!regexp {
+ do_catchsql_test e_expr-18.1.1 {
+ SELECT regexp('abc', 'def')
+ } {1 {no such function: regexp}}
+--- /test/icu.test
++++ /test/icu.test
+@@ -41,7 +41,7 @@
+ #
+ test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
+ test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
+- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
++ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
+ test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
+ test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
+
+--- /test/pragma.test
++++ /test/pragma.test
+@@ -1370,17 +1370,62 @@
+ } ;# ifcapable trigger
+
+ ifcapable schema_pragmas {
+- do_test pragma-11.1 {
+- execsql2 {
+- pragma collation_list;
++ ifcapable decimal {
++ ifcapable uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
+ }
+- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
+- do_test pragma-11.2 {
+- db collate New_Collation blah...
+- execsql {
+- pragma collation_list;
++ ifcapable !uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
+ }
+- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ }
++ ifcapable !decimal {
++ ifcapable uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
++ }
++ ifcapable !uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ }
++ }
+ }
+
+ ifcapable schema_pragmas&&tempdb {
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -698,49 +698,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <assert.h>
+-#ifndef OMIT_ZLIB
+-#include "zlib.h"
+-#endif
+-
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+- sqlite3_context *context,
+- int argc,
+- sqlite3_value **argv
+-){
+-#ifdef OMIT_ZLIB
+- sqlite3_result_value(context, argv[0]);
+-#else
+- uLong nData;
+- uLongf sz;
+-
+- assert( argc==2 );
+- sz = sqlite3_value_int(argv[1]);
+-
+- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+- sqlite3_result_value(context, argv[0]);
+- }else{
+- const Bytef *pData= sqlite3_value_blob(argv[0]);
+- Bytef *pOut = sqlite3_malloc(sz);
+- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+- sqlite3_result_error(context, "error in uncompress()", -1);
+- }else{
+- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+- }
+- sqlite3_free(pOut);
+- }
+-#endif
+-}
+-
+
+ /* Run a chunk of SQL. If any errors happen, print an error message
+ ** and exit.
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -129,6 +129,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -416,6 +417,28 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ amatch.c
++ appendvfs.c
++ carray.c
++ completion.c
++ csv.c
++ dbdata.c
++ decimal.c
++ eval.c
++ fileio.c
++ ieee754.c
++ nextchar.c
++ percentile.c
++ regexp.c
++ series.c
++ sha1.c
++ shathree.c
++ sqlar.c
++ sqlite3expert.c
++ totype.c
++ uint.c
++ uuid.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,21 +27,13 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
+- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+-#endif
+
+ return
+ BEGIN_STRING
diff --git a/dev-db/sqlite/sqlite-3.35.0.ebuild b/dev-db/sqlite/sqlite-3.35.0.ebuild
new file mode 100644
index 00000000000..d04438ce2cb
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.35.0.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+if [[ "${PV}" != "9999" ]]; then
+ SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+ DOC_PV="${SRC_PV}"
+ # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+fi
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://sqlite.org/2021/${PN}-src-${SRC_PV}.zip
+ doc? ( https://sqlite.org/2021/${PN}-doc-${DOC_PV}.zip )"
+fi
+
+LICENSE="public-domain"
+SLOT="3"
+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"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+if [[ "${PV}" == "9999" ]]; then
+ PROPERTIES="live"
+fi
+RESTRICT="!test? ( test )"
+
+if [[ "${PV}" == "9999" ]]; then
+ BDEPEND=">=dev-lang/tcl-8.6:0
+ dev-vcs/fossil"
+else
+ BDEPEND="app-arch/unzip
+ >=dev-lang/tcl-8.6:0"
+fi
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+if [[ "${PV}" == "9999" ]]; then
+ S="${WORKDIR}/${PN}"
+else
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+fi
+
+_fossil_fetch() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local repo_uri="${2}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ pushd "${T}/fossil/${repo_id}" > /dev/null || die
+
+ if [[ -n "${EVCS_OFFLINE}" ]]; then
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+ else
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
+ fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
+ einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
+ fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
+ echo
+ fi
+
+ (
+ addwrite "${distdir}"
+ mkdir -p "${distdir}/fossil-src/${repo_id}" || die
+ cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
+ )
+ fi
+
+ popd > /dev/null || die
+}
+
+_fossil_checkout() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local branch_or_commit="${2}"
+ local target_directory="${3}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+
+ if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
+ fi
+
+ mkdir "${target_directory}" || die
+ pushd "${target_directory}" > /dev/null || die
+
+ einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
+ fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
+ echo
+
+ popd > /dev/null || die
+}
+
+fossil_fetch() {
+ local repo_id="${1}"
+ local repo_uri="${2}"
+ local target_directory="${3}"
+
+ local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
+
+ _fossil_fetch "${repo_id}" "${repo_uri}"
+ _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
+}
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
+ if use doc; then
+ fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
+ fi
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/"${PN}-3.35.0-build_{1.1,1.2,2.1,2.2}.patch
+
+ eapply_user
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
+ local options=()
+
+ options+=(
+ --enable-load-extension
+ --enable-threadsafe
+ )
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support bytecode and tables_used virtual tables.
+ # https://sqlite.org/compile.html#enable_bytecode_vtab
+ # https://sqlite.org/bytecodevtab.html
+ append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
+
+ # Support column metadata functions.
+ # https://sqlite.org/compile.html#enable_column_metadata
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ # https://sqlite.org/dbpage.html
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/compile.html#enable_dbstat_vtab
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/compile.html#enable_fts3
+ # https://sqlite.org/compile.html#enable_fts3_parenthesis
+ # https://sqlite.org/compile.html#enable_fts4
+ # https://sqlite.org/compile.html#enable_fts5
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/compile.html#enable_json1
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/compile.html#enable_memsys5
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/compile.html#enable_offset_sql_func
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/compile.html#enable_preupdate_hook
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/compile.html#enable_rbu
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/compile.html#enable_rtree
+ # https://sqlite.org/compile.html#enable_geopoly
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support Session extension.
+ # https://sqlite.org/compile.html#enable_session
+ # https://sqlite.org/sessionintro.html
+ append-cppflags -DSQLITE_ENABLE_SESSION
+
+ # Support scan status functions.
+ # https://sqlite.org/compile.html#enable_stmt_scanstatus
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/compile.html#enable_stmtvtab
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/compile.html#enable_unlock_notify
+ # https://sqlite.org/c3ref/unlock_notify.html
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
+ # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support soundex() function.
+ # https://sqlite.org/compile.html#soundex
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/compile.html#use_uri
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ options+=($(use_enable debug))
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if use readline; then
+ options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/compile.html#secure_delete
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ options+=(--enable-tcl)
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ # sys/mman.h not available in MiNTLib.
+ # https://sqlite.org/compile.html#omit_wal
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+
+ if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
+ emake tclsqlite3.c
+
+ local build_directory="$(pwd)"
+ build_directory="${build_directory##*/}"
+
+ mkdir "${WORKDIR}/${PN}-doc-build" || die
+ pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
+
+ 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
+ rmdir doc/matrix{/*,} || die
+
+ popd > /dev/null || die
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ if [[ "${PV}" == "9999" ]]; then
+ pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
+ else
+ pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
+ fi
+
+ find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
+ if [[ "${PV}" != "9999" ]]; then
+ rm search search.d/admin || die
+ rmdir search.d || die
+ find -name "*~" -delete || die
+ fi
+
+ (
+ docinto html
+ dodoc -r *
+ )
+
+ popd > /dev/null || die
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2021-03-26 14:38 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2021-03-26 14:38 UTC (permalink / raw
To: gentoo-commits
commit: 132acb75720c31a40559b2d9e279182318b8eb4b
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Mar 25 00:00:00 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 14:38:01 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=132acb75
dev-db/sqlite: Version bump (3.34.1).
Bug: https://bugs.gentoo.org/777990
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 2 +
dev-db/sqlite/files/sqlite-3.34.1-build_1.1.patch | 375 ++++++++++++++++
dev-db/sqlite/files/sqlite-3.34.1-build_1.2.patch | 500 ++++++++++++++++++++++
dev-db/sqlite/files/sqlite-3.34.1-build_2.1.patch | 291 +++++++++++++
dev-db/sqlite/files/sqlite-3.34.1-build_2.2.patch | 441 +++++++++++++++++++
dev-db/sqlite/sqlite-3.34.1.ebuild | 427 ++++++++++++++++++
6 files changed, 2036 insertions(+)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index b26fd917aad..94518284309 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,4 +1,6 @@
DIST sqlite-doc-3330000.zip 9834159 BLAKE2B f67155a8ce8e46c2fbc0a4e35722d1fcad86e905a15230adc70732cee267b6b2002c7499883b938129aaa908b99634e4214360e9d1dbdae333b09060de24530e SHA512 14a3cccb4ff6af57738990eeadd37a1b827f89c9c1b16201c62ca5bb9301d39223d48677b9c269ce332210e5c9ae3f42aa0f9de7d79b38acb9809c732d038368
DIST sqlite-doc-3340000.zip 10069888 BLAKE2B 343df62bc8b75d57dffe69c779cceb856d9e94a5b2a77c3a972761eedd8b4b0f5f8849102ec271652c3aa4039df75d7f2e503fd04b0547be03e024fdfbd894ac SHA512 1bdf20030e656ec4ce38a264c8ef7a95c9f2731cd7d756a44b35b6c68827e8aba92018007139ee09d1c27b34bcd72bff1a201dc3f30aa13e96120af5d58e835e
+DIST sqlite-doc-3340100.zip 10074559 BLAKE2B 66aa999d87b7f3c994c289eda320d6a4e371b0a6a2ab8bcebde540aa955f3bdf4f00b739ca32aa913685cd35a88ee83bebd7fa43a0c148614e9086a1d3f5652a SHA512 20cbb9f05cd329bf7aa2877431781e46192544806042f4104e4eb0e87d84cd2dfc02c7ff226d4bef9bb2c6a69cc612201844d116abe99b0cfed9602adf243a60
DIST sqlite-src-3330000.zip 12591089 BLAKE2B 14888bca229683e97c4666f8efb535be5bd3e322de0089f0175ba15e038016be3a3cc00b5bfa8c111538116914cf6d8439839ca5d1e20339b184e547ddf260a4 SHA512 3260e3e03ee2f6a4ff2bc4ea4bada5a1497afeca33878c155a8005824970c6c1eb8a2db58eb3023cab084af475fadb81d1c3c9892ae92c07f884881e6602e173
DIST sqlite-src-3340000.zip 12623425 BLAKE2B 548293cf0166407727cd068804eb5e1ce62f654533c88a87b71a6ff62da37eb2af21b89b8d63ee677777ca917e0d685ddcf9b8d5c3c8b2a2b787d71da8e5a161 SHA512 520fbca59da02452e2861a140bde891aedfc8254eafaa6894e8d845369d60d6a921595a411efb2611c0f7b0cadd69a713dcdaaeaad1e4254e9fd9a6efde07f91
+DIST sqlite-src-3340100.zip 12623711 BLAKE2B 08c98d0c56d46fe909f449f322002ae4d69fd952930d2f04514988a939b31744a13aea85935d84bc05db52faca1aad6a70d7c31e7da0e396bb649685a49699bb SHA512 5ed02fe609b3d08c3297cc43b21e6ee3f56fb51a6616ac391a0e50cd1677dbad03c6bf9bf9c8409cf94b83b16fe6b6e4a112640b18c7d4fd95328066da3c3943
diff --git a/dev-db/sqlite/files/sqlite-3.34.1-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_1.1.patch
new file mode 100644
index 00000000000..d7f759af35d
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_1.1.patch
@@ -0,0 +1,375 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /ext/misc/amatch.c
++++ /ext/misc/amatch.c
+@@ -1480,9 +1480,18 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
++int sqlite3AmatchInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
++#endif /* SQLITE_OMIT_VIRTUALTABLE */
++ return rc;
++}
++
+ /*
+ ** Register the amatch virtual table
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -1491,11 +1500,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Not used */
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+- rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
+-#endif /* SQLITE_OMIT_VIRTUALTABLE */
+- return rc;
++ return sqlite3AmatchInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/carray.c
++++ /ext/misc/carray.c
+@@ -498,16 +498,8 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_carray_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3CarrayInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
+ #ifdef SQLITE_TEST
+@@ -519,3 +511,18 @@
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_carray_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CarrayInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/completion.c
++++ /ext/misc/completion.c
+@@ -483,12 +483,13 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+ int sqlite3_completion_init(
+- sqlite3 *db,
+- char **pzErrMsg,
++ sqlite3 *db,
++ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+ int rc = SQLITE_OK;
+@@ -499,3 +500,4 @@
+ #endif
+ return rc;
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/csv.c
++++ /ext/misc/csv.c
+@@ -928,6 +928,22 @@
+ #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
+
+
++int sqlite3CsvInit(sqlite3 *db){
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ int rc;
++ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
++#ifdef SQLITE_TEST
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
++ }
++#endif
++ return rc;
++#else
++ return SQLITE_OK;
++#endif
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -941,17 +957,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+-#ifndef SQLITE_OMIT_VIRTUALTABLE
+- int rc;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
+-#ifdef SQLITE_TEST
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
+- }
+-#endif
+- return rc;
+-#else
+- return SQLITE_OK;
+-#endif
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3CsvInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/dbdata.c
++++ /ext/misc/dbdata.c
+@@ -803,7 +803,7 @@
+ /*
+ ** Invoke this routine to register the "sqlite_dbdata" virtual table module
+ */
+-static int sqlite3DbdataRegister(sqlite3 *db){
++int sqlite3DbdataRegister(sqlite3 *db){
+ static sqlite3_module dbdata_module = {
+ 0, /* iVersion */
+ 0, /* xCreate */
+@@ -838,6 +838,7 @@
+ return rc;
+ }
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -849,3 +850,4 @@
+ SQLITE_EXTENSION_INIT2(pApi);
+ return sqlite3DbdataRegister(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/decimal.c
++++ /ext/misc/decimal.c
+@@ -590,14 +590,7 @@
+ decimal_free(pB);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_decimal_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3DecimalInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+ static const struct {
+ const char *zFuncName;
+@@ -611,10 +604,6 @@
+ { "decimal_mul", 2, decimalMulFunc },
+ };
+ unsigned int i;
+- (void)pzErrMsg; /* Unused parameter */
+-
+- SQLITE_EXTENSION_INIT2(pApi);
+-
+ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+ rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
+ SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+@@ -632,3 +621,20 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_decimal_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ (void)pzErrMsg; /* Unused parameter */
++
++ SQLITE_EXTENSION_INIT2(pApi);
++
++ return sqlite3DecimalInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/eval.c
++++ /ext/misc/eval.c
+@@ -102,6 +102,20 @@
+ }
+
+
++int sqlite3EvalInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "eval", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "eval", 2,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sqlEvalFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -110,16 +124,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "eval", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "eval", 2,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sqlEvalFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3EvalInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/fileio.c
++++ /ext/misc/fileio.c
+@@ -340,7 +340,7 @@
+ ** This function does the work for the writefile() UDF. Refer to
+ ** header comments at the top of this file for details.
+ */
+-static int writeFile(
++static int writeFileContents(
+ sqlite3_context *pCtx, /* Context to return bytes written in */
+ const char *zFile, /* File to write */
+ sqlite3_value *pData, /* Data to write */
+@@ -480,10 +480,10 @@
+ mtime = sqlite3_value_int64(argv[3]);
+ }
+
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ if( res==1 && errno==ENOENT ){
+ if( makeDirectory(zFile)==SQLITE_OK ){
+- res = writeFile(context, zFile, argv[1], mode, mtime);
++ res = writeFileContents(context, zFile, argv[1], mode, mtime);
+ }
+ }
+
+@@ -970,18 +970,9 @@
+ # define fsdirRegister(x) SQLITE_OK
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_fileio_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3FileioInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "readfile", 1,
++ rc = sqlite3_create_function(db, "readfile", 1,
+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+ readfileFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+@@ -998,3 +989,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_fileio_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3FileioInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/ieee754.c
++++ /ext/misc/ieee754.c
+@@ -245,14 +245,7 @@
+ }
+
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_ieee_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3IeeeInit(sqlite3 *db){
+ static const struct {
+ char *zFName;
+ int nArg;
+@@ -269,13 +262,26 @@
+ };
+ unsigned int i;
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
+- rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
++ rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
+ SQLITE_UTF8|SQLITE_INNOCUOUS,
+ (void*)&aFunc[i].iAux,
+ aFunc[i].xFunc, 0, 0);
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_ieee_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3IeeeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
diff --git a/dev-db/sqlite/files/sqlite-3.34.1-build_1.2.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_1.2.patch
new file mode 100644
index 00000000000..5c5d6e93b1a
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_1.2.patch
@@ -0,0 +1,500 @@
+Add initialization functions for internal usage in libsqlite3.so.
+
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /ext/misc/nextchar.c
++++ /ext/misc/nextchar.c
+@@ -286,17 +286,8 @@
+ sqlite3_free(c.aResult);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_nextchar_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3NextcharInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "next_char", 3,
+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+ nextCharFunc, 0, 0);
+@@ -312,3 +303,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_nextchar_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3NextcharInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/percentile.c
++++ /ext/misc/percentile.c
+@@ -202,6 +202,15 @@
+ }
+
+
++int sqlite3PercentileInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "percentile", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ 0, percentStep, percentFinal);
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -210,11 +219,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "percentile", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- 0, percentStep, percentFinal);
+- return rc;
++ return sqlite3PercentileInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/regexp.c
++++ /ext/misc/regexp.c
+@@ -740,10 +740,18 @@
+ }
+ }
+
++int sqlite3RegexpInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
++ 0, re_sql_func, 0, 0);
++ return rc;
++}
++
+ /*
+ ** Invoke this routine to register the regexp() function with the
+ ** SQLite database connection.
+ */
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -752,9 +760,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
+- 0, re_sql_func, 0, 0);
+- return rc;
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3RegexpInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/series.c
++++ /ext/misc/series.c
+@@ -413,6 +413,15 @@
+
+ #endif /* SQLITE_OMIT_VIRTUALTABLE */
+
++int sqlite3SeriesInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++#ifndef SQLITE_OMIT_VIRTUALTABLE
++ rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
++#endif
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -421,7 +430,6 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ #ifndef SQLITE_OMIT_VIRTUALTABLE
+ if( sqlite3_libversion_number()<3008012 ){
+@@ -429,7 +437,7 @@
+ "generate_series() requires SQLite 3.8.12 or later");
+ return SQLITE_ERROR;
+ }
+- rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
+ #endif
+- return rc;
++ return sqlite3SeriesInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sha1.c
++++ /ext/misc/sha1.c
+@@ -175,7 +175,7 @@
+ }
+
+ /* Compute a string using sqlite3_vsnprintf() and hash it */
+-static void hash_step_vformat(
++static void sha1_hash_step_vformat(
+ SHA1Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -306,7 +306,7 @@
+ nCol = sqlite3_column_count(pStmt);
+ z = sqlite3_sql(pStmt);
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha1_hash_step_vformat(&cx,"S%d:",n);
+ hash_step(&cx,(unsigned char*)z,n);
+
+ /* Compute a hash over the result of the query */
+@@ -349,14 +349,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha1_hash_step_vformat(&cx,"T%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha1_hash_step_vformat(&cx,"B%d:",n2);
+ hash_step(&cx, z2, n2);
+ break;
+ }
+@@ -370,6 +370,20 @@
+ }
+
+
++int sqlite3ShaInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sha1", 1,
++ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
++ 0, sha1Func, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sha1_query", 1,
++ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
++ sha1QueryFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -378,16 +392,8 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sha1", 1,
+- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+- 0, sha1Func, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sha1_query", 1,
+- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
+- sha1QueryFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3ShaInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/shathree.c
++++ /ext/misc/shathree.c
+@@ -527,7 +527,7 @@
+ /* Compute a string using sqlite3_vsnprintf() with a maximum length
+ ** of 50 bytes and add it to the hash.
+ */
+-static void hash_step_vformat(
++static void sha3_hash_step_vformat(
+ SHA3Context *p, /* Add content to this context */
+ const char *zFormat,
+ ...
+@@ -623,7 +623,7 @@
+ z = sqlite3_sql(pStmt);
+ if( z ){
+ n = (int)strlen(z);
+- hash_step_vformat(&cx,"S%d:",n);
++ sha3_hash_step_vformat(&cx,"S%d:",n);
+ SHA3Update(&cx,(unsigned char*)z,n);
+ }
+
+@@ -667,14 +667,14 @@
+ case SQLITE_TEXT: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_text(pStmt, i);
+- hash_step_vformat(&cx,"T%d:",n2);
++ sha3_hash_step_vformat(&cx,"T%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+ case SQLITE_BLOB: {
+ int n2 = sqlite3_column_bytes(pStmt, i);
+ const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
+- hash_step_vformat(&cx,"B%d:",n2);
++ sha3_hash_step_vformat(&cx,"B%d:",n2);
+ SHA3Update(&cx, z2, n2);
+ break;
+ }
+@@ -687,17 +687,8 @@
+ }
+
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_shathree_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3ShathreeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "sha3", 1,
+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
+ 0, sha3Func, 0, 0);
+@@ -718,3 +709,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_shathree_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3ShathreeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/sqlar.c
++++ /ext/misc/sqlar.c
+@@ -14,6 +14,8 @@
+ ** for working with sqlar archives and used by the shell tool's built-in
+ ** sqlar support.
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <zlib.h>
+@@ -101,6 +103,20 @@
+ }
+
+
++int sqlite3SqlarInit(sqlite3 *db){
++ int rc = SQLITE_OK;
++ rc = sqlite3_create_function(db, "sqlar_compress", 1,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarCompressFunc, 0, 0);
++ if( rc==SQLITE_OK ){
++ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
++ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
++ sqlarUncompressFunc, 0, 0);
++ }
++ return rc;
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -109,16 +125,10 @@
+ char **pzErrMsg,
+ const sqlite3_api_routines *pApi
+ ){
+- int rc = SQLITE_OK;
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- rc = sqlite3_create_function(db, "sqlar_compress", 1,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarCompressFunc, 0, 0);
+- if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
+- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+- sqlarUncompressFunc, 0, 0);
+- }
+- return rc;
++ return sqlite3SqlarInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
+--- /ext/misc/totype.c
++++ /ext/misc/totype.c
+@@ -491,17 +491,8 @@
+ #pragma warning(default: 4748)
+ #endif
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_totype_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3TotypeInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "tointeger", 1,
+ SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
+ tointegerFunc, 0, 0);
+@@ -512,3 +503,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_totype_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3TotypeInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uint.c
++++ /ext/misc/uint.c
+@@ -78,6 +78,11 @@
+ return (nKey1 - i) - (nKey2 - j);
+ }
+
++int sqlite3UintInit(sqlite3 *db){
++ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
++}
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -88,5 +93,6 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
++ return sqlite3UintInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/uuid.c
++++ /ext/misc/uuid.c
+@@ -206,21 +206,12 @@
+ sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
+ }
+
+-#ifdef _WIN32
+-__declspec(dllexport)
+-#endif
+-int sqlite3_uuid_init(
+- sqlite3 *db,
+- char **pzErrMsg,
+- const sqlite3_api_routines *pApi
+-){
++int sqlite3UuidInit(sqlite3 *db){
+ int rc = SQLITE_OK;
+- SQLITE_EXTENSION_INIT2(pApi);
+- (void)pzErrMsg; /* Unused parameter */
+ rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
+ sqlite3UuidFunc, 0, 0);
+ if( rc==SQLITE_OK ){
+- rc = sqlite3_create_function(db, "uuid_str", 1,
++ rc = sqlite3_create_function(db, "uuid_str", 1,
+ SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
+ 0, sqlite3UuidStrFunc, 0, 0);
+ }
+@@ -231,3 +222,18 @@
+ }
+ return rc;
+ }
++
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
++#ifdef _WIN32
++__declspec(dllexport)
++#endif
++int sqlite3_uuid_init(
++ sqlite3 *db,
++ char **pzErrMsg,
++ const sqlite3_api_routines *pApi
++){
++ SQLITE_EXTENSION_INIT2(pApi);
++ (void)pzErrMsg; /* Unused parameter */
++ return sqlite3UuidInit(db);
++}
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
+--- /ext/misc/zipfile.c
++++ /ext/misc/zipfile.c
+@@ -24,6 +24,8 @@
+ ** * No support for zip64 extensions
+ ** * Only the "inflate/deflate" (zlib) compression method is supported
+ */
++#ifdef SQLITE_HAVE_ZLIB
++
+ #include "sqlite3ext.h"
+ SQLITE_EXTENSION_INIT1
+ #include <stdio.h>
+@@ -2139,7 +2141,7 @@
+ /*
+ ** Register the "zipfile" virtual table.
+ */
+-static int zipfileRegister(sqlite3 *db){
++int sqlite3ZipfileInit(sqlite3 *db){
+ static sqlite3_module zipfileModule = {
+ 1, /* iVersion */
+ zipfileConnect, /* xCreate */
+@@ -2173,9 +2175,10 @@
+ return rc;
+ }
+ #else /* SQLITE_OMIT_VIRTUALTABLE */
+-# define zipfileRegister(x) SQLITE_OK
++# define sqlite3ZipfileInit(x) SQLITE_OK
+ #endif
+
++#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
+ #ifdef _WIN32
+ __declspec(dllexport)
+ #endif
+@@ -2186,5 +2189,8 @@
+ ){
+ SQLITE_EXTENSION_INIT2(pApi);
+ (void)pzErrMsg; /* Unused parameter */
+- return zipfileRegister(db);
++ return sqlite3ZipfileInit(db);
+ }
++#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
++
++#endif /* SQLITE_HAVE_ZLIB */
diff --git a/dev-db/sqlite/files/sqlite-3.34.1-build_2.1.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_2.1.patch
new file mode 100644
index 00000000000..fe5fb7e7805
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_2.1.patch
@@ -0,0 +1,291 @@
+Move some code to libsqlite3.so to avoid duplication.
+Link executables against libsqlite3.so.
+Increase timeout for fuzzcheck.
+Update list of optionally available functions.
+Fix building with dlopen() not available.
+
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /Makefile.in
++++ /Makefile.in
+@@ -313,6 +313,9 @@
+ # Source code for extensions
+ #
+ SRC += \
++ $(TOP)/ext/expert/sqlite3expert.c \
++ $(TOP)/ext/expert/sqlite3expert.h
++SRC += \
+ $(TOP)/ext/fts1/fts1.c \
+ $(TOP)/ext/fts1/fts1.h \
+ $(TOP)/ext/fts1/fts1_hash.c \
+@@ -365,8 +368,29 @@
+ $(TOP)/ext/rbu/sqlite3rbu.h \
+ $(TOP)/ext/rbu/sqlite3rbu.c
+ SRC += \
++ $(TOP)/ext/misc/amatch.c \
++ $(TOP)/ext/misc/appendvfs.c \
++ $(TOP)/ext/misc/carray.c \
++ $(TOP)/ext/misc/completion.c \
++ $(TOP)/ext/misc/csv.c \
++ $(TOP)/ext/misc/dbdata.c \
++ $(TOP)/ext/misc/decimal.c \
++ $(TOP)/ext/misc/eval.c \
++ $(TOP)/ext/misc/fileio.c \
++ $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/json1.c \
+- $(TOP)/ext/misc/stmt.c
++ $(TOP)/ext/misc/nextchar.c \
++ $(TOP)/ext/misc/percentile.c \
++ $(TOP)/ext/misc/regexp.c \
++ $(TOP)/ext/misc/series.c \
++ $(TOP)/ext/misc/sha1.c \
++ $(TOP)/ext/misc/shathree.c \
++ $(TOP)/ext/misc/sqlar.c \
++ $(TOP)/ext/misc/stmt.c \
++ $(TOP)/ext/misc/totype.c \
++ $(TOP)/ext/misc/uint.c \
++ $(TOP)/ext/misc/uuid.c \
++ $(TOP)/ext/misc/zipfile.c
+
+ # Generated source code files
+ #
+@@ -437,35 +461,21 @@
+ # Statically linked extensions
+ #
+ TESTSRC += \
+- $(TOP)/ext/expert/sqlite3expert.c \
+ $(TOP)/ext/expert/test_expert.c \
+- $(TOP)/ext/misc/amatch.c \
+- $(TOP)/ext/misc/carray.c \
+ $(TOP)/ext/misc/cksumvfs.c \
+ $(TOP)/ext/misc/closure.c \
+- $(TOP)/ext/misc/csv.c \
+- $(TOP)/ext/misc/decimal.c \
+- $(TOP)/ext/misc/eval.c \
+ $(TOP)/ext/misc/explain.c \
+- $(TOP)/ext/misc/fileio.c \
+ $(TOP)/ext/misc/fuzzer.c \
+ $(TOP)/ext/fts5/fts5_tcl.c \
+ $(TOP)/ext/fts5/fts5_test_mi.c \
+ $(TOP)/ext/fts5/fts5_test_tok.c \
+- $(TOP)/ext/misc/ieee754.c \
+ $(TOP)/ext/misc/mmapwarm.c \
+- $(TOP)/ext/misc/nextchar.c \
+ $(TOP)/ext/misc/normalize.c \
+- $(TOP)/ext/misc/percentile.c \
+ $(TOP)/ext/misc/prefixes.c \
+- $(TOP)/ext/misc/regexp.c \
+ $(TOP)/ext/misc/remember.c \
+- $(TOP)/ext/misc/series.c \
+ $(TOP)/ext/misc/spellfix.c \
+- $(TOP)/ext/misc/totype.c \
+ $(TOP)/ext/misc/unionvtab.c \
+ $(TOP)/ext/misc/wholenumber.c \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/userauth/userauth.c
+
+ # Source code to the library files needed by the test fixture
+@@ -647,25 +657,25 @@
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la
+ $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
+- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
++ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
+ -rpath "$(TCLLIBDIR)" \
+ -version-info "8:6:8" \
+ -avoid-version
+
+-sqlite3$(TEXE): shell.c sqlite3.c
+- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
+- shell.c sqlite3.c \
+- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
++sqlite3$(TEXE): shell.c libsqlite3.la
++ $(LTLINK) $(READLINE_FLAGS) -o $@ \
++ shell.c libsqlite3.la \
++ $(LIBREADLINE)
+
+-sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
++sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
+
+-dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
+- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
++dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
+
+-scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
++scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
+ $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
+- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/scrub.c libsqlite3.la
+
+ srcck1$(BEXE): $(TOP)/tool/srcck1.c
+ $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
+@@ -776,7 +786,7 @@
+ # Rule to build the amalgamation
+ #
+ sqlite3.lo: sqlite3.c
+- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
++ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
+
+ # Rules to build the LEMON compiler generator
+ #
+@@ -1082,18 +1092,6 @@
+ # Source files that go into making shell.c
+ SHELL_SRC = \
+ $(TOP)/src/shell.c.in \
+- $(TOP)/ext/misc/appendvfs.c \
+- $(TOP)/ext/misc/completion.c \
+- $(TOP)/ext/misc/decimal.c \
+- $(TOP)/ext/misc/fileio.c \
+- $(TOP)/ext/misc/ieee754.c \
+- $(TOP)/ext/misc/series.c \
+- $(TOP)/ext/misc/shathree.c \
+- $(TOP)/ext/misc/sqlar.c \
+- $(TOP)/ext/misc/uint.c \
+- $(TOP)/ext/expert/sqlite3expert.c \
+- $(TOP)/ext/expert/sqlite3expert.h \
+- $(TOP)/ext/misc/zipfile.c \
+ $(TOP)/ext/misc/memtrace.c \
+ $(TOP)/src/test_windirent.c
+
+@@ -1263,11 +1261,11 @@
+
+ # Fuzz testing
+ fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- ./fuzzcheck$(TEXE) $(FUZZDATA)
++ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
+ ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
+- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
++ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
+ valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
+
+ # The veryquick.test TCL tests.
+@@ -1301,24 +1299,23 @@
+ shelltest: $(TESTPROGS)
+ ./testfixture$(TEXT) $(TOP)/test/permutations.test shell
+
+-sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
++sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
+
+-sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
+- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
++ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
+
+-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
++sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
+
+-sqltclsh$(TEXE): sqltclsh.c
+- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
++sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
++ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
+
+-sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
+- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
++sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
++ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
+
+ CHECKER_DEPS =\
+ $(TOP)/tool/mkccode.tcl \
+- sqlite3.c \
+ $(TOP)/src/tclsqlite.c \
+ $(TOP)/ext/repair/sqlite3_checker.tcl \
+ $(TOP)/ext/repair/checkindex.c \
+@@ -1329,36 +1326,36 @@
+ sqlite3_checker.c: $(CHECKER_DEPS)
+ $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
+
+-sqlite3_checker$(TEXE): sqlite3_checker.c
+- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
++sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
++ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
+
+-dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
++dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
+ $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
+- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
++ $(TOP)/ext/misc/dbdump.c libsqlite3.la
+
+-dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
+- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
++dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
++ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
+
+-showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
++showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
+
+-showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
++showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
+
+-showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
++showjournal$(TEXE): $(TOP)/tool/showjournal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
+
+-showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
++showwal$(TEXE): $(TOP)/tool/showwal.c
++ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
+
+ showshm$(TEXE): $(TOP)/tool/showshm.c
+ $(LTLINK) -o $@ $(TOP)/tool/showshm.c
+
+-index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
+- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
++index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
+
+-changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
+- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
++changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
++ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
+
+ changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
+ $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
+@@ -1383,11 +1380,11 @@
+ kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
+ $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
+
+-rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
+- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
++rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
++ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
+
+-loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
+- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
++loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
++ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
+
+ # This target will fail if the SQLite amalgamation contains any exported
+ # symbols that do not begin with "sqlite3_". It is run as part of the
+--- /configure.ac
++++ /configure.ac
+@@ -108,7 +108,7 @@
+ #########
+ # Figure out whether or not we have these functions
+ #
+-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
++AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
+
+ #########
+ # By default, we use the amalgamation (this may be changed below...)
+@@ -582,6 +582,9 @@
+ if test "${enable_load_extension}" = "yes" ; then
+ OPT_FEATURE_FLAGS=""
+ AC_SEARCH_LIBS(dlopen, dl)
++ if test "${ac_cv_search_dlopen}" = "no" ; then
++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
++ fi
+ else
+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
+ fi
diff --git a/dev-db/sqlite/files/sqlite-3.34.1-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.34.1-build_2.2.patch
new file mode 100644
index 00000000000..7bb99c63c15
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.34.1-build_2.2.patch
@@ -0,0 +1,441 @@
+Move some code to libsqlite3.so to avoid duplication.
+Initialize some extensions in libsqlite3.so.
+Update test suite.
+
+SQLite revision: 10e20c0b43500cfb9bbc0eaa061c57514f715d87238f4d835880cd846b9ebd1f
+
+--- /ext/repair/sqlite3_checker.c.in
++++ /ext/repair/sqlite3_checker.c.in
+@@ -2,6 +2,7 @@
+ ** Read an SQLite database file and analyze its space utilization. Generate
+ ** text on standard output.
+ */
++#define SQLITE_CORE 1
+ #define TCLSH_INIT_PROC sqlite3_checker_init_proc
+ #define SQLITE_ENABLE_DBPAGE_VTAB 1
+ #define SQLITE_ENABLE_JSON1 1
+@@ -14,7 +15,7 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+ INCLUDE $ROOT/ext/misc/btreeinfo.c
+ INCLUDE $ROOT/ext/repair/checkindex.c
+--- /src/main.c
++++ /src/main.c
+@@ -50,12 +50,36 @@
+ #ifdef SQLITE_ENABLE_FTS5
+ int sqlite3Fts5Init(sqlite3*);
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++int sqlite3DbdataRegister(sqlite3*);
++#endif
+ #ifdef SQLITE_ENABLE_JSON1
+ int sqlite3Json1Init(sqlite3*);
+ #endif
+ #ifdef SQLITE_ENABLE_STMTVTAB
+ int sqlite3StmtVtabInit(sqlite3*);
+ #endif
++int sqlite3AmatchInit(sqlite3*);
++int sqlite3CarrayInit(sqlite3*);
++int sqlite3CompletionVtabInit(sqlite3*);
++int sqlite3CsvInit(sqlite3*);
++int sqlite3DecimalInit(sqlite3*);
++int sqlite3EvalInit(sqlite3*);
++int sqlite3FileioInit(sqlite3*);
++int sqlite3IeeeInit(sqlite3*);
++int sqlite3NextcharInit(sqlite3*);
++int sqlite3PercentileInit(sqlite3*);
++int sqlite3RegexpInit(sqlite3*);
++int sqlite3SeriesInit(sqlite3*);
++int sqlite3ShaInit(sqlite3*);
++int sqlite3ShathreeInit(sqlite3*);
++int sqlite3TotypeInit(sqlite3*);
++int sqlite3UintInit(sqlite3*);
++int sqlite3UuidInit(sqlite3*);
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++int sqlite3ZipfileInit(sqlite3*);
++int sqlite3SqlarInit(sqlite3*);
++#endif
+
+ /*
+ ** An array of pointers to extension initializer functions for
+@@ -83,6 +107,9 @@
+ #ifdef SQLITE_ENABLE_DBPAGE_VTAB
+ sqlite3DbpageRegister,
+ #endif
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
++ sqlite3DbdataRegister,
++#endif
+ #ifdef SQLITE_ENABLE_DBSTAT_VTAB
+ sqlite3DbstatRegister,
+ #endif
+@@ -96,6 +123,27 @@
+ #ifdef SQLITE_ENABLE_BYTECODE_VTAB
+ sqlite3VdbeBytecodeVtabInit,
+ #endif
++ sqlite3AmatchInit,
++ sqlite3CarrayInit,
++ sqlite3CompletionVtabInit,
++ sqlite3CsvInit,
++ sqlite3DecimalInit,
++ sqlite3EvalInit,
++ sqlite3FileioInit,
++ sqlite3IeeeInit,
++ sqlite3NextcharInit,
++ sqlite3PercentileInit,
++ sqlite3RegexpInit,
++ sqlite3SeriesInit,
++ sqlite3ShaInit,
++ sqlite3ShathreeInit,
++ sqlite3TotypeInit,
++ sqlite3UintInit,
++ sqlite3UuidInit,
++#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
++ sqlite3ZipfileInit,
++ sqlite3SqlarInit,
++#endif
+ };
+
+ #ifndef SQLITE_AMALGAMATION
+--- /src/shell.c.in
++++ /src/shell.c.in
+@@ -69,6 +69,7 @@
+ #include <stdio.h>
+ #include <assert.h>
+ #include "sqlite3.h"
++#include "ext/expert/sqlite3expert.h"
+ typedef sqlite3_int64 i64;
+ typedef sqlite3_uint64 u64;
+ typedef unsigned char u8;
+@@ -135,6 +136,10 @@
+ # define SHELL_USE_LOCAL_GETLINE 1
+ #endif
+
++#ifdef SQLITE_HAVE_ZLIB
++#include <zlib.h>
++#endif
++
+
+ #if defined(_WIN32) || defined(WIN32)
+ # if SQLITE_OS_WINRT
+@@ -1018,25 +1023,7 @@
+ INCLUDE test_windirent.c
+ #define dirent DIRENT
+ #endif
+-INCLUDE ../ext/misc/shathree.c
+-INCLUDE ../ext/misc/fileio.c
+-INCLUDE ../ext/misc/completion.c
+-INCLUDE ../ext/misc/appendvfs.c
+ INCLUDE ../ext/misc/memtrace.c
+-INCLUDE ../ext/misc/uint.c
+-INCLUDE ../ext/misc/decimal.c
+-INCLUDE ../ext/misc/ieee754.c
+-INCLUDE ../ext/misc/series.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE ../ext/misc/zipfile.c
+-INCLUDE ../ext/misc/sqlar.c
+-#endif
+-INCLUDE ../ext/expert/sqlite3expert.h
+-INCLUDE ../ext/expert/sqlite3expert.c
+-
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+-INCLUDE ../ext/misc/dbdata.c
+-#endif
+
+ #if defined(SQLITE_ENABLE_SESSION)
+ /*
+@@ -4608,20 +4595,6 @@
+ #ifndef SQLITE_OMIT_LOAD_EXTENSION
+ sqlite3_enable_load_extension(p->db, 1);
+ #endif
+- sqlite3_fileio_init(p->db, 0, 0);
+- sqlite3_shathree_init(p->db, 0, 0);
+- sqlite3_completion_init(p->db, 0, 0);
+- sqlite3_uint_init(p->db, 0, 0);
+- sqlite3_decimal_init(p->db, 0, 0);
+- sqlite3_ieee_init(p->db, 0, 0);
+- sqlite3_series_init(p->db, 0, 0);
+-#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
+- sqlite3_dbdata_init(p->db, 0, 0);
+-#endif
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_zipfile_init(p->db, 0, 0);
+- sqlite3_sqlar_init(p->db, 0, 0);
+-#endif
+ sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
+ shellAddSchemaName, 0, 0);
+ sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
+@@ -6644,8 +6617,6 @@
+ );
+ goto end_ar_command;
+ }
+- sqlite3_fileio_init(cmd.db, 0, 0);
+- sqlite3_sqlar_init(cmd.db, 0, 0);
+ sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
+ shellPutsFunc, 0, 0);
+
+@@ -11076,6 +11047,7 @@
+ #endif
+ }
+ data.out = stdout;
++ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+
+ /* Go ahead and open the database file if it already exists. If the
+--- /src/test_config.c
++++ /src/test_config.c
+@@ -353,6 +353,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_DECLTYPE
+ Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -540,6 +542,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_REINDEX
+ Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
+ #else
+@@ -662,6 +666,8 @@
+ Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
+ #endif
+
++ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
++
+ #ifdef SQLITE_OMIT_UTF16
+ Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
+ #else
+--- /test/e_expr.test
++++ /test/e_expr.test
+@@ -1079,7 +1079,7 @@
+ #
+ # There is a regexp function if ICU is enabled though.
+ #
+-ifcapable !icu {
++ifcapable !icu&&!regexp {
+ do_catchsql_test e_expr-18.1.1 {
+ SELECT regexp('abc', 'def')
+ } {1 {no such function: regexp}}
+--- /test/icu.test
++++ /test/icu.test
+@@ -41,7 +41,7 @@
+ #
+ test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
+ test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
+- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
++ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
+ test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
+ test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
+
+--- /test/pragma.test
++++ /test/pragma.test
+@@ -1370,17 +1370,62 @@
+ } ;# ifcapable trigger
+
+ ifcapable schema_pragmas {
+- do_test pragma-11.1 {
+- execsql2 {
+- pragma collation_list;
++ ifcapable decimal {
++ ifcapable uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
+ }
+- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
+- do_test pragma-11.2 {
+- db collate New_Collation blah...
+- execsql {
+- pragma collation_list;
++ ifcapable !uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
+ }
+- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ }
++ ifcapable !decimal {
++ ifcapable uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
++ }
++ ifcapable !uint {
++ do_test pragma-11.1 {
++ execsql2 {
++ pragma collation_list;
++ }
++ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
++ do_test pragma-11.2 {
++ db collate New_Collation blah...
++ execsql {
++ pragma collation_list;
++ }
++ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
++ }
++ }
+ }
+
+ ifcapable schema_pragmas&&tempdb {
+--- /test/sessionfuzz.c
++++ /test/sessionfuzz.c
+@@ -698,49 +698,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <assert.h>
+-#ifndef OMIT_ZLIB
+-#include "zlib.h"
+-#endif
+-
+-/*
+-** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
+-**
+-** Parameter SZ is interpreted as an integer. If it is less than or
+-** equal to zero, then this function returns a copy of X. Or, if
+-** SZ is equal to the size of X when interpreted as a blob, also
+-** return a copy of X. Otherwise, decompress blob X using zlib
+-** utility function uncompress() and return the results (another
+-** blob).
+-*/
+-static void sqlarUncompressFunc(
+- sqlite3_context *context,
+- int argc,
+- sqlite3_value **argv
+-){
+-#ifdef OMIT_ZLIB
+- sqlite3_result_value(context, argv[0]);
+-#else
+- uLong nData;
+- uLongf sz;
+-
+- assert( argc==2 );
+- sz = sqlite3_value_int(argv[1]);
+-
+- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
+- sqlite3_result_value(context, argv[0]);
+- }else{
+- const Bytef *pData= sqlite3_value_blob(argv[0]);
+- Bytef *pOut = sqlite3_malloc(sz);
+- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
+- sqlite3_result_error(context, "error in uncompress()", -1);
+- }else{
+- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
+- }
+- sqlite3_free(pOut);
+- }
+-#endif
+-}
+-
+
+ /* Run a chunk of SQL. If any errors happen, print an error message
+ ** and exit.
+--- /tool/mksqlite3c.tcl
++++ /tool/mksqlite3c.tcl
+@@ -129,6 +129,7 @@
+ rtree.h
+ sqlite3session.h
+ sqlite3.h
++ sqlite3expert.h
+ sqlite3ext.h
+ sqlite3rbu.h
+ sqliteicu.h
+@@ -416,6 +417,28 @@
+ sqlite3session.c
+ fts5.c
+ stmt.c
++ amatch.c
++ appendvfs.c
++ carray.c
++ completion.c
++ csv.c
++ dbdata.c
++ decimal.c
++ eval.c
++ fileio.c
++ ieee754.c
++ nextchar.c
++ percentile.c
++ regexp.c
++ series.c
++ sha1.c
++ shathree.c
++ sqlar.c
++ sqlite3expert.c
++ totype.c
++ uint.c
++ uuid.c
++ zipfile.c
+ } {
+ copy_file tsrc/$file
+ }
+--- /tool/sqlite3_analyzer.c.in
++++ /tool/sqlite3_analyzer.c.in
+@@ -14,9 +14,6 @@
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+ #define SQLITE_OMIT_LOAD_EXTENSION 1
+-#ifndef USE_EXTERNAL_SQLITE
+-INCLUDE sqlite3.c
+-#endif
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
+--- /tool/sqltclsh.c.in
++++ /tool/sqltclsh.c.in
+@@ -27,21 +27,13 @@
+ #define SQLITE_OMIT_SHARED_CACHE 1
+ #define SQLITE_DEFAULT_MEMSTATUS 0
+ #define SQLITE_MAX_EXPR_DEPTH 0
+-INCLUDE sqlite3.c
+-INCLUDE $ROOT/ext/misc/appendvfs.c
+-#ifdef SQLITE_HAVE_ZLIB
+-INCLUDE $ROOT/ext/misc/zipfile.c
+-INCLUDE $ROOT/ext/misc/sqlar.c
+-#endif
++#include "sqlite3.h"
+ INCLUDE $ROOT/src/tclsqlite.c
+
+ const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
+ (void)interp;
++ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
+ sqlite3_appendvfs_init(0,0,0);
+-#ifdef SQLITE_HAVE_ZLIB
+- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
+- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
+-#endif
+
+ return
+ BEGIN_STRING
diff --git a/dev-db/sqlite/sqlite-3.34.1.ebuild b/dev-db/sqlite/sqlite-3.34.1.ebuild
new file mode 100644
index 00000000000..c76cfd53e3d
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.34.1.ebuild
@@ -0,0 +1,427 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+if [[ "${PV}" != "9999" ]]; then
+ SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+ DOC_PV="${SRC_PV}"
+ # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+fi
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+if [[ "${PV}" == "9999" ]]; then
+ SRC_URI=""
+else
+ SRC_URI="https://sqlite.org/2021/${PN}-src-${SRC_PV}.zip
+ doc? ( https://sqlite.org/2021/${PN}-doc-${DOC_PV}.zip )"
+fi
+
+LICENSE="public-domain"
+SLOT="3"
+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"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+if [[ "${PV}" == "9999" ]]; then
+ PROPERTIES="live"
+fi
+RESTRICT="!test? ( test )"
+
+if [[ "${PV}" == "9999" ]]; then
+ BDEPEND=">=dev-lang/tcl-8.6:0
+ dev-vcs/fossil"
+else
+ BDEPEND="app-arch/unzip
+ >=dev-lang/tcl-8.6:0"
+fi
+RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )"
+DEPEND="${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
+
+if [[ "${PV}" == "9999" ]]; then
+ S="${WORKDIR}/${PN}"
+else
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+fi
+
+_fossil_fetch() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local repo_uri="${2}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ pushd "${T}/fossil/${repo_id}" > /dev/null || die
+
+ if [[ -n "${EVCS_OFFLINE}" ]]; then
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+ else
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
+ fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
+ einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
+ fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
+ echo
+ fi
+
+ (
+ addwrite "${distdir}"
+ mkdir -p "${distdir}/fossil-src/${repo_id}" || die
+ cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
+ )
+ fi
+
+ popd > /dev/null || die
+}
+
+_fossil_checkout() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local branch_or_commit="${2}"
+ local target_directory="${3}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+
+ if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
+ fi
+
+ mkdir "${target_directory}" || die
+ pushd "${target_directory}" > /dev/null || die
+
+ einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
+ fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
+ echo
+
+ popd > /dev/null || die
+}
+
+fossil_fetch() {
+ local repo_id="${1}"
+ local repo_uri="${2}"
+ local target_directory="${3}"
+
+ local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
+
+ _fossil_fetch "${repo_id}" "${repo_uri}"
+ _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
+}
+
+src_unpack() {
+ if [[ "${PV}" == "9999" ]]; then
+ fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
+ if use doc; then
+ fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
+ fi
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ eapply "${FILESDIR}/"${PN}-3.34.1-build_{1.1,1.2,2.1,2.2}.patch
+
+ eapply_user
+
+ eautoreconf
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
+ local options=()
+
+ options+=(
+ --enable-load-extension
+ --enable-threadsafe
+ )
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support bytecode and tables_used virtual tables.
+ # https://sqlite.org/compile.html#enable_bytecode_vtab
+ # https://sqlite.org/bytecodevtab.html
+ append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
+
+ # Support column metadata functions.
+ # https://sqlite.org/compile.html#enable_column_metadata
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ # https://sqlite.org/dbpage.html
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/compile.html#enable_dbstat_vtab
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/compile.html#enable_fts3
+ # https://sqlite.org/compile.html#enable_fts3_parenthesis
+ # https://sqlite.org/compile.html#enable_fts4
+ # https://sqlite.org/compile.html#enable_fts5
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=(--enable-fts5)
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support JSON1 extension.
+ # https://sqlite.org/compile.html#enable_json1
+ # https://sqlite.org/json1.html
+ append-cppflags -DSQLITE_ENABLE_JSON1
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/compile.html#enable_memsys5
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/compile.html#enable_offset_sql_func
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/compile.html#enable_preupdate_hook
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/compile.html#enable_rbu
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/compile.html#enable_rtree
+ # https://sqlite.org/compile.html#enable_geopoly
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support Session extension.
+ # https://sqlite.org/compile.html#enable_session
+ # https://sqlite.org/sessionintro.html
+ append-cppflags -DSQLITE_ENABLE_SESSION
+
+ # Support scan status functions.
+ # https://sqlite.org/compile.html#enable_stmt_scanstatus
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/compile.html#enable_stmtvtab
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/compile.html#enable_unlock_notify
+ # https://sqlite.org/c3ref/unlock_notify.html
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
+ # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support soundex() function.
+ # https://sqlite.org/compile.html#soundex
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/compile.html#use_uri
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ # debug USE flag.
+ options+=($(use_enable debug))
+
+ # icu USE flag.
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+
+ # readline USE flag.
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+ if use readline; then
+ options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
+ fi
+
+ # secure-delete USE flag.
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/compile.html#secure_delete
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ # static-libs USE flag.
+ options+=($(use_enable static-libs static))
+
+ # tcl, test, tools USE flags.
+ options+=(--enable-tcl)
+
+ if [[ "${CHOST}" == *-mint* ]]; then
+ # sys/mman.h not available in MiNTLib.
+ # https://sqlite.org/compile.html#omit_wal
+ append-cppflags -DSQLITE_OMIT_WAL
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+
+ if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
+ emake tclsqlite3.c
+
+ local build_directory="$(pwd)"
+ build_directory="${build_directory##*/}"
+
+ mkdir "${WORKDIR}/${PN}-doc-build" || die
+ pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
+
+ 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
+ rmdir doc/matrix{/*,} || die
+
+ popd > /dev/null || die
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ if [[ "${PV}" == "9999" ]]; then
+ pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
+ else
+ pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
+ fi
+
+ find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
+ if [[ "${PV}" != "9999" ]]; then
+ rm search search.d/admin || die
+ rmdir search.d || die
+ find -name "*~" -delete || die
+ fi
+
+ (
+ docinto html
+ dodoc -r *
+ )
+
+ popd > /dev/null || die
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2021-04-02 15:00 Mike Gilbert
0 siblings, 0 replies; 35+ messages in thread
From: Mike Gilbert @ 2021-04-02 15:00 UTC (permalink / raw
To: gentoo-commits
commit: 648611c35f8bdad94062e54b39cdffc63acc0a50
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Thu Apr 1 22:00:00 2021 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 2 15:00:48 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=648611c3
dev-db/sqlite: Delete old versions (3.33.0, 3.34.0).
Bug: https://bugs.gentoo.org/777990
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org>
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
dev-db/sqlite/Manifest | 4 -
dev-db/sqlite/files/sqlite-3.33.0-build_1.1.patch | 413 ------------------
dev-db/sqlite/files/sqlite-3.33.0-build_1.2.patch | 422 ------------------
dev-db/sqlite/files/sqlite-3.33.0-build_2.1.patch | 286 -------------
dev-db/sqlite/files/sqlite-3.33.0-build_2.2.patch | 434 -------------------
dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch | 375 ----------------
dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch | 500 ----------------------
dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch | 291 -------------
dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch | 441 -------------------
dev-db/sqlite/sqlite-3.33.0.ebuild | 374 ----------------
dev-db/sqlite/sqlite-3.34.0.ebuild | 434 -------------------
11 files changed, 3974 deletions(-)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 3ae6212d2ba..aa080c5bd0a 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,12 +1,8 @@
-DIST sqlite-doc-3330000.zip 9834159 BLAKE2B f67155a8ce8e46c2fbc0a4e35722d1fcad86e905a15230adc70732cee267b6b2002c7499883b938129aaa908b99634e4214360e9d1dbdae333b09060de24530e SHA512 14a3cccb4ff6af57738990eeadd37a1b827f89c9c1b16201c62ca5bb9301d39223d48677b9c269ce332210e5c9ae3f42aa0f9de7d79b38acb9809c732d038368
-DIST sqlite-doc-3340000.zip 10069888 BLAKE2B 343df62bc8b75d57dffe69c779cceb856d9e94a5b2a77c3a972761eedd8b4b0f5f8849102ec271652c3aa4039df75d7f2e503fd04b0547be03e024fdfbd894ac SHA512 1bdf20030e656ec4ce38a264c8ef7a95c9f2731cd7d756a44b35b6c68827e8aba92018007139ee09d1c27b34bcd72bff1a201dc3f30aa13e96120af5d58e835e
DIST sqlite-doc-3340100.zip 10074559 BLAKE2B 66aa999d87b7f3c994c289eda320d6a4e371b0a6a2ab8bcebde540aa955f3bdf4f00b739ca32aa913685cd35a88ee83bebd7fa43a0c148614e9086a1d3f5652a SHA512 20cbb9f05cd329bf7aa2877431781e46192544806042f4104e4eb0e87d84cd2dfc02c7ff226d4bef9bb2c6a69cc612201844d116abe99b0cfed9602adf243a60
DIST sqlite-doc-3350000.zip 10165959 BLAKE2B e24ae04764617d07fafc82f4c27d96b853df77de2a945109c2ff28abd3b61f8bdd318756d14b8d20e22a0dff05fcca26c9a8c9972f600af0a996cd8e13478c9d SHA512 f6b92cf1a087a97071c55605e85676c4d76b9435a1a433e4663ff3d7937557d72e4fb99931a14abda9ab3dece654da09d10f7ca2560ca3e0972e4b7690997132
DIST sqlite-doc-3350100.zip 10175402 BLAKE2B c8ac8814837dc88320ae0f6973b5ec0b815a4fbfefae26ea2b5365485decb33e9e4add9097865819a5facb2568198535166dd8c492cb621ec845d8bfc2056721 SHA512 4843d8186f4cc98fc9ad5459a1b987d4512e72ceeeb985372c22d44f35856e33ee41ab0fa4372c273cfa4730f9461dc3f359ba50f26e53a0c7abd87e70cdfe86
DIST sqlite-doc-3350200.zip 10182547 BLAKE2B f50b04495aa79eca1ce935c8a96fe83d0a415f15ec55fda0cd982d02b4473ba8f5175c97d9816de2b79526787bc958b3be5e1234994e5f00d8ee1b432627391e SHA512 7ef973b804d059cf00c759a0ae001b7714df0472398e7cd55e34f59222df816a36511cefd15fa99abf67dec4291ee6babbc12bd87855194608ff556a5c1182ae
DIST sqlite-doc-3350300.zip 10197905 BLAKE2B ffe3e800fa7c9066c6f180a5989cceb89dfff81729258278256901eee717872ef6993a8bb30ebb6c1de5a66c128009c21494ec9bf0011accdd6f8beef712213a SHA512 260981abaf54f452777e37e99474d100010ec2340c740f78445b7794fa17bcbb814e90f004f870d929a9ccab1d89417ee3d65ffe3b65dbf511ca1de7b6a6a4c8
-DIST sqlite-src-3330000.zip 12591089 BLAKE2B 14888bca229683e97c4666f8efb535be5bd3e322de0089f0175ba15e038016be3a3cc00b5bfa8c111538116914cf6d8439839ca5d1e20339b184e547ddf260a4 SHA512 3260e3e03ee2f6a4ff2bc4ea4bada5a1497afeca33878c155a8005824970c6c1eb8a2db58eb3023cab084af475fadb81d1c3c9892ae92c07f884881e6602e173
-DIST sqlite-src-3340000.zip 12623425 BLAKE2B 548293cf0166407727cd068804eb5e1ce62f654533c88a87b71a6ff62da37eb2af21b89b8d63ee677777ca917e0d685ddcf9b8d5c3c8b2a2b787d71da8e5a161 SHA512 520fbca59da02452e2861a140bde891aedfc8254eafaa6894e8d845369d60d6a921595a411efb2611c0f7b0cadd69a713dcdaaeaad1e4254e9fd9a6efde07f91
DIST sqlite-src-3340100.zip 12623711 BLAKE2B 08c98d0c56d46fe909f449f322002ae4d69fd952930d2f04514988a939b31744a13aea85935d84bc05db52faca1aad6a70d7c31e7da0e396bb649685a49699bb SHA512 5ed02fe609b3d08c3297cc43b21e6ee3f56fb51a6616ac391a0e50cd1677dbad03c6bf9bf9c8409cf94b83b16fe6b6e4a112640b18c7d4fd95328066da3c3943
DIST sqlite-src-3350000.zip 12814378 BLAKE2B f77880bfb335da078623841f9d9d9fc690085630757d8d8e3d40d42646902f809febf8dcc5048d38be0e2d74c0114c35f09789bc261e51d49f9685201f6d1297 SHA512 4b77d963092a6aed61b50e59450edf2af187f16b185b05ca54d81c3eecf71b1cb9bc2883a8aadeb971fcebe343fa430ea788aedb77e3712c8b39d4892c93a797
DIST sqlite-src-3350100.zip 12814875 BLAKE2B bc4f6913ce93c32e1c6fbd39f45666a14476096b09f7534047aee56cbb18e949bf5225c080c813281a0abae9198a35165161393db39df0c2af2a92138b4604d9 SHA512 004bcca9c2ae883b05d8f15c8bf28a12fd2fdf9527d1560d137f8e2570c153d14ea5405c500d0e79966a3881a516df4d9ed07be751712f1584df411e86c60977
diff --git a/dev-db/sqlite/files/sqlite-3.33.0-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.33.0-build_1.1.patch
deleted file mode 100644
index 6ee7396223d..00000000000
--- a/dev-db/sqlite/files/sqlite-3.33.0-build_1.1.patch
+++ /dev/null
@@ -1,413 +0,0 @@
-Add initialization functions for internal usage in libsqlite3.so.
-
---- /ext/misc/amatch.c
-+++ /ext/misc/amatch.c
-@@ -1480,9 +1480,18 @@
-
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-
-+int sqlite3AmatchInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+ rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
-+#endif /* SQLITE_OMIT_VIRTUALTABLE */
-+ return rc;
-+}
-+
- /*
- ** Register the amatch virtual table
- */
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -1491,11 +1500,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Not used */
--#ifndef SQLITE_OMIT_VIRTUALTABLE
-- rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
--#endif /* SQLITE_OMIT_VIRTUALTABLE */
-- return rc;
-+ return sqlite3AmatchInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/carray.c
-+++ /ext/misc/carray.c
-@@ -383,16 +383,8 @@
-
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_carray_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3CarrayInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
- #ifndef SQLITE_OMIT_VIRTUALTABLE
- rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
- #ifdef SQLITE_TEST
-@@ -404,3 +396,18 @@
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_carray_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3CarrayInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/completion.c
-+++ /ext/misc/completion.c
-@@ -483,12 +483,13 @@
- return rc;
- }
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
- int sqlite3_completion_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-+ sqlite3 *db,
-+ char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
- int rc = SQLITE_OK;
-@@ -499,3 +500,4 @@
- #endif
- return rc;
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/csv.c
-+++ /ext/misc/csv.c
-@@ -928,6 +928,22 @@
- #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
-
-
-+int sqlite3CsvInit(sqlite3 *db){
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+ int rc;
-+ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
-+#ifdef SQLITE_TEST
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-+ }
-+#endif
-+ return rc;
-+#else
-+ return SQLITE_OK;
-+#endif
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -941,17 +957,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
--#ifndef SQLITE_OMIT_VIRTUALTABLE
-- int rc;
- SQLITE_EXTENSION_INIT2(pApi);
-- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
--#ifdef SQLITE_TEST
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-- }
--#endif
-- return rc;
--#else
-- return SQLITE_OK;
--#endif
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3CsvInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/dbdata.c
-+++ /ext/misc/dbdata.c
-@@ -803,7 +803,7 @@
- /*
- ** Invoke this routine to register the "sqlite_dbdata" virtual table module
- */
--static int sqlite3DbdataRegister(sqlite3 *db){
-+int sqlite3DbdataRegister(sqlite3 *db){
- static sqlite3_module dbdata_module = {
- 0, /* iVersion */
- 0, /* xCreate */
-@@ -838,6 +838,7 @@
- return rc;
- }
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -849,3 +850,4 @@
- SQLITE_EXTENSION_INIT2(pApi);
- return sqlite3DbdataRegister(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/decimal.c
-+++ /ext/misc/decimal.c
-@@ -590,14 +590,7 @@
- decimal_free(pB);
- }
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_decimal_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3DecimalInit(sqlite3 *db){
- int rc = SQLITE_OK;
- static const struct {
- const char *zFuncName;
-@@ -611,10 +604,6 @@
- { "decimal_mul", 2, decimalMulFunc },
- };
- unsigned int i;
-- (void)pzErrMsg; /* Unused parameter */
--
-- SQLITE_EXTENSION_INIT2(pApi);
--
- for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
- rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
- SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
-@@ -632,3 +621,20 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_decimal_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ (void)pzErrMsg; /* Unused parameter */
-+
-+ SQLITE_EXTENSION_INIT2(pApi);
-+
-+ return sqlite3DecimalInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/eval.c
-+++ /ext/misc/eval.c
-@@ -102,6 +102,20 @@
- }
-
-
-+int sqlite3EvalInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "eval", 1,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sqlEvalFunc, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "eval", 2,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sqlEvalFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -110,16 +124,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "eval", 1,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sqlEvalFunc, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "eval", 2,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sqlEvalFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3EvalInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/fileio.c
-+++ /ext/misc/fileio.c
-@@ -340,7 +340,7 @@
- ** This function does the work for the writefile() UDF. Refer to
- ** header comments at the top of this file for details.
- */
--static int writeFile(
-+static int writeFileContents(
- sqlite3_context *pCtx, /* Context to return bytes written in */
- const char *zFile, /* File to write */
- sqlite3_value *pData, /* Data to write */
-@@ -480,10 +480,10 @@
- mtime = sqlite3_value_int64(argv[3]);
- }
-
-- res = writeFile(context, zFile, argv[1], mode, mtime);
-+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
- if( res==1 && errno==ENOENT ){
- if( makeDirectory(zFile)==SQLITE_OK ){
-- res = writeFile(context, zFile, argv[1], mode, mtime);
-+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
- }
- }
-
-@@ -970,18 +970,9 @@
- # define fsdirRegister(x) SQLITE_OK
- #endif
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_fileio_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3FileioInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "readfile", 1,
-+ rc = sqlite3_create_function(db, "readfile", 1,
- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
- readfileFunc, 0, 0);
- if( rc==SQLITE_OK ){
-@@ -998,3 +989,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_fileio_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3FileioInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/ieee754.c
-+++ /ext/misc/ieee754.c
-@@ -245,14 +245,7 @@
- }
-
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_ieee_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3IeeeInit(sqlite3 *db){
- static const struct {
- char *zFName;
- int nArg;
-@@ -269,13 +262,26 @@
- };
- unsigned int i;
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
-- rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
-+ rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
- SQLITE_UTF8|SQLITE_INNOCUOUS,
- (void*)&aFunc[i].iAux,
- aFunc[i].xFunc, 0, 0);
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_ieee_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3IeeeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/nextchar.c
-+++ /ext/misc/nextchar.c
-@@ -286,17 +286,8 @@
- sqlite3_free(c.aResult);
- }
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_nextchar_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3NextcharInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "next_char", 3,
- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
- nextCharFunc, 0, 0);
-@@ -312,3 +303,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_nextchar_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3NextcharInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
diff --git a/dev-db/sqlite/files/sqlite-3.33.0-build_1.2.patch b/dev-db/sqlite/files/sqlite-3.33.0-build_1.2.patch
deleted file mode 100644
index 8f6fd6f7617..00000000000
--- a/dev-db/sqlite/files/sqlite-3.33.0-build_1.2.patch
+++ /dev/null
@@ -1,422 +0,0 @@
-Add initialization functions for internal usage in libsqlite3.so.
-
---- /ext/misc/percentile.c
-+++ /ext/misc/percentile.c
-@@ -202,6 +202,15 @@
- }
-
-
-+int sqlite3PercentileInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "percentile", 2,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ 0, percentStep, percentFinal);
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -210,11 +219,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "percentile", 2,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- 0, percentStep, percentFinal);
-- return rc;
-+ return sqlite3PercentileInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/regexp.c
-+++ /ext/misc/regexp.c
-@@ -740,10 +740,18 @@
- }
- }
-
-+int sqlite3RegexpInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
-+ 0, re_sql_func, 0, 0);
-+ return rc;
-+}
-+
- /*
- ** Invoke this routine to register the regexp() function with the
- ** SQLite database connection.
- */
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -752,9 +760,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
-- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
-- 0, re_sql_func, 0, 0);
-- return rc;
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3RegexpInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/sha1.c
-+++ /ext/misc/sha1.c
-@@ -175,7 +175,7 @@
- }
-
- /* Compute a string using sqlite3_vsnprintf() and hash it */
--static void hash_step_vformat(
-+static void sha1_hash_step_vformat(
- SHA1Context *p, /* Add content to this context */
- const char *zFormat,
- ...
-@@ -306,7 +306,7 @@
- nCol = sqlite3_column_count(pStmt);
- z = sqlite3_sql(pStmt);
- n = (int)strlen(z);
-- hash_step_vformat(&cx,"S%d:",n);
-+ sha1_hash_step_vformat(&cx,"S%d:",n);
- hash_step(&cx,(unsigned char*)z,n);
-
- /* Compute a hash over the result of the query */
-@@ -349,14 +349,14 @@
- case SQLITE_TEXT: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_text(pStmt, i);
-- hash_step_vformat(&cx,"T%d:",n2);
-+ sha1_hash_step_vformat(&cx,"T%d:",n2);
- hash_step(&cx, z2, n2);
- break;
- }
- case SQLITE_BLOB: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
-- hash_step_vformat(&cx,"B%d:",n2);
-+ sha1_hash_step_vformat(&cx,"B%d:",n2);
- hash_step(&cx, z2, n2);
- break;
- }
-@@ -370,6 +370,20 @@
- }
-
-
-+int sqlite3ShaInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "sha1", 1,
-+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
-+ 0, sha1Func, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "sha1_query", 1,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sha1QueryFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -378,16 +392,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "sha1", 1,
-- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
-- 0, sha1Func, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "sha1_query", 1,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sha1QueryFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3ShaInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/shathree.c
-+++ /ext/misc/shathree.c
-@@ -527,7 +527,7 @@
- /* Compute a string using sqlite3_vsnprintf() with a maximum length
- ** of 50 bytes and add it to the hash.
- */
--static void hash_step_vformat(
-+static void sha3_hash_step_vformat(
- SHA3Context *p, /* Add content to this context */
- const char *zFormat,
- ...
-@@ -622,7 +622,7 @@
- nCol = sqlite3_column_count(pStmt);
- z = sqlite3_sql(pStmt);
- n = (int)strlen(z);
-- hash_step_vformat(&cx,"S%d:",n);
-+ sha3_hash_step_vformat(&cx,"S%d:",n);
- SHA3Update(&cx,(unsigned char*)z,n);
-
- /* Compute a hash over the result of the query */
-@@ -665,14 +665,14 @@
- case SQLITE_TEXT: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_text(pStmt, i);
-- hash_step_vformat(&cx,"T%d:",n2);
-+ sha3_hash_step_vformat(&cx,"T%d:",n2);
- SHA3Update(&cx, z2, n2);
- break;
- }
- case SQLITE_BLOB: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
-- hash_step_vformat(&cx,"B%d:",n2);
-+ sha3_hash_step_vformat(&cx,"B%d:",n2);
- SHA3Update(&cx, z2, n2);
- break;
- }
-@@ -685,17 +685,8 @@
- }
-
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_shathree_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3ShathreeInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "sha3", 1,
- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
- 0, sha3Func, 0, 0);
-@@ -716,3 +707,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_shathree_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3ShathreeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/sqlar.c
-+++ /ext/misc/sqlar.c
-@@ -14,6 +14,8 @@
- ** for working with sqlar archives and used by the shell tool's built-in
- ** sqlar support.
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <zlib.h>
-@@ -101,6 +103,20 @@
- }
-
-
-+int sqlite3SqlarInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "sqlar_compress", 1,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ sqlarCompressFunc, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ sqlarUncompressFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -109,16 +125,10 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "sqlar_compress", 1,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- sqlarCompressFunc, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- sqlarUncompressFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3SqlarInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
-+
-+#endif /* SQLITE_HAVE_ZLIB */
---- /ext/misc/totype.c
-+++ /ext/misc/totype.c
-@@ -491,17 +491,8 @@
- #pragma warning(default: 4748)
- #endif
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_totype_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3TotypeInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "tointeger", 1,
- SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
- tointegerFunc, 0, 0);
-@@ -512,3 +503,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_totype_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3TotypeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/uint.c
-+++ /ext/misc/uint.c
-@@ -78,6 +78,11 @@
- return (nKey1 - i) - (nKey2 - j);
- }
-
-+int sqlite3UintInit(sqlite3 *db){
-+ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -88,5 +93,6 @@
- ){
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
-+ return sqlite3UintInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/uuid.c
-+++ /ext/misc/uuid.c
-@@ -206,21 +206,12 @@
- sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
- }
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_uuid_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3UuidInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
- sqlite3UuidFunc, 0, 0);
- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "uuid_str", 1,
-+ rc = sqlite3_create_function(db, "uuid_str", 1,
- SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
- 0, sqlite3UuidStrFunc, 0, 0);
- }
-@@ -231,3 +222,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_uuid_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3UuidInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/zipfile.c
-+++ /ext/misc/zipfile.c
-@@ -24,6 +24,8 @@
- ** * No support for zip64 extensions
- ** * Only the "inflate/deflate" (zlib) compression method is supported
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <stdio.h>
-@@ -2137,7 +2139,7 @@
- /*
- ** Register the "zipfile" virtual table.
- */
--static int zipfileRegister(sqlite3 *db){
-+int sqlite3ZipfileInit(sqlite3 *db){
- static sqlite3_module zipfileModule = {
- 1, /* iVersion */
- zipfileConnect, /* xCreate */
-@@ -2171,9 +2173,10 @@
- return rc;
- }
- #else /* SQLITE_OMIT_VIRTUALTABLE */
--# define zipfileRegister(x) SQLITE_OK
-+# define sqlite3ZipfileInit(x) SQLITE_OK
- #endif
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -2184,5 +2187,8 @@
- ){
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- return zipfileRegister(db);
-+ return sqlite3ZipfileInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
-+
-+#endif /* SQLITE_HAVE_ZLIB */
diff --git a/dev-db/sqlite/files/sqlite-3.33.0-build_2.1.patch b/dev-db/sqlite/files/sqlite-3.33.0-build_2.1.patch
deleted file mode 100644
index 29040526150..00000000000
--- a/dev-db/sqlite/files/sqlite-3.33.0-build_2.1.patch
+++ /dev/null
@@ -1,286 +0,0 @@
-Move some code to libsqlite3.so to avoid duplication.
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Update list of optionally available functions.
-Fix building with dlopen() not available.
-
---- /Makefile.in
-+++ /Makefile.in
-@@ -313,6 +313,9 @@
- # Source code for extensions
- #
- SRC += \
-+ $(TOP)/ext/expert/sqlite3expert.c \
-+ $(TOP)/ext/expert/sqlite3expert.h
-+SRC += \
- $(TOP)/ext/fts1/fts1.c \
- $(TOP)/ext/fts1/fts1.h \
- $(TOP)/ext/fts1/fts1_hash.c \
-@@ -365,8 +368,28 @@
- $(TOP)/ext/rbu/sqlite3rbu.h \
- $(TOP)/ext/rbu/sqlite3rbu.c
- SRC += \
-+ $(TOP)/ext/misc/amatch.c \
-+ $(TOP)/ext/misc/appendvfs.c \
-+ $(TOP)/ext/misc/carray.c \
-+ $(TOP)/ext/misc/completion.c \
-+ $(TOP)/ext/misc/csv.c \
-+ $(TOP)/ext/misc/dbdata.c \
-+ $(TOP)/ext/misc/decimal.c \
-+ $(TOP)/ext/misc/eval.c \
-+ $(TOP)/ext/misc/fileio.c \
-+ $(TOP)/ext/misc/ieee754.c \
- $(TOP)/ext/misc/json1.c \
-- $(TOP)/ext/misc/stmt.c
-+ $(TOP)/ext/misc/nextchar.c \
-+ $(TOP)/ext/misc/percentile.c \
-+ $(TOP)/ext/misc/regexp.c \
-+ $(TOP)/ext/misc/sha1.c \
-+ $(TOP)/ext/misc/shathree.c \
-+ $(TOP)/ext/misc/sqlar.c \
-+ $(TOP)/ext/misc/stmt.c \
-+ $(TOP)/ext/misc/totype.c \
-+ $(TOP)/ext/misc/uint.c \
-+ $(TOP)/ext/misc/uuid.c \
-+ $(TOP)/ext/misc/zipfile.c
-
- # Generated source code files
- #
-@@ -437,34 +460,21 @@
- # Statically linked extensions
- #
- TESTSRC += \
-- $(TOP)/ext/expert/sqlite3expert.c \
- $(TOP)/ext/expert/test_expert.c \
-- $(TOP)/ext/misc/amatch.c \
-- $(TOP)/ext/misc/carray.c \
- $(TOP)/ext/misc/closure.c \
-- $(TOP)/ext/misc/csv.c \
-- $(TOP)/ext/misc/decimal.c \
-- $(TOP)/ext/misc/eval.c \
- $(TOP)/ext/misc/explain.c \
-- $(TOP)/ext/misc/fileio.c \
- $(TOP)/ext/misc/fuzzer.c \
- $(TOP)/ext/fts5/fts5_tcl.c \
- $(TOP)/ext/fts5/fts5_test_mi.c \
- $(TOP)/ext/fts5/fts5_test_tok.c \
-- $(TOP)/ext/misc/ieee754.c \
- $(TOP)/ext/misc/mmapwarm.c \
-- $(TOP)/ext/misc/nextchar.c \
- $(TOP)/ext/misc/normalize.c \
-- $(TOP)/ext/misc/percentile.c \
- $(TOP)/ext/misc/prefixes.c \
-- $(TOP)/ext/misc/regexp.c \
- $(TOP)/ext/misc/remember.c \
- $(TOP)/ext/misc/series.c \
- $(TOP)/ext/misc/spellfix.c \
-- $(TOP)/ext/misc/totype.c \
- $(TOP)/ext/misc/unionvtab.c \
- $(TOP)/ext/misc/wholenumber.c \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/userauth/userauth.c
-
- # Source code to the library files needed by the test fixture
-@@ -646,25 +656,25 @@
-
- libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
-- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- -rpath "$(TCLLIBDIR)" \
- -version-info "8:6:8" \
- -avoid-version
-
--sqlite3$(TEXE): shell.c sqlite3.c
-- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
-- shell.c sqlite3.c \
-- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE): shell.c libsqlite3.la
-+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
-+ shell.c libsqlite3.la \
-+ $(LIBREADLINE)
-
--sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
-
--dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
-
--scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
- $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
-- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/scrub.c libsqlite3.la
-
- srcck1$(BEXE): $(TOP)/tool/srcck1.c
- $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -775,7 +785,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo: sqlite3.c
-- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
-
- # Rules to build the LEMON compiler generator
- #
-@@ -1081,17 +1091,6 @@
- # Source files that go into making shell.c
- SHELL_SRC = \
- $(TOP)/src/shell.c.in \
-- $(TOP)/ext/misc/appendvfs.c \
-- $(TOP)/ext/misc/completion.c \
-- $(TOP)/ext/misc/decimal.c \
-- $(TOP)/ext/misc/fileio.c \
-- $(TOP)/ext/misc/ieee754.c \
-- $(TOP)/ext/misc/shathree.c \
-- $(TOP)/ext/misc/sqlar.c \
-- $(TOP)/ext/misc/uint.c \
-- $(TOP)/ext/expert/sqlite3expert.c \
-- $(TOP)/ext/expert/sqlite3expert.h \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/misc/memtrace.c \
- $(TOP)/src/test_windirent.c
-
-@@ -1260,11 +1259,11 @@
-
- # Fuzz testing
- fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- ./fuzzcheck$(TEXE) $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
- ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
- valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- # The veryquick.test TCL tests.
-@@ -1298,24 +1297,23 @@
- shelltest: $(TESTPROGS)
- ./testfixture$(TEXT) $(TOP)/test/permutations.test shell
-
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
-+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
-
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
-- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
-+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
-
--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
-+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
-
--sqltclsh$(TEXE): sqltclsh.c
-- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
-+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
-+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
-
--sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
-- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
-+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
-+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
-
- CHECKER_DEPS =\
- $(TOP)/tool/mkccode.tcl \
-- sqlite3.c \
- $(TOP)/src/tclsqlite.c \
- $(TOP)/ext/repair/sqlite3_checker.tcl \
- $(TOP)/ext/repair/checkindex.c \
-@@ -1326,36 +1324,36 @@
- sqlite3_checker.c: $(CHECKER_DEPS)
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
-
--sqlite3_checker$(TEXE): sqlite3_checker.c
-- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
-+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
-
--dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
-+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
- $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
-- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
-
--dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
-+dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-+ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
-
--showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
-
--showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
-
--showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE): $(TOP)/tool/showjournal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
-
--showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE): $(TOP)/tool/showwal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
-
- showshm$(TEXE): $(TOP)/tool/showshm.c
- $(LTLINK) -o $@ $(TOP)/tool/showshm.c
-
--index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
-- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
-+index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
-
--changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
-
- changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
- $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
-@@ -1380,11 +1378,11 @@
- kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
- $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
-
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
-- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
-+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
-
--loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
-+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
-
- # This target will fail if the SQLite amalgamation contains any exported
- # symbols that do not begin with "sqlite3_". It is run as part of the
---- /configure.ac
-+++ /configure.ac
-@@ -108,7 +108,7 @@
- #########
- # Figure out whether or not we have these functions
- #
--AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
-+AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
-
- #########
- # By default, we use the amalgamation (this may be changed below...)
-@@ -587,6 +587,9 @@
- if test "${enable_load_extension}" = "yes" ; then
- OPT_FEATURE_FLAGS=""
- AC_SEARCH_LIBS(dlopen, dl)
-+ if test "${ac_cv_search_dlopen}" = "no" ; then
-+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+ fi
- else
- OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
diff --git a/dev-db/sqlite/files/sqlite-3.33.0-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.33.0-build_2.2.patch
deleted file mode 100644
index 3aa75bcab85..00000000000
--- a/dev-db/sqlite/files/sqlite-3.33.0-build_2.2.patch
+++ /dev/null
@@ -1,434 +0,0 @@
-Move some code to libsqlite3.so to avoid duplication.
-Initialize some extensions in libsqlite3.so.
-Update test suite.
-
---- /ext/repair/sqlite3_checker.c.in
-+++ /ext/repair/sqlite3_checker.c.in
-@@ -2,6 +2,7 @@
- ** Read an SQLite database file and analyze its space utilization. Generate
- ** text on standard output.
- */
-+#define SQLITE_CORE 1
- #define TCLSH_INIT_PROC sqlite3_checker_init_proc
- #define SQLITE_ENABLE_DBPAGE_VTAB 1
- #define SQLITE_ENABLE_JSON1 1
-@@ -14,7 +15,7 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- INCLUDE $ROOT/ext/misc/btreeinfo.c
- INCLUDE $ROOT/ext/repair/checkindex.c
---- /src/main.c
-+++ /src/main.c
-@@ -50,12 +50,35 @@
- #ifdef SQLITE_ENABLE_FTS5
- int sqlite3Fts5Init(sqlite3*);
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+int sqlite3DbdataRegister(sqlite3*);
-+#endif
- #ifdef SQLITE_ENABLE_JSON1
- int sqlite3Json1Init(sqlite3*);
- #endif
- #ifdef SQLITE_ENABLE_STMTVTAB
- int sqlite3StmtVtabInit(sqlite3*);
- #endif
-+int sqlite3AmatchInit(sqlite3*);
-+int sqlite3CarrayInit(sqlite3*);
-+int sqlite3CompletionVtabInit(sqlite3*);
-+int sqlite3CsvInit(sqlite3*);
-+int sqlite3DecimalInit(sqlite3*);
-+int sqlite3EvalInit(sqlite3*);
-+int sqlite3FileioInit(sqlite3*);
-+int sqlite3IeeeInit(sqlite3*);
-+int sqlite3NextcharInit(sqlite3*);
-+int sqlite3PercentileInit(sqlite3*);
-+int sqlite3RegexpInit(sqlite3*);
-+int sqlite3ShaInit(sqlite3*);
-+int sqlite3ShathreeInit(sqlite3*);
-+int sqlite3TotypeInit(sqlite3*);
-+int sqlite3UintInit(sqlite3*);
-+int sqlite3UuidInit(sqlite3*);
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+int sqlite3ZipfileInit(sqlite3*);
-+int sqlite3SqlarInit(sqlite3*);
-+#endif
-
- /*
- ** An array of pointers to extension initializer functions for
-@@ -83,6 +106,9 @@
- #ifdef SQLITE_ENABLE_DBPAGE_VTAB
- sqlite3DbpageRegister,
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+ sqlite3DbdataRegister,
-+#endif
- #ifdef SQLITE_ENABLE_DBSTAT_VTAB
- sqlite3DbstatRegister,
- #endif
-@@ -96,6 +122,26 @@
- #ifdef SQLITE_ENABLE_BYTECODE_VTAB
- sqlite3VdbeBytecodeVtabInit,
- #endif
-+ sqlite3AmatchInit,
-+ sqlite3CarrayInit,
-+ sqlite3CompletionVtabInit,
-+ sqlite3CsvInit,
-+ sqlite3DecimalInit,
-+ sqlite3EvalInit,
-+ sqlite3FileioInit,
-+ sqlite3IeeeInit,
-+ sqlite3NextcharInit,
-+ sqlite3PercentileInit,
-+ sqlite3RegexpInit,
-+ sqlite3ShaInit,
-+ sqlite3ShathreeInit,
-+ sqlite3TotypeInit,
-+ sqlite3UintInit,
-+ sqlite3UuidInit,
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+ sqlite3ZipfileInit,
-+ sqlite3SqlarInit,
-+#endif
- };
-
- #ifndef SQLITE_AMALGAMATION
---- /src/shell.c.in
-+++ /src/shell.c.in
-@@ -69,6 +69,7 @@
- #include <stdio.h>
- #include <assert.h>
- #include "sqlite3.h"
-+#include "ext/expert/sqlite3expert.h"
- typedef sqlite3_int64 i64;
- typedef sqlite3_uint64 u64;
- typedef unsigned char u8;
-@@ -135,6 +136,10 @@
- # define SHELL_USE_LOCAL_GETLINE 1
- #endif
-
-+#ifdef SQLITE_HAVE_ZLIB
-+#include <zlib.h>
-+#endif
-+
-
- #if defined(_WIN32) || defined(WIN32)
- # if SQLITE_OS_WINRT
-@@ -1020,24 +1025,7 @@
- INCLUDE test_windirent.c
- #define dirent DIRENT
- #endif
--INCLUDE ../ext/misc/shathree.c
--INCLUDE ../ext/misc/fileio.c
--INCLUDE ../ext/misc/completion.c
--INCLUDE ../ext/misc/appendvfs.c
- INCLUDE ../ext/misc/memtrace.c
--INCLUDE ../ext/misc/uint.c
--INCLUDE ../ext/misc/decimal.c
--INCLUDE ../ext/misc/ieee754.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE ../ext/misc/zipfile.c
--INCLUDE ../ext/misc/sqlar.c
--#endif
--INCLUDE ../ext/expert/sqlite3expert.h
--INCLUDE ../ext/expert/sqlite3expert.c
--
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
--INCLUDE ../ext/misc/dbdata.c
--#endif
-
- #if defined(SQLITE_ENABLE_SESSION)
- /*
-@@ -4584,19 +4572,6 @@
- #ifndef SQLITE_OMIT_LOAD_EXTENSION
- sqlite3_enable_load_extension(p->db, 1);
- #endif
-- sqlite3_fileio_init(p->db, 0, 0);
-- sqlite3_shathree_init(p->db, 0, 0);
-- sqlite3_completion_init(p->db, 0, 0);
-- sqlite3_uint_init(p->db, 0, 0);
-- sqlite3_decimal_init(p->db, 0, 0);
-- sqlite3_ieee_init(p->db, 0, 0);
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-- sqlite3_dbdata_init(p->db, 0, 0);
--#endif
--#ifdef SQLITE_HAVE_ZLIB
-- sqlite3_zipfile_init(p->db, 0, 0);
-- sqlite3_sqlar_init(p->db, 0, 0);
--#endif
- sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
- shellAddSchemaName, 0, 0);
- sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
-@@ -6617,8 +6592,6 @@
- );
- goto end_ar_command;
- }
-- sqlite3_fileio_init(cmd.db, 0, 0);
-- sqlite3_sqlar_init(cmd.db, 0, 0);
- sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
- shellPutsFunc, 0, 0);
-
-@@ -10981,6 +10954,7 @@
- #endif
- }
- data.out = stdout;
-+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
-
- /* Go ahead and open the database file if it already exists. If the
---- /src/test_config.c
-+++ /src/test_config.c
-@@ -353,6 +353,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_DECLTYPE
- Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
- #else
-@@ -540,6 +542,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_REINDEX
- Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
- #else
-@@ -662,6 +666,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_UTF16
- Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
- #else
---- /test/e_expr.test
-+++ /test/e_expr.test
-@@ -1078,7 +1078,7 @@
- #
- # There is a regexp function if ICU is enabled though.
- #
--ifcapable !icu {
-+ifcapable !icu&&!regexp {
- do_catchsql_test e_expr-18.1.1 {
- SELECT regexp('abc', 'def')
- } {1 {no such function: regexp}}
---- /test/icu.test
-+++ /test/icu.test
-@@ -41,7 +41,7 @@
- #
- test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
- test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
-- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
-+ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
- test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
- test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
-
---- /test/pragma.test
-+++ /test/pragma.test
-@@ -1370,17 +1370,62 @@
- } ;# ifcapable trigger
-
- ifcapable schema_pragmas {
-- do_test pragma-11.1 {
-- execsql2 {
-- pragma collation_list;
-+ ifcapable decimal {
-+ ifcapable uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
- }
-- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
-- do_test pragma-11.2 {
-- db collate New_Collation blah...
-- execsql {
-- pragma collation_list;
-+ ifcapable !uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
- }
-- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+ }
-+ ifcapable !decimal {
-+ ifcapable uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
-+ }
-+ ifcapable !uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+ }
-+ }
- }
-
- ifcapable schema_pragmas&&tempdb {
---- /test/sessionfuzz.c
-+++ /test/sessionfuzz.c
-@@ -698,49 +698,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <assert.h>
--#ifndef OMIT_ZLIB
--#include "zlib.h"
--#endif
--
--/*
--** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
--**
--** Parameter SZ is interpreted as an integer. If it is less than or
--** equal to zero, then this function returns a copy of X. Or, if
--** SZ is equal to the size of X when interpreted as a blob, also
--** return a copy of X. Otherwise, decompress blob X using zlib
--** utility function uncompress() and return the results (another
--** blob).
--*/
--static void sqlarUncompressFunc(
-- sqlite3_context *context,
-- int argc,
-- sqlite3_value **argv
--){
--#ifdef OMIT_ZLIB
-- sqlite3_result_value(context, argv[0]);
--#else
-- uLong nData;
-- uLongf sz;
--
-- assert( argc==2 );
-- sz = sqlite3_value_int(argv[1]);
--
-- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
-- sqlite3_result_value(context, argv[0]);
-- }else{
-- const Bytef *pData= sqlite3_value_blob(argv[0]);
-- Bytef *pOut = sqlite3_malloc(sz);
-- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
-- sqlite3_result_error(context, "error in uncompress()", -1);
-- }else{
-- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
-- }
-- sqlite3_free(pOut);
-- }
--#endif
--}
--
-
- /* Run a chunk of SQL. If any errors happen, print an error message
- ** and exit.
---- /tool/mksqlite3c.tcl
-+++ /tool/mksqlite3c.tcl
-@@ -117,6 +117,7 @@
- rtree.h
- sqlite3session.h
- sqlite3.h
-+ sqlite3expert.h
- sqlite3ext.h
- sqlite3rbu.h
- sqliteicu.h
-@@ -404,6 +405,27 @@
- sqlite3session.c
- fts5.c
- stmt.c
-+ amatch.c
-+ appendvfs.c
-+ carray.c
-+ completion.c
-+ csv.c
-+ dbdata.c
-+ decimal.c
-+ eval.c
-+ fileio.c
-+ ieee754.c
-+ nextchar.c
-+ percentile.c
-+ regexp.c
-+ sha1.c
-+ shathree.c
-+ sqlar.c
-+ sqlite3expert.c
-+ totype.c
-+ uint.c
-+ uuid.c
-+ zipfile.c
- } {
- copy_file tsrc/$file
- }
---- /tool/sqlite3_analyzer.c.in
-+++ /tool/sqlite3_analyzer.c.in
-@@ -14,9 +14,6 @@
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
- #define SQLITE_OMIT_LOAD_EXTENSION 1
--#ifndef USE_EXTERNAL_SQLITE
--INCLUDE sqlite3.c
--#endif
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
---- /tool/sqltclsh.c.in
-+++ /tool/sqltclsh.c.in
-@@ -27,21 +27,13 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
--INCLUDE $ROOT/ext/misc/appendvfs.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE $ROOT/ext/misc/zipfile.c
--INCLUDE $ROOT/ext/misc/sqlar.c
--#endif
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
- (void)interp;
-+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
--#ifdef SQLITE_HAVE_ZLIB
-- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
-- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
--#endif
-
- return
- BEGIN_STRING
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch
deleted file mode 100644
index 762f1359b9f..00000000000
--- a/dev-db/sqlite/files/sqlite-3.34.0-build_1.1.patch
+++ /dev/null
@@ -1,375 +0,0 @@
-Add initialization functions for internal usage in libsqlite3.so.
-
-SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
-
---- /ext/misc/amatch.c
-+++ /ext/misc/amatch.c
-@@ -1480,9 +1480,18 @@
-
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-
-+int sqlite3AmatchInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+ rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
-+#endif /* SQLITE_OMIT_VIRTUALTABLE */
-+ return rc;
-+}
-+
- /*
- ** Register the amatch virtual table
- */
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -1491,11 +1500,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Not used */
--#ifndef SQLITE_OMIT_VIRTUALTABLE
-- rc = sqlite3_create_module(db, "approximate_match", &amatchModule, 0);
--#endif /* SQLITE_OMIT_VIRTUALTABLE */
-- return rc;
-+ return sqlite3AmatchInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/carray.c
-+++ /ext/misc/carray.c
-@@ -498,16 +498,8 @@
-
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_carray_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3CarrayInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
- #ifndef SQLITE_OMIT_VIRTUALTABLE
- rc = sqlite3_create_module(db, "carray", &carrayModule, 0);
- #ifdef SQLITE_TEST
-@@ -519,3 +511,18 @@
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_carray_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3CarrayInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/completion.c
-+++ /ext/misc/completion.c
-@@ -483,12 +483,13 @@
- return rc;
- }
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
- int sqlite3_completion_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-+ sqlite3 *db,
-+ char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
- int rc = SQLITE_OK;
-@@ -499,3 +500,4 @@
- #endif
- return rc;
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/csv.c
-+++ /ext/misc/csv.c
-@@ -928,6 +928,22 @@
- #endif /* !defined(SQLITE_OMIT_VIRTUALTABLE) */
-
-
-+int sqlite3CsvInit(sqlite3 *db){
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+ int rc;
-+ rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
-+#ifdef SQLITE_TEST
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-+ }
-+#endif
-+ return rc;
-+#else
-+ return SQLITE_OK;
-+#endif
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -941,17 +957,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
--#ifndef SQLITE_OMIT_VIRTUALTABLE
-- int rc;
- SQLITE_EXTENSION_INIT2(pApi);
-- rc = sqlite3_create_module(db, "csv", &CsvModule, 0);
--#ifdef SQLITE_TEST
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_module(db, "csv_wr", &CsvModuleFauxWrite, 0);
-- }
--#endif
-- return rc;
--#else
-- return SQLITE_OK;
--#endif
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3CsvInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/dbdata.c
-+++ /ext/misc/dbdata.c
-@@ -803,7 +803,7 @@
- /*
- ** Invoke this routine to register the "sqlite_dbdata" virtual table module
- */
--static int sqlite3DbdataRegister(sqlite3 *db){
-+int sqlite3DbdataRegister(sqlite3 *db){
- static sqlite3_module dbdata_module = {
- 0, /* iVersion */
- 0, /* xCreate */
-@@ -838,6 +838,7 @@
- return rc;
- }
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -849,3 +850,4 @@
- SQLITE_EXTENSION_INIT2(pApi);
- return sqlite3DbdataRegister(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/decimal.c
-+++ /ext/misc/decimal.c
-@@ -590,14 +590,7 @@
- decimal_free(pB);
- }
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_decimal_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3DecimalInit(sqlite3 *db){
- int rc = SQLITE_OK;
- static const struct {
- const char *zFuncName;
-@@ -611,10 +604,6 @@
- { "decimal_mul", 2, decimalMulFunc },
- };
- unsigned int i;
-- (void)pzErrMsg; /* Unused parameter */
--
-- SQLITE_EXTENSION_INIT2(pApi);
--
- for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
- rc = sqlite3_create_function(db, aFunc[i].zFuncName, aFunc[i].nArg,
- SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
-@@ -632,3 +621,20 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_decimal_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ (void)pzErrMsg; /* Unused parameter */
-+
-+ SQLITE_EXTENSION_INIT2(pApi);
-+
-+ return sqlite3DecimalInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/eval.c
-+++ /ext/misc/eval.c
-@@ -102,6 +102,20 @@
- }
-
-
-+int sqlite3EvalInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "eval", 1,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sqlEvalFunc, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "eval", 2,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sqlEvalFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -110,16 +124,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "eval", 1,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sqlEvalFunc, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "eval", 2,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sqlEvalFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3EvalInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/fileio.c
-+++ /ext/misc/fileio.c
-@@ -340,7 +340,7 @@
- ** This function does the work for the writefile() UDF. Refer to
- ** header comments at the top of this file for details.
- */
--static int writeFile(
-+static int writeFileContents(
- sqlite3_context *pCtx, /* Context to return bytes written in */
- const char *zFile, /* File to write */
- sqlite3_value *pData, /* Data to write */
-@@ -480,10 +480,10 @@
- mtime = sqlite3_value_int64(argv[3]);
- }
-
-- res = writeFile(context, zFile, argv[1], mode, mtime);
-+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
- if( res==1 && errno==ENOENT ){
- if( makeDirectory(zFile)==SQLITE_OK ){
-- res = writeFile(context, zFile, argv[1], mode, mtime);
-+ res = writeFileContents(context, zFile, argv[1], mode, mtime);
- }
- }
-
-@@ -970,18 +970,9 @@
- # define fsdirRegister(x) SQLITE_OK
- #endif
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_fileio_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3FileioInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "readfile", 1,
-+ rc = sqlite3_create_function(db, "readfile", 1,
- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
- readfileFunc, 0, 0);
- if( rc==SQLITE_OK ){
-@@ -998,3 +989,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_fileio_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3FileioInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/ieee754.c
-+++ /ext/misc/ieee754.c
-@@ -245,14 +245,7 @@
- }
-
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_ieee_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3IeeeInit(sqlite3 *db){
- static const struct {
- char *zFName;
- int nArg;
-@@ -269,13 +262,26 @@
- };
- unsigned int i;
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- for(i=0; i<sizeof(aFunc)/sizeof(aFunc[0]) && rc==SQLITE_OK; i++){
-- rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
-+ rc = sqlite3_create_function(db, aFunc[i].zFName, aFunc[i].nArg,
- SQLITE_UTF8|SQLITE_INNOCUOUS,
- (void*)&aFunc[i].iAux,
- aFunc[i].xFunc, 0, 0);
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_ieee_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3IeeeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch
deleted file mode 100644
index 7fb5d28e4ba..00000000000
--- a/dev-db/sqlite/files/sqlite-3.34.0-build_1.2.patch
+++ /dev/null
@@ -1,500 +0,0 @@
-Add initialization functions for internal usage in libsqlite3.so.
-
-SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
-
---- /ext/misc/nextchar.c
-+++ /ext/misc/nextchar.c
-@@ -286,17 +286,8 @@
- sqlite3_free(c.aResult);
- }
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_nextchar_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3NextcharInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "next_char", 3,
- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
- nextCharFunc, 0, 0);
-@@ -312,3 +303,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_nextchar_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3NextcharInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/percentile.c
-+++ /ext/misc/percentile.c
-@@ -202,6 +202,15 @@
- }
-
-
-+int sqlite3PercentileInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "percentile", 2,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ 0, percentStep, percentFinal);
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -210,11 +219,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "percentile", 2,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- 0, percentStep, percentFinal);
-- return rc;
-+ return sqlite3PercentileInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/regexp.c
-+++ /ext/misc/regexp.c
-@@ -740,10 +740,18 @@
- }
- }
-
-+int sqlite3RegexpInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
-+ 0, re_sql_func, 0, 0);
-+ return rc;
-+}
-+
- /*
- ** Invoke this routine to register the regexp() function with the
- ** SQLite database connection.
- */
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -752,9 +760,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
-- rc = sqlite3_create_function(db, "regexp", 2, SQLITE_UTF8|SQLITE_INNOCUOUS,
-- 0, re_sql_func, 0, 0);
-- return rc;
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3RegexpInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/series.c
-+++ /ext/misc/series.c
-@@ -413,6 +413,15 @@
-
- #endif /* SQLITE_OMIT_VIRTUALTABLE */
-
-+int sqlite3SeriesInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+#ifndef SQLITE_OMIT_VIRTUALTABLE
-+ rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
-+#endif
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -421,7 +430,6 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- #ifndef SQLITE_OMIT_VIRTUALTABLE
- if( sqlite3_libversion_number()<3008012 ){
-@@ -429,7 +437,7 @@
- "generate_series() requires SQLite 3.8.12 or later");
- return SQLITE_ERROR;
- }
-- rc = sqlite3_create_module(db, "generate_series", &seriesModule, 0);
- #endif
-- return rc;
-+ return sqlite3SeriesInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/sha1.c
-+++ /ext/misc/sha1.c
-@@ -175,7 +175,7 @@
- }
-
- /* Compute a string using sqlite3_vsnprintf() and hash it */
--static void hash_step_vformat(
-+static void sha1_hash_step_vformat(
- SHA1Context *p, /* Add content to this context */
- const char *zFormat,
- ...
-@@ -306,7 +306,7 @@
- nCol = sqlite3_column_count(pStmt);
- z = sqlite3_sql(pStmt);
- n = (int)strlen(z);
-- hash_step_vformat(&cx,"S%d:",n);
-+ sha1_hash_step_vformat(&cx,"S%d:",n);
- hash_step(&cx,(unsigned char*)z,n);
-
- /* Compute a hash over the result of the query */
-@@ -349,14 +349,14 @@
- case SQLITE_TEXT: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_text(pStmt, i);
-- hash_step_vformat(&cx,"T%d:",n2);
-+ sha1_hash_step_vformat(&cx,"T%d:",n2);
- hash_step(&cx, z2, n2);
- break;
- }
- case SQLITE_BLOB: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
-- hash_step_vformat(&cx,"B%d:",n2);
-+ sha1_hash_step_vformat(&cx,"B%d:",n2);
- hash_step(&cx, z2, n2);
- break;
- }
-@@ -370,6 +370,20 @@
- }
-
-
-+int sqlite3ShaInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "sha1", 1,
-+ SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
-+ 0, sha1Func, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "sha1_query", 1,
-+ SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-+ sha1QueryFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -378,16 +392,8 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "sha1", 1,
-- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
-- 0, sha1Func, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "sha1_query", 1,
-- SQLITE_UTF8|SQLITE_DIRECTONLY, 0,
-- sha1QueryFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3ShaInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/shathree.c
-+++ /ext/misc/shathree.c
-@@ -527,7 +527,7 @@
- /* Compute a string using sqlite3_vsnprintf() with a maximum length
- ** of 50 bytes and add it to the hash.
- */
--static void hash_step_vformat(
-+static void sha3_hash_step_vformat(
- SHA3Context *p, /* Add content to this context */
- const char *zFormat,
- ...
-@@ -622,7 +622,7 @@
- nCol = sqlite3_column_count(pStmt);
- z = sqlite3_sql(pStmt);
- n = (int)strlen(z);
-- hash_step_vformat(&cx,"S%d:",n);
-+ sha3_hash_step_vformat(&cx,"S%d:",n);
- SHA3Update(&cx,(unsigned char*)z,n);
-
- /* Compute a hash over the result of the query */
-@@ -665,14 +665,14 @@
- case SQLITE_TEXT: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_text(pStmt, i);
-- hash_step_vformat(&cx,"T%d:",n2);
-+ sha3_hash_step_vformat(&cx,"T%d:",n2);
- SHA3Update(&cx, z2, n2);
- break;
- }
- case SQLITE_BLOB: {
- int n2 = sqlite3_column_bytes(pStmt, i);
- const unsigned char *z2 = sqlite3_column_blob(pStmt, i);
-- hash_step_vformat(&cx,"B%d:",n2);
-+ sha3_hash_step_vformat(&cx,"B%d:",n2);
- SHA3Update(&cx, z2, n2);
- break;
- }
-@@ -685,17 +685,8 @@
- }
-
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_shathree_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3ShathreeInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "sha3", 1,
- SQLITE_UTF8 | SQLITE_INNOCUOUS | SQLITE_DETERMINISTIC,
- 0, sha3Func, 0, 0);
-@@ -716,3 +707,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_shathree_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3ShathreeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/sqlar.c
-+++ /ext/misc/sqlar.c
-@@ -14,6 +14,8 @@
- ** for working with sqlar archives and used by the shell tool's built-in
- ** sqlar support.
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <zlib.h>
-@@ -101,6 +103,20 @@
- }
-
-
-+int sqlite3SqlarInit(sqlite3 *db){
-+ int rc = SQLITE_OK;
-+ rc = sqlite3_create_function(db, "sqlar_compress", 1,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ sqlarCompressFunc, 0, 0);
-+ if( rc==SQLITE_OK ){
-+ rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
-+ SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-+ sqlarUncompressFunc, 0, 0);
-+ }
-+ return rc;
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -109,16 +125,10 @@
- char **pzErrMsg,
- const sqlite3_api_routines *pApi
- ){
-- int rc = SQLITE_OK;
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- rc = sqlite3_create_function(db, "sqlar_compress", 1,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- sqlarCompressFunc, 0, 0);
-- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "sqlar_uncompress", 2,
-- SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
-- sqlarUncompressFunc, 0, 0);
-- }
-- return rc;
-+ return sqlite3SqlarInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
-+
-+#endif /* SQLITE_HAVE_ZLIB */
---- /ext/misc/totype.c
-+++ /ext/misc/totype.c
-@@ -491,17 +491,8 @@
- #pragma warning(default: 4748)
- #endif
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_totype_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3TotypeInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "tointeger", 1,
- SQLITE_UTF8 | SQLITE_DETERMINISTIC | SQLITE_INNOCUOUS, 0,
- tointegerFunc, 0, 0);
-@@ -512,3 +503,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_totype_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3TotypeInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/uint.c
-+++ /ext/misc/uint.c
-@@ -78,6 +78,11 @@
- return (nKey1 - i) - (nKey2 - j);
- }
-
-+int sqlite3UintInit(sqlite3 *db){
-+ return sqlite3_create_collation(db, "UINT", SQLITE_UTF8, 0, uintCollFunc);
-+}
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -88,5 +93,6 @@
- ){
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- return sqlite3_create_collation(db, "uint", SQLITE_UTF8, 0, uintCollFunc);
-+ return sqlite3UintInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/uuid.c
-+++ /ext/misc/uuid.c
-@@ -206,21 +206,12 @@
- sqlite3_result_blob(context, pBlob, 16, SQLITE_TRANSIENT);
- }
-
--#ifdef _WIN32
--__declspec(dllexport)
--#endif
--int sqlite3_uuid_init(
-- sqlite3 *db,
-- char **pzErrMsg,
-- const sqlite3_api_routines *pApi
--){
-+int sqlite3UuidInit(sqlite3 *db){
- int rc = SQLITE_OK;
-- SQLITE_EXTENSION_INIT2(pApi);
-- (void)pzErrMsg; /* Unused parameter */
- rc = sqlite3_create_function(db, "uuid", 0, SQLITE_UTF8|SQLITE_INNOCUOUS, 0,
- sqlite3UuidFunc, 0, 0);
- if( rc==SQLITE_OK ){
-- rc = sqlite3_create_function(db, "uuid_str", 1,
-+ rc = sqlite3_create_function(db, "uuid_str", 1,
- SQLITE_UTF8|SQLITE_INNOCUOUS|SQLITE_DETERMINISTIC,
- 0, sqlite3UuidStrFunc, 0, 0);
- }
-@@ -231,3 +222,18 @@
- }
- return rc;
- }
-+
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
-+#ifdef _WIN32
-+__declspec(dllexport)
-+#endif
-+int sqlite3_uuid_init(
-+ sqlite3 *db,
-+ char **pzErrMsg,
-+ const sqlite3_api_routines *pApi
-+){
-+ SQLITE_EXTENSION_INIT2(pApi);
-+ (void)pzErrMsg; /* Unused parameter */
-+ return sqlite3UuidInit(db);
-+}
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
---- /ext/misc/zipfile.c
-+++ /ext/misc/zipfile.c
-@@ -24,6 +24,8 @@
- ** * No support for zip64 extensions
- ** * Only the "inflate/deflate" (zlib) compression method is supported
- */
-+#ifdef SQLITE_HAVE_ZLIB
-+
- #include "sqlite3ext.h"
- SQLITE_EXTENSION_INIT1
- #include <stdio.h>
-@@ -2139,7 +2141,7 @@
- /*
- ** Register the "zipfile" virtual table.
- */
--static int zipfileRegister(sqlite3 *db){
-+int sqlite3ZipfileInit(sqlite3 *db){
- static sqlite3_module zipfileModule = {
- 1, /* iVersion */
- zipfileConnect, /* xCreate */
-@@ -2173,9 +2175,10 @@
- return rc;
- }
- #else /* SQLITE_OMIT_VIRTUALTABLE */
--# define zipfileRegister(x) SQLITE_OK
-+# define sqlite3ZipfileInit(x) SQLITE_OK
- #endif
-
-+#if !defined(SQLITE_CORE) || defined(SQLITE_TEST)
- #ifdef _WIN32
- __declspec(dllexport)
- #endif
-@@ -2186,5 +2189,8 @@
- ){
- SQLITE_EXTENSION_INIT2(pApi);
- (void)pzErrMsg; /* Unused parameter */
-- return zipfileRegister(db);
-+ return sqlite3ZipfileInit(db);
- }
-+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_TEST) */
-+
-+#endif /* SQLITE_HAVE_ZLIB */
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch
deleted file mode 100644
index 16210a6bddc..00000000000
--- a/dev-db/sqlite/files/sqlite-3.34.0-build_2.1.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-Move some code to libsqlite3.so to avoid duplication.
-Link executables against libsqlite3.so.
-Increase timeout for fuzzcheck.
-Update list of optionally available functions.
-Fix building with dlopen() not available.
-
-SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
-
---- /Makefile.in
-+++ /Makefile.in
-@@ -313,6 +313,9 @@
- # Source code for extensions
- #
- SRC += \
-+ $(TOP)/ext/expert/sqlite3expert.c \
-+ $(TOP)/ext/expert/sqlite3expert.h
-+SRC += \
- $(TOP)/ext/fts1/fts1.c \
- $(TOP)/ext/fts1/fts1.h \
- $(TOP)/ext/fts1/fts1_hash.c \
-@@ -365,8 +368,29 @@
- $(TOP)/ext/rbu/sqlite3rbu.h \
- $(TOP)/ext/rbu/sqlite3rbu.c
- SRC += \
-+ $(TOP)/ext/misc/amatch.c \
-+ $(TOP)/ext/misc/appendvfs.c \
-+ $(TOP)/ext/misc/carray.c \
-+ $(TOP)/ext/misc/completion.c \
-+ $(TOP)/ext/misc/csv.c \
-+ $(TOP)/ext/misc/dbdata.c \
-+ $(TOP)/ext/misc/decimal.c \
-+ $(TOP)/ext/misc/eval.c \
-+ $(TOP)/ext/misc/fileio.c \
-+ $(TOP)/ext/misc/ieee754.c \
- $(TOP)/ext/misc/json1.c \
-- $(TOP)/ext/misc/stmt.c
-+ $(TOP)/ext/misc/nextchar.c \
-+ $(TOP)/ext/misc/percentile.c \
-+ $(TOP)/ext/misc/regexp.c \
-+ $(TOP)/ext/misc/series.c \
-+ $(TOP)/ext/misc/sha1.c \
-+ $(TOP)/ext/misc/shathree.c \
-+ $(TOP)/ext/misc/sqlar.c \
-+ $(TOP)/ext/misc/stmt.c \
-+ $(TOP)/ext/misc/totype.c \
-+ $(TOP)/ext/misc/uint.c \
-+ $(TOP)/ext/misc/uuid.c \
-+ $(TOP)/ext/misc/zipfile.c
-
- # Generated source code files
- #
-@@ -437,35 +461,21 @@
- # Statically linked extensions
- #
- TESTSRC += \
-- $(TOP)/ext/expert/sqlite3expert.c \
- $(TOP)/ext/expert/test_expert.c \
-- $(TOP)/ext/misc/amatch.c \
-- $(TOP)/ext/misc/carray.c \
- $(TOP)/ext/misc/cksumvfs.c \
- $(TOP)/ext/misc/closure.c \
-- $(TOP)/ext/misc/csv.c \
-- $(TOP)/ext/misc/decimal.c \
-- $(TOP)/ext/misc/eval.c \
- $(TOP)/ext/misc/explain.c \
-- $(TOP)/ext/misc/fileio.c \
- $(TOP)/ext/misc/fuzzer.c \
- $(TOP)/ext/fts5/fts5_tcl.c \
- $(TOP)/ext/fts5/fts5_test_mi.c \
- $(TOP)/ext/fts5/fts5_test_tok.c \
-- $(TOP)/ext/misc/ieee754.c \
- $(TOP)/ext/misc/mmapwarm.c \
-- $(TOP)/ext/misc/nextchar.c \
- $(TOP)/ext/misc/normalize.c \
-- $(TOP)/ext/misc/percentile.c \
- $(TOP)/ext/misc/prefixes.c \
-- $(TOP)/ext/misc/regexp.c \
- $(TOP)/ext/misc/remember.c \
-- $(TOP)/ext/misc/series.c \
- $(TOP)/ext/misc/spellfix.c \
-- $(TOP)/ext/misc/totype.c \
- $(TOP)/ext/misc/unionvtab.c \
- $(TOP)/ext/misc/wholenumber.c \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/userauth/userauth.c
-
- # Source code to the library files needed by the test fixture
-@@ -647,25 +657,25 @@
-
- libtclsqlite3.la: tclsqlite.lo libsqlite3.la
- $(LTLINK) -no-undefined -o $@ tclsqlite.lo \
-- libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \
-+ libsqlite3.la @TCL_STUB_LIB_SPEC@ \
- -rpath "$(TCLLIBDIR)" \
- -version-info "8:6:8" \
- -avoid-version
-
--sqlite3$(TEXE): shell.c sqlite3.c
-- $(LTLINK) $(READLINE_FLAGS) $(SHELL_OPT) -o $@ \
-- shell.c sqlite3.c \
-- $(LIBREADLINE) $(TLIBS) -rpath "$(libdir)"
-+sqlite3$(TEXE): shell.c libsqlite3.la
-+ $(LTLINK) $(READLINE_FLAGS) -o $@ \
-+ shell.c libsqlite3.la \
-+ $(LIBREADLINE)
-
--sqldiff$(TEXE): $(TOP)/tool/sqldiff.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c sqlite3.lo $(TLIBS)
-+sqldiff$(TEXE): $(TOP)/tool/sqldiff.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/sqldiff.c libsqlite3.la
-
--dbhash$(TEXE): $(TOP)/tool/dbhash.c sqlite3.lo sqlite3.h
-- $(LTLINK) -o $@ $(TOP)/tool/dbhash.c sqlite3.lo $(TLIBS)
-+dbhash$(TEXE): $(TOP)/tool/dbhash.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/dbhash.c libsqlite3.la
-
--scrub$(TEXE): $(TOP)/ext/misc/scrub.c sqlite3.lo
-+scrub$(TEXE): $(TOP)/ext/misc/scrub.c libsqlite3.la
- $(LTLINK) -o $@ -I. -DSCRUB_STANDALONE \
-- $(TOP)/ext/misc/scrub.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/scrub.c libsqlite3.la
-
- srcck1$(BEXE): $(TOP)/tool/srcck1.c
- $(BCC) -o srcck1$(BEXE) $(TOP)/tool/srcck1.c
-@@ -776,7 +786,7 @@
- # Rule to build the amalgamation
- #
- sqlite3.lo: sqlite3.c
-- $(LTCOMPILE) $(TEMP_STORE) -c sqlite3.c
-+ $(LTCOMPILE) $(SHELL_OPT) $(TEMP_STORE) -c sqlite3.c
-
- # Rules to build the LEMON compiler generator
- #
-@@ -1082,18 +1092,6 @@
- # Source files that go into making shell.c
- SHELL_SRC = \
- $(TOP)/src/shell.c.in \
-- $(TOP)/ext/misc/appendvfs.c \
-- $(TOP)/ext/misc/completion.c \
-- $(TOP)/ext/misc/decimal.c \
-- $(TOP)/ext/misc/fileio.c \
-- $(TOP)/ext/misc/ieee754.c \
-- $(TOP)/ext/misc/series.c \
-- $(TOP)/ext/misc/shathree.c \
-- $(TOP)/ext/misc/sqlar.c \
-- $(TOP)/ext/misc/uint.c \
-- $(TOP)/ext/expert/sqlite3expert.c \
-- $(TOP)/ext/expert/sqlite3expert.h \
-- $(TOP)/ext/misc/zipfile.c \
- $(TOP)/ext/misc/memtrace.c \
- $(TOP)/src/test_windirent.c
-
-@@ -1263,11 +1261,11 @@
-
- # Fuzz testing
- fuzztest: fuzzcheck$(TEXE) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- ./fuzzcheck$(TEXE) $(FUZZDATA)
-+ ./fuzzcheck$(TEXE) --timeout 3600 $(FUZZDATA)
- ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- valgrindfuzz: fuzzcheck$(TEXT) $(FUZZDATA) sessionfuzz$(TEXE) $(TOP)/test/sessionfuzz-data1.db
-- valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 600 $(FUZZDATA)
-+ valgrind ./fuzzcheck$(TEXE) --cell-size-check --limit-mem 10M --timeout 3600 $(FUZZDATA)
- valgrind ./sessionfuzz$(TEXE) run $(TOP)/test/sessionfuzz-data1.db
-
- # The veryquick.test TCL tests.
-@@ -1301,24 +1299,23 @@
- shelltest: $(TESTPROGS)
- ./testfixture$(TEXT) $(TOP)/test/permutations.test shell
-
--sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
-+sqlite3_analyzer.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqlite3_analyzer.c.in >sqlite3_analyzer.c
-
--sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
-- $(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_analyzer$(TEXE): sqlite3_analyzer.c libsqlite3.la
-+ $(LTLINK) sqlite3_analyzer.c -o $@ libsqlite3.la $(LIBTCL)
-
--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
-+sqltclsh.c: $(TOP)/src/tclsqlite.c $(TOP)/tool/sqltclsh.tcl $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/tool/sqltclsh.c.in >sqltclsh.c
-
--sqltclsh$(TEXE): sqltclsh.c
-- $(LTLINK) sqltclsh.c -o $@ $(LIBTCL) $(TLIBS)
-+sqltclsh$(TEXE): sqltclsh.c libsqlite3.la
-+ $(LTLINK) sqltclsh.c -o $@ libsqlite3.la $(LIBTCL)
-
--sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c
-- $(LTLINK) $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/sqlite3expert.c $(TOP)/ext/expert/expert.c sqlite3.c -o sqlite3_expert $(TLIBS)
-+sqlite3_expert$(TEXE): $(TOP)/ext/expert/sqlite3expert.h $(TOP)/ext/expert/expert.c libsqlite3.la
-+ $(LTLINK) $(TOP)/ext/expert/expert.c -o sqlite3_expert libsqlite3.la
-
- CHECKER_DEPS =\
- $(TOP)/tool/mkccode.tcl \
-- sqlite3.c \
- $(TOP)/src/tclsqlite.c \
- $(TOP)/ext/repair/sqlite3_checker.tcl \
- $(TOP)/ext/repair/checkindex.c \
-@@ -1329,36 +1326,36 @@
- sqlite3_checker.c: $(CHECKER_DEPS)
- $(TCLSH_CMD) $(TOP)/tool/mkccode.tcl $(TOP)/ext/repair/sqlite3_checker.c.in >$@
-
--sqlite3_checker$(TEXE): sqlite3_checker.c
-- $(LTLINK) sqlite3_checker.c -o $@ $(LIBTCL) $(TLIBS)
-+sqlite3_checker$(TEXE): sqlite3_checker.c libsqlite3.la
-+ $(LTLINK) sqlite3_checker.c -o $@ libsqlite3.la $(LIBTCL)
-
--dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c sqlite3.lo
-+dbdump$(TEXE): $(TOP)/ext/misc/dbdump.c libsqlite3.la
- $(LTLINK) -DDBDUMP_STANDALONE -o $@ \
-- $(TOP)/ext/misc/dbdump.c sqlite3.lo $(TLIBS)
-+ $(TOP)/ext/misc/dbdump.c libsqlite3.la
-
--dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-- $(LTLINK)-o $@ $(TOP)/tool/dbtotxt.c
-+dbtotxt$(TEXE): $(TOP)/tool/dbtotxt.c
-+ $(LTLINK) -o $@ $(TOP)/tool/dbtotxt.c
-
--showdb$(TEXE): $(TOP)/tool/showdb.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)
-+showdb$(TEXE): $(TOP)/tool/showdb.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showdb.c libsqlite3.la
-
--showstat4$(TEXE): $(TOP)/tool/showstat4.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showstat4.c sqlite3.lo $(TLIBS)
-+showstat4$(TEXE): $(TOP)/tool/showstat4.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/showstat4.c libsqlite3.la
-
--showjournal$(TEXE): $(TOP)/tool/showjournal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showjournal.c sqlite3.lo $(TLIBS)
-+showjournal$(TEXE): $(TOP)/tool/showjournal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showjournal.c
-
--showwal$(TEXE): $(TOP)/tool/showwal.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/tool/showwal.c sqlite3.lo $(TLIBS)
-+showwal$(TEXE): $(TOP)/tool/showwal.c
-+ $(LTLINK) -o $@ $(TOP)/tool/showwal.c
-
- showshm$(TEXE): $(TOP)/tool/showshm.c
- $(LTLINK) -o $@ $(TOP)/tool/showshm.c
-
--index_usage$(TEXE): $(TOP)/tool/index_usage.c sqlite3.lo
-- $(LTLINK) $(SHELL_OPT) -o $@ $(TOP)/tool/index_usage.c sqlite3.lo $(TLIBS)
-+index_usage$(TEXE): $(TOP)/tool/index_usage.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/tool/index_usage.c libsqlite3.la
-
--changeset$(TEXE): $(TOP)/ext/session/changeset.c sqlite3.lo
-- $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c sqlite3.lo $(TLIBS)
-+changeset$(TEXE): $(TOP)/ext/session/changeset.c libsqlite3.la
-+ $(LTLINK) -o $@ $(TOP)/ext/session/changeset.c libsqlite3.la
-
- changesetfuzz$(TEXE): $(TOP)/ext/session/changesetfuzz.c sqlite3.lo
- $(LTLINK) -o $@ $(TOP)/ext/session/changesetfuzz.c sqlite3.lo $(TLIBS)
-@@ -1383,11 +1380,11 @@
- kvtest$(TEXE): $(TOP)/test/kvtest.c sqlite3.c
- $(LTLINK) $(KV_OPT) -o $@ $(TOP)/test/kvtest.c sqlite3.c $(TLIBS)
-
--rbu$(EXE): $(TOP)/ext/rbu/rbu.c $(TOP)/ext/rbu/sqlite3rbu.c sqlite3.lo
-- $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c sqlite3.lo $(TLIBS)
-+rbu$(EXE): $(TOP)/ext/rbu/rbu.c libsqlite3.la
-+ $(LTLINK) -I. -o $@ $(TOP)/ext/rbu/rbu.c libsqlite3.la
-
--loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-- $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@ $(TLIBS)
-+loadfts$(EXE): $(TOP)/tool/loadfts.c libsqlite3.la
-+ $(LTLINK) $(TOP)/tool/loadfts.c libsqlite3.la -o $@
-
- # This target will fail if the SQLite amalgamation contains any exported
- # symbols that do not begin with "sqlite3_". It is run as part of the
---- /configure.ac
-+++ /configure.ac
-@@ -108,7 +108,7 @@
- #########
- # Figure out whether or not we have these functions
- #
--AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
-+AC_CHECK_FUNCS([fdatasync fullfsync gmtime_r isnan localtime_r localtime_s malloc_usable_size posix_fallocate pread pread64 pwrite pwrite64 strchrnul usleep utime])
-
- #########
- # By default, we use the amalgamation (this may be changed below...)
-@@ -582,6 +582,9 @@
- if test "${enable_load_extension}" = "yes" ; then
- OPT_FEATURE_FLAGS=""
- AC_SEARCH_LIBS(dlopen, dl)
-+ if test "${ac_cv_search_dlopen}" = "no" ; then
-+ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
-+ fi
- else
- OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1"
- fi
diff --git a/dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch b/dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch
deleted file mode 100644
index 1aa60a0b162..00000000000
--- a/dev-db/sqlite/files/sqlite-3.34.0-build_2.2.patch
+++ /dev/null
@@ -1,441 +0,0 @@
-Move some code to libsqlite3.so to avoid duplication.
-Initialize some extensions in libsqlite3.so.
-Update test suite.
-
-SQLite revision: a26b6597e3ae272231b96f9982c3bcc17ddec2f2b6eb4df06a224b91089fed5b
-
---- /ext/repair/sqlite3_checker.c.in
-+++ /ext/repair/sqlite3_checker.c.in
-@@ -2,6 +2,7 @@
- ** Read an SQLite database file and analyze its space utilization. Generate
- ** text on standard output.
- */
-+#define SQLITE_CORE 1
- #define TCLSH_INIT_PROC sqlite3_checker_init_proc
- #define SQLITE_ENABLE_DBPAGE_VTAB 1
- #define SQLITE_ENABLE_JSON1 1
-@@ -14,7 +15,7 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
- INCLUDE $ROOT/ext/misc/btreeinfo.c
- INCLUDE $ROOT/ext/repair/checkindex.c
---- /src/main.c
-+++ /src/main.c
-@@ -50,12 +50,36 @@
- #ifdef SQLITE_ENABLE_FTS5
- int sqlite3Fts5Init(sqlite3*);
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+int sqlite3DbdataRegister(sqlite3*);
-+#endif
- #ifdef SQLITE_ENABLE_JSON1
- int sqlite3Json1Init(sqlite3*);
- #endif
- #ifdef SQLITE_ENABLE_STMTVTAB
- int sqlite3StmtVtabInit(sqlite3*);
- #endif
-+int sqlite3AmatchInit(sqlite3*);
-+int sqlite3CarrayInit(sqlite3*);
-+int sqlite3CompletionVtabInit(sqlite3*);
-+int sqlite3CsvInit(sqlite3*);
-+int sqlite3DecimalInit(sqlite3*);
-+int sqlite3EvalInit(sqlite3*);
-+int sqlite3FileioInit(sqlite3*);
-+int sqlite3IeeeInit(sqlite3*);
-+int sqlite3NextcharInit(sqlite3*);
-+int sqlite3PercentileInit(sqlite3*);
-+int sqlite3RegexpInit(sqlite3*);
-+int sqlite3SeriesInit(sqlite3*);
-+int sqlite3ShaInit(sqlite3*);
-+int sqlite3ShathreeInit(sqlite3*);
-+int sqlite3TotypeInit(sqlite3*);
-+int sqlite3UintInit(sqlite3*);
-+int sqlite3UuidInit(sqlite3*);
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+int sqlite3ZipfileInit(sqlite3*);
-+int sqlite3SqlarInit(sqlite3*);
-+#endif
-
- /*
- ** An array of pointers to extension initializer functions for
-@@ -83,6 +107,9 @@
- #ifdef SQLITE_ENABLE_DBPAGE_VTAB
- sqlite3DbpageRegister,
- #endif
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-+ sqlite3DbdataRegister,
-+#endif
- #ifdef SQLITE_ENABLE_DBSTAT_VTAB
- sqlite3DbstatRegister,
- #endif
-@@ -96,6 +123,27 @@
- #ifdef SQLITE_ENABLE_BYTECODE_VTAB
- sqlite3VdbeBytecodeVtabInit,
- #endif
-+ sqlite3AmatchInit,
-+ sqlite3CarrayInit,
-+ sqlite3CompletionVtabInit,
-+ sqlite3CsvInit,
-+ sqlite3DecimalInit,
-+ sqlite3EvalInit,
-+ sqlite3FileioInit,
-+ sqlite3IeeeInit,
-+ sqlite3NextcharInit,
-+ sqlite3PercentileInit,
-+ sqlite3RegexpInit,
-+ sqlite3SeriesInit,
-+ sqlite3ShaInit,
-+ sqlite3ShathreeInit,
-+ sqlite3TotypeInit,
-+ sqlite3UintInit,
-+ sqlite3UuidInit,
-+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_HAVE_ZLIB)
-+ sqlite3ZipfileInit,
-+ sqlite3SqlarInit,
-+#endif
- };
-
- #ifndef SQLITE_AMALGAMATION
---- /src/shell.c.in
-+++ /src/shell.c.in
-@@ -69,6 +69,7 @@
- #include <stdio.h>
- #include <assert.h>
- #include "sqlite3.h"
-+#include "ext/expert/sqlite3expert.h"
- typedef sqlite3_int64 i64;
- typedef sqlite3_uint64 u64;
- typedef unsigned char u8;
-@@ -135,6 +136,10 @@
- # define SHELL_USE_LOCAL_GETLINE 1
- #endif
-
-+#ifdef SQLITE_HAVE_ZLIB
-+#include <zlib.h>
-+#endif
-+
-
- #if defined(_WIN32) || defined(WIN32)
- # if SQLITE_OS_WINRT
-@@ -1018,25 +1023,7 @@
- INCLUDE test_windirent.c
- #define dirent DIRENT
- #endif
--INCLUDE ../ext/misc/shathree.c
--INCLUDE ../ext/misc/fileio.c
--INCLUDE ../ext/misc/completion.c
--INCLUDE ../ext/misc/appendvfs.c
- INCLUDE ../ext/misc/memtrace.c
--INCLUDE ../ext/misc/uint.c
--INCLUDE ../ext/misc/decimal.c
--INCLUDE ../ext/misc/ieee754.c
--INCLUDE ../ext/misc/series.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE ../ext/misc/zipfile.c
--INCLUDE ../ext/misc/sqlar.c
--#endif
--INCLUDE ../ext/expert/sqlite3expert.h
--INCLUDE ../ext/expert/sqlite3expert.c
--
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
--INCLUDE ../ext/misc/dbdata.c
--#endif
-
- #if defined(SQLITE_ENABLE_SESSION)
- /*
-@@ -4608,20 +4595,6 @@
- #ifndef SQLITE_OMIT_LOAD_EXTENSION
- sqlite3_enable_load_extension(p->db, 1);
- #endif
-- sqlite3_fileio_init(p->db, 0, 0);
-- sqlite3_shathree_init(p->db, 0, 0);
-- sqlite3_completion_init(p->db, 0, 0);
-- sqlite3_uint_init(p->db, 0, 0);
-- sqlite3_decimal_init(p->db, 0, 0);
-- sqlite3_ieee_init(p->db, 0, 0);
-- sqlite3_series_init(p->db, 0, 0);
--#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_ENABLE_DBPAGE_VTAB)
-- sqlite3_dbdata_init(p->db, 0, 0);
--#endif
--#ifdef SQLITE_HAVE_ZLIB
-- sqlite3_zipfile_init(p->db, 0, 0);
-- sqlite3_sqlar_init(p->db, 0, 0);
--#endif
- sqlite3_create_function(p->db, "shell_add_schema", 3, SQLITE_UTF8, 0,
- shellAddSchemaName, 0, 0);
- sqlite3_create_function(p->db, "shell_module_schema", 1, SQLITE_UTF8, 0,
-@@ -6644,8 +6617,6 @@
- );
- goto end_ar_command;
- }
-- sqlite3_fileio_init(cmd.db, 0, 0);
-- sqlite3_sqlar_init(cmd.db, 0, 0);
- sqlite3_create_function(cmd.db, "shell_putsnl", 1, SQLITE_UTF8, cmd.p,
- shellPutsFunc, 0, 0);
-
-@@ -11076,6 +11047,7 @@
- #endif
- }
- data.out = stdout;
-+ extern int sqlite3_appendvfs_init(sqlite3 *, char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
-
- /* Go ahead and open the database file if it already exists. If the
---- /src/test_config.c
-+++ /src/test_config.c
-@@ -353,6 +353,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "datetime", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "decimal", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_DECLTYPE
- Tcl_SetVar2(interp, "sqlite_options", "decltype", "0", TCL_GLOBAL_ONLY);
- #else
-@@ -540,6 +542,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "progress", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "regexp", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_REINDEX
- Tcl_SetVar2(interp, "sqlite_options", "reindex", "0", TCL_GLOBAL_ONLY);
- #else
-@@ -662,6 +666,8 @@
- Tcl_SetVar2(interp, "sqlite_options", "truncate_opt", "1", TCL_GLOBAL_ONLY);
- #endif
-
-+ Tcl_SetVar2(interp, "sqlite_options", "uint", "1", TCL_GLOBAL_ONLY);
-+
- #ifdef SQLITE_OMIT_UTF16
- Tcl_SetVar2(interp, "sqlite_options", "utf16", "0", TCL_GLOBAL_ONLY);
- #else
---- /test/e_expr.test
-+++ /test/e_expr.test
-@@ -1079,7 +1079,7 @@
- #
- # There is a regexp function if ICU is enabled though.
- #
--ifcapable !icu {
-+ifcapable !icu&&!regexp {
- do_catchsql_test e_expr-18.1.1 {
- SELECT regexp('abc', 'def')
- } {1 {no such function: regexp}}
---- /test/icu.test
-+++ /test/icu.test
-@@ -41,7 +41,7 @@
- #
- test_expr icu-1.1 {i1='hello'} {i1 REGEXP 'hello'} 1
- test_expr icu-1.2 {i1='hello'} {i1 REGEXP '.ello'} 1
-- test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell'} 0
-+ test_expr icu-1.3 {i1='hello'} {i1 REGEXP '.ell$'} 0
- test_expr icu-1.4 {i1='hello'} {i1 REGEXP '.ell.*'} 1
- test_expr icu-1.5 {i1=NULL} {i1 REGEXP '.ell.*'} {}
-
---- /test/pragma.test
-+++ /test/pragma.test
-@@ -1370,17 +1370,62 @@
- } ;# ifcapable trigger
-
- ifcapable schema_pragmas {
-- do_test pragma-11.1 {
-- execsql2 {
-- pragma collation_list;
-+ ifcapable decimal {
-+ ifcapable uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name UINT seq 1 name decimal seq 2 name RTRIM seq 3 name NOCASE seq 4 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 UINT 2 decimal 3 RTRIM 4 NOCASE 5 BINARY}
- }
-- } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
-- do_test pragma-11.2 {
-- db collate New_Collation blah...
-- execsql {
-- pragma collation_list;
-+ ifcapable !uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name decimal seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 decimal 2 RTRIM 3 NOCASE 4 BINARY}
- }
-- } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+ }
-+ ifcapable !decimal {
-+ ifcapable uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name UINT seq 1 name RTRIM seq 2 name NOCASE seq 3 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 UINT 2 RTRIM 3 NOCASE 4 BINARY}
-+ }
-+ ifcapable !uint {
-+ do_test pragma-11.1 {
-+ execsql2 {
-+ pragma collation_list;
-+ }
-+ } {seq 0 name RTRIM seq 1 name NOCASE seq 2 name BINARY}
-+ do_test pragma-11.2 {
-+ db collate New_Collation blah...
-+ execsql {
-+ pragma collation_list;
-+ }
-+ } {0 New_Collation 1 RTRIM 2 NOCASE 3 BINARY}
-+ }
-+ }
- }
-
- ifcapable schema_pragmas&&tempdb {
---- /test/sessionfuzz.c
-+++ /test/sessionfuzz.c
-@@ -698,49 +698,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <assert.h>
--#ifndef OMIT_ZLIB
--#include "zlib.h"
--#endif
--
--/*
--** Implementation of the "sqlar_uncompress(X,SZ)" SQL function
--**
--** Parameter SZ is interpreted as an integer. If it is less than or
--** equal to zero, then this function returns a copy of X. Or, if
--** SZ is equal to the size of X when interpreted as a blob, also
--** return a copy of X. Otherwise, decompress blob X using zlib
--** utility function uncompress() and return the results (another
--** blob).
--*/
--static void sqlarUncompressFunc(
-- sqlite3_context *context,
-- int argc,
-- sqlite3_value **argv
--){
--#ifdef OMIT_ZLIB
-- sqlite3_result_value(context, argv[0]);
--#else
-- uLong nData;
-- uLongf sz;
--
-- assert( argc==2 );
-- sz = sqlite3_value_int(argv[1]);
--
-- if( sz<=0 || sz==(nData = sqlite3_value_bytes(argv[0])) ){
-- sqlite3_result_value(context, argv[0]);
-- }else{
-- const Bytef *pData= sqlite3_value_blob(argv[0]);
-- Bytef *pOut = sqlite3_malloc(sz);
-- if( Z_OK!=uncompress(pOut, &sz, pData, nData) ){
-- sqlite3_result_error(context, "error in uncompress()", -1);
-- }else{
-- sqlite3_result_blob(context, pOut, sz, SQLITE_TRANSIENT);
-- }
-- sqlite3_free(pOut);
-- }
--#endif
--}
--
-
- /* Run a chunk of SQL. If any errors happen, print an error message
- ** and exit.
---- /tool/mksqlite3c.tcl
-+++ /tool/mksqlite3c.tcl
-@@ -129,6 +129,7 @@
- rtree.h
- sqlite3session.h
- sqlite3.h
-+ sqlite3expert.h
- sqlite3ext.h
- sqlite3rbu.h
- sqliteicu.h
-@@ -416,6 +417,28 @@
- sqlite3session.c
- fts5.c
- stmt.c
-+ amatch.c
-+ appendvfs.c
-+ carray.c
-+ completion.c
-+ csv.c
-+ dbdata.c
-+ decimal.c
-+ eval.c
-+ fileio.c
-+ ieee754.c
-+ nextchar.c
-+ percentile.c
-+ regexp.c
-+ series.c
-+ sha1.c
-+ shathree.c
-+ sqlar.c
-+ sqlite3expert.c
-+ totype.c
-+ uint.c
-+ uuid.c
-+ zipfile.c
- } {
- copy_file tsrc/$file
- }
---- /tool/sqlite3_analyzer.c.in
-+++ /tool/sqlite3_analyzer.c.in
-@@ -14,9 +14,6 @@
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
- #define SQLITE_OMIT_LOAD_EXTENSION 1
--#ifndef USE_EXTERNAL_SQLITE
--INCLUDE sqlite3.c
--#endif
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_analyzer_init_proc(Tcl_Interp *interp){
---- /tool/sqltclsh.c.in
-+++ /tool/sqltclsh.c.in
-@@ -27,21 +27,13 @@
- #define SQLITE_OMIT_SHARED_CACHE 1
- #define SQLITE_DEFAULT_MEMSTATUS 0
- #define SQLITE_MAX_EXPR_DEPTH 0
--INCLUDE sqlite3.c
--INCLUDE $ROOT/ext/misc/appendvfs.c
--#ifdef SQLITE_HAVE_ZLIB
--INCLUDE $ROOT/ext/misc/zipfile.c
--INCLUDE $ROOT/ext/misc/sqlar.c
--#endif
-+#include "sqlite3.h"
- INCLUDE $ROOT/src/tclsqlite.c
-
- const char *sqlite3_tclapp_init_proc(Tcl_Interp *interp){
- (void)interp;
-+ extern int sqlite3_appendvfs_init(sqlite3 *,char **, const sqlite3_api_routines *);
- sqlite3_appendvfs_init(0,0,0);
--#ifdef SQLITE_HAVE_ZLIB
-- sqlite3_auto_extension((void(*)(void))sqlite3_sqlar_init);
-- sqlite3_auto_extension((void(*)(void))sqlite3_zipfile_init);
--#endif
-
- return
- BEGIN_STRING
diff --git a/dev-db/sqlite/sqlite-3.33.0.ebuild b/dev-db/sqlite/sqlite-3.33.0.ebuild
deleted file mode 100644
index 2ce5d1d4506..00000000000
--- a/dev-db/sqlite/sqlite-3.33.0.ebuild
+++ /dev/null
@@ -1,374 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-if [[ "${PV}" != "9999" ]]; then
- SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
- DOC_PV="${SRC_PV}"
- # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
-fi
-
-DESCRIPTION="SQL database engine"
-HOMEPAGE="https://sqlite.org/"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip
- doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )"
-fi
-
-LICENSE="public-domain"
-SLOT="3"
-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"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-if [[ "${PV}" == "9999" ]]; then
- PROPERTIES="live"
-fi
-RESTRICT="!test? ( test )"
-
-if [[ "${PV}" == "9999" ]]; then
- BDEPEND=">=dev-lang/tcl-8.6:0
- dev-vcs/fossil"
-else
- BDEPEND="app-arch/unzip
- >=dev-lang/tcl-8.6:0"
-fi
-RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0= )"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
-
-if [[ "${PV}" == "9999" ]]; then
- S="${WORKDIR}/${PN}"
-else
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
-fi
-
-src_unpack() {
- if [[ "${PV}" == "9999" ]]; then
- local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
- addwrite "${distdir}"
- mkdir -p "${distdir}/fossil-src/${PN}" || die
-
- mkdir "${WORKDIR}/${PN}" || die
- pushd "${WORKDIR}/${PN}" > /dev/null || die
- if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite.fossil" ]]; then
- einfo fossil clone --verbose https://sqlite.org/src sqlite.fossil
- fossil clone --verbose https://sqlite.org/src sqlite.fossil || die
- echo
- else
- cp -p "${distdir}/fossil-src/${PN}/sqlite.fossil" . || die
- einfo fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src
- fossil pull --repository sqlite.fossil --verbose https://sqlite.org/src || die
- echo
- fi
- cp -p sqlite.fossil "${distdir}/fossil-src/${PN}" || die
- einfo fossil open --quiet sqlite.fossil
- fossil open --quiet sqlite.fossil || die
- echo
- popd > /dev/null || die
-
- if use doc; then
- mkdir "${WORKDIR}/${PN}-doc" || die
- pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
- if [[ ! -f "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" ]]; then
- einfo fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil
- fossil clone --verbose https://sqlite.org/docsrc sqlite-doc.fossil || die
- echo
- else
- cp -p "${distdir}/fossil-src/${PN}/sqlite-doc.fossil" . || die
- einfo fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc
- fossil pull --repository sqlite-doc.fossil --verbose https://sqlite.org/docsrc || die
- echo
- fi
- cp -p sqlite-doc.fossil "${distdir}/fossil-src/${PN}" || die
- einfo fossil open --quiet sqlite-doc.fossil
- fossil open --quiet sqlite-doc.fossil || die
- echo
- popd > /dev/null || die
- fi
- else
- default
- fi
-}
-
-src_prepare() {
- eapply "${FILESDIR}/"${PN}-3.33.0-build_{1.1,1.2,2.1,2.2}.patch
-
- eapply_user
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
- local options=()
-
- options+=(
- --enable-load-extension
- --enable-threadsafe
- )
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support bytecode and tables_used virtual tables.
- # https://sqlite.org/compile.html#enable_bytecode_vtab
- # https://sqlite.org/bytecodevtab.html
- append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
-
- # Support column metadata functions.
- # https://sqlite.org/compile.html#enable_column_metadata
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support sqlite_dbpage virtual table.
- # https://sqlite.org/compile.html#enable_dbpage_vtab
- # https://sqlite.org/dbpage.html
- append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
-
- # Support dbstat virtual table.
- # https://sqlite.org/compile.html#enable_dbstat_vtab
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support sqlite3_serialize() and sqlite3_deserialize() functions.
- # https://sqlite.org/compile.html#enable_deserialize
- # https://sqlite.org/c3ref/serialize.html
- # https://sqlite.org/c3ref/deserialize.html
- append-cppflags -DSQLITE_ENABLE_DESERIALIZE
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/compile.html#enable_fts3
- # https://sqlite.org/compile.html#enable_fts3_parenthesis
- # https://sqlite.org/compile.html#enable_fts4
- # https://sqlite.org/compile.html#enable_fts5
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/compile.html#enable_json1
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/compile.html#enable_memsys5
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support sqlite3_normalized_sql() function.
- # https://sqlite.org/c3ref/expanded_sql.html
- append-cppflags -DSQLITE_ENABLE_NORMALIZE
-
- # Support sqlite_offset() function.
- # https://sqlite.org/compile.html#enable_offset_sql_func
- # https://sqlite.org/lang_corefunc.html#sqlite_offset
- append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
-
- # Support pre-update hook functions.
- # https://sqlite.org/compile.html#enable_preupdate_hook
- # https://sqlite.org/c3ref/preupdate_count.html
- append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/compile.html#enable_rbu
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/compile.html#enable_rtree
- # https://sqlite.org/compile.html#enable_geopoly
- # https://sqlite.org/rtree.html
- # https://sqlite.org/geopoly.html
- append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
-
- # Support Session extension.
- # https://sqlite.org/compile.html#enable_session
- # https://sqlite.org/sessionintro.html
- append-cppflags -DSQLITE_ENABLE_SESSION
-
- # Support scan status functions.
- # https://sqlite.org/compile.html#enable_stmt_scanstatus
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support sqlite_stmt virtual table.
- # https://sqlite.org/compile.html#enable_stmtvtab
- # https://sqlite.org/stmt.html
- append-cppflags -DSQLITE_ENABLE_STMTVTAB
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/compile.html#enable_unlock_notify
- # https://sqlite.org/c3ref/unlock_notify.html
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
- # https://sqlite.org/compile.html#enable_update_delete_limit
- # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
- # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
- append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-
- # Support soundex() function.
- # https://sqlite.org/compile.html#soundex
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # Support URI filenames.
- # https://sqlite.org/compile.html#use_uri
- # https://sqlite.org/uri.html
- append-cppflags -DSQLITE_USE_URI
-
- # debug USE flag.
- options+=($(use_enable debug))
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if use readline; then
- options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/compile.html#secure_delete
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if use tcl || use test || { use tools && multilib_is_native_abi; }; then
- options+=(
- --enable-tcl
- --with-tcl="${ESYSROOT}/usr/$(get_libdir)"
- )
- else
- options+=(--disable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- # sys/mman.h not available in MiNTLib.
- # https://sqlite.org/compile.html#omit_wal
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- if [[ "${ABI}" == "x86" ]]; then
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
- append-cflags -mfpmath=sse
- else
- append-cflags -ffloat-store
- fi
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool dbtotxt sqlite3-db-to-txt
- install_tool index_usage sqlite3-index-usage
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showshm sqlite3-show-shm
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
- install_tool sqlite3_checker sqlite3-checker
- install_tool sqlite3_expert sqlite3-expert
- install_tool sqltclsh sqlite3-tclsh
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- find "${D}" -name "*.la" -type f -delete || die
-
- doman sqlite3.1
-
- if use doc; then
- if [[ "${PV}" == "9999" ]]; then
- pushd "${WORKDIR}/${PN}-doc" > /dev/null || die
- else
- pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
- fi
- rm *.db *.txt || die
- (
- docinto html
- dodoc -r *
- )
- popd > /dev/null || die
- fi
-}
diff --git a/dev-db/sqlite/sqlite-3.34.0.ebuild b/dev-db/sqlite/sqlite-3.34.0.ebuild
deleted file mode 100644
index e9d419d08e7..00000000000
--- a/dev-db/sqlite/sqlite-3.34.0.ebuild
+++ /dev/null
@@ -1,434 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-if [[ "${PV}" != "9999" ]]; then
- SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
- DOC_PV="${SRC_PV}"
- # DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
-fi
-
-DESCRIPTION="SQL database engine"
-HOMEPAGE="https://sqlite.org/"
-if [[ "${PV}" == "9999" ]]; then
- SRC_URI=""
-else
- SRC_URI="https://sqlite.org/2020/${PN}-src-${SRC_PV}.zip
- doc? ( https://sqlite.org/2020/${PN}-doc-${DOC_PV}.zip )"
-fi
-
-LICENSE="public-domain"
-SLOT="3"
-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"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-if [[ "${PV}" == "9999" ]]; then
- PROPERTIES="live"
-fi
-RESTRICT="!test? ( test )"
-
-if [[ "${PV}" == "9999" ]]; then
- BDEPEND=">=dev-lang/tcl-8.6:0
- dev-vcs/fossil"
-else
- BDEPEND="app-arch/unzip
- >=dev-lang/tcl-8.6:0"
-fi
-RDEPEND="sys-libs/zlib:0=[${MULTILIB_USEDEP}]
- icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:0= )"
-DEPEND="${RDEPEND}
- test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )"
-
-if [[ "${PV}" == "9999" ]]; then
- S="${WORKDIR}/${PN}"
-else
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
-fi
-
-_fossil_fetch() {
- local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
- local repo_id="${1}"
- local repo_uri="${2}"
-
- local -x FOSSIL_HOME="${HOME}"
-
- mkdir -p "${T}/fossil/${repo_id}" || die
- pushd "${T}/fossil/${repo_id}" > /dev/null || die
-
- if [[ -n "${EVCS_OFFLINE}" ]]; then
- if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
- die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
- fi
- else
- if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
- einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
- fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
- echo
- else
- cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
- einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
- fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
- echo
- fi
-
- (
- addwrite "${distdir}"
- mkdir -p "${distdir}/fossil-src/${repo_id}" || die
- cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
- )
- fi
-
- popd > /dev/null || die
-}
-
-_fossil_checkout() {
- local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
- local repo_id="${1}"
- local branch_or_commit="${2}"
- local target_directory="${3}"
-
- local -x FOSSIL_HOME="${HOME}"
-
- if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
- die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
- fi
-
- if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
- mkdir -p "${T}/fossil/${repo_id}" || die
- cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
- fi
-
- mkdir "${target_directory}" || die
- pushd "${target_directory}" > /dev/null || die
-
- einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
- fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
- echo
-
- popd > /dev/null || die
-}
-
-fossil_fetch() {
- local repo_id="${1}"
- local repo_uri="${2}"
- local target_directory="${3}"
-
- local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
-
- _fossil_fetch "${repo_id}" "${repo_uri}"
- _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
-}
-
-src_unpack() {
- if [[ "${PV}" == "9999" ]]; then
- fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
- if use doc; then
- fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
- fi
- else
- default
- fi
-}
-
-src_prepare() {
- eapply "${FILESDIR}/"${PN}-3.34.0-build_{1.1,1.2,2.1,2.2}.patch
-
- eapply_user
-
- eautoreconf
-
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
- local options=()
-
- options+=(
- --enable-load-extension
- --enable-threadsafe
- )
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support bytecode and tables_used virtual tables.
- # https://sqlite.org/compile.html#enable_bytecode_vtab
- # https://sqlite.org/bytecodevtab.html
- append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
-
- # Support column metadata functions.
- # https://sqlite.org/compile.html#enable_column_metadata
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support sqlite_dbpage virtual table.
- # https://sqlite.org/compile.html#enable_dbpage_vtab
- # https://sqlite.org/dbpage.html
- append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
-
- # Support dbstat virtual table.
- # https://sqlite.org/compile.html#enable_dbstat_vtab
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support sqlite3_serialize() and sqlite3_deserialize() functions.
- # https://sqlite.org/compile.html#enable_deserialize
- # https://sqlite.org/c3ref/serialize.html
- # https://sqlite.org/c3ref/deserialize.html
- append-cppflags -DSQLITE_ENABLE_DESERIALIZE
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/compile.html#enable_fts3
- # https://sqlite.org/compile.html#enable_fts3_parenthesis
- # https://sqlite.org/compile.html#enable_fts4
- # https://sqlite.org/compile.html#enable_fts5
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=(--enable-fts5)
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support JSON1 extension.
- # https://sqlite.org/compile.html#enable_json1
- # https://sqlite.org/json1.html
- append-cppflags -DSQLITE_ENABLE_JSON1
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/compile.html#enable_memsys5
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support sqlite3_normalized_sql() function.
- # https://sqlite.org/c3ref/expanded_sql.html
- append-cppflags -DSQLITE_ENABLE_NORMALIZE
-
- # Support sqlite_offset() function.
- # https://sqlite.org/compile.html#enable_offset_sql_func
- # https://sqlite.org/lang_corefunc.html#sqlite_offset
- append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
-
- # Support pre-update hook functions.
- # https://sqlite.org/compile.html#enable_preupdate_hook
- # https://sqlite.org/c3ref/preupdate_count.html
- append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/compile.html#enable_rbu
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/compile.html#enable_rtree
- # https://sqlite.org/compile.html#enable_geopoly
- # https://sqlite.org/rtree.html
- # https://sqlite.org/geopoly.html
- append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
-
- # Support Session extension.
- # https://sqlite.org/compile.html#enable_session
- # https://sqlite.org/sessionintro.html
- append-cppflags -DSQLITE_ENABLE_SESSION
-
- # Support scan status functions.
- # https://sqlite.org/compile.html#enable_stmt_scanstatus
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support sqlite_stmt virtual table.
- # https://sqlite.org/compile.html#enable_stmtvtab
- # https://sqlite.org/stmt.html
- append-cppflags -DSQLITE_ENABLE_STMTVTAB
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/compile.html#enable_unlock_notify
- # https://sqlite.org/c3ref/unlock_notify.html
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
- # https://sqlite.org/compile.html#enable_update_delete_limit
- # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
- # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
- append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-
- # Support soundex() function.
- # https://sqlite.org/compile.html#soundex
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # Support URI filenames.
- # https://sqlite.org/compile.html#use_uri
- # https://sqlite.org/uri.html
- append-cppflags -DSQLITE_USE_URI
-
- # debug USE flag.
- options+=($(use_enable debug))
-
- # icu USE flag.
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
-
- # readline USE flag.
- options+=(
- --disable-editline
- $(use_enable readline)
- )
- if use readline; then
- options+=(--with-readline-inc="-I${ESYSROOT}/usr/include/readline")
- fi
-
- # secure-delete USE flag.
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/compile.html#secure_delete
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- # static-libs USE flag.
- options+=($(use_enable static-libs static))
-
- # tcl, test, tools USE flags.
- if use tcl || use test || { use tools && multilib_is_native_abi; }; then
- options+=(
- --enable-tcl
- --with-tcl="${ESYSROOT}/usr/$(get_libdir)"
- )
- else
- options+=(--disable-tcl)
- fi
-
- if [[ "${CHOST}" == *-mint* ]]; then
- # sys/mman.h not available in MiNTLib.
- # https://sqlite.org/compile.html#omit_wal
- append-cppflags -DSQLITE_OMIT_WAL
- fi
-
- if [[ "${ABI}" == "x86" ]]; then
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
- append-cflags -mfpmath=sse
- else
- append-cflags -ffloat-store
- fi
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
- fi
-
- if [[ "${PV}" == "9999" ]] && use doc && multilib_is_native_abi; then
- emake tclsqlite3.c
-
- local build_directory="$(pwd)"
- build_directory="${build_directory##*/}"
-
- mkdir "${WORKDIR}/${PN}-doc-build" || die
- pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
-
- 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
- rmdir doc/matrix{/*,} || die
-
- popd > /dev/null || die
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(use debug && echo fulltest || echo test)
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool dbtotxt sqlite3-db-to-txt
- install_tool index_usage sqlite3-index-usage
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showshm sqlite3-show-shm
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
- install_tool sqlite3_checker sqlite3-checker
- install_tool sqlite3_expert sqlite3-expert
- install_tool sqltclsh sqlite3-tclsh
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -name "*.la" -delete || die
-
- doman sqlite3.1
-
- if use doc; then
- if [[ "${PV}" == "9999" ]]; then
- pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
- else
- pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
- fi
-
- find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
- if [[ "${PV}" != "9999" ]]; then
- rm search search.d/admin || die
- rmdir search.d || die
- find -name "*~" -delete || die
- fi
-
- (
- docinto html
- dodoc -r *
- )
-
- popd > /dev/null || die
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2022-11-25 3:40 Sam James
0 siblings, 0 replies; 35+ messages in thread
From: Sam James @ 2022-11-25 3:40 UTC (permalink / raw
To: gentoo-commits
commit: fd4b7ae5796c5730482d4f2e632709f14632e1d3
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 25 03:25:34 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 25 03:25:42 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd4b7ae5
dev-db/sqlite: fix tests w/ ICU 72
Closes: https://bugs.gentoo.org/882605
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../sqlite/files/sqlite-3.39.4-icu-72-test.patch | 29 ++++++++++++++++++++++
dev-db/sqlite/sqlite-3.39.4.ebuild | 6 ++++-
2 files changed, 34 insertions(+), 1 deletion(-)
diff --git a/dev-db/sqlite/files/sqlite-3.39.4-icu-72-test.patch b/dev-db/sqlite/files/sqlite-3.39.4-icu-72-test.patch
new file mode 100644
index 000000000000..54de04d11f06
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.39.4-icu-72-test.patch
@@ -0,0 +1,29 @@
+https://sqlite.org/src/vpatch?from=18e89a436daa18a8&to=a2b6883ac2ef878f
+https://sqlite.org/forum/forumpost/072d2fddc4
+https://bugs.gentoo.org/882605
+--- a/test/fts3expr4.test
++++ b/test/fts3expr4.test
+@@ -48,11 +48,20 @@
+
+ # In "col:word", if "col" is not the name of a column, the entire thing
+ # is passed to the tokenizer.
+ #
+ do_icu_expr_test 1.7 {a:word} {PHRASE 0 0 word}
+-do_icu_expr_test 1.8 {d:word} {PHRASE 3 0 d:word}
++# do_icu_expr_test 1.8 {d:word} {PHRASE 3 0 d:word}
++do_test 1.8 {
++ set res [
++ db one {SELECT fts3_exprtest('icu en_US', 'd:word', 'a', 'b', 'c')}
++ ]
++ expr {
++ $res=="PHRASE 3 0 d:word" ||
++ $res=="AND {AND {PHRASE 3 0 d} {PHRASE 3 0 :}} {PHRASE 3 0 word}"
++ }
++} 1
+
+ set sqlite_fts3_enable_parentheses 0
+
+ do_icu_expr_test 2.1 {
+ f (e NEAR/2 a)
+
+
diff --git a/dev-db/sqlite/sqlite-3.39.4.ebuild b/dev-db/sqlite/sqlite-3.39.4.ebuild
index a2eb7c1e987f..ffcf6d08808b 100644
--- a/dev-db/sqlite/sqlite-3.39.4.ebuild
+++ b/dev-db/sqlite/sqlite-3.39.4.ebuild
@@ -53,6 +53,10 @@ else
S="${WORKDIR}/${PN}-src-${SRC_PV}"
fi
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.39.4-icu-72-test.patch
+)
+
_fossil_fetch() {
local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
local repo_id="${1}"
@@ -139,7 +143,7 @@ src_unpack() {
}
src_prepare() {
- eapply_user
+ default
eautoreconf
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2023-03-23 22:39 Sam James
0 siblings, 0 replies; 35+ messages in thread
From: Sam James @ 2023-03-23 22:39 UTC (permalink / raw
To: gentoo-commits
commit: 9c6f1523663c26c5b147805faff9817927b34260
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 23 22:37:56 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 23 22:38:14 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c6f1523
dev-db/sqlite: backport significant performance regression fix
See the discussion at https://sqlite.org/forum/forumpost/3a180ba0d4.
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/sqlite-3.41.2-perf-regression.patch | 101 +++++
dev-db/sqlite/sqlite-3.41.2-r1.ebuild | 433 +++++++++++++++++++++
2 files changed, 534 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.41.2-perf-regression.patch b/dev-db/sqlite/files/sqlite-3.41.2-perf-regression.patch
new file mode 100644
index 000000000000..7d8acf6ddda8
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.41.2-perf-regression.patch
@@ -0,0 +1,101 @@
+https://sqlite.org/forum/forumpost/3a180ba0d4
+https://sqlite.org/src/info/aa6bd6dff751223e
+(-> https://sqlite.org/src/vpatch?from=71215599cd8ebb97&to=aa6bd6dff751223e)
+
+--- a/src/select.c
++++ b/src/select.c
+@@ -4236,12 +4236,11 @@
+ ** (17f) the subquery must not be the RHS of a LEFT JOIN.
+ ** (17g) either the subquery is the first element of the outer
+ ** query or there are no RIGHT or FULL JOINs in any arm
+ ** of the subquery. (This is a duplicate of condition (27b).)
+ ** (17h) The corresponding result set expressions in all arms of the
+-** compound must have the same affinity. (See restriction (9)
+-** on the push-down optimization.)
++** compound must have the same affinity.
+ **
+ ** The parent and sub-query may contain WHERE clauses. Subject to
+ ** rules (11), (13) and (14), they may also contain ORDER BY,
+ ** LIMIT and OFFSET clauses. The subquery cannot use any compound
+ ** operator other than UNION ALL because all the other compound
+@@ -5105,14 +5104,10 @@
+ **
+ ** (8) If the subquery is a compound that uses UNION, INTERSECT,
+ ** or EXCEPT, then all of the result set columns for all arms of
+ ** the compound must use the BINARY collating sequence.
+ **
+-** (9) If the subquery is a compound, then all arms of the compound must
+-** have the same affinity. (This is the same as restriction (17h)
+-** for query flattening.)
+-**
+ **
+ ** Return 0 if no changes are made and non-zero if one or more WHERE clause
+ ** terms are duplicated into the subquery.
+ */
+ static int pushDownWhereTerms(
+@@ -5139,13 +5134,10 @@
+ }
+ #ifndef SQLITE_OMIT_WINDOWFUNC
+ if( pSel->pWin ) return 0; /* restriction (6b) */
+ #endif
+ }
+- if( compoundHasDifferentAffinities(pSubq) ){
+- return 0; /* restriction (9) */
+- }
+ if( notUnionAll ){
+ /* If any of the compound arms are connected using UNION, INTERSECT,
+ ** or EXCEPT, then we must ensure that none of the columns use a
+ ** non-BINARY collating sequence. */
+ for(pSel=pSubq; pSel; pSel=pSel->pPrior){
+
+--- a/test/pushdown.test
++++ b/test/pushdown.test
+@@ -120,7 +120,47 @@
+ SELECT v1.a, v1.b, t0.c0 AS cd FROM t0 LEFT JOIN v0 ON v0.c0!=0, v1
+ ) WHERE a=2 AND b=0 AND cd=0;
+ } {
+ 2 0 0
+ }
+-
++
++# 2023-02-22 https://sqlite.org/forum/forumpost/bcc4375032
++# Performance regression caused by check-in [1ad41840c5e0fa70] from 2022-11-25.
++# That check-in added a new restriction on push-down. The new restriction is
++# no longer necessary after check-in [27655c9353620aa5] from 2022-12-14.
++#
++do_execsql_test 3.5 {
++ DROP TABLE IF EXISTS t1;
++ CREATE TABLE t1(a INT, b INT, c TEXT, PRIMARY KEY(a,b)) WITHOUT ROWID;
++ INSERT INTO t1(a,b,c) VALUES
++ (1,100,'abc'),
++ (2,200,'def'),
++ (3,300,'abc');
++ DROP TABLE IF EXISTS t2;
++ CREATE TABLE t2(a INT, b INT, c TEXT, PRIMARY KEY(a,b)) WITHOUT ROWID;
++ INSERT INTO t2(a,b,c) VALUES
++ (1,110,'efg'),
++ (2,200,'hij'),
++ (3,330,'klm');
++ CREATE VIEW v3 AS
++ SELECT a, b, c FROM t1
++ UNION ALL
++ SELECT a, b, 'xyz' FROM t2;
++ SELECT * FROM v3 WHERE a=2 AND b=200;
++} {2 200 def 2 200 xyz}
++do_eqp_test 3.6 {
++ SELECT * FROM v3 WHERE a=2 AND b=200;
++} {
++ QUERY PLAN
++ |--CO-ROUTINE v3
++ | `--COMPOUND QUERY
++ | |--LEFT-MOST SUBQUERY
++ | | `--SEARCH t1 USING PRIMARY KEY (a=? AND b=?)
++ | `--UNION ALL
++ | `--SEARCH t2 USING PRIMARY KEY (a=? AND b=?)
++ `--SCAN v3
++}
++# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
++# We want both arms of the compound subquery to use the
++# primary key.
++
+ finish_test
diff --git a/dev-db/sqlite/sqlite-3.41.2-r1.ebuild b/dev-db/sqlite/sqlite-3.41.2-r1.ebuild
new file mode 100644
index 000000000000..95cbc793093a
--- /dev/null
+++ b/dev-db/sqlite/sqlite-3.41.2-r1.ebuild
@@ -0,0 +1,433 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="SQL database engine"
+HOMEPAGE="https://sqlite.org/"
+
+# On version updates, make sure to read the forum (https://sqlite.org/forum/forum)
+# for hints regarding test failures, backports, etc.
+if [[ ${PV} == 9999 ]]; then
+ S="${WORKDIR}"/${PN}
+ PROPERTIES="live"
+else
+ SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
+ DOC_PV="${SRC_PV}"
+ #DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
+
+ SRC_URI="
+ https://sqlite.org/2023/${PN}-src-${SRC_PV}.zip
+ doc? ( https://sqlite.org/2023/${PN}-doc-${DOC_PV}.zip )
+ "
+ S="${WORKDIR}/${PN}-src-${SRC_PV}"
+
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~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"
+fi
+
+LICENSE="public-domain"
+SLOT="3"
+IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ sys-libs/zlib:=[${MULTILIB_USEDEP}]
+ icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
+ readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] )
+ tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] )
+ tools? ( dev-lang/tcl:= )
+"
+DEPEND="
+ ${RDEPEND}
+ test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )
+"
+BDEPEND=">=dev-lang/tcl-8.6:0"
+if [[ ${PV} == 9999 ]]; then
+ BDEPEND+=" dev-vcs/fossil"
+else
+ BDEPEND+=" app-arch/unzip"
+fi
+
+PATCHES=(
+ # Will be fixed in 3.42
+ "${FILESDIR}"/${PN}-3.41.2-perf-regression.patch
+)
+
+_fossil_fetch() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local repo_uri="${2}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ pushd "${T}/fossil/${repo_id}" > /dev/null || die
+
+ if [[ -n "${EVCS_OFFLINE}" ]]; then
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+ else
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
+ fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
+ echo
+ else
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
+ einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
+ fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
+ echo
+ fi
+
+ (
+ addwrite "${distdir}"
+ mkdir -p "${distdir}/fossil-src/${repo_id}" || die
+ cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
+ )
+ fi
+
+ popd > /dev/null || die
+}
+
+_fossil_checkout() {
+ local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
+ local repo_id="${1}"
+ local branch_or_commit="${2}"
+ local target_directory="${3}"
+
+ local -x FOSSIL_HOME="${HOME}"
+
+ if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
+ die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
+ fi
+
+ if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
+ mkdir -p "${T}/fossil/${repo_id}" || die
+ cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
+ fi
+
+ mkdir "${target_directory}" || die
+ pushd "${target_directory}" > /dev/null || die
+
+ einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
+ fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
+ echo
+
+ popd > /dev/null || die
+}
+
+fossil_fetch() {
+ local repo_id="${1}"
+ local repo_uri="${2}"
+ local target_directory="${3}"
+
+ local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
+
+ _fossil_fetch "${repo_id}" "${repo_uri}"
+ _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
+}
+
+src_unpack() {
+ if [[ ${PV} == 9999 ]]; then
+ fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
+ if use doc; then
+ fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
+ fi
+ else
+ default
+ fi
+}
+
+src_prepare() {
+ default
+
+ eautoreconf
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
+ local options=()
+
+ options+=(
+ --enable-load-extension
+ --enable-threadsafe
+ )
+
+ # Support detection of misuse of SQLite API.
+ # https://sqlite.org/compile.html#enable_api_armor
+ append-cppflags -DSQLITE_ENABLE_API_ARMOR
+
+ # Support bytecode and tables_used virtual tables.
+ # https://sqlite.org/compile.html#enable_bytecode_vtab
+ # https://sqlite.org/bytecodevtab.html
+ append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
+
+ # Support column metadata functions.
+ # https://sqlite.org/compile.html#enable_column_metadata
+ # https://sqlite.org/c3ref/column_database_name.html
+ append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
+
+ # Support sqlite_dbpage virtual table.
+ # https://sqlite.org/compile.html#enable_dbpage_vtab
+ # https://sqlite.org/dbpage.html
+ append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
+
+ # Support dbstat virtual table.
+ # https://sqlite.org/compile.html#enable_dbstat_vtab
+ # https://sqlite.org/dbstat.html
+ append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
+
+ # Support sqlite3_serialize() and sqlite3_deserialize() functions.
+ # https://sqlite.org/compile.html#enable_deserialize
+ # https://sqlite.org/c3ref/serialize.html
+ # https://sqlite.org/c3ref/deserialize.html
+ append-cppflags -DSQLITE_ENABLE_DESERIALIZE
+
+ # Support comments in output of EXPLAIN.
+ # https://sqlite.org/compile.html#enable_explain_comments
+ append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+
+ # Support Full-Text Search versions 3, 4 and 5.
+ # https://sqlite.org/compile.html#enable_fts3
+ # https://sqlite.org/compile.html#enable_fts3_parenthesis
+ # https://sqlite.org/compile.html#enable_fts4
+ # https://sqlite.org/compile.html#enable_fts5
+ # https://sqlite.org/fts3.html
+ # https://sqlite.org/fts5.html
+ append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
+ options+=( --enable-fts5 )
+
+ # Support hidden columns.
+ append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
+
+ # Support memsys5 memory allocator.
+ # https://sqlite.org/compile.html#enable_memsys5
+ # https://sqlite.org/malloc.html#memsys5
+ append-cppflags -DSQLITE_ENABLE_MEMSYS5
+
+ # Support sqlite3_normalized_sql() function.
+ # https://sqlite.org/c3ref/expanded_sql.html
+ append-cppflags -DSQLITE_ENABLE_NORMALIZE
+
+ # Support sqlite_offset() function.
+ # https://sqlite.org/compile.html#enable_offset_sql_func
+ # https://sqlite.org/lang_corefunc.html#sqlite_offset
+ append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
+
+ # Support pre-update hook functions.
+ # https://sqlite.org/compile.html#enable_preupdate_hook
+ # https://sqlite.org/c3ref/preupdate_count.html
+ append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
+
+ # Support Resumable Bulk Update extension.
+ # https://sqlite.org/compile.html#enable_rbu
+ # https://sqlite.org/rbu.html
+ append-cppflags -DSQLITE_ENABLE_RBU
+
+ # Support R*Trees.
+ # https://sqlite.org/compile.html#enable_rtree
+ # https://sqlite.org/compile.html#enable_geopoly
+ # https://sqlite.org/rtree.html
+ # https://sqlite.org/geopoly.html
+ append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
+
+ # Support Session extension.
+ # https://sqlite.org/compile.html#enable_session
+ # https://sqlite.org/sessionintro.html
+ append-cppflags -DSQLITE_ENABLE_SESSION
+
+ # Support scan status functions.
+ # https://sqlite.org/compile.html#enable_stmt_scanstatus
+ # https://sqlite.org/c3ref/stmt_scanstatus.html
+ # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
+ append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
+
+ # Support sqlite_stmt virtual table.
+ # https://sqlite.org/compile.html#enable_stmtvtab
+ # https://sqlite.org/stmt.html
+ append-cppflags -DSQLITE_ENABLE_STMTVTAB
+
+ # Support unknown() function.
+ # https://sqlite.org/compile.html#enable_unknown_sql_function
+ append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
+
+ # Support unlock notification.
+ # https://sqlite.org/compile.html#enable_unlock_notify
+ # https://sqlite.org/c3ref/unlock_notify.html
+ # https://sqlite.org/unlock_notify.html
+ append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
+
+ # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
+ # https://sqlite.org/compile.html#enable_update_delete_limit
+ # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
+ # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
+ append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
+
+ # Support soundex() function.
+ # https://sqlite.org/compile.html#soundex
+ # https://sqlite.org/lang_corefunc.html#soundex
+ append-cppflags -DSQLITE_SOUNDEX
+
+ # Support URI filenames.
+ # https://sqlite.org/compile.html#use_uri
+ # https://sqlite.org/uri.html
+ append-cppflags -DSQLITE_USE_URI
+
+ options+=( $(use_enable debug) )
+
+ if use icu; then
+ # Support ICU extension.
+ # https://sqlite.org/compile.html#enable_icu
+ append-cppflags -DSQLITE_ENABLE_ICU
+ sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
+ fi
+
+ options+=(
+ --disable-editline
+ $(use_enable readline)
+ )
+
+ if use readline; then
+ options+=( --with-readline-inc="-I${ESYSROOT}/usr/include/readline" )
+ fi
+
+ if use secure-delete; then
+ # Enable secure_delete pragma by default.
+ # https://sqlite.org/compile.html#secure_delete
+ # https://sqlite.org/pragma.html#pragma_secure_delete
+ append-cppflags -DSQLITE_SECURE_DELETE
+ fi
+
+ options+=( $(use_enable static-libs static) )
+
+ # tcl, test, tools USE flags.
+ if use tcl || use test || { use tools && multilib_is_native_abi; }; then
+ options+=(
+ --enable-tcl
+ --with-tcl="${ESYSROOT}/usr/$(get_libdir)"
+ )
+ else
+ options+=( --disable-tcl )
+ fi
+
+ if [[ "${ABI}" == "x86" ]]; then
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
+ append-cflags -mfpmath=sse
+ else
+ append-cflags -ffloat-store
+ fi
+
+ # Skip known-broken test for now
+ # https://sqlite.org/forum/forumpost/d97caf168f
+ # https://sqlite.org/forum/forumpost/50f136d91d
+ if use test ; then
+ rm test/atof1.test || die
+ fi
+ fi
+
+ econf "${options[@]}"
+}
+
+multilib_src_compile() {
+ emake HAVE_TCL="$(usev tcl 1)" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
+
+ if use tools && multilib_is_native_abi; then
+ emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
+ fi
+
+ if [[ ${PV} == 9999 ]] && use doc && multilib_is_native_abi; then
+ emake tclsqlite3.c
+
+ local build_directory="$(pwd)"
+ build_directory="${build_directory##*/}"
+
+ mkdir "${WORKDIR}/${PN}-doc-build" || die
+ pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
+
+ 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
+ rmdir doc/matrix{/*,} || die
+
+ popd > /dev/null || die
+ fi
+}
+
+multilib_src_test() {
+ if [[ "${EUID}" -eq 0 ]]; then
+ ewarn "Skipping tests due to root permissions"
+ return
+ fi
+
+ local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
+
+ # e_uri.test tries to open files in /.
+ # bug #839798
+ local SANDBOX_PREDICT=${SANDBOX_PREDICT}
+ addpredict "/test.db:/ÿ.db"
+
+ emake HAVE_TCL="$(usex tcl 1 "")" $(usex debug 'fulltest' 'test')
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
+
+ if use tools && multilib_is_native_abi; then
+ install_tool() {
+ if [[ -f ".libs/${1}" ]]; then
+ newbin ".libs/${1}" "${2}"
+ else
+ newbin "${1}" "${2}"
+ fi
+ }
+
+ install_tool changeset sqlite3-changeset
+ install_tool dbdump sqlite3-db-dump
+ install_tool dbhash sqlite3-db-hash
+ install_tool dbtotxt sqlite3-db-to-txt
+ install_tool index_usage sqlite3-index-usage
+ install_tool rbu sqlite3-rbu
+ install_tool scrub sqlite3-scrub
+ install_tool showdb sqlite3-show-db
+ install_tool showjournal sqlite3-show-journal
+ install_tool showshm sqlite3-show-shm
+ install_tool showstat4 sqlite3-show-stat4
+ install_tool showwal sqlite3-show-wal
+ install_tool sqldiff sqlite3-diff
+ install_tool sqlite3_analyzer sqlite3-analyzer
+ install_tool sqlite3_checker sqlite3-checker
+ install_tool sqlite3_expert sqlite3-expert
+ install_tool sqltclsh sqlite3-tclsh
+
+ unset -f install_tool
+ fi
+}
+
+multilib_src_install_all() {
+ find "${ED}" -name "*.la" -delete || die
+
+ doman sqlite3.1
+
+ if use doc; then
+ if [[ ${PV} == 9999 ]]; then
+ pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
+ else
+ pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
+ fi
+
+ find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
+ if [[ ${PV} != 9999 ]]; then
+ rm search search.d/admin || die
+ rmdir search.d || die
+ find -name "*~" -delete || die
+ fi
+
+ (
+ docinto html
+ dodoc -r *
+ )
+
+ popd > /dev/null || die
+ fi
+}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2023-04-17 17:30 Jakov Smolić
0 siblings, 0 replies; 35+ messages in thread
From: Jakov Smolić @ 2023-04-17 17:30 UTC (permalink / raw
To: gentoo-commits
commit: d5c26487bb7165ee6c92c2a7f9e731ecfe3a60b1
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 17 17:01:55 2023 +0000
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Mon Apr 17 17:30:36 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5c26487
dev-db/sqlite: drop 3.40.1
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
dev-db/sqlite/Manifest | 2 -
.../sqlite/files/sqlite-3.39.4-icu-72-test.patch | 29 --
dev-db/sqlite/sqlite-3.40.1.ebuild | 432 ---------------------
3 files changed, 463 deletions(-)
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index cba6d8563d20..7e22dbb9c93c 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -1,4 +1,2 @@
-DIST sqlite-doc-3400100.zip 10934836 BLAKE2B 52adbfa911a5d8556e4e071bf14ad83145023fbd426f285d9724d7f06e41257df53d3c28224581f12b4ca8f699bf3d3ec829ee161374ce0208783e5da72639dc SHA512 1131b0a6304a4dd6287c85d38d1450fd2dd0e3377d88a263e3c4716415e0587750357f25486727b9433797da0331229682565e7a8a3986eba89cfcab550a2d41
DIST sqlite-doc-3410200.zip 10633275 BLAKE2B 1323179d04b9fa21df4ed93ad1aa89ff943a9d930ef02699aade779f18f28aa45dac8362d6427d7eb896c0c0b20e12f8446050f1fc08c3deef24e395123319c1 SHA512 77099fd3bfdb0c19baedb1248c5ff028a14cbc98d18956dfb13e55289a7dddbe82d25e4522f0cbbe9c2798e0531c354df5a207f89c62dfe0f84877db47bb4f9e
-DIST sqlite-src-3400100.zip 13725560 BLAKE2B 24d2efbbf7f8f35888b1e53c98f9c7fece9b1cf0b175bf49b78869253aa753ce47e2db67247183c07368e69d6eb63a6e39c06b212c8fd5ca36c892ff535bedca SHA512 78f8c6396bf8da090671c6f4c41255e60788324fccdaad906c53610eb6e37705f4d25c7f84da3be00b511ddf9f2e0545901f33f5ae4b6e00b1ea9413af095299
DIST sqlite-src-3410200.zip 13836230 BLAKE2B 4edcd65728143b1ea27abe65db8c8353dfa309858e6f40d70f3c376ef9e5613d92c41ed5a3c3282cacef8a29a434e3881f6e47ba5642820331170ceb69321d86 SHA512 28cfa72f2b39d851c38fb757a0c6d0696c22548792ce2fa1be5e2f6084e4bf0a5fb216902b59ccba5b6ebaf140aab954ed7676d84841b58ad063404a119a0c17
diff --git a/dev-db/sqlite/files/sqlite-3.39.4-icu-72-test.patch b/dev-db/sqlite/files/sqlite-3.39.4-icu-72-test.patch
deleted file mode 100644
index 54de04d11f06..000000000000
--- a/dev-db/sqlite/files/sqlite-3.39.4-icu-72-test.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-https://sqlite.org/src/vpatch?from=18e89a436daa18a8&to=a2b6883ac2ef878f
-https://sqlite.org/forum/forumpost/072d2fddc4
-https://bugs.gentoo.org/882605
---- a/test/fts3expr4.test
-+++ b/test/fts3expr4.test
-@@ -48,11 +48,20 @@
-
- # In "col:word", if "col" is not the name of a column, the entire thing
- # is passed to the tokenizer.
- #
- do_icu_expr_test 1.7 {a:word} {PHRASE 0 0 word}
--do_icu_expr_test 1.8 {d:word} {PHRASE 3 0 d:word}
-+# do_icu_expr_test 1.8 {d:word} {PHRASE 3 0 d:word}
-+do_test 1.8 {
-+ set res [
-+ db one {SELECT fts3_exprtest('icu en_US', 'd:word', 'a', 'b', 'c')}
-+ ]
-+ expr {
-+ $res=="PHRASE 3 0 d:word" ||
-+ $res=="AND {AND {PHRASE 3 0 d} {PHRASE 3 0 :}} {PHRASE 3 0 word}"
-+ }
-+} 1
-
- set sqlite_fts3_enable_parentheses 0
-
- do_icu_expr_test 2.1 {
- f (e NEAR/2 a)
-
-
diff --git a/dev-db/sqlite/sqlite-3.40.1.ebuild b/dev-db/sqlite/sqlite-3.40.1.ebuild
deleted file mode 100644
index 7013595958a3..000000000000
--- a/dev-db/sqlite/sqlite-3.40.1.ebuild
+++ /dev/null
@@ -1,432 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools flag-o-matic multilib-minimal toolchain-funcs
-
-DESCRIPTION="SQL database engine"
-HOMEPAGE="https://sqlite.org/"
-
-# On version updates, make sure to read the forum (https://sqlite.org/forum/forum)
-# for hints regarding test failures, backports, etc.
-if [[ ${PV} == 9999 ]]; then
- S="${WORKDIR}"/${PN}
- PROPERTIES="live"
-else
- SRC_PV="$(printf "%u%02u%02u%02u" $(ver_rs 1- " "))"
- DOC_PV="${SRC_PV}"
- #DOC_PV="$(printf "%u%02u%02u00" $(ver_rs 1-3 " "))"
-
- SRC_URI="
- https://sqlite.org/2022/${PN}-src-${SRC_PV}.zip
- doc? ( https://sqlite.org/2022/${PN}-doc-${DOC_PV}.zip )
- "
- S="${WORKDIR}/${PN}-src-${SRC_PV}"
-
- KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~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"
-fi
-
-LICENSE="public-domain"
-SLOT="3"
-IUSE="debug doc icu +readline secure-delete static-libs tcl test tools"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- sys-libs/zlib:=[${MULTILIB_USEDEP}]
- icu? ( dev-libs/icu:=[${MULTILIB_USEDEP}] )
- readline? ( sys-libs/readline:=[${MULTILIB_USEDEP}] )
- tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] )
- tools? ( dev-lang/tcl:= )
-"
-DEPEND="
- ${RDEPEND}
- test? ( >=dev-lang/tcl-8.6:0[${MULTILIB_USEDEP}] )
-"
-BDEPEND=">=dev-lang/tcl-8.6:0"
-if [[ ${PV} == 9999 ]]; then
- BDEPEND+=" dev-vcs/fossil"
-else
- BDEPEND+=" app-arch/unzip"
-fi
-
-PATCHES=(
- "${FILESDIR}"/${PN}-3.39.4-icu-72-test.patch
-)
-
-_fossil_fetch() {
- local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
- local repo_id="${1}"
- local repo_uri="${2}"
-
- local -x FOSSIL_HOME="${HOME}"
-
- mkdir -p "${T}/fossil/${repo_id}" || die
- pushd "${T}/fossil/${repo_id}" > /dev/null || die
-
- if [[ -n "${EVCS_OFFLINE}" ]]; then
- if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
- die "Network activity disabled using EVCS_OFFLINE and clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
- fi
- else
- if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
- einfo fossil clone --verbose "${repo_uri}" "${repo_id}.fossil"
- fossil clone --verbose "${repo_uri}" "${repo_id}.fossil" || die
- echo
- else
- cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" . || die
- einfo fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}"
- fossil pull --repository "${repo_id}.fossil" --verbose "${repo_uri}" || die
- echo
- fi
-
- (
- addwrite "${distdir}"
- mkdir -p "${distdir}/fossil-src/${repo_id}" || die
- cp -p "${repo_id}.fossil" "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" || die
- )
- fi
-
- popd > /dev/null || die
-}
-
-_fossil_checkout() {
- local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
- local repo_id="${1}"
- local branch_or_commit="${2}"
- local target_directory="${3}"
-
- local -x FOSSIL_HOME="${HOME}"
-
- if [[ ! -f "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" ]]; then
- die "Clone of repository missing: \"${distdir}/fossil-src/${repo_id}/${repo_id}.fossil\""
- fi
-
- if [[ ! -f "${T}/fossil/${repo_id}/${repo_id}.fossil" ]]; then
- mkdir -p "${T}/fossil/${repo_id}" || die
- cp -p "${distdir}/fossil-src/${repo_id}/${repo_id}.fossil" "${T}/fossil/${repo_id}" || die
- fi
-
- mkdir "${target_directory}" || die
- pushd "${target_directory}" > /dev/null || die
-
- einfo fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}"
- fossil open --quiet "${T}/fossil/${repo_id}/${repo_id}.fossil" "${branch_or_commit}" || die
- echo
-
- popd > /dev/null || die
-}
-
-fossil_fetch() {
- local repo_id="${1}"
- local repo_uri="${2}"
- local target_directory="${3}"
-
- local branch_or_commit="${EFOSSIL_COMMIT:-${EFOSSIL_BRANCH:-trunk}}"
-
- _fossil_fetch "${repo_id}" "${repo_uri}"
- _fossil_checkout "${repo_id}" "${branch_or_commit}" "${target_directory}"
-}
-
-src_unpack() {
- if [[ ${PV} == 9999 ]]; then
- fossil_fetch sqlite https://sqlite.org/src "${WORKDIR}/${PN}"
- if use doc; then
- fossil_fetch sqlite-doc https://sqlite.org/docsrc "${WORKDIR}/${PN}-doc"
- fi
- else
- default
- fi
-}
-
-src_prepare() {
- default
-
- eautoreconf
- multilib_copy_sources
-}
-
-multilib_src_configure() {
- local -x CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}"
- local options=()
-
- options+=(
- --enable-load-extension
- --enable-threadsafe
- )
-
- # Support detection of misuse of SQLite API.
- # https://sqlite.org/compile.html#enable_api_armor
- append-cppflags -DSQLITE_ENABLE_API_ARMOR
-
- # Support bytecode and tables_used virtual tables.
- # https://sqlite.org/compile.html#enable_bytecode_vtab
- # https://sqlite.org/bytecodevtab.html
- append-cppflags -DSQLITE_ENABLE_BYTECODE_VTAB
-
- # Support column metadata functions.
- # https://sqlite.org/compile.html#enable_column_metadata
- # https://sqlite.org/c3ref/column_database_name.html
- append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA
-
- # Support sqlite_dbpage virtual table.
- # https://sqlite.org/compile.html#enable_dbpage_vtab
- # https://sqlite.org/dbpage.html
- append-cppflags -DSQLITE_ENABLE_DBPAGE_VTAB
-
- # Support dbstat virtual table.
- # https://sqlite.org/compile.html#enable_dbstat_vtab
- # https://sqlite.org/dbstat.html
- append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB
-
- # Support sqlite3_serialize() and sqlite3_deserialize() functions.
- # https://sqlite.org/compile.html#enable_deserialize
- # https://sqlite.org/c3ref/serialize.html
- # https://sqlite.org/c3ref/deserialize.html
- append-cppflags -DSQLITE_ENABLE_DESERIALIZE
-
- # Support comments in output of EXPLAIN.
- # https://sqlite.org/compile.html#enable_explain_comments
- append-cppflags -DSQLITE_ENABLE_EXPLAIN_COMMENTS
-
- # Support Full-Text Search versions 3, 4 and 5.
- # https://sqlite.org/compile.html#enable_fts3
- # https://sqlite.org/compile.html#enable_fts3_parenthesis
- # https://sqlite.org/compile.html#enable_fts4
- # https://sqlite.org/compile.html#enable_fts5
- # https://sqlite.org/fts3.html
- # https://sqlite.org/fts5.html
- append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4
- options+=( --enable-fts5 )
-
- # Support hidden columns.
- append-cppflags -DSQLITE_ENABLE_HIDDEN_COLUMNS
-
- # Support memsys5 memory allocator.
- # https://sqlite.org/compile.html#enable_memsys5
- # https://sqlite.org/malloc.html#memsys5
- append-cppflags -DSQLITE_ENABLE_MEMSYS5
-
- # Support sqlite3_normalized_sql() function.
- # https://sqlite.org/c3ref/expanded_sql.html
- append-cppflags -DSQLITE_ENABLE_NORMALIZE
-
- # Support sqlite_offset() function.
- # https://sqlite.org/compile.html#enable_offset_sql_func
- # https://sqlite.org/lang_corefunc.html#sqlite_offset
- append-cppflags -DSQLITE_ENABLE_OFFSET_SQL_FUNC
-
- # Support pre-update hook functions.
- # https://sqlite.org/compile.html#enable_preupdate_hook
- # https://sqlite.org/c3ref/preupdate_count.html
- append-cppflags -DSQLITE_ENABLE_PREUPDATE_HOOK
-
- # Support Resumable Bulk Update extension.
- # https://sqlite.org/compile.html#enable_rbu
- # https://sqlite.org/rbu.html
- append-cppflags -DSQLITE_ENABLE_RBU
-
- # Support R*Trees.
- # https://sqlite.org/compile.html#enable_rtree
- # https://sqlite.org/compile.html#enable_geopoly
- # https://sqlite.org/rtree.html
- # https://sqlite.org/geopoly.html
- append-cppflags -DSQLITE_ENABLE_RTREE -DSQLITE_ENABLE_GEOPOLY
-
- # Support Session extension.
- # https://sqlite.org/compile.html#enable_session
- # https://sqlite.org/sessionintro.html
- append-cppflags -DSQLITE_ENABLE_SESSION
-
- # Support scan status functions.
- # https://sqlite.org/compile.html#enable_stmt_scanstatus
- # https://sqlite.org/c3ref/stmt_scanstatus.html
- # https://sqlite.org/c3ref/stmt_scanstatus_reset.html
- append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS
-
- # Support sqlite_stmt virtual table.
- # https://sqlite.org/compile.html#enable_stmtvtab
- # https://sqlite.org/stmt.html
- append-cppflags -DSQLITE_ENABLE_STMTVTAB
-
- # Support unknown() function.
- # https://sqlite.org/compile.html#enable_unknown_sql_function
- append-cppflags -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION
-
- # Support unlock notification.
- # https://sqlite.org/compile.html#enable_unlock_notify
- # https://sqlite.org/c3ref/unlock_notify.html
- # https://sqlite.org/unlock_notify.html
- append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY
-
- # Support LIMIT and ORDER BY clauses on DELETE and UPDATE statements.
- # https://sqlite.org/compile.html#enable_update_delete_limit
- # https://sqlite.org/lang_delete.html#optional_limit_and_order_by_clauses
- # https://sqlite.org/lang_update.html#optional_limit_and_order_by_clauses
- append-cppflags -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
-
- # Support soundex() function.
- # https://sqlite.org/compile.html#soundex
- # https://sqlite.org/lang_corefunc.html#soundex
- append-cppflags -DSQLITE_SOUNDEX
-
- # Support URI filenames.
- # https://sqlite.org/compile.html#use_uri
- # https://sqlite.org/uri.html
- append-cppflags -DSQLITE_USE_URI
-
- options+=( $(use_enable debug) )
-
- if use icu; then
- # Support ICU extension.
- # https://sqlite.org/compile.html#enable_icu
- append-cppflags -DSQLITE_ENABLE_ICU
- sed -e "s/^TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed"
- fi
-
- options+=(
- --disable-editline
- $(use_enable readline)
- )
-
- if use readline; then
- options+=( --with-readline-inc="-I${ESYSROOT}/usr/include/readline" )
- fi
-
- if use secure-delete; then
- # Enable secure_delete pragma by default.
- # https://sqlite.org/compile.html#secure_delete
- # https://sqlite.org/pragma.html#pragma_secure_delete
- append-cppflags -DSQLITE_SECURE_DELETE
- fi
-
- options+=( $(use_enable static-libs static) )
-
- # tcl, test, tools USE flags.
- if use tcl || use test || { use tools && multilib_is_native_abi; }; then
- options+=(
- --enable-tcl
- --with-tcl="${ESYSROOT}/usr/$(get_libdir)"
- )
- else
- options+=( --disable-tcl )
- fi
-
- if [[ "${ABI}" == "x86" ]]; then
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null | grep -q "^#define __SSE__ 1$"; then
- append-cflags -mfpmath=sse
- else
- append-cflags -ffloat-store
- fi
-
- # Skip known-broken test for now
- # https://sqlite.org/forum/forumpost/d97caf168f
- # https://sqlite.org/forum/forumpost/50f136d91d
- if use test ; then
- rm test/atof1.test || die
- fi
- fi
-
- econf "${options[@]}"
-}
-
-multilib_src_compile() {
- emake HAVE_TCL="$(usev tcl 1)" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}"
-
- if use tools && multilib_is_native_abi; then
- emake changeset dbdump dbhash dbtotxt index_usage rbu scrub showdb showjournal showshm showstat4 showwal sqldiff sqlite3_analyzer sqlite3_checker sqlite3_expert sqltclsh
- fi
-
- if [[ ${PV} == 9999 ]] && use doc && multilib_is_native_abi; then
- emake tclsqlite3.c
-
- local build_directory="$(pwd)"
- build_directory="${build_directory##*/}"
-
- mkdir "${WORKDIR}/${PN}-doc-build" || die
- pushd "${WORKDIR}/${PN}-doc-build" > /dev/null || die
-
- 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
- rmdir doc/matrix{/*,} || die
-
- popd > /dev/null || die
- fi
-}
-
-multilib_src_test() {
- if [[ "${EUID}" -eq 0 ]]; then
- ewarn "Skipping tests due to root permissions"
- return
- fi
-
- local -x SQLITE_HISTORY="${T}/sqlite_history_${ABI}"
-
- # e_uri.test tries to open files in /.
- # bug #839798
- local SANDBOX_PREDICT=${SANDBOX_PREDICT}
- addpredict "/test.db:/ÿ.db"
-
- emake HAVE_TCL="$(usex tcl 1 "")" $(usex debug 'fulltest' 'test')
-}
-
-multilib_src_install() {
- emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install
-
- if use tools && multilib_is_native_abi; then
- install_tool() {
- if [[ -f ".libs/${1}" ]]; then
- newbin ".libs/${1}" "${2}"
- else
- newbin "${1}" "${2}"
- fi
- }
-
- install_tool changeset sqlite3-changeset
- install_tool dbdump sqlite3-db-dump
- install_tool dbhash sqlite3-db-hash
- install_tool dbtotxt sqlite3-db-to-txt
- install_tool index_usage sqlite3-index-usage
- install_tool rbu sqlite3-rbu
- install_tool scrub sqlite3-scrub
- install_tool showdb sqlite3-show-db
- install_tool showjournal sqlite3-show-journal
- install_tool showshm sqlite3-show-shm
- install_tool showstat4 sqlite3-show-stat4
- install_tool showwal sqlite3-show-wal
- install_tool sqldiff sqlite3-diff
- install_tool sqlite3_analyzer sqlite3-analyzer
- install_tool sqlite3_checker sqlite3-checker
- install_tool sqlite3_expert sqlite3-expert
- install_tool sqltclsh sqlite3-tclsh
-
- unset -f install_tool
- fi
-}
-
-multilib_src_install_all() {
- find "${ED}" -name "*.la" -delete || die
-
- doman sqlite3.1
-
- if use doc; then
- if [[ ${PV} == 9999 ]]; then
- pushd "${WORKDIR}/${PN}-doc-build/doc" > /dev/null || die
- else
- pushd "${WORKDIR}/${PN}-doc-${DOC_PV}" > /dev/null || die
- fi
-
- find "(" -name "*.db" -o -name "*.txt" ")" -delete || die
- if [[ ${PV} != 9999 ]]; then
- rm search search.d/admin || die
- rmdir search.d || die
- find -name "*~" -delete || die
- fi
-
- (
- docinto html
- dodoc -r *
- )
-
- popd > /dev/null || die
- fi
-}
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2024-02-06 3:26 Sam James
0 siblings, 0 replies; 35+ messages in thread
From: Sam James @ 2024-02-06 3:26 UTC (permalink / raw
To: gentoo-commits
commit: 74e656bc7670fb39c9f3cb1917b7329bea4ae46a
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 6 03:24:28 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 6 03:25:53 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74e656bc
dev-db/sqlite: fix 3.45.1 for ppc64
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-db/sqlite/files/sqlite-3.45.1-ppc64-ptr.patch | 24 ++++++++++++++++++++++
...qlite-3.45.1.ebuild => sqlite-3.45.1-r1.ebuild} | 4 ++++
2 files changed, 28 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.45.1-ppc64-ptr.patch b/dev-db/sqlite/files/sqlite-3.45.1-ppc64-ptr.patch
new file mode 100644
index 000000000000..f67917225d3f
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.45.1-ppc64-ptr.patch
@@ -0,0 +1,24 @@
+https://sqlite.org/forum/forumpost/c3f1b5213a
+--- a/config.guess 2024-01-31
++++ b/config.guess 2024-01-31
+@@ -1425,7 +1425,7 @@
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+- if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
++ if (echo '#ifdef __ppc__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+
+--- a/src/tclsqlite.c 2024-01-31
++++ b/src/tclsqlite.c 2024-01-31
+@@ -65,7 +65,7 @@
+ # define SQLITE_PTRSIZE __SIZEOF_POINTER__
+ # elif defined(i386) || defined(__i386__) || defined(_M_IX86) || \
+ defined(_M_ARM) || defined(__arm__) || defined(__x86) || \
+- (defined(__APPLE__) && defined(__POWERPC__)) || \
++ (defined(__APPLE__) && defined(__ppc__)) || \
+ (defined(__TOS_AIX__) && !defined(__64BIT__))
+ # define SQLITE_PTRSIZE 4
+ # else
diff --git a/dev-db/sqlite/sqlite-3.45.1.ebuild b/dev-db/sqlite/sqlite-3.45.1-r1.ebuild
similarity index 99%
rename from dev-db/sqlite/sqlite-3.45.1.ebuild
rename to dev-db/sqlite/sqlite-3.45.1-r1.ebuild
index e529a0d8187d..8ff12ceb6f51 100644
--- a/dev-db/sqlite/sqlite-3.45.1.ebuild
+++ b/dev-db/sqlite/sqlite-3.45.1-r1.ebuild
@@ -50,6 +50,10 @@ else
BDEPEND+=" app-arch/unzip"
fi
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch
+)
+
_fossil_fetch() {
local distdir="${PORTAGE_ACTUAL_DISTDIR:-${DISTDIR}}"
local repo_id="${1}"
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2024-03-01 19:10 Jakov Smolić
0 siblings, 0 replies; 35+ messages in thread
From: Jakov Smolić @ 2024-03-01 19:10 UTC (permalink / raw
To: gentoo-commits
commit: c0ef351efe7ed1b1196daee0d0cd1621341ae165
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 1 19:07:54 2024 +0000
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Fri Mar 1 19:09:39 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0ef351e
dev-db/sqlite: Backport LTO patch to 3.45.1
Closes: https://bugs.gentoo.org/924300
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
dev-db/sqlite/files/sqlite-3.45.1-lto.patch | 20 ++++++++++++++++++++
dev-db/sqlite/sqlite-3.45.1-r1.ebuild | 1 +
2 files changed, 21 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.45.1-lto.patch b/dev-db/sqlite/files/sqlite-3.45.1-lto.patch
new file mode 100644
index 000000000000..3f15d1a29265
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.45.1-lto.patch
@@ -0,0 +1,20 @@
+# Bug: https://bugs.gentoo.org/924300
+# Taken from https://sqlite.org/src/info/803481f25020f3c
+--- a/test/fuzzcheck.c
++++ b/test/fuzzcheck.c
+@@ -159,12 +159,12 @@
+ } g;
+
+ /*
+ ** Include the external vt02.c and randomjson.c modules.
+ */
+-extern int sqlite3_vt02_init(sqlite3*,char***,void*);
+-extern int sqlite3_randomjson_init(sqlite3*,char***,void*);
++extern int sqlite3_vt02_init(sqlite3*,char**,const sqlite3_api_routines*);
++extern int sqlite3_randomjson_init(sqlite3*,char**,const sqlite3_api_routines*);
+
+
+ /*
+ ** Print an error message and quit.
+ */
+
diff --git a/dev-db/sqlite/sqlite-3.45.1-r1.ebuild b/dev-db/sqlite/sqlite-3.45.1-r1.ebuild
index ad62f71390b1..20b0d016dc47 100644
--- a/dev-db/sqlite/sqlite-3.45.1-r1.ebuild
+++ b/dev-db/sqlite/sqlite-3.45.1-r1.ebuild
@@ -52,6 +52,7 @@ fi
PATCHES=(
"${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch
+ "${FILESDIR}"/${P}-lto.patch
)
_fossil_fetch() {
^ permalink raw reply related [flat|nested] 35+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/
@ 2024-11-16 18:20 Jakov Smolić
0 siblings, 0 replies; 35+ messages in thread
From: Jakov Smolić @ 2024-11-16 18:20 UTC (permalink / raw
To: gentoo-commits
commit: 4f5b65e1dc625a4101cb11b0c02d8ae1af3f2284
Author: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 16 18:18:44 2024 +0000
Commit: Jakov Smolić <jsmolic <AT> gentoo <DOT> org>
CommitDate: Sat Nov 16 18:19:57 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f5b65e1
dev-db/sqlite: Fix build with USE=tcl
Closes: https://bugs.gentoo.org/942918
Signed-off-by: Jakov Smolić <jsmolic <AT> gentoo.org>
.../sqlite/files/sqlite-3.47.0-buildtclext.patch | 122 +++++++++++++++++++++
dev-db/sqlite/sqlite-3.47.0-r1.ebuild | 1 +
2 files changed, 123 insertions(+)
diff --git a/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch b/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch
new file mode 100644
index 000000000000..491674f5e993
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.47.0-buildtclext.patch
@@ -0,0 +1,122 @@
+# https://sqlite.org/forum/forumpost/0683a49cb02f31a1
+# https://bugs.gentoo.org/942918
+# Compiled from https://sqlite.org/forum/forumpost/6fd4ca69e86eafc6, https://www.sqlite.org/src/info/38136b33f9536b63 and https://www.sqlite.org/src/info/2f6e5946cf34e094
+
+--- a/tool/buildtclext.tcl
++++ b/tool/buildtclext.tcl
+@@ -140,12 +140,13 @@
+ if {[string length $OPTS]>1} {
+ append LDFLAGS $OPTS
+ }
+- set CMD [subst $cmd]
+ if {$TCLMAJOR>8} {
+ set OUT libtcl9sqlite$VERSION.$SUFFIX
+ } else {
+ set OUT libsqlite$VERSION.$SUFFIX
+ }
++ set @ $OUT; # workaround for https://sqlite.org/forum/forumpost/6b1af7eb10884373
++ set CMD [subst $cmd]
+ }
+
+ # Show information about prior installs
+
+From b03592c324a4d066e12c3af945dd510dc28b6d65 Mon Sep 17 00:00:00 2001
+From: stephan <stephan@noemail.net>
+Date: Sat, 16 Nov 2024 14:33:01 +0000
+Subject: [PATCH] Add DESTDIR support to the tclextension-install target, via
+ [67a3ca0c013b] and [d1663cf05f7d].
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1600,7 +1600,7 @@ tclextension: tclsqlite3.c
+ # to find it.
+ #
+ tclextension-install: tclsqlite3.c
+- $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --cc "$(CC)" $(CFLAGS) $(OPT_FEATURE_FLAGS) $(OPTS)
++ $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --destdir "$(DESTDIR)" --cc "$(CC)" $(CFLAGS) $(OPT_FEATURE_FLAGS) $(OPTS)
+
+ # Install the SQLite TCL extension that is used by $TCLSH_CMD
+ #
++38136b33f9536b63520d3810f397a3b4b5372028b31108806f84fe44bf338425
+--- a/tool/buildtclext.tcl
++++ b/tool/buildtclext.tcl
+@@ -15,6 +15,7 @@ Options:
+ --info Show info on existing SQLite TCL extension installs
+ --install-only Install an extension previously build
+ --uninstall Uninstall the extension
++ --destdir DIR Installation root (used by "make install DESTDIR=...")
+
+ Other options are retained and passed through into the compiler.}
+
+@@ -25,6 +26,7 @@ set uninstall 0
+ set infoonly 0
+ set CC {}
+ set OPTS {}
++set DESTDIR ""; # --destdir "$(DESTDIR)"
+ for {set ii 0} {$ii<[llength $argv]} {incr ii} {
+ set a0 [lindex $argv $ii]
+ if {$a0=="--install-only"} {
+@@ -42,6 +44,9 @@ for {set ii 0} {$ii<[llength $argv]} {incr ii} {
+ } elseif {$a0=="--cc" && $ii+1<[llength $argv]} {
+ incr ii
+ set CC [lindex $argv $ii]
++ } elseif {$a0=="--destdir" && $ii+1<[llength $argv]} {
++ incr ii
++ set DESTDIR [lindex $argv $ii]
+ } elseif {[string match -* $a0]} {
+ append OPTS " $a0"
+ } else {
+@@ -245,7 +250,7 @@ package ifneeded sqlite3 $VERSION \\
+
+ if {$install} {
+ # Install the extension
+- set DEST2 $DEST/sqlite$VERSION
++ set DEST2 ${DESTDIR}$DEST/sqlite$VERSION
+ file mkdir $DEST2
+ puts "installing $DEST2/pkgIndex.tcl"
+ file copy -force pkgIndex.tcl $DEST2
+
+From 375552f224813c7e2fac0e67dd13ecd6ba3a3571 Mon Sep 17 00:00:00 2001
+From: stephan <stephan@noemail.net>
+Date: Sat, 16 Nov 2024 17:12:17 +0000
+Subject: [PATCH] Handle DESTDIR at an earlier phase in buildtclext.tcl to
+ account for the is-writable-dir check and to filter out //zipfs: dirs as
+ (im)possible installation targets.
+--- a/tool/buildtclext.tcl
++++ b/tool/buildtclext.tcl
+@@ -198,7 +198,15 @@ if {$install} {
+ #
+ set DEST {}
+ foreach dir $auto_path {
+- if {[file writable $dir]} {
++ if {[string match //*:* $dir]} {
++ # We can't install to //zipfs: paths
++ continue
++ } elseif {"" ne $DESTDIR && ![file writable $DESTDIR]} {
++ continue
++ }
++ set dir ${DESTDIR}$dir
++ if {[file writable $dir] || "" ne $DESTDIR} {
++ # the dir will be created later ^^^^^^^^
+ set DEST $dir
+ break
+ } elseif {[glob -nocomplain $dir/sqlite3*/pkgIndex.tcl]!=""} {
+@@ -216,7 +224,7 @@ if {$install} {
+ puts "to work around this problem.\n"
+ puts "These are the (unwritable) \$auto_path directories:\n"
+ foreach dir $auto_path {
+- puts " * $dir"
++ puts " * ${DESTDIR}$dir"
+ }
+ exit 1
+ }
+@@ -250,7 +258,7 @@ package ifneeded sqlite3 $VERSION \\
+
+ if {$install} {
+ # Install the extension
+- set DEST2 ${DESTDIR}$DEST/sqlite$VERSION
++ set DEST2 $DEST/sqlite$VERSION
+ file mkdir $DEST2
+ puts "installing $DEST2/pkgIndex.tcl"
+ file copy -force pkgIndex.tcl $DEST2
+
diff --git a/dev-db/sqlite/sqlite-3.47.0-r1.ebuild b/dev-db/sqlite/sqlite-3.47.0-r1.ebuild
index c7033bdf2661..b3dd1b416b61 100644
--- a/dev-db/sqlite/sqlite-3.47.0-r1.ebuild
+++ b/dev-db/sqlite/sqlite-3.47.0-r1.ebuild
@@ -54,6 +54,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-3.45.1-ppc64-ptr.patch
"${FILESDIR}"/${PN}-3.47.0-nonbash.patch
"${FILESDIR}"/${PN}-3.47.0-allocator-mismatch.patch
+ "${FILESDIR}"/${PN}-3.47.0-buildtclext.patch
)
_fossil_fetch() {
^ permalink raw reply related [flat|nested] 35+ messages in thread
end of thread, other threads:[~2024-11-16 18:20 UTC | newest]
Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-19 17:59 [gentoo-commits] repo/gentoo:master commit in: dev-db/sqlite/, dev-db/sqlite/files/ Mike Gilbert
-- strict thread matches above, loose matches on Subject: below --
2024-11-16 18:20 Jakov Smolić
2024-03-01 19:10 Jakov Smolić
2024-02-06 3:26 Sam James
2023-04-17 17:30 Jakov Smolić
2023-03-23 22:39 Sam James
2022-11-25 3:40 Sam James
2021-04-02 15:00 Mike Gilbert
2021-03-26 14:38 Mike Gilbert
2021-03-26 14:38 Mike Gilbert
2020-12-28 0:01 Mike Gilbert
2020-12-27 18:39 Mike Gilbert
2020-09-15 18:34 Mike Gilbert
2020-07-29 18:46 Mike Gilbert
2020-07-04 13:53 Mike Gilbert
2020-07-04 13:53 Mike Gilbert
2020-03-09 19:29 Mike Gilbert
2019-12-06 20:25 Mike Gilbert
2019-05-05 19:05 Mike Gilbert
2019-02-25 21:25 Mike Gilbert
2018-10-02 20:08 Mike Gilbert
2018-06-13 14:36 Mike Gilbert
2018-04-16 18:29 Mike Gilbert
2018-04-16 18:29 Mike Gilbert
2018-02-12 19:16 Mike Gilbert
2017-11-01 20:54 Mike Gilbert
2017-11-01 20:54 Mike Gilbert
2017-09-28 17:18 Mike Gilbert
2017-08-04 18:39 Mike Gilbert
2017-04-04 19:50 Mike Gilbert
2016-11-10 18:19 Mike Gilbert
2016-08-16 18:37 Mike Gilbert
2016-04-02 21:31 Mike Gilbert
2016-03-03 1:54 Mike Gilbert
2016-02-20 17:23 Pacho Ramos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox