summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
commit9ee6d97c2883d42f204a533a8bc1f4562df778fb (patch)
treeb690ddc0ca30f1472887edbb0b8313629bfcbbb2 /dev-db
parentb17a3ef12038de50228bade1f05502c74e135321 (diff)
gentoo resync : 16.09.2020
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin17608 -> 17625 bytes
-rw-r--r--dev-db/gqlplus/Manifest3
-rw-r--r--dev-db/gqlplus/files/gqlplus-1.16-ncurses-tinfo.patch19
-rw-r--r--dev-db/gqlplus/gqlplus-1.16.ebuild11
-rw-r--r--dev-db/innotop/Manifest2
-rw-r--r--dev-db/innotop/metadata.xml2
-rw-r--r--dev-db/lmdb/Manifest2
-rw-r--r--dev-db/lmdb/metadata.xml3
-rw-r--r--dev-db/oracle-instantclient-basic/Manifest2
-rw-r--r--dev-db/oracle-instantclient-basic/metadata.xml1
-rw-r--r--dev-db/oracle-instantclient-jdbc/Manifest2
-rw-r--r--dev-db/oracle-instantclient-jdbc/metadata.xml1
-rw-r--r--dev-db/oracle-instantclient-odbc/Manifest2
-rw-r--r--dev-db/oracle-instantclient-odbc/metadata.xml1
-rw-r--r--dev-db/oracle-instantclient-sqlplus/Manifest2
-rw-r--r--dev-db/oracle-instantclient-sqlplus/metadata.xml1
-rw-r--r--dev-db/pg_activity/Manifest4
-rw-r--r--dev-db/pg_activity/pg_activity-1.6.1.ebuild (renamed from dev-db/pg_activity/pg_activity-1.5.0.ebuild)0
-rw-r--r--dev-db/pgadmin4/Manifest2
-rw-r--r--dev-db/pgadmin4/pgadmin4-4.25.ebuild124
-rw-r--r--dev-db/postgresql/Manifest32
-rw-r--r--dev-db/postgresql/postgresql-10.12.ebuild465
-rw-r--r--dev-db/postgresql/postgresql-10.13.ebuild456
-rw-r--r--dev-db/postgresql/postgresql-10.14.ebuild2
-rw-r--r--dev-db/postgresql/postgresql-11.7.ebuild467
-rw-r--r--dev-db/postgresql/postgresql-11.8.ebuild458
-rw-r--r--dev-db/postgresql/postgresql-11.9.ebuild2
-rw-r--r--dev-db/postgresql/postgresql-12.2.ebuild467
-rw-r--r--dev-db/postgresql/postgresql-12.3.ebuild458
-rw-r--r--dev-db/postgresql/postgresql-12.4.ebuild2
-rw-r--r--dev-db/postgresql/postgresql-13_beta2.ebuild458
-rw-r--r--dev-db/postgresql/postgresql-9.5.21.ebuild485
-rw-r--r--dev-db/postgresql/postgresql-9.5.22.ebuild476
-rw-r--r--dev-db/postgresql/postgresql-9.5.23.ebuild2
-rw-r--r--dev-db/postgresql/postgresql-9.6.17.ebuild490
-rw-r--r--dev-db/postgresql/postgresql-9.6.18.ebuild481
-rw-r--r--dev-db/postgresql/postgresql-9.6.19.ebuild2
-rw-r--r--dev-db/sqlcl-bin/Manifest4
-rw-r--r--dev-db/sqlcl-bin/sqlcl-bin-20.2.0.174.1557.ebuild (renamed from dev-db/sqlcl-bin/sqlcl-bin-19.4.0.354.0937.ebuild)0
-rw-r--r--dev-db/sqlite/Manifest9
-rw-r--r--dev-db/sqlite/files/sqlite-3.32.3-security_fixes.patch146
-rw-r--r--dev-db/sqlite/files/sqlite-3.33.0-build_1.1.patch413
-rw-r--r--dev-db/sqlite/files/sqlite-3.33.0-build_1.2.patch422
-rw-r--r--dev-db/sqlite/files/sqlite-3.33.0-build_2.1.patch286
-rw-r--r--dev-db/sqlite/files/sqlite-3.33.0-build_2.2.patch434
-rw-r--r--dev-db/sqlite/sqlite-3.33.0.ebuild (renamed from dev-db/sqlite/sqlite-3.32.3.ebuild)55
-rw-r--r--dev-db/tinycdb/Manifest4
-rw-r--r--dev-db/tinycdb/metadata.xml7
-rw-r--r--dev-db/tinycdb/tinycdb-0.78.ebuild52
-rw-r--r--dev-db/unixODBC/Manifest2
-rw-r--r--dev-db/unixODBC/unixODBC-2.3.9.ebuild62
51 files changed, 1901 insertions, 5382 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index dec95743f250..818a0112cbd8 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/gqlplus/Manifest b/dev-db/gqlplus/Manifest
index 218d06a27ce9..3c82cbe4b124 100644
--- a/dev-db/gqlplus/Manifest
+++ b/dev-db/gqlplus/Manifest
@@ -1,3 +1,4 @@
+AUX gqlplus-1.16-ncurses-tinfo.patch 485 BLAKE2B c5a38640cd4a1b072fc0f966095041b9ae463e6a2c577a822e40bd899f061f11b42b4c0bb8eca4a2ff9064251a69bfef508c8b63b31953da45061e801b337f17 SHA512 4b9fe6e489d12e021384979bc659a75ad60f704ca485320893d42326aece16720c8d02268703b3bc8b45527197dbbe85cbac9d7ae9133ff350718b874abb4382
DIST gqlplus-1.16.tar.gz 2128428 BLAKE2B 5d2ad6cd58d7a5e0e6ce0d54301d70ad452d34a9636ce1f831d1b6d1de3bbc0ebce3d92ed15c2b8da60107d49c56c306543c768c0ef3534f34d2d545b80c43d7 SHA512 e9d7685e4db741db8232f7ba7a05df59042d0cafe198060adcd37aea2d3878e785eacb1f7b72fcb154558d1be8c619818dbeceffaefb75e372a18ed23e234512
-EBUILD gqlplus-1.16.ebuild 752 BLAKE2B 68f4fcc80d2884c2c79d576191316ba43135f2f310050ce6226fa7ac0645159624afe387586081533f29434615c1f48748a924d0a07680e506b132451e30765d SHA512 629af9bb7de9b883ce1c3e6a47c7100ac875302531de6fbdc9d84ccf19770a3af6e481f34e41fa7324f95ba06c554225db265d37fdfce63af2320c535f70e64e
+EBUILD gqlplus-1.16.ebuild 806 BLAKE2B 0e670ae099780beda48b434a2f6e13553c95316ac28c84faccdc3b36dfb2396f9713b25eca594672f03b8884fd324dc2f032b00d8df37424521a2ca1156b209d SHA512 7d5b310253539b0def3d8540115d1796467057968ea9ef175cb71885e54e539efb69fe613e37ace4e8be910b1e803c4f0212b71750c9d4b55c1cabca2b1af618
MISC metadata.xml 620 BLAKE2B 82537c625dbd12eca6562acf5605a5b3b6b1841dd946d2f5dd17a1730bb340f49837f3bea3c9ea6f830abd4c0ecbc3751d218a8daf843f65ca4bb292a5a355be SHA512 8ce9a86e99c4198a246b149f5a526f0cf70ea9e75d3e97bc643520c9377136e83ca56ac47869ae0b62f021dd28da6745204c7c12a52a82e996949b4a796086ce
diff --git a/dev-db/gqlplus/files/gqlplus-1.16-ncurses-tinfo.patch b/dev-db/gqlplus/files/gqlplus-1.16-ncurses-tinfo.patch
new file mode 100644
index 000000000000..e39085e0daba
--- /dev/null
+++ b/dev-db/gqlplus/files/gqlplus-1.16-ncurses-tinfo.patch
@@ -0,0 +1,19 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -4,14 +4,6 @@
+ AC_PROG_CC
+ AC_PROG_INSTALL
+ AC_PROG_RANLIB
+-AC_CHECK_LIB(ncurses, tgetnum,,
+-[
+- echo "The required library ncurses not found - aborting."
+- exit
+-],)
+-AC_CHECK_LIB(readline, tputs,,
+-[
+- echo "The required library readline not found - aborting."
+- exit
+-],)
++AC_SEARCH_LIBS([tgetnum], [ncurses tinfo], , AC_MSG_ERROR([need ncurses]), [])
++AC_CHECK_LIB(readline, tputs, , AC_MSG_ERROR([need readline]), [])
+ AC_OUTPUT(Makefile)
diff --git a/dev-db/gqlplus/gqlplus-1.16.ebuild b/dev-db/gqlplus/gqlplus-1.16.ebuild
index a3aa8f209869..b21f38c84694 100644
--- a/dev-db/gqlplus/gqlplus-1.16.ebuild
+++ b/dev-db/gqlplus/gqlplus-1.16.ebuild
@@ -1,12 +1,12 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
inherit autotools
DESCRIPTION="a front-end for Oracle program sqlplus with command-line editing"
-HOMEPAGE="https://sourceforge.net/projects/gqlplus/"
+HOMEPAGE="https://gitlab.com/jessp011/gqlplus"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
@@ -17,12 +17,17 @@ IUSE=""
DEPEND="sys-libs/readline:*"
RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}"/${P}-ncurses-tinfo.patch )
+
src_prepare() {
+ default
+
# don't use packaged readline and old version containing it
rm -Rf readline gqlplus-1.15
# maintainer can't seem to get versioning right
sed -i '/^#define VERSION/s/"[^"]\+"/"'"${PV}"'"/' gqlplus.c || die
sed -i '/^AC_INIT/s/\[[1-9.]\+\]/['"${PV}"']/' configure.ac || die
+
eautoreconf
}
diff --git a/dev-db/innotop/Manifest b/dev-db/innotop/Manifest
index bfb70f58b3c6..718cd62217c1 100644
--- a/dev-db/innotop/Manifest
+++ b/dev-db/innotop/Manifest
@@ -1,3 +1,3 @@
DIST innotop-1.12.0.tar.gz 182854 BLAKE2B 1470f21fe7882e920966a856365586c37461c955f0d07ea72a9bffa16b1a112fe5daa2dec585f888c90570d28f9af4e88885a36910bf892cc4f69abd044a4494 SHA512 bc650cd8fb5e5b83f12ccccc852802d676500d7241fe0beaa2a67c3dcca90ab06f329f0a6750789b6097ab201630b9ecf494159086d904ce7c1cfe7aefb5a635
EBUILD innotop-1.12.0.ebuild 633 BLAKE2B 7f987ee26b6f469700f107f5b27b5b15e81790656c326c36fec36c3429dac8aa9c982fc62700bf6004103419e1a96c43aa90be83ce01eaf5d6fd8d3937d0224f SHA512 978a673305506a4abf085f6fa5eb9dc2d895e0f550b1f757589cdd3a512ce8ddb881932b478a6096a6a4ddc38c5608286ad0704eb6681069b4df77c845f71931
-MISC metadata.xml 446 BLAKE2B 240fcfb51fe22a85a88ced188db07907943c96264440ac9af750eb071cde67ed3178bc32d402dc40dbd157dead3ed604e3193813be0ab5b460e365428f7296e5 SHA512 788b300a652ef6577b92c1db658937f7db9beffe2ae3a94559f0c3a885fbe0a0cfaef2aa6b7bc8fc907823722d4b9016b2e272b47932628b55d4512a7bfc9bf7
+MISC metadata.xml 323 BLAKE2B ef1085ada1002903fc3f252f7a38f52013bcfe81673aa5c95a785686819c33acdab73320da750879762a0427dae35e298cec3c98d5e8bc586394d3595487640a SHA512 dbe7b4ae5d53e8bc778187bf5e29771cf289e5463f74a156bff7cd83febe9f592c0650e2de6051f6f7de6626d9c38c54162d8d3b0e302c4aba57ae0473fe444d
diff --git a/dev-db/innotop/metadata.xml b/dev-db/innotop/metadata.xml
index 05dc2a7fb700..c4a5e04b1cd5 100644
--- a/dev-db/innotop/metadata.xml
+++ b/dev-db/innotop/metadata.xml
@@ -5,8 +5,6 @@
<email>mysql-bugs@gentoo.org</email>
<name>MySQL</name>
</maintainer>
- <longdescription>innotop - A text-mode MySQL and InnoDB monitor like mytop,
-but with many more features</longdescription>
<upstream>
<remote-id type="github">innotop/innotop</remote-id>
</upstream>
diff --git a/dev-db/lmdb/Manifest b/dev-db/lmdb/Manifest
index 4f95ef94b8c7..5705d044bdfa 100644
--- a/dev-db/lmdb/Manifest
+++ b/dev-db/lmdb/Manifest
@@ -3,4 +3,4 @@ DIST LMDB_0.9.23.tar.gz 143813 BLAKE2B 252acad974a7ed528fe0e52b8332845bc0b607659
DIST LMDB_0.9.24.tar.gz 143916 BLAKE2B f075ec5f4dfb77685188229e20f12c4febe8295c7d35ed15c3db492b68af68cc7f76741078e9bb524d2c38587839f542e964af1e5d6d984bb28bd602caabbb8d SHA512 c3a96c27f13c072ef5861bcea045d82f0a220dbd938579411ea6c38ac0696b3620c71f1e2cc56d31db5105f3533da95aba1ac34653d8bdcfa4f2f1fb831cccb1
EBUILD lmdb-0.9.23.ebuild 2263 BLAKE2B f1f7d49007f6166011ffe6b488dba57526454f3dcd634259c1d6f8b5009b602e2c2a2e15ea52eaf9564a4a83932a211815d1c1193c28cfd52699c1f0396fa6a6 SHA512 71b92b02078e3028c3bea4ccd43a7b31bb0b5d6f76086f5f43d793cb83c8626fc337fbd490515463b5da340ec55b1124a76efd03060f592fd38d48744671eb9e
EBUILD lmdb-0.9.24.ebuild 2283 BLAKE2B e4df761fd015bb85aaafac47803e65c3cbe1e1180e4e10cb7199b5b6c44809d955edfd889703d86bb0887d41d930410040f53c6308a8c9ad651dd3ebebaf94bd SHA512 396acf6fcf85928f6da6bd245454175fff00ced605b93153da0f978130453e6d5560f0e5088d18f08e7ad14df427c3abf95918f05e26fee90ceafd71530d5723
-MISC metadata.xml 540 BLAKE2B b064697aa562165a627cb1be8cce847c8046d10cf184a4563a632c43ebd1916ad866e843efd49ae5659e379f3695514005b9d601117719c9f48652dab48dcea8 SHA512 7ff1fddaca73c5d7b4a6a9ada9a7aad60e16c8c7063ad5cd9cf57301f504f6e0fe53bf568dec83abf522c2c099d2b3b2463619df17077ebaa3b39bd67bd738c4
+MISC metadata.xml 432 BLAKE2B 21af6c7ba636803d33bf8877d93282327ab14f0688657115cfc2d23bf40b0f1c556cdf7238460430347570590d8ff2441f8186b5f15fa48651f12e8fdef846e4 SHA512 5feed30bc7a5a51b41f330de6446ab4f92826d2e1c216f0eb994d3e6e55b596e0a57369d51f11fc0151acc67da5d6b0d169d2394de1bd4790f2eba0eac1a21cf
diff --git a/dev-db/lmdb/metadata.xml b/dev-db/lmdb/metadata.xml
index 160bf60c274e..0167337ab87a 100644
--- a/dev-db/lmdb/metadata.xml
+++ b/dev-db/lmdb/metadata.xml
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <longdescription lang="en">
- An ultra-fast, ultra-compact key-value embedded data store
-</longdescription>
<maintainer type="person">
<email>eras@gentoo.org</email>
<name>Eray Aslan</name>
diff --git a/dev-db/oracle-instantclient-basic/Manifest b/dev-db/oracle-instantclient-basic/Manifest
index d9cdb2eb980c..b46560f2414d 100644
--- a/dev-db/oracle-instantclient-basic/Manifest
+++ b/dev-db/oracle-instantclient-basic/Manifest
@@ -11,4 +11,4 @@ DIST instantclient-sdk-linux.x64-11.2.0.4.0.zip 643089 BLAKE2B 710f0a2a81dde6cab
EBUILD oracle-instantclient-basic-11.2.0.3.ebuild 5382 BLAKE2B fcd3cecc4c386c1b4f3f1e9de11c5a93747711faa0eb4b83f49ed06262f04b18d542431212d9d5353291c9a3f6e66264f6ddb17b6eaa972d50dccd516abf1952 SHA512 c64cd1bff11ed6a11251bc3aca214b7b8a4d9a75d01702eb29ce935f9f02fb72bb9128247d2e32d87fbc1e042b0b19a72dfb6009f940bb69b455adc4f38128fe
EBUILD oracle-instantclient-basic-11.2.0.4.ebuild 5545 BLAKE2B 787d424a25ba6407ac3e0576929a93912ec5d56edcef22fe464bfd30aefb04848a43417124e5540b7d4e8d9e7376a12fcee6fb86b8fa53d29236871592d9d87f SHA512 f7f97eca82b62f43dd17170d5c9ee492f029f8e99b746511712b56cdc4cd45a96a68757101350ab05aab6e7ed5cfe2fd70154c8b28fa4e3c07bc6f961e1fec2b
EBUILD oracle-instantclient-basic-12.ebuild 399 BLAKE2B f7f1068e3c81af7a4f78972eaad534d44bac0aaaa22516d21fe21852991883a3f2269286e44f84f142771e99175677c589a8d5ea34f79d745f431679ea78c11c SHA512 9bd43fa3ff7ec7f0c281dcbb4ae68f354b820de8ec454c86efafb84a483a20527e4696305c0882d96250d57d604c317e6e61242804ca7b49f5bf068c7f3249f2
-MISC metadata.xml 344 BLAKE2B aa2fb436f1a0beb301e255d537071307f1439cdba758954f3983fcbd82fccb2d0caefb88ab646e2b56a03f3b0ac859b04a7181c3e0cc59680c5f7ff2c7daa70e SHA512 650f29483a89a65b3855aeb65fc486d38365660ed2a67e9ab18e96534c5dd453d7897b0443fd1b12dfceaee3b542840ab1648c36b07728014dfd57ac1c95e3e9
+MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-basic/metadata.xml b/dev-db/oracle-instantclient-basic/metadata.xml
index 8b032de8ebf6..bab845504e53 100644
--- a/dev-db/oracle-instantclient-basic/metadata.xml
+++ b/dev-db/oracle-instantclient-basic/metadata.xml
@@ -4,5 +4,4 @@
<maintainer type="person">
<email>haubi@gentoo.org</email>
</maintainer>
-<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription>
</pkgmetadata>
diff --git a/dev-db/oracle-instantclient-jdbc/Manifest b/dev-db/oracle-instantclient-jdbc/Manifest
index 65bb6622bd4d..23a7b430ba2b 100644
--- a/dev-db/oracle-instantclient-jdbc/Manifest
+++ b/dev-db/oracle-instantclient-jdbc/Manifest
@@ -5,4 +5,4 @@ DIST instantclient-jdbc-linux.x64-11.2.0.4.0.zip 1562474 BLAKE2B f93a05ad324bb36
EBUILD oracle-instantclient-jdbc-11.2.0.3.ebuild 2156 BLAKE2B a3d41f3326b3241c08b0237fb368016b2150b5d9c92f09b1e46c557cbab7a8f6409e86caf396adf65823cc0c941d4019057aeb319780c9767f2a7f6e9c9f4076 SHA512 ab75d9b8d07156987e55c734a2e4ae1f73f5ff8261f944481b3ad49885f15d9c3ed6c20cadf48081efde9b70f3b9bf3a6bb2546f172c02ab1955ed36fcfa137f
EBUILD oracle-instantclient-jdbc-11.2.0.4.ebuild 1940 BLAKE2B 82d646597b770e00aba5ba209e201bda7712e4907cc1e8ad657f9fa017b5fb88e9e6127ca383c7b307abedcab2b3c184c43b17d6071912f8c1aa4956cddeaab0 SHA512 02c6e4f6e355c47ca49f179ed5ba429e9129f7a23dbaa544f8e63c65e76d3aa9e9ce5e3d5ec72bda68eacfa7b368e7b00ef79daf0ed7e02ff9c125e47807f453
EBUILD oracle-instantclient-jdbc-12.ebuild 443 BLAKE2B cac8918d5dbb95f01e8325d16177977b7a8cda057a8a7e6145f117b434443a7709f8bbd085076000c6e03874d4456395950a0397ae69242819d433d0504a139c SHA512 caedd280c4ca86e740e68a71ffa50d9a1c38fce5c565a7abae1b7c543d668841c9f35fff046c702d2012b9040caed937d0da1f9f1e56282b9b44ab92c91db0c5
-MISC metadata.xml 344 BLAKE2B aa2fb436f1a0beb301e255d537071307f1439cdba758954f3983fcbd82fccb2d0caefb88ab646e2b56a03f3b0ac859b04a7181c3e0cc59680c5f7ff2c7daa70e SHA512 650f29483a89a65b3855aeb65fc486d38365660ed2a67e9ab18e96534c5dd453d7897b0443fd1b12dfceaee3b542840ab1648c36b07728014dfd57ac1c95e3e9
+MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-jdbc/metadata.xml b/dev-db/oracle-instantclient-jdbc/metadata.xml
index 8b032de8ebf6..bab845504e53 100644
--- a/dev-db/oracle-instantclient-jdbc/metadata.xml
+++ b/dev-db/oracle-instantclient-jdbc/metadata.xml
@@ -4,5 +4,4 @@
<maintainer type="person">
<email>haubi@gentoo.org</email>
</maintainer>
-<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription>
</pkgmetadata>
diff --git a/dev-db/oracle-instantclient-odbc/Manifest b/dev-db/oracle-instantclient-odbc/Manifest
index a239da47a749..6fd970c4c40c 100644
--- a/dev-db/oracle-instantclient-odbc/Manifest
+++ b/dev-db/oracle-instantclient-odbc/Manifest
@@ -5,4 +5,4 @@ DIST instantclient-odbc-linux.x64-11.2.0.4.0.zip 310560 BLAKE2B dc97373ac00f07b4
EBUILD oracle-instantclient-odbc-11.2.0.3.ebuild 2353 BLAKE2B c0d060beb5acf0c3220cb4ee2bb4726f56c2b3e89de34b1025f6301ecc3f4bb1f920f8877831acdeadc9a5d0288b6171f78adb6572995540987506d73962f1d6 SHA512 598894987ea0d942faf418f1041e0cd71929c748cb12e4f0039195cb06dff3de6a058ee59665b9981944c1565d0c4bb3face220f5f9c552804033053deac9f8f
EBUILD oracle-instantclient-odbc-11.2.0.4.ebuild 2083 BLAKE2B 07ff5ed964d5fa8b0d71bc98ec0cac68fba5baab2eeb20aa1e8f8d6512ddce221aa38ca512e57176a2530375bc32495c13bbb9ef830f580c316c0fbfad93ec83 SHA512 41b13fd6d264e51176e54496cbd149893649e6ffde2cf38098ee71adfb07b50eb20e00b840ec1f263910df0341d2ba33bd420ae51203102b93a2b3f1e1be3741
EBUILD oracle-instantclient-odbc-12.ebuild 443 BLAKE2B ded66d6bd0a342ea40f461981f5c13cdcf6484b8d1a85915a3e1ccdec595d5c60ac27e53b174f8a7d597478dbc1c08e6df3188c814654b81eef3f61722c6ad5b SHA512 3af66244b1186fefd956424912f33eeebbc6d5d2543bf5bda24bcd0949181b99c32b09690a29f4f9e733d982fdc7a494c1dd4e75eb7fd899aff26f74b100a69f
-MISC metadata.xml 290 BLAKE2B a404ae8c35022299d637b31c334cca481c107b5fd2ae2c4930d058ef4d1968a6d4e338873e045f63215f78033ebc0854f6d6904c88f3a2ad2fe2fe107349ace6 SHA512 2aadc171bc54a828cc74443808808b03df115c72f6589d254bbe408c87a10bbdf6cff4da820aff86a917b4fdc95818d605293651085afcb876c8e3063778287b
+MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-odbc/metadata.xml b/dev-db/oracle-instantclient-odbc/metadata.xml
index 1e9748f0e268..bab845504e53 100644
--- a/dev-db/oracle-instantclient-odbc/metadata.xml
+++ b/dev-db/oracle-instantclient-odbc/metadata.xml
@@ -4,5 +4,4 @@
<maintainer type="person">
<email>haubi@gentoo.org</email>
</maintainer>
-<longdescription>Instant Client Package - ODBC Supplement</longdescription>
</pkgmetadata>
diff --git a/dev-db/oracle-instantclient-sqlplus/Manifest b/dev-db/oracle-instantclient-sqlplus/Manifest
index 7954a4265b70..08f7e3dae097 100644
--- a/dev-db/oracle-instantclient-sqlplus/Manifest
+++ b/dev-db/oracle-instantclient-sqlplus/Manifest
@@ -6,4 +6,4 @@ EBUILD oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild 1548 BLAKE2B 1cb7586a8711
EBUILD oracle-instantclient-sqlplus-11.2.0.3.ebuild 1481 BLAKE2B 873726887fc60e56ce892d0888a48435d6848cecd4bf13911ed3dd9f1981d74a3b28bbfa5a2c058fe263c05f38446cb6f0da29c0d782f98db80ed223ffe1ff99 SHA512 816432be2dddfd401a80087466fe5856f65910c26e769fb06bb58a9e47fe3b571fd252b77ec15f7120fcba583ce2eb32c16770bfc2f501efe60395f9645234fe
EBUILD oracle-instantclient-sqlplus-11.2.0.4.ebuild 1550 BLAKE2B cadc194b853439546501545aa6ab3da3e65204afd7c9582d86ae1b815491290c630257f0bd74146ce6ff1bfe544ba3e698a59da9b7303f4f0e12779e9e4ef557 SHA512 f3c3acdddd951cc28e645fc3ddf0b0814021797409b7dbf69a613a44d2b1a7fee06815a7ef18523a761c14e4c4e343ef81ac7bd3622bfedddc6b467e44702e4d
EBUILD oracle-instantclient-sqlplus-12.ebuild 446 BLAKE2B c18dd02c3ed130d20b665868309c6a63d15f753afe2b892dc80569d6baba07481a137d5f2157ca3e27b92e095bcb646f20cd7061cddce68db00e5c9c7327e3ca SHA512 3a22a431e5a538e48cbbe38cb6c9779da0f57bcddfe2373cebd391de22bd5bcd70fa8d7434ef8f1a90f8f9f5b4f26633e37482d39f59da499e737b2a4c89971e
-MISC metadata.xml 344 BLAKE2B aa2fb436f1a0beb301e255d537071307f1439cdba758954f3983fcbd82fccb2d0caefb88ab646e2b56a03f3b0ac859b04a7181c3e0cc59680c5f7ff2c7daa70e SHA512 650f29483a89a65b3855aeb65fc486d38365660ed2a67e9ab18e96534c5dd453d7897b0443fd1b12dfceaee3b542840ab1648c36b07728014dfd57ac1c95e3e9
+MISC metadata.xml 214 BLAKE2B b60ecbef37fd3eed5949889bfea31a68f4941db8a7a36e4dbbb7d7381d587eaefc230349c83a9eda4bbdfd1d45b4af0928da1ff7ed2f6f4e2c704a10033c6610 SHA512 e4dddc0b51fec262729e9eedd302b3c7d7a91d227e1043134c0242c8aea2f2c6cef5fd8caca6ea1424cc38b3beeb05fed373ffcc2c8751662dd4117639a7b5de
diff --git a/dev-db/oracle-instantclient-sqlplus/metadata.xml b/dev-db/oracle-instantclient-sqlplus/metadata.xml
index 8b032de8ebf6..bab845504e53 100644
--- a/dev-db/oracle-instantclient-sqlplus/metadata.xml
+++ b/dev-db/oracle-instantclient-sqlplus/metadata.xml
@@ -4,5 +4,4 @@
<maintainer type="person">
<email>haubi@gentoo.org</email>
</maintainer>
-<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription>
</pkgmetadata>
diff --git a/dev-db/pg_activity/Manifest b/dev-db/pg_activity/Manifest
index c6d71beb56c3..b0afe0e903be 100644
--- a/dev-db/pg_activity/Manifest
+++ b/dev-db/pg_activity/Manifest
@@ -1,3 +1,3 @@
-DIST pg_activity-1.5.0.tar.gz 92392 BLAKE2B ffe39f602773e0e63ca9bc8a5c96a5dad6a0862aa622b7bf4f3073d869c33bf6e4b79a152a3c956e780d70852aaedf3172a693536436ecbbf89e6943e41ba654 SHA512 01e3d2a1f0c839e40d1da79197dd8a405dee302d46495b972f11e3672e52becceb6211cccc6e1a5c711ca36247dcead6e959435d5f4eb1735556073b6c834904
-EBUILD pg_activity-1.5.0.ebuild 634 BLAKE2B 6626868b56015cf8df504c7bd785974a2dff3cfb43adfa315498c25922521902b4b6ccde199d21f37f52409bf56bdbd4b4e2d0e42c05c10cc43b0ee9624afbcd SHA512 c7e548efcae3b1412c80b237028f8126b0e4bc2e0d8f4b8d8142d3c4646dfbe5afad0849d5a7009f87e5e36ec2fb613bed39faeca4330f255cb57c002a176612
+DIST pg_activity-1.6.1.tar.gz 127376 BLAKE2B 4e9c055c2b7d7eb78ee735124284d4d34c70a067011c2bdd3d960a7e2ff59cb799fb4a3ec1a51d7ebd0e921f5d46e85a28625d3a1a7efc281fc751702f2b58b6 SHA512 4a67443521afe88283315be1c2b3d3f19df3cb2cb3e4e059149775f5dd45925dbab8bd34525878ac883f8d007da08fbdfe3d23db9a6e1f17a4af4aa9b9c96338
+EBUILD pg_activity-1.6.1.ebuild 634 BLAKE2B 6626868b56015cf8df504c7bd785974a2dff3cfb43adfa315498c25922521902b4b6ccde199d21f37f52409bf56bdbd4b4e2d0e42c05c10cc43b0ee9624afbcd SHA512 c7e548efcae3b1412c80b237028f8126b0e4bc2e0d8f4b8d8142d3c4646dfbe5afad0849d5a7009f87e5e36ec2fb613bed39faeca4330f255cb57c002a176612
MISC metadata.xml 339 BLAKE2B 216c15e347a9dd6061fa95a90fe2a6b5b14f9dcfe7dce8a36376f28dc1c30bad6ae505247d1a5133bf9d8c1d0d61aa07b0f827f1547d563a5046a40e300896ef SHA512 e4b44855c8acd726e3e43cf79e4706077edb2cbccb955ed70c3fe44ee91ed604a057d8b612e4f3950387ee8c96b3fc77fd8e5696e63b896280a243506c7c8853
diff --git a/dev-db/pg_activity/pg_activity-1.5.0.ebuild b/dev-db/pg_activity/pg_activity-1.6.1.ebuild
index 2868663364ff..2868663364ff 100644
--- a/dev-db/pg_activity/pg_activity-1.5.0.ebuild
+++ b/dev-db/pg_activity/pg_activity-1.6.1.ebuild
diff --git a/dev-db/pgadmin4/Manifest b/dev-db/pgadmin4/Manifest
index d4da52e20a2f..a12af4090379 100644
--- a/dev-db/pgadmin4/Manifest
+++ b/dev-db/pgadmin4/Manifest
@@ -1,5 +1,7 @@
AUX pgadmin4-4.17-python-3.8.patch 595 BLAKE2B 695b133a61d2a54939a3bd8fa3c8fe3ea52ca0b00de141e936602dd06e64db736a182dd015bc31aef17dca0f3ad5746833270b551285fde416ebac30c1705577 SHA512 c5500b8f2d071663073d727c7c69ac72e3566c789de999f198cd43c71c155eb273bc2ad7eab8d69f1911dfbd5cf741989c70ad179b61c67c9a93bdb6591c8972
AUX pgadmin4.desktop 298 BLAKE2B 9048ee03c9f8e05807f2907fd7dcfda9d76bb3cd3b2567676cf6bc9acebdf8d2b4de1626f9fe57c4940422766fa7e6fa9111a5bc9c252e34f72af2850813b158 SHA512 a083c525cf49543751dcf4f98a9e2607ce06c35a573c5a97d4088b21b41dc260ea0fcbb139ce153f0e1deb6bd8e6e75e69a6fe08ff2f4aa563d7398bd52553b2
DIST pgadmin4-4.17.tar.gz 28007097 BLAKE2B d296f2b9372c23067db899fa82e1b8e732837b01a6172dd2d70520f815aafde161715eea9d9d53e7507a6a715dbfdaabf001a10d143c1aa0505237b2b138e334 SHA512 f9e292ba7ff1e5edaa8738188eb01744d69d0eb134700feb0623806425c998e7f298f74cd498a09f2d9a073a9a349c82f7a3f617e1da3c8dd757cc982d941c9f
+DIST pgadmin4-4.25.tar.gz 33167393 BLAKE2B 5a40e45c53f79ea66c6f685d1605ddce7b1758540bf3a6863d4b092cc4dab5b00daff15832cd6feee28aa348c7a5376e25a93508fd348d8ffd4d29031e2b6c68 SHA512 a1944f9c65b8aa7ec5bd83ef75702293d869ae341ea73f81fb4358bfbc7f91a6981237eb9f1b20055c5f3fa182428afe19dc170963265789c34d73f2e240c268
EBUILD pgadmin4-4.17-r1.ebuild 3307 BLAKE2B 2f4dab13a9365051abc89e66101bf6b8c93400b3eefb34f53033feb9d6d49321f9e2fcb7c3f58340ab21b1d358006d0a1846a08ce6a26048bde0a4a779cdf131 SHA512 4c80f4f5f243a25aee956ee3230ff6ee9a55e1dce19fcd1c1da91b00b4f16942fdc64815559bfbc873a67f99b6676f463cf923987d7fe039ed8d027b7a64b51a
+EBUILD pgadmin4-4.25.ebuild 3545 BLAKE2B 3e716cd6cb3f4fe19d2ffe6f6f8581f6ce9b558df9291c21eec36de684e766373fac11e610585d416911eb097d13310804320fe82985428a14f5fcbfb3c6acaf SHA512 46b1e593c9d10d4d69df656656bd1a5d020698a6e799e06b63f8f27358dfbcac2501ce2d34c55d2448d274aacf6a1a85eb89dea43f6e6113b74f02c6ee77bd8e
MISC metadata.xml 266 BLAKE2B 9d5988ab45f9939f9be5ee7f4b7a9950a3d62252aa0d3e6c953265467428c59fb8c05b2bb72085431b7aa9fc18d31f2b3273e8fdb33443d786b2237db697b7e2 SHA512 9f85990c7ce6a1de5c1067e4781af18bede2d3bd02963a7b2927766b70dbe98d3fb63bb01e19b1cf6e2b77038d9788bf38155b3cc33f9e5ff8430b10a4006325
diff --git a/dev-db/pgadmin4/pgadmin4-4.25.ebuild b/dev-db/pgadmin4/pgadmin4-4.25.ebuild
new file mode 100644
index 000000000000..b5bffaede3b7
--- /dev/null
+++ b/dev-db/pgadmin4/pgadmin4-4.25.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8} )
+PYTHON_REQ_USE="sqlite"
+inherit desktop python-single-r1 qmake-utils xdg
+
+DESCRIPTION="GUI administration and development platform for PostgreSQL"
+HOMEPAGE="https://www.pgadmin.org/"
+SRC_URI="https://ftp.postgresql.org/pub/pgadmin/${PN}/v${PV}/source/${P}.tar.gz"
+
+LICENSE="POSTGRESQL"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RESTRICT="test"
+
+# libsodium dep added because of 689678
+COMMON_DEPEND="${PYTHON_DEPS}
+ dev-libs/libsodium[-minimal]
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtnetwork:5[ssl]
+ dev-qt/qtwidgets:5
+"
+DEPEND="${COMMON_DEPEND}
+ doc? (
+ $(python_gen_cond_dep '
+ dev-python/sphinx[${PYTHON_MULTI_USEDEP}]
+ ')
+ )
+ virtual/imagemagick-tools[png]
+"
+
+# In 4.25's requirement.txt, bcrypt is listed as <=3.17, but upstream's
+# git history shows this is just for compatibility with <python-3.6.
+RDEPEND="${COMMON_DEPEND}
+ $(python_gen_cond_dep '
+ >=dev-python/blinker-1.4[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-1.0.2[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-compress-1.4.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-gravatar-0.5.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-login-0.4.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-mail-0.9.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-migrate-2.4.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-paranoid-0.2.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-principal-0.4.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-security-3.0.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-sqlalchemy-2.3.2[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/flask-wtf-0.14.2[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/ldap3-2.5.1[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/passlib-1.7.2[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/psutil-5.7.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/psycopg-2.8[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/python-dateutil-2.8.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/pytz-2018.9[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/simplejson-3.16.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/six-1.12.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/speaklater-1.3[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/sqlalchemy-1.3.13[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/sqlparse-0.2.4[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/sshtunnel-0.1.5[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/werkzeug-0.15.0[${PYTHON_MULTI_USEDEP}]
+ >=dev-python/wtforms-2.2.1[${PYTHON_MULTI_USEDEP}]
+ dev-python/bcrypt[${PYTHON_MULTI_USEDEP}]
+ ')
+"
+
+S="${WORKDIR}"/${P}/runtime
+
+src_prepare() {
+ cd "${WORKDIR}"/${P} || die
+ default
+}
+
+src_configure() {
+ export PGADMIN_PYTHON_DIR="${EPREFIX}/usr"
+ eqmake5
+}
+
+src_compile() {
+ default
+ use doc && emake -C "${WORKDIR}"/${P} docs
+}
+
+src_install() {
+ dobin pgAdmin4
+
+ cd "${WORKDIR}"/${P} || die
+
+ local APP_DIR=/usr/share/${PN}/web
+ insinto "${APP_DIR}"
+ doins -r web/.
+ newins - config_local.py <<-EOF
+ SERVER_MODE = False
+ UPGRADE_CHECK_ENABLED = False
+ EOF
+ python_optimize "${D}${APP_DIR}"
+
+ insinto /etc/xdg/pgadmin
+ newins - 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
+
+ local s
+ for s in 16 32 48 64 72 96 128 192 256; do
+ convert runtime/pgAdmin4.png -resize ${s}x${s} ${PN}_${s}.png || die
+ newicon -s ${s} ${PN}_${s}.png ${PN}.png
+ done
+ domenu "${FILESDIR}"/${PN}.desktop
+}
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index b141f2fca048..90343736738c 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -10,39 +10,17 @@ AUX postgresql.init-9.3-r1 4999 BLAKE2B f2bc23a51b6d9643bbc14320aaa9c41b7eb1df86
AUX postgresql.service-9.2 1666 BLAKE2B d4b81415539db3d78e0f5908185f903b70966ce3a27feed9bdf80eb6a9065ca6bd4b49e4bb822c41548b7efa9de37656378c395a8bd00a7a3daaa52911a2f674 SHA512 8c64b59f1e80096382a7166e1e8f183a5b9cf14c75138c15a39de74b983bfbed2f41cf9b33b2c72c3b9c79130c10104836a3505c96cb18ac1be1297c0fce1af0
AUX postgresql.service-9.6-r1 1477 BLAKE2B 2a652d5b2892f3a52f484fcc0b4f4dad09cf4b46c3739c3f805072040a26128cb2ad9a25d4a7c9f109a95696d739538d379af6bac53c656f5c41af45b6110de5 SHA512 9e2b04923f6ebec1424c0f276c58a6a0c4933f2de5e2a9776169227729afd06ce5284461be8b6ed70e5aaff2a68b9f96c6893d867d35761c9977f9847ccfe93d
AUX postgresql.tmpfiles 39 BLAKE2B 25a5725af53c8e4e4009887e998172dd863ce218a5438351194548c4fc8ea15308dfba3602d5a922cf49b46015198268a4a4528119d8a74dcef4cc4c1767c052 SHA512 498060f2a597cf374f4fb31deaa2d6c5b00edef68efc0e71b82bfc20b717ae12518ba18fcb455a0c518ebba1a0868f38321470616151d02fa79b889a66dcb9f8
-DIST postgresql-10.12.tar.bz2 19020488 BLAKE2B 2177e9b63e21a634e1d8ea060b5bd0a7360d81ece64f50dd614e6cdd6b0cf0dcbd3896ef2c11bd1431ce7a964ac8876d24f368d7f7eb309e3d432856d7546f2a SHA512 6accc66cbbae811509095c33e8a8d17ddd11d9e307267312e3d09df90469db4700a5806166d66f25d77769d3ef88653c98dfc7d05dd053f10434b03e0a9e33b7
-DIST postgresql-10.13.tar.bz2 19028339 BLAKE2B 8adb1be902863778ca6a0396f1bc3ffa3e69b9e27bd830523472f4895e225831ba98716c07dc3f8dcab68623d434fc3d2d7b71f753f4105c69ecb05365c94789 SHA512 7b268aa4476ed9b168814891e8b19d182683ab4994d4a9b30e75eec93ffd9c860f8a0979ba1b7408acf8e217437b5cc20037b6ebf6ef01e9cf5ee99f091c8c92
DIST postgresql-10.14.tar.bz2 19042154 BLAKE2B addddf00179190780bd30ed97cf6881670d18fda77062cdb5dc7cc161c64c3d5522db288902d0612db30fc6fcc1b619c7a102887ed438e27739e936bf5659425 SHA512 eecd2aa8df7e4779606ec547b7bf0207ebb2be10a4b332f06c3b72116f0619fe27fb651f2fd4504c73b740ab7f92468919244a615d460bb9c35085174a0dbc78
-DIST postgresql-11.7.tar.bz2 19890063 BLAKE2B 461c372567ff0b4ff4da52889be5d2822b56889e4890b33c9a71f1105ad629b4f5bec95c4fbf5aebbdd4445e0ff451a7d8df04ae7b5bf7cf0075c3226a41b19b SHA512 32c7ace228f9895241ce0d925fbfc60c0cd39f4cd35368fb10dc7db046151ffd59a9895b4c30a529627f0103051e84b4992ed60312cccd292489f3037076ca1e
-DIST postgresql-11.8.tar.bz2 19922770 BLAKE2B a646b585bbafc95957fa60c7d119c02b69b727759d2189588508f8a690dc97a0ed1429a3379bc6fd48fb22ee92f3d811dedbf8aa43271361f9b7ac2c8d42a31b SHA512 fc3d0ebd224de60bda3fa71b6832958698238e9088cf46a80c376b8996cc3b2d017fde5dce1c1da1e5e6e23b78054aafad7ee1caa744bfb12c52317ccc8a1922
DIST postgresql-11.9.tar.bz2 19959019 BLAKE2B 655d1c9e6eebde19402a4c220ee674c589641c5b6f4e6298c8c06d3330069178952455f5af58f90b9af196ba9c8fd03db0ccd70b8bc49335e465f0ed537eaf59 SHA512 2c5c2f51aa01f02af4aa0849441767383e30fef69dd52efa442892f39d2456bfa8bf01f633a265e00eca0745e792609d2c1d33f77d8f29a02f5f374c84f2bf6e
-DIST postgresql-12.2.tar.bz2 20363545 BLAKE2B 7b0cfe841d46b117ff5dd793be5537e916f92255eb0d000681ed62c497eef34c5d1261126be408f2b7f95274485e2787869cd4063461ab248b650c168b62548d SHA512 0e0ce8e21856e8f43e58b840c10c4e3ffae6d5207e0d778e9176e36f8e20e34633cbb06f0030a7c963c3491bb7e941456d91b55444c561cfc6f283fba76f33ee
-DIST postgresql-12.3.tar.bz2 20439892 BLAKE2B f7a44725f235c55a2849acd444de3a9c932314e2ae8c68d7f8e827439263b052bdf0fd5b6cdaa8197c4ce9ad1d4fbb02b5ec1af030365363993a36d8d95a4231 SHA512 68e2d244ae2a9f2138d7569bcadc1cf6f62a410fa56ad1d4ac53206f2adefabb5ae136110b41ca9246df0f8b8cb039918997e0f8a81fc7e6efb7ad10b3a59ba1
DIST postgresql-12.4.tar.bz2 20669776 BLAKE2B fb3f865a8a5e5280e7cc5da43f8658029170cd15dae8cc5fb1e741a122ea1f13418ac7743ec417ab4436976bc0ce12753fc8a301200143c975e8739d59816fa7 SHA512 36daf10878ca153370829178786dd6ee366ab4d4d6dc9c527536740fdb14b688ae4c33f850eb4243a7667d23f87e4bfd1ddee0755447ad4f3996e423e391c2f3
-DIST postgresql-13beta2.tar.bz2 21365208 BLAKE2B db223d769e378af40a41d1bfa8aa2f05a31b325c80e375aad6ee6e30c35f8e3dadc7865ff1b19c685032c1714da34aa2630c4ac190ee5450734ff436575131b2 SHA512 7307b26422e78d3ebf4fead25a8ba7de181406490a5d354decb0324fc2d9216de94cfc19fc4eaba7eef51153f159606fc40d8650eb57131cdbc8e6948299e40f
DIST postgresql-13beta3.tar.bz2 21411847 BLAKE2B 6195e246f683c0da8b7fc8bb185474cfec9d556897f8a9f9ebf6138a644760c2e74fd9981de236280879bd78f9aba25c765ed065c84b7789b8ff0776fe9532ae SHA512 62804ab44dbfaad8f3d498eacc687620077023d4ce27fe817185a85ebea3aa55f673f2d83eb5477efbe980e3c536f328369c906b4ba71fc0702393bffb6fe2c0
-DIST postgresql-9.5.21.tar.bz2 17640928 BLAKE2B 8ffcf0befc331317a32d63d3cdfe44f7743f72f18b4bc46bee5ee80f8c489b4b1ef26abc8219f277acc922657fc21e3dc31f3fc9838621f44d95cc9405fca43b SHA512 8527356ee3b4f151c832aef50a8b96e923e0a6c77e5fe6ad597f50527f9d084a8feab7bede8fdbe29aab44383577d3f86e5286fb34e2d2b696cde34bd922e69d
-DIST postgresql-9.5.22.tar.bz2 17667386 BLAKE2B 6fe8ccf638af466e57f239c9d7f1a19bb6c33f6019955824f54f2fe63870675d841811318fb28707cc85ab8a9db550e6655773db0d89d801e26459c9d0d01a43 SHA512 489321fa49e17308d3a78353edf73a16295c1377ad429a94636df069d2bf55f538ba6570e3d2991dd28bcca45fee77c6c41fa9bade35ea7f9e581abff4c9a401
DIST postgresql-9.5.23.tar.bz2 17682366 BLAKE2B 74713d6483ae1ad3d2dfc4b1ac9d30a6785ff34f61b735924f2d469861516ad5160cbfda9c09b96adf264237b6f3ad8fd6ddeef60b6af6b5b63d6c1a36fb9354 SHA512 b7a1e936a0043b57b3ece79610855820d2ea6a86e4a4be0c4c8358bf3e1ef8fa88bc60106d6b865d86231d16b5e3c098b4dbd93125a125b3cc5d468ffea64db1
-DIST postgresql-9.6.17.tar.bz2 18812282 BLAKE2B 0bb48445201aae1d6b4f5a77652aefaaa629799a019c3b81a14e554a88167530002931c2b0d658731b26a38bd09487f79a6ef514b0955982d6037b383c021819 SHA512 a76f328523517f664e4fc59a4d27e476bc6300e49370712030caae40aa160acb1e6aecc7cd3b3440125713069932df812eb8d75377a3df63e59c9292419c2aa8
-DIST postgresql-9.6.18.tar.bz2 18836490 BLAKE2B 43f2d8a14e4fcad72af1f2e2814546368f7c2c0bb3c9957527e96df0ae6984d6b05008619855cf74fefeab0f35b13de4f0a437f79fa13c6e3a4ca2c8bc272aab SHA512 78aad7042d22be4486511a9f3b5df2578b65a911b9e969e6196c945d84b9d9a79b40c01a8bdd3859cc67cd9a5d023cca5d83c1360cb14a9bb076ff3b5c1fff70
DIST postgresql-9.6.19.tar.bz2 18880036 BLAKE2B ad9c5684e2c0fb276589560f7dbe01241b5caf763f5a20991244ad7b473397576c9530658eb91e085e8416156b0ac81750f08ed85d5e5a689321891d10b6e114 SHA512 4d8d4a0e4645d71683a5fccb9cd88917e1870ba139f102e0ea82da9c8d1ad669f029e0feb6d409e2016dfd247229ec7daf04f7f2de3ab6c5b4053834ac244a26
-EBUILD postgresql-10.12.ebuild 13833 BLAKE2B c255fd95d1948451496a85e44ab1853697a6d5adc6d85e442e2589acd21880c00b7e9b1ad31ad3a8a53ed33935b56e0ae418035521773ed2bd82c8380bac6204 SHA512 14a1e4cb181ded8e6689b4c3adf3717c8ae259284863dc676874244a1928af5ea5559243d27dd9d271b433dada172fa75368eaddc218c1a12786dedac79240c7
-EBUILD postgresql-10.13.ebuild 13543 BLAKE2B cde9c3b3b834de3c034afb6a3e34091ff1965be756c69d498ea2f0edc8ec10268594e4769aefa32c1f6a9399733778b41034190b43e9ee86990dbdb591a88fc3 SHA512 ecc51aaf49b83a3a526fd77e6bbc166b1309b33102d1f7c80cc069699f8114798fa267e6c1bdd6ee6c8830979abb13e8f07a133c9b7b3ad046a217db96a29977
-EBUILD postgresql-10.14.ebuild 13537 BLAKE2B f6c71b81625807985d74a869ea421d065bffffda986498d81b575ccc1e435b8e02b851fb89207c3b06a3dce34ff3a14e019ada8daf21c853b1be71bb017d1b66 SHA512 23e8a397a0e391cfccdf568124dc59f583d703b02af29cb8b257c4a0cc8015fb7666c0594258a1310eb5a5259f699afdf9cba00e90366e5c33037e51533a9481
-EBUILD postgresql-11.7.ebuild 13964 BLAKE2B cd59290c8f0a9a49083eb324b003b69f01167011c21e6b2d77d7500f78ddbd68ff4bf4e6022d197b448902934a21612aa81bc5868aeed9af699bc254c99ce0a3 SHA512 418d5bb589ce950cbe3600692ea9c2db9f21bf9cb01621d1d6c3c502cbea8300de774f98a98f0435c63e8424424fc7ac03e743eb0ac1fa0a82e9c3ce76cfb5c9
-EBUILD postgresql-11.8.ebuild 13674 BLAKE2B 1612347e1088bce1bf8fb0d97238f8efcb57ab32652aa3d69e7cc9abf779a1292804e9199626235dca8a57893ee7b643397664b08518c5a017296624bbdfa5cc SHA512 1fc08751d1d04f8eedab56d46a73436c3194ea5f6997ddf2b4627013b017f2fb31a91858add46ae8bad13b86ce61fd0aef34a66cafba23fe11a955ae3f12b84c
-EBUILD postgresql-11.9.ebuild 13668 BLAKE2B 9d18c2b80955ce436de672bdb9d7b93896240c9b018251f8edf5af77a362078cdb9a68471b1595e474900513469ec5981d0c69660485e2334603d9ca4c219b5d SHA512 ea8b24dcda086168558c1bfa69030e3cce44f11ce78807013478acbe82c48f97635f37c441df5593b6140f56a2f23f13f1ff29e3be5232a0cd40acc39fffde87
-EBUILD postgresql-12.2.ebuild 13936 BLAKE2B a94d56317f2229a5b07e4e994c97ad390715e50579c6d11246bc39a958fedba564bce5a2db0c69b361b689a8d082dd9f24670324f3806bd823bf40864644182c SHA512 247fc090c0a11fd1b9c9bb657bef10a3447bb16fd8e22858491c4e569dbddec6817c68751ac7e8077dc57107824a611e92d02b0bd3493822756925d6b67dccb4
-EBUILD postgresql-12.3.ebuild 13646 BLAKE2B f5d5877a6aaceb7e5be0d5edd4fe7474fcf90228346ee3620f84ae84e5f04a794947dd6b0c94fe118381037f9bc01daf35c4a6c888dadd3b334d577b2c944219 SHA512 203d6bdccfd702616ba321caacc311d9378602f5578e3abc2bc46705ff689a7538b57687193a355d0abf5a6aa4e4249b2e065f73623bf2aa336893c2e694b730
-EBUILD postgresql-12.4.ebuild 13640 BLAKE2B ae1d94731dadc970397a2a9bce9499af7618392a7a44646e26695f2c600161588038011c140b035ae337790249a82e8b8ea9c50cad43935e4517b4f1e28df591 SHA512 6e843220fa493518f19fc9a3f32bab1ec5eff8671d001543061afbd0205504e77df909a0f7ec1edb8cc7059f5803c662c04e6207de7d9eac7f751a4f86fe06eb
-EBUILD postgresql-13_beta2.ebuild 13458 BLAKE2B 5cf7f7249eb3243204c44b93fe5df4e8f069195d275159a3f27fb3bd632fe81a495647cd1598562593767080f6c4e66da0edc23ec4df6d9f5e9ad6760ee13f64 SHA512 a4cbb379dc6ca0f4b2dd7a2b92e7665661057f678883cd018bbf8b9851c3f2384dd27c4d35583ff924afa672bb952ae5aee52feb60a202ac0edc29fe90d28ad6
+EBUILD postgresql-10.14.ebuild 13535 BLAKE2B fb84595125a36ed531d700db25845abacf4ced5897eaaad4e9cf5e8e1bcf4fd941a483d7380bfbf6fcfe2432ba9fbfde3edde1865309dd09ab44043abb3c3533 SHA512 01858923a47d0692501e8e56347068144b691cb5d554bc6cc44e8e9fc01ed005467d44376e0f7ec6cfc90b2580fe5fdf3c2c877d83da04fe5f5a69dd41d1acc6
+EBUILD postgresql-11.9.ebuild 13666 BLAKE2B d8cabef60a2d0ddb71340d1a0c6df2e582e8bcb2c35f6288f5f67f680c0fe5be9c0c60738487ebbc4a22aed658c8cb4032d61a03cf4a39ba57712ae1acd7e5a0 SHA512 ecc859a075ea988abb2f2b37bc94418b604abc7a93cf643102fd240ec2bddd14109a09443b4d86ff2de4f84f2ce8c6a3960e10d72b2b2e6976da7636333a2616
+EBUILD postgresql-12.4.ebuild 13638 BLAKE2B 9eb30632bb9dbe9599fd5ca555f74a6a3a1e1279e7abc29b9118b00bbac88048a17250b76e346c240adc3a210fcf802a543647da4622ca380e0744e3602c344a SHA512 520e1f44fcc83a639f85301db662c8262cfc3fb56371358c4f2139cb15ff95c5d288e44261b7d3591e0c8532c311668cddc70d803b1ea329b0d6cccdc7e548bb
EBUILD postgresql-13_beta3.ebuild 13462 BLAKE2B 57f75f15da71e3bf0ce48b15a52e378f753c03ea9dd59f16a5630f2abd3705df9c270a061f6729d541cbcf1c73ef861b4179000459b4aa2dfed39d686b7fb043 SHA512 c43bbbff4fad1f343a845b499305001d7b1e6d933fd2141625e3bbe4a3ebb2fe1cbd8051bf50ee33b5608be25b95c9716b3f09d0d10fb628eb447e7fedbfbf97
-EBUILD postgresql-9.5.21.ebuild 14655 BLAKE2B cf7d690e04b4ea1f291592214673aa41af62b75fe033b47b5f5a15e134e0adb4b6610156af57a255f3cca375f9749e3694cadb1b882089909ad8326a0a4ffa15 SHA512 d92da5ad29a1490a42f82b7ebdb7eef63763bcecd4730d4f9532a80eb39a0244a2d345f6450b0b0c68f1792f31af910c1e7b4082007e969d60aa4d15af0a050d
-EBUILD postgresql-9.5.22.ebuild 14364 BLAKE2B dca6b5544443ae23804383318c78ccad2cd2f4893576ddfa9884c7dc3c8934958599b3e9384e380173cb5b93808763e4e18fd0f6c3831c8f4ab46e49e6d87c12 SHA512 a21309712520216d545ce9e57939a86012bda865586e9684ded29febf2e7c79458ddbc601c29365324fb5363ac506a801f208925ac88f90bc998306d032b5f72
-EBUILD postgresql-9.5.23.ebuild 14358 BLAKE2B 87ddbf54290b76755062122767f757aa0872c2e275b9ee225350261c8d28dc526b81391ce3702d15c5f29790e241497a9f3cc8b1cde565d1475563a64e58dc49 SHA512 d612a50ee0fda8be55115fccb834a58957e06028be11677acfb8951a92383604778f064f92ea39d11f67ef8a75126f2aa15ece45f40d11e25092b22783a58580
-EBUILD postgresql-9.6.17.ebuild 14888 BLAKE2B 673996dddde1ce63a20d1b444e49982fb070ba8701caa9e452c3e068460b3bf44b810f19d552f2bd6e721499a08f2ae2e93001c2fb5837f6077852d0ca42e59e SHA512 1abd26b230e345ebf491333e6594c232e2fd8d9ef26acafbd148bf5d088c4332dfeffec66ba1d58fe6809dbb7cf0d2bbe47bd005024e1270e3ad2db8b994cce6
-EBUILD postgresql-9.6.18.ebuild 14597 BLAKE2B 15c5ea6f83c7b92c560e0077a73da7ee7a2fabf98b42a4501ff459ee368dd048ef8b4174c6de88e7149532960b007df415a24678f93b45717e70c5e4b4c825e9 SHA512 f79341c17fb27f09bd369c0a6022a2874a70638bcb35c24d50001d3311d8f3f6d61c0f11dcb3a9c92fca4772fd0c03521a6190fc5d04e61164b360ecaa126cfd
-EBUILD postgresql-9.6.19.ebuild 14591 BLAKE2B c34afe5f2cd8b06bbd6f8d12d9dec1dd6c36594e117295a915cfdaec1fab8bac59ae5b51394ac15a99ca047f4ab1797f8ee18ddd18b72c43041f9a6072944e82 SHA512 c1b9a6de517c760b84c85c393b36f8ff096adbf83fe13de2f7f92119eeea0a987a53bab4a52768d1a3a1e2c1118d8fd2e2202ec34a44fdd7efd1ba106a3ac57a
+EBUILD postgresql-9.5.23.ebuild 14356 BLAKE2B e1cda95af93a53aee2404107b876861115a1415b51024853498e921147a70720b249285aeca777c47c317be5c5824d80c943c336ada8d07f7204afb0223d2120 SHA512 c7b6fefe53fbb12cecfa3db8f21acc4b2718a2e7b042d68b2c39e9892fb190e31dfd12690838e1d3d93940887d16c4b8cfc376ee813659aebebe316cadc0efec
+EBUILD postgresql-9.6.19.ebuild 14589 BLAKE2B a7c07a8a1fbe8bf35bad70a8e37579d20c8664e9511dea076c7a37ed40e9833721ab23b60ce28116c7bf1abf7f1b80423a298f97720536f229ce3b86ec8ab2fa SHA512 7373ecf70a742efb6d37b34934b3256bc9a638ba8aa6550069f714682bfa43c94b50e8a374ef51fc623409607a5d30180c129ca666f1011b1610a3f1f32f8741
EBUILD postgresql-9999.ebuild 13812 BLAKE2B f0eb8f0d79c3d4d9f0bdd0fe49f9b8354ce0bbd237b286e1509b9d9573cb6c023a855c10c97d836909495a0e23fc785716820e6e54e86b0f31765e0aef53a645 SHA512 3e56a9b619e4a94658035121d71a5e86c115f7dd3a13318ff0b6c341b59ad0cb836376b7f0074a3e28e7b17f93c3e2b9317a6662de19f77d6f6c4e6b4bc1066b
MISC metadata.xml 715 BLAKE2B 71b868113676bdbb1996ecc8e3727b0cc16a559c5906e6459a41c330bcb5a5f4b3f4b5c4473a81905713c2f0735f185cd14612c69108b6bb602a7d8a92d6f3ce SHA512 4148c9c11ffaea5d30cd18befb06af914147d41eec4a8f905127f0abc5317ca370a745e0fd51b03c4583efde927fe9c1b3333853e80c2aa3e7677de65cd5d1ba
diff --git a/dev-db/postgresql/postgresql-10.12.ebuild b/dev-db/postgresql/postgresql-10.12.ebuild
deleted file mode 100644
index 3f23e213da83..000000000000
--- a/dev-db/postgresql/postgresql-10.12.ebuild
+++ /dev/null
@@ -1,465 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap libressl nls pam perl
- python +readline selinux +server systemd ssl static-libs tcl
- threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-!!<sys-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
-
- if use pam ; then
- sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-10.13.ebuild b/dev-db/postgresql/postgresql-10.13.ebuild
deleted file mode 100644
index 54610ae9a34e..000000000000
--- a/dev-db/postgresql/postgresql-10.13.ebuild
+++ /dev/null
@@ -1,456 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap libressl nls pam perl
- python +readline selinux +server systemd ssl static-libs tcl
- threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-10.2-no-server.patch"
-
- if use pam ; then
- sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-10.14.ebuild b/dev-db/postgresql/postgresql-10.14.ebuild
index 8d442461446f..533fd71130ee 100644
--- a/dev-db/postgresql/postgresql-10.14.ebuild
+++ b/dev-db/postgresql/postgresql-10.14.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{6,7} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris"
SLOT=$(ver_cut 1)
diff --git a/dev-db/postgresql/postgresql-11.7.ebuild b/dev-db/postgresql/postgresql-11.7.ebuild
deleted file mode 100644
index affe9b75b798..000000000000
--- a/dev-db/postgresql/postgresql-11.7.ebuild
+++ /dev/null
@@ -1,467 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam
- perl python +readline selinux +server systemd ssl static-libs tcl
- threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? (
- sys-devel/llvm:=
- sys-devel/clang:=
-)
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-!!<sys-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-11.8.ebuild b/dev-db/postgresql/postgresql-11.8.ebuild
deleted file mode 100644
index e17cfba0e92b..000000000000
--- a/dev-db/postgresql/postgresql-11.8.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam
- perl python +readline selinux +server systemd ssl static-libs tcl
- threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? (
- sys-devel/llvm:=
- sys-devel/clang:=
-)
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-11_beta1-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-11.9.ebuild b/dev-db/postgresql/postgresql-11.9.ebuild
index 9a8ffb7251a0..a5d28f91604f 100644
--- a/dev-db/postgresql/postgresql-11.9.ebuild
+++ b/dev-db/postgresql/postgresql-11.9.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{6,7} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1)
diff --git a/dev-db/postgresql/postgresql-12.2.ebuild b/dev-db/postgresql/postgresql-12.2.ebuild
deleted file mode 100644
index b6592df117f9..000000000000
--- a/dev-db/postgresql/postgresql-12.2.ebuild
+++ /dev/null
@@ -1,467 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam
- perl python +readline selinux +server systemd ssl static-libs tcl
- threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? (
- sys-devel/llvm:=
- sys-devel/clang:=
-)
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-!!<sys-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-12.1-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-12.3.ebuild b/dev-db/postgresql/postgresql-12.3.ebuild
deleted file mode 100644
index cfae19554b2d..000000000000
--- a/dev-db/postgresql/postgresql-12.3.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam
- perl python +readline selinux +server systemd ssl static-libs tcl
- threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? (
- sys-devel/llvm:=
- sys-devel/clang:=
-)
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-12.1-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-12.4.ebuild b/dev-db/postgresql/postgresql-12.4.ebuild
index 19a21c0e6899..3d24f5a80a7e 100644
--- a/dev-db/postgresql/postgresql-12.4.ebuild
+++ b/dev-db/postgresql/postgresql-12.4.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{6,7} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1)
diff --git a/dev-db/postgresql/postgresql-13_beta2.ebuild b/dev-db/postgresql/postgresql-13_beta2.ebuild
deleted file mode 100644
index 000f3085aa8e..000000000000
--- a/dev-db/postgresql/postgresql-13_beta2.ebuild
+++ /dev/null
@@ -1,458 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-
-KEYWORDS=""
-
-SLOT=$(ver_cut 1)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc icu kerberos kernel_linux ldap libressl llvm nls pam
- perl python +readline selinux +server systemd ssl static-libs tcl
- threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-icu? ( dev-libs/icu:= )
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-llvm? (
- sys-devel/llvm:=
- sys-devel/clang:=
-)
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-server? ( systemd? ( sys-apps/systemd ) )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-12.1-no-server.patch"
-
- if use pam ; then
- sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with icu) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with llvm) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- serverman=(
- initdb
- pg_{archivecleanup,controldata,ctl,resetwal,rewind,standby}
- pg_{test_{fsync,timing},upgrade,waldump}
- post{gres,master}
- )
- for m in ${serverman[@]} ; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- # Make slot specific links to programs
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
-
- if [[ -n ${REPLACING_VERSIONS} ]] ; then
- ewarn "If your system is using 'pg_stat_statements' and you are running a"
- ewarn "version of PostgreSQL ${SLOT}, we advise that you execute"
- ewarn "the following command after upgrading:"
- ewarn
- ewarn "ALTER EXTENSION pg_stat_statements UPDATE;"
- fi
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "$(dirname ${DATA_DIR%/})" || die "Couldn't parent dirs"
- mkdir -m 0700 "${DATA_DIR%/}" || die "Couldn't make DATA_DIR"
- chown -h postgres:postgres "${DATA_DIR%/}" || die "Couldn't chown"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-9.5.21.ebuild b/dev-db/postgresql/postgresql-9.5.21.ebuild
deleted file mode 100644
index 11de5150b264..000000000000
--- a/dev-db/postgresql/postgresql-9.5.21.ebuild
+++ /dev/null
@@ -1,485 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris"
-
-SLOT=$(ver_cut 1-2)
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl
- -pg-legacytimestamp python +readline selinux +server systemd ssl
- static-libs tcl threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-!!<sys-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
-
- if use pam ; then
- sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable !pg-legacytimestamp integer-datetimes) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.2" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- if use alpha && use server ; then
- ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
- ewarn "As a result, performance will be extremely degraded."
- fi
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-9.5.22.ebuild b/dev-db/postgresql/postgresql-9.5.22.ebuild
deleted file mode 100644
index 7d999e9628af..000000000000
--- a/dev-db/postgresql/postgresql-9.5.22.ebuild
+++ /dev/null
@@ -1,476 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~ppc-macos ~x86-solaris"
-
-SLOT=$(ver_cut 1-2)
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${PV}/postgresql-${PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl
- -pg-legacytimestamp python +readline selinux +server systemd ssl
- static-libs tcl threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-9.5.5-no-server.patch"
-
- if use pam ; then
- sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable !pg-legacytimestamp integer-datetimes) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.2" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- if use alpha && use server ; then
- ewarn "PostgreSQL 9.5+ no longer has native spinlock support on Alpha platforms."
- ewarn "As a result, performance will be extremely degraded."
- fi
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-9.5.23.ebuild b/dev-db/postgresql/postgresql-9.5.23.ebuild
index 7449d534183a..ef898daa47e5 100644
--- a/dev-db/postgresql/postgresql-9.5.23.ebuild
+++ b/dev-db/postgresql/postgresql-9.5.23.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{6,7} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-macos ~x86-solaris"
SLOT=$(ver_cut 1-2)
diff --git a/dev-db/postgresql/postgresql-9.6.17.ebuild b/dev-db/postgresql/postgresql-9.6.17.ebuild
deleted file mode 100644
index cc62ab8a0c1a..000000000000
--- a/dev-db/postgresql/postgresql-9.6.17.ebuild
+++ /dev/null
@@ -1,490 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-PLOCALES="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN
- zh_TW"
-
-inherit flag-o-matic l10n linux-info multilib pam prefix python-single-r1 \
- systemd user
-
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1-2)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl
- -pg-legacytimestamp python +readline selinux +server systemd ssl
- static-libs tcl threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-server? ( systemd? ( sys-apps/systemd ) )
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-!!<sys-apps/sandbox-2.0
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-!dev-db/postgresql-docs:${SLOT}
-!dev-db/postgresql-base:${SLOT}
-!dev-db/postgresql-server:${SLOT}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- enewgroup postgres 70
- enewuser postgres 70 /bin/sh /var/lib/postgresql postgres
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
-
- if use pam ; then
- sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable !pg-legacytimestamp integer-datetimes) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls nls "'$(l10n_get_locales)'")
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-9.6.18.ebuild b/dev-db/postgresql/postgresql-9.6.18.ebuild
deleted file mode 100644
index 52f63bca1fbc..000000000000
--- a/dev-db/postgresql/postgresql-9.6.18.ebuild
+++ /dev/null
@@ -1,481 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-SLOT=$(ver_cut 1-2)
-
-MY_PV=${PV/_/}
-S="${WORKDIR}/${PN}-${MY_PV}"
-
-SRC_URI="https://ftp.postgresql.org/pub/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
-
-LICENSE="POSTGRESQL GPL-2"
-DESCRIPTION="PostgreSQL RDBMS"
-HOMEPAGE="https://www.postgresql.org/"
-
-IUSE="debug doc kerberos kernel_linux ldap libressl nls pam perl
- -pg-legacytimestamp python +readline selinux +server systemd ssl
- static-libs tcl threads uuid xml zlib"
-
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CDEPEND="
->=app-eselect/eselect-postgresql-2.0
-acct-group/postgres
-acct-user/postgres
-sys-apps/less
-virtual/libintl
-kerberos? ( virtual/krb5 )
-ldap? ( net-nds/openldap )
-pam? ( sys-libs/pam )
-perl? ( >=dev-lang/perl-5.8:= )
-python? ( ${PYTHON_DEPS} )
-readline? ( sys-libs/readline:0= )
-ssl? (
- !libressl? ( >=dev-libs/openssl-0.9.6-r1:0= )
- libressl? ( dev-libs/libressl:= )
-)
-server? ( systemd? ( sys-apps/systemd ) )
-tcl? ( >=dev-lang/tcl-8:0= )
-xml? ( dev-libs/libxml2 dev-libs/libxslt )
-zlib? ( sys-libs/zlib )
-"
-
-# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no
-# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems,
-# the libc includes UUID functions.
-UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} )
-BSD_LIBC=( elibc_{Free,Net,Open}BSD )
-
-nest_usedep() {
- local front back
- while [[ ${#} -gt 1 ]]; do
- front+="${1}? ( "
- back+=" )"
- shift
- done
- echo "${front}${1}${back}"
-}
-
-IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}"
-CDEPEND+="
-uuid? (
- ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )}
- $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid)
-)"
-
-DEPEND="${CDEPEND}
-sys-devel/bison
-sys-devel/flex
-nls? ( sys-devel/gettext )
-xml? ( virtual/pkgconfig )
-"
-
-RDEPEND="${CDEPEND}
-selinux? ( sec-policy/selinux-postgresql )
-"
-
-pkg_setup() {
- use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup
-
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # Work around PPC{,64} compilation bug where bool is already defined
- sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die
-
- # Set proper run directory
- sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
- -i src/include/pg_config_manual.h || die
-
- # Rely on $PATH being in the proper order so that the correct
- # install program is used for modules utilizing PGXS in both
- # hardened and non-hardened environments. (Bug #528786)
- sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
-
- use server || eapply "${FILESDIR}/${PN}-${SLOT}.3-no-server.patch"
-
- if use pam ; then
- sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
- -i src/backend/libpq/auth.c || \
- die 'PGSQL_PAM_SERVICE rename failed.'
- fi
-
- eapply_user
-}
-
-src_configure() {
- case ${CHOST} in
- *-darwin*|*-solaris*)
- use nls && append-libs intl
- ;;
- esac
-
- export LDFLAGS_SL="${LDFLAGS}"
- export LDFLAGS_EX="${LDFLAGS}"
-
- local PO="${EPREFIX}"
-
- local i uuid_config=""
- if use uuid; then
- for i in ${UTIL_LINUX_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=e2fs"
- done
- for i in ${BSD_LIBC[@]}; do
- use ${i} && uuid_config="--with-uuid=bsd"
- done
- [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
- fi
-
- econf \
- --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
- --datadir="${PO}/usr/share/postgresql-${SLOT}" \
- --includedir="${PO}/usr/include/postgresql-${SLOT}" \
- --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
- --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
- --with-system-tzdata="${PO}/usr/share/zoneinfo" \
- $(use_enable !alpha spinlocks) \
- $(use_enable !pg-legacytimestamp integer-datetimes) \
- $(use_enable debug) \
- $(use_enable threads thread-safety) \
- $(use_with kerberos gssapi) \
- $(use_with ldap) \
- $(use_with pam) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with readline) \
- $(use_with ssl openssl) \
- $(usex server "$(use_with systemd)" '--without-systemd') \
- $(use_with tcl) \
- ${uuid_config} \
- $(use_with xml libxml) \
- $(use_with xml libxslt) \
- $(use_with zlib) \
- $(use_enable nls)
-}
-
-src_compile() {
- emake
- emake -C contrib
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- emake DESTDIR="${D}" install -C contrib
-
- dodoc README HISTORY doc/{TODO,bug.template}
-
- # man pages are already built, but if we have the target make them,
- # they'll be generated from source before being installed so we
- # manually install man pages.
- # We use ${SLOT} instead of doman for postgresql.eselect
- insinto /usr/share/postgresql-${SLOT}/man/
- doins -r doc/src/sgml/man{1,3,7}
- if ! use server; then
- # Remove man pages for non-existent binaries
- for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do
- rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1"
- done
- fi
- docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7}
-
- # Create slot specific man pages
- local bn f mansec slotted_name
- for mansec in 1 3 7 ; do
- local rel_manpath="../../postgresql-${SLOT}/man/man${mansec}"
-
- mkdir -p "${ED}"/usr/share/man/man${mansec} || die "making man dir"
- pushd "${ED}"/usr/share/man/man${mansec} > /dev/null || die "pushd failed"
-
- for f in "${ED}/usr/share/postgresql-${SLOT}/man/man${mansec}"/* ; do
- bn=$(basename "${f}")
- slotted_name=${bn%.${mansec}}${SLOT/.}.${mansec}
- case ${bn} in
- TABLE.7|WITH.7)
- echo ".so ${rel_manpath}/SELECT.7" > ${slotted_name}
- ;;
- *)
- echo ".so ${rel_manpath}/${bn}" > ${slotted_name}
- ;;
- esac
- done
-
- popd > /dev/null
- done
-
- insinto /etc/postgresql-${SLOT}
- newins src/bin/psql/psqlrc.sample psqlrc
-
- # Don't delete libpg{port,common}.a (Bug #571046). They're always
- # needed by extensions utilizing PGXS.
- use static-libs || \
- find "${ED}" -name '*.a' ! -name libpgport.a ! -name libpgcommon.a \
- -delete
-
- local f bn
- for f in $(find "${ED}/usr/$(get_libdir)/postgresql-${SLOT}/bin" \
- -mindepth 1 -maxdepth 1)
- do
- bn=$(basename "${f}")
- # Temporarily tack on tmp to workaround a file collision
- # issue. This is only necessary for 9.7 and earlier. 10 never
- # had this issue.
- dosym "../$(get_libdir)/postgresql-${SLOT}/bin/${bn}" \
- "/usr/bin/${bn}${SLOT/.}tmp"
- done
-
- if use doc ; then
- docinto html
- dodoc doc/src/sgml/html/*
-
- docinto sgml
- dodoc doc/src/sgml/*.{sgml,dsl}
- fi
-
- if use server; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.confd-9.3" | newconfd - ${PN}-${SLOT}
-
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.init-9.3-r1" | newinitd - ${PN}-${SLOT}
-
- if use systemd; then
- sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \
- "${FILESDIR}/${PN}.service-9.6-r1" | \
- systemd_newunit - ${PN}-${SLOT}.service
- systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfiles ${PN}-${SLOT}.conf
- fi
-
- newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir
-
- use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session
-
- if use prefix ; then
- keepdir /run/postgresql
- fperms 1775 /run/postgresql
- fi
- fi
-}
-
-pkg_preinst() {
- # Find all of the slot-specific symlinks, if any, in /usr/bin (e.g.,
- # /usr/bin/psql96). They may have been created by the
- # postgresql.eselect module, but they're handled within this ebuild
- # now. It's alright if we momentarily delete /usr/bin/psql as it
- # will be recreated by the eselect module in pkg_ppostinst(). This
- # is only necessary for 9.7 and earlier. 10 and later were never
- # handled in this manner.
- local canonicalise
- if type -p realpath > /dev/null; then
- canonicalise=realpath
- elif type -p readlink > /dev/null; then
- canonicalise='readlink -f'
- else
- # can't die, subshell
- die "No readlink nor realpath found, cannot canonicalise"
- fi
-
- local l
- # First remove any symlinks in /usr/bin that may have been created
- # by the old eselect
- for l in $(find "${ROOT}/usr/bin" -mindepth 1 -maxdepth 1 -type l) ; do
- if [[ $(${canonicalise} "${l}") == *postgresql-${SLOT}* ]] ; then
- rm "${l}" || ewarn "Couldn't remove ${l}"
- fi
- done
-
- # Then move the symlinks created by the ebuild to their proper place.
- for l in "${ED}"/usr/bin/*tmp ; do
- mv "${l}" "${l%tmp}" \
- || ewarn "Couldn't rename $(basename ${l}) to $(basename ${l%tmp})"
- done
-}
-
-pkg_postinst() {
- use server && use systemd && systemd_tmpfiles_create ${PN}-${SLOT}.conf
- postgresql-config update
-
- elog "If you need a global psqlrc-file, you can place it in:"
- elog " ${EROOT}/etc/postgresql-${SLOT}/"
-
- if use server ; then
- elog
- elog "Gentoo specific documentation:"
- elog "https://wiki.gentoo.org/wiki/PostgreSQL"
- elog
- elog "Official documentation:"
- elog "https://www.postgresql.org/docs/${SLOT}/static/index.html"
- elog
- elog "The default location of the Unix-domain socket is:"
- elog " ${EROOT}/run/postgresql/"
- elog
- elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
- elog "so that it contains your preferred locale in:"
- elog " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- elog
- elog "Then, execute the following command to setup the initial database"
- elog "environment:"
- elog " emerge --config =${CATEGORY}/${PF}"
- fi
-}
-
-pkg_prerm() {
- if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then
- ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
- ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL"
-
- ebegin "Resuming removal in 10 seconds (Control-C to cancel)"
- sleep 10
- eend 0
- fi
-}
-
-pkg_postrm() {
- postgresql-config update
-}
-
-pkg_config() {
- use server || die "USE flag 'server' not enabled. Nothing to configure."
-
- [[ -f "${EROOT}/etc/conf.d/postgresql-${SLOT}" ]] \
- && source "${EROOT}/etc/conf.d/postgresql-${SLOT}"
- [[ -z "${PGDATA}" ]] && PGDATA="${EROOT}/etc/postgresql-${SLOT}/"
- [[ -z "${DATA_DIR}" ]] \
- && DATA_DIR="${EROOT}/var/lib/postgresql/${SLOT}/data"
-
- # environment.bz2 may not contain the same locale as the current system
- # locale. Unset and source from the current system locale.
- if [ -f "${EROOT}/etc/env.d/02locale" ]; then
- unset LANG
- unset LC_CTYPE
- unset LC_NUMERIC
- unset LC_TIME
- unset LC_COLLATE
- unset LC_MONETARY
- unset LC_MESSAGES
- unset LC_ALL
- source "${EROOT}/etc/env.d/02locale"
- [ -n "${LANG}" ] && export LANG
- [ -n "${LC_CTYPE}" ] && export LC_CTYPE
- [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
- [ -n "${LC_TIME}" ] && export LC_TIME
- [ -n "${LC_COLLATE}" ] && export LC_COLLATE
- [ -n "${LC_MONETARY}" ] && export LC_MONETARY
- [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
- [ -n "${LC_ALL}" ] && export LC_ALL
- fi
-
- einfo "You can modify the paths and options passed to initdb by editing:"
- einfo " ${EROOT}/etc/conf.d/postgresql-${SLOT}"
- einfo
- einfo "Information on options that can be passed to initdb are found at:"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
- einfo " https://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
- einfo
- einfo "PG_INITDB_OPTS is currently set to:"
- if [[ -z "${PG_INITDB_OPTS}" ]] ; then
- einfo " (none)"
- else
- einfo " ${PG_INITDB_OPTS}"
- fi
- einfo
- einfo "Configuration files will be installed to:"
- einfo " ${PGDATA}"
- einfo
- einfo "The database cluster will be created in:"
- einfo " ${DATA_DIR}"
- einfo
-
- ebegin "Continuing initialization in 5 seconds (Control-C to cancel)"
- sleep 5
- eend 0
-
- if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
- eerror "The given directory, '${DATA_DIR}', is not empty."
- eerror "Modify DATA_DIR to point to an empty directory."
- die "${DATA_DIR} is not empty."
- fi
-
- einfo "Creating the data directory ..."
- if [[ ${EUID} == 0 ]] ; then
- mkdir -p "${DATA_DIR}"
- chown -Rf postgres:postgres "${DATA_DIR}"
- chmod 0700 "${DATA_DIR}"
- fi
-
- einfo "Initializing the database ..."
-
- if [[ ${EUID} == 0 ]] ; then
- su postgres -c "${EROOT}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
- else
- "${EROOT}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
- fi
-
- if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then
- mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}"
- ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}"
- fi
-
- # unix_socket_directory has no effect in postgresql.conf as it's
- # overridden in the initscript
- sed '/^#unix_socket_directories/,+1d' -i "${PGDATA%/}"/postgresql.conf
-
- cat <<- EOF >> "${PGDATA%/}"/postgresql.conf
- # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522
- # On the off-chance that you might need to work with UTF-8 encoded
- # characters in PL/Perl
- plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";'
- EOF
-
- einfo "The autovacuum function, which was in contrib, has been moved to the main"
- einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
- einfo "by default. You can disable it in the cluster's:"
- einfo " ${PGDATA%/}/postgresql.conf"
- einfo
- if ! use systemd; then
- einfo "The PostgreSQL server, by default, will log events to:"
- einfo " ${DATA_DIR%/}/postmaster.log"
- einfo
- fi
- if use prefix ; then
- einfo "The location of the configuration files have moved to:"
- einfo " ${PGDATA}"
- einfo "To start the server:"
- einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
- einfo "To stop:"
- einfo " pg_ctl stop -D ${DATA_DIR}"
- einfo
- einfo "Or move the configuration files back:"
- einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
- elif use systemd; then
- einfo "You should use the 'postgresql-${SLOT}.service' unit to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- else
- einfo "You should use the '${EROOT}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
- einfo "instead of 'pg_ctl'."
- fi
-}
-
-src_test() {
- if use server && [[ ${UID} -ne 0 ]] ; then
- emake check
-
- einfo "If you think other tests besides the regression tests are necessary, please"
- einfo "submit a bug including a patch for this ebuild to enable them."
- else
- use server || \
- ewarn 'Tests cannot be run without the "server" use flag enabled.'
- [[ ${UID} -eq 0 ]] || \
- ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.'
-
- ewarn 'Skipping.'
- fi
-}
diff --git a/dev-db/postgresql/postgresql-9.6.19.ebuild b/dev-db/postgresql/postgresql-9.6.19.ebuild
index f5ccbb9888c8..586527a2a689 100644
--- a/dev-db/postgresql/postgresql-9.6.19.ebuild
+++ b/dev-db/postgresql/postgresql-9.6.19.ebuild
@@ -7,7 +7,7 @@ PYTHON_COMPAT=( python3_{6,7} )
inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
SLOT=$(ver_cut 1-2)
diff --git a/dev-db/sqlcl-bin/Manifest b/dev-db/sqlcl-bin/Manifest
index ae45276984c0..b0524ace39b9 100644
--- a/dev-db/sqlcl-bin/Manifest
+++ b/dev-db/sqlcl-bin/Manifest
@@ -1,3 +1,3 @@
-DIST sqlcl-19.4.0.354.0937.zip 25303986 BLAKE2B de33e7eee05325dc1a750bd1ef5b6a2e3e074d532097e35f8db67636afc0a3f79302e0d64866011bea1c41bb64c8b9983965b756f4f76731720b1da4824c360f SHA512 b729010a58c3eedcd168602b623bbf4b988ec5b76768cc98b8f9dd8cb3a47a62ec565ae8060dbce826f340d78a185f30fe2a0e7ce420cbfc47f6ed542cbe6ec8
-EBUILD sqlcl-bin-19.4.0.354.0937.ebuild 1040 BLAKE2B 9d9d8b90ff98a55d832e50d91faa91d123ed93219df6507b5da2548306b92b75de1fb2101123627379d8ad87bd1e3f310f7ba19a9589b0407cc907ad30975087 SHA512 68d175ff276dde81d6833e60f4af954e9783271478706b6775c8f826d17325aec0372a288237c55cf961dcbc052fe0bfb08b282d438281ae8b4ae86f8affb2a6
+DIST sqlcl-20.2.0.174.1557.zip 32408164 BLAKE2B c91547af6581b01b5b33821e33fd8058457746c854ebc801fd27a5554eb7f91c4f47fa938a86121abed4e5ec8aa13fbebf0b0c3364101a374f7086a55268e73a SHA512 4a6d62f57ddb8e520bf51eae4956065fb2b44aac6dc18d7999e50f8b42d553218eaaf99c75095c12d06e1673aae224522564d19a06719b2444ef8d535fedd089
+EBUILD sqlcl-bin-20.2.0.174.1557.ebuild 1040 BLAKE2B 9d9d8b90ff98a55d832e50d91faa91d123ed93219df6507b5da2548306b92b75de1fb2101123627379d8ad87bd1e3f310f7ba19a9589b0407cc907ad30975087 SHA512 68d175ff276dde81d6833e60f4af954e9783271478706b6775c8f826d17325aec0372a288237c55cf961dcbc052fe0bfb08b282d438281ae8b4ae86f8affb2a6
MISC metadata.xml 483 BLAKE2B 1ed85dae79388f3c548163e5fafd2838e1adf9bfc9a9c793ce7f9e7e323f8e3c9e7e2f3190b3ec54a0c598d048c61b6ad67c8eefb3845cd446ea67b01e0df8a8 SHA512 e88ad9fd8c20d5be5569c64544c3f4dd72eb3243d46333c30aaa1b939eb6ce35855aa3e771008b2fff990de5b2e5bf79ca378714e3cf7dc375144b7cd8f5649c
diff --git a/dev-db/sqlcl-bin/sqlcl-bin-19.4.0.354.0937.ebuild b/dev-db/sqlcl-bin/sqlcl-bin-20.2.0.174.1557.ebuild
index 5ecd22f27f32..5ecd22f27f32 100644
--- a/dev-db/sqlcl-bin/sqlcl-bin-19.4.0.354.0937.ebuild
+++ b/dev-db/sqlcl-bin/sqlcl-bin-20.2.0.174.1557.ebuild
diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest
index c3cac931bf93..45e1eb59a16d 100644
--- a/dev-db/sqlite/Manifest
+++ b/dev-db/sqlite/Manifest
@@ -3,9 +3,14 @@ AUX sqlite-3.32.1-full_archive-build_2.patch 20259 BLAKE2B 851918379951943ac02fc
AUX sqlite-3.32.3-backports_1.patch 17914 BLAKE2B cca0c1d7e1bcccbf9042725f7df32359c954725e4a13e6956dc642aa082abe85953df98f4d3ba59c11599c3a9595126da78600ad0d4a66dce987be45f17c582e SHA512 44f91b92d6c8086b10cd96a382ea391108bde5a2e48f2b9ae43e97fe9fa9d5f4c64ee500bb8ed4414dd519f85823121265c450e92898d13468297d7bf9d28ddc
AUX sqlite-3.32.3-backports_2.patch 18056 BLAKE2B 60be3513c3cc687e8fac5689f096a8e543904dfd8f5e3f01f92245de963cc01b7f02774b0a60b2ca3fe3415d0eb3615f65e8756e174efccc98dc5438dbf2189c SHA512 4bb01074417f3e3af6bdf619c0ccc61fe54f4e926a1dd31a57e1a595cc713e58ee52cac7baa11ffa271ed434a8bb645be7fd25a9fa93cc596707f2e503fe87a1
AUX sqlite-3.32.3-backports_3.patch 9059 BLAKE2B 4c36eafca13eab04bfb0ce871458d12925b225f05edce785f7f86650de31808179d8bebeffcc23ca8f68069fa2854b7a042ef91e85705b27e85af1b3c424ced8 SHA512 c897d7ebc9b8b5f29c8ed27e76bdeeb3a0bde62fcd4f5398deca2f97c99cc2ef5556389b0c79dced64982fbde2a6322abd91e134255156b572bca476e2a7c050
-AUX sqlite-3.32.3-security_fixes.patch 4850 BLAKE2B 0dad99a14909c85f5f8b31d74dd1d63a5be7d3c6499bba788a2ff09dd1d6bb9badce57499c99c9c6fdc5b7177204452a2e14214748931ccf502154c44e3c29a8 SHA512 5845368e63676fb050618ca923b5c8348d17e003e4735f36bef17b185f434348708ce3e05be76e7c661eb5321a199364c9ba06492f71a9921b30c00255b55766
+AUX sqlite-3.33.0-build_1.1.patch 10634 BLAKE2B a0e1ae459a164174a08a434dbb9a5248f01097b71c5d6b332a171d06692aaec25ec0a3cfaa584dbdc0551ce4ce2d354d521b1fa610bedd15cd16c3aca988fe0f SHA512 74faa564b7c4eef810a27850bdd96d87577bd9c0fa627de31021cb9974e03805f3d1bf85f86780aff1c9dfa6351a9af37081d4f3776c08d0e6cfbcbd6a452426
+AUX sqlite-3.33.0-build_1.2.patch 12113 BLAKE2B f2fee819a5fe4ebc485c15a93072a280b3cb76c609dc9b5b6eeb2c9fb7210e9f4ac67018e2dc8fd3b345e7d7c9a4093b54839d280ab8d113e55db4c94055143b SHA512 92eaee1bb1d6a452b583855df03f7314907467d95000deb0177f4073e36c9b49aaafb10b137fcd5aad45eac20bf667849e005da26698df328ee9ec0e342bce92
+AUX sqlite-3.33.0-build_2.1.patch 10889 BLAKE2B 93c1ce843e636cf495c184c0e50b695308123280cdddac4c1b1e7fa53c37db96c3760e814751fa45531862901d1d60512fa47cccb338c96a0d4519312d08eda0 SHA512 43946c58b90160f706ae66fe3af2881d22e0985d1eccef9389b72695311b06631a9cd5fdf267e077c8070906eecb78ccc3a4e5774890f4f54fbf9e2343fb7dd5
+AUX sqlite-3.33.0-build_2.2.patch 11986 BLAKE2B 27cd42308436d5708771c11d085464350307d0c052e8df4175442ed6f3e412622eb42bf252538244f8b64164466b9d238194130d580ce75c2bbad84fb2552431 SHA512 a958ba2dbb16db0999cbd2a5d0427159c8ef186e461169b96a12c974caf6c353c8fd1522b4d9f52e1ce5b5eddd8d0fd658fef0eabd14465b2598cc974d8785d1
DIST sqlite-doc-3320300.zip 9772933 BLAKE2B efd72c18d0398c103e3f9c4cfeb03e7794fd69691b1bcea95b74a0c5d8af22aa13abc84ce8dc5864b5f4cb79be239433933b4daca34d1adfcc6f31ce2cde66bf SHA512 af9dca970b4c03c058d7d1cd55a3d11fa4b112dccac942b8660d82a7e9ba2956963fcb429eedfdc85915637c102e1f904ace98c8e0455c4120422bbd9f2f3cd0
+DIST sqlite-doc-3330000.zip 9834159 BLAKE2B f67155a8ce8e46c2fbc0a4e35722d1fcad86e905a15230adc70732cee267b6b2002c7499883b938129aaa908b99634e4214360e9d1dbdae333b09060de24530e SHA512 14a3cccb4ff6af57738990eeadd37a1b827f89c9c1b16201c62ca5bb9301d39223d48677b9c269ce332210e5c9ae3f42aa0f9de7d79b38acb9809c732d038368
DIST sqlite-src-3320300.zip 12461750 BLAKE2B 59cce74d284191cfc69ac09b6014701ddd2b7b3d7ebaad5da4ad71cc200e70285b3b201ff174819aa8dde5f610589d7947f547450334f0f17149014078316185 SHA512 7e027c7163a760fb9b6dbfd2e4ccffb39d4972280583fb0d7f8390017101dfed3b12a36653b3130a548ae4d04c6abb11c0a1921b6f09c54c6ae1e72fbdcb2fd4
+DIST sqlite-src-3330000.zip 12591089 BLAKE2B 14888bca229683e97c4666f8efb535be5bd3e322de0089f0175ba15e038016be3a3cc00b5bfa8c111538116914cf6d8439839ca5d1e20339b184e547ddf260a4 SHA512 3260e3e03ee2f6a4ff2bc4ea4bada5a1497afeca33878c155a8005824970c6c1eb8a2db58eb3023cab084af475fadb81d1c3c9892ae92c07f884881e6602e173
EBUILD sqlite-3.32.3-r1.ebuild 10369 BLAKE2B c997121e13e1f2b86128e18a86d7260f340f4a1be42b8ff2c02a34b13689f883572352e4e3c9ada1dbfccd2e215d8d1e6b18e912a6d966bb76112aaba241bb53 SHA512 39c97994f1f8d505055701173ebdf41732dbce2b4071c5a4b2e17a8d29f09ae92a2b731521fcf2a33ad5821cb18e9bd790dd1789d4fe9e3e9002786e34caf8ca
-EBUILD sqlite-3.32.3.ebuild 10424 BLAKE2B abfa3de0889bd3931678ffd3a0c8c8d5814a7a673f922965484a2d3c85c3a7203f17ff53dcb2cf2dd4866b1936920b084c856909803fd7f828efab6c52b1446f SHA512 2f74dbdb11ca5d9ed8989ef86cac2d087b7f5e420031b69dac5bdafdd6887e739adbb88f9159082cd2a787cce9923b33bb1bd497e0f7900eca6af18b1a3b79d1
+EBUILD sqlite-3.33.0.ebuild 11478 BLAKE2B fb14a0169ca4e8db8d48dfb4787bf9700012474f2e3310b067b4431e147957bf1c60e1b891bbc6cf16f8a0f7fc3ae9dfffa60ca875929344f500fbad7c0cc947 SHA512 3acc03c4d6390b254c53eb358de40f5be83ecaf28ac31596d43105de279ae94b8533f3469987fcc970a734e82bd64b2fa55116a12cc9b9898cb33747389e85f5
MISC metadata.xml 748 BLAKE2B c58da3e33e12b7747bbadacfd1a6137cf847fd5bd0525fc02ef854eb5bcad7bad0b29739257b632e19190995659768fdea418ffa7e485e55ef15f40f58b8382c SHA512 66f3f134065f76229b74a7ab7b469066a93da737a9037435e6fe78e85f45c980ec561537f2bb9b95db9de026bad025d8b06682187c97dedd2741717e893d43da
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 ad2a3bfe16d0..000000000000
--- 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/files/sqlite-3.33.0-build_1.1.patch b/dev-db/sqlite/files/sqlite-3.33.0-build_1.1.patch
new file mode 100644
index 000000000000..6ee7396223d0
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.33.0-build_1.1.patch
@@ -0,0 +1,413 @@
+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
new file mode 100644
index 000000000000..8f6fd6f76179
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.33.0-build_1.2.patch
@@ -0,0 +1,422 @@
+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
new file mode 100644
index 000000000000..290405261502
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.33.0-build_2.1.patch
@@ -0,0 +1,286 @@
+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
new file mode 100644
index 000000000000..3aa75bcab85e
--- /dev/null
+++ b/dev-db/sqlite/files/sqlite-3.33.0-build_2.2.patch
@@ -0,0 +1,434 @@
+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/sqlite-3.32.3.ebuild b/dev-db/sqlite/sqlite-3.33.0.ebuild
index fd258a4bd4c0..f4c16d01b362 100644
--- a/dev-db/sqlite/sqlite-3.32.3.ebuild
+++ b/dev-db/sqlite/sqlite-3.33.0.ebuild
@@ -22,7 +22,7 @@ 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"
+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"
@@ -99,16 +99,10 @@ 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 "${FILESDIR}/"${PN}-3.33.0-build_{1.1,1.2,2.1,2.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"
-
eautoreconf
multilib_copy_sources
@@ -128,22 +122,27 @@ multilib_src_configure() {
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
@@ -153,6 +152,10 @@ multilib_src_configure() {
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
@@ -162,10 +165,12 @@ multilib_src_configure() {
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
@@ -174,53 +179,66 @@ multilib_src_configure() {
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 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/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
@@ -247,6 +265,7 @@ multilib_src_configure() {
# 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
@@ -258,6 +277,8 @@ multilib_src_configure() {
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
@@ -331,10 +352,16 @@ multilib_src_install_all() {
doman sqlite3.1
if use doc; then
- rm "${WORKDIR}/${PN}-doc-${DOC_PV}/"*.{db,txt} || die
+ 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 "${WORKDIR}/${PN}-doc-${DOC_PV}/"*
+ dodoc -r *
)
+ popd > /dev/null || die
fi
}
diff --git a/dev-db/tinycdb/Manifest b/dev-db/tinycdb/Manifest
index 130938bb92c4..c8d336915e9f 100644
--- a/dev-db/tinycdb/Manifest
+++ b/dev-db/tinycdb/Manifest
@@ -1,6 +1,8 @@
AUX tinycdb-gentoo.patch 711 BLAKE2B a1f6a43fb9903784d3cc4dfdbd2b3d1b5b5532801b6de1cbda922b7a318ead7e93696b0722ee3132618f3cd8bb3ec1eb4f4cdfda35c1b428c3988626ff87b91c SHA512 b188db6904ef63a262a88aa79d1488ede1a9917af8e33b97da5d80c34cb00065bb42e84b00e20548a85f5f0b939679f5a3d85336b938318f98d101d880489415
AUX tinycdb-uclibc.patch 328 BLAKE2B 20dacb9fc08d7e02c0b138c445d91ecbdcb1993d4b6709081bd4f8c81ce92ba5124c8e6dc8e59644bce8823d0fd0a16e3f7ae543d3dc9c093768114f55ec23a6 SHA512 b58656fbcdcd21d46ace85ba50fcbc9a85b3c0d02fe3c7ba048276e6a22e2d8a91dce6fe5f853a3516071e33fc9513216148b0e92ebe13b75b201881e73f127f
AUX tinycdb-umask.patch 215 BLAKE2B b64bd33a9a47c6a1d2ba0ea0354a79f608d8990b66033ec711790fd93f90471a722d7f0f7a00db7c968fdd644d7d68462690c93f85d911972724e27500ae3d79 SHA512 57eae9200d7ea13ae5d761f0c4575b0d438f24f696bd0c2d29c720f27a706bf5dba94f34fb0c93213ee5c6dbd12af449e2fbcc11ec1872e8ecc4a9a66c9d0905
+DIST tinycdb-0.78.tar.gz 36754 BLAKE2B 41f4256840645acd28296c5473087c7cf4c026f068310375b3c305430c030b1c946f53fd3e09967d77b592ba84e7e56518fdb18e54d1e0f5e7dd552a1664a0ec SHA512 8930086b8e7fddcd4dbd3354c5f5ee05171df68fde1cc222b6c402430042b6e761efbad7e5fa8de18e1d36390f1526cc3e605c5086fe1c363ba1df6c03201553
DIST tinycdb_0.77.tar.gz 37728 BLAKE2B bebcc6128b253fa9e64438ed2671488153d70cf452bd0686a90ebd5360b725ab784b4537b25fe2ea9de0281cb1bb2fa29beb5f3515aed90fd7e2965f7e5e38bd SHA512 cfc830578a9be49781a1dbade97b64ec13293853093719aeb9a403c128245f157fd1d2d7e6941966bdea00b472127f10f11672583ba06ccc6e49151b22bf4c9a
EBUILD tinycdb-0.77-r2.ebuild 1075 BLAKE2B c766e55311606357e16143f19b3921ca4d7ebad29500910b53b19f7ab33bdd4cf869f29e004399dd007e5485fd0573e9f142b2bfd78aea33e8225ef0a42398b3 SHA512 782ce72b7b27feaa4b0ebe098233b43f8507c2c56156c989ea150bde5f8d039bbf1aa0233f1c79c326e9a653c79a2b3f200df7219bab28080cb8d96dc0571553
-MISC metadata.xml 221 BLAKE2B 6fb71e3c82061054a0c2d88c1ce8e591d5742628fe53032c9efd2c371ce1e8b0135b00ac91fa1905df39a507d5faa5871fb3a30d167dd46cec581682ba17c8ff SHA512 a11e9bbbabc9ac96985c5dc247e601b065fa762f12bce74224896c27aee34eb908187622bfc849c39c6c722a8ef8ee72b248afc84da1b0eb72f1ff5eeb13bbf0
+EBUILD tinycdb-0.78.ebuild 1053 BLAKE2B 284f4d8685d76d05fc5590a4156057149a2f543fb0db1a420e7a5e37567860363837f82806177e285f095b3ac5c57f6b5269b26b12d8ef20bc85f997b908a38e SHA512 023e64160a88f209fdd52f2293def3e19437f2f66343b0ae847752b156ce0288be3eab9937d2ea5bdc1aa45a1ce3e96f39af489cf8920a27365942689adceae3
+MISC metadata.xml 248 BLAKE2B e581d975884f924f92f81a803547379276565617c24d86f893c0186a4793c1167a36cbd8083261a10ce99839b9e5b5dd29f237bebb644eaef29ced562c9c6310 SHA512 62ab121be05f0603fe52b26ac612943b049bc527ff73401e6ed427622fcfd7f07cf3fabae90ac9e30297692ec4188b1a8bdc1f9104e30d6ed4032a96ffd77cf2
diff --git a/dev-db/tinycdb/metadata.xml b/dev-db/tinycdb/metadata.xml
index 21dc8fdf43ff..7ffc4339bc56 100644
--- a/dev-db/tinycdb/metadata.xml
+++ b/dev-db/tinycdb/metadata.xml
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="person">
- <email>hattya@gentoo.org</email>
- </maintainer>
+ <maintainer type="person">
+ <email>hattya@gentoo.org</email>
+ <name>Akinori Hattori</name>
+ </maintainer>
</pkgmetadata>
diff --git a/dev-db/tinycdb/tinycdb-0.78.ebuild b/dev-db/tinycdb/tinycdb-0.78.ebuild
new file mode 100644
index 000000000000..063a3b4e6a2a
--- /dev/null
+++ b/dev-db/tinycdb/tinycdb-0.78.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit toolchain-funcs
+
+DESCRIPTION="A very fast and simple package for creating and reading constant data bases"
+HOMEPAGE="http://www.corpit.ru/mjt/tinycdb.html"
+SRC_URI="http://www.corpit.ru/mjt/${PN}/${P}.tar.gz"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~mips ~ppc ~x86"
+IUSE="static-libs"
+RESTRICT="test"
+
+RDEPEND="!dev-db/cdb"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-gentoo.patch
+ "${FILESDIR}"/${PN}-uclibc.patch
+)
+
+src_prepare() {
+ default
+
+ sed -i "/^libdir/s:/lib:/$(get_libdir):" Makefile
+}
+
+src_compile() {
+ local targets="shared"
+ use static-libs && targets+=" staticlib piclib"
+
+ emake \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ LDFLAGS="${LDFLAGS}" \
+ ${targets}
+}
+
+src_install() {
+ local targets="install install-sharedlib"
+ use static-libs && targets+=" install-piclib"
+
+ emake \
+ prefix="${EPREFIX}"/usr \
+ mandir="${EPREFIX}"/usr/share/man \
+ DESTDIR="${D}" \
+ ${targets}
+ einstalldocs
+}
diff --git a/dev-db/unixODBC/Manifest b/dev-db/unixODBC/Manifest
index 830b9073d73e..fcc24fa26d71 100644
--- a/dev-db/unixODBC/Manifest
+++ b/dev-db/unixODBC/Manifest
@@ -1,3 +1,5 @@
DIST unixODBC-2.3.7.tar.gz 1669501 BLAKE2B 0e6b2130b72ccfed3a26877ff1c8af9adc7cc514002d3198d5249a12da5de03322178bf0847b92336b5a373893751bf3cb5aec4c251163a3c9f0ef98c90e5db8 SHA512 a87afeaaa0476f4ae6345c7021b3af52718944e599abb595c864d9126744a21341889802512a1de3ebaf86ac89e7f8b1bbd7f8f5285e8f4bccf928bd1585ff70
+DIST unixODBC-2.3.9.tar.gz 1676145 BLAKE2B f4078f9266cea753b6f78d234290efe95a6fa9551088a6ce352b0b6ac5391bf2724f872dcc2df0368e98befd24f995ab4eb6958a34bb080b0f6d08993991a0b7 SHA512 6637eab751401522e0af775cb104cd07693b82927453a98e5af28e079f4b9f40e1cfab8cb36f509c46dced89b45244bc5ed1a3dda17ba5a52a844e8e82f187bb
EBUILD unixODBC-2.3.7.ebuild 1752 BLAKE2B e82a6a3037cdf7568aafa03e5d8c1792af8ea94213b7658eb23e5680ffeb79e5ba834ec7a928a535727625a736c3826203013fcd90f0e1a2db65193bab95311b SHA512 ca30504d325086e1d8093cac9f44163cb2c77a17a85e4e3d0365566d0646f457fd02f8836217f23d1dc7b3fe3e52c31d84c3f2d65e16da073c589bd6e6cd9072
+EBUILD unixODBC-2.3.9.ebuild 1790 BLAKE2B ff148bf207c061573cca90ccedb24bcabc339944e3a1b39584d7fb71b234c85c0bb529643d251c14b5aba4327abb67a970b5fb8d141cbb7d8e5f963c48ebff50 SHA512 f4ac8fe154552f24471fbe8e5364a2d5cf4065d6b802f51f7a44b64abfce066ccbf02ed870dbaf6b66928d094eac470e7f14c44340d6d78efefd4454c3d6d80b
MISC metadata.xml 393 BLAKE2B aae8c823c6e3d1a3b21910c6aece373e66e62c6686b152f1f6c8fb980a4c58b19dce1144afb76219d4d4e451ee097afe0f031130e82cbf933e6ac1ba3d4f1cc5 SHA512 76f899e62d86b476cc9f97daffe5c67fba8fe217fb0d6c0b1b39f2de8e6a92350e6d0433f37f54f57875d3cbb3be7908eaa9a3b1717fc1da687a1789062c0f86
diff --git a/dev-db/unixODBC/unixODBC-2.3.9.ebuild b/dev-db/unixODBC/unixODBC-2.3.9.ebuild
new file mode 100644
index 000000000000..62e28e4b316c
--- /dev/null
+++ b/dev-db/unixODBC/unixODBC-2.3.9.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit libtool multilib-minimal
+
+DESCRIPTION="A complete ODBC driver manager"
+HOMEPAGE="http://www.unixodbc.org/"
+SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+minimal odbcmanual static-libs unicode"
+
+RDEPEND="
+ || (
+ dev-libs/libltdl:0[${MULTILIB_USEDEP}]
+ >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
+ )
+ >=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}]
+ >=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
+ >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
+"
+DEPEND="${RDEPEND}
+ sys-devel/flex
+"
+
+MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
+MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
+
+multilib_src_configure() {
+ # --enable-driver-conf is --enable-driverc as per configure.in
+ myeconfargs=(
+ --sysconfdir="${EPREFIX}"/etc/${PN}
+ --disable-editline
+ --disable-static
+ --enable-iconv
+ --enable-shared
+ $(use_enable static-libs static)
+ $(use_enable !minimal drivers)
+ $(use_enable !minimal driverc)
+ $(use_with unicode iconv-char-enc UTF8)
+ $(use_with unicode iconv-ucode-enc UTF16LE)
+ )
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if use odbcmanual ; then
+ # We could simply run "make install-html" if we'd not had
+ # out-of-source builds here.
+ docinto html
+ dodoc -r doc/.
+ find "${ED}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
+ fi
+
+ use prefix && dodoc README*
+ find "${ED}" -type f -name '*.la' -delete || die
+}