summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/Manifest.gzbin17437 -> 17435 bytes
-rw-r--r--dev-db/cpp-driver/Manifest2
-rw-r--r--dev-db/cpp-driver/cpp-driver-2.9.0.ebuild27
-rw-r--r--dev-db/kdb/Manifest2
-rw-r--r--dev-db/kdb/kdb-3.2.0-r1.ebuild2
-rw-r--r--dev-db/mariadb-connector-c/Manifest6
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-3.1.13.ebuild (renamed from dev-db/mariadb-connector-c/mariadb-connector-c-3.1.11.ebuild)26
-rw-r--r--dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild1
-rw-r--r--dev-db/myodbc/Manifest4
-rw-r--r--dev-db/myodbc/myodbc-8.0.25.ebuild (renamed from dev-db/myodbc/myodbc-8.0.24-r1.ebuild)0
-rw-r--r--dev-db/mysql-connector-c++/Manifest5
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.25-fix-mysqlclient-static-binding.patch274
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.24.ebuild2
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.25.ebuild45
-rw-r--r--dev-db/mysql-connector-c/Manifest4
-rw-r--r--dev-db/mysql-connector-c/mysql-connector-c-8.0.25.ebuild (renamed from dev-db/mysql-connector-c/mysql-connector-c-8.0.24.ebuild)7
-rw-r--r--dev-db/mysql-workbench/Manifest2
-rw-r--r--dev-db/mysql-workbench/mysql-workbench-8.0.25.ebuild111
-rw-r--r--dev-db/mysql/Manifest6
-rw-r--r--dev-db/mysql/mysql-8.0.25.ebuild (renamed from dev-db/mysql/mysql-8.0.24.ebuild)4
-rw-r--r--dev-db/percona-server/Manifest3
-rw-r--r--dev-db/percona-server/percona-server-8.0.23.14.ebuild1214
-rw-r--r--dev-db/phpmyadmin/Manifest4
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild2
-rw-r--r--dev-db/phpmyadmin/phpmyadmin-5.1.0.ebuild61
-rw-r--r--dev-db/postgresql/Manifest12
-rw-r--r--dev-db/postgresql/postgresql-10.17.ebuild458
-rw-r--r--dev-db/postgresql/postgresql-11.12.ebuild455
-rw-r--r--dev-db/postgresql/postgresql-12.7.ebuild455
-rw-r--r--dev-db/postgresql/postgresql-13.3.ebuild459
-rw-r--r--dev-db/postgresql/postgresql-14_beta1.ebuild461
-rw-r--r--dev-db/postgresql/postgresql-9.6.22.ebuild478
-rw-r--r--dev-db/spatialite/Manifest2
-rw-r--r--dev-db/spatialite/spatialite-5.0.1-r1.ebuild2
-rw-r--r--dev-db/timescaledb/Manifest2
-rw-r--r--dev-db/timescaledb/timescaledb-2.2.1.ebuild67
36 files changed, 4594 insertions, 71 deletions
diff --git a/dev-db/Manifest.gz b/dev-db/Manifest.gz
index 7d3b6538acea..4981f7864720 100644
--- a/dev-db/Manifest.gz
+++ b/dev-db/Manifest.gz
Binary files differ
diff --git a/dev-db/cpp-driver/Manifest b/dev-db/cpp-driver/Manifest
index 5bee6c338839..ba31454d219d 100644
--- a/dev-db/cpp-driver/Manifest
+++ b/dev-db/cpp-driver/Manifest
@@ -1,5 +1,3 @@
DIST cpp-driver-2.11.0.tar.gz 9392387 BLAKE2B 37d6063b33cd9821faa15d0eb8cb7e87d3a57a58384cf60dd623f94c9246250ba00c3303d9e0ca586f5455d449c9749058e9ed5dcb06d736591329b252bc1ffc SHA512 c8ccb3b10895c3e8f3bcf9543dff233a45c468b1b5e9c9c848d651b13c1b3f76cd0edd20fbff8e6e093767e1a2c8d360447496f1ef4370c1776d3fad28a9b3a3
-DIST cpp-driver-2.9.0.tar.gz 9178108 BLAKE2B 22c51d050dc65303dd6b584f0a89e510905bf084ff5e45a543666675a4e0b904c11895c9a7dd3d0df2fb12c1e2e58e8530c4113706c8b2548adb0b6f9431419c SHA512 45c6d58b1d287d142c9d7d6b1e28114683648a3634f44b185208fa44da64d4c8a9d485b3956a0cf7429e96f74faa588de832de30265dfa17782ca90e8163a0c1
EBUILD cpp-driver-2.11.0.ebuild 552 BLAKE2B c7576df4a2f79e8052c6abd3d1236eaa731c9e6e5f5b68cec1d6533e93584e4addf5b8639e4b03f7de2da3adfe64fe27196fe51d4ca1844d4af293a67d4b9bac SHA512 60f4d050e118ad6aaf8d0dd579a9ad7b46cf446e246cc236969c763c1f544b8d89983530692e14bd82670e2c369ebe68e204dbfbbbee98521e13e907695b74d5
-EBUILD cpp-driver-2.9.0.ebuild 564 BLAKE2B 1971009533686c792e9ba33fe04df488f7e1b7924aefbf08cc65aba261a23d857a4babe92726a10e04d472beb5286c7dec8bf9297e11dbb7ffd9317742a330ce SHA512 e9d2c5e9368e30797157b3555d67a19d5214243e66d5803f73d77492474d5f386798cf999e78232440850b1a94da909e1a28916f1a9a86a4a140ec9ae55e9a5e
MISC metadata.xml 706 BLAKE2B 8acb71ef303196e20bcd2cd4f7ef8e3d1d0a865dd06cf1a1e393ecce618a456c4b4e338c04a5e7d03a98fc3b885cf6b293337a8910d121f7e54bed25508a4c41 SHA512 6088ea69f298ba254779116d0e0a12946554da18a9e6b2e8b638de0f579a830fdbd17d3ac4d9f2c4f69bed02875997686d1b1fd4d01707235f6355c5cfeb7b10
diff --git a/dev-db/cpp-driver/cpp-driver-2.9.0.ebuild b/dev-db/cpp-driver/cpp-driver-2.9.0.ebuild
deleted file mode 100644
index 69593833d3b5..000000000000
--- a/dev-db/cpp-driver/cpp-driver-2.9.0.ebuild
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit cmake-utils
-
-DESCRIPTION="DataStax C/C++ Driver for Cassandra"
-HOMEPAGE="https://datastax.github.io/cpp-driver/"
-SRC_URI="https://github.com/datastax/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="ssl"
-
-RDEPEND="
- dev-libs/libuv:=
- ssl? (
- dev-libs/openssl:0=
- )"
-DEPEND="${RDEPEND}"
-
-src_configure() {
- local mycmakeargs=( -DCASS_USE_OPENSSL=$(usex ssl) )
- cmake-utils_src_configure
-}
diff --git a/dev-db/kdb/Manifest b/dev-db/kdb/Manifest
index d098082c9f23..36e03621342e 100644
--- a/dev-db/kdb/Manifest
+++ b/dev-db/kdb/Manifest
@@ -4,6 +4,6 @@ AUX kdb-3.2.0-cmake-pg12.patch 1094 BLAKE2B 4857bcef303533fdb57bf3d19b8881f872f3
AUX kdb-3.2.0-cmake-pg13.patch 1112 BLAKE2B 985e25a891dc4b6b8a6c56c0ba4cd93c8af71dd0b4b9c256dbb63014825f9ad9ee17ebd7521679d2105ded9240c1881d94f516f94ee89cb2317bc6fe8a57c85a SHA512 78e2d8d44836e62eceffffaef408976c5f7f9e239643568018d51dec30dfc766a1a985e972ad26c6f375a1fdcd8797e48b68a8c8710e16350ddf38d3ae03dc28
AUX kdb-3.2.0-qt-5.15.patch 2768 BLAKE2B 74d3f894dfac6caa3bb2b5fab0cb20b6190d3e0341f8b495141f3f6c2d4941faa88859799daeb7c6da680afda3ea2239eea2626f5fc3f2a355b22372b7f684f1 SHA512 5c21da612fa5925734bd8f298059f547dc91ce516232c4c5e7a41ccedff90b641c21da761f5f94f0660d107ebc56fdca191b059b282c8c593e57d4a295c63cf4
DIST kdb-3.2.0.tar.xz 650180 BLAKE2B 306152b37c2ecc670d26a2df2ae8acb950505ecb37c4994f4debd1b80c8b2ee94252658fe28b59255d9ad0d350375171f3b43dc9e94949417c3aa9ed167134fe SHA512 7df22f2c5b6e20ae3de71cb6c76b234d2f1f33b2abcdffa85be313c63d067a40a85ed102b6256207315db08ced5d69f8bc40afdf84a188463713a6b2ffdb2df7
-EBUILD kdb-3.2.0-r1.ebuild 1454 BLAKE2B 04df6f8871c98f162fc32318cb62dea0a869c23e469f3885cec9431f27661f48e62a2b78f73122df40c94af5f6e7bb002e5b4a2b3e5e7144fa99a76b156a9ec4 SHA512 db0b55ecd1ef223589b343fe2fd80c14551e1c6fd9e1c3b0d9670fbaf7326475ba5505568c599d148467c7dce3ea4133245da76372d3b0fbc8cf9aa9c20b05b5
+EBUILD kdb-3.2.0-r1.ebuild 1453 BLAKE2B c2cac6fae8c12c8db4231712e4ba2047b60605ad33bf24e2c2509031ebd5c3eb3ceace5aa4a4ee4913c94cbf2f64ff3956b46e23232b205d1bcc470c6fd885bd SHA512 0088570c06159e6395dfa22ce6b11796471194d5bf65a6b635b8f4ce1c54b970a16199de631599c79cb558be341b2c1e6749deef13926cbd99272ae7c6406374
EBUILD kdb-3.2.0.ebuild 1316 BLAKE2B bff6fb7ad77e5c7cc0a3081abc25d88560ea770f430598b6bd5b66a3a0dee4f61930383f23da24cdd2fc1ca28c307583d9027d733d8355ef7daee5ea975b89d6 SHA512 e0f105d9031836512b7a2caf81b69235445f631539e18c7711fe1bfdabbb8a52b76434a29205fb957be21f9bbd68b01426903b4f9454b8b166b3c8521a73d5bb
MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3
diff --git a/dev-db/kdb/kdb-3.2.0-r1.ebuild b/dev-db/kdb/kdb-3.2.0-r1.ebuild
index 8adc6d348e00..21b99c70ab22 100644
--- a/dev-db/kdb/kdb-3.2.0-r1.ebuild
+++ b/dev-db/kdb/kdb-3.2.0-r1.ebuild
@@ -15,7 +15,7 @@ HOMEPAGE="https://community.kde.org/KDb"
if [[ ${KDE_BUILD_TYPE} = release ]]; then
SRC_URI="mirror://kde/stable/${PN}/src/${P}.tar.xz"
- KEYWORDS="~amd64 ~x86"
+ KEYWORDS="amd64 ~x86"
fi
LICENSE="LGPL-2+"
diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest
index d090987ecf95..0f2970b68d73 100644
--- a/dev-db/mariadb-connector-c/Manifest
+++ b/dev-db/mariadb-connector-c/Manifest
@@ -1,9 +1,9 @@
AUX gentoo-layout-3.0.patch 311 BLAKE2B 4c2f0ae8aa53d605bcaf134274d3b549ec970b43cc68eed1ac71cf089c9fa32a1343d7ebfdf428e7f25032f5782aecfb86fb8f78528ffc708ab15dc7285a24e7 SHA512 4d5a48b4dd66aab04ba597b30e96b4601c6745acca21be1daf051ba6ce1e8fef1a0efa46d8e81da1ecdc893a8ee471bd8c7ed0c5436ee33b8b4f7cd18fdca1a5
AUX mariadb-connector-c-3.1.11-fix-flow-control-statement.patch 401 BLAKE2B b5b2a418ffd3ab03304bd9dd8914aa3673f24b9ebc4dc53e9082d3a979fa5858b1431f88c0cd51d23450fe798047a3844774bb89cb0b3c4785e0575ceadfe5e6 SHA512 f052eccae09d6aedc1ed47578a102e72984b39be8fa903421e285eba18eed5d449d1c82262c54ffcec39af044a014edf0dc1102bed1384d575557372ae974d88
AUX mariadb-connector-c-3.1.3-fix-pkconfig-file.patch 616 BLAKE2B 650c5a794da6d3d0095a823917704d52a5f16c349ce7017b93b1bebfec01287929470a89a2e4aec2f9f7cd5135368e43f2a2e89257c0d7042b878e1806ede8aa SHA512 fe621abedaf81d1fa367c52f69ccce1765757db8d9f412aa40b440d7e51d4de3785a90150e76893f7066b1ba656eb1bad020465e58adae13f08245b839bde4de
-DIST mariadb-connector-c-3.1.11-src.tar.gz 752342 BLAKE2B 5bee575bffdceb1eff60b7ba3fa334882cf2b2a12446cd6c52663cc5ce2e179bcd19c8452e9bdae3877ac7e9e08f4f6a974d136170c399439c42e1759d226c84 SHA512 2da3a5e438037dde2b9fafb07c084c742983ff4ce18f06cf7a34836aace5317cdb2ddb1bca63143367f5ae827c988d99ee20e8f598fabdb06190d9e2191eb3f4
DIST mariadb-connector-c-3.1.12-src.tar.gz 966702 BLAKE2B 8187199f43ccb6f92ea9df61a1f62e48dbef4744cda9a5e865f71038e47a65dea3ed094dd76d81d0d8d357a8d611a9770590a3504c297ea30f59f285ab511d17 SHA512 a46e8ec976c28e227a72f09c15c92126d178b422a92a4c90fd52c8053604c3309aeb3bd098dc63fbd0d87059d5360c8b63d76e61a1152e7a3e7145e13681453d
-EBUILD mariadb-connector-c-3.1.11.ebuild 2342 BLAKE2B f05cf03899e4bef23a6c4180b67cf0b13e265a34724af4dcc4d62fad1aeea2ad792f10c3d87f0e82d7a1c70988fc0ab4ec04387cf2a09bfaadef90a804209efb SHA512 03cac48f19450158b1a3a077f1b1eb07019cc54fa824b7f79d1d271627cdd921f228727e35af9d57872f6be6c36a34d875826473e9948681d9317a2505257000
+DIST mariadb-connector-c-3.1.13-src.tar.gz 968401 BLAKE2B 4b7270c5e86e0a39773f38fbf1b4334ed9fdfca65432a5858b7e591fca5d6a68fd5a0eead96a6c9bfab22f49416d9c19c8a4c5c3fc328d16702c6051116e9a01 SHA512 a179a4fa689f681d64f926c1f3abfd3912896ec3e39c15be6a330647ded207aa2f110277dc43b90faffa4386365a72babc96264e29ac436e5d212d8b7cef7c32
EBUILD mariadb-connector-c-3.1.12.ebuild 2148 BLAKE2B a6328dd0a6416691513398220dda45e3fa4a3f857c5f908f11b06095252e02e15102708181af2aef2e809045ec4fa7617e379517499b27ee3dfb98aaf0cfd98b SHA512 9762c0c60084675e61e5843c7b113ba3809d8f60c082ebc3e0c4a167683cc71cb321de8633fcbe52faf0e4ef9c05e50efb7c8ee3ca6b9b0544e06fa5c89ca890
-EBUILD mariadb-connector-c-9999.ebuild 2154 BLAKE2B af5f36e6b872a597fad0d8b2256a0307df3da04842bf6d535db8bae486d2dcbac666b911c655daaf5dd6b5ff874f37b13353b5adab0bdeedfa4c27a9f7cd11b7 SHA512 00cd17a20ed49b4df3a10a86f31d2551da967567f11bae6ded9b9be8a6b8cc85eff1dcda34aa320e51c6c7d23150e1975c1cf34bbc7900259492f7ff927c72ad
+EBUILD mariadb-connector-c-3.1.13.ebuild 2093 BLAKE2B 1a9f992b2e29f63934855ae0a69658db3238ed8c78d72137156de975efd362d6600bd00712dd639b4da920b7ed08f51a14b053d16ecb3a4b776c823045003171 SHA512 8fb3c1e9478c8aee4f1ae70439f46fcc9fc6f454cc9eef2575153496e90de3841372934b211c11b83b967f919c5888072cdc0df60e9e3e8b6e5712c014f4c670
+EBUILD mariadb-connector-c-9999.ebuild 2093 BLAKE2B 1a9f992b2e29f63934855ae0a69658db3238ed8c78d72137156de975efd362d6600bd00712dd639b4da920b7ed08f51a14b053d16ecb3a4b776c823045003171 SHA512 8fb3c1e9478c8aee4f1ae70439f46fcc9fc6f454cc9eef2575153496e90de3841372934b211c11b83b967f919c5888072cdc0df60e9e3e8b6e5712c014f4c670
MISC metadata.xml 243 BLAKE2B f247f748a23e4cda2f518ad7e4e53b9027ff08ec62289010e6dfc8cd2ad49412430c4095e80f2156c8e6f1226bcda0163b4faae83759550f79e9998928398713 SHA512 7c227a1fadd8d61aae9baabeb5d964c93fe0c4d82fb838c83fe0360cf38b24bebf51037726f13188ecd8f52c335368a693b81e74d79ba949576a6dbcb54887a9
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.11.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.13.ebuild
index 26a82a1b2447..cfae428f3b4f 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.11.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.1.13.ebuild
@@ -3,19 +3,19 @@
EAPI=7
-VCS_INHERIT=""
if [[ "${PV}" == 9999 ]] ; then
- VCS_INHERIT="git-r3"
+ inherit git-r3
EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git"
else
MY_PN=${PN#mariadb-}
MY_PV=${PV/_b/-b}
SRC_URI="https://downloads.mariadb.org/f/${MY_PN}-${PV%_beta}/${PN}-${MY_PV}-src.tar.gz?serve -> ${P}-src.tar.gz"
S="${WORKDIR%/}/${PN}-${MY_PV}-src"
- KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ppc64 ~s390 sparc x86"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
fi
-inherit cmake-utils multilib-minimal toolchain-funcs ${VCS_INHERIT}
+CMAKE_ECLASS=cmake
+inherit cmake-multilib toolchain-funcs
MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config )
@@ -48,16 +48,12 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/gentoo-layout-3.0.patch
"${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
- "${FILESDIR}"/${PN}-3.1.11-fix-flow-control-statement.patch
)
-src_configure() {
+multilib_src_configure() {
# bug 508724 mariadb cannot use ld.gold
tc-ld-disable-gold
- multilib-minimal_src_configure
-}
-multilib_src_configure() {
local mycmakeargs=(
-DWITH_EXTERNAL_ZLIB=ON
-DWITH_SSL:STRING=$(usex ssl $(usex gnutls GNUTLS OPENSSL) OFF)
@@ -71,19 +67,11 @@ multilib_src_configure() {
-DINSTALL_BINDIR=bin
-DWITH_UNIT_TESTS=$(usex test ON OFF)
)
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
-}
-
-multilib_src_install() {
- cmake-utils_src_install
+ cmake_src_configure
}
multilib_src_install_all() {
if ! use static-libs ; then
- find "${D}" -name "*.a" -delete || die
+ find "${ED}" -name "*.a" -delete || die
fi
}
diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
index c5a4f38b4f7e..cfae428f3b4f 100644
--- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
+++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild
@@ -48,7 +48,6 @@ RDEPEND="${DEPEND}"
PATCHES=(
"${FILESDIR}"/gentoo-layout-3.0.patch
"${FILESDIR}"/${PN}-3.1.3-fix-pkconfig-file.patch
- "${FILESDIR}"/${PN}-3.1.11-fix-flow-control-statement.patch
)
multilib_src_configure() {
diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest
index c99fc2161145..40c1cf1f68b3 100644
--- a/dev-db/myodbc/Manifest
+++ b/dev-db/myodbc/Manifest
@@ -4,8 +4,8 @@ AUX odbc.ini.m4 406 BLAKE2B 3a20c28b1971753a14a4aa4d30efcc7de833488501a41d940498
AUX odbcinst.ini.m4 118 BLAKE2B 6da835746e063f415ad7d640233cfd96e744cd56e12aaab4a21a2bf0bd5f1bd1e5c3d1c9a28522e3aa07c1261abac92301819d4112ac6a000a729aca9f7f7ad6 SHA512 6d929bbffd602a9f060a05998149a6b16334f8a5e3db30d02ff5d38c0065085d085042521e700b87a63766e32aa27ae92be72cef33c2a7aa8f6767b6b71c82c8
DIST mysql-connector-odbc-8.0.22-src.tar.gz 3726015 BLAKE2B 055920446767b0c9a30a0ca4773e71d662b398a9849df1a0b7975d71a21cfb23f540d8dda5430c717569f173e63673d3e51b025bb098e51202093d33e19bc142 SHA512 c613ae60346cea2e57bade89d813fd5ac21d0712d3d751e3acbc275421da6ac7593afc3da9fb6d161ee413f60e76e670f0c84876591f331925c980d969db4e8c
DIST mysql-connector-odbc-8.0.23-src.tar.gz 3726277 BLAKE2B 21b5e6f3f7e77d6107268800441675a230c79071e52db39093fade6e02031c12c96371d165af9459e9739e069e5b4196f0169dff54c0fa300e7a3023e8a82722 SHA512 2f66b5e1796176d638b1209b7d3381c2600a11cc88fa0dfb1f29b16a6c59386926674d5581d4843036d061af09312d58620484730bd7cdad36c0a0dcd45d49a9
-DIST mysql-connector-odbc-8.0.24-src.tar.gz 3736373 BLAKE2B 8d03566471343239dd49f09bc02a0852f73544e0a91532e75d7871fa2842880213df0241691ab5449597bfed9dae3a74d87d2ed43092aad6bd66bee511542863 SHA512 1e182fd017092a47e38c96006a55d2d21496b2e5b67c211f9ea5b3c3cae44035bc9d401fc90c4f4e8ef6a347dbbbf78870b5dbc3711613fc28cddea468efa6f3
+DIST mysql-connector-odbc-8.0.25-src.tar.gz 3736461 BLAKE2B 888219340ed2ea86194b2aeab04719c58f2bdfaedb4364492eab2d8cce4b7617a259ae075fada3f55f2bd475d310b5a98642a791ac1efff22a8ceda31bbdf89c SHA512 b2df4134d89600708f30866ded6d915246d36eea087a5c86c0030ba55a1a96c7ee37f023183a28e2f731851969ee802846012e4435fb86a38f7a0f09571d32ac
EBUILD myodbc-8.0.22.ebuild 3113 BLAKE2B e27fc21290dfa09309813f047e0c72bad42c2cc5ca6aa54c3698b0456b42007d3c7676c5062838be9ecb8033d8b1e12dae01a7bc213cd7ce3356bdd30dee7a86 SHA512 f34dc7a7aaa9825c42ffca24cb9ffa136a8e0abeb5de0871bb3413f7b28cc8587fb01768d60ca55434787ca818acb29d97b13b6ba3ef9e3791e38c8f7b445652
EBUILD myodbc-8.0.23.ebuild 3225 BLAKE2B c0cf4254bb89e23bd358454addbc27f2c27ebef6923766433a5a7e0b5071787d41b9eedea1dff3efc9544788f52a23383800dae0376512fa04d56d53a7363f2f SHA512 f1b2950e6f30ef9f623f53ab7634aeff21a533fb6889e8593461a88987e8bbf15a70fdaf9d3ea1608c3fb7d446e71ab366ae2ff07cd1dc7c5d266dea7044eb24
-EBUILD myodbc-8.0.24-r1.ebuild 3405 BLAKE2B c7395baa5a00a1469215ce3b7457d80e180f428843ac943d2e607f2efdba2ab821998fb2b6b67692825ca5f8bbaf4ccbf4df91336b884af5478335e402849fbc SHA512 6c8f7a07558dd81f01c636b4b3293119478e9b1c4ec8d7d72927baa42915768ab3a8f9017e2ec45e993063682bf74bd1e671052d3a79997e48e4f641be233bd4
+EBUILD myodbc-8.0.25.ebuild 3405 BLAKE2B c7395baa5a00a1469215ce3b7457d80e180f428843ac943d2e607f2efdba2ab821998fb2b6b67692825ca5f8bbaf4ccbf4df91336b884af5478335e402849fbc SHA512 6c8f7a07558dd81f01c636b4b3293119478e9b1c4ec8d7d72927baa42915768ab3a8f9017e2ec45e993063682bf74bd1e671052d3a79997e48e4f641be233bd4
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/myodbc/myodbc-8.0.24-r1.ebuild b/dev-db/myodbc/myodbc-8.0.25.ebuild
index 47d507edc552..47d507edc552 100644
--- a/dev-db/myodbc/myodbc-8.0.24-r1.ebuild
+++ b/dev-db/myodbc/myodbc-8.0.25.ebuild
diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest
index 795e49dd1a9a..60ae546372a9 100644
--- a/dev-db/mysql-connector-c++/Manifest
+++ b/dev-db/mysql-connector-c++/Manifest
@@ -3,6 +3,7 @@ AUX mysql-connector-c++-1.1.6-fix-cmake.patch 762 BLAKE2B 4cecebd2cb075c6e1af7ab
AUX mysql-connector-c++-8.0.19-fix-build.patch 9695 BLAKE2B c3334f74160a9b1148a588c7190db6f3a79fe70530d921428b7d86ec02f01324cf02c4130cd8d0cf42ecc4ccaccbecf90ffe0ac1cf8b265ea5cd9dea1046f30f SHA512 3d726b70a270e56ab38e8cebe5eb0186c4d0293dbd72844914ca9ef20674f20bc0fb4d2f0c449da77e4e6a81cc3ae454447a7983468d386e73f946dccd4a20cc
AUX mysql-connector-c++-8.0.22-fix-build.patch 10143 BLAKE2B c1bafd2ba9ad454bc02d2ebaa581ff735c1f43a557680ee3cd2378cbfc6a5673b9cec976acfc79796fcbcf292383725e1687b6042fc81e16c996d2165e9244ea SHA512 97cb6429fbf2d6df1b8a0f91e21ad9c894cd287aa9c89d2873cd3397fad33a9821d856e68108adaaab713d579b2fb9cf6f783f3b3fc5a96d32c6ba8a63bd1c23
AUX mysql-connector-c++-8.0.24-gcc11-numeric_limits.patch 348 BLAKE2B 509e869dcfffd58d92512277ff6ea148f430cca4eb9bd9a8b929641b7f876586c012aa324bdc7b475fc61dcf38bbc4edf16ab65bbe1fc0b9b15f6d19acd25743 SHA512 be18797ab0015580e21cf480938025c38c42cdf4e6aaca4c08ecb22d44932d44778c3a51488a3620915d4933b43aa75de737e2a386d449cb0b9d25ae245d5c68
+AUX mysql-connector-c++-8.0.25-fix-mysqlclient-static-binding.patch 9557 BLAKE2B eda1794a808a2bfd43a044fe05abe93d41ddf98b917e4ff22dce7d795fe62c4d53f102bbcecf5b0c2ccdcf92f49ff100f6586c1c2131ba492b0a7095f202967b SHA512 963cb123e813e8eb305210f4804b5c67bfe2ebf670c85bddfbff8d3df7b60825cecf004d2e9b45ec38abe9af9f118c88b1d121d3290cae49557208ccb309da48
DIST mysql-connector-c++-1.1.12.tar.gz 518615 BLAKE2B 386a4753ca3f03999a49a89507da1b1172b3db89797c38403fee4eea86e7108a5e4f91f24a17de86d585c2a3d9e5742a117fa84d9b14aad649f938a597f3dae9 SHA512 d7e132dbc2efda4a77f8ae00c24006a1ade1d0a50f22d89ece453505e6d206427ee7988df29c0d6ef8b396ad6b8d326b6d263a1d4fa08ef5db0966fb4f1479f4
DIST mysql-connector-c++-8.0.19-src.tar.gz 3137484 BLAKE2B 82a2900b0daa00bcfd72d562818ada25fe15901991a896a46ecdd9304e03066c4e7a3804287540559df1c74dbd1b3983b450ab783ee8cb7f0d7ec152f3cdc6b0 SHA512 5987ae31cda3a5db18ceded201ccbe66263b8ab7665ceacf70af6bb6b99130377b40514b96644b0768fd809b36ee02580520923c11c1edecccc75da15d7bb0bd
DIST mysql-connector-c++-8.0.20-src.tar.gz 3774428 BLAKE2B a06114432ab21c36fd0b3b91df2382198b2a48871e8e0bfd8c7a94729ed0e29f33599c078c97670fe9d744b13042db52fb89de2294c75eae670a77112d11d251 SHA512 3edb7c3d4ccf218a3f76afcf83a6d233b7accd236c05105ab3f7a6610cfd8809a78c78142c82fb60fb0931d2ae0f0f8fdc3ce9caf5f0cde7ef54067a7e20270b
@@ -10,11 +11,13 @@ DIST mysql-connector-c++-8.0.21-src.tar.gz 3788740 BLAKE2B 1862b4f2c6e2a2bbe8e30
DIST mysql-connector-c++-8.0.22-src.tar.gz 3795112 BLAKE2B c5d6f0ebeb4649857f3217a35f3ae885d62be63af4da09815e7eb156538ece4f805578db24bfff3dd44a0e320c025a9936d7edacba69a2786d84dd932c5abb8a SHA512 1975b43fa3f3806cccc685a695f84783164c5b17da10ac14a6013d27c837cc9c63fff01b1ed4b31f22dae60afa68d34ec56ca9c45ca3dac23635e8f0fa845aa4
DIST mysql-connector-c++-8.0.23-src.tar.gz 3798295 BLAKE2B 923eebbd7f9cde0252c84de4c70863b40c0dd93ad98a93e2ec14c935b2f3f0b0f251828a8bbbd0f23a5ec03491db06020294e19455901d15181c84fec9fb3d7f SHA512 f8eb8842e199d7373f4b55644720ac63b93eb33be19294c433f57aaf556ce1b5752223154194469fa28af52adebe930f0a7b4e8f62df92cc810b545aa7bab928
DIST mysql-connector-c++-8.0.24-src.tar.gz 3797356 BLAKE2B e509e04f6c93893948c573401188567bcbda91db0e608d53b1795593abf043117e1a525d3abe5c8396068a2ef750582cde15b64412e556e89762d08032abb602 SHA512 5507bc562e8263ee17efb9d4e2f52e471da75e73a1fc4dd1bc0a2ac1c2a593be889c4b042037cf6d3cbff854ae5cc865a8800251da475aed0f31710229af26f1
+DIST mysql-connector-c++-8.0.25-src.tar.gz 3800065 BLAKE2B 67546b2d7d9de25ccb440c22bd58ee83e6fae78710e6dfa802cb0446bf5be433c56458424f0ee81c9a899bbfd5f464712d2d0b43dceb4205b492c7b1a79f7858 SHA512 44dd7f4296d666801be55642e53cb5181d9b5c3b080306975a48eb6280e555d9b924b42b14b44dffee4c54fab3f662a7b6bb6584d9a1ed710f0026788611c525
EBUILD mysql-connector-c++-1.1.12-r1.ebuild 1576 BLAKE2B e1835aadf499196ba42dcff6a1671bc32a4224133d68630bea249fb22ef35db6275f448bb1c891e0dcd9934fd66b3a7ebbe9935573f7f85a1d00e2613bab98fb SHA512 983abc70a156b0b0c39bd693c6ac62a149897f3b5bfddd54bc52463a5fa84397692134a16045d640db3d4797d3264803c0563a282495c21f54d4b48390223d39
EBUILD mysql-connector-c++-8.0.19.ebuild 953 BLAKE2B b5a6d20cf1e7ac2bed882ca26d0ab5c3f83c12c506f61cac9554e0add2b83cae697994f23d289169441bdbecee862da0f4530f40e704f9ff45cda1f84e0fcd9c SHA512 076a5385ed228b5b559f2fe4a4d94498c6ded0389a302d049d6732ccd7b4a78b3e46a7ddfe9689aa624eb09560b8e4ff96414af752d14405c5fb0993e4440da1
EBUILD mysql-connector-c++-8.0.20.ebuild 957 BLAKE2B cf3c430cbd0454d785eccc3c573d739ed9bd3ed0a6e3047d362ddd738e8abb13f4dcdf9e150ed6130c96a367e34ed260bad22b4b3a301441b69f0ac9c6254e63 SHA512 19bff24bc2d0f5336f705f651f7d9ca834491858d7bee94f7cdd5cde0da12ba1025647d3070f6da55b8442094370a13f1db5b3adb1c92a2a0925c7a931e1a9d8
EBUILD mysql-connector-c++-8.0.21.ebuild 941 BLAKE2B 47888d50b869e6f62452ca2146ad24ced6fbcda19ef3b6ee2b318e48c88bcb0aa5f1d996ad51ae563360b654ac884f794ea9ab75d83c35dce27c6154dbb2b4d0 SHA512 e8c4cf0a041e985c62d059c7b807e83f4800b57e6b15f650f844971f2f0ffb6bab04d2c3872079d61e86bbb8675c1b6209f09ecab9ce0b229676958ced9a666b
EBUILD mysql-connector-c++-8.0.22.ebuild 942 BLAKE2B 479d3ce48c9bdecb155bb28c2b054124e716d9a8c4a90e496f4166e31fa7dfa072a0dd4a29cc4a2c67c1e82c9fa6afca900db82ecbcae12378fd73c8ab161e9e SHA512 4b1924e9e2bfcd08db957785c534cb7acfe440cc33c82ea845b74e4d848acc80b1489af5a8358e5102c8621b0169ed79cf9455389ec7133025b69bbf0532ae71
EBUILD mysql-connector-c++-8.0.23.ebuild 943 BLAKE2B 91199b0deb991b1275377ee17c7ba55241265701c260443c845c6c47432c7cf34ba55b3227b65e234550dac37e08aa359fd5d2cd043951a804b8fdb2a9b4b9a6 SHA512 3fb54ed0135bf6727e5bb7f161947de858abce3589f3ca2c80fa402aed790b4e91e28af248a4e6a33cf78b7da684edc2ff1db6554b5c5ba7027eddeb009f87e8
-EBUILD mysql-connector-c++-8.0.24.ebuild 998 BLAKE2B d5d629e35f034161d962c4112305c3468768d360c89383d306525066e9e6b66842ddb491c7b745c843755ce45b3178e8e74facf5963e16e3a77b22f2cb59fe99 SHA512 1967cd36dba0054324623906a1d7653b2a0d216c669f5812e81e7c3425924f95044967b863f1481f76bb28e217cf83727955388a23c4c8c4e05c8d02d028662d
+EBUILD mysql-connector-c++-8.0.24.ebuild 997 BLAKE2B 184b385509ec362bc962357f9c54dc554d6c1d66500154b6c8243ce2b8d2a01bfeb68d0e1c01c0e8dd98f16ef718b587b407e44a68010ae7bcb6f7583b32285d SHA512 df28ab886f014f30a44898b72f8a12e41bae8bc7109952712d7b44fd451de4b32babc0c5aaaf8142d7f90aa8b07a4f80ffe3d0cf34694be003c6234705acf6cc
+EBUILD mysql-connector-c++-8.0.25.ebuild 1065 BLAKE2B 3ce7ce4ffa616f38f6617e5de99e042281243a938c2a1b21697d386b48adf5a45cb27ee0584d43b2ab781390e614091666b1eeec759f12e22e3214cc9d77736f SHA512 3f2ac9a1dcd5837e95064e4673d6048a09f090a4a04c6eb3b2a8b59d4187f06ed11898f3d3fb9bc4e3946d5cbd78502d859c490d9c2fe4570edc35ae43b470e9
MISC metadata.xml 378 BLAKE2B 43fdbbc8d3b6ef99e51da96ddfefbdeaa70ef5fcb2fc6067305f75f75b7ee2fd21b79ca76704d8752bf59ae057b28efb187b063770964246f93fea629b58b467 SHA512 c6e545fb60d306792421ea26a937aaa6aea53d2a4100c9cafe78cf695c9dd0620cf3e770d43ff42749ae42bbe3a35212407ea84edee9af2dcb0255c2b763ddfc
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.25-fix-mysqlclient-static-binding.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.25-fix-mysqlclient-static-binding.patch
new file mode 100644
index 000000000000..f211f113f04a
--- /dev/null
+++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.25-fix-mysqlclient-static-binding.patch
@@ -0,0 +1,274 @@
+From 774d7bd983a2e12e78a0231c7936a9481bb3df1d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lu=C3=ADs=20Silva?= <luis.m.silva@oracle.com>
+Date: Thu, 13 May 2021 23:14:57 +0100
+Subject: [PATCH] Bug #32882344: FIX MYSQLCLIENT_STATIC_BINDING=0 BUILD
+
+---
+ driver/nativeapi/libmysql_dynamic_proxy.cpp | 13 ++
+ driver/nativeapi/libmysql_dynamic_proxy.h | 132 ++++++++++----------
+ driver/nativeapi/mysql_client_api.h | 2 +
+ 3 files changed, 83 insertions(+), 64 deletions(-)
+
+diff --git a/driver/nativeapi/libmysql_dynamic_proxy.cpp b/driver/nativeapi/libmysql_dynamic_proxy.cpp
+index 4c70074e..9bd4bd99 100644
+--- a/jdbc/driver/nativeapi/libmysql_dynamic_proxy.cpp
++++ b/jdbc/driver/nativeapi/libmysql_dynamic_proxy.cpp
+@@ -512,6 +512,19 @@ LibmysqlDynamicProxy::real_connect_dns_srv(MYSQL * mysql,
+ /* }}} */
+
+
++/* {{{ LibmysqlDynamicProxy::bind_param() */
++bool
++LibmysqlDynamicProxy::bind_param(MYSQL *mysql, unsigned n_params,
++ MYSQL_BIND *binds, const char **names)
++{
++ ptr2mysql_bind_param ptr2_bind_param=
++ symbol_safe_cast<ptr2mysql_bind_param>(GetProcAddr("mysql_bind_param"));
++
++ return (*ptr2_bind_param)(mysql, n_params, binds, names);
++}
++/* }}} */
++
++
+ /* {{{ LibmysqlDynamicProxy::real_escape_string() */
+ unsigned long
+ LibmysqlDynamicProxy::real_escape_string(MYSQL * mysql, char * to, const char * from, unsigned long length)
+diff --git a/driver/nativeapi/libmysql_dynamic_proxy.h b/driver/nativeapi/libmysql_dynamic_proxy.h
+index 93dc9700..e0f00c95 100644
+--- a/jdbc/driver/nativeapi/libmysql_dynamic_proxy.h
++++ b/jdbc/driver/nativeapi/libmysql_dynamic_proxy.h
+@@ -65,67 +65,67 @@ public:
+
+ // MySQL C-API calls wrappers
+
+- my_ulonglong affected_rows(MYSQL *);
++ my_ulonglong affected_rows(MYSQL *) override;
+
+- my_bool autocommit(MYSQL * , my_bool);
++ my_bool autocommit(MYSQL * , my_bool) override;
+
+- void close (MYSQL *mysql);
++ void close (MYSQL *mysql) override;
+
+- my_bool commit(MYSQL *mysql);
++ my_bool commit(MYSQL *mysql) override;
+
+- void data_seek(MYSQL_RES *, my_ulonglong);
++ void data_seek(MYSQL_RES *, my_ulonglong) override;
+
+- void debug(const char *);
++ void debug(const char *) override;
+
+- unsigned int mysql_errno(MYSQL *);
++ unsigned int mysql_errno(MYSQL *) override;
+
+- const char * error(MYSQL *);
++ const char * error(MYSQL *) override;
+
+- MYSQL_FIELD * fetch_field(MYSQL_RES *);
++ MYSQL_FIELD * fetch_field(MYSQL_RES *) override;
+
+- MYSQL_FIELD * fetch_field_direct(MYSQL_RES *, unsigned int);
++ MYSQL_FIELD * fetch_field_direct(MYSQL_RES *, unsigned int) override;
+
+- unsigned long * fetch_lengths(MYSQL_RES *);
++ unsigned long * fetch_lengths(MYSQL_RES *) override;
+
+- MYSQL_ROW fetch_row(MYSQL_RES *);
++ MYSQL_ROW fetch_row(MYSQL_RES *) override;
+
+- unsigned int field_count(MYSQL *);
++ unsigned int field_count(MYSQL *) override;
+
+- void free_result(MYSQL_RES *);
++ void free_result(MYSQL_RES *) override;
+
+- unsigned long get_client_version();
++ unsigned long get_client_version() override;
+
+- const char * get_server_info(MYSQL *);
++ const char * get_server_info(MYSQL *) override;
+
+- unsigned long get_server_version(MYSQL *);
++ unsigned long get_server_version(MYSQL *) override;
+
+- void get_character_set_info(MYSQL *, void *);
++ void get_character_set_info(MYSQL *, void *) override;
+
+- const char * info(MYSQL *);
++ const char * info(MYSQL *) override;
+
+- MYSQL * init(MYSQL *mysql);
++ MYSQL * init(MYSQL *mysql) override;
+
+- int library_init(int, char **, char **);
++ int library_init(int, char **, char **) override;
+
+- void library_end();
++ void library_end() override;
+
+- my_bool more_results(MYSQL *);
++ my_bool more_results(MYSQL *) override;
+
+- int next_result(MYSQL *);
++ int next_result(MYSQL *) override;
+
+- unsigned int num_fields(MYSQL_RES *);
++ unsigned int num_fields(MYSQL_RES *) override;
+
+- my_ulonglong num_rows(MYSQL_RES *);
++ my_ulonglong num_rows(MYSQL_RES *) override;
+
+- int options (MYSQL *, enum mysql_option, const void *);
++ int options (MYSQL *, enum mysql_option, const void *) override;
+
+- int options (MYSQL *, enum mysql_option, const void *, const void *);
++ int options (MYSQL *, enum mysql_option, const void *, const void *) override;
+
+- int get_option (MYSQL *, enum mysql_option, const void *);
++ int get_option (MYSQL *, enum mysql_option, const void *) override;
+
+- int ping(MYSQL *);
++ int ping(MYSQL *) override;
+
+- int query(MYSQL *, const char *);
++ int query(MYSQL *, const char *) override;
+
+ MYSQL * real_connect(MYSQL * mysql, const char * host,
+ const char * user,
+@@ -133,82 +133,86 @@ public:
+ const char * db,
+ unsigned int port,
+ const char * unix_socket,
+- unsigned long client_flag);
++ unsigned long client_flag) override;
+
+ MYSQL * real_connect_dns_srv(MYSQL * mysql,
+ const char * host,
+ const char * user,
+ const char * passwd,
+ const char * db,
+- unsigned long client_flag);
++ unsigned long client_flag) override;
+
+- unsigned long real_escape_string(MYSQL * mysql, char * to, const char * from, unsigned long length);
++ bool bind_param(MYSQL *mysql, unsigned n_params,
++ MYSQL_BIND *binds, const char **names) override;
+
+- int real_query(MYSQL *, const char *, unsigned long);
+
+- my_bool rollback(MYSQL *);
++ unsigned long real_escape_string(MYSQL * mysql, char * to, const char * from, unsigned long length) override;
+
+- const char * sqlstate(MYSQL *);
++ int real_query(MYSQL *, const char *, unsigned long) override;
++
++ my_bool rollback(MYSQL *) override;
++
++ const char * sqlstate(MYSQL *) override;
+
+ my_bool ssl_set(MYSQL * mysql,
+ const char * key,
+ const char * cert,
+ const char * ca,
+ const char * capath,
+- const char * cipher);
++ const char * cipher) override;
+
+- MYSQL_RES * store_result(MYSQL *);
++ MYSQL_RES * store_result(MYSQL *) override;
+
+- MYSQL_RES * use_result(MYSQL *);
++ MYSQL_RES * use_result(MYSQL *) override;
+
+- unsigned int warning_count(MYSQL *);
++ unsigned int warning_count(MYSQL *) override;
+
+ /* Prepared Statement stmt_* functions */
+- my_ulonglong stmt_affected_rows (MYSQL_STMT *);
++ my_ulonglong stmt_affected_rows (MYSQL_STMT *) override;
+
+- my_bool stmt_attr_set(MYSQL_STMT *, enum enum_stmt_attr_type, const void *);
++ my_bool stmt_attr_set(MYSQL_STMT *, enum enum_stmt_attr_type, const void *) override;
+
+- my_bool stmt_bind_param(MYSQL_STMT *, MYSQL_BIND *);
++ my_bool stmt_bind_param(MYSQL_STMT *, MYSQL_BIND *) override;
+
+- my_bool stmt_bind_result(MYSQL_STMT *, MYSQL_BIND *);
++ my_bool stmt_bind_result(MYSQL_STMT *, MYSQL_BIND *) override;
+
+- my_bool stmt_close(MYSQL_STMT *);
++ my_bool stmt_close(MYSQL_STMT *) override;
+
+- void stmt_data_seek(MYSQL_STMT *, my_ulonglong);
++ void stmt_data_seek(MYSQL_STMT *, my_ulonglong) override;
+
+- unsigned int stmt_errno(MYSQL_STMT *);
++ unsigned int stmt_errno(MYSQL_STMT *) override;
+
+- const char * stmt_error(MYSQL_STMT *);
++ const char * stmt_error(MYSQL_STMT *) override;
+
+- int stmt_execute(MYSQL_STMT *);
++ int stmt_execute(MYSQL_STMT *) override;
+
+- int stmt_fetch(MYSQL_STMT *);
++ int stmt_fetch(MYSQL_STMT *) override;
+
+- unsigned int stmt_field_count(MYSQL_STMT *);
++ unsigned int stmt_field_count(MYSQL_STMT *) override;
+
+- MYSQL_STMT * stmt_init(MYSQL *);
++ MYSQL_STMT * stmt_init(MYSQL *) override;
+
+- my_ulonglong stmt_num_rows(MYSQL_STMT *);
++ my_ulonglong stmt_num_rows(MYSQL_STMT *) override;
+
+- unsigned long stmt_param_count(MYSQL_STMT *);
++ unsigned long stmt_param_count(MYSQL_STMT *) override;
+
+- int stmt_prepare(MYSQL_STMT *, const char *, unsigned long);
++ int stmt_prepare(MYSQL_STMT *, const char *, unsigned long) override;
+
+- MYSQL_RES * stmt_result_metadata(MYSQL_STMT *);
++ MYSQL_RES * stmt_result_metadata(MYSQL_STMT *) override;
+
+- my_bool stmt_send_long_data (MYSQL_STMT * , unsigned int, const char *, unsigned long);
++ my_bool stmt_send_long_data (MYSQL_STMT * , unsigned int, const char *, unsigned long) override;
+
+- const char * stmt_sqlstate(MYSQL_STMT *);
++ const char * stmt_sqlstate(MYSQL_STMT *) override;
+
+- int stmt_store_result(MYSQL_STMT *);
++ int stmt_store_result(MYSQL_STMT *) override;
+
+- int stmt_next_result(MYSQL_STMT *);
++ int stmt_next_result(MYSQL_STMT *) override;
+
+- bool stmt_free_result(MYSQL_STMT *);
++ bool stmt_free_result(MYSQL_STMT *) override;
+
+- void thread_init();
++ void thread_init() override;
+
+- void thread_end();
++ void thread_end() override;
+ };
+
+ } /* namespace NativeAPI */
+diff --git a/driver/nativeapi/mysql_client_api.h b/driver/nativeapi/mysql_client_api.h
+index b738cf9a..fa044c93 100644
+--- a/jdbc/driver/nativeapi/mysql_client_api.h
++++ b/jdbc/driver/nativeapi/mysql_client_api.h
+@@ -111,6 +111,8 @@ typedef MYSQL * (STDCALL *ptr2mysql_real_connect)(MYSQL *, const char *, const c
+
+ typedef MYSQL * (STDCALL *ptr2mysql_real_connect_dns_srv)(MYSQL *, const char *, const char *, const char * , const char *, unsigned long);
+
++typedef bool (STDCALL *ptr2mysql_bind_param)(MYSQL *mysql, unsigned n_params, MYSQL_BIND *binds, const char **names);
++
+ typedef unsigned long (STDCALL *ptr2mysql_real_escape_string)(MYSQL * mysql, char *, const char *, unsigned long);
+
+ typedef int (STDCALL *ptr2mysql_real_query)(MYSQL *, const char *, unsigned long);
+--
+2.30.2
+
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.24.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.24.ebuild
index 04d6b4c67116..9aae59fbcac4 100644
--- a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.24.ebuild
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.24.ebuild
@@ -13,7 +13,7 @@ SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
LICENSE="Artistic GPL-2"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc x86"
+KEYWORDS="amd64 arm ~arm64 ~ppc ~ppc64 ~sparc x86"
IUSE="+legacy"
RDEPEND="
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.25.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.25.ebuild
new file mode 100644
index 000000000000..1d5c5bd6f516
--- /dev/null
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.25.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+inherit cmake
+
+DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)"
+HOMEPAGE="https://dev.mysql.com/downloads/connector/cpp/"
+URI_DIR="Connector-C++"
+SRC_URI="https://dev.mysql.com/get/Downloads/${URI_DIR}/${P}-src.tar.gz"
+
+LICENSE="Artistic GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="+legacy"
+
+RDEPEND="
+ dev-libs/protobuf:=
+ legacy? (
+ dev-libs/boost:=
+ >=dev-db/mysql-connector-c-6.1.8:=
+ )
+ dev-libs/openssl:0=
+ "
+DEPEND="${RDEPEND}"
+S="${WORKDIR}/${P}-src"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-8.0.22-fix-build.patch
+ "${FILESDIR}"/${PN}-8.0.24-gcc11-numeric_limits.patch
+ "${FILESDIR}"/${PN}-8.0.25-fix-mysqlclient-static-binding.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DWITH_SSL=system
+ -DWITH_JDBC=$(usex legacy ON OFF)
+ $(usex legacy '-DMYSQLCLIENT_STATIC_BINDING=0' '')
+ $(usex legacy '-DMYSQLCLIENT_STATIC_LINKING=0' '')
+ )
+
+ cmake_src_configure
+}
diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest
index 4c116ff42a62..8d5cd4b46fb8 100644
--- a/dev-db/mysql-connector-c/Manifest
+++ b/dev-db/mysql-connector-c/Manifest
@@ -2,8 +2,8 @@ AUX mysql-connector-c-8.0.19-do-not-install-comp_err.patch 307 BLAKE2B 864c07e9d
AUX mysql-connector-c-8.0.22-always-build-decompress-utilities.patch 534 BLAKE2B 15bef04f750b5f373d8c5f39690e90be482bfea66430234befc777e9d84d0060d20e1290798ddacbf0e9f0f8db45ba0318d88b61aec3fd1e859285cefff446ef SHA512 7ae81f4fe020c12e45eba041dcca921fa93f42a12d8c8d840b1bec819c00de8b780a792e99cdc3cae55eef74c911de3087b6583d6213913b36428b96f0e1c3af
DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
-DIST mysql-boost-8.0.24.tar.gz 290263082 BLAKE2B a29f42b63c68b13fbe7433c7734e1269a1961c10cdd78cc1b9459a32fd833b5efc49e4ad70c3099d265f6e3b69596754e3947568d13104c52ba0d97fa1f1ddc3 SHA512 ad8510614251c056f0963f8e51b9ed5e75452ccbf2728254d662fcc3a7ee1bdc177d1d34e958ddc31c7e6b5b3af9377ef2d9cbdc0353676b3026619673447deb
+DIST mysql-boost-8.0.25.tar.gz 290265324 BLAKE2B 5393a2a2525a886d9ece19777deae01e6c0b24b9ff5a0a5ffb9075740ed912d0df59a165b6ec9ceb60c7c28f3062cda5cceb4da3a8280f42549984c846f1ce5c SHA512 af653ccff66a9d87221b46ad4f7bcc629700549f758998b9a7fb22e4573b9495a28624e031f016f9ad8fe0dfcf481b82f1ffe224aa48c2d45531570026b26081
EBUILD mysql-connector-c-8.0.22.ebuild 2782 BLAKE2B a03af99dd8eb16b78a7b891b9eb6c79a893edef92410b614722f2857ee21d1b519f93f74842d89b56ef50d628abd4873c00b59b4fcc06f1606319c078c2b89f6 SHA512 7dbf5e4d22d5d000e702809b2356bbe842da16b1bb61aa7d8fc3fd62f56449f5d893f377cb9a4b5b4b7019679a05f20aa67fd570caa4d9ccf27dccdc9c549df4
EBUILD mysql-connector-c-8.0.23-r1.ebuild 2986 BLAKE2B a7f75b2115e7e4f8caf06ba5a81d6227214178d9b70c12007f13615ea55d75c1918b6d38e9e47f5caa4dde3539df10c8a21a9fedf9b325cc82ed2a875a346467 SHA512 b916eaa8cf6a4d3b39e65ae531324b9c13fcc4a65fd69ebe6d9b476f220ffefa542d6e5c7f835a83d283b751119f84c81fef234a6b2d164e4cd91dffecef13c3
-EBUILD mysql-connector-c-8.0.24.ebuild 2989 BLAKE2B dd477388ac1abc078e65a9342456d1e84753ea7a8e02b3b93d610a90da3eacd630b6f43075cbdd1cd51781ef3c202bc0f1f4eea83064a629912ed571a73f31c8 SHA512 26808c1e0051cf7e3c92a74e61ca32c99b71a136fc407b7b058457c141807b7c08fe3b23f6b9b8035006d9bdf011dfc2041040ea14e3348b8c1318a5391165bc
+EBUILD mysql-connector-c-8.0.25.ebuild 3069 BLAKE2B 4ad28d6690ef4c9c58b9f9d62467781134763d80a6f8a5dd6380c474f57db3bdc41d80998e00209c5833aa6060a25eb07f7eb129a14e9d91cd85d11dbb5e576f SHA512 fdef8a53951c6ddd1b5d31861161122dc11c83d536bff251012ea39071cf19b0ce8220400cd11616f106bd6f464b7a5984e670dac62d5723a697ab9539da5646
MISC metadata.xml 239 BLAKE2B c4d6706d083b72927d239f41a644a4009c054c1c1a388af7733d3a2daf47d354009eb472573304a6be272601f05535297bcd9ceaea811a741cd905577ffe53d1 SHA512 e6e2fafe2f503db1d12e3d2368a99631ee8d014b7ea802d9879e7e3e2c0f9378675fffccd78ed09b914ae781ac3902567b1a53a721906e3ea63ceb51d0a1654b
diff --git a/dev-db/mysql-connector-c/mysql-connector-c-8.0.24.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25.ebuild
index 337984117ad6..aab795e4a263 100644
--- a/dev-db/mysql-connector-c/mysql-connector-c-8.0.24.ebuild
+++ b/dev-db/mysql-connector-c/mysql-connector-c-8.0.25.ebuild
@@ -4,7 +4,7 @@
EAPI=7
CMAKE_ECLASS=cmake
-inherit cmake-multilib
+inherit cmake-multilib flag-o-matic
# wrap the config script
MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config )
@@ -18,7 +18,7 @@ if [[ ${PV} == "9999" ]]; then
inherit git-r3
else
SRC_URI="https://dev.mysql.com/get/Downloads/MySQL-$(ver_cut 1-2)/mysql-boost-${PV}.tar.gz"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+ KEYWORDS="~alpha ~amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
S="${WORKDIR}/mysql-${PV}"
fi
@@ -84,6 +84,9 @@ src_prepare() {
multilib_src_configure() {
CMAKE_BUILD_TYPE="RelWithDebInfo"
+ # code is not C++17 ready, bug #786402
+ append-cxxflags -std=c++14
+
local mycmakeargs=(
-DCMAKE_C_FLAGS_RELWITHDEBINFO=-DNDEBUG
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-DNDEBUG
diff --git a/dev-db/mysql-workbench/Manifest b/dev-db/mysql-workbench/Manifest
index 831774ebc900..b1be51ed7298 100644
--- a/dev-db/mysql-workbench/Manifest
+++ b/dev-db/mysql-workbench/Manifest
@@ -6,6 +6,8 @@ DIST antlr-4.7.1-complete.jar 2240116 BLAKE2B 3acf99b3701b2092cad2fb6e91f27791cb
DIST antlr-4.9.1-complete.jar 2100605 BLAKE2B 6fcdc184900cd30e42b3e1b6f56bcccbf1d3c975edc8475b92b9c0779568148f711e9bcbb77859d8fbff2d31f362a9b562847b9b9ece03c8c4b7792341fab57e SHA512 a01815324c15fbff9cb917fa2cdef85aabf34c77730913026257e92c195d11f059c73a1579ffa74616b76b5aba34fd6074b19e1de8f2f3bec1c55cd950f4947b
DIST mysql-workbench-community-8.0.23-src.tar.gz 20719770 BLAKE2B 4e1e44428a9e8a00c23f8f9f6e1519f8d13c205fac110168da67fb462d2a13204d41f1d0e109a3dde8ad2dbd3de31fee09ae4ccea97f9de04d0bc4fb2fad180e SHA512 f50d71bd196d5e5446cd14a228e52c4e74506cc2dd95d1601cc5e99b00db0d82dbcb28fd2ed404ee77ca63c6854d47c46773938e09ab601c10009c0ca99e4d54
DIST mysql-workbench-community-8.0.24-src.tar.gz 19105744 BLAKE2B bc38f18344ba606d29317e5706b6dcd71a29785a3d94d717c21a591c488182595026bb15e1785e57bd56d74b4eb85c87beb5d386dc050ffe2cb2bd4bb7e665bd SHA512 61dd41cd410cde5da4e43e0fcd9e25fdf4b67b831bb40d8facc9450e9bc9446844f397748875a21a839d2612c64d8f8f05eaae21e9a73e419bfa9e14a8fb19e8
+DIST mysql-workbench-community-8.0.25-src.tar.gz 19107324 BLAKE2B aff77a7c216f470d78d3b9f33cc51c70a7b1210c40634c1af75e954ab092efd4d0865afb7869ff52f82434243ed0e2a4ddd48cf55902c9533a32ed2cc183bb33 SHA512 b75e82756a91b9f96d8c0eeece1ef8e8f3a7a1dbe8911d2045b9347fb912215ee0a7dd3ef6d827b78fe748aa9e5ecfaa858d2d3dc08233726c706712f3eac3f1
EBUILD mysql-workbench-8.0.23.ebuild 2787 BLAKE2B fbc8bafa406b87b30467b11e61cebf5caf381f90ae2acf1c3afaf4e15c97d51698ca85be0fa8c370c37731026b7732587e255f3fcfa51b9e9949bee6efe5268a SHA512 2fe267d734478e7aad69d0f4f26c03779d806fb88772a6f330358db285196e1b8ea1063f1d8d6fd68981bc9cb8de8a50e7794813e37d181aae609eae2e4da3e7
EBUILD mysql-workbench-8.0.24.ebuild 2825 BLAKE2B 09909039fd5f73bb2f618a8a68a5f152e339f6021afda8b5dd3aa704f2549f1df7964432c6cec3ebfd77cae06a6575cb9bbe38221e3e15d846da3f39e533ceb4 SHA512 97ef69840ec882282f09851681c945a5c83511e6338f50abb73263ad5a7be5156c07f898209f88c2e554632443ede1f3843123c0fd5213ccf671928ad005a881
+EBUILD mysql-workbench-8.0.25.ebuild 2781 BLAKE2B 3ae8f4b6d1952ae6d7a010579de9cbb5b2bfbcd2b26c9574da9b844cf13f4ae15532b613c983edb4276351de2feb48a93e285abd892a95d39073a99887c76cd5 SHA512 eb9b0919d71de74cddfd11d93ac6d81792c9752b40a8b106864bf9d5e669aab935a27b5b6c6508e75f39b9147b452a0e2583c97e212c232ef96581410273747e
MISC metadata.xml 310 BLAKE2B b0d985e39bb17865a05907e5449723c2bf862d9f3ae7f8570173c9cff443171feef6694db26a51880f8c1a4b1e3834ca7ab9bc7c2057fd6f8930b9d1c1c02cdd SHA512 f284063d72f2218f8ed60a74b43f252d608865682b8c0447f52016a02a7cbf6d45a226787d893328dd31946ade1cca78ff7556896183b4422c4142a8935a2193
diff --git a/dev-db/mysql-workbench/mysql-workbench-8.0.25.ebuild b/dev-db/mysql-workbench/mysql-workbench-8.0.25.ebuild
new file mode 100644
index 000000000000..a565f9ac9900
--- /dev/null
+++ b/dev-db/mysql-workbench/mysql-workbench-8.0.25.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+GCONF_DEBUG="no"
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+PYTHON_REQ_USE="sqlite"
+
+ANTLR_VERSION=4.9.1
+
+inherit gnome2 flag-o-matic python-single-r1 cmake
+
+MY_P="${PN}-community-${PV}-src"
+
+DESCRIPTION="MySQL Workbench"
+HOMEPAGE="https://www.mysql.com/products/workbench/"
+SRC_URI="https://cdn.mysql.com/Downloads/MySQLGUITools/${MY_P}.tar.gz
+ https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="debug doc"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+# glibc: deprecated mutex functions, removed in 2.36.0
+CDEPEND="${PYTHON_DEPS}
+ app-crypt/libsecret
+ dev-libs/glib:2
+ dev-cpp/antlr-cpp:4
+ dev-cpp/atkmm:*
+ dev-cpp/pangomm:1.4
+ >=dev-cpp/glibmm-2.14:2
+ dev-cpp/gtkmm:3.0
+ dev-libs/atk
+ >=net-libs/libssh-0.8.5[server]
+ x11-libs/pango
+ x11-libs/gtk+:3
+ gnome-base/libglade:2.0
+ >=x11-libs/cairo-1.5.12[glib,svg]
+ >=dev-libs/rapidjson-1.1.0
+ dev-libs/libsigc++:2
+ >=dev-libs/boost-1.55.0[nls]
+ >=dev-cpp/ctemplate-0.95
+ >=dev-libs/libxml2-2.6.2:2
+ dev-libs/libzip
+ dev-libs/libpcre[cxx]
+ >=sci-libs/gdal-1.11.1-r1
+ virtual/opengl
+ || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid )
+ dev-libs/tinyxml[stl]
+ >=dev-db/mysql-connector-c++-1.1.8 =dev-db/mysql-connector-c++-1*
+ dev-db/vsqlite++
+ || ( dev-db/libiodbc dev-db/unixODBC )
+ dev-python/pexpect
+ >=dev-python/paramiko-1.7.4
+"
+
+RDEPEND="${CDEPEND}
+ app-admin/sudo
+ >=sys-apps/net-tools-1.60_p20120127084908"
+
+DEPEND="${CDEPEND}
+ dev-lang/swig
+ virtual/jre
+ virtual/pkgconfig"
+
+S="${WORKDIR}"/"${MY_P}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-6.2.5-wbcopytables.patch"
+ "${FILESDIR}/${PN}-8.0.19-mysql-connector-8.patch"
+)
+
+src_unpack() {
+ unpack ${PN}-community-${PV}-src.tar.gz
+}
+
+src_prepare() {
+ ## remove hardcoded CXXFLAGS
+ sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die
+ ## And avoid -Werror
+ sed -i -e 's/-Werror//' CMakeLists.txt || die
+ ## Fix doc install directory
+ sed -i -e "/WB_INSTALL_DOC_DIR/ s/mysql-workbench/${P}/ ; /WB_INSTALL_DOC_DIR/ s/-community//" CMakeLists.txt || die
+
+ ## package is very fragile...
+ strip-flags
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ if has_version dev-db/libiodbc ; then
+ IODBC="-DIODBC_CONFIG_PATH=/usr/bin/iodbc-config"
+ fi
+
+ append-cxxflags -std=c++11
+ ANTLR_JAR_PATH="${DISTDIR}/antlr-${ANTLR_VERSION}-complete.jar"
+ local mycmakeargs=(
+ -DWITH_ANTLR_JAR=${ANTLR_JAR_PATH}
+ -DLIB_INSTALL_DIR="/usr/$(get_libdir)"
+ -DIODBC_INCLUDE_PATH="/usr/include/iodbc"
+ ${IODBC}
+ -DPYTHON_INCLUDE_DIR="$(python_get_includedir)"
+ -DPYTHON_LIBRARY="$(python_get_library_path)"
+ -DMySQL_CONFIG_PATH="/usr/bin/mysql_config"
+ )
+ cmake_src_configure
+}
diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest
index da9132b1f7c8..5f3134a4a942 100644
--- a/dev-db/mysql/Manifest
+++ b/dev-db/mysql/Manifest
@@ -12,7 +12,7 @@ DIST mysql-8.0.20-patches-01.tar.xz 7176 BLAKE2B 2fc51986c0a4da60521d0e64b9f8705
DIST mysql-8.0.21-patches-01.tar.xz 7212 BLAKE2B 2f1b38b3f84a124e3636cb726f3fcef82d71d933e90429dc78be44afeb4f456a37104359c5fd58ab50f0c03c1698e6c79f9b1e07640f0411c0024f558b4e9595 SHA512 3edcbb529b0623adaed30150d88c9b54d1a3e402faf5c7cff4ed626bbf4e5f50838d8f3c79bd2173439d748ded13412ff7fe37e3742c55879ff28907b9eb5660
DIST mysql-8.0.22-patches-02.tar.xz 7580 BLAKE2B a50704c3c58b1f67ca86edb233544137927b0ae5fdf302687b48f6fd30fbbd26798e8ef8282662586b25a7240b47278b44f944a8ca59f1a198bc228dd74459c9 SHA512 59f864452e9fdebe4d3990eff8b756e9bbfad58da216b74fa8b7e8391cb0d9d543ca2828591b9ed1ee276c1dec9e1851a8c2683507f0a326c85054e31cc3f950
DIST mysql-8.0.23-patches-01.tar.xz 7568 BLAKE2B 222120dcb5556457f382eefbb10f66f46fe1673c64730c8c8a5566942031bc98bab1f1182f747e79e23fccfb6b09197d5c2874aa2087104b6f1eaa25ea9fd60c SHA512 54222c420d57c1b206d920f22738746925ed1e0d78683f01c97cac5bd1d3450f70f784a7f603304b8595fb58120e691f94e28fa1d1884a7cc8bea1d7b177470f
-DIST mysql-8.0.24-patches-01.tar.xz 7236 BLAKE2B ffd21b74c4e379c2eb816438ea0231637cb60440f0ca3bc2fb516695d90e9665132a120bc3d7a72ee92e48785a16d1fa30e5ca831465fbdf2802e2d49f10b3b2 SHA512 7b2163bfab290cbb05443a09824ec1d53a933703498f04a82ed09a411ec0f07c9952ca4ece726c7cddb4cb4326e455ea93b3c1e8eeed28704119828c2da168e3
+DIST mysql-8.0.25-patches-01.tar.xz 3604 BLAKE2B 09cccab204c30d16bdc374bcd01d4a8e6298955f86f479b8e287aab74fb6bd9857547e360be725dfc66acb56e1bb5665277d340761d0110a8823763ad4d2d1f4 SHA512 6d90a34a20e9cbc7e7a9b5b63a1408f33ac8523f2be6c9ab6d9ad7589c3ded83c87e460d782d4d8c33f11b337151fd8db994099e371260ecf204933e844eb50e
DIST mysql-boost-5.7.27.tar.gz 51436383 BLAKE2B 6db64ab5fa659aae9baa3725a0de9465e48c37618ffd69f34809880c06a00ce55dce77f507810c6fa52d86901facfa42d3d1bd8db1914a779fbc88a69be82497 SHA512 573f4555f3d62bcd3dc2228bcfba023518d462bb6689114a3505ccf7c7c3061d2775a8e7a37ec3c8b9dea6e8fbc56ba599610f237abc38cedff58e75799bdc52
DIST mysql-boost-5.7.29.tar.gz 51417554 BLAKE2B 652ce9f99419387e9bcc37afeb1b46438784752e963c3aa1877f17650c31d8b058b4052da97c3a7e9454e758c259d6c311e0518f9a75909fce9741150b82164c SHA512 38acf7c2a10b20c59230ad05cd2cd6996c4c582233c1be573ead08e5c6684275790da07a036570363f89b4d61547b306589b0b98ed5fca70723a3f2cbc21fe11
DIST mysql-boost-5.7.30.tar.gz 51363998 BLAKE2B 7897ad74b685c3b30e7ecdf132fdfa72f3416c05e8d0086cb8f7674b6c4f377fff9abc51ed258cc4dfeab50a2cb393af9076d9c1f9a83a26521facbaf223afa1 SHA512 b75d41d0c72d16c6f8d5393dab6e476b7993d296eb5683c12417ce2da3db2052fdab2a152f6e7c545315d21bfa35f26a247cb6cdab83d3418b5d34ed7f5f9560
@@ -25,7 +25,7 @@ DIST mysql-boost-8.0.20.tar.gz 266282970 BLAKE2B 2aeb9d6c575ed9dc2d00d3e51e6391c
DIST mysql-boost-8.0.21.tar.gz 278292192 BLAKE2B 9e5a14d1401f58f6f620c8691d2d4d3ada122a79a4e081380050961f0add93bf32b682c60ea2a6e58f50a4fcedbd323d8efe2d5f3e1f2bba5010e201a2df5d44 SHA512 18128edd7d9604ea69bd308f372d6663ef3629503969148e3a2117175c4ef625358b31b96e0e1b8d10a87037719e3cb61d5c71eee1e26ab0e0a1731977a2d7c1
DIST mysql-boost-8.0.22.tar.gz 285934450 BLAKE2B 1ba0c9bb9a0cb74af4842d3b746f8b690c122cfbf2c6d5201ce95e59a257427a8683dd8d5c2be31dfe9ece4761366c1287fa7b841c45db222725bf76b0639bc6 SHA512 792f2ada93ec67a4679228478c6b798e81d9e9f6d13c7f4977cb7682738a4aae3cb483294edc6b2fde16c3960e51af8786216c063ab500840afd39a609e4b612
DIST mysql-boost-8.0.23.tar.gz 291039175 BLAKE2B 3a7d3e05c774085d6078d0d3effd58d2df47521615356a2aa5efc2ea2ef8457e19ad57a054926ccff0a4752ca71d0464daa7fe9a3ac6c1b1d3bd86a9a82dfc58 SHA512 b8c2e2ac772b7b730f8b3bac7a5afb205da173b3639500606e7d1fac74832a0134027951855a2dc81af015e6158c924927ad63b9e1f2e7c823d45d4c4961c3f8
-DIST mysql-boost-8.0.24.tar.gz 290263082 BLAKE2B a29f42b63c68b13fbe7433c7734e1269a1961c10cdd78cc1b9459a32fd833b5efc49e4ad70c3099d265f6e3b69596754e3947568d13104c52ba0d97fa1f1ddc3 SHA512 ad8510614251c056f0963f8e51b9ed5e75452ccbf2728254d662fcc3a7ee1bdc177d1d34e958ddc31c7e6b5b3af9377ef2d9cbdc0353676b3026619673447deb
+DIST mysql-boost-8.0.25.tar.gz 290265324 BLAKE2B 5393a2a2525a886d9ece19777deae01e6c0b24b9ff5a0a5ffb9075740ed912d0df59a165b6ec9ceb60c7c28f3062cda5cceb4da3a8280f42549984c846f1ce5c SHA512 af653ccff66a9d87221b46ad4f7bcc629700549f758998b9a7fb22e4573b9495a28624e031f016f9ad8fe0dfcf481b82f1ffe224aa48c2d45531570026b26081
DIST mysql-extras-20190822-1908Z.tar.bz2 338830 BLAKE2B bc197f8e541206548d8982814e82e028d699ba9c41aec8d5191bcc46581f7880ed2741dbe2206fde44a5e8d8d54bbcf40efbd0709b357636c4c8fdb2ccc3a7bb SHA512 be469e55f7e9966638600d6836a44258c74e5600240fafe2d79eaeebe7d1695b043678184b5d18ee9946f28154bc2529586a7f860b510180a30c82454ed575c8
DIST mysql-extras-20200125-1945Z.tar.bz2 344906 BLAKE2B 0e87875efbc221ded43d6f080dc7dce4277b676b538950120c94b962e51d054093286486e5d83ea3e38e1b2d0b12cf81873df50e1cebbe4cff33b54297e6a17a SHA512 5fcc5d372998db2b8aef32661ff71290791c20c1195a6210ca79c0fda12008906e665f9dc878d3df5a38a95e23ff05b910daa861002c17a1b6de71ef0520bee1
DIST mysql-extras-20200317-0103Z.tar.bz2 344905 BLAKE2B c4c8bb2acea16663ab32cf291d0a2d52af04448a507ad3a6dc22dfdef4d6ba427582d66e5923d05cd51565286f85c8df5ccabef9a67a4a500574d21e1f708f27 SHA512 d1d34817faf0a1271f906213eea9081c204d745b14f96166f17d5c60a29ec58c05926e7216f135b6e9d5df2ceab373f10fc4e6a652514d99ba34a336571dce1f
@@ -41,5 +41,5 @@ EBUILD mysql-8.0.20-r1.ebuild 37043 BLAKE2B e05d79b543cda0f4ad5a4f1fe9ed72dcec32
EBUILD mysql-8.0.21-r1.ebuild 37994 BLAKE2B ca5f8588d0acafb0a323d92922e6a98fdaa4e41bc587f9815b6afce50d03915e8e674d243952ddc6d56e93fbb2255679536ee8d982bdfea394880631819c8d1f SHA512 eab92d18be2c4d2c2192480a66ba547b7cb94b6c903c13fc4f697f2d6eae06bbdc194c4bf07beb337aebdbdcbc8e779bfdfeb0e7d8af1721521acb54c3c8129d
EBUILD mysql-8.0.22.ebuild 37433 BLAKE2B 7d047acfdde052e6745869ae3dc3536cc4f6d171bc04c18aaf7ce7773f2bb840f3b826ed091d6b89aa0af1167e372aa6fdcae0328a9591eb0de0e74465f9aea8 SHA512 2e7cb6a55376f03757e14d08801be88ac07ca7ec7d2afa23c73da44cd72a9f7a02212f310176de4fae076421e363b29b29b251ec98057ad54ad7ca6ea313d3f4
EBUILD mysql-8.0.23.ebuild 37575 BLAKE2B 135ee2f924ab3b50a73ee6366ee9b84815cb81944c9be9ae48c3ed643e6f288d7b2541f6feafa3bffefa28e75b81eaead199704b93b6c3e4e02a158cea868b0b SHA512 3f0dbca7e24b4c696d5970657bb7b405878e6330a6fb26815707d5a3bee7117ab0f1434ecc799515790870544f92973a31eb871363926b5d3be4b9617484decd
-EBUILD mysql-8.0.24.ebuild 38042 BLAKE2B e9b5740a3deb1f8608e5320e850741b1ea7fb88b23c7335629e6d16e6c8c2ac15cb99179237b78a7874d6d18338833c4638c6664d3a37a73ee1d007929c9ea3d SHA512 cf3e974c346a479a4d63dfd0fc4c0559fa3c4508b7d65643fe762ae733ccce91aa1ecc753575c7eb2325a3f2e860a02e77a433eb978fa27765a543ad0536f687
+EBUILD mysql-8.0.25.ebuild 38047 BLAKE2B c58154807df743c0aaf094662e7a208270950f3e9091f47edf10af70cc039bd6ca90c5117ca097daaf9c1da2130101dcbf37211fad9dfad2871d8388541df52f SHA512 3725dc548ec6ad34a7ff0dfa657a817e2a9ce36e7112919432467ce75b68b0c8aef0630a79f651197114f60fda9c529f169c562d629dd38e9ed92ea06d4e1047
MISC metadata.xml 1360 BLAKE2B abb7dcadad78c58d6bc6a56e34795903309f1b506e49b00b09f06e9ae1cbb9a5d246295b9c351353ecc08f157a64f421072dae9c7b0d43ce93cde21d3917489e SHA512 2f676f17cff8fb79b58ec7baec00bddc9e3247ca0bd8c8202bccb08f3e8ceacd682db742b38bf73d667e84b9671d085deae1682221e684443466218c6a9fb759
diff --git a/dev-db/mysql/mysql-8.0.24.ebuild b/dev-db/mysql/mysql-8.0.25.ebuild
index 608252f5a966..d2edcb9991cb 100644
--- a/dev-db/mysql/mysql-8.0.24.ebuild
+++ b/dev-db/mysql/mysql-8.0.25.ebuild
@@ -12,7 +12,7 @@ MY_PV="${PV//_pre*}"
MY_P="${PN}-${MY_PV}"
# Patch version
-PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.24-patches-01.tar.xz"
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/mysql/${PN}-8.0.25-patches-01.tar.xz"
SRC_URI="https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-${MY_PV}.tar.gz
https://cdn.mysql.com/archives/mysql-8.0/mysql-boost-${MY_PV}.tar.gz
@@ -386,7 +386,7 @@ src_test() {
touch "${T}/disabled.def"
local -a disabled_tests
- disabled_tests+=( "auth_sec.atomic_rename_user;0;Depends on user running test" )
+ disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest
index cb6de56af9a3..3a3cb5f9f8da 100644
--- a/dev-db/percona-server/Manifest
+++ b/dev-db/percona-server/Manifest
@@ -4,5 +4,8 @@ AUX my.cnf-8.0.distro-server 1125 BLAKE2B f4d6941aad1fc29e81e6c805ac42f4c8d3c7bc
DIST boost_1_73_0.tar.bz2 109247910 BLAKE2B 5995ff6ca21f45988b187b94bf743795cca97531baa8355f488be0987b9426289dd85d6ce25b7eb03ccd690109f05ba56252a95bca50505ad9cd66f4e0e234e8 SHA512 86c296511c0766145097625a62bf099c3d155284d250ad6e528e788bc90b2945838498dfe473c6c6c78d1694b6fba8e19f7dee0d064a043841e6231603fff668
DIST percona-server-8.0.22-13.tar.gz 530806570 BLAKE2B 256e5afa2e3908617c41ffcab591ccdbfd932a8ba3ce25fbf2a0be2cdfa80991b0c2d090c11ffae64e4bb3d8cf9f3011b70974ab22cbab023f6625ac422f3c73 SHA512 9b7a1d06885eb4412361bb3920adc9f050f8da95584eb910c97c8877a433ead04d02f2908e5e9648b1d79cdba677727fdb745377feac3c958339588d5f0cdf2b
DIST percona-server-8.0.22.13-patches-02.tar.xz 9620 BLAKE2B c04e97ed422719bec5008b668e2ce3ecd5b848338a9f2f2ecd2fc867307b7fce9bae4cb0efd44f9b950f74d7f31394c06248d1c72784e9c0790378e2ea4d7934 SHA512 2476ee2f4096eaee211017609f82cf8fa9817cda6345336f478257711b64b8c37340b482a02f3d0b19e16e01055cf619cdd1b66d5fbfa0fd1d8edbd529c4096f
+DIST percona-server-8.0.23-14.tar.gz 528227168 BLAKE2B c497e69d3e7f370e6ffd71ef8129fccb35d8814e713bf78da04b7517f56e7d733d0b54543e86a24568587ae270bd7ca7add36646845e8f7dc5c288aebd1db8c7 SHA512 199669fc53b80426be709a2d7026f6aa821f2d98e5763b3311f564550687cc6401def191f56c615ffed69264a09aaec78ca8371d35a6a69386832f24f30df71b
+DIST percona-server-8.0.23.14-patches-01.tar.xz 5908 BLAKE2B 968fbe0f8e3666ada008d81e9e07a5149dc6137908bf955bdf37c6bc6703cdb7a1d9a7395435d6b8772865b08d6d6716690331968069e4c1d3059a38b3c8ca49 SHA512 31983837d7fbd42b5e227f6617e2b59303ce185c613f620a61a9b9d26cd075feaf58969e3d8b415c70ee796bd1e912204cd5780e6d07cf6e2b0dc28ca41b6f70
EBUILD percona-server-8.0.22.13.ebuild 39889 BLAKE2B 0a5f64db96a74046cf9a100d81b064e8c76215322ccd595f29103654f35b71f9ed60d1e60200f5a2aed105f5ffe72da67d44e76f9b5a3249fd8448478c8b1bab SHA512 b02d0974cfc4fbfeaf017bf0964b0dc34c70252543b5ecd6613bb76e5e3500806408db1ba6b5ebd58b24b2995c4098a0193444948c5daa7b0d71c1c492939d03
+EBUILD percona-server-8.0.23.14.ebuild 40149 BLAKE2B 2a0659552894b3fc1babc40431445331ce75f0e9be289967ab34d5118fbf09f583cf844f37544e6ce53f7d8cd15770d25939e120a0d6f3653163ecffc79ecf21 SHA512 de541d62f38afe7f6b7de73a172c68738e273e4e19daab520e34ea97a160710b38bc7a5659005b4867870b392b3f9b21206338c4286bdc47e88d709fb1726b34
MISC metadata.xml 1010 BLAKE2B 12a73e124af07d102ab0198d6942515f652dadcf7a62cea9180012e0d0ef5dab146a76439650f408bc9f034646c7e6a3337cc843fe711c0cc347864e553f355d SHA512 6459d89a1b50a1344d1ad558ea684a23691c7b0f9e860c056f136d4ebf82a74ce11bafdcff420b7aa41907b3d31d45272d02990cba40cedd50b1d10545f059f0
diff --git a/dev-db/percona-server/percona-server-8.0.23.14.ebuild b/dev-db/percona-server/percona-server-8.0.23.14.ebuild
new file mode 100644
index 000000000000..65bf6f855cba
--- /dev/null
+++ b/dev-db/percona-server/percona-server-8.0.23.14.ebuild
@@ -0,0 +1,1214 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+CMAKE_MAKEFILE_GENERATOR=emake
+
+inherit check-reqs cmake flag-o-matic linux-info \
+ multiprocessing prefix toolchain-funcs
+
+MY_BOOST_VERSION="1.73.0"
+MY_PV=$(ver_rs 3 '-')
+MY_PV="${MY_PV//_pre*}"
+MY_PN="Percona-Server"
+MY_P="${PN}-${MY_PV}"
+MY_MAJOR_PV=$(ver_cut 1-2)
+MY_RELEASE_NOTES_URI="https://www.percona.com/doc/percona-server/${MY_MAJOR_PV}/"
+
+# Patch version
+PATCH_SET="https://dev.gentoo.org/~whissi/dist/percona-server/${PN}-8.0.23.14-patches-01.tar.xz"
+
+SRC_URI="https://www.percona.com/downloads/${MY_PN}-${MY_MAJOR_PV}/${MY_PN}-${MY_PV}/source/tarball/${PN}-${MY_PV}.tar.gz
+ https://dl.bintray.com/boostorg/release/${MY_BOOST_VERSION}/source/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION}).tar.bz2
+ ${PATCH_SET}
+"
+
+HOMEPAGE="https://www.percona.com/software/mysql-database/percona-server https://github.com/percona/percona-server"
+DESCRIPTION="Fully compatible, enhanced and open source drop-in replacement for MySQL"
+LICENSE="GPL-2"
+SLOT="8.0"
+IUSE="cjk cracklib debug jemalloc latin1 ldap numa pam +perl profiling
+ rocksdb router selinux +server tcmalloc test tokudb tokudb-backup-plugin"
+
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( tcmalloc jemalloc )
+ cjk? ( server )
+ jemalloc? ( server )
+ numa? ( server )
+ profiling? ( server )
+ router? ( server )
+ tcmalloc? ( server )"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris"
+
+# Shorten the path because the socket path length must be shorter than 107 chars
+# and we will run a mysql server during test phase
+S="${WORKDIR}/mysql"
+
+# Be warned, *DEPEND are version-dependant
+# These are used for both runtime and compiletime
+COMMON_DEPEND="
+ >=app-arch/lz4-0_p131:=
+ app-arch/zstd:=
+ sys-libs/ncurses:0=
+ >=sys-libs/zlib-1.2.3:0=
+ >=dev-libs/openssl-1.0.0:0=
+ server? (
+ dev-libs/icu:=
+ dev-libs/libevent:=[ssl,threads]
+ >=dev-libs/protobuf-3.8:=
+ net-libs/libtirpc:=
+ net-misc/curl:=
+ cjk? ( app-text/mecab:= )
+ ldap? (
+ dev-libs/cyrus-sasl
+ net-nds/openldap
+ )
+ jemalloc? ( dev-libs/jemalloc:0= )
+ kernel_linux? (
+ dev-libs/libaio:0=
+ sys-process/procps:0=
+ )
+ numa? ( sys-process/numactl )
+ pam? ( sys-libs/pam:0= )
+ tcmalloc? ( dev-util/google-perftools:0= )
+ )
+"
+DEPEND="${COMMON_DEPEND}
+ || ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )
+ virtual/yacc
+ server? ( net-libs/rpcsvc-proto )
+ test? (
+ acct-group/mysql acct-user/mysql
+ dev-perl/JSON
+ )
+"
+RDEPEND="${COMMON_DEPEND}
+ !dev-db/mariadb !dev-db/mariadb-galera !dev-db/mysql !dev-db/mysql-cluster
+ !dev-db/percona-server:0
+ !dev-db/percona-server:5.7
+ selinux? ( sec-policy/selinux-mysql )
+ !prefix? (
+ acct-group/mysql acct-user/mysql
+ dev-db/mysql-init-scripts
+ )
+"
+# For other stuff to bring us in
+# dev-perl/DBD-mysql is needed by some scripts installed by MySQL
+PDEPEND="perl? ( >=dev-perl/DBD-mysql-2.9004 )"
+
+mysql_init_vars() {
+ : ${MY_SHAREDSTATEDIR="${EPREFIX}/usr/share/mysql"}
+ : ${MY_SYSCONFDIR="${EPREFIX}/etc/mysql"}
+ : ${MY_LOCALSTATEDIR="${EPREFIX}/var/lib/mysql"}
+ : ${MY_LOGDIR="${EPREFIX}/var/log/mysql"}
+ MY_DATADIR="${MY_LOCALSTATEDIR}"
+
+ export MY_SHAREDSTATEDIR MY_SYSCONFDIR
+ export MY_LOCALSTATEDIR MY_LOGDIR
+ export MY_DATADIR
+}
+
+pkg_pretend() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use server ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test $FEATURES ; then
+ CHECKREQS_DISK_BUILD="9G"
+ fi
+
+ check-reqs_pkg_pretend
+ fi
+ fi
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ CHECKREQS_DISK_BUILD="3G"
+
+ if has test ${FEATURES} ; then
+ CHECKREQS_DISK_BUILD="9G"
+
+ # Bug #213475 - MySQL _will_ object strenuously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if ! has userpriv ${FEATURES} ; then
+ die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root."
+ fi
+
+ local aio_max_nr=$(sysctl -n fs.aio-max-nr 2>/dev/null)
+ [[ -z "${aio_max_nr}" || ${aio_max_nr} -lt 250000 ]] \
+ && die "FEATURES=test will require fs.aio-max-nr=250000 at minimum!"
+
+ if use latin1 ; then
+ # Upstream only supports tests with default charset
+ die "Testing with USE=latin1 is not supported."
+ fi
+ fi
+
+ if use kernel_linux ; then
+ if use numa ; then
+ linux-info_get_any_version
+
+ local CONFIG_CHECK="~NUMA"
+
+ local WARNING_NUMA="This package expects NUMA support in kernel which this system does not have at the moment;"
+ WARNING_NUMA+=" Either expect runtime errors, enable NUMA support in kernel or rebuild the package without NUMA support"
+
+ check_extra_config
+ fi
+ fi
+
+ use server && check-reqs_pkg_setup
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+
+ mv -f "${WORKDIR}/${MY_P}" "${S}" || die
+}
+
+src_prepare() {
+ eapply "${WORKDIR}"/mysql-patches
+
+ # Avoid rpm call which would trigger sandbox, #692368
+ sed -i \
+ -e 's/MY_RPM rpm/MY_RPM rpmNOTEXISTENT/' \
+ CMakeLists.txt || die
+
+ if use jemalloc ; then
+ echo "TARGET_LINK_LIBRARIES(mysqld jemalloc)" >> "${S}/sql/CMakeLists.txt" || die
+ fi
+
+ if use tcmalloc ; then
+ echo "TARGET_LINK_LIBRARIES(mysqld tcmalloc)" >> "${S}/sql/CMakeLists.txt" || die
+ fi
+
+ # Remove the centos and rhel selinux policies to support mysqld_safe under SELinux
+ if [[ -d "${S}/support-files/SELinux" ]] ; then
+ echo > "${S}/support-files/SELinux/CMakeLists.txt" || die
+ fi
+
+ # Remove man pages for client-lib tools we don't install
+ rm \
+ man/my_print_defaults.1 \
+ man/perror.1 \
+ man/zlib_decompress.1 \
+ || die
+
+ cmake_src_prepare
+}
+
+src_configure() {
+ # Bug #114895, bug #110149
+ filter-flags "-O" "-O[01]"
+
+ append-cxxflags -felide-constructors
+
+ # code is not C++17 ready, bug #786402
+ append-cxxflags -std=c++14
+
+ # bug #283926, with GCC4.4, this is required to get correct behavior.
+ append-flags -fno-strict-aliasing
+
+ CMAKE_BUILD_TYPE="RelWithDebInfo"
+
+ # debug hack wrt #497532
+ mycmakeargs=(
+ -DCMAKE_C_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="$(usex debug '' '-DNDEBUG')"
+ -DMYSQL_DATADIR="${EPREFIX}/var/lib/mysql"
+ -DSYSCONFDIR="${EPREFIX}/etc/mysql"
+ -DINSTALL_BINDIR=bin
+ -DINSTALL_DOCDIR=share/doc/${PF}
+ -DINSTALL_DOCREADMEDIR=share/doc/${PF}
+ -DINSTALL_INCLUDEDIR=include/mysql
+ -DINSTALL_INFODIR=share/info
+ -DINSTALL_LIBDIR=$(get_libdir)
+ -DINSTALL_MANDIR=share/man
+ -DINSTALL_MYSQLSHAREDIR=share/mysql
+ -DINSTALL_PLUGINDIR=$(get_libdir)/mysql/plugin
+ -DINSTALL_MYSQLDATADIR="${EPREFIX}/var/lib/mysql"
+ -DINSTALL_SBINDIR=sbin
+ -DINSTALL_SUPPORTFILESDIR="${EPREFIX}/usr/share/mysql"
+ -DCOMPILATION_COMMENT="Gentoo Linux ${PF}"
+ -DWITH_UNIT_TESTS=$(usex test ON OFF)
+ # Using bundled editline to get CTRL+C working
+ -DWITH_EDITLINE=bundled
+ -DWITH_ZLIB=system
+ -DWITH_SSL=system
+ -DWITH_LIBWRAP=0
+ -DENABLED_LOCAL_INFILE=1
+ -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock"
+ -DWITH_DEFAULT_COMPILER_OPTIONS=0
+ # The build forces this to be defined when cross-compiling. We pass it
+ # all the time for simplicity and to make sure it is actually correct.
+ -DSTACK_DIRECTION=$(tc-stack-grows-down && echo -1 || echo 1)
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
+ -DWITH_CURL=system
+ -DWITH_BOOST="${WORKDIR}/boost_$(ver_rs 1- _ ${MY_BOOST_VERSION})"
+ -DWITH_ROUTER=$(usex router ON OFF)
+ )
+
+ if is-flagq -fno-lto ; then
+ einfo "LTO disabled via {C,CXX,F,FC}FLAGS"
+ mycmakeargs+=( -DWITH_LTO=OFF )
+ elif is-flagq -flto ; then
+ einfo "LTO forced via {C,CXX,F,FC}FLAGS"
+ myconf+=( -DWITH_LTO=ON )
+ else
+ # Disable automagic
+ myconf+=( -DWITH_LTO=OFF )
+ fi
+
+ if use test ; then
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR=share/mysql/mysql-test )
+ else
+ mycmakeargs+=( -DINSTALL_MYSQLTESTDIR='' )
+ fi
+
+ mycmakeargs+=( -DWITHOUT_CLIENTLIBS=YES )
+
+ mycmakeargs+=(
+ -DWITH_ICU=system
+ -DWITH_LZ4=system
+ # Our dev-libs/rapidjson doesn't carry necessary fixes for std::regex
+ -DWITH_RAPIDJSON=bundled
+ -DWITH_ZSTD=system
+ )
+
+ if [[ -n "${MYSQL_DEFAULT_CHARSET}" && -n "${MYSQL_DEFAULT_COLLATION}" ]] ; then
+ ewarn "You are using a custom charset of ${MYSQL_DEFAULT_CHARSET}"
+ ewarn "and a collation of ${MYSQL_DEFAULT_COLLATION}."
+ ewarn "You MUST file bugs without these variables set."
+ ewarn "Tests will probably fail!"
+
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=${MYSQL_DEFAULT_CHARSET}
+ -DDEFAULT_COLLATION=${MYSQL_DEFAULT_COLLATION}
+ )
+ elif use latin1 ; then
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=latin1
+ -DDEFAULT_COLLATION=latin1_swedish_ci
+ )
+ else
+ mycmakeargs+=(
+ -DDEFAULT_CHARSET=utf8mb4
+ -DDEFAULT_COLLATION=utf8mb4_0900_ai_ci
+ )
+ fi
+
+ if use server ; then
+ mycmakeargs+=(
+ -DWITH_AUTHENTICATION_LDAP=$(usex ldap system OFF)
+ -DWITH_COREDUMPER=OFF
+ -DWITH_EXTRA_CHARSETS=all
+ -DWITH_DEBUG=$(usex debug)
+ -DWITH_MECAB=$(usex cjk system OFF)
+ -DWITH_LIBEVENT=system
+ -DWITH_PROTOBUF=system
+ -DWITH_NUMA=$(usex numa ON OFF)
+ -DWITH_PAM=$(usex pam)
+ )
+
+ if use profiling ; then
+ # Setting to OFF doesn't work: Once set, profiling options will be added
+ # to `mysqld --help` output via sql/sys_vars.cc causing
+ # "main.mysqld--help-notwin" test to fail
+ mycmakeargs+=( -DENABLED_PROFILING=ON )
+ fi
+
+ # Storage engines
+ mycmakeargs+=(
+ -DWITH_EXAMPLE_STORAGE_ENGINE=0
+ -DWITH_ARCHIVE_STORAGE_ENGINE=1
+ -DWITH_BLACKHOLE_STORAGE_ENGINE=1
+ -DWITH_CSV_STORAGE_ENGINE=1
+ -DWITH_FEDERATED_STORAGE_ENGINE=1
+ -DWITH_HEAP_STORAGE_ENGINE=1
+ -DWITH_INNOBASE_STORAGE_ENGINE=1
+ -DWITH_INNODB_MEMCACHED=0
+ -DWITH_MYISAMMRG_STORAGE_ENGINE=1
+ -DWITH_MYISAM_STORAGE_ENGINE=1
+ -DWITH_ROCKSDB=$(usex rocksdb 1 0)
+ -DWITH_TOKUDB=$(usex tokudb 1 0)
+ )
+ else
+ mycmakeargs+=(
+ -DWITHOUT_SERVER=1
+ -DWITH_SYSTEMD=no
+ )
+ fi
+
+ cmake_src_configure
+}
+
+# Official test instructions:
+# ulimit -n 16500 && \
+# USE='perl server' \
+# FEATURES='test userpriv' \
+# ebuild mysql-X.X.XX.ebuild \
+# digest clean package
+src_test() {
+ _disable_test() {
+ local rawtestname bug reason
+ rawtestname="${1}" ; shift
+ bug="${1}" ; shift
+ reason="${@}"
+ ewarn "test '${rawtestname}' disabled: '${reason}' (BUG#${bug})"
+ echo ${rawtestname} : BUG#${bug} ${reason} >> "${T}/disabled.def"
+ }
+
+ local TESTDIR="${BUILD_DIR}/mysql-test"
+ local retstatus_unit
+ local retstatus_tests
+
+ # Run CTest (test-units)
+ cmake_src_test
+ retstatus_unit=$?
+
+ # Ensure that parallel runs don't die
+ export MTR_BUILD_THREAD="$((${RANDOM} % 100))"
+
+ if [[ -z "${MTR_PARALLEL}" ]] ; then
+ local -x MTR_PARALLEL=$(makeopts_jobs)
+
+ if [[ ${MTR_PARALLEL} -gt 4 ]] ; then
+ # Running multiple tests in parallel usually require higher ulimit
+ # and fs.aio-max-nr setting. In addition, tests like main.multi_update
+ # are known to hit timeout when system is busy.
+ # To avoid test failure we will limit MTR_PARALLEL to 4 instead of
+ # using "auto".
+ local info_msg="Parallel MySQL test suite jobs limited to 4 (MAKEOPTS=${MTR_PARALLEL})"
+ info_msg+=" to avoid test failures. Set MTR_PARALLEL if you know what you are doing!"
+ einfo "${info_msg}"
+ unset info_msg
+ MTR_PARALLEL=4
+ fi
+ else
+ einfo "MTR_PARALLEL is set to '${MTR_PARALLEL}'"
+ fi
+
+ # create directories because mysqladmin might run out of order
+ mkdir -p "${T}"/var-tests{,/log} || die
+
+ # Run mysql tests
+ pushd "${TESTDIR}" &>/dev/null || die
+
+ touch "${T}/disabled.def"
+
+ local -a disabled_tests
+ disabled_tests+=( "auth_sec.atomic_rename_user;103512;Depends on user running test" )
+ disabled_tests+=( "auth_sec.keyring_file_data_qa;0;Won't work with user privileges" )
+ disabled_tests+=( "gis.spatial_analysis_functions_buffer;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.gis_bugs_crashes;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.geometry_class_attri_prop;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_utility_function_distance_sphere;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.geometry_property_function_issimple;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_analysis_functions_centroid;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_operators_intersection;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_utility_function_simplify;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_op_testingfunc_mix;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "gis.spatial_analysis_functions_distance;5452;Known rounding error with latest AMD processors (PS)" )
+ disabled_tests+=( "group_replication.gr_ssl_options2;0;Sporadic failing test" )
+ disabled_tests+=( "innodb.percona_changed_page_bmp_flush;6807;False positive on Gentoo (PS)" )
+ disabled_tests+=( "innodb.percona_changed_page_bmp_log_resize;0;Sporadic failing test" )
+ disabled_tests+=( "innodb.percona_log_encrypt_failure;0;Requires proper keyring setup" )
+ disabled_tests+=( "innodb.percona_log_encrypt_change_mk;6039;False positive on Gentoo (PS)" )
+ disabled_tests+=( "innodb.percona_log_encrypt_change_rk;6805;False positive on Gentoo (PS)" )
+ disabled_tests+=( "innodb.upgrade_orphan;0;Sporadic failing test" )
+ disabled_tests+=( "main.coredump;0;Known test failure" )
+ disabled_tests+=( "main.myisam-blob;0;Sporadic failing test" )
+ disabled_tests+=( "main.mysql_load_data_local_dir;7416;Known test failure" )
+ disabled_tests+=( "main.mysqlpump_basic_lz4;6042;Extra tool output causes false positive" )
+ disabled_tests+=( "main.ssl_bug75311;5996;Known test failure" )
+ disabled_tests+=( "main.ssl_san;6808;False positive on IPv6-enabled hosts" )
+ disabled_tests+=( "main.subquery_bugs;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.window_std_var;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.window_std_var_optimized;0;Known rounding error with latest AMD processors -- no upstream bug yet" )
+ disabled_tests+=( "main.with_recursive;6804;Known rounding error with latest AMD processors" )
+ disabled_tests+=( "rpl_gtid.rpl_gtid_stm_drop_table;90612;Known test failure" )
+ disabled_tests+=( "rpl_gtid.rpl_multi_source_mtr_includes;0;Know failure - no upstream bug yet" )
+ disabled_tests+=( "sys_vars.myisam_data_pointer_size_func;87935;Test will fail on slow hardware" )
+ disabled_tests+=( "sys_vars.innodb_sys_tablespace_encrypt_basic;7415;Known test failure" )
+ disabled_tests+=( "x.message_compressed_payload;0;False positive caused by protobuff-3.11+" )
+ disabled_tests+=( "x.message_protobuf_nested;6803;False positive caused by protobuff-3.11+" )
+
+ if ! hash zip 1>/dev/null 2>&1 ; then
+ # no need to force dep app-arch/zip for one test
+ disabled_tests+=( "innodb.discarded_partition_create;0;Requires app-arch/zip" )
+ disabled_tests+=( "innodb.partition_upgrade_create;0;Requires app-arch/zip" )
+ fi
+
+ local test_infos_str test_infos_arr
+ for test_infos_str in "${disabled_tests[@]}" ; do
+ IFS=';' read -r -a test_infos_arr <<< "${test_infos_str}"
+
+ if [[ ${#test_infos_arr[@]} != 3 ]] ; then
+ die "Invalid test data set, not matching format: ${test_infos_str}"
+ fi
+
+ _disable_test "${test_infos_arr[0]}" "${test_infos_arr[1]}" "${test_infos_arr[2]}"
+ done
+ unset test_infos_str test_infos_arr
+
+ if [[ -z "${MTR_VAULT_TOKEN}" ]] ; then
+ local impossible_test
+ for impossible_test in \
+ encryption.default_table_encryption_var \
+ keyring_vault.innodb_online_alter_encryption \
+ keyring_vault.innodb_row_log_encryption \
+ keyring_vault.install_keyring_vault \
+ keyring_vault.keyring_udf \
+ keyring_vault.keyring_vault_config \
+ keyring_vault.keyring_vault_config_qa \
+ keyring_vault.keyring_vault_timeout \
+ keyring_vault.key_rotation_qa \
+ keyring_vault.rpl_key_rotation \
+ keyring_vault.table_encrypt_2 \
+ keyring_vault.table_encrypt_2_directory \
+ keyring_vault.table_encrypt_2_keyring \
+ keyring_vault.table_encrypt_5 \
+ keyring_vault.table_encrypt_5_directory \
+ keyring_vault.table_encrypt_kill \
+ keyring_vault.temp_table_encrypt_keyring_vault \
+ main.persisted_variables \
+ ; do
+ _disable_test "${impossible_test}" "0" "MTR_VAULT_TOKEN is not set"
+ done
+ fi
+
+ # Try to increase file limits to increase test coverage
+ if ! ulimit -n 16500 1>/dev/null 2>&1 ; then
+ # Upper limit comes from parts.partition_* tests
+ ewarn "For maximum test coverage please raise open file limit to 16500 (ulimit -n 16500) before calling the package manager."
+
+ if ! ulimit -n 4162 1>/dev/null 2>&1 ; then
+ # Medium limit comes from '[Warning] Buffered warning: Could not increase number of max_open_files to more than 3000 (request: 4162)'
+ ewarn "For medium test coverage please raise open file limit to 4162 (ulimit -n 4162) before calling the package manager."
+
+ if ! ulimit -n 3000 1>/dev/null 2>&1 ; then
+ ewarn "For minimum test coverage please raise open file limit to 3000 (ulimit -n 3000) before calling the package manager."
+ else
+ einfo "Will run test suite with open file limit set to 3000 (minimum test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 4162 (medium test coverage)."
+ fi
+ else
+ einfo "Will run test suite with open file limit set to 16500 (best test coverage)."
+ fi
+
+ # run mysql-test tests
+ perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder --skip-test=tokudb --skip-test-list="${T}/disabled.def"
+ retstatus_tests=$?
+
+ popd &>/dev/null || die
+
+ # Cleanup is important for these testcases.
+ pkill -9 -f "${S}/ndb" 2>/dev/null
+ pkill -9 -f "${S}/sql" 2>/dev/null
+
+ local failures=""
+ [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit"
+ [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests"
+
+ [[ -z "$failures" ]] || die "Test failures: $failures"
+ einfo "Tests successfully completed"
+}
+
+src_install() {
+ cmake_src_install
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Convenience links
+ einfo "Making Convenience links for mysqlcheck multi-call binary"
+ dosym "mysqlcheck" "/usr/bin/mysqlanalyze"
+ dosym "mysqlcheck" "/usr/bin/mysqlrepair"
+ dosym "mysqlcheck" "/usr/bin/mysqloptimize"
+
+ # INSTALL_LAYOUT=STANDALONE causes cmake to create a /usr/data dir
+ if [[ -d "${ED}/usr/data" ]] ; then
+ rm -Rf "${ED}/usr/data" || die
+ fi
+
+ # Unless they explicitly specific USE=test, then do not install the
+ # testsuite. It DOES have a use to be installed, esp. when you want to do a
+ # validation of your database configuration after tuning it.
+ if ! use test ; then
+ rm -rf "${ED}/${MY_SHAREDSTATEDIR#${EPREFIX}}/mysql-test"
+ fi
+
+ # Configuration stuff
+ einfo "Building default configuration ..."
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}"
+ [[ -f "${S}/scripts/mysqlaccess.conf" ]] && doins "${S}"/scripts/mysqlaccess.conf
+ cp "${FILESDIR}/my.cnf-5.7" "${TMPDIR}/my.cnf" || die
+ eprefixify "${TMPDIR}/my.cnf"
+ doins "${TMPDIR}/my.cnf"
+ insinto "${MY_SYSCONFDIR#${EPREFIX}}/mysql.d"
+ cp "${FILESDIR}/my.cnf-8.0.distro-client" "${TMPDIR}/50-distro-client.cnf" || die
+ eprefixify "${TMPDIR}/50-distro-client.cnf"
+ doins "${TMPDIR}/50-distro-client.cnf"
+
+ mycnf_src="my.cnf-8.0.distro-server"
+ sed -e "s!@DATADIR@!${MY_DATADIR}!g" \
+ "${FILESDIR}/${mycnf_src}" \
+ > "${TMPDIR}/my.cnf.ok" || die
+
+ if use prefix ; then
+ sed -i -r -e '/^user[[:space:]]*=[[:space:]]*mysql$/d' \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ if use latin1 ; then
+ sed -i \
+ -e "/character-set/s|utf8mb4|latin1|g" \
+ "${TMPDIR}/my.cnf.ok" || die
+ fi
+
+ eprefixify "${TMPDIR}/my.cnf.ok"
+
+ newins "${TMPDIR}/my.cnf.ok" 50-distro-server.cnf
+
+ #Remove mytop if perl is not selected
+ [[ -e "${ED}/usr/bin/mytop" ]] && ! use perl && rm -f "${ED}/usr/bin/mytop"
+
+ if use router ; then
+ rm -rf \
+ "${ED}/usr/LICENSE.router" \
+ "${ED}/usr/README.router" \
+ "${ED}/usr/run" \
+ "${ED}/usr/var" \
+ || die
+ fi
+
+ # Kill old libmysqclient_r symlinks if they exist. Time to fix what depends on them.
+ find "${D}" -name 'libmysqlclient_r.*' -type l -delete || die
+}
+
+pkg_postinst() {
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Create log directory securely if it does not exist
+ # NOTE: $MY_LOGDIR contains $EPREFIX by default
+ [[ -d "${MY_LOGDIR}" ]] || install -d -m0750 -o mysql -g mysql "${MY_LOGDIR}"
+
+ # Note about configuration change
+ einfo
+ elog "This version of ${PN} reorganizes the configuration from a single my.cnf"
+ elog "to several files in /etc/mysql/mysql.d."
+ elog "Please backup any changes you made to /etc/mysql/my.cnf"
+ elog "and add them as a new file under /etc/mysql/mysql.d with a .cnf extension."
+ elog "You may have as many files as needed and they are read alphabetically."
+ elog "Be sure the options have the appropriate section headers, i.e. [mysqld]."
+ einfo
+
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+ einfo
+ elog "You might want to run:"
+ elog " \"emerge --config =${CATEGORY}/${PF}\""
+ elog "if this is a new install."
+ einfo
+ else
+ einfo
+ elog "Upgrade process for ${PN}-8.x has changed. Please read"
+ elog "https://dev.mysql.com/doc/refman/8.0/en/upgrade-binary-package.html"
+ einfo
+ fi
+}
+
+pkg_config() {
+ _getoptval() {
+ local section="$1"
+ local flag="--${2}="
+ local extra_options="${3}"
+ local cmd=(
+ "${my_print_defaults_binary}"
+ "${extra_options}"
+ "${section}"
+ )
+ local results=( $(eval "${cmd[@]}" 2>/dev/null | sed -n "/^${flag}/s,${flag},,gp") )
+
+ if [[ ${#results[@]} -gt 0 ]] ; then
+ # When option is set multiple times only return last value
+ echo "${results[-1]}"
+ fi
+ }
+
+ _mktemp_dry() {
+ # emktemp has no --dry-run option
+ local template="${1}"
+
+ if [[ -z "${template}" ]] ; then
+ if [[ -z "${T}" ]] ; then
+ template="/tmp/XXXXXXX"
+ else
+ template="${T}/XXXXXXX"
+ fi
+ fi
+
+ local template_wo_X=${template//X/}
+ local n_X
+ let n_X=${#template}-${#template_wo_X}
+ if [[ ${n_X} -lt 3 ]] ; then
+ echo "${FUNCNAME[0]}: too few X's in template ‘${template}’" >&2
+ return
+ fi
+
+ local attempts=0
+ local character tmpfile
+ while [[ true ]] ; do
+ let attempts=attempts+1
+
+ new_file=
+ while read -n1 character ; do
+ if [[ "${character}" == "X" ]] ; then
+ tmpfile+="${RANDOM:0:1}"
+ else
+ tmpfile+="${character}"
+ fi
+ done < <(echo -n "${template}")
+
+ if [[ ! -f "${tmpfile}" ]]
+ then
+ echo "${tmpfile}"
+ return
+ fi
+
+ if [[ ${attempts} -ge 100 ]] ; then
+ echo "${FUNCNAME[0]}: Cannot create temporary file after 100 attempts." >&2
+ return
+ fi
+ done
+ }
+
+ local mysqld_binary="${EROOT}/usr/sbin/mysqld"
+ if [[ ! -x "${mysqld_binary}" ]] ; then
+ die "'${mysqld_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local mysql_binary="${EROOT}/usr/bin/mysql"
+ if [[ ! -x "${mysql_binary}" ]] ; then
+ die "'${mysql_binary}' not found! Please re-install ${CATEGORY}/${PN}!"
+ fi
+
+ local my_print_defaults_binary="${EROOT}/usr/bin/my_print_defaults"
+ if [[ ! -x "${my_print_defaults_binary}" ]] ; then
+ die "'${my_print_defaults_binary}' not found! Please re-install dev-db/mysql-connector-c!"
+ fi
+
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ MYSQL_USER=mysql
+ if use prefix ; then
+ MYSQL_USER=$(id -u -n 2>/dev/null)
+ if [[ -z "${MYSQL_USER}" ]] ; then
+ die "Failed to determine current username!"
+ fi
+ fi
+ fi
+
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ MYSQL_GROUP=mysql
+ if use prefix ; then
+ MYSQL_GROUP=$(id -g -n 2>/dev/null)
+ if [[ -z "${MYSQL_GROUP}" ]] ; then
+ die "Failed to determine current user groupname!"
+ fi
+ fi
+ fi
+
+ # my_print_defaults needs to read stuff in $HOME/.my.cnf
+ local -x HOME="${EROOT}/root"
+
+ # Make sure the vars are correctly initialized
+ mysql_init_vars
+
+ # Read currently set data directory
+ MY_DATADIR="$(_getoptval mysqld datadir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+
+ # Bug #213475 - MySQL _will_ object strenously if your machine is named
+ # localhost. Also causes weird failures.
+ [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost"
+
+ if [[ -z "${MY_DATADIR}" ]] ; then
+ die "Sorry, unable to find MY_DATADIR!"
+ elif [[ -d "${MY_DATADIR}/mysql" ]] ; then
+ ewarn "Looks like your data directory '${MY_DATADIR}' is already initialized!"
+ ewarn "Please rename or delete its content if you wish to initialize a new data directory."
+ die "${PN} data directory at '${MY_DATADIR}' looks already initialized!"
+ fi
+
+ MYSQL_TMPDIR="$(_getoptval mysqld tmpdir "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_TMPDIR=${MYSQL_TMPDIR%/}
+ # These are dir+prefix
+ MYSQL_LOG_BIN="$(_getoptval mysqld log-bin "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_LOG_BIN=${MYSQL_LOG_BIN%/*}
+ MYSQL_RELAY_LOG="$(_getoptval mysqld relay-log "--defaults-file='${MY_SYSCONFDIR}/my.cnf'")"
+ MYSQL_RELAY_LOG=${MYSQL_RELAY_LOG%/*}
+
+ # Create missing directories.
+ # Always check if mysql user can write to directory even if we just
+ # created directory because a parent directory might be not
+ # accessible for that user.
+ PID_DIR="${EROOT}/run/mysqld"
+ if [[ ! -d "${PID_DIR}" ]] ; then
+ einfo "Creating ${PN} PID directory '${PID_DIR}' ..."
+ install -d -m 755 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${PID_DIR}" \
+ || die "Failed to create PID directory '${PID_DIR}'!"
+ fi
+
+ local _pid_dir_testfile="$(_mktemp_dry "${PID_DIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_pid_dir_testfile}" ]] \
+ && die "_mktemp_dry() for '${PID_DIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_pid_dir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_pid_dir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into PID dir '${PID_DIR}'!"
+ else
+ rm "${_pid_dir_testfile}" || die
+ unset _pid_dir_testfile
+ fi
+
+ if [[ ! -d "${MY_DATADIR}" ]] ; then
+ einfo "Creating ${PN} data directory '${MY_DATADIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MY_DATADIR}" \
+ || die "Failed to create ${PN} data directory '${MY_DATADIR}'!"
+ fi
+
+ local _my_datadir_testfile="$(_mktemp_dry "${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_datadir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MY_DATADIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_datadir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_datadir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into data directory '${MY_DATADIR}'!"
+ else
+ rm "${_my_datadir_testfile}" || die
+ unset _my_datadir_testfile
+ fi
+
+ if [[ -n "${MYSQL_TMPDIR}" && ! -d "${MYSQL_TMPDIR}" ]] ; then
+ einfo "Creating ${PN} tmpdir '${MYSQL_TMPDIR}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_TMPDIR}" \
+ || die "Failed to create ${PN} tmpdir '${MYSQL_TMPDIR}'!"
+ fi
+
+ if [[ -z "${MYSQL_TMPDIR}" ]] ; then
+ MYSQL_TMPDIR="$(_mktemp_dry "${EROOT}/tmp/mysqld-tmp.XXXXXXXXX")"
+ [[ -z "${MYSQL_TMPDIR}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}' failed!"
+
+ mkdir "${MYSQL_TMPDIR}" || die
+ chown ${MYSQL_USER} "${MYSQL_TMPDIR}" || die
+ fi
+
+ # Now we need to test MYSQL_TMPDIR...
+ local _my_tmpdir_testfile="$(_mktemp_dry "${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_tmpdir_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_tmpdir_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_tmpdir_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into tmpdir '${MYSQL_TMPDIR}'!"
+ else
+ rm "${_my_tmpdir_testfile}" || die
+ unset _my_tmpdir_testfile
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" && ! -d "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "Creating ${PN} log-bin directory '${MYSQL_LOG_BIN}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_LOG_BIN}" \
+ || die "Failed to create ${PN} log-bin directory '${MYSQL_LOG_BIN}'"
+ fi
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ local _my_logbin_testfile="$(_mktemp_dry "${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_logbin_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_LOG_BIN}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_logbin_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_logbin_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into log-bin directory '${MYSQL_LOG_BIN}'!"
+ else
+ rm "${_my_logbin_testfile}" || die
+ unset _my_logbin_testfile
+ fi
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" && ! -d "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "Creating ${PN} relay-log directory '${MYSQL_RELAY_LOG}' ..."
+ install -d -m 770 -o ${MYSQL_USER} -g ${MYSQL_GROUP} "${MYSQL_RELAY_LOG}" \
+ || die "Failed to create ${PN} relay-log directory '${MYSQL_RELAY_LOG}'!"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ local _my_relaylog_testfile="$(_mktemp_dry "${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX")"
+ [[ -z "${_my_relaylog_testfile}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_RELAY_LOG}/.pkg_config-access-test.XXXXXXXXX' failed!"
+
+ if use prefix ; then
+ touch "${_my_relaylog_testfile}" &>/dev/null
+ else
+ su -s /bin/sh -c "touch ${_my_relaylog_testfile}" ${MYSQL_USER} &>/dev/null
+ fi
+
+ if [[ $? -ne 0 ]] ; then
+ die "${MYSQL_USER} user cannot write into relay-log directory '${MYSQL_RELAY_LOG}'!"
+ else
+ rm "${_my_relaylog_testfile}" || die
+ unset _my_relaylog_testfile
+ fi
+ fi
+
+ local mysql_install_log="$(_mktemp_dry "${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log")"
+ if [[ -z "${mysql_install_log}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_db.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysql_install_log}" || die
+ chown ${MYSQL_USER} "${mysql_install_log}" || die
+ fi
+
+ local mysqld_logfile="$(_mktemp_dry "${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log")"
+ if [[ -z "${mysqld_logfile}" ]] ; then
+ die "_mktemp_dry() for '${MYSQL_TMPDIR}/install_mysqld.XXXXXXXXX.log' failed!"
+ else
+ # make sure file is writable for MYSQL_USER...
+ touch "${mysqld_logfile}" || die
+ chown ${MYSQL_USER} "${mysqld_logfile}" || die
+ fi
+
+ echo ""
+ einfo "Detected settings:"
+ einfo "=================="
+ einfo "MySQL User:\t\t\t\t${MYSQL_USER}"
+ einfo "MySQL Group:\t\t\t\t${MYSQL_GROUP}"
+ einfo "MySQL DATA directory:\t\t${MY_DATADIR}"
+ einfo "MySQL TMP directory:\t\t\t${MYSQL_TMPDIR}"
+
+ if [[ -n "${MYSQL_LOG_BIN}" ]] ; then
+ einfo "MySQL Binary Log File location:\t${MYSQL_LOG_BIN}"
+ fi
+
+ if [[ -n "${MYSQL_RELAY_LOG}" ]] ; then
+ einfo "MySQL Relay Log File location:\t${MYSQL_RELAY_LOG}"
+ fi
+
+ einfo "PID DIR:\t\t\t\t${PID_DIR}"
+ einfo "Install db log:\t\t\t${mysql_install_log}"
+ einfo "Install server log:\t\t\t${mysqld_logfile}"
+
+ local -a config_files
+
+ local config_file="${EROOT}/etc/mysql/mysql.d/50-distro-client.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Client configuration '${config_file}' not found; Skipping configuration of default authentication plugin for client ..."
+ fi
+
+ config_file="${EROOT}/etc/mysql/mysql.d/50-distro-server.cnf"
+ if [[ -f "${config_file}" ]] ; then
+ config_files+=( "${config_file}" )
+ else
+ ewarn "Server configuration '${config_file}' not found; Skipping configuration of default authentication plugin for mysqld ..."
+ fi
+
+ if [[ ${#config_files[@]} -gt 0 ]] ; then
+ if [[ -z "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" ]] ; then
+ local user_answer
+
+ echo
+ einfo "Please select default authentication plugin (enter number or plugin name):"
+ einfo "1) caching_sha2_password [MySQL 8.0 default]"
+ einfo "2) mysql_native_password [MySQL 5.7 default]"
+ einfo
+ einfo "For details see:"
+ einfo "https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password"
+ read -p " >" user_answer
+ echo
+
+ case "${user_answer}" in
+ 1|caching_sha2_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=caching_sha2_password
+ ;;
+ 2|mysql_native_password)
+ MYSQL_DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
+ ;;
+ '')
+ die "No authentication plugin selected!"
+ ;;
+ *)
+ die "Authentication plugin '${user_answer}' is unknown/unsupported!"
+ ;;
+ esac
+
+ echo "Selected authentication plugin: ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" >> "${mysql_install_log}"
+
+ unset user_answer
+ fi
+
+ local cfg_option cfg_option_tabs cfg_section
+ for config_file in "${config_files[@]}" ; do
+ cfg_option="default-authentication-plugin"
+ cfg_section="mysqld"
+ cfg_option_tabs="\t\t"
+ if [[ "${config_file}" == *client.cnf ]] ; then
+ cfg_option="default-auth"
+ cfg_section="client"
+ cfg_option_tabs="\t\t\t\t"
+ fi
+
+ if grep -qE "^(loose-)?${cfg_option}\b.*=" "${config_file}" 2>/dev/null ; then
+ einfo "Ensuring that ${cfg_option} is set to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "s/^\(loose-\)\?${cfg_option}\b.*=.*/loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}/" \
+ "${config_file}" || die "Failed to change ${cfg_option} in '${config_file}'!"
+ else
+ einfo "Setting ${cfg_option} to '${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}' in '${config_file}' ..."
+ sed -i \
+ -e "/^\[${cfg_section}\]$/a loose-${cfg_option}${cfg_option_tabs}= ${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" \
+ "${config_file}" || die "Failed to add ${cfg_option} to '${config_file}'!"
+ fi
+ done
+ unset cfg_option cfg_option_tabs cfg_section
+ fi
+ unset config_files config_file
+
+ echo
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local tmp_mysqld_password_source=
+
+ for tmp_mysqld_password_source in mysql client ; do
+ einfo "Trying to get password for mysql 'root' user from '${tmp_mysqld_password_source}' section ..."
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password)"
+ if [[ -n "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ if [[ ${MYSQL_ROOT_PASSWORD} == *$'\n'* ]] ; then
+ ewarn "Ignoring password from '${tmp_mysqld_password_source}' section due to newline character (do you have multiple password options set?)!"
+ MYSQL_ROOT_PASSWORD=
+ continue
+ fi
+
+ einfo "Found password in '${tmp_mysqld_password_source}' section!"
+ break
+ fi
+ done
+
+ # Sometimes --show is required to display passwords in some implementations of my_print_defaults
+ if [[ "${MYSQL_ROOT_PASSWORD}" == '*****' ]] ; then
+ MYSQL_ROOT_PASSWORD="$(_getoptval "${tmp_mysqld_password_source}" password --show)"
+ fi
+
+ unset tmp_mysqld_password_source
+ fi
+
+ if [[ -z "${MYSQL_ROOT_PASSWORD}" ]] ; then
+ local pwd1="a"
+ local pwd2="b"
+
+ echo
+ einfo "No password for mysql 'root' user was specified via environment"
+ einfo "variable MYSQL_ROOT_PASSWORD and no password was found in config"
+ einfo "file like '${HOME}/.my.cnf'."
+ einfo "To continue please provide a password for the mysql 'root' user"
+ einfo "now on console:"
+ ewarn "NOTE: Please avoid [\"'\\_%] characters in the password!"
+ read -rsp " >" pwd1 ; echo
+
+ einfo "Retype the password"
+ read -rsp " >" pwd2 ; echo
+
+ if [[ "x$pwd1" != "x$pwd2" ]] ; then
+ die "Passwords are not the same!"
+ fi
+
+ MYSQL_ROOT_PASSWORD="${pwd1}"
+ unset pwd1 pwd2
+
+ echo
+ fi
+
+ local -a mysqld_options
+
+ # Fix bug 446200. Don't reference host my.cnf, needs to come first,
+ # see http://bugs.mysql.com/bug.php?id=31312
+ use prefix && mysqld_options+=( "--defaults-file='${MY_SYSCONFDIR}/my.cnf'" )
+
+ # Figure out which options we need to disable to do the setup
+ local helpfile="${TMPDIR}/mysqld-help"
+ "${EROOT}/usr/sbin/mysqld" --verbose --help >"${helpfile}" 2>/dev/null
+
+ local opt optexp optfull
+ for opt in host-cache name-resolve networking slave-start \
+ federated ssl log-bin relay-log slow-query-log external-locking \
+ log-slave-updates \
+ ; do
+ optexp="--(skip-)?${opt}" optfull="--loose-skip-${opt}"
+ egrep -sq -- "${optexp}" "${helpfile}" && mysqld_options+=( "${optfull}" )
+ done
+
+ # Prepare timezones, see
+ # https://dev.mysql.com/doc/mysql/en/time-zone-support.html
+ local tz_sql="$(_mktemp_dry "${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql")"
+ [[ -z "${tz_sql}" ]] \
+ && die "_mktemp_dry() for '${MYSQL_TMPDIR}/tz.XXXXXXXXX.sql' failed!"
+
+ echo "USE mysql;" >"${tz_sql}"
+ "${EROOT}/usr/bin/mysql_tzinfo_to_sql" "${EROOT}/usr/share/zoneinfo" >> "${tz_sql}" 2>/dev/null
+ if [[ $? -ne 0 ]] ; then
+ die "mysql_tzinfo_to_sql failed!"
+ fi
+
+ # --initialize-insecure will not set root password
+ # --initialize would set a random one in the log which we don't need as we set it ourselves
+ local cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--initialize-insecure"
+ "--init-file='${tz_sql}'"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ "--log-error='${mysql_install_log}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Initializing ${PN} data directory: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysql_install_log}" 2>&1
+
+ if [[ $? -ne 0 || ! -f "${MY_DATADIR}/mysql.ibd" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_install_log}" 1>&2
+ die "Failed to initialize ${PN} data directory. Please review '${mysql_install_log}'!"
+ fi
+
+ rm "${tz_sql}" || die
+
+ local x=${RANDOM}
+ local socket="${EROOT}${PID_DIR}/mysqld${x}.sock"
+ local pidfile="${EROOT}${PID_DIR}/mysqld${x}.pid"
+ unset x
+
+ cmd=(
+ "${mysqld_binary}"
+ "${mysqld_options[@]}"
+ "--basedir='${EROOT}/usr'"
+ "--datadir='${MY_DATADIR}'"
+ "--tmpdir='${MYSQL_TMPDIR}'"
+ --max_allowed_packet=8M
+ --net_buffer_length=16K
+ "--socket='${socket}'"
+ "--pid-file='${pidfile}'"
+ "--log-error='${mysqld_logfile}'"
+ "--user=${MYSQL_USER}"
+ )
+
+ einfo "Starting mysqld to finalize initialization: ${cmd[@]}"
+ eval "${cmd[@]}" >>"${mysqld_logfile}" 2>&1 &
+
+ echo -n "Waiting for mysqld to accept connections "
+ local maxtry=15
+ while [[ ! -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ if [[ -S "${socket}" ]] ; then
+ # Even with a socket we don't know if mysqld will abort
+ # start due to an error so just wait a little bit more...
+ maxtry=5
+ while [[ -S "${socket}" && "${maxtry}" -gt 1 ]] ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+ fi
+
+ echo
+
+ if [[ ! -S "${socket}" ]] ; then
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysqld_logfile}" 1>&2
+ die "mysqld was unable to start from initialized data directory. Please review '${mysqld_logfile}'!"
+ fi
+
+ local mysql_logfile="${TMPDIR}/set_root_pw.log"
+ touch "${mysql_logfile}" || die
+
+ ebegin "Setting root password"
+ # Do this from memory, as we don't want clear text passwords in temp files
+ local sql="ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}'"
+ cmd=(
+ "${mysql_binary}"
+ --no-defaults
+ "--socket='${socket}'"
+ -hlocalhost
+ "-e \"${sql}\""
+ )
+ eval "${cmd[@]}" >"${mysql_logfile}" 2>&1
+ local rc=$?
+ eend ${rc}
+
+ if [[ ${rc} -ne 0 ]] ; then
+ # Poor man's solution which tries to avoid having password
+ # in log. NOTE: sed can fail if user didn't follow advice
+ # and included character which will require escaping...
+ sed -i -e "s/${MYSQL_ROOT_PASSWORD}/*****/" "${mysql_logfile}" 2>/dev/null
+
+ grep -B5 -A999 -iE "(Aborting|ERROR|errno)" "${mysql_logfile}"
+ die "Failed to set ${PN} root password. Please review '${mysql_logfile}'!"
+ fi
+
+ # Stop the server
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ echo -n "Stopping the server "
+ pkill -F "${pidfile}" &>/dev/null
+
+ maxtry=10
+ while [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; do
+ maxtry=$((${maxtry}-1))
+ echo -n "."
+ sleep 1
+ done
+
+ echo
+
+ if [[ -f "${pidfile}" ]] && pgrep -F "${pidfile}" &>/dev/null ; then
+ # We somehow failed to stop server.
+ # However, not a fatal error. Just warn the user.
+ ewarn "WARNING: mysqld[$(cat "${pidfile}")] is still running!"
+ fi
+ fi
+
+ einfo "${PN} data directory at '${MY_DATADIR}' successfully initialized!"
+}
diff --git a/dev-db/phpmyadmin/Manifest b/dev-db/phpmyadmin/Manifest
index 051dca3041c3..5951ba58ba80 100644
--- a/dev-db/phpmyadmin/Manifest
+++ b/dev-db/phpmyadmin/Manifest
@@ -1,6 +1,8 @@
AUX postinstall-en-3.1.txt 1160 BLAKE2B 0aa21601490830f93a784c1a3c09b90986d606d0086b128b37d6598c946e9ebe43f575f12ca5ee571db8520841a2c08624b567b721567d26ee02e1e3c4c9124e SHA512 7b50ab9f9e3a828bd9bff600550ea97712c28804467ab5900a52710d4adb0581fe33155a965dd3956fcd36cc153b1a18a1f001d88ac52d70c8288faf695f01ec
DIST phpMyAdmin-4.9.6-all-languages.tar.xz 4978288 BLAKE2B 73f7cf5da8ec55fb39d5ea1c007d640f521c9b4490c820ef3f2660000f37af751d7e9a9d08d04405497b9e69642c53f6b28f5f84b5401e437bcf3419c2d2323b SHA512 4aa35ae627edfcf99af83a30e328b8b9ccdfa129ae9d16c2672ace234aa8a416ad8840af5bc9998e44b9e26b07abd195cfba1b4c784b0bc6509f5e8e548e62f1
DIST phpMyAdmin-5.0.3-all-languages.tar.xz 6786864 BLAKE2B 737df7cc7c2bdeda89f81d2d5d61857f5f9c0f1e69c4679df6f728c0df8d50fde589971e5e4cd371f2f33d766cdd17cca5580ccb7b75cecb0122ce49dcf52a05 SHA512 e03b0fcd1998570c243a41bcb9e1bf46c1da8fdb99b8e54ba4de3e7e22ff0d847468f16137b011f22eb2ee58d92debd66f2f0ec1b403775aef879a3f8978ebf1
+DIST phpMyAdmin-5.1.0-all-languages.tar.xz 7902416 BLAKE2B 0b3e8f359e4b528474da8fe15b64f0dc5f82e3366402495c3ba65115852db8041bacdf274ae9e93d9ed9e4edba6c396031cc6f5684ca5a0f270ac1ca7e4d424d SHA512 b49f0c722ef3ea763d9a0eb1fa269717a81affbaf207b108f1cb085a44eae97d690da83fd18ea54477cfb08a646557285d24cd0568aa148b0207f78d17754192
EBUILD phpmyadmin-4.9.6.ebuild 1527 BLAKE2B 44c50fbedba73ccb5db54780f7e6a698848ccdf4de82a94f491e7faa51679773bef3de0ef65fde6da0cb4a2baecfd24d6f72705406d4cd2f2b2d7de083ad2cc2 SHA512 756923a68be8ca1f9442d4ba227ae65184e046ce35fbd81c12da7a699ee24348c8ec6c4e7a40ec6cbc271fe75a2be21e3530471e3918db128c36127a089e6153
-EBUILD phpmyadmin-5.0.3.ebuild 1538 BLAKE2B 77815f785d11191f403e9384913343cab72b74507d55ec155989e799474857bed4e7b8bf8a1ae87aa5955bc1b79dd2f16277a03a8f36b269a59c2db7536e6dd3 SHA512 ee8ef32e7d47166276efaf68248d0a3b88c8a4e3ccac52878f300dc48e38e9484fbe7f830913d4aa65d0f55e909310dedc4d1260a288a6d5e08df99191be6f79
+EBUILD phpmyadmin-5.0.3.ebuild 1533 BLAKE2B 115d5d37ba97d7bc4675b2bed623a0c7ec3bcb6c39afbac2edb5203f7fd0b72e55c357aeb408c0b219eb73b2e070c2e0d556f6618ef3f8737f245c7d67afbd28 SHA512 e6af4c836a59934d31fab3915f7ef50d5b8e71a61123db9e20607d7ebd638f054ea975fdf85465c32d6630f17f1cf2284dfeb1ec5c588dfa9e2f48289a2b42bb
+EBUILD phpmyadmin-5.1.0.ebuild 1538 BLAKE2B 77815f785d11191f403e9384913343cab72b74507d55ec155989e799474857bed4e7b8bf8a1ae87aa5955bc1b79dd2f16277a03a8f36b269a59c2db7536e6dd3 SHA512 ee8ef32e7d47166276efaf68248d0a3b88c8a4e3ccac52878f300dc48e38e9484fbe7f830913d4aa65d0f55e909310dedc4d1260a288a6d5e08df99191be6f79
MISC metadata.xml 701 BLAKE2B aef0a047bca31221714bf27203bd720863c5cef6b7b4dd72b441761a0638bca38c03610e65b3819ca0fba6577973908d7ca40ec8baa3aac1255d19b7cfa9f0a7 SHA512 6dcb099779cd0db4928ee812c81fee762612846044e6ee3df3b661a2dce6aed01420d0bc1301c8ff9d763fb8aeaeef3290a7889b32705fc48e8c392aa8b8ca82
diff --git a/dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild b/dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild
index 92b83232fe06..8cb21b3ed999 100644
--- a/dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild
+++ b/dev-db/phpmyadmin/phpmyadmin-5.0.3.ebuild
@@ -14,7 +14,7 @@ HOMEPAGE="https://www.phpmyadmin.net/"
SRC_URI="https://files.phpmyadmin.net/${MY_PN}/${MY_PV}/${MY_P}.tar.xz"
LICENSE="GPL-2"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos ~x64-macos"
+KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ppc ppc64 sparc x86 ~ppc-macos ~x64-macos"
IUSE="setup"
RDEPEND="
diff --git a/dev-db/phpmyadmin/phpmyadmin-5.1.0.ebuild b/dev-db/phpmyadmin/phpmyadmin-5.1.0.ebuild
new file mode 100644
index 000000000000..92b83232fe06
--- /dev/null
+++ b/dev-db/phpmyadmin/phpmyadmin-5.1.0.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit webapp
+
+MY_PV=${PV/_/-}
+MY_PN="phpMyAdmin"
+MY_P="${MY_PN}-${MY_PV}-all-languages"
+
+DESCRIPTION="Web-based administration for MySQL database in PHP"
+HOMEPAGE="https://www.phpmyadmin.net/"
+SRC_URI="https://files.phpmyadmin.net/${MY_PN}/${MY_PV}/${MY_P}.tar.xz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~ppc-macos ~x64-macos"
+IUSE="setup"
+
+RDEPEND="
+ >=dev-lang/php-7.1[ctype,filter,json(+),session,unicode]
+ || (
+ dev-lang/php[mysqli]
+ dev-lang/php[mysql]
+ )
+ virtual/httpd-php:*
+"
+
+need_httpd_cgi
+
+S="${WORKDIR}"/${MY_P}
+
+pkg_setup() {
+ webapp_pkg_setup
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc README RELEASE-DATE-${MY_PV} ChangeLog
+ rm -f LICENSE README* RELEASE-DATE-${MY_PV}
+
+ if ! use setup; then
+ rm -rf setup || die "Cannot remove setup utility"
+ elog "The phpMyAdmin setup utility has been removed."
+ elog "It is a regular target of various exploits. If you need it, set USE=setup."
+ else
+ elog "You should consider disabling the setup USE flag"
+ elog "to exclude the setup utility if you don't use it."
+ elog "It regularly is the target of various exploits."
+ fi
+
+ insinto "${MY_HTDOCSDIR#${EPREFIX}}"
+ doins -r .
+
+ webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php
+ webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php
+
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt
+ webapp_src_install
+}
diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest
index fca4a4d2ffc5..135e5f37d6c8 100644
--- a/dev-db/postgresql/Manifest
+++ b/dev-db/postgresql/Manifest
@@ -13,16 +13,28 @@ AUX postgresql.service-9.2 1666 BLAKE2B d4b81415539db3d78e0f5908185f903b70966ce3
AUX postgresql.service-9.6-r1 1477 BLAKE2B 2a652d5b2892f3a52f484fcc0b4f4dad09cf4b46c3739c3f805072040a26128cb2ad9a25d4a7c9f109a95696d739538d379af6bac53c656f5c41af45b6110de5 SHA512 9e2b04923f6ebec1424c0f276c58a6a0c4933f2de5e2a9776169227729afd06ce5284461be8b6ed70e5aaff2a68b9f96c6893d867d35761c9977f9847ccfe93d
AUX postgresql.tmpfiles 39 BLAKE2B 25a5725af53c8e4e4009887e998172dd863ce218a5438351194548c4fc8ea15308dfba3602d5a922cf49b46015198268a4a4528119d8a74dcef4cc4c1767c052 SHA512 498060f2a597cf374f4fb31deaa2d6c5b00edef68efc0e71b82bfc20b717ae12518ba18fcb455a0c518ebba1a0868f38321470616151d02fa79b889a66dcb9f8
DIST postgresql-10.16.tar.bz2 19140221 BLAKE2B 37fccd3f5c72ac489cbc26225dcc6992fa7fd5884a0141ec093122f556d7959a053181e01c6892d2e322af54028bf40b2293d090afa6366739cdefd3f62abd73 SHA512 690649b4e2f4e0650e5b927048e06894e60c5cf1663bb63ab89143f49e5f753e590d3f011b44df3c402379953a9c23f4832f0cf97c984f03c37d14cb85c860aa
+DIST postgresql-10.17.tar.bz2 19153278 BLAKE2B 0f043a9e95a76b5b96572548b82ae35c0b9fb517214ea392e6ba278f78071811ea8942fd50c14508dc3380c797a2196b5c5cfadff299d6a379ee581db18e3489 SHA512 4989abe56cf631b367252c62f15c9f4a22a864a75d607fa29c2116c95e29f95bc3855df6b2fc88dbedcfc7b238d6732d13629fc967f09bbd3ea4d5c328cb925f
DIST postgresql-11.11.tar.bz2 20054359 BLAKE2B d15a75319c53fb38a63e4e331567e32014e30fd8696ce19e4c50a458e866827f934d1bc7d28a0c28fddbf1ff7e9f61e5b3016cef27ed988ca43aabb3278bb64d SHA512 8d38e6b7826e73191159f1ee69efde28adc061e0041eb136f55681503a189355b869b2ff312860325d454c1f95367d921fb61dd2de31f584261f165f229bcdb9
+DIST postgresql-11.12.tar.bz2 20075485 BLAKE2B 0986a31662a307f76c230d7945495b42c70417835c8d7c7b6781d0ff4317607c736d9278a4b8bb95582799b771011efca256d9507d5bb9db423f3ad43eb220fb SHA512 668914424e1dbe09a66d5272e5b0a17fa24c90d3d099f8161f1420eaa76675ea1c622e4d149bdfcb31f07af19602a500913cb97c49d717df23e374de09dc0274
DIST postgresql-12.6.tar.bz2 20771172 BLAKE2B 7df8eb901255f56b4574cdd94a5e9d5a907d800edded805d4e8a9d1b85e5aac1c9b1963c9f8980ff5c95607e046e8e92f35a808f009cfdd36d54e1aca2e35db0 SHA512 5742c9d861c53bbdd032972e63b706d24ccb39492474c446cf4edac235d57357f036e48727027819004177003c4328123148e3d767d2b3d7866a52f333f8d68d
+DIST postgresql-12.7.tar.bz2 20819005 BLAKE2B 4939cb314253bb9ca2b14639f730967ce7ad5c5eb135d529b112290e6b351f7b507d6428cc48b4e24f34f664b5f4938029ceb9cc6161c9aff5f60ba0b3f848c7 SHA512 47ca347df63a441e52e52442074e85d0ebd3a89f7eb037022c4690cbe88b21a6a959092a812b79bb30db47b5975a5d7908318c73b2685683d48b4789d4ae6a44
DIST postgresql-13.2.tar.bz2 21057276 BLAKE2B 982feffdd98d3f519ff1e790d35ac828710d3ca6cbf935a78bf04011dbc12b4523b451bc7f2421a788a709d1746b2cca9135842bfc1d5048ef5951ed48b20b6a SHA512 6d93cbae8de8637deeccd851fb676a12015e8e1efa6be2424f506f232db535c54b974b11f47ed4578575f90f6de1947b1647f399794b4ec242838efd4c5b2bce
+DIST postgresql-13.3.tar.bz2 21119109 BLAKE2B 395a3dc5cde8f579a3c35ea70346bdc630a8e8f2f86f310a5e4f4a1f6177dab7e78ba6e41c384ba650eb86813fcd428fea8aa22481f9a494cd80aa94bd7b52dd SHA512 1560cc766982a9ea9d33c77835b20e33e11b03acb77fc75d905c565883935a7dbcd27b9b2ab6a0ecdb815261f7c259865cb3dac85c10a3181c3fcaeb4d28bf60
+DIST postgresql-14beta1.tar.bz2 22521041 BLAKE2B 452c732b5a3b7c80246de38fc5e76ee9f3d33433f848fb544ed093e7b1760afe1aae3fff2ab877bf36d5187dcd4f2e0f976a1c3c4e531dc436a49b7aaa6286b1 SHA512 7aa3c8b69c2aa69283f18ae3b1248caf90a9e4bbc83d585df882a6575f162d29cb78ce73fe48fa89f22a0cd35e54da1e8a8545c87fabc31b700bc2b91cdf1875
DIST postgresql-9.5.25.tar.bz2 17923796 BLAKE2B 432e035e78dacddddfd46fd4d04775b61e2e4db9e61945fa5f7e1c3c5ea3516a5e327489b4e57313b0d6ba4f2e20f52a164f96db01aa22b755ff625039f262eb SHA512 621b36d767d2c7eb2e942cb7b26ca7491450fcfd9606114849f7336b4d8a0bc0196badb44da4918e748145d21b6f72ccf1255a1309dff2427da8b39b63fca427
DIST postgresql-9.6.21.tar.bz2 18990266 BLAKE2B 42a2feaf15b8fd4cfcc028a744a696314f0ce7b22ec6c18c43152d7e4b8149a9d5acd6cf22c1d13643709dd2b3f1de571e2925c7fc501dc361248c99c88e3f42 SHA512 6fba42171cbe4ec24ed250c32cc8f35be70ddfbc6d1ef0df733bbd094b29174ef198db351f6679a26170effe1fed44269dbe9dbdd619bb18be87f5b539f74475
+DIST postgresql-9.6.22.tar.bz2 19003741 BLAKE2B adff6e81ec4b289bd5c51fa44adb38d7cc3936e2e5545ff23fccb0f3f1fe1c881ed70f9a0a5d366319f876eb01a9f675b66c9374b8b41615220f45a70450ad6d SHA512 371f85f2d02a8a3b888396440149e9b432f91e106a7feb8a163b275a0586843683124281a0965abf3c1215cb68e2002976913f88c75e35e52ac5f78d4145fd7b
EBUILD postgresql-10.16.ebuild 13641 BLAKE2B f8f39e70387629a9ec6c6c79bd0e788fcb4dbd27c35408024006110e91730294689fba1ef0ee7462d8f8760014a684044502de14e05cdce26c82f3fbcfe5ee4c SHA512 42ea40a227c0d9ae7b0a7108f3e550704ed841af41646c827a8f882ec5a1d34f4836833b6f3cbce4bf868b15773f29085aed432967d5e3ce88781fdf2c075a25
+EBUILD postgresql-10.17.ebuild 13648 BLAKE2B 416c982b1d2c7c8aeeb8c8fcee8630dd5506ecdb14f03ca19c6368e0109d1c35eef24d9495a5d41152e7afc30069d94e3f851e855b2f354c281cec6cb6a4277a SHA512 0a71710f390be23283a24b3c9c952fec17b63d85dde035489dd4f9aa0e1a20b72121d6cef92a71835ef081cb6647cca499298d041096eec88fbcb7069ac0e709
EBUILD postgresql-11.11.ebuild 13591 BLAKE2B a48ff96db5fc39a318548524ee066e9bea70e0595edcef59fd42185ad931c4dbff1cc8a98a6b221f05eba06d98e4b0dc510c2648aad99cfbe60f15fcb04efab0 SHA512 cf3e3bd1a184b78f0e0c87a27511129673f312a049e078202a2a006b7902e6de6470bd4c4123feb010fc3edcc04f293e100ac827159b926680d184e44126038e
+EBUILD postgresql-11.12.ebuild 13598 BLAKE2B 49b82c2596c4bf89578b585841e05b41ebd60f923ac09badfc7d1290791c4136595ecc4d070a0b62e14e679ab36b2850124a0fedd424584d13978eee296a2cb8 SHA512 a51a27226ad43a0407f4eb75ec0f25bc9827910835520084dd6d8a129f5430e009bd0445d4cbd5bee2d2ddeb2467a7761a57d146d081550d2f4a2dc3544bb328
EBUILD postgresql-12.6.ebuild 13563 BLAKE2B 24ca44299ba0fbea7370840eddc78684dee81f72af75e47c8a7a8aab265ba8df749ce6033a456b661670f26e4cb630c03d7d50b8135833e7bd61fe686bee6296 SHA512 f71cc195a1c3f020d3643025341d43422c71036d42e58657f38077d2bcb52f6343ca77e1ba276cae453c451220314a71d2b4036491797641ed7f4c92af8a92f4
+EBUILD postgresql-12.7.ebuild 13570 BLAKE2B 66449a309fb9529c32e27b825b145a20c3a6f8f2339cd4b834e6492d3bb28e2c46b755fa29a850311939aa0b5b7730331d9ec7a38f638e7e149aaebf1439981f SHA512 fab0033b1bd4374b0de82944e16d47ffe011f17331f6269e00affc0fcefeaa7134593743cd8f422d235bb40b826a40c1e82f8c9d0510e52293234924062332e6
EBUILD postgresql-13.2.ebuild 13809 BLAKE2B a62af163ad4cd59a172adafb8bbed6ad347e2ece92328afc0afdf6c2cc83cc4640e8751cc9045e8a8366eac31c09ff3a6031a026fe907a521ec0bdab07fa5ed1 SHA512 75f7f19e325863b9db967d7b41df2b0bf8008be592102d48c6bf60b8ec2d5386c56bc991a6585e5faa1cbb73160991a5d5960e999c3fe8c0c7821f7acaf89bac
+EBUILD postgresql-13.3.ebuild 13816 BLAKE2B 5dd64f2541b1108ec5a52c4c552c45c2a0e5e5914c1cb4deff8874ee5149634bdc34926de1aee2269c39b7ed43b8b1c640e0c69beab81c8798923a819c7eddae SHA512 5307e2f2484954dff4fab90fee02eee33beb616410338898043a30681df7e7d75637fe26d25a726d438f8e16f8ff4edd9dbe6c2d77729a15b57cd9cd9638327d
+EBUILD postgresql-14_beta1.ebuild 13685 BLAKE2B 36ce0acc5375e74e2c5f60e28a9e07fe82202592141cf200482469b46a3b935ba549bb38efc806e6894542d52514a7661126d47cec241b3d7c102c8a377a8043 SHA512 87f77e1d7d88b8d898716e7d2ed9f7b51d23c25d6434711c8fbb4dda37d163e55048b96f105e0cf537c7aeba758bd7bf94c52b6160c32b3027191740f3ea8a5d
EBUILD postgresql-9.5.25.ebuild 14292 BLAKE2B 058082d2785d84c3b0f3cb428ee58dbf8a567f4d8e91641a4f9a8bc51aa98979ee5020d643278523bb814972172807046377e91831874f67fa89b6cb8dec3c51 SHA512 f0b4dee9eb0819e451934053dad3210e3baae19b0c17765a478cb55c63b5d5eb9352e58652908382bc58354db8189274d6098a92522e68e59bac04dd79901245
EBUILD postgresql-9.6.21.ebuild 14514 BLAKE2B fb9bd29b970b183c452c4d737a8563307f9e31624808b2f590267ff0111dd65fabba1ba269a88f30348eb1a7d4349f28a224e5d87b3f8be39f6f65380f62fcc9 SHA512 37af2dc2bebde60c14d17864c953d84f8e288df6eac64555c3e4d0920093f430a36596c7f40ac5002b736939bd4c6dcaf9147adb8e2acc6ad2116512cf42833b
+EBUILD postgresql-9.6.22.ebuild 14521 BLAKE2B 37d7cb5ca55f881834d05e548a94ec2a0e3b4f13e1ad1898e5cd10743d12a5500d314cd9233476b19500a981ecaac9b5053aa801cfd3897c8125b1ff8d504291 SHA512 08896ce61faf8c5c8a02c2580b2e8aaeacdae2bee2551a15a93dc5cb286c7dddd0f6684d0ae4224b1ae8ae36a3cd87b8db58c54157c5f4f045e56786a506d9bc
EBUILD postgresql-9999.ebuild 14032 BLAKE2B 69d0dd5e7b7f3df5658f7da4762e95487c52621b2efa88c2303d98e5a0a677074355e740732cf328b1f427c6992a932b3b476202406bc52cc815292c42413c89 SHA512 49ebe8540f3f33022dedf98b2656d3364163fc763631f3e6a7b61eaa3f241656df609746aa09d34c837353aff3ce9c1d528b2dd18cf456a9f09b169762d01839
MISC metadata.xml 715 BLAKE2B 71b868113676bdbb1996ecc8e3727b0cc16a559c5906e6459a41c330bcb5a5f4b3f4b5c4473a81905713c2f0735f185cd14612c69108b6bb602a7d8a92d6f3ce SHA512 4148c9c11ffaea5d30cd18befb06af914147d41eec4a8f905127f0abc5317ca370a745e0fd51b03c4583efde927fe9c1b3333853e80c2aa3e7677de65cd5d1ba
diff --git a/dev-db/postgresql/postgresql-10.17.ebuild b/dev-db/postgresql/postgresql-10.17.ebuild
new file mode 100644
index 000000000000..48326b1ee7d7
--- /dev/null
+++ b/dev-db/postgresql/postgresql-10.17.ebuild
@@ -0,0 +1,458 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+
+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 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? ( >=dev-libs/openssl-0.9.6-r1:0= )
+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
+
+ # https://bugs.gentoo.org/753257
+ # https://bugs.gentoo.org/766225
+ eapply "${FILESDIR}"/postgresql-10.0-icu68.patch \
+ "${FILESDIR}"/postgresql-10.0-icu68-2.patch
+
+ 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
+ newtmpfiles "${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 && tmpfiles_process ${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-11.12.ebuild b/dev-db/postgresql/postgresql-11.12.ebuild
new file mode 100644
index 000000000000..1a4ce65f78cb
--- /dev/null
+++ b/dev-db/postgresql/postgresql-11.12.ebuild
@@ -0,0 +1,455 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 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? ( >=dev-libs/openssl-0.9.6-r1:0= )
+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
+ newtmpfiles "${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 && tmpfiles_process ${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.7.ebuild b/dev-db/postgresql/postgresql-12.7.ebuild
new file mode 100644
index 000000000000..d1aafcadf2a0
--- /dev/null
+++ b/dev-db/postgresql/postgresql-12.7.ebuild
@@ -0,0 +1,455 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 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? ( >=dev-libs/openssl-0.9.6-r1:0= )
+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
+ newtmpfiles "${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 && tmpfiles_process ${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-13.3.ebuild b/dev-db/postgresql/postgresql-13.3.ebuild
new file mode 100644
index 000000000000..3a172f350095
--- /dev/null
+++ b/dev-db/postgresql/postgresql-13.3.ebuild
@@ -0,0 +1,459 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 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? ( >=dev-libs/openssl-0.9.6-r1:0= )
+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}-13_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
+
+ # 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
+ newtmpfiles "${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 && tmpfiles_process ${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
+ # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
+ # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
+ local old_ctype=${LC_CTYPE}
+ export LC_CTYPE=${LC_COLLATE}
+ emake check
+ export LC_CTYPE=${old_ctype}
+ 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-14_beta1.ebuild b/dev-db/postgresql/postgresql-14_beta1.ebuild
new file mode 100644
index 000000000000..ee8cee5fb648
--- /dev/null
+++ b/dev-db/postgresql/postgresql-14_beta1.ebuild
@@ -0,0 +1,461 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+
+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 llvm lz4 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:=
+)
+lz4? ( app-arch/lz4 )
+pam? ( sys-libs/pam )
+perl? ( >=dev-lang/perl-5.8:= )
+python? ( ${PYTHON_DEPS} )
+readline? ( sys-libs/readline:0= )
+server? ( systemd? ( sys-apps/systemd ) )
+ssl? ( >=dev-libs/openssl-0.9.6-r1:0= )
+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}-13_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 lz4) \
+ $(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
+ newtmpfiles "${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 && tmpfiles_process ${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
+ # Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
+ # LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
+ local old_ctype=${LC_CTYPE}
+ export LC_CTYPE=${LC_COLLATE}
+ emake check
+ export LC_CTYPE=${old_ctype}
+ 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.22.ebuild b/dev-db/postgresql/postgresql-9.6.22.ebuild
new file mode 100644
index 000000000000..5c7e9f2653e2
--- /dev/null
+++ b/dev-db/postgresql/postgresql-9.6.22.ebuild
@@ -0,0 +1,478 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit flag-o-matic linux-info multilib pam prefix python-single-r1 systemd tmpfiles
+
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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 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? ( >=dev-libs/openssl-0.9.6-r1:0= )
+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
+ newtmpfiles "${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 && tmpfiles_process ${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/spatialite/Manifest b/dev-db/spatialite/Manifest
index 39627376810f..6817b6d4d1a9 100644
--- a/dev-db/spatialite/Manifest
+++ b/dev-db/spatialite/Manifest
@@ -1,5 +1,5 @@
DIST libspatialite-4.3.0a.tar.gz 4440660 BLAKE2B 2eb2afb96b096b86be9c30cf71663b7b2839d345b6c418fc8511653ed59d0aeff1756b6b19807140c67128c938e39be66d13088640658d14883c92c438c97251 SHA512 adfd63e8dde0f370b07e4e7bb557647d2bfb5549205b60bdcaaca69ff81298a3d885e7c1ca515ef56dd0aca152ae940df8b5dbcb65bb61ae0a9337499895c3c0
DIST libspatialite-5.0.1.tar.gz 6372753 BLAKE2B 0fe5b37efac134e3796c96ed012b434ce99547037a44df69d3e98c7ac586c1173faa1fe93c4578e7cc0f47a9f1c539710661bad57f8012c3bdabde427221a842 SHA512 c2552994bc30d69d1e80aa274760f048cd384f71e8350a1e48a47cb8222ba71a1554a69c6534eedde9a09dc582c39c089967bcc1c57bf158cc91a3e7b1840ddf
EBUILD spatialite-4.3.0a.ebuild 1234 BLAKE2B 13526ec828adbe85fb5e53e0b9e48142c8d26d48ef78b6d070e149da0ee86cc3d4b5cd6b8338377f1ea207d609e33f860b3550650957f22f6bcc2e12fd0f24f2 SHA512 4ed7d7af559d2a779aae76f7bf5a3f91717376ff694eb6b3de6bdeaf7d5414fca5129cec39bd5fdef3673e26129c19ef40db413eb8ee1862618ab3e4e8888de8
-EBUILD spatialite-5.0.1-r1.ebuild 1261 BLAKE2B 9b7d50b4e7d843fe16988f846ab1729208e6d5e405719d60c13e56c178f3a9d487c73deace1ac0fc8a4210140a1b168499b566e718c3e8e70c3af3c14e37c93f SHA512 2ec8db3361a939594cfa8fb7a3e6e992b1c2cb568fabad5f659d1efc6eb1871a5a36c8640dc114dfbdbdea0fb261dd6a74ab7efdef77e60f6211d490527e1391
+EBUILD spatialite-5.0.1-r1.ebuild 1260 BLAKE2B 03ac7e6ef52f0f774f07ffaf50d49a9c3d41f5c44b42cb31debce98f6dc6141802aec9de7261f9efe6c4c7e109748896a004b8a36d268c4c34f1da1fb5a8de2d SHA512 d60f55c00d90f0d83a65d6581e81cb1eb4c815fce765b686dcb21d28e51f4f0b555f9883fba89c6cb8457d93dfc1319448713fd43fcbce289badbf1c467a1238
MISC metadata.xml 559 BLAKE2B b128c4425723bb652063fd3ebebcd83de75a44c7a01e5a8b6c6596cad0bcd1a5f86977f4e3b49d2f1945ea83f12f9761ba712d5f1d919338996c7ddf18bc4a66 SHA512 a21438d83d828b52e4fc16f91edd29e6ace87ada9b697cf233b847a6d3a9f5196135769993873f23409f98548bf852a4e89645c2b0eaf57bd8427ff6dcc36111
diff --git a/dev-db/spatialite/spatialite-5.0.1-r1.ebuild b/dev-db/spatialite/spatialite-5.0.1-r1.ebuild
index 97edef9d767c..95a06e35afec 100644
--- a/dev-db/spatialite/spatialite-5.0.1-r1.ebuild
+++ b/dev-db/spatialite/spatialite-5.0.1-r1.ebuild
@@ -15,7 +15,7 @@ S="${WORKDIR}/${MY_P}"
LICENSE="MPL-1.1"
SLOT="0"
-KEYWORDS="amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 x86"
+KEYWORDS="amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 x86"
IUSE="+geos iconv +proj test +xls +xml"
# Further poking required
RESTRICT="test"
diff --git a/dev-db/timescaledb/Manifest b/dev-db/timescaledb/Manifest
index f78c21ec2109..91126cc32064 100644
--- a/dev-db/timescaledb/Manifest
+++ b/dev-db/timescaledb/Manifest
@@ -2,8 +2,10 @@ DIST timescaledb-2.0.1.tar.gz 2226320 BLAKE2B 0bd5011e30d6c0d5ac11b78ddf6650044f
DIST timescaledb-2.0.2.tar.gz 2237429 BLAKE2B 58c5e68daf5a3c1fade48b2ce8f625496ee3c58be38c573c883e319eb0084064d243270ac839e4bdd1ce3c865fc6b916c7869232b995529d8aca77851a0c7a79 SHA512 26ce25e4d833810cdd99691f3b8a4d0c26655b2efeba7c25d5daaaf2d1aabd8f96a421a771da9c5b6cf29af66ddcab39f3881d40364e25c101ea691e4ec61116
DIST timescaledb-2.1.0.tar.gz 2527250 BLAKE2B 6f257c4b1afc0869c8e309f9b3080dbcdda4b50debc1a5b3848b9d6e59744ff52902b475aca0bc8820aa2edebe9847d62e500a8cd19f7ab8050d9586d95d3a66 SHA512 53fddb9fe4c4ab51ebc020e90eea5b032b41259d3bd45e8a03a86451acd7f8864b5a6ecba1b82b7c78e230f62cfddf1da75ff27e6629ad5fe8178839ac411ce4
DIST timescaledb-2.1.1.tar.gz 2534361 BLAKE2B d0aa5b231cbc9a75bb65eae395ffc0063a94bd3d9c47fe2b1f80bdf59c7624c83e3d4343f3d4ea402654627b8396936614f105fc7d01612f3ea03124471b44a3 SHA512 53bd8f9006741af834cc2598efe95b94e6ebf00df770ac3a4e0a087af83c8ba5ac2b1f421fd108e6609fde6bea725f05e2d590c3f341030a0f31edb6a3cf6cd5
+DIST timescaledb-2.2.1.tar.gz 2637225 BLAKE2B 4ab37bb5c45a3f7550c2694c8757fff3e8dafe122aa9aea1e31d33931367b6b6bf8aa190444cd9472c3ba0aed087fa68d007ce52de24c78add3a53038a1d24ef SHA512 5dae0ed0b71309598bfc9605e838f2d8b4179ccf7098396315153c4044c7bdaaa411fd11ee70ca7807afde4b609faab281dcb1aa2f8d65330ca95e13fbe24582
EBUILD timescaledb-2.0.1-r1.ebuild 1393 BLAKE2B d23f9c7b23f30ea412537613ebc3d22222ed9d729330edf7c236217f7f8f5063fcadf0ffdcee33af357fe4b77e5bc7fa5012ca4d209480292dd32430ecadbbe6 SHA512 786ad20862721c71d7a90a1fcb5ac3e46fd0d6238e03544f53cbbd6db04c84f84b90c5306552ff55ddf848e4e955836b0120ba189c32dd33ed3393c4dc896c4a
EBUILD timescaledb-2.0.2.ebuild 1393 BLAKE2B d23f9c7b23f30ea412537613ebc3d22222ed9d729330edf7c236217f7f8f5063fcadf0ffdcee33af357fe4b77e5bc7fa5012ca4d209480292dd32430ecadbbe6 SHA512 786ad20862721c71d7a90a1fcb5ac3e46fd0d6238e03544f53cbbd6db04c84f84b90c5306552ff55ddf848e4e955836b0120ba189c32dd33ed3393c4dc896c4a
EBUILD timescaledb-2.1.0.ebuild 1396 BLAKE2B 8a165aa634f877687a73267e951122009524cb858a8936660765e3c29ded3b7dab78e3fc851d02eec1c9d02383c62fcfdeace6baea2ae5553d956bea4ebbfeb4 SHA512 1a1811399f2af6daacf41e87464ae6da35033751832b3cb4c21acebedd08abfcee829d66e7eab9965e51a20257a773a74f7745c38d91181c382e3a5613256637
EBUILD timescaledb-2.1.1.ebuild 1396 BLAKE2B 8a165aa634f877687a73267e951122009524cb858a8936660765e3c29ded3b7dab78e3fc851d02eec1c9d02383c62fcfdeace6baea2ae5553d956bea4ebbfeb4 SHA512 1a1811399f2af6daacf41e87464ae6da35033751832b3cb4c21acebedd08abfcee829d66e7eab9965e51a20257a773a74f7745c38d91181c382e3a5613256637
+EBUILD timescaledb-2.2.1.ebuild 1430 BLAKE2B 9203a7817b117076c41de1c71dbee175bcd4cdbf1776a78cfeaa58dd62f9239fe610fa3b064ed958f8fbb40a7bcf092eba4e3ffe36a982ff26aa2eb1219d2593 SHA512 b361ae25d0c4389c33f0a219047cf538eccd1a37a9b2c8558624993ee909615ef19919793764dd41a065814669d0d5b1cc59cc2e7b58304f93c8b7c00c31f2a2
MISC metadata.xml 423 BLAKE2B a3a3492702b7cb6926726e2bc423baa3f9cedd29dd4c22d40d3e3b04e2513bd0a98cd003fcec34f6df4e0e01e653ecc550f38c8869f170bd8fbc08897ccd025c SHA512 cf01e5ba26d38251ef1fabdbf01f3190a077ba000b36682cc49c93b1f5149d1812e3e3a1dc659fa6e9acc39bcfc0dba2effd6588ef50e8d7834b4c68d7016801
diff --git a/dev-db/timescaledb/timescaledb-2.2.1.ebuild b/dev-db/timescaledb/timescaledb-2.2.1.ebuild
new file mode 100644
index 000000000000..1abf97863d8c
--- /dev/null
+++ b/dev-db/timescaledb/timescaledb-2.2.1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+POSTGRES_COMPAT=( 11 12 13 )
+
+inherit postgres-multi cmake
+
+DESCRIPTION="Open-source time-series SQL database"
+HOMEPAGE="https://www.timescale.com/"
+SRC_URI="https://github.com/timescale/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+IUSE="proprietary-extensions"
+LICENSE="POSTGRESQL Apache-2.0 proprietary-extensions? ( timescale )"
+
+KEYWORDS="~amd64"
+
+SLOT=0
+
+RESTRICT="test"
+
+DEPEND="${POSTGRES_DEP}
+ dev-libs/openssl"
+RDEPEND="${DEPEND}"
+
+CMAKE_IN_SOURCE_BUILD=yes
+CMAKE_BUILD_TYPE="RelWithDebInfo"
+BUILD_DIR=${WORKDIR}/${P}
+
+src_prepare() {
+ postgres-multi_src_prepare
+ postgres-multi_foreach cmake_src_prepare
+}
+
+timescale_configure() {
+ local CMAKE_USE_DIR=$BUILD_DIR
+ local mycmakeargs=( "-DPG_CONFIG=/usr/bin/pg_config${MULTIBUILD_VARIANT}" "-DREGRESS_CHECKS=OFF" )
+
+ # licensing is tied to features, this useflag disables the non-apache2 licensed bits
+ if ! use proprietary-extensions ; then
+ mycmakeargs+=("-DAPACHE_ONLY=ON")
+ fi
+ cmake_src_configure
+}
+
+src_configure() {
+ postgres-multi_foreach timescale_configure
+}
+
+timescale_src_compile() {
+ local CMAKE_USE_DIR=$BUILD_DIR
+ cmake_src_compile
+}
+
+src_compile() {
+ postgres-multi_foreach timescale_src_compile
+}
+
+timescale_src_install() {
+ local CMAKE_USE_DIR=$BUILD_DIR
+ cmake_src_install
+}
+
+src_install() {
+ postgres-multi_foreach timescale_src_install
+}