summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin20667 -> 20670 bytes
-rw-r--r--dev-db/kdb/Manifest4
-rw-r--r--dev-db/kdb/files/kdb-3.1.0-crashfix.patch29
-rw-r--r--dev-db/kdb/files/kdb-3.1.0-fix-loading-objdata.patch27
-rw-r--r--dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch24
-rw-r--r--dev-db/kdb/kdb-3.1.0-r2.ebuild57
-rw-r--r--dev-db/mydumper/Manifest1
-rw-r--r--dev-db/mydumper/mydumper-0.9.5-r1.ebuild44
-rw-r--r--dev-db/percona-toolkit/Manifest2
-rw-r--r--dev-db/percona-toolkit/percona-toolkit-3.0.12.ebuild51
-rw-r--r--dev-db/pgadmin4/Manifest2
-rw-r--r--dev-db/pgadmin4/pgadmin4-3.3.ebuild124
-rw-r--r--dev-db/pgbouncer/Manifest6
-rw-r--r--dev-db/pgbouncer/files/pgbouncer.confd12
-rwxr-xr-xdev-db/pgbouncer/files/pgbouncer.initd-r183
-rw-r--r--dev-db/pgbouncer/pgbouncer-1.8.1.ebuild86
-rw-r--r--dev-db/pgbouncer/pgbouncer-1.9.0.ebuild4
-rw-r--r--dev-db/sqlite/Manifest9
-rw-r--r--dev-db/sqlite/files/sqlite-3.25.0-full_archive-build.patch407
-rw-r--r--dev-db/sqlite/files/sqlite-3.25.0-nonfull_archive-build.patch14
-rw-r--r--dev-db/sqlite/files/sqlite-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch49
-rw-r--r--dev-db/sqlite/files/sqlite-3.25.2-full_archive-tests.patch70
-rw-r--r--dev-db/sqlite/files/sqlite-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch19
-rw-r--r--dev-db/sqlite/sqlite-3.25.2.ebuild322
24 files changed, 1258 insertions, 188 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index 80c01cec2f69..ab877a13cb90 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/kdb/Manifest b/dev-db/kdb/Manifest
index 4cc3aeb9622d..72af1b6f2b2c 100644
--- a/dev-db/kdb/Manifest
+++ b/dev-db/kdb/Manifest
@@ -1,3 +1,7 @@
+AUX kdb-3.1.0-crashfix.patch 1137 BLAKE2B e7ea0a921390ee4e6011f7db579de8acc9a8dc79ed71fef1bc6a7959cff81250f4874a4efbafedaddff719e0a17701a45c02951847a42be02b812431424abba2 SHA512 396e6470071b75d79b0868eb58b7d7add83d514e242277b8e32636301cf2326035bf754641c5da593f02641ec8c762e96d66da97fa06c2eac4ce26c267483ed6
+AUX kdb-3.1.0-fix-loading-objdata.patch 1157 BLAKE2B 49e71094b66790a1a7a40ca7c75190ca2c2cc5d6403737c6cfaf89af55e8fb363a80f8ee6ca19b01f2b3c8706caed0dcda5a52dc64c4d9b7c9ea02400a642d86 SHA512 423f817358b1ed7f74dc9dd565b51a3089212d974f3dee7efad4ad2393640f8c23d30ba6d8c1213669beb6e5182978935fe7548a5a7a21e99c8b7b6fbfce9f6f
+AUX kdb-3.1.0-postgresql-11.patch 1087 BLAKE2B 0799a1ac60b2aae5129e6a442f41608a0f4dc76f24315a2add9bcc395a7a4bc1eef4536a345a741bf248f77e7d10a92e3f3108c2e7a180eec7ee2b4c2286d454 SHA512 9986884f2375f3a6bf18855b7a05620a4cbb0e280148ead9ffb390e71270d4b0bbafeb407495ed78216c225ee0760f233d3fb1ceeb39c35ea3f9455f14cdec76
DIST kdb-3.1.0.tar.xz 543780 BLAKE2B d874765758e245fc939bf88312b064d2dcff3460b2c9e968277e0ce7b8821314273cb3086e821645f9d7605de1a4268e25d11c40f8bf847a8dc98c410bd4d9eb SHA512 f94f1ff87cb5133570f7e9b0ab48202a516eabe1c3f2ed750cd1794800d9b9936bbd62e1479ca6877c293f6473b7f4e2d4a144b928b5bc0f228af327131b43c2
EBUILD kdb-3.1.0-r1.ebuild 1051 BLAKE2B fdb334e923fe982490712bb019e3318a1b5a91d2e2aae531db58dcc0c95c05f602f9372f4157215a51922a7859656a5aafd91d7b2f06a87de1bff32fbb616675 SHA512 b0c3b31c9c35bd8cc27d35763baac99952753685beafca43a20c21e528965471f8e01ef7b72aa021a20b2ee166a01a5887d497fac07875dd0811e450503db737
+EBUILD kdb-3.1.0-r2.ebuild 1222 BLAKE2B 66d7fae401dc74d7c4acba16615acca40aa12bfc36efa336296b6d0bc6c7034fbb8c351c19a232f07339e43a6cd813bcacbbea033d761ecf393295747d6835ac SHA512 8e84a7fd7227815fabc512019cfb0099a4b609b8a9d95de5f5d6252a5296e16bd4e8d467167a9ca0002df4d4816b26eef22b9e3d9a63deb2b5d46affc7952de0
MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
diff --git a/dev-db/kdb/files/kdb-3.1.0-crashfix.patch b/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
new file mode 100644
index 000000000000..dcc114d49915
--- /dev/null
+++ b/dev-db/kdb/files/kdb-3.1.0-crashfix.patch
@@ -0,0 +1,29 @@
+From 386375b6dd9841fdb24a56dcd637be38fcb4c175 Mon Sep 17 00:00:00 2001
+From: Jaroslaw Staniek <staniek@kde.org>
+Date: Tue, 27 Mar 2018 00:20:34 +0200
+Subject: Fix crash in KDbConnection::recordCount(KDbTableSchema)
+
+FIXED-IN:3.1.1
+---
+ src/KDbConnection.cpp | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/KDbConnection.cpp b/src/KDbConnection.cpp
+index e53bb33..d416d12 100644
+--- a/src/KDbConnection.cpp
++++ b/src/KDbConnection.cpp
+@@ -3420,10 +3420,8 @@ int KDbConnection::recordCount(const KDbTableSchema& tableSchema)
+ {
+ //! @todo does not work with non-SQL data sources
+ int count = -1; // will be changed only on success of querySingleNumber()
+- const tristate result
+- = querySingleNumber(KDbEscapedString("SELECT COUNT(*) FROM ")
+- + tableSchema.connection()->escapeIdentifier(tableSchema.name()),
+- &count);
++ const tristate result = querySingleNumber(
++ KDbEscapedString("SELECT COUNT(*) FROM ") + escapeIdentifier(tableSchema.name()), &count);
+ if (~result) {
+ count = 0;
+ }
+--
+cgit v0.11.2
diff --git a/dev-db/kdb/files/kdb-3.1.0-fix-loading-objdata.patch b/dev-db/kdb/files/kdb-3.1.0-fix-loading-objdata.patch
new file mode 100644
index 000000000000..7bf0100d418a
--- /dev/null
+++ b/dev-db/kdb/files/kdb-3.1.0-fix-loading-objdata.patch
@@ -0,0 +1,27 @@
+From a00f37b024e1a0888de3266af9acff99e6f21aa2 Mon Sep 17 00:00:00 2001
+From: Jaroslaw Staniek <staniek@kde.org>
+Date: Tue, 1 May 2018 23:29:06 +0200
+Subject: Fix loading object data for given type and ID
+
+FIXED-IN:3.1.1
+
+CCBUG:393705
+---
+ src/KDbConnection.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/KDbConnection.cpp b/src/KDbConnection.cpp
+index d416d12..690752d 100644
+--- a/src/KDbConnection.cpp
++++ b/src/KDbConnection.cpp
+@@ -2188,7 +2188,7 @@ tristate KDbConnection::loadObjectData(int type, int id, KDbObject* object)
+ }
+ } else {
+ if (true != querySingleRecord(KDbEscapedString("SELECT o_id, o_type, o_name, o_caption, o_desc "
+- "FROM kexi__objects WHERE o_type=%1 AND o_id=%1")
++ "FROM kexi__objects WHERE o_type=%1 AND o_id=%2")
+ .arg(d->driver->valueToSql(KDbField::Integer, type))
+ .arg(d->driver->valueToSql(KDbField::Integer, id)),
+ &data))
+--
+cgit v0.11.2
diff --git a/dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch b/dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch
new file mode 100644
index 000000000000..050335a38528
--- /dev/null
+++ b/dev-db/kdb/files/kdb-3.1.0-postgresql-11.patch
@@ -0,0 +1,24 @@
+From 675d51d86b377992aacdb8253cb7c3b8a80474c0 Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino@kde.org>
+Date: Tue, 22 May 2018 18:37:53 +0200
+Subject: cmake: find PostgreSQL 11
+
+---
+ cmake/modules/FindPostgreSQL.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/FindPostgreSQL.cmake b/cmake/modules/FindPostgreSQL.cmake
+index 039c380..56e6e56 100644
+--- a/cmake/modules/FindPostgreSQL.cmake
++++ b/cmake/modules/FindPostgreSQL.cmake
+@@ -86,7 +86,7 @@ set(PostgreSQL_LIBRARY_DIR_MESSAGE "Set the PostgreSQL_LIBRARY_DIR cmake cache e
+ set(PostgreSQL_ROOT_DIR_MESSAGE "Set the PostgreSQL_ROOT system variable to where PostgreSQL is found on the machine E.g C:/Program Files/PostgreSQL/8.4")
+
+ set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
+- "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
++ "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")
+
+ # Define additional search paths for root directories.
+ foreach (suffix ${PostgreSQL_KNOWN_VERSIONS} )
+--
+cgit v0.11.2
diff --git a/dev-db/kdb/kdb-3.1.0-r2.ebuild b/dev-db/kdb/kdb-3.1.0-r2.ebuild
new file mode 100644
index 000000000000..e39c39e70d8c
--- /dev/null
+++ b/dev-db/kdb/kdb-3.1.0-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_6 )
+
+inherit kde5 python-any-r1
+
+DESCRIPTION="Database connectivity and creation framework for various vendors"
+[[ ${KDE_BUILD_TYPE} != live ]] && SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz"
+
+LICENSE="LGPL-2+"
+SLOT="5/4"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug mysql postgres sqlite"
+
+RDEPEND="
+ $(add_frameworks_dep kcoreaddons)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+ $(add_qt_dep qtwidgets)
+ $(add_qt_dep qtxml)
+ dev-libs/icu:=
+ mysql? ( dev-db/mysql-connector-c:= )
+ postgres? (
+ $(add_qt_dep qtnetwork)
+ dev-db/postgresql:*
+ )
+ sqlite? ( dev-db/sqlite:3 )
+"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ dev-qt/linguist-tools:5
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-crashfix.patch"
+ "${FILESDIR}/${P}-fix-loading-objdata.patch"
+ "${FILESDIR}/${P}-postgresql-11.patch"
+)
+
+pkg_setup() {
+ python-any-r1_pkg_setup
+ kde5_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DKDB_DEBUG_GUI=$(usex debug)
+ $(cmake-utils_use_find_package mysql MySQL)
+ $(cmake-utils_use_find_package postgres PostgreSQL)
+ $(cmake-utils_use_find_package sqlite Sqlite)
+ )
+
+ kde5_src_configure
+}
diff --git a/dev-db/mydumper/Manifest b/dev-db/mydumper/Manifest
index e597f188c9c4..fd83bc33acbc 100644
--- a/dev-db/mydumper/Manifest
+++ b/dev-db/mydumper/Manifest
@@ -3,5 +3,6 @@ AUX mydumper-mariadb-define.patch 766 BLAKE2B 26d8b037de5362bb456f19ed85d5b20cb9
DIST mydumper-0.9.3.tar.gz 45320 BLAKE2B 6e6d4420ced29d4ea77aa257ee155ce0810fe7d0ac3bf22c22156dfcfba35a3c461e4115d5814b5e0050331151a5b0c3bd819c1ecc534b6644972bf76de5d004 SHA512 3bc2c85dbedf234aecca3b66f445e42bb7ddff83f914d5cc231f6a5755d1c2bf300ae9bf4bdea0717b45ea5338c6c336ec44f375dbf29570ed785ffddda53898
DIST mydumper-0.9.5.tar.gz 60010 BLAKE2B f74a949712526b3fc3b1957c9f9dc5c5f820d88f781926331e751eb99e6315b37bd8f38ac8a0e1943485cc74fe9b14a7e74e955c77ceba6b10bb1e18a7720d75 SHA512 5b72234c88fd22c103afb9fa5a7c3c99d6585cb450b8cc7385cfd23ae2ce09c0848d15767a5957a7b8f87a7614bdb058dea8990f1a2a12300c2c74fc9da2de75
EBUILD mydumper-0.9.3-r1.ebuild 1025 BLAKE2B bbaf77ab28323c82103b68aeee4222bf218554e45e05ae07467c18dc69e25f43ab2b1e70ddafa69cb8f2045d85c361511016de81c8d6aa20db7cdd25ffdbe614 SHA512 5b1a7b6669e4cfc85d0e32a9a5474de7dc00c27931c72219c1cd212139f616eaf492c76e749ea3cf94f88aa31d35455783b3ceb65943f9f82f34288dc037d64a
+EBUILD mydumper-0.9.5-r1.ebuild 1054 BLAKE2B ab2776d3e913a6ee95906839878acde43c87c9bb04f901218a1e864601d60cd73a4e2329cae9abb5033501163d7535d4d1e1ecaf9785e4d6d09b98519ef371b6 SHA512 2d1b0e7a932a09114dc5e3848510700b81e6c086551e21fc41a966b0f116b0d96584908359879786f6c16cd6313800721b498ca53bb826380d6625c38786efb2
EBUILD mydumper-0.9.5.ebuild 1026 BLAKE2B 6ded4d30e464888593beb8bf4d06441c02e17b28ff59ddb3aa9142b42dde1ccf00b05dac0977fe514d23e1be06099c217df778976a799451982bf9ac2948985c SHA512 37776222d7cc3cbcc5b520f1731d445841028aec63899a6bbfb2c1a931b78aef3987555404955f1c2742782cd599065eefbe04b6739460fc5642d4e0e606ba84
MISC metadata.xml 448 BLAKE2B 141a4303111433ea46ec427dcf7942fae3165ea27b90c1d92f1fd4e4a82bbdea0476a7f5380250684ca763feb7ba7045bae9443329c260b0732452b3e639c5ea SHA512 192415f225533e6195856255483cb80c5da21f496bfe048518dbfccf8cdc049339ab5322d125e627a3a84fcdfb052012fd57cbe2083118917b35796f7a9e9353
diff --git a/dev-db/mydumper/mydumper-0.9.5-r1.ebuild b/dev-db/mydumper/mydumper-0.9.5-r1.ebuild
new file mode 100644
index 000000000000..a924406ea685
--- /dev/null
+++ b/dev-db/mydumper/mydumper-0.9.5-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="A high-performance multi-threaded backup (and restore) toolset for MySQL"
+HOMEPAGE="https://github.com/maxbube/mydumper"
+SRC_URI="https://github.com/maxbube/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+COMMON_DEPEND="dev-db/mysql-connector-c:=
+ dev-libs/glib:=
+ dev-libs/libpcre:=
+ dev-libs/openssl:=
+ sys-libs/zlib:="
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ doc? ( dev-python/sphinx )"
+RDEPEND="${COMMON_DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-atomic.patch" #654314
+)
+
+src_prepare() {
+ # respect user cflags; do not expand ${CMAKE_C_FLAGS} (!)
+ sed -i -e 's:-Werror -O3 -g:${CMAKE_C_FLAGS}:' CMakeLists.txt || die
+
+ # fix doc install path
+ sed -i -e "s:share/doc/mydumper:share/doc/${PF}:" docs/CMakeLists.txt || die
+
+ cmake-utils_src_prepare
+}
+
+src_configure() {
+ local mycmakeargs=("-DBUILD_DOCS=$(usex doc)")
+
+ cmake-utils_src_configure
+}
diff --git a/dev-db/percona-toolkit/Manifest b/dev-db/percona-toolkit/Manifest
index ddff65af59bf..9685b97ea5f4 100644
--- a/dev-db/percona-toolkit/Manifest
+++ b/dev-db/percona-toolkit/Manifest
@@ -11,6 +11,7 @@ DIST percona-toolkit-2.2.19.tar.gz 1425623 BLAKE2B fe9b363ec924b1af9110ea7e7dab7
DIST percona-toolkit-2.2.20.tar.gz 1431840 BLAKE2B 76565662b4037010f7e8de98316f568c2994f55d042ae3a21b80dc3b839444a11014b61db675cc21c149f26c3b7df52013d7b06c9c1127ec325dae2942a4e4c0 SHA512 f7a5f47e9ca05c43dcb80866a1eacd13066e1f036f4f58d51145fc6354ddc86dd6515a9aa33c8f736029800bf4c80f7ba5fcb9f1e6ac41653b3351597885f679
DIST percona-toolkit-3.0.10.tar.gz 17335242 BLAKE2B c24103576c537eb9afbdcedc6acf51671853c8e0764092f76d3ee4a1de338a521d91b956b13665ca92a06a70726b92cb9d530ab04b50ed30990868305bd0a7a0 SHA512 e9477f908bbcc5c975f11d42fe9b2b61adebe823657e23a2c74c639767c73f3f71ebdf2bec1d839ad14f2d5080c5f1f9620db07c6bf9694bd7623e86f390e902
DIST percona-toolkit-3.0.11.tar.gz 18254993 BLAKE2B a6c582bdda96bf5c74e7b5340c465d71f4f119d8364c1d36fc02c650d741972e706bb5eee86fd5bc22ed4f7298a45f0d5c5d9e4438230a8b7b09a58498dda7e8 SHA512 f722ccc8b0fde8f61d4cf269ec89df410f656153da06cf396d222cbb817e88b50e23c0ace383429acf39ddec0501e75d6d3e358fb5ed53ee50a0162eaed9a717
+DIST percona-toolkit-3.0.12.tar.gz 16205557 BLAKE2B e159867d7c6a8b1fd8fa0f31d3a7bdff45f45353995d57d71cd2fb763044524fb62c6c0dcff893ff9d92b5a18dd695445ac46b01ff99be7cbac9d625e5521c44 SHA512 4c01a04f6a4efb444e248d55ab846f32d4784e021b51b272875de3f1f0907298c66073f6d2a941ad407aefa9840407e55095c5ec848998f731539b12ec1875f8
DIST percona-toolkit-3.0.7.tar.gz 79294306 BLAKE2B e3a556c823d355e5af504210dfb360e6fcf217ca6bfb7ba729e83e66cfdd09231c09d05fb51df1eac6bee0c6615620ac96ffce47c4f0473394d9c008ce8bdabe SHA512 e5a23ce6f4fd74f0956187679810de23a9d60f8073609289d641411c9f397f49b02c05cbcd0a68d78992849f17b70fb3ae411ac967e25c7be45f95ec374414fe
DIST percona-toolkit-3.0.8.tar.gz 79316265 BLAKE2B 5d6efdbaa4fd3ac914c059c9240f6dcd0de89c6b2ea444c407b115b380bb676c51266f907f6e37a62a40032fd5aa6e1816752c8ec08150dddf71c7568f42c739 SHA512 d5380395b052aebe651806649ff22f259d1af9401112b7ffe86b10664b87f917fecfe91bdc72b401d00471fc9c141391006cd322c9464fca1343f704ecaa8623
DIST percona-toolkit-3.0.9.tar.gz 15197340 BLAKE2B 095d8c0b26853caa6d2515de1d8fb8ff13b3084caa46498c8c789cd4e7b18473d41992701e393ad91cd7fdda8b3e56a099600285aeb4ba788110d36a028f76b6 SHA512 56a8732cfdbd58d0602e482d7bf049d2049104b7ae203d756db81a052cd837f16d2a35f75def4f23748534d0d2eb6441cb9fe49175a931fbcdbb6adeb42f1c53
@@ -21,6 +22,7 @@ EBUILD percona-toolkit-2.2.20.ebuild 1213 BLAKE2B 2bcc433599d64b15225e508fa16c50
EBUILD percona-toolkit-3.0.10-r1.ebuild 1330 BLAKE2B acf05bb59b278883dece85f7a60a6ae114a5a5253a867b0f2c5259196eddb4a95acdf66809c1ecb5ad47140f220b9cff47efeedc0ddc1f370db1ee6181c4f12c SHA512 cb5d77f6f689989ae2aa5e4eb4ca7273981b9f18e6308d67dd5ca25ddb163db24655b3d54e84f70f911ffd098bacf5d114dd8afd1a4b2c06198ad55f9fcbcff4
EBUILD percona-toolkit-3.0.10.ebuild 1249 BLAKE2B bd743a722e60cade6307bd04c774a77d0e01b2272e82974be486b47d0462120910c1182ba6fc3f7cf268f4ebfa04d432e456f62079010621aeaf6b325c743b54 SHA512 988d423c3125592608caa659543b508dcea2048b0c905a24c924e75894ca7c93924908e49f5c6c2c5d660a7b90a242e558e874849f0793d58a82abec1ad38982
EBUILD percona-toolkit-3.0.11.ebuild 1330 BLAKE2B acf05bb59b278883dece85f7a60a6ae114a5a5253a867b0f2c5259196eddb4a95acdf66809c1ecb5ad47140f220b9cff47efeedc0ddc1f370db1ee6181c4f12c SHA512 cb5d77f6f689989ae2aa5e4eb4ca7273981b9f18e6308d67dd5ca25ddb163db24655b3d54e84f70f911ffd098bacf5d114dd8afd1a4b2c06198ad55f9fcbcff4
+EBUILD percona-toolkit-3.0.12.ebuild 1327 BLAKE2B becf83720c5604ec44f6ea1a9a36832778e34b06f9b33d72a7b83ac9bb4fd74803a03945fb918565bfd50cb2753b3915621d445dd33f44e64e25d06507f13a7b SHA512 3a598735a027e87c54c8417a43ef56edca0d89288a9e50e5ef826f84619908dfa76a0a51db5c7fa10c47113952be17b407bfeeb22294618d684430804322d0b8
EBUILD percona-toolkit-3.0.7.ebuild 1167 BLAKE2B f61aaf597895efa1b68a04f889e93fef6207d4e2cc9f14e986aee81cccb6ca7888d7479bc01bf11bea554bb9f860615ebfb95111420c641ad7e8b16808121a24 SHA512 940474cb8cf56cff984dffc33c3848808d184c33f6d31a4bcafdc2ee16feecbe6f4084c80e243d18eb62c9f09759f274144aff2c3f45d465bc01c8f82d1e5ac1
EBUILD percona-toolkit-3.0.8.ebuild 1249 BLAKE2B bd743a722e60cade6307bd04c774a77d0e01b2272e82974be486b47d0462120910c1182ba6fc3f7cf268f4ebfa04d432e456f62079010621aeaf6b325c743b54 SHA512 988d423c3125592608caa659543b508dcea2048b0c905a24c924e75894ca7c93924908e49f5c6c2c5d660a7b90a242e558e874849f0793d58a82abec1ad38982
EBUILD percona-toolkit-3.0.9.ebuild 1249 BLAKE2B bd743a722e60cade6307bd04c774a77d0e01b2272e82974be486b47d0462120910c1182ba6fc3f7cf268f4ebfa04d432e456f62079010621aeaf6b325c743b54 SHA512 988d423c3125592608caa659543b508dcea2048b0c905a24c924e75894ca7c93924908e49f5c6c2c5d660a7b90a242e558e874849f0793d58a82abec1ad38982
diff --git a/dev-db/percona-toolkit/percona-toolkit-3.0.12.ebuild b/dev-db/percona-toolkit/percona-toolkit-3.0.12.ebuild
new file mode 100644
index 000000000000..21aa1f40c53b
--- /dev/null
+++ b/dev-db/percona-toolkit/percona-toolkit-3.0.12.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit perl-module
+
+DESCRIPTION="Advanced command-line tools to perform a variety of MySQL and system tasks"
+HOMEPAGE="https://www.percona.com/software/mysql-tools/percona-toolkit"
+SRC_URI="https://www.percona.com/downloads/${PN}/${PV}/source/tarball/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 Artistic )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+# Package warrants IUSE doc
+IUSE=""
+
+COMMON_DEPEND="dev-perl/DBI
+ dev-perl/DBD-mysql
+ virtual/perl-Time-HiRes"
+RDEPEND="${COMMON_DEPEND}
+ dev-perl/JSON
+ dev-perl/libwww-perl
+ dev-perl/Role-Tiny
+ virtual/perl-File-Path
+ virtual/perl-Getopt-Long
+ virtual/perl-Time-Local
+ virtual/perl-Digest-MD5
+ virtual/perl-IO-Compress
+ virtual/perl-File-Temp
+ virtual/perl-File-Spec
+ virtual/perl-Scalar-List-Utils
+ dev-perl/TermReadKey"
+DEPEND="${COMMON_DEPEND}
+ virtual/perl-ExtUtils-MakeMaker"
+
+# Bug #501904 - CVE-2014-2029
+# sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/*
+# ^ is *-no-versioncheck.patch
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.0.7-no-versioncheck.patch
+ "${FILESDIR}"/${PN}-3.0.10-slave-delay-fix.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e "s/=> 'percona-toolkit',/=> 'Percona::Toolkit',/g" \
+ Makefile.PL || die
+}
diff --git a/dev-db/pgadmin4/Manifest b/dev-db/pgadmin4/Manifest
index 140b6e1dbed3..8ab21c88884e 100644
--- a/dev-db/pgadmin4/Manifest
+++ b/dev-db/pgadmin4/Manifest
@@ -1,3 +1,5 @@
DIST pgadmin4-3.0.tar.gz 28915010 BLAKE2B 7e6dccd91f082f7b5514f5d3abdf4653a9961b4efc706e10ce58d817785d514508233e25068762fe0e4bca4c1a3cf10a2515afa38e6f9ba3c99b4af3fa32f3d2 SHA512 5921340176e6748ef13112d906061f195d4bb2f73917d762371bbaeb44ef66cf8e0edcd1cd241eb78dae46ed0b3af014c749468a930fb0c0983b38b2c54dfc3a
+DIST pgadmin4-3.3.tar.gz 30471775 BLAKE2B 06fe13d4e87709aa7ea5a7eef0aa5c7f3aae6891da0c4414fdf5e8936bb6bb7ac9092fd1e4f32f2f253fad7ace5fb8bdf07fed7ccb6dac68175fee5db2d27f4f SHA512 25027298a51d2ce01902fcd2314e35a44dfb5e3d7f6f5f1620841488bd5b8215436ffcad102fe9846ed4a9dee550232cb0b03c2ee0d5f46f53c753c8107e7ec3
EBUILD pgadmin4-3.0.ebuild 3481 BLAKE2B 697a5b6250d747aff9b4216603077a977a84c44bd344f935315eb0ca9a41b85527b32df819738d42626759fb8244392c15edd4909c9b8f03cdb82debf24f5172 SHA512 5f14d65bc3dac207fd3ced4105be3115cd0821a6a5054ce9d150d31d19ca5de44c66b3971444e200d79bfc6b11949cd437a0cbec388f26beef94ccdacb1c3b19
+EBUILD pgadmin4-3.3.ebuild 3530 BLAKE2B ab03ed3c766c2d49feeb057b20054c36b068898e2269f2bf0fb9a967e376d2aff1219932df9ccb1fda4d55aad05161b1caa6435abbb05ea8ae735805cb54bf3d SHA512 105d6449bb961770948128131b4338190fbf27e46467d5b75a99b3b8f32a102137608f3659fb1bfb6cf274e640e88424409d1c0e00df4a84e25553690e29f463
MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325
diff --git a/dev-db/pgadmin4/pgadmin4-3.3.ebuild b/dev-db/pgadmin4/pgadmin4-3.3.ebuild
new file mode 100644
index 000000000000..2577aff506aa
--- /dev/null
+++ b/dev-db/pgadmin4/pgadmin4-3.3.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python3_{4,5,6} )
+PYTHON_REQ_USE="sqlite"
+
+inherit python-single-r1 qmake-utils
+
+DESCRIPTION="GUI administration and development platform for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="mirror://postgresql/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE="doc"
+
+RESTRICT="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-qt/qtwidgets:5
+ dev-qt/qtwebkit:5
+ dev-qt/qtwebengine:5[widgets]
+"
+
+DEPEND="${COMMON_DEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+RDEPEND="${COMMON_DEPEND}
+ >=app-text/htmlmin-0.1.12[${PYTHON_USEDEP}]
+ >=dev-python/Babel-2.3.4[${PYTHON_USEDEP}]
+ >=dev-python/beautifulsoup-4.4.1[${PYTHON_USEDEP}]
+ >=dev-python/blinker-1.4[${PYTHON_USEDEP}]
+ >=dev-python/click-6.6[${PYTHON_USEDEP}]
+ >=dev-python/extras-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-1.0.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-babel-0.11.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-babelex-0.9.3[${PYTHON_USEDEP}]
+ >=dev-python/flask-gravatar-0.5.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-htmlmin-1.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-login-0.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-mail-0.9.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-migrate-2.1.1[${PYTHON_USEDEP}]
+ >=dev-python/flask-paranoid-0.2.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-principal-0.4.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-security-3.0.0[${PYTHON_USEDEP}]
+ >=dev-python/flask-sqlalchemy-2.3.2[${PYTHON_USEDEP}]
+ >=dev-python/flask-wtf-0.14.2[${PYTHON_USEDEP}]
+ >=dev-python/html5lib-1.0.1[${PYTHON_USEDEP}]
+ >=dev-python/itsdangerous-0.24[${PYTHON_USEDEP}]
+ >=dev-python/jinja-2.7.3[${PYTHON_USEDEP}]
+ >=dev-python/linecache2-1.0.0[${PYTHON_USEDEP}]
+ >=dev-python/markupsafe-0.23[${PYTHON_USEDEP}]
+ >=dev-python/mimeparse-1.6.0[${PYTHON_USEDEP}]
+ >=dev-python/passlib-1.7.1[${PYTHON_USEDEP}]
+ >=dev-python/pbr-3.1.1[${PYTHON_USEDEP}]
+ >=dev-python/psycopg-2.7.4[${PYTHON_USEDEP}]
+ >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
+ >=dev-python/pyrsistent-0.14.2[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.7.1[${PYTHON_USEDEP}]
+ >=dev-python/python-sqlparse-0.2.4[${PYTHON_USEDEP}]
+ >=dev-python/pytz-2018.3[${PYTHON_USEDEP}]
+ >=dev-python/simplejson-3.13.2[${PYTHON_USEDEP}]
+ >=dev-python/six-1.11.0[${PYTHON_USEDEP}]
+ >=dev-python/speaklater-1.3[${PYTHON_USEDEP}]
+ >=dev-python/sqlalchemy-1.2.5[${PYTHON_USEDEP}]
+ >=dev-python/sshtunnel-0.1.3[${PYTHON_USEDEP}]
+ >=dev-python/werkzeug-0.9.6[${PYTHON_USEDEP}]
+ >=dev-python/wtforms-2.1[${PYTHON_USEDEP}]
+"
+
+S="${WORKDIR}"/${P}/runtime
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ default
+}
+
+src_configure() {
+ eqmake5
+}
+
+src_compile() {
+ default
+ if use doc; then
+ cd "${WORKDIR}"/${P} || die
+ emake docs
+ fi
+}
+
+src_install() {
+ dobin pgAdmin4
+
+ cd "${WORKDIR}"/${P} || die
+
+ local APP_DIR=/usr/share/${PN}/web
+ insinto "${APP_DIR}"
+ doins -r web/*
+ cat > "${D}${APP_DIR}"/config_local.py <<-EOF
+ SERVER_MODE = False
+ UPGRADE_CHECK_ENABLED = False
+ EOF
+ python_optimize "${D}${APP_DIR}"
+
+ local CONFIG_DIR="/etc/xdg/pgadmin"
+ dodir "${CONFIG_DIR}"
+ cat > "${D}${CONFIG_DIR}"/pgadmin4.conf <<-EOF
+ [General]
+ ApplicationPath=${APP_DIR}
+ PythonPath=$(python_get_sitedir)
+ EOF
+
+ if use doc; then
+ rm -r docs/en_US/_build/html/_sources || die
+ insinto /usr/share/${PN}/docs/en_US/_build
+ doins -r docs/en_US/_build/html
+ fi
+}
diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest
index dab44ce95cef..8b4298d70a5f 100644
--- a/dev-db/pgbouncer/Manifest
+++ b/dev-db/pgbouncer/Manifest
@@ -1,11 +1,7 @@
AUX logrotate 119 BLAKE2B 7ed90c0272410e5a37411f78aaa446d1688ceb5a5a0cfa652f8ea3d043f693af2b963aaf18bb230ec4cd5ae34f09219f02b9ee0ca5b43fe61489f46aa7a8d505 SHA512 5aa4226ab2d168a88a3b64deb114d3901431d2afb2571cf8ae411c989549bc465ee05104a6863cc8fce6d769d809b4ab536973280f50cb4415c6698c34e1a5b8
AUX pgbouncer-1.8-dirs.patch 984 BLAKE2B 0e9a3550efad0669e4598513197c50460326f701dae628ae8c9fb201e08ae3f0c5826515c6a884a00f2b0afd048490b16d87f9b3b9cf836ca4c77284cd705334 SHA512 2c9ddd2ae193b032435f97d41e789283ae69d99fefeb3829e80a90be296ccd2a754a9d00e6930985408758dfa3349d65f3c2ddf1f74053424bc8d8d09b2fa0e2
-AUX pgbouncer.confd 425 BLAKE2B f9b7065c043474f2208b44eecefb9cd1d6544295a47c3aee51f340f522eb4ba87bb270c99e18183541aca144eb16487a622ff5f2b5d5b87b2d1c7dd950262afd SHA512 9f997cbfb18f5bb1623aea2a9af706359a973fd2167be91ee6ffb37a22a6dc453280c66b6d2c11ab0174dbf159a195f0a1612be198466633d728a5317a878035
AUX pgbouncer.confd-r1 457 BLAKE2B 0b2e33b57ee33eac42742a8f9fe7c0f090bad53c5d7c29d86fd3047307bd05d62f922fc66a0805ba3396934f6e2e7060f810f1c71c5b07d887edf2763cc0f40d SHA512 0642b12236e944b6b5086b593dfd4a5d7c04c8347fc286835381945a50a421e87805900d63d84d12dcb1fad667fc81f21c8644c63af33388a71048ec6e024ab5
-AUX pgbouncer.initd-r1 2216 BLAKE2B cfc489a5db03b6e4c56c79036d070152a6f78ce6c300fdc52049aaf91c41db1e2a41af409e701ab8dc2a24a5ca4e8b89b38cc61c52885a1330a04ef727d7585e SHA512 c2af62daf4e7c8e5a25acd17237de2134f1e496a51bd054abecc020a65b39c309c85572c17105431fd598a80ada187fb32fa8f2b1db229d2207c59607748220a
AUX pgbouncer.initd-r2 2204 BLAKE2B 9c417188d4a762906c7631f1ae8fc7c7b8f6c52805acf6bfc12d580c53b2faa4e36b7c0662852feaf78aebcc29498bb8ae441d749a710793508c6950a448862f SHA512 dd9e8f7487affcc46b359e6d07a4c2fd698626d7360d2b2929389bbd7a340059eb27f0e0e9a648b7005c446d65762edbb02b865fa68194ebb822c01fba19fd7e
-DIST pgbouncer-1.8.1.tar.gz 465930 BLAKE2B 692c551cb7bfb56bfe1b354791b06bdf61866197150a78a7fa9688891a2e4cd3c015abc5fbe33bf66dc85ab0ae83745f2db852eae91ae99596c97be0154e8bd5 SHA512 595a94db98866cec211f2b8c1ad13d209dba00e5fd41f2e9025aabdcb660194f0f772810270a1d9f067c3039c9fee630e8ff2d56f231935add17207aecc10bee
DIST pgbouncer-1.9.0.tar.gz 469300 BLAKE2B 466f171a49ec9ce9be9a9d3208780cfbff956da7c74ec4332c7104ea537cb47a5cfdc0d80bbd96d233769b6f430f1ad99b623caefa2dc93af7ba336dd0f49514 SHA512 b127f4cb60ca5cdf339da76727918f0a3797a3e0a89f8ed6fdcaa80f3391d2c5bb51e19731915775210c0e5070dd611ee2e410c9a947624e45b5cf11aecdacf9
-EBUILD pgbouncer-1.8.1.ebuild 1892 BLAKE2B 7fab90d3eb06d905c21a42773532c21fb978d7040915d14262f5203eb54db0fb7a6747b88fcf0183b6980f29a81774d79b809c50193bfdc07def521b9df42f2c SHA512 723a646c3694518d5a0e40b8dc6dd6ea2d393b6dbebccfafb324a1d6f160415166c3ac1fbda068aadee277c2ac549fca92109d432a6ec49f20f687ffd06fe931
-EBUILD pgbouncer-1.9.0.ebuild 1897 BLAKE2B 77c6be134fe3990c28f94f5ed7ed76debb4b01080ab594d0355cdae244578a2a3edd986a79d13a6e842b4a1274ea53ba335c0febda14c89ae24b4c3a04ba11c5 SHA512 ff4226509d48fe8cbad3db18f161517db38a8e70c48e5609ae478bfdae20d6989364f2cccadf00fd1b5d736f57305bc9789bec3599d0da2fb3e95bac7a58e7ff
+EBUILD pgbouncer-1.9.0.ebuild 1892 BLAKE2B d44fc3cfb7219eceffd1052c04d857f9ad3a2d3fb588b6811c174eb3d8295e4c8dc2912c63b8b71c50eeff61d6cf4d0c96bc398587e35f18f26bb37fad439722 SHA512 070a4cf26ce72183d63cd7bd7d54ff9940c9ecfc4f289d3aa04b356a27d3c1bd70a82a5756e796f0acb25d40c17656c930f68c87d3b207c42f49f2fad103c253
MISC metadata.xml 472 BLAKE2B b06a5dca1ee52c85fa1f948c4c8cf6e83c0aba3e0b0bd77672f1585c01d0a2f8ef4d7502e30e9cb658ec3dd3e53560671b69210166c36b4ce888e329f531585b SHA512 b098e87be6194706f462bb93c4bf5425023f7bd90a0ed421a51ea42db98c85ebd77f23eb413f4e271e126ad4404cd0bdf0694f675662c421f7afd8ec0f036b4d
diff --git a/dev-db/pgbouncer/files/pgbouncer.confd b/dev-db/pgbouncer/files/pgbouncer.confd
deleted file mode 100644
index e2c584011884..000000000000
--- a/dev-db/pgbouncer/files/pgbouncer.confd
+++ /dev/null
@@ -1,12 +0,0 @@
-# Location of configuration file for PgBouncer.
-INIFILE="/etc/pgbouncer.ini"
-
-# How long to wait in seconds for a safe shutdown. Equivalent to
-# issuing 'PAUSE;' and 'SHUTDOWN;' on psql console. (See 'man 1 pgbouncer'.)
-NICE_TIMEOUT=60
-
-# Set to 'YES' to perform an immediate shutdown if the nice shutdown
-# doesn't work. Same as issuing 'SHUTDOWN;' on console. (See 'man 1
-# pgbouncer'.)
-FORCE_QUIT="no"
-FORCE_QUIT_TIMEOUT=2 \ No newline at end of file
diff --git a/dev-db/pgbouncer/files/pgbouncer.initd-r1 b/dev-db/pgbouncer/files/pgbouncer.initd-r1
deleted file mode 100755
index 7392918593bb..000000000000
--- a/dev-db/pgbouncer/files/pgbouncer.initd-r1
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/sbin/openrc-run
-
-extra_started_commands="reload"
-
-PIDFILE="/run/pgbouncer.pid"
-
-depend() {
- use net
- after postgresql
-}
-
-get_config() {
- [ -f "${INIFILE}" ] || eend 1 "'${INIFILE}' not found"
-
- eval echo $(sed -e 's:;.*::' "${INIFILE}" | \
- awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')
-}
-
-start_pre() {
- local s="$(get_config unix_socket_dir)"
-
- if [ -n "${s}" ] ; then
- checkpath -o root:postgres -m 1775 -d "${s}" || return 1
-
- local listen_port="$(get_config listen_port)"
-
- if [ -e "${s%/}/.s.PGSQL.${listen_port}" ] ; then
- eerror "Socket conflict."
- eerror "A server is already listening on:"
- eerror " ${s%/}/.s.PGSQL.${listen_port}"
- eerror "HINT: Change listen_port in pgbouncer.ini to listen on a"
- eerror "different socket."
- return 1
- fi
- fi
-
- checkpath -o pgbouncer:postgres -m 0755 \
- -d "$(dirname $(get_config logfile))" || return 1
- checkpath -o pgbouncer:postgres -m 0640 \
- -f "$(get_config logfile)" || return 1
-
- return 0
-}
-
-start() {
- ebegin "Starting PgBouncer"
- [ -f ${PIDFILE} ] && rm ${PIDFILE}
-
- start-stop-daemon --start \
- --pidfile ${PIDFILE} \
- --background \
- --make-pidfile \
- --user pgbouncer \
- --exec /usr/bin/pgbouncer \
- -- -q "${INIFILE}"
- eend $?
-}
-
-stop() {
- local seconds=$(( ${NICE_TIMEOUT} + ${FORCE_QUIT_TIMEOUT} ))
- ebegin "Stopping PgBouncer (this can take up to ${seconds} seconds)"
-
- local retries=SIGINT/${NICE_TIMEOUT}
-
- if [ "${FORCE_QUIT}" = "YES" ] ; then
- einfo "FORCE_QUIT enabled."
- retries="${retries}/SIGTERM/${FORCE_QUIT_TIMEOUT}"
- fi
-
- # Loops through nice and force quit in one go.
- start-stop-daemon --stop \
- --user pgbouncer \
- --pidfile ${PIDFILE} \
- --retry ${retries}
-
- eend $?
-}
-
-reload() {
- ebegin "Reloading PgBouncer configuration from '${INIFILE}'"
- start-stop-daemon --signal HUP --pidfile ${PIDFILE}
- eend $?
-}
diff --git a/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild b/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild
deleted file mode 100644
index f590a731732e..000000000000
--- a/dev-db/pgbouncer/pgbouncer-1.8.1.ebuild
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="6"
-
-inherit user
-
-DESCRIPTION="Lightweight connection pooler for PostgreSQL"
-HOMEPAGE="https://pgbouncer.github.io"
-SRC_URI="https://pgbouncer.github.io/downloads/files/${PV}/${P}.tar.gz"
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="amd64 x86"
-IUSE="+c-ares debug doc pam ssl -udns"
-
-# At-most-one-of, one can be enabled but not both
-REQUIRED_USE="?? ( c-ares udns )"
-
-RDEPEND="
- >=dev-libs/libevent-2.0
- >=sys-libs/glibc-2.10
- c-ares? ( >=net-dns/c-ares-1.10 )
- ssl? ( >=dev-libs/openssl-1.0.1:=[-bindist] )
- udns? ( >=net-libs/udns-0.1 )
-"
-
-DEPEND="${RDEPEND}"
-
-pkg_setup() {
- enewgroup postgres 70
- enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
-
- enewuser pgbouncer -1 -1 -1 postgres
-}
-
-src_prepare() {
- eapply "${FILESDIR}/pgbouncer-1.8-dirs.patch"
-
- default
-}
-
-src_configure() {
- # --enable-debug is only used to disable stripping
- econf \
- --docdir=/usr/share/doc/${PF} \
- --enable-debug \
- $(use_with c-ares cares) \
- $(use_enable debug cassert) \
- $(use_with pam) \
- $(use_with ssl openssl) \
- $(use_with udns)
-}
-
-src_test() {
- cd "${S}/test"
- emake
-}
-
-src_install() {
- emake DESTDIR="${D}" install
-
- dodoc AUTHORS
- use doc && dodoc doc/*.rst
-
- newconfd "${FILESDIR}/${PN}.confd" "${PN}"
- newinitd "${FILESDIR}/${PN}.initd-r1" "${PN}"
-
- insinto /etc
- doins etc/pgbouncer.ini
-
- insinto /etc/logrotate.d
- newins "${FILESDIR}/logrotate" pgbouncer
-}
-
-pkg_postinst() {
- if [[ -z ${REPLACING_VERSIONS} ]] ; then
- einfo "Please read the config.txt for Configuration Directives"
- einfo
- einfo "For Administration Commands, see:"
- einfo " man pgbouncer"
- einfo
- einfo "By default, PgBouncer does not have access to any database."
- einfo "GRANT the permissions needed for your application and make sure that it"
- einfo "exists in PgBouncer's auth_file."
- fi
-}
diff --git a/dev-db/pgbouncer/pgbouncer-1.9.0.ebuild b/dev-db/pgbouncer/pgbouncer-1.9.0.ebuild
index 46b5a23edb21..258f5cb8675a 100644
--- a/dev-db/pgbouncer/pgbouncer-1.9.0.ebuild
+++ b/dev-db/pgbouncer/pgbouncer-1.9.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="6"
@@ -10,7 +10,7 @@ HOMEPAGE="https://pgbouncer.github.io"
SRC_URI="https://pgbouncer.github.io/downloads/files/${PV}/${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
-KEYWORDS="~amd64 ~x86"
+KEYWORDS="amd64 x86"
IUSE="+c-ares debug doc pam ssl -udns"
# At-most-one-of, one can be enabled but not both
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index 0b304affcd8d..6a67831df231 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -6,12 +6,21 @@ AUX sqlite-3.23.1-nonfull_archive-prohibit_bound_parameters_in_arguments_to_tabl
AUX sqlite-3.24.0-full_archive-archive_command_paths_handling.patch 431 BLAKE2B f2ed5b15db753821cef0a51c1301bb79c3fabc908c328ac33b21cef594f068b2f19863cbae4a909e19b7370c5a2c20839edffb407ba1f1946b407672f7bb4fd7 SHA512 d8449092d5892398fd827973d18f7eff189562b70fb5ea93e41a0789a573945c7555b602ec0b73df66af597c6ada79c73edeecb3d496ccbd8b29f05a05871089
AUX sqlite-3.24.0-full_archive-build.patch 13851 BLAKE2B cc40445f0ef248d21fb40500186614a7092abaa174db63710471c8aae2bf435f8ffd62a7b8332785a8ebe29bad39469ab3ea03d9c8287576c83a927df02b9102 SHA512 e6c6d5545ea7578952bbadef324ca8ee988542917ee314e6da69db69fb5727493bd36f55aa9dd0cece21ec8d9235361b12a87ce768849596cee9a5bf98cb0a5d
AUX sqlite-3.24.0-nonfull_archive-archive_command_paths_handling.patch 419 BLAKE2B 378e99da6cca145c69bb8fd883f69ae7e82964ed67ac4ad16f89e3a80fe863cfe67b3c68e79c6fa48170b222589f7b0bdd0f623ca8c12732d5c4f93b6b235164 SHA512 29aa164628870e4e002f5a5819f808dcd66da2f84e4202303ebd1eebc3ace5cdad19af60879de54ea5ca05b23e68337a3f4ee3401866197ad3046dd17941f263
+AUX sqlite-3.25.0-full_archive-build.patch 13864 BLAKE2B e60fba6a84659b658dfb3cbb9f3e2fdab28cf928329f20cdfb1a2aab5ba8162f25f0b0fb3610259c5a8263a0901c9e30dbdd6d7bb4654146deeb0c9fdd44496b SHA512 37416842348a7cae5a61365977eb77e1db86b68be3ead7b69090df56a5a87b856569c224a1bc85cc0ff599c62077c3f8eabdf4071fa0c919bf139e8f579c2dbb
+AUX sqlite-3.25.0-nonfull_archive-build.patch 416 BLAKE2B 37faa30235c1b668d3cf510c353730a932a807f650c638ac0d07d3a1c0534dedef233c06cef52b6569eb1d58b5bcd910dd59c8d2e792726945f49f882d4181be SHA512 44db89a32b51713cf59fb3f071cca08648deebf6e2830dd61b033a5160ce6ddcbf54a191be42b3b252ea4bc16614fbcfa569207f34f268f1da5acd5fadcda668
+AUX sqlite-3.25.2-full_archive-disallow_window_functions_in_recursive_queries.patch 1481 BLAKE2B 01c7d129328820c2c0ad8ebd74bf4222eae131f493d6db968312d8b76def9c024b654de5d2a4d0c87119a1d073717879d4610a7819244a72d8894218123347cc SHA512 7ef354b8633d2a6d58e7a99acbd41d353ab83eac6f08a1998763a366a2cbbac3e2fdd6be24903e1fe403180a512d5fa7311db2299001be4e7583ea70069a980a
+AUX sqlite-3.25.2-full_archive-tests.patch 1549 BLAKE2B e17fa8e556518f6c4d22b225b721e9f2592a111f8960374c4aee326daf7a1bdfcefc7c6415f8d03a0f6c1f69544ea031a067b5c24bc24bbf20e9d20c9a56a0c6 SHA512 f448c8b77f01ede8b6b63a583916bd1ef9d75d6b71340e43a694dd0d888e4de0bd7cd10c1de0ee64903048f86544c9a88de5fb7b9c0aebfa159e62aae6df4f4b
+AUX sqlite-3.25.2-nonfull_archive-disallow_window_functions_in_recursive_queries.patch 572 BLAKE2B cc91956ea6d2187c3a3f2f15384173624383958e222b4a6d5f5f16494fa2a602a952054b1d670e043a8eab46c338404101ef6d58f50584999d6d3edf3997ed43 SHA512 e8461af692241475501b291754479e035a38edcdde99c086f069d75b6c2527e74abd606d4fb1551a5d7be4c80d9b21aea10d6dae6fb5b0b7fcbb003ac94b3583
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
EBUILD sqlite-3.23.1.ebuild 9703 BLAKE2B 4e6cb6336b1bad31d56cdb3a1ea3ca32323b4280caaaa053221e1e405ea2edbd552860ee89934f66d68d19425f0632bea45eea33595cfb6f7e95c5b4bf5eb1d5 SHA512 7fa4f6ab562af73f00338da2e6aaef80751dfd7071c21abf64647cbf68b8e2180e524574c2f0bc38cf138bc8dd3edb7c75f4b3f2a28f788fe0cf108a158ef44f
EBUILD sqlite-3.24.0.ebuild 9524 BLAKE2B dd5bd95346b77d111c1784a69feb6d44170375c82d7734420587d00fcc1f987fdb7676200f988c683606b856008f198b22999a8dd208a275b625702ba0341fae SHA512 0393124beded522a17bdd4f5690d0022f9646069ce735d79c316597743b036a06c0bd5a77635b428a78954920551876e10e55d1498305ec857b5d7eb2d4b05fd
+EBUILD sqlite-3.25.2.ebuild 9870 BLAKE2B 235bbb1eec1d35a1babb2bcfd4daa3f34fe69d4e5973b5fda452df9965bd083a64d15c273d89f25eb2168a72efb615606dcc0698e5e35787e070b16e186e491e SHA512 f467e23b508f8a2d7729f6bf02529b151b15d8b90dbf432512a1f2b122f2a3b2ce1135378dc57b7335d20153309e50df950e3150e05b01d9f068fd18a5a25575
MISC metadata.xml 723 BLAKE2B 8866fbde770e7b8582de27303c72df047db80e0d70b1a1ceca0951a05b51bb704452071ceb6c29ecf3704d523888351615d1798aaab092e6b7505d4c6e3698ad SHA512 40616710b1d4edd3e24b5ac0797c1c9b606aeacac9f9543722bc9529e7c2c704a0c10b0ca68a5ba6e0a0ee8bc605212e8a49a050c8687afbdd7dbf28d6d4506a
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 000000000000..d39d843d12c0
--- /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 000000000000..be0a7e30dde3
--- /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 000000000000..6b34e2e4f9d8
--- /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 000000000000..2868b3fc123b
--- /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 000000000000..4ee3d477cfc4
--- /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 000000000000..9ca3d39f36c1
--- /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
+}